From 754f6389477df0995389eea06801319252d4989f Mon Sep 17 00:00:00 2001 From: Emiliano Pisu Date: Mon, 1 May 2023 18:06:31 +0200 Subject: [PATCH] fix(build-broken): sorry for this, now should work --- .gitignore | 1 - dist/detector.js | 12 +- dist/detector.js.map | 2 +- dist/detector.mjs | 8 + dist/detector.mjs.map | 1 + dist/detector.types.d.ts | 4 + dist/detector.types.d.ts.map | 1 + package.json | 5 +- packages/core/dist/core.js | 603 +++++ packages/core/dist/core.js.map | 1 + packages/core/dist/core.mjs | 585 +++++ packages/core/dist/core.mjs.map | 1 + packages/core/dist/core.types.d.ts | 101 + packages/core/dist/core.types.d.ts.map | 1 + packages/detector/dist/detector.js | 169 ++ packages/detector/dist/detector.js.map | 1 + packages/detector/dist/detector.mjs | 165 ++ packages/detector/dist/detector.mjs.map | 1 + packages/detector/dist/detector.types.d.ts | 93 + .../detector/dist/detector.types.d.ts.map | 1 + packages/feature/dist/feature.js | 929 ++++++++ packages/feature/dist/feature.js.map | 1 + packages/feature/dist/feature.mjs | 910 ++++++++ packages/feature/dist/feature.mjs.map | 1 + packages/feature/dist/feature.types.d.ts | 603 +++++ packages/feature/dist/feature.types.d.ts.map | 1 + packages/hardware/dist/hardware.js | 467 ++++ packages/hardware/dist/hardware.js.map | 1 + packages/hardware/dist/hardware.mjs | 448 ++++ packages/hardware/dist/hardware.mjs.map | 1 + packages/hardware/dist/hardware.types.d.ts | 241 ++ .../hardware/dist/hardware.types.d.ts.map | 1 + packages/software/dist/software.js | 2063 +++++++++++++++++ packages/software/dist/software.js.map | 1 + packages/software/dist/software.mjs | 2045 ++++++++++++++++ packages/software/dist/software.mjs.map | 1 + packages/software/dist/software.types.d.ts | 1296 +++++++++++ .../software/dist/software.types.d.ts.map | 1 + src/detector.ts | 8 +- tsconfig.json | 22 + 40 files changed, 10780 insertions(+), 17 deletions(-) create mode 100644 dist/detector.mjs create mode 100644 dist/detector.mjs.map create mode 100644 dist/detector.types.d.ts create mode 100644 dist/detector.types.d.ts.map create mode 100644 packages/core/dist/core.js create mode 100644 packages/core/dist/core.js.map create mode 100644 packages/core/dist/core.mjs create mode 100644 packages/core/dist/core.mjs.map create mode 100644 packages/core/dist/core.types.d.ts create mode 100644 packages/core/dist/core.types.d.ts.map create mode 100644 packages/detector/dist/detector.js create mode 100644 packages/detector/dist/detector.js.map create mode 100644 packages/detector/dist/detector.mjs create mode 100644 packages/detector/dist/detector.mjs.map create mode 100644 packages/detector/dist/detector.types.d.ts create mode 100644 packages/detector/dist/detector.types.d.ts.map create mode 100644 packages/feature/dist/feature.js create mode 100644 packages/feature/dist/feature.js.map create mode 100644 packages/feature/dist/feature.mjs create mode 100644 packages/feature/dist/feature.mjs.map create mode 100644 packages/feature/dist/feature.types.d.ts create mode 100644 packages/feature/dist/feature.types.d.ts.map create mode 100644 packages/hardware/dist/hardware.js create mode 100644 packages/hardware/dist/hardware.js.map create mode 100644 packages/hardware/dist/hardware.mjs create mode 100644 packages/hardware/dist/hardware.mjs.map create mode 100644 packages/hardware/dist/hardware.types.d.ts create mode 100644 packages/hardware/dist/hardware.types.d.ts.map create mode 100644 packages/software/dist/software.js create mode 100644 packages/software/dist/software.js.map create mode 100644 packages/software/dist/software.mjs create mode 100644 packages/software/dist/software.mjs.map create mode 100644 packages/software/dist/software.types.d.ts create mode 100644 packages/software/dist/software.types.d.ts.map create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index d9039b9..7963b7f 100644 --- a/.gitignore +++ b/.gitignore @@ -35,7 +35,6 @@ node_modules # build out/ build -dist # testing coverage diff --git a/dist/detector.js b/dist/detector.js index 116a53d..c57cbb5 100644 --- a/dist/detector.js +++ b/dist/detector.js @@ -1,14 +1,12 @@ -require("@detector-js/detector"); +var $5lkKU$detectorjsdetector = require("@detector-js/detector"); -function $parcel$interopDefault(a) { - return a && a.__esModule ? a.default : a; +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); } -var $1572597be94ce13f$exports = {}; -$1572597be94ce13f$exports = JSON.parse('{"name":"detector-js","version":"1.3.2","description":"DetectorJS, zero-dependency platform/environment detector written in TypeScript","keywords":["detector","detector-js","detection","feature-detection","platform-detection","cpu-detection","gpu-detection","browser-detection","layout-engine-detection","engine-detection","os-detection","useragent-parser","zero-dependency","es6","javascript"],"source":"src/detector.ts","main":"dist/detector.js","module":"dist/detector.mjs","types":"dist/detector.types.d.ts","repository":{"type":"git","url":"git+https://github.com/pixu1980/detector-js.git"},"author":"Emiliano \'Pixu\' Pisu ","contributors":["Emiliano \'Pixu\' Pisu "],"license":"MIT","private":true,"scripts":{"docs":"rm -rf docs && typedoc --tsconfig ./jsconfig.json && echo \'Documentation built in ./docs folder\'","readme":"pkg-2-readme package.json > README.md -t \\"./pkg-2-readme.template.md\\" && echo \'README.md file built\' || echo \'README.md building error\'","changelog":"changelog && echo \'CHANGELOG.md file built\'","lerna":"lerna bootstrap && lerna link","cache:clear":"rm -rf .parcel-cache dist","deps:clear":"rm -rf packages/**/dist node_modules yarn.lock","clear":"yarn cache:clear && yarn deps:clear","reset":"yarn clear && yarn lerna && yarn serve","restart":"yarn cache:clear && yarn serve","serve":"parcel ./src/index.html","watch:all":"lerna exec --parallel yarn watch","prewatch":"yarn watch:all","watch":"parcel watch","build:all":"lerna run build","prebuild":"yarn build:all","build":"parcel build","prerelease":"yarn build:all && yarn build && yarn changelog && yarn readme && yarn docs","release":"lerna publish && yarn publish"},"bugs":{"url":"https://github.com/pixu1980/detector-js/issues"},"homepage":"https://github.com/pixu1980/detector-js#readme","documentation":"https://pixu1980.github.io/detector-js/docs/index.html","todo":"https://github.com/pixu1980/detector-js#todo","files":["dist"],"workspaces":["packages/*"],"dependencies":{"@detector-js/core":"^0.0.1","@detector-js/feature":"^0.0.1","@detector-js/hardware":"^0.0.1","@detector-js/software":"^0.0.1","@detector-js/detector":"^0.0.1"},"devDependencies":{"@parcel/packager-ts":"2.8.3","@parcel/transformer-typescript-types":"2.8.3","@types/node":"18.15.12","changelog":"1.4.2","lerna":"6.6.1","parcel":"2.8.3","pkg-2-readme":"0.0.6","typedoc":"^0.24.4","typescript":"5.0.4"}}'); +$parcel$export(module.exports, "Detector", () => $60ed293a319c8885$re_export$Detector); - -console.log(`DetectorJS v${(0, (/*@__PURE__*/$parcel$interopDefault($1572597be94ce13f$exports))).version} initialized`); +"use strict"; //# sourceMappingURL=detector.js.map diff --git a/dist/detector.js.map b/dist/detector.js.map index 45c43ec..90666ba 100644 --- a/dist/detector.js.map +++ b/dist/detector.js.map @@ -1 +1 @@ -{"mappings":";;;;;;ACAA,4BAAiB,KAAK,KAAK,CAAC;;ADA5B;;AAIA,QAAQ,GAAG,CAAC,CAAC,YAAY,EAAE,CAAA,GAAA,yDAAW,OAAD,EAAE,OAAO,CAAC,YAAY,CAAC","sources":["src/detector.ts","package.json"],"sourcesContent":["import packageJSON from '../package.json';\n\nexport * from '@detector-js/detector';\n\nconsole.log(`DetectorJS v${packageJSON.version} initialized`);\n","{\n \"name\": \"detector-js\",\n \"version\": \"1.3.2\",\n \"description\": \"DetectorJS, zero-dependency platform/environment detector written in TypeScript\",\n \"keywords\": [\n \"detector\",\n \"detector-js\",\n \"detection\",\n \"feature-detection\",\n \"platform-detection\",\n \"cpu-detection\",\n \"gpu-detection\",\n \"browser-detection\",\n \"layout-engine-detection\",\n \"engine-detection\",\n \"os-detection\",\n \"useragent-parser\",\n \"zero-dependency\",\n \"es6\",\n \"javascript\"\n ],\n \"source\": \"src/detector.ts\",\n \"main\": \"dist/detector.js\",\n \"module\": \"dist/detector.mjs\",\n \"types\": \"dist/detector.types.d.ts\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/pixu1980/detector-js.git\"\n },\n \"author\": \"Emiliano 'Pixu' Pisu \",\n \"contributors\": [\n \"Emiliano 'Pixu' Pisu \"\n ],\n \"license\": \"MIT\",\n \"private\": true,\n \"scripts\": {\n \"docs\": \"rm -rf docs && typedoc --tsconfig ./jsconfig.json && echo 'Documentation built in ./docs folder'\",\n \"readme\": \"pkg-2-readme package.json > README.md -t \\\"./pkg-2-readme.template.md\\\" && echo 'README.md file built' || echo 'README.md building error'\",\n \"changelog\": \"changelog && echo 'CHANGELOG.md file built'\",\n \"lerna\": \"lerna bootstrap && lerna link\",\n \"cache:clear\": \"rm -rf .parcel-cache dist\",\n \"deps:clear\": \"rm -rf packages/**/dist node_modules yarn.lock\",\n \"clear\": \"yarn cache:clear && yarn deps:clear\",\n \"reset\": \"yarn clear && yarn lerna && yarn serve\",\n \"restart\": \"yarn cache:clear && yarn serve\",\n \"serve\": \"parcel ./src/index.html\",\n \"watch:all\": \"lerna exec --parallel yarn watch\",\n \"prewatch\": \"yarn watch:all\",\n \"watch\": \"parcel watch\",\n \"build:all\": \"lerna run build\",\n \"prebuild\": \"yarn build:all\",\n \"build\": \"parcel build\",\n \"prerelease\": \"yarn build:all && yarn build && yarn changelog && yarn readme && yarn docs\",\n \"release\": \"lerna publish && yarn publish\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/pixu1980/detector-js/issues\"\n },\n \"homepage\": \"https://github.com/pixu1980/detector-js#readme\",\n \"documentation\": \"https://pixu1980.github.io/detector-js/docs/index.html\",\n \"todo\": \"https://github.com/pixu1980/detector-js#todo\",\n \"files\": [\n \"dist\"\n ],\n \"workspaces\": [\n \"packages/*\"\n ],\n \"dependencies\": {\n \"@detector-js/core\": \"^0.0.1\",\n \"@detector-js/feature\": \"^0.0.1\",\n \"@detector-js/hardware\": \"^0.0.1\",\n \"@detector-js/software\": \"^0.0.1\",\n \"@detector-js/detector\": \"^0.0.1\"\n },\n \"devDependencies\": {\n \"@parcel/packager-ts\": \"2.8.3\",\n \"@parcel/transformer-typescript-types\": \"2.8.3\",\n \"@types/node\": \"18.15.12\",\n \"changelog\": \"1.4.2\",\n \"lerna\": \"6.6.1\",\n \"parcel\": \"2.8.3\",\n \"pkg-2-readme\": \"0.0.6\",\n \"typedoc\": \"^0.24.4\",\n \"typescript\": \"5.0.4\"\n }\n}\n"],"names":[],"version":3,"file":"detector.js.map"} \ No newline at end of file +{"mappings":";;;;;;;AAAA;AAAA","sources":["src/detector.ts"],"sourcesContent":["'use strict';\n\nimport { Detector } from '@detector-js/detector';\n\nexport { Detector };\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`DetectorJS v${packageJSON.version} initialized`);\n}\n"],"names":[],"version":3,"file":"detector.js.map"} \ No newline at end of file diff --git a/dist/detector.mjs b/dist/detector.mjs new file mode 100644 index 0000000..c6bf7ad --- /dev/null +++ b/dist/detector.mjs @@ -0,0 +1,8 @@ +import {Detector as $d7e08214e09b0b3e$re_export$Detector} from "@detector-js/detector"; + + +"use strict"; + + +export {$d7e08214e09b0b3e$re_export$Detector as Detector}; +//# sourceMappingURL=detector.mjs.map diff --git a/dist/detector.mjs.map b/dist/detector.mjs.map new file mode 100644 index 0000000..e4426ce --- /dev/null +++ b/dist/detector.mjs.map @@ -0,0 +1 @@ +{"mappings":";;AAAA;AAAA","sources":["src/detector.ts"],"sourcesContent":["'use strict';\n\nimport { Detector } from '@detector-js/detector';\n\nexport { Detector };\n"],"names":[],"version":3,"file":"detector.mjs.map"} \ No newline at end of file diff --git a/dist/detector.types.d.ts b/dist/detector.types.d.ts new file mode 100644 index 0000000..6222773 --- /dev/null +++ b/dist/detector.types.d.ts @@ -0,0 +1,4 @@ +import { Detector } from "@detector-js/detector"; +export { Detector }; + +//# sourceMappingURL=detector.types.d.ts.map diff --git a/dist/detector.types.d.ts.map b/dist/detector.types.d.ts.map new file mode 100644 index 0000000..67c3c91 --- /dev/null +++ b/dist/detector.types.d.ts.map @@ -0,0 +1 @@ +{"mappings":";AAIA,OAAO,EAAE,QAAQ,EAAE,CAAC","sources":["src/src/detector.ts","src/detector.ts"],"sourcesContent":[null,"'use strict';\n\nimport { Detector } from '@detector-js/detector';\n\nexport { Detector };\n"],"names":[],"version":3,"file":"detector.types.d.ts.map"} \ No newline at end of file diff --git a/package.json b/package.json index 5aef214..ce7cb07 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "Emiliano 'Pixu' Pisu " ], "license": "MIT", + "private": true, "scripts": { "docs": "rm -rf docs && typedoc --tsconfig ./jsconfig.json && echo 'Documentation built in ./docs folder'", "readme": "pkg-2-readme package.json > README.md -t \"./pkg-2-readme.template.md\" && echo 'README.md file built' || echo 'README.md building error'", @@ -74,12 +75,12 @@ "devDependencies": { "@parcel/packager-ts": "2.8.3", "@parcel/transformer-typescript-types": "2.8.3", - "@types/node": "18.15.12", + "@types/node": "18.16.3", "changelog": "1.4.2", "lerna": "6.6.1", "parcel": "2.8.3", "pkg-2-readme": "0.0.6", - "typedoc": "^0.24.4", + "typedoc": "^0.24.6", "typescript": "5.0.4" } } diff --git a/packages/core/dist/core.js b/packages/core/dist/core.js new file mode 100644 index 0000000..c507a3e --- /dev/null +++ b/packages/core/dist/core.js @@ -0,0 +1,603 @@ +function $parcel$exportWildcard(dest, source) { + Object.keys(source).forEach(function(key) { + if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) { + return; + } + + Object.defineProperty(dest, key, { + enumerable: true, + get: function get() { + return source[key]; + } + }); + }); + + return dest; +} +var $parcel$global = +typeof globalThis !== 'undefined' + ? globalThis + : typeof self !== 'undefined' + ? self + : typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}; +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} +window.Reflect = window.Reflect || {}; + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!String.prototype.includes) Object.defineProperty(String.prototype, "includes", { + enumerable: false, + configurable: true, + writable: true, + value (search, start) { + start = typeof start !== "number" ? 0 : start; + if (start + search.length > this.length) return false; + return this.indexOf(search, start) !== -1; + } +}); + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!String.prototype.startsWith) Object.defineProperty(String.prototype, "startsWith", { + value (search, rawPos) { + const pos = rawPos > 0 ? rawPos | 0 : 0; + return this.substring(pos, pos + search.length) === search; + } +}); + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!String.prototype.toCamelCase) Object.defineProperty(String.prototype, "toCamelCase", { + enumerable: false, + configurable: true, + writable: true, + value () { + const s = this && this.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).map((x)=>{ + return x.slice(0, 1).toUpperCase() + x.slice(1).toLowerCase(); + }).join(""); + return s.slice(0, 1).toLowerCase() + s.slice(1); + } +}); + + + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!Array.prototype.map) Object.defineProperty(Array.prototype, "map", { + enumerable: false, + configurable: true, + writable: true, + value (arr, iterator) { + const result = []; + for(let i = 0; i < arr.length; i += 1)result.push(iterator(arr[i])); + return result; + } +}); + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!Array.prototype.includes) Object.defineProperty(Array.prototype, "includes", { + enumerable: false, + configurable: true, + writable: true, + value (valueToFind, fromIndex) { + if (this == null) throw new TypeError('"this" is null or not defined'); + // 1. Let O be ? ToObject(this value). + const o = Object(this); + // 2. Let len be ? ToLength(? Get(O, "length")). + const len = o.length >>> 0; + // 3. If len is 0, return false. + if (len === 0) return false; + // 4. Let n be ? ToInteger(fromIndex). + // (If fromIndex is undefined, this step produces the value 0.) + const n = fromIndex | 0; + // 5. If n ≥ 0, then + // a. Let k be n. + // 6. Else n < 0, + // a. Let k be len + n. + // b. If k < 0, let k be 0. + let k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); + function sameValueZero(x, y) { + return x === y || typeof x === "number" && typeof y === "number" && isNaN(x) && isNaN(y); + } + // 7. Repeat, while k < len + while(k < len){ + // a. Let elementK be the result of ? Get(O, ! ToString(k)). + // b. If SameValueZero(valueToFind, elementK) is true, return true. + if (sameValueZero(o[k], valueToFind)) return true; + // c. Increase k by 1. + k++; + } + // 8. Return false + return false; + } +}); + + + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!Object.assign) Object.defineProperty(Object, "assign", { + enumerable: false, + configurable: true, + writable: true, + value (target, firstSource) { + if (target === undefined || target === null) throw new TypeError("Cannot convert first argument to object"); + const to = Object(target); + for(let i = 1; i < arguments.length; i++){ + let nextSource = arguments[i]; + if (nextSource === undefined || nextSource === null) continue; + nextSource = Object(nextSource); + const keysArray = Object.keys(Object(nextSource)); + for(let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++){ + const nextKey = keysArray[nextIndex]; + const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) to[nextKey] = nextSource[nextKey]; + } + } + return to; + } +}); + + +/* eslint-disable */ (function(Object1, GOPS) { + "use strict"; + // (C) Andrea Giammarchi - Mit Style + // @see https://github.com/es-shims/get-own-property-symbols + if (GOPS in Object1) return; + var setDescriptor, G = typeof $parcel$global === typeof G ? window : $parcel$global, id = 0, random = String(Math.random()), prefix = "__\x01symbol:", prefixLength = prefix.length, internalSymbol = "__\x01symbol@@" + random, DP = "defineProperty", DPies = "defineProperties", GOPN = "getOwnPropertyNames", GOPD = "getOwnPropertyDescriptor", PIE = "propertyIsEnumerable", gOPN = Object1[GOPN], gOPD = Object1[GOPD], create = Object1.create, keys = Object1.keys, freeze = Object1.freeze || Object1, defineProperty = Object1[DP], $defineProperties = Object1[DPies], descriptor = gOPD(Object1, GOPN), ObjectProto = Object1.prototype, hOP = ObjectProto.hasOwnProperty, pIE = ObjectProto[PIE], toString = ObjectProto.toString, addInternalIfNeeded = function(o, uid, enumerable) { + if (!hOP.call(o, internalSymbol)) defineProperty(o, internalSymbol, { + enumerable: false, + configurable: false, + writable: false, + value: {} + }); + o[internalSymbol]["@@" + uid] = enumerable; // eslint-disable-line no-param-reassign + }, createWithSymbols = function(proto, descriptors) { + var self = create(proto); + gOPN(descriptors).forEach(function(key) { + if (propertyIsEnumerable.call(descriptors, key)) $defineProperty(self, key, descriptors[key]); + }); + return self; + }, copyAsNonEnumerable = function(descriptor) { + var newDescriptor = create(descriptor); + newDescriptor.enumerable = false; + return newDescriptor; + }, get = function get() {}, onlyNonSymbols = function(name) { + // eslint-disable-next-line eqeqeq + return name != internalSymbol && !hOP.call(source, name); + }, onlySymbols = function(name) { + // eslint-disable-next-line eqeqeq + return name != internalSymbol && hOP.call(source, name); + }, propertyIsEnumerable = function propertyIsEnumerable(key) { + var uid = String(key); + return onlySymbols(uid) ? hOP.call(this, uid) && this[internalSymbol]["@@" + uid] : pIE.call(this, key); + }, setAndGetSymbol = function(uid) { + var descriptor = { + enumerable: false, + configurable: true, + get: get, + set: function(value) { + setDescriptor(this, uid, { + enumerable: false, + configurable: true, + writable: true, + value: value + }); + addInternalIfNeeded(this, uid, true); + } + }; + defineProperty(ObjectProto, uid, descriptor); + source[uid] = defineProperty(Object1(uid), "constructor", sourceConstructor); + return freeze(source[uid]); + }, Symbol1 = function Symbol1(description) { + if (this instanceof Symbol1) throw new TypeError("Symbol is not a constructor"); + return setAndGetSymbol(prefix.concat(description || "", random, ++id)); + }, source = create(null), sourceConstructor = { + value: Symbol1 + }, sourceMap = function(uid) { + return source[uid]; + }, $defineProperty = function defineProp(o, key, descriptor) { + var uid = String(key); + if (onlySymbols(uid)) { + setDescriptor(o, uid, descriptor.enumerable ? copyAsNonEnumerable(descriptor) : descriptor); + addInternalIfNeeded(o, uid, !!descriptor.enumerable); + } else defineProperty(o, key, descriptor); + return o; + }, $getOwnPropertySymbols = function getOwnPropertySymbols(o) { + return gOPN(o).filter(onlySymbols).map(sourceMap); + }; + descriptor.value = $defineProperty; + defineProperty(Object1, DP, descriptor); + descriptor.value = $getOwnPropertySymbols; + defineProperty(Object1, GOPS, descriptor); + descriptor.value = function getOwnPropertyNames(o) { + return gOPN(o).filter(onlyNonSymbols); + }; + defineProperty(Object1, GOPN, descriptor); + descriptor.value = function defineProperties(o, descriptors) { + var symbols = $getOwnPropertySymbols(descriptors); + if (symbols.length) keys(descriptors).concat(symbols).forEach(function(uid) { + if (propertyIsEnumerable.call(descriptors, uid)) $defineProperty(o, uid, descriptors[uid]); + }); + else $defineProperties(o, descriptors); + return o; + }; + defineProperty(Object1, DPies, descriptor); + descriptor.value = propertyIsEnumerable; + defineProperty(ObjectProto, PIE, descriptor); + descriptor.value = Symbol1; + defineProperty(G, "Symbol", descriptor); + // defining `Symbol.for(key)` + descriptor.value = function(key) { + var uid = prefix.concat(prefix, key, random); + return uid in ObjectProto ? source[uid] : setAndGetSymbol(uid); + }; + defineProperty(Symbol1, "for", descriptor); + // defining `Symbol.keyFor(symbol)` + descriptor.value = function(symbol) { + if (onlyNonSymbols(symbol)) throw new TypeError(symbol + " is not a symbol"); + if (!hOP.call(source, symbol)) return void 0; + var label = symbol.slice(prefixLength); + if (label.slice(0, prefixLength) !== prefix) return void 0; + label = label.slice(prefixLength); + if (label === random) return void 0; + label = label.slice(0, label.length - random.length); + return label.length > 0 ? label : void 0; + }; + defineProperty(Symbol1, "keyFor", descriptor); + descriptor.value = function getOwnPropertyDescriptor(o, key) { + var descriptor = gOPD(o, key); + if (descriptor && onlySymbols(key)) descriptor.enumerable = propertyIsEnumerable.call(o, key); + return descriptor; + }; + defineProperty(Object1, GOPD, descriptor); + descriptor.value = function(proto, descriptors) { + return arguments.length === 1 || typeof descriptors === "undefined" ? create(proto) : createWithSymbols(proto, descriptors); + }; + defineProperty(Object1, "create", descriptor); + descriptor.value = function() { + var str = toString.call(this); + return str === "[object String]" && onlySymbols(this) ? "[object Symbol]" : str; + }; + defineProperty(ObjectProto, "toString", descriptor); + try { + if (create(defineProperty({}, prefix, { + get: function() { + return defineProperty(this, prefix, { + value: true + })[prefix]; + } + }))[prefix] === true) setDescriptor = defineProperty; + else throw "IE11"; // eslint-disable-line no-throw-literal + } catch (o_O) { + setDescriptor = function(o, key, descriptor) { + var protoDescriptor = gOPD(ObjectProto, key); + delete ObjectProto[key]; + defineProperty(o, key, descriptor); + defineProperty(ObjectProto, key, protoDescriptor); + }; + } +})(Object, "getOwnPropertySymbols"); +(function(O, Symbol1) { + "use strict"; + var dP = O.defineProperty, ObjectProto = O.prototype, toString = ObjectProto.toString, toStringTag = "toStringTag", descriptor; + [ + "iterator", + "match", + "replace", + "search", + "split", + "hasInstance", + "isConcatSpreadable", + "unscopables", + "species", + "toPrimitive", + toStringTag // A string value used for the default description of an object. Used by Object.prototype.toString(). + ].forEach(function(name) { + if (!(name in Symbol1)) { + dP(Symbol1, name, { + value: Symbol1(name) + }); + if (name === toStringTag) { + descriptor = O.getOwnPropertyDescriptor(ObjectProto, "toString"); + descriptor.value = function() { + var str = toString.call(this); + var tst = this == null ? this : this[Symbol1.toStringTag]; + return tst == null ? str : "[object " + tst + "]"; + }; + dP(ObjectProto, "toString", descriptor); + } + } + }); +})(Object, Symbol); +(function(Si, AP, SP) { + function returnThis() { + return this; + } + /* + * make Arrays usable as iterators + * so that other iterables can copy same logic + */ if (!AP[Si]) // eslint-disable-next-line no-param-reassign + AP[Si] = function() { + var i = 0, self = this, iterator = { + next: function next() { + var done = self.length <= i; + return done ? { + done: done + } : { + done: done, + value: self[i++] + }; + } + }; + iterator[Si] = returnThis; + return iterator; + }; + /* + * make Strings usable as iterators + * to simplify Array.from and for/of like loops + */ if (!SP[Si]) // eslint-disable-next-line no-param-reassign + SP[Si] = function() { + var fromCodePoint = String.fromCodePoint, self = this, i = 0, length = self.length, iterator = { + next: function next() { + var done = length <= i, c = done ? "" : fromCodePoint(self.codePointAt(i)); + i += c.length; + return done ? { + done: done + } : { + done: done, + value: c + }; + } + }; + iterator[Si] = returnThis; + return iterator; + }; +})(Symbol.iterator, Array.prototype, String.prototype); + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!Object.hasOwnProperty("getOwnPropertyDescriptors")) Object.defineProperty(Object, "getOwnPropertyDescriptors", { + configurable: true, + enumerable: true, + writable: true, + value (object) { + const keys = !!Reflect && !!Reflect.ownKeys ? Reflect.ownKeys(object) : Object.getOwnPropertyNames(object).concat(Object.getOwnPropertySymbols(object)); + return keys.reduce((descriptors, key)=>{ + return Object.defineProperty(descriptors, key, { + configurable: true, + enumerable: true, + writable: true, + value: Object.getOwnPropertyDescriptor(object, key) + }); + }, {}); + } +}); + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!Object.prototype.merge) Object.defineProperty(Object.prototype, "merge", { + enumerable: false, + configurable: true, + writable: true, + value (...objs) { + const mergeObj = [ + this, + ...objs + ].reduce((acc, obj)=>Object.keys(obj).reduce((a, k)=>{ + if (acc.hasOwnProperty(k)) { + if (acc[k] instanceof Array) acc[k] = [].concat(acc[k], obj[k]); + else if (acc[k] instanceof Object && Object.keys(acc[k]).length > 0 && obj[k] instanceof Object && Object.keys(obj[k]).length > 0) acc[k].merge(obj[k]); + else acc[k] = obj[k]; + } else acc[k] = obj[k]; + return acc; + }, {}), {}); + return Object.assign(this, mergeObj); + } +}); + + + + + + +var $b4c31302e15c8c5a$exports = {}; + +$parcel$export($b4c31302e15c8c5a$exports, "Asserts", () => $b4c31302e15c8c5a$export$a01bb7117a391d00); +/** + * + * + * @export + * @class Asserts + */ class $b4c31302e15c8c5a$export$a01bb7117a391d00 { + static #checkAssert(assert, safe = false) { + if (!!assert) { + if (assert instanceof Function) { + if (!!safe) try { + return assert(); + } catch (e) { + return false; + } + return assert(); + } + return assert; + } + return false; + } + /** + * Check for every assert to be true + * + * @static + * @param {any} [asserts=[]] - array of asserts (can be boolean, strings, functions, whatever you want ;-) + * @param {boolean} [safe=false] - executes asserts in a safe mode (try/catch) + * @returns boolean + * + * @memberOf Asserts + */ static all(asserts = [], safe = false) { + return asserts.every((assert)=>{ + return $b4c31302e15c8c5a$export$a01bb7117a391d00.#checkAssert(assert, safe); + }); + } + /** + * Check for at least one assert to be true + * + * @static + * @param {any} [asserts=[]] - array of asserts (can be boolean, strings, functions, whatever you want ;-) + * @param {boolean} [safe=false] - executes asserts in a safe mode (try/catch) + * @returns boolean + * + * @memberOf Asserts + */ static one(asserts = [], safe = false) { + return asserts.some((assert)=>{ + return $b4c31302e15c8c5a$export$a01bb7117a391d00.#checkAssert(assert, safe); + }); + } +} + + +var $3853ce05413b7049$exports = {}; + +$parcel$export($3853ce05413b7049$exports, "FlagsClass", () => $3853ce05413b7049$export$4f3d6547cdbed990); +/** + * + * + * @export + * @class FlagsClass + */ class $3853ce05413b7049$export$4f3d6547cdbed990 { + #booleanFlagsValuePropertyName; + get booleanFlagsValuePropertyName() { + return this.#booleanFlagsValuePropertyName; + } + set booleanFlagsValuePropertyName(booleanFlagsValuePropertyName) { + this.#booleanFlagsValuePropertyName = booleanFlagsValuePropertyName; + } + #root; + get root() { + return this.#root; + } + #process; + get process() { + return this.#process; + } + #navigator; + get navigator() { + return this.#navigator; + } + #document; + get document() { + return this.#document; + } + #ua; + get ua() { + return this.#ua; + } + /** + * Creates an instance of FlagsClass. + * @param {any} [ua=null] + * + * @memberOf FlagsClass + */ constructor(ua = null){ + this.#booleanFlagsValuePropertyName = "name"; + this.#root = self || window || $parcel$global || {}; + this.#process = this.#root.process || {}; + this.#navigator = this.#root.navigator || {}; + this.#document = this.#root.document || null; + this.#ua = ua || this.#navigator.userAgent || "n/a"; + } + /** + * + * + * @returns {object} + * + * @memberOf FlagsClass + */ toValues() { + const proto = Object.getPrototypeOf(this); + const protoName = (this.#booleanFlagsValuePropertyName || this.constructor.name).toLowerCase(); + const protoProperties = Object.getOwnPropertyNames(proto).filter((prop)=>{ + return !!Object.getOwnPropertyDescriptors(proto)[prop].get; + }).concat(Object.getOwnPropertyNames(this).filter((prop)=>{ + return !prop.startsWith("_") && !Object.getOwnPropertyDescriptor(this, prop)?.get; + })); + const protoPropertiesReduced = protoProperties.reduce((acc, prop)=>{ + if (!!this[prop]) { + if (typeof this[prop] === "boolean") acc[protoName] = prop; + else acc[prop] = this[prop]; + } + return acc; + }, {}); + return protoPropertiesReduced; + } + /** + * + * + * @returns {object} + * + * @memberOf FlagsClass + */ toFlags() { + const proto = Object.getPrototypeOf(this); + return Object.getOwnPropertyNames(proto).filter((prop)=>{ + return !!Object.getOwnPropertyDescriptors(proto)[prop].get; + }).reduce((acc, prop)=>{ + acc[prop] = this[prop]; + return acc; + }, {})//@ts-ignore + .merge(Object.getOwnPropertyNames(this).filter((prop)=>{ + return !prop.startsWith("_") && !Object.getOwnPropertyDescriptor(this, prop)?.get; + }).reduce((acc, prop)=>{ + acc[prop] = this[prop]; + return acc; + }, {})); + } +} + + +var $8f7f229243ba7cd8$exports = {}; + +$parcel$export($8f7f229243ba7cd8$exports, "CssFlagsClass", () => $8f7f229243ba7cd8$export$f4dfb95cdf26c5c7); + +class $8f7f229243ba7cd8$export$f4dfb95cdf26c5c7 extends (0, $3853ce05413b7049$export$4f3d6547cdbed990) { + #flags; + get flags() { + return this.#flags; + } + #cssFlagsPrefix; + get cssFlagsPrefix() { + return this.#cssFlagsPrefix; + } + /** + * Creates an instance of CssFlagsClass. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='flags'] + * + * @memberOf CssFlagsClass + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "flags"){ + super(ua); + this.#flags = flags; + this.#flags[1] = true; + this.#cssFlagsPrefix = cssFlagsPrefix; + } + /** + * + * + * @returns object + * + * @memberOf CssFlagsClass + */ toCssFlags() { + const proto = Object.getPrototypeOf(this); + return Object.getOwnPropertyNames(proto).filter((prop)=>{ + return !!Object.getOwnPropertyDescriptors(proto)[prop].get; + }).reduce((acc, prop)=>{ + if (!!this[prop]) acc.push(`${this.#cssFlagsPrefix}--${prop}--${typeof this[prop] !== "boolean" ? "--" + this[prop] : ""}`.toLowerCase()); + return acc; + }, []); + } +} + + +"use strict"; +$parcel$exportWildcard(module.exports, $b4c31302e15c8c5a$exports); +$parcel$exportWildcard(module.exports, $3853ce05413b7049$exports); +$parcel$exportWildcard(module.exports, $8f7f229243ba7cd8$exports); + + +//# sourceMappingURL=core.js.map diff --git a/packages/core/dist/core.js.map b/packages/core/dist/core.js.map new file mode 100644 index 0000000..328ff8e --- /dev/null +++ b/packages/core/dist/core.js.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,OAAO,OAAO,GAAG,OAAO,OAAO,IAAI,CAAC;;ADApC;AGAA,uCAAuC,GACvC,qCAAqC,GACrC,wCAAwC,GACxC,6BAA6B,GAE7B,IAAI,CAAC,OAAO,SAAS,CAAC,QAAQ,EAC5B,OAAO,cAAc,CAAC,OAAO,SAAS,EAAE,YAAY;IAClD,YAAY,KAAK;IACjB,cAAc,IAAI;IAClB,UAAU,IAAI;IACd,OAAM,MAAM,EAAE,KAAK,EAAE;QACnB,QAAQ,AAAC,OAAO,UAAU,WAAY,IAAI,KAAK;QAE/C,IAAI,QAAQ,OAAO,MAAM,GAAG,IAAI,CAAC,MAAM,EACrC,OAAO,KAAK;QAGd,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,WAAW;IACzC;AACF;;ADnBF;AEAA,uCAAuC,GACvC,qCAAqC,GACrC,wCAAwC,GACxC,6BAA6B,GAE7B,IAAI,CAAC,OAAO,SAAS,CAAC,UAAU,EAC9B,OAAO,cAAc,CAAC,OAAO,SAAS,EAAE,cAAc;IACpD,OAAM,MAAM,EAAE,MAAM,EAAE;QACpB,MAAM,MAAM,SAAS,IAAI,SAAS,IAAI,CAAC;QACvC,OAAO,IAAI,CAAC,SAAS,C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O,CAAE;QAC1E,KAAK,CAAC;QAEN,IAAI,CAAC,CAAC,KAAK,GAAG;QAEd,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI;QACrB,IAAI,CAAC,CAAC,cAAc,GAAG;IACzB;IAEA;;;;;;GAMC,GACD,aAAa;QACX,MAAM,QAAQ,OAAO,cAAc,CAAC,IAAI;QAExC,OAAO,OAAO,mBAAmB,CAAC,OAC/B,MAAM,CAAC,CAAC,OAAS;YAChB,OAAO,CAAC,CAAC,OAAO,yBAAyB,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG;QAC5D,GACC,MAAM,CAAC,CAAC,KAAe,OAAS;YAC/B,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,EACd,IAAI,IAAI,CACN,CAAC,EAAE,IAAI,CAAC,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,EAAE,EACjC,OAAO,IAAI,CAAC,KAAK,KAAK,YAAY,OAAO,IAAI,CAAC,KAAK,GAAG,EAAE,CACzD,CAAC,CAAC,WAAW;YAIlB,OAAO;QACT,GAAG,EAAE;IACT;AACF;;;AjBjEA","sources":["packages/core/lib/core.ts","packages/core/lib/polyfills/index.js","packages/core/lib/polyfills/core/index.js","packages/core/lib/polyfills/string/index.js","packages/core/lib/polyfills/string/includes.js","packages/core/lib/polyfills/string/startsWith.js","packages/core/lib/polyfills/string/toCamelCase.js","packages/core/lib/polyfills/array/index.js","packages/core/lib/polyfills/array/map.js","packages/core/lib/polyfills/array/includes.js","packages/core/lib/polyfills/object/index.js","packages/core/lib/polyfills/object/assign.js","packages/core/lib/polyfills/object/getOwnPropertySymbols.js","packages/core/lib/polyfills/object/getOwnPropertyDescriptors.js","packages/core/lib/polyfills/object/merge.js","packages/core/lib/asserts.ts","packages/core/lib/flagsClass.ts","packages/core/lib/cssFlagsClass.ts"],"sourcesContent":["'use strict';\n\nimport './polyfills';\n\nexport * from './asserts';\nexport * from './flagsClass';\nexport * from './cssFlagsClass';\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n","import './core/index';\nimport './string/index';\nimport './array/index';\nimport './object/index';\n","window.Reflect = window.Reflect || {};\n","import './includes';\nimport './startsWith';\nimport './toCamelCase';\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!String.prototype.includes) {\n Object.defineProperty(String.prototype, 'includes', {\n enumerable: false,\n configurable: true,\n writable: true,\n value(search, start) {\n start = (typeof start !== 'number') ? 0 : start;\n\n if (start + search.length > this.length) {\n return false;\n }\n\n return this.indexOf(search, start) !== -1;\n },\n });\n}\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!String.prototype.startsWith) {\n Object.defineProperty(String.prototype, 'startsWith', {\n value(search, rawPos) {\n const pos = rawPos > 0 ? rawPos | 0 : 0;\n return this.substring(pos, pos + search.length) === search;\n },\n });\n}\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!String.prototype.toCamelCase) {\n Object.defineProperty(String.prototype, 'toCamelCase', {\n enumerable: false,\n configurable: true,\n writable: true,\n value() {\n const s = this && this.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).map((x) => {\n return x.slice(0, 1).toUpperCase() + x.slice(1).toLowerCase();\n }).join('');\n\n return s.slice(0, 1).toLowerCase() + s.slice(1);\n },\n });\n}\n","import './map';\nimport './includes';\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!Array.prototype.map) {\n Object.defineProperty(Array.prototype, 'map', {\n enumerable: false,\n configurable: true,\n writable: true,\n value(arr, iterator) {\n const result = [];\n\n for (let i = 0; i < arr.length; i += 1) {\n result.push(iterator(arr[i]));\n }\n\n return result;\n },\n });\n}\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!Array.prototype.includes) {\n Object.defineProperty(Array.prototype, 'includes', {\n enumerable: false,\n configurable: true,\n writable: true,\n value(valueToFind, fromIndex) {\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n\n // 1. Let O be ? ToObject(this value).\n const o = Object(this);\n\n // 2. Let len be ? ToLength(? Get(O, \"length\")).\n const len = o.length >>> 0;\n\n // 3. If len is 0, return false.\n if (len === 0) {\n return false;\n }\n\n // 4. Let n be ? ToInteger(fromIndex).\n // (If fromIndex is undefined, this step produces the value 0.)\n const n = fromIndex | 0;\n\n // 5. If n ≥ 0, then\n // a. Let k be n.\n // 6. Else n < 0,\n // a. Let k be len + n.\n // b. If k < 0, let k be 0.\n let k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n function sameValueZero(x, y) {\n return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\n }\n\n // 7. Repeat, while k < len\n while (k < len) {\n // a. Let elementK be the result of ? Get(O, ! ToString(k)).\n // b. If SameValueZero(valueToFind, elementK) is true, return true.\n if (sameValueZero(o[k], valueToFind)) {\n return true;\n }\n // c. Increase k by 1.\n k++;\n }\n\n // 8. Return false\n return false;\n },\n });\n}\n","import './assign';\nimport './getOwnPropertySymbols';\nimport './getOwnPropertyDescriptors';\nimport './merge';\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!Object.assign) {\n Object.defineProperty(Object, 'assign', {\n enumerable: false,\n configurable: true,\n writable: true,\n value(target, firstSource) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert first argument to object');\n }\n\n const to = Object(target);\n for (let i = 1; i < arguments.length; i++) {\n let nextSource = arguments[i];\n if (nextSource === undefined || nextSource === null) {\n // eslint-disable-next-line no-continue\n continue;\n }\n nextSource = Object(nextSource);\n\n const keysArray = Object.keys(Object(nextSource));\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n return to;\n },\n });\n}\n","/* eslint-disable */\n\n(function (Object, GOPS) {\n 'use strict';\n\n // (C) Andrea Giammarchi - Mit Style\n // @see https://github.com/es-shims/get-own-property-symbols\n\n if (GOPS in Object) { return; }\n\n var\n setDescriptor,\n G = typeof global === typeof G ? window : global,\n id = 0,\n random = String(Math.random()),\n prefix = '__\\x01symbol:',\n prefixLength = prefix.length,\n internalSymbol = '__\\x01symbol@@' + random,\n DP = 'defineProperty',\n DPies = 'defineProperties',\n GOPN = 'getOwnPropertyNames',\n GOPD = 'getOwnPropertyDescriptor',\n PIE = 'propertyIsEnumerable',\n gOPN = Object[GOPN],\n gOPD = Object[GOPD],\n create = Object.create,\n keys = Object.keys,\n freeze = Object.freeze || Object,\n defineProperty = Object[DP],\n $defineProperties = Object[DPies],\n descriptor = gOPD(Object, GOPN),\n ObjectProto = Object.prototype,\n hOP = ObjectProto.hasOwnProperty,\n pIE = ObjectProto[PIE],\n toString = ObjectProto.toString,\n addInternalIfNeeded = function (o, uid, enumerable) {\n if (!hOP.call(o, internalSymbol)) {\n defineProperty(o, internalSymbol, {\n enumerable: false,\n configurable: false,\n writable: false,\n value: {}\n });\n }\n o[internalSymbol]['@@' + uid] = enumerable; // eslint-disable-line no-param-reassign\n },\n createWithSymbols = function (proto, descriptors) {\n var self = create(proto);\n gOPN(descriptors).forEach(function (key) {\n if (propertyIsEnumerable.call(descriptors, key)) {\n $defineProperty(self, key, descriptors[key]);\n }\n });\n return self;\n },\n copyAsNonEnumerable = function (descriptor) {\n var newDescriptor = create(descriptor);\n newDescriptor.enumerable = false;\n return newDescriptor;\n },\n get = function get() {},\n onlyNonSymbols = function (name) {\n // eslint-disable-next-line eqeqeq\n return name != internalSymbol && !hOP.call(source, name);\n },\n onlySymbols = function (name) {\n // eslint-disable-next-line eqeqeq\n return name != internalSymbol && hOP.call(source, name);\n },\n propertyIsEnumerable = function propertyIsEnumerable(key) {\n var uid = String(key);\n return onlySymbols(uid) ? hOP.call(this, uid) && this[internalSymbol]['@@' + uid] : pIE.call(this, key);\n },\n setAndGetSymbol = function (uid) {\n var descriptor = {\n enumerable: false,\n configurable: true,\n get: get,\n set: function (value) {\n setDescriptor(this, uid, {\n enumerable: false,\n configurable: true,\n writable: true,\n value: value\n });\n addInternalIfNeeded(this, uid, true);\n }\n };\n defineProperty(ObjectProto, uid, descriptor);\n source[uid] = defineProperty(\n Object(uid),\n 'constructor',\n sourceConstructor\n );\n return freeze(source[uid]);\n },\n Symbol = function Symbol(description) {\n if (this instanceof Symbol) {\n throw new TypeError('Symbol is not a constructor');\n }\n return setAndGetSymbol(prefix.concat(description || '', random, ++id));\n },\n source = create(null),\n sourceConstructor = { value: Symbol },\n sourceMap = function (uid) {\n return source[uid];\n },\n $defineProperty = function defineProp(o, key, descriptor) {\n var uid = String(key);\n if (onlySymbols(uid)) {\n setDescriptor(o, uid, descriptor.enumerable ? copyAsNonEnumerable(descriptor) : descriptor);\n addInternalIfNeeded(o, uid, !!descriptor.enumerable);\n } else {\n defineProperty(o, key, descriptor);\n }\n return o;\n },\n $getOwnPropertySymbols = function getOwnPropertySymbols(o) {\n return gOPN(o).filter(onlySymbols).map(sourceMap);\n };\n descriptor.value = $defineProperty;\n defineProperty(Object, DP, descriptor);\n\n descriptor.value = $getOwnPropertySymbols;\n defineProperty(Object, GOPS, descriptor);\n\n descriptor.value = function getOwnPropertyNames(o) {\n return gOPN(o).filter(onlyNonSymbols);\n };\n defineProperty(Object, GOPN, descriptor);\n\n descriptor.value = function defineProperties(o, descriptors) {\n var symbols = $getOwnPropertySymbols(descriptors);\n if (symbols.length) {\n keys(descriptors).concat(symbols).forEach(function (uid) {\n if (propertyIsEnumerable.call(descriptors, uid)) {\n $defineProperty(o, uid, descriptors[uid]);\n }\n });\n } else {\n $defineProperties(o, descriptors);\n }\n return o;\n };\n defineProperty(Object, DPies, descriptor);\n\n descriptor.value = propertyIsEnumerable;\n defineProperty(ObjectProto, PIE, descriptor);\n\n descriptor.value = Symbol;\n defineProperty(G, 'Symbol', descriptor);\n\n // defining `Symbol.for(key)`\n descriptor.value = function (key) {\n var uid = prefix.concat(prefix, key, random);\n return uid in ObjectProto ? source[uid] : setAndGetSymbol(uid);\n };\n defineProperty(Symbol, 'for', descriptor);\n\n // defining `Symbol.keyFor(symbol)`\n descriptor.value = function (symbol) {\n if (onlyNonSymbols(symbol)) { throw new TypeError(symbol + ' is not a symbol'); }\n if (!hOP.call(source, symbol)) {\n return void 0;\n }\n var label = symbol.slice(prefixLength);\n if (label.slice(0, prefixLength) !== prefix) {\n return void 0;\n }\n label = label.slice(prefixLength);\n if (label === random) {\n return void 0;\n }\n label = label.slice(0, label.length - random.length);\n return label.length > 0 ? label : void 0;\n };\n defineProperty(Symbol, 'keyFor', descriptor);\n\n descriptor.value = function getOwnPropertyDescriptor(o, key) {\n var descriptor = gOPD(o, key);\n if (descriptor && onlySymbols(key)) {\n descriptor.enumerable = propertyIsEnumerable.call(o, key);\n }\n return descriptor;\n };\n defineProperty(Object, GOPD, descriptor);\n\n descriptor.value = function (proto, descriptors) {\n return arguments.length === 1 || typeof descriptors === 'undefined' ? create(proto) : createWithSymbols(proto, descriptors);\n };\n defineProperty(Object, 'create', descriptor);\n\n descriptor.value = function () {\n var str = toString.call(this);\n return str === '[object String]' && onlySymbols(this) ? '[object Symbol]' : str;\n };\n defineProperty(ObjectProto, 'toString', descriptor);\n\n try { // fails in few pre ES 5.1 engines\n if (\n create(defineProperty({}, prefix, {\n get: function () {\n return defineProperty(this, prefix, { value: true })[prefix];\n }\n }))[prefix] === true\n ) {\n setDescriptor = defineProperty;\n } else {\n throw 'IE11'; // eslint-disable-line no-throw-literal\n }\n } catch (o_O) { // eslint-disable-line camelcase\n setDescriptor = function (o, key, descriptor) {\n var protoDescriptor = gOPD(ObjectProto, key);\n delete ObjectProto[key];\n defineProperty(o, key, descriptor);\n defineProperty(ObjectProto, key, protoDescriptor);\n };\n }\n\n}(Object, 'getOwnPropertySymbols'));\n\n(function (O, Symbol) {\n 'use strict';\n\n var\n dP = O.defineProperty,\n ObjectProto = O.prototype,\n toString = ObjectProto.toString,\n toStringTag = 'toStringTag',\n descriptor;\n [\n 'iterator', // A method returning the default iterator for an object. Used by for...of.\n 'match', // A method that matches against a string, also used to determine if an object may be used as a regular expression. Used by String.prototype.match().\n 'replace', // A method that replaces matched substrings of a string. Used by String.prototype.replace().\n 'search', // A method that returns the index within a string that matches the regular expression. Used by String.prototype.search().\n 'split', // A method that splits a string at the indices that match a regular expression. Used by String.prototype.split().\n 'hasInstance', // A method determining if a constructor object recognizes an object as its instance. Used by instanceof.\n 'isConcatSpreadable', // A Boolean value indicating if an object should be flattened to its array elements. Used by Array.prototype.concat().\n 'unscopables', // An Array of string values that are property values. These are excluded from the with environment bindings of the associated objects.\n 'species', // A constructor function that is used to create derived objects.\n 'toPrimitive', // A method converting an object to a primitive value.\n toStringTag // A string value used for the default description of an object. Used by Object.prototype.toString().\n ].forEach(function (name) {\n if (!(name in Symbol)) {\n dP(Symbol, name, { value: Symbol(name) });\n if (name === toStringTag) {\n descriptor = O.getOwnPropertyDescriptor(ObjectProto, 'toString');\n descriptor.value = function () {\n var str = toString.call(this);\n var tst = this == null ? this : this[Symbol.toStringTag];\n return tst == null ? str : '[object ' + tst + ']';\n };\n dP(ObjectProto, 'toString', descriptor);\n }\n }\n });\n}(Object, Symbol));\n\n(function (Si, AP, SP) {\n\n function returnThis() { return this; }\n\n /*\n * make Arrays usable as iterators\n * so that other iterables can copy same logic\n */\n if (!AP[Si]) {\n // eslint-disable-next-line no-param-reassign\n AP[Si] = function () {\n var\n i = 0,\n self = this,\n iterator = {\n next: function next() {\n var done = self.length <= i;\n return done ? { done: done } : { done: done, value: self[i++] };\n }\n };\n iterator[Si] = returnThis;\n return iterator;\n };\n }\n\n /*\n * make Strings usable as iterators\n * to simplify Array.from and for/of like loops\n */\n if (!SP[Si]) {\n // eslint-disable-next-line no-param-reassign\n SP[Si] = function () {\n var\n fromCodePoint = String.fromCodePoint,\n self = this,\n i = 0,\n length = self.length,\n iterator = {\n next: function next() {\n var\n done = length <= i,\n c = done ? '' : fromCodePoint(self.codePointAt(i));\n i += c.length;\n return done ? { done: done } : { done: done, value: c };\n }\n };\n iterator[Si] = returnThis;\n return iterator;\n };\n }\n\n}(Symbol.iterator, Array.prototype, String.prototype));\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!Object.hasOwnProperty('getOwnPropertyDescriptors')) {\n Object.defineProperty(Object, 'getOwnPropertyDescriptors', {\n configurable: true,\n enumerable: true,\n writable: true,\n value(object) {\n const keys = !!Reflect && !!Reflect.ownKeys ? Reflect.ownKeys(object) : Object.getOwnPropertyNames(object).concat(Object.getOwnPropertySymbols(object));\n\n return keys.reduce((descriptors, key) => {\n return Object.defineProperty(descriptors, key, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: Object.getOwnPropertyDescriptor(object, key),\n });\n }, {});\n },\n });\n}\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!Object.prototype.merge) {\n Object.defineProperty(Object.prototype, 'merge', {\n enumerable: false,\n configurable: true,\n writable: true,\n value(...objs) {\n const mergeObj = [this, ...objs].reduce((acc, obj) => Object.keys(obj).reduce((a, k) => {\n if (acc.hasOwnProperty(k)) {\n if (acc[k] instanceof Array) {\n acc[k] = [].concat(acc[k], obj[k]);\n } else if (acc[k] instanceof Object && Object.keys(acc[k]).length > 0 && obj[k] instanceof Object && Object.keys(obj[k]).length > 0) {\n acc[k].merge(obj[k]);\n } else {\n acc[k] = obj[k];\n }\n } else {\n acc[k] = obj[k];\n }\n\n return acc;\n }, {}), {});\n\n return Object.assign(this, mergeObj);\n },\n });\n}\n","/**\n *\n *\n * @export\n * @class Asserts\n */\nexport class Asserts {\n static #checkAssert(assert, safe = false) {\n if (!!assert) {\n if (assert instanceof Function) {\n if (!!safe) {\n try {\n return assert();\n } catch (e) {\n return false;\n }\n }\n\n return assert();\n }\n\n return assert;\n }\n\n return false;\n }\n\n /**\n * Check for every assert to be true\n *\n * @static\n * @param {any} [asserts=[]] - array of asserts (can be boolean, strings, functions, whatever you want ;-)\n * @param {boolean} [safe=false] - executes asserts in a safe mode (try/catch)\n * @returns boolean\n *\n * @memberOf Asserts\n */\n static all(asserts: any[] = [], safe = false) {\n return asserts.every((assert) => {\n return Asserts.#checkAssert(assert, safe);\n });\n }\n\n /**\n * Check for at least one assert to be true\n *\n * @static\n * @param {any} [asserts=[]] - array of asserts (can be boolean, strings, functions, whatever you want ;-)\n * @param {boolean} [safe=false] - executes asserts in a safe mode (try/catch)\n * @returns boolean\n *\n * @memberOf Asserts\n */\n static one(asserts: any[] = [], safe = false) {\n return asserts.some((assert) => {\n return Asserts.#checkAssert(assert, safe);\n });\n }\n}\n","/**\n *\n *\n * @export\n * @class FlagsClass\n */\nexport class FlagsClass {\n #booleanFlagsValuePropertyName: string;\n\n get booleanFlagsValuePropertyName() {\n return this.#booleanFlagsValuePropertyName;\n }\n\n set booleanFlagsValuePropertyName(booleanFlagsValuePropertyName: string) {\n this.#booleanFlagsValuePropertyName = booleanFlagsValuePropertyName;\n }\n\n #root: Window & typeof globalThis;\n\n get root() {\n return this.#root;\n }\n\n #process: any; // NodeJS.Process\n\n get process() {\n return this.#process;\n }\n\n #navigator: Navigator;\n\n get navigator() {\n return this.#navigator;\n }\n\n #document: Document;\n\n get document() {\n return this.#document;\n }\n\n #ua: string;\n\n get ua() {\n return this.#ua;\n }\n\n /**\n * Creates an instance of FlagsClass.\n * @param {any} [ua=null]\n *\n * @memberOf FlagsClass\n */\n constructor(ua: string | null = null) {\n this.#booleanFlagsValuePropertyName = 'name';\n this.#root = self || window || global || {};\n\n this.#process = this.#root.process || {};\n this.#navigator = this.#root.navigator || {};\n this.#document = this.#root.document || null;\n this.#ua = ua || this.#navigator.userAgent || 'n/a';\n }\n\n /**\n *\n *\n * @returns {object}\n *\n * @memberOf FlagsClass\n */\n toValues() {\n const proto = Object.getPrototypeOf(this);\n const protoName = (this.#booleanFlagsValuePropertyName || this.constructor.name).toLowerCase();\n\n const protoProperties = Object.getOwnPropertyNames(proto)\n .filter((prop) => {\n return !!Object.getOwnPropertyDescriptors(proto)[prop].get;\n })\n .concat(\n Object.getOwnPropertyNames(this).filter((prop) => {\n return !prop.startsWith('_') && !Object.getOwnPropertyDescriptor(this, prop)?.get;\n })\n );\n\n const protoPropertiesReduced = protoProperties.reduce((acc, prop) => {\n if (!!this[prop]) {\n if (typeof this[prop] === 'boolean') {\n acc[protoName] = prop;\n } else {\n acc[prop] = this[prop];\n }\n }\n return acc;\n }, {});\n\n return protoPropertiesReduced;\n }\n\n /**\n *\n *\n * @returns {object}\n *\n * @memberOf FlagsClass\n */\n toFlags() {\n const proto = Object.getPrototypeOf(this);\n\n return (\n Object.getOwnPropertyNames(proto)\n .filter((prop) => {\n return !!Object.getOwnPropertyDescriptors(proto)[prop].get;\n })\n .reduce((acc, prop) => {\n acc[prop] = this[prop];\n\n return acc;\n }, {})\n //@ts-ignore\n .merge(\n Object.getOwnPropertyNames(this)\n .filter((prop) => {\n return !prop.startsWith('_') && !Object.getOwnPropertyDescriptor(this, prop)?.get;\n })\n .reduce((acc, prop) => {\n acc[prop] = this[prop];\n\n return acc;\n }, {})\n )\n );\n }\n}\n","import { FlagsClass } from './flagsClass';\n\n/**\n *\n *\n * @export\n * @class CssFlagsClass\n * @extends {FlagsClass}\n */\nexport class CssFlagsClass extends FlagsClass {\n #flags: any;\n\n get flags() {\n return this.#flags;\n }\n\n #cssFlagsPrefix: string;\n\n get cssFlagsPrefix() {\n return this.#cssFlagsPrefix;\n }\n\n /**\n * Creates an instance of CssFlagsClass.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='flags']\n *\n * @memberOf CssFlagsClass\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'flags') {\n super(ua);\n\n this.#flags = flags;\n\n this.#flags[1] = true;\n this.#cssFlagsPrefix = cssFlagsPrefix;\n }\n\n /**\n *\n *\n * @returns object\n *\n * @memberOf CssFlagsClass\n */\n toCssFlags() {\n const proto = Object.getPrototypeOf(this);\n\n return Object.getOwnPropertyNames(proto)\n .filter((prop) => {\n return !!Object.getOwnPropertyDescriptors(proto)[prop].get;\n })\n .reduce((acc: string[], prop) => {\n if (!!this[prop]) {\n acc.push(\n `${this.#cssFlagsPrefix}--${prop}--${\n typeof this[prop] !== 'boolean' ? '--' + this[prop] : ''\n }`.toLowerCase()\n );\n }\n\n return acc;\n }, []);\n }\n}\n"],"names":[],"version":3,"file":"core.js.map"} \ No newline at end of file diff --git a/packages/core/dist/core.mjs b/packages/core/dist/core.mjs new file mode 100644 index 0000000..7e151bf --- /dev/null +++ b/packages/core/dist/core.mjs @@ -0,0 +1,585 @@ +var $parcel$global = +typeof globalThis !== 'undefined' + ? globalThis + : typeof self !== 'undefined' + ? self + : typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}; +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} +window.Reflect = window.Reflect || {}; + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!String.prototype.includes) Object.defineProperty(String.prototype, "includes", { + enumerable: false, + configurable: true, + writable: true, + value (search, start) { + start = typeof start !== "number" ? 0 : start; + if (start + search.length > this.length) return false; + return this.indexOf(search, start) !== -1; + } +}); + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!String.prototype.startsWith) Object.defineProperty(String.prototype, "startsWith", { + value (search, rawPos) { + const pos = rawPos > 0 ? rawPos | 0 : 0; + return this.substring(pos, pos + search.length) === search; + } +}); + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!String.prototype.toCamelCase) Object.defineProperty(String.prototype, "toCamelCase", { + enumerable: false, + configurable: true, + writable: true, + value () { + const s = this && this.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).map((x)=>{ + return x.slice(0, 1).toUpperCase() + x.slice(1).toLowerCase(); + }).join(""); + return s.slice(0, 1).toLowerCase() + s.slice(1); + } +}); + + + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!Array.prototype.map) Object.defineProperty(Array.prototype, "map", { + enumerable: false, + configurable: true, + writable: true, + value (arr, iterator) { + const result = []; + for(let i = 0; i < arr.length; i += 1)result.push(iterator(arr[i])); + return result; + } +}); + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!Array.prototype.includes) Object.defineProperty(Array.prototype, "includes", { + enumerable: false, + configurable: true, + writable: true, + value (valueToFind, fromIndex) { + if (this == null) throw new TypeError('"this" is null or not defined'); + // 1. Let O be ? ToObject(this value). + const o = Object(this); + // 2. Let len be ? ToLength(? Get(O, "length")). + const len = o.length >>> 0; + // 3. If len is 0, return false. + if (len === 0) return false; + // 4. Let n be ? ToInteger(fromIndex). + // (If fromIndex is undefined, this step produces the value 0.) + const n = fromIndex | 0; + // 5. If n ≥ 0, then + // a. Let k be n. + // 6. Else n < 0, + // a. Let k be len + n. + // b. If k < 0, let k be 0. + let k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); + function sameValueZero(x, y) { + return x === y || typeof x === "number" && typeof y === "number" && isNaN(x) && isNaN(y); + } + // 7. Repeat, while k < len + while(k < len){ + // a. Let elementK be the result of ? Get(O, ! ToString(k)). + // b. If SameValueZero(valueToFind, elementK) is true, return true. + if (sameValueZero(o[k], valueToFind)) return true; + // c. Increase k by 1. + k++; + } + // 8. Return false + return false; + } +}); + + + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!Object.assign) Object.defineProperty(Object, "assign", { + enumerable: false, + configurable: true, + writable: true, + value (target, firstSource) { + if (target === undefined || target === null) throw new TypeError("Cannot convert first argument to object"); + const to = Object(target); + for(let i = 1; i < arguments.length; i++){ + let nextSource = arguments[i]; + if (nextSource === undefined || nextSource === null) continue; + nextSource = Object(nextSource); + const keysArray = Object.keys(Object(nextSource)); + for(let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++){ + const nextKey = keysArray[nextIndex]; + const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) to[nextKey] = nextSource[nextKey]; + } + } + return to; + } +}); + + +/* eslint-disable */ (function(Object1, GOPS) { + "use strict"; + // (C) Andrea Giammarchi - Mit Style + // @see https://github.com/es-shims/get-own-property-symbols + if (GOPS in Object1) return; + var setDescriptor, G = typeof $parcel$global === typeof G ? window : $parcel$global, id = 0, random = String(Math.random()), prefix = "__\x01symbol:", prefixLength = prefix.length, internalSymbol = "__\x01symbol@@" + random, DP = "defineProperty", DPies = "defineProperties", GOPN = "getOwnPropertyNames", GOPD = "getOwnPropertyDescriptor", PIE = "propertyIsEnumerable", gOPN = Object1[GOPN], gOPD = Object1[GOPD], create = Object1.create, keys = Object1.keys, freeze = Object1.freeze || Object1, defineProperty = Object1[DP], $defineProperties = Object1[DPies], descriptor = gOPD(Object1, GOPN), ObjectProto = Object1.prototype, hOP = ObjectProto.hasOwnProperty, pIE = ObjectProto[PIE], toString = ObjectProto.toString, addInternalIfNeeded = function(o, uid, enumerable) { + if (!hOP.call(o, internalSymbol)) defineProperty(o, internalSymbol, { + enumerable: false, + configurable: false, + writable: false, + value: {} + }); + o[internalSymbol]["@@" + uid] = enumerable; // eslint-disable-line no-param-reassign + }, createWithSymbols = function(proto, descriptors) { + var self = create(proto); + gOPN(descriptors).forEach(function(key) { + if (propertyIsEnumerable.call(descriptors, key)) $defineProperty(self, key, descriptors[key]); + }); + return self; + }, copyAsNonEnumerable = function(descriptor) { + var newDescriptor = create(descriptor); + newDescriptor.enumerable = false; + return newDescriptor; + }, get = function get() {}, onlyNonSymbols = function(name) { + // eslint-disable-next-line eqeqeq + return name != internalSymbol && !hOP.call(source, name); + }, onlySymbols = function(name) { + // eslint-disable-next-line eqeqeq + return name != internalSymbol && hOP.call(source, name); + }, propertyIsEnumerable = function propertyIsEnumerable(key) { + var uid = String(key); + return onlySymbols(uid) ? hOP.call(this, uid) && this[internalSymbol]["@@" + uid] : pIE.call(this, key); + }, setAndGetSymbol = function(uid) { + var descriptor = { + enumerable: false, + configurable: true, + get: get, + set: function(value) { + setDescriptor(this, uid, { + enumerable: false, + configurable: true, + writable: true, + value: value + }); + addInternalIfNeeded(this, uid, true); + } + }; + defineProperty(ObjectProto, uid, descriptor); + source[uid] = defineProperty(Object1(uid), "constructor", sourceConstructor); + return freeze(source[uid]); + }, Symbol1 = function Symbol1(description) { + if (this instanceof Symbol1) throw new TypeError("Symbol is not a constructor"); + return setAndGetSymbol(prefix.concat(description || "", random, ++id)); + }, source = create(null), sourceConstructor = { + value: Symbol1 + }, sourceMap = function(uid) { + return source[uid]; + }, $defineProperty = function defineProp(o, key, descriptor) { + var uid = String(key); + if (onlySymbols(uid)) { + setDescriptor(o, uid, descriptor.enumerable ? copyAsNonEnumerable(descriptor) : descriptor); + addInternalIfNeeded(o, uid, !!descriptor.enumerable); + } else defineProperty(o, key, descriptor); + return o; + }, $getOwnPropertySymbols = function getOwnPropertySymbols(o) { + return gOPN(o).filter(onlySymbols).map(sourceMap); + }; + descriptor.value = $defineProperty; + defineProperty(Object1, DP, descriptor); + descriptor.value = $getOwnPropertySymbols; + defineProperty(Object1, GOPS, descriptor); + descriptor.value = function getOwnPropertyNames(o) { + return gOPN(o).filter(onlyNonSymbols); + }; + defineProperty(Object1, GOPN, descriptor); + descriptor.value = function defineProperties(o, descriptors) { + var symbols = $getOwnPropertySymbols(descriptors); + if (symbols.length) keys(descriptors).concat(symbols).forEach(function(uid) { + if (propertyIsEnumerable.call(descriptors, uid)) $defineProperty(o, uid, descriptors[uid]); + }); + else $defineProperties(o, descriptors); + return o; + }; + defineProperty(Object1, DPies, descriptor); + descriptor.value = propertyIsEnumerable; + defineProperty(ObjectProto, PIE, descriptor); + descriptor.value = Symbol1; + defineProperty(G, "Symbol", descriptor); + // defining `Symbol.for(key)` + descriptor.value = function(key) { + var uid = prefix.concat(prefix, key, random); + return uid in ObjectProto ? source[uid] : setAndGetSymbol(uid); + }; + defineProperty(Symbol1, "for", descriptor); + // defining `Symbol.keyFor(symbol)` + descriptor.value = function(symbol) { + if (onlyNonSymbols(symbol)) throw new TypeError(symbol + " is not a symbol"); + if (!hOP.call(source, symbol)) return void 0; + var label = symbol.slice(prefixLength); + if (label.slice(0, prefixLength) !== prefix) return void 0; + label = label.slice(prefixLength); + if (label === random) return void 0; + label = label.slice(0, label.length - random.length); + return label.length > 0 ? label : void 0; + }; + defineProperty(Symbol1, "keyFor", descriptor); + descriptor.value = function getOwnPropertyDescriptor(o, key) { + var descriptor = gOPD(o, key); + if (descriptor && onlySymbols(key)) descriptor.enumerable = propertyIsEnumerable.call(o, key); + return descriptor; + }; + defineProperty(Object1, GOPD, descriptor); + descriptor.value = function(proto, descriptors) { + return arguments.length === 1 || typeof descriptors === "undefined" ? create(proto) : createWithSymbols(proto, descriptors); + }; + defineProperty(Object1, "create", descriptor); + descriptor.value = function() { + var str = toString.call(this); + return str === "[object String]" && onlySymbols(this) ? "[object Symbol]" : str; + }; + defineProperty(ObjectProto, "toString", descriptor); + try { + if (create(defineProperty({}, prefix, { + get: function() { + return defineProperty(this, prefix, { + value: true + })[prefix]; + } + }))[prefix] === true) setDescriptor = defineProperty; + else throw "IE11"; // eslint-disable-line no-throw-literal + } catch (o_O) { + setDescriptor = function(o, key, descriptor) { + var protoDescriptor = gOPD(ObjectProto, key); + delete ObjectProto[key]; + defineProperty(o, key, descriptor); + defineProperty(ObjectProto, key, protoDescriptor); + }; + } +})(Object, "getOwnPropertySymbols"); +(function(O, Symbol1) { + "use strict"; + var dP = O.defineProperty, ObjectProto = O.prototype, toString = ObjectProto.toString, toStringTag = "toStringTag", descriptor; + [ + "iterator", + "match", + "replace", + "search", + "split", + "hasInstance", + "isConcatSpreadable", + "unscopables", + "species", + "toPrimitive", + toStringTag // A string value used for the default description of an object. Used by Object.prototype.toString(). + ].forEach(function(name) { + if (!(name in Symbol1)) { + dP(Symbol1, name, { + value: Symbol1(name) + }); + if (name === toStringTag) { + descriptor = O.getOwnPropertyDescriptor(ObjectProto, "toString"); + descriptor.value = function() { + var str = toString.call(this); + var tst = this == null ? this : this[Symbol1.toStringTag]; + return tst == null ? str : "[object " + tst + "]"; + }; + dP(ObjectProto, "toString", descriptor); + } + } + }); +})(Object, Symbol); +(function(Si, AP, SP) { + function returnThis() { + return this; + } + /* + * make Arrays usable as iterators + * so that other iterables can copy same logic + */ if (!AP[Si]) // eslint-disable-next-line no-param-reassign + AP[Si] = function() { + var i = 0, self = this, iterator = { + next: function next() { + var done = self.length <= i; + return done ? { + done: done + } : { + done: done, + value: self[i++] + }; + } + }; + iterator[Si] = returnThis; + return iterator; + }; + /* + * make Strings usable as iterators + * to simplify Array.from and for/of like loops + */ if (!SP[Si]) // eslint-disable-next-line no-param-reassign + SP[Si] = function() { + var fromCodePoint = String.fromCodePoint, self = this, i = 0, length = self.length, iterator = { + next: function next() { + var done = length <= i, c = done ? "" : fromCodePoint(self.codePointAt(i)); + i += c.length; + return done ? { + done: done + } : { + done: done, + value: c + }; + } + }; + iterator[Si] = returnThis; + return iterator; + }; +})(Symbol.iterator, Array.prototype, String.prototype); + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!Object.hasOwnProperty("getOwnPropertyDescriptors")) Object.defineProperty(Object, "getOwnPropertyDescriptors", { + configurable: true, + enumerable: true, + writable: true, + value (object) { + const keys = !!Reflect && !!Reflect.ownKeys ? Reflect.ownKeys(object) : Object.getOwnPropertyNames(object).concat(Object.getOwnPropertySymbols(object)); + return keys.reduce((descriptors, key)=>{ + return Object.defineProperty(descriptors, key, { + configurable: true, + enumerable: true, + writable: true, + value: Object.getOwnPropertyDescriptor(object, key) + }); + }, {}); + } +}); + + +/* eslint-disable prefer-destructuring */ /* eslint-disable prefer-rest-params */ /* eslint-disable no-restricted-globals */ /* eslint-disable no-bitwise */ if (!Object.prototype.merge) Object.defineProperty(Object.prototype, "merge", { + enumerable: false, + configurable: true, + writable: true, + value (...objs) { + const mergeObj = [ + this, + ...objs + ].reduce((acc, obj)=>Object.keys(obj).reduce((a, k)=>{ + if (acc.hasOwnProperty(k)) { + if (acc[k] instanceof Array) acc[k] = [].concat(acc[k], obj[k]); + else if (acc[k] instanceof Object && Object.keys(acc[k]).length > 0 && obj[k] instanceof Object && Object.keys(obj[k]).length > 0) acc[k].merge(obj[k]); + else acc[k] = obj[k]; + } else acc[k] = obj[k]; + return acc; + }, {}), {}); + return Object.assign(this, mergeObj); + } +}); + + + + + + +var $2426f1e58e1f61c7$exports = {}; + +$parcel$export($2426f1e58e1f61c7$exports, "Asserts", () => $2426f1e58e1f61c7$export$a01bb7117a391d00); +/** + * + * + * @export + * @class Asserts + */ class $2426f1e58e1f61c7$export$a01bb7117a391d00 { + static #checkAssert(assert, safe = false) { + if (!!assert) { + if (assert instanceof Function) { + if (!!safe) try { + return assert(); + } catch (e) { + return false; + } + return assert(); + } + return assert; + } + return false; + } + /** + * Check for every assert to be true + * + * @static + * @param {any} [asserts=[]] - array of asserts (can be boolean, strings, functions, whatever you want ;-) + * @param {boolean} [safe=false] - executes asserts in a safe mode (try/catch) + * @returns boolean + * + * @memberOf Asserts + */ static all(asserts = [], safe = false) { + return asserts.every((assert)=>{ + return $2426f1e58e1f61c7$export$a01bb7117a391d00.#checkAssert(assert, safe); + }); + } + /** + * Check for at least one assert to be true + * + * @static + * @param {any} [asserts=[]] - array of asserts (can be boolean, strings, functions, whatever you want ;-) + * @param {boolean} [safe=false] - executes asserts in a safe mode (try/catch) + * @returns boolean + * + * @memberOf Asserts + */ static one(asserts = [], safe = false) { + return asserts.some((assert)=>{ + return $2426f1e58e1f61c7$export$a01bb7117a391d00.#checkAssert(assert, safe); + }); + } +} + + +var $68b5bd8872046f6d$exports = {}; + +$parcel$export($68b5bd8872046f6d$exports, "FlagsClass", () => $68b5bd8872046f6d$export$4f3d6547cdbed990); +/** + * + * + * @export + * @class FlagsClass + */ class $68b5bd8872046f6d$export$4f3d6547cdbed990 { + #booleanFlagsValuePropertyName; + get booleanFlagsValuePropertyName() { + return this.#booleanFlagsValuePropertyName; + } + set booleanFlagsValuePropertyName(booleanFlagsValuePropertyName) { + this.#booleanFlagsValuePropertyName = booleanFlagsValuePropertyName; + } + #root; + get root() { + return this.#root; + } + #process; + get process() { + return this.#process; + } + #navigator; + get navigator() { + return this.#navigator; + } + #document; + get document() { + return this.#document; + } + #ua; + get ua() { + return this.#ua; + } + /** + * Creates an instance of FlagsClass. + * @param {any} [ua=null] + * + * @memberOf FlagsClass + */ constructor(ua = null){ + this.#booleanFlagsValuePropertyName = "name"; + this.#root = self || window || $parcel$global || {}; + this.#process = this.#root.process || {}; + this.#navigator = this.#root.navigator || {}; + this.#document = this.#root.document || null; + this.#ua = ua || this.#navigator.userAgent || "n/a"; + } + /** + * + * + * @returns {object} + * + * @memberOf FlagsClass + */ toValues() { + const proto = Object.getPrototypeOf(this); + const protoName = (this.#booleanFlagsValuePropertyName || this.constructor.name).toLowerCase(); + const protoProperties = Object.getOwnPropertyNames(proto).filter((prop)=>{ + return !!Object.getOwnPropertyDescriptors(proto)[prop].get; + }).concat(Object.getOwnPropertyNames(this).filter((prop)=>{ + return !prop.startsWith("_") && !Object.getOwnPropertyDescriptor(this, prop)?.get; + })); + const protoPropertiesReduced = protoProperties.reduce((acc, prop)=>{ + if (!!this[prop]) { + if (typeof this[prop] === "boolean") acc[protoName] = prop; + else acc[prop] = this[prop]; + } + return acc; + }, {}); + return protoPropertiesReduced; + } + /** + * + * + * @returns {object} + * + * @memberOf FlagsClass + */ toFlags() { + const proto = Object.getPrototypeOf(this); + return Object.getOwnPropertyNames(proto).filter((prop)=>{ + return !!Object.getOwnPropertyDescriptors(proto)[prop].get; + }).reduce((acc, prop)=>{ + acc[prop] = this[prop]; + return acc; + }, {})//@ts-ignore + .merge(Object.getOwnPropertyNames(this).filter((prop)=>{ + return !prop.startsWith("_") && !Object.getOwnPropertyDescriptor(this, prop)?.get; + }).reduce((acc, prop)=>{ + acc[prop] = this[prop]; + return acc; + }, {})); + } +} + + +var $f3e43a5a97f6663e$exports = {}; + +$parcel$export($f3e43a5a97f6663e$exports, "CssFlagsClass", () => $f3e43a5a97f6663e$export$f4dfb95cdf26c5c7); + +class $f3e43a5a97f6663e$export$f4dfb95cdf26c5c7 extends (0, $68b5bd8872046f6d$export$4f3d6547cdbed990) { + #flags; + get flags() { + return this.#flags; + } + #cssFlagsPrefix; + get cssFlagsPrefix() { + return this.#cssFlagsPrefix; + } + /** + * Creates an instance of CssFlagsClass. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='flags'] + * + * @memberOf CssFlagsClass + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "flags"){ + super(ua); + this.#flags = flags; + this.#flags[1] = true; + this.#cssFlagsPrefix = cssFlagsPrefix; + } + /** + * + * + * @returns object + * + * @memberOf CssFlagsClass + */ toCssFlags() { + const proto = Object.getPrototypeOf(this); + return Object.getOwnPropertyNames(proto).filter((prop)=>{ + return !!Object.getOwnPropertyDescriptors(proto)[prop].get; + }).reduce((acc, prop)=>{ + if (!!this[prop]) acc.push(`${this.#cssFlagsPrefix}--${prop}--${typeof this[prop] !== "boolean" ? "--" + this[prop] : ""}`.toLowerCase()); + return acc; + }, []); + } +} + + +"use strict"; + + +export {$2426f1e58e1f61c7$export$a01bb7117a391d00 as Asserts, $68b5bd8872046f6d$export$4f3d6547cdbed990 as FlagsClass, $f3e43a5a97f6663e$export$f4dfb95cdf26c5c7 as CssFlagsClass}; +//# sourceMappingURL=core.mjs.map diff --git a/packages/core/dist/core.mjs.map b/packages/core/dist/core.mjs.map new file mode 100644 index 0000000..a04941b --- /dev/null +++ b/packages/core/dist/core.mjs.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;;;;;;AEAA,OAAO,OAAO,GAAG,OAAO,OAAO,IAAI,CAAC;;ADApC;AGAA,uCAAuC,GACvC,qCAAqC,GACrC,wCAAwC,GACxC,6BAA6B,GAE7B,IAAI,CAAC,OAAO,SAAS,CAAC,QAAQ,EAC5B,OAAO,cAAc,CAAC,OAAO,SAAS,EAAE,YAAY;IAClD,YAAY,KAAK;IACjB,cAAc,IAAI;IAClB,UAAU,IAAI;IACd,OAAM,MAAM,EAAE,KAAK,EAAE;QACnB,QAAQ,AAAC,OAAO,UAAU,WAAY,IAAI,KAAK;QAE/C,IAAI,QAAQ,OAAO,MAAM,GAAG,IAAI,CAAC,MAAM,EACrC,OAAO,KAAK;QAGd,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,WAAW;IACzC;AACF;;ADnBF;AEAA,uCAAuC,GACvC,qCAAqC,GACrC,wCAAwC,GACxC,6BAA6B,GAE7B,IAAI,CAAC,OAAO,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K;IACpB;IAEA,CAAC,cAAc,CAAS;IAExB,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,CAAC,cAAc;IAC7B;IAEA;;;;;;;GAOC,GACD,YAAY,KAAoB,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,iBAAiB,OAAO,CAAE;QAC1E,KAAK,CAAC;QAEN,IAAI,CAAC,CAAC,KAAK,GAAG;QAEd,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI;QACrB,IAAI,CAAC,CAAC,cAAc,GAAG;IACzB;IAEA;;;;;;GAMC,GACD,aAAa;QACX,MAAM,QAAQ,OAAO,cAAc,CAAC,IAAI;QAExC,OAAO,OAAO,mBAAmB,CAAC,OAC/B,MAAM,CAAC,CAAC,OAAS;YAChB,OAAO,CAAC,CAAC,OAAO,yBAAyB,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG;QAC5D,GACC,MAAM,CAAC,CAAC,KAAe,OAAS;YAC/B,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,EACd,IAAI,IAAI,CACN,CAAC,EAAE,IAAI,CAAC,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,EAAE,EACjC,OAAO,IAAI,CAAC,KAAK,KAAK,YAAY,OAAO,IAAI,CAAC,KAAK,GAAG,EAAE,CACzD,CAAC,CAAC,WAAW;YAIlB,OAAO;QACT,GAAG,EAAE;IACT;AACF;;;AjBjEA","sources":["packages/core/lib/core.ts","packages/core/lib/polyfills/index.js","packages/core/lib/polyfills/core/index.js","packages/core/lib/polyfills/string/index.js","packages/core/lib/polyfills/string/includes.js","packages/core/lib/polyfills/string/startsWith.js","packages/core/lib/polyfills/string/toCamelCase.js","packages/core/lib/polyfills/array/index.js","packages/core/lib/polyfills/array/map.js","packages/core/lib/polyfills/array/includes.js","packages/core/lib/polyfills/object/index.js","packages/core/lib/polyfills/object/assign.js","packages/core/lib/polyfills/object/getOwnPropertySymbols.js","packages/core/lib/polyfills/object/getOwnPropertyDescriptors.js","packages/core/lib/polyfills/object/merge.js","packages/core/lib/asserts.ts","packages/core/lib/flagsClass.ts","packages/core/lib/cssFlagsClass.ts"],"sourcesContent":["'use strict';\n\nimport './polyfills';\n\nexport * from './asserts';\nexport * from './flagsClass';\nexport * from './cssFlagsClass';\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n","import './core/index';\nimport './string/index';\nimport './array/index';\nimport './object/index';\n","window.Reflect = window.Reflect || {};\n","import './includes';\nimport './startsWith';\nimport './toCamelCase';\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!String.prototype.includes) {\n Object.defineProperty(String.prototype, 'includes', {\n enumerable: false,\n configurable: true,\n writable: true,\n value(search, start) {\n start = (typeof start !== 'number') ? 0 : start;\n\n if (start + search.length > this.length) {\n return false;\n }\n\n return this.indexOf(search, start) !== -1;\n },\n });\n}\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!String.prototype.startsWith) {\n Object.defineProperty(String.prototype, 'startsWith', {\n value(search, rawPos) {\n const pos = rawPos > 0 ? rawPos | 0 : 0;\n return this.substring(pos, pos + search.length) === search;\n },\n });\n}\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!String.prototype.toCamelCase) {\n Object.defineProperty(String.prototype, 'toCamelCase', {\n enumerable: false,\n configurable: true,\n writable: true,\n value() {\n const s = this && this.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).map((x) => {\n return x.slice(0, 1).toUpperCase() + x.slice(1).toLowerCase();\n }).join('');\n\n return s.slice(0, 1).toLowerCase() + s.slice(1);\n },\n });\n}\n","import './map';\nimport './includes';\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!Array.prototype.map) {\n Object.defineProperty(Array.prototype, 'map', {\n enumerable: false,\n configurable: true,\n writable: true,\n value(arr, iterator) {\n const result = [];\n\n for (let i = 0; i < arr.length; i += 1) {\n result.push(iterator(arr[i]));\n }\n\n return result;\n },\n });\n}\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!Array.prototype.includes) {\n Object.defineProperty(Array.prototype, 'includes', {\n enumerable: false,\n configurable: true,\n writable: true,\n value(valueToFind, fromIndex) {\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n\n // 1. Let O be ? ToObject(this value).\n const o = Object(this);\n\n // 2. Let len be ? ToLength(? Get(O, \"length\")).\n const len = o.length >>> 0;\n\n // 3. If len is 0, return false.\n if (len === 0) {\n return false;\n }\n\n // 4. Let n be ? ToInteger(fromIndex).\n // (If fromIndex is undefined, this step produces the value 0.)\n const n = fromIndex | 0;\n\n // 5. If n ≥ 0, then\n // a. Let k be n.\n // 6. Else n < 0,\n // a. Let k be len + n.\n // b. If k < 0, let k be 0.\n let k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n function sameValueZero(x, y) {\n return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\n }\n\n // 7. Repeat, while k < len\n while (k < len) {\n // a. Let elementK be the result of ? Get(O, ! ToString(k)).\n // b. If SameValueZero(valueToFind, elementK) is true, return true.\n if (sameValueZero(o[k], valueToFind)) {\n return true;\n }\n // c. Increase k by 1.\n k++;\n }\n\n // 8. Return false\n return false;\n },\n });\n}\n","import './assign';\nimport './getOwnPropertySymbols';\nimport './getOwnPropertyDescriptors';\nimport './merge';\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!Object.assign) {\n Object.defineProperty(Object, 'assign', {\n enumerable: false,\n configurable: true,\n writable: true,\n value(target, firstSource) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert first argument to object');\n }\n\n const to = Object(target);\n for (let i = 1; i < arguments.length; i++) {\n let nextSource = arguments[i];\n if (nextSource === undefined || nextSource === null) {\n // eslint-disable-next-line no-continue\n continue;\n }\n nextSource = Object(nextSource);\n\n const keysArray = Object.keys(Object(nextSource));\n for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {\n const nextKey = keysArray[nextIndex];\n const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n return to;\n },\n });\n}\n","/* eslint-disable */\n\n(function (Object, GOPS) {\n 'use strict';\n\n // (C) Andrea Giammarchi - Mit Style\n // @see https://github.com/es-shims/get-own-property-symbols\n\n if (GOPS in Object) { return; }\n\n var\n setDescriptor,\n G = typeof global === typeof G ? window : global,\n id = 0,\n random = String(Math.random()),\n prefix = '__\\x01symbol:',\n prefixLength = prefix.length,\n internalSymbol = '__\\x01symbol@@' + random,\n DP = 'defineProperty',\n DPies = 'defineProperties',\n GOPN = 'getOwnPropertyNames',\n GOPD = 'getOwnPropertyDescriptor',\n PIE = 'propertyIsEnumerable',\n gOPN = Object[GOPN],\n gOPD = Object[GOPD],\n create = Object.create,\n keys = Object.keys,\n freeze = Object.freeze || Object,\n defineProperty = Object[DP],\n $defineProperties = Object[DPies],\n descriptor = gOPD(Object, GOPN),\n ObjectProto = Object.prototype,\n hOP = ObjectProto.hasOwnProperty,\n pIE = ObjectProto[PIE],\n toString = ObjectProto.toString,\n addInternalIfNeeded = function (o, uid, enumerable) {\n if (!hOP.call(o, internalSymbol)) {\n defineProperty(o, internalSymbol, {\n enumerable: false,\n configurable: false,\n writable: false,\n value: {}\n });\n }\n o[internalSymbol]['@@' + uid] = enumerable; // eslint-disable-line no-param-reassign\n },\n createWithSymbols = function (proto, descriptors) {\n var self = create(proto);\n gOPN(descriptors).forEach(function (key) {\n if (propertyIsEnumerable.call(descriptors, key)) {\n $defineProperty(self, key, descriptors[key]);\n }\n });\n return self;\n },\n copyAsNonEnumerable = function (descriptor) {\n var newDescriptor = create(descriptor);\n newDescriptor.enumerable = false;\n return newDescriptor;\n },\n get = function get() {},\n onlyNonSymbols = function (name) {\n // eslint-disable-next-line eqeqeq\n return name != internalSymbol && !hOP.call(source, name);\n },\n onlySymbols = function (name) {\n // eslint-disable-next-line eqeqeq\n return name != internalSymbol && hOP.call(source, name);\n },\n propertyIsEnumerable = function propertyIsEnumerable(key) {\n var uid = String(key);\n return onlySymbols(uid) ? hOP.call(this, uid) && this[internalSymbol]['@@' + uid] : pIE.call(this, key);\n },\n setAndGetSymbol = function (uid) {\n var descriptor = {\n enumerable: false,\n configurable: true,\n get: get,\n set: function (value) {\n setDescriptor(this, uid, {\n enumerable: false,\n configurable: true,\n writable: true,\n value: value\n });\n addInternalIfNeeded(this, uid, true);\n }\n };\n defineProperty(ObjectProto, uid, descriptor);\n source[uid] = defineProperty(\n Object(uid),\n 'constructor',\n sourceConstructor\n );\n return freeze(source[uid]);\n },\n Symbol = function Symbol(description) {\n if (this instanceof Symbol) {\n throw new TypeError('Symbol is not a constructor');\n }\n return setAndGetSymbol(prefix.concat(description || '', random, ++id));\n },\n source = create(null),\n sourceConstructor = { value: Symbol },\n sourceMap = function (uid) {\n return source[uid];\n },\n $defineProperty = function defineProp(o, key, descriptor) {\n var uid = String(key);\n if (onlySymbols(uid)) {\n setDescriptor(o, uid, descriptor.enumerable ? copyAsNonEnumerable(descriptor) : descriptor);\n addInternalIfNeeded(o, uid, !!descriptor.enumerable);\n } else {\n defineProperty(o, key, descriptor);\n }\n return o;\n },\n $getOwnPropertySymbols = function getOwnPropertySymbols(o) {\n return gOPN(o).filter(onlySymbols).map(sourceMap);\n };\n descriptor.value = $defineProperty;\n defineProperty(Object, DP, descriptor);\n\n descriptor.value = $getOwnPropertySymbols;\n defineProperty(Object, GOPS, descriptor);\n\n descriptor.value = function getOwnPropertyNames(o) {\n return gOPN(o).filter(onlyNonSymbols);\n };\n defineProperty(Object, GOPN, descriptor);\n\n descriptor.value = function defineProperties(o, descriptors) {\n var symbols = $getOwnPropertySymbols(descriptors);\n if (symbols.length) {\n keys(descriptors).concat(symbols).forEach(function (uid) {\n if (propertyIsEnumerable.call(descriptors, uid)) {\n $defineProperty(o, uid, descriptors[uid]);\n }\n });\n } else {\n $defineProperties(o, descriptors);\n }\n return o;\n };\n defineProperty(Object, DPies, descriptor);\n\n descriptor.value = propertyIsEnumerable;\n defineProperty(ObjectProto, PIE, descriptor);\n\n descriptor.value = Symbol;\n defineProperty(G, 'Symbol', descriptor);\n\n // defining `Symbol.for(key)`\n descriptor.value = function (key) {\n var uid = prefix.concat(prefix, key, random);\n return uid in ObjectProto ? source[uid] : setAndGetSymbol(uid);\n };\n defineProperty(Symbol, 'for', descriptor);\n\n // defining `Symbol.keyFor(symbol)`\n descriptor.value = function (symbol) {\n if (onlyNonSymbols(symbol)) { throw new TypeError(symbol + ' is not a symbol'); }\n if (!hOP.call(source, symbol)) {\n return void 0;\n }\n var label = symbol.slice(prefixLength);\n if (label.slice(0, prefixLength) !== prefix) {\n return void 0;\n }\n label = label.slice(prefixLength);\n if (label === random) {\n return void 0;\n }\n label = label.slice(0, label.length - random.length);\n return label.length > 0 ? label : void 0;\n };\n defineProperty(Symbol, 'keyFor', descriptor);\n\n descriptor.value = function getOwnPropertyDescriptor(o, key) {\n var descriptor = gOPD(o, key);\n if (descriptor && onlySymbols(key)) {\n descriptor.enumerable = propertyIsEnumerable.call(o, key);\n }\n return descriptor;\n };\n defineProperty(Object, GOPD, descriptor);\n\n descriptor.value = function (proto, descriptors) {\n return arguments.length === 1 || typeof descriptors === 'undefined' ? create(proto) : createWithSymbols(proto, descriptors);\n };\n defineProperty(Object, 'create', descriptor);\n\n descriptor.value = function () {\n var str = toString.call(this);\n return str === '[object String]' && onlySymbols(this) ? '[object Symbol]' : str;\n };\n defineProperty(ObjectProto, 'toString', descriptor);\n\n try { // fails in few pre ES 5.1 engines\n if (\n create(defineProperty({}, prefix, {\n get: function () {\n return defineProperty(this, prefix, { value: true })[prefix];\n }\n }))[prefix] === true\n ) {\n setDescriptor = defineProperty;\n } else {\n throw 'IE11'; // eslint-disable-line no-throw-literal\n }\n } catch (o_O) { // eslint-disable-line camelcase\n setDescriptor = function (o, key, descriptor) {\n var protoDescriptor = gOPD(ObjectProto, key);\n delete ObjectProto[key];\n defineProperty(o, key, descriptor);\n defineProperty(ObjectProto, key, protoDescriptor);\n };\n }\n\n}(Object, 'getOwnPropertySymbols'));\n\n(function (O, Symbol) {\n 'use strict';\n\n var\n dP = O.defineProperty,\n ObjectProto = O.prototype,\n toString = ObjectProto.toString,\n toStringTag = 'toStringTag',\n descriptor;\n [\n 'iterator', // A method returning the default iterator for an object. Used by for...of.\n 'match', // A method that matches against a string, also used to determine if an object may be used as a regular expression. Used by String.prototype.match().\n 'replace', // A method that replaces matched substrings of a string. Used by String.prototype.replace().\n 'search', // A method that returns the index within a string that matches the regular expression. Used by String.prototype.search().\n 'split', // A method that splits a string at the indices that match a regular expression. Used by String.prototype.split().\n 'hasInstance', // A method determining if a constructor object recognizes an object as its instance. Used by instanceof.\n 'isConcatSpreadable', // A Boolean value indicating if an object should be flattened to its array elements. Used by Array.prototype.concat().\n 'unscopables', // An Array of string values that are property values. These are excluded from the with environment bindings of the associated objects.\n 'species', // A constructor function that is used to create derived objects.\n 'toPrimitive', // A method converting an object to a primitive value.\n toStringTag // A string value used for the default description of an object. Used by Object.prototype.toString().\n ].forEach(function (name) {\n if (!(name in Symbol)) {\n dP(Symbol, name, { value: Symbol(name) });\n if (name === toStringTag) {\n descriptor = O.getOwnPropertyDescriptor(ObjectProto, 'toString');\n descriptor.value = function () {\n var str = toString.call(this);\n var tst = this == null ? this : this[Symbol.toStringTag];\n return tst == null ? str : '[object ' + tst + ']';\n };\n dP(ObjectProto, 'toString', descriptor);\n }\n }\n });\n}(Object, Symbol));\n\n(function (Si, AP, SP) {\n\n function returnThis() { return this; }\n\n /*\n * make Arrays usable as iterators\n * so that other iterables can copy same logic\n */\n if (!AP[Si]) {\n // eslint-disable-next-line no-param-reassign\n AP[Si] = function () {\n var\n i = 0,\n self = this,\n iterator = {\n next: function next() {\n var done = self.length <= i;\n return done ? { done: done } : { done: done, value: self[i++] };\n }\n };\n iterator[Si] = returnThis;\n return iterator;\n };\n }\n\n /*\n * make Strings usable as iterators\n * to simplify Array.from and for/of like loops\n */\n if (!SP[Si]) {\n // eslint-disable-next-line no-param-reassign\n SP[Si] = function () {\n var\n fromCodePoint = String.fromCodePoint,\n self = this,\n i = 0,\n length = self.length,\n iterator = {\n next: function next() {\n var\n done = length <= i,\n c = done ? '' : fromCodePoint(self.codePointAt(i));\n i += c.length;\n return done ? { done: done } : { done: done, value: c };\n }\n };\n iterator[Si] = returnThis;\n return iterator;\n };\n }\n\n}(Symbol.iterator, Array.prototype, String.prototype));\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!Object.hasOwnProperty('getOwnPropertyDescriptors')) {\n Object.defineProperty(Object, 'getOwnPropertyDescriptors', {\n configurable: true,\n enumerable: true,\n writable: true,\n value(object) {\n const keys = !!Reflect && !!Reflect.ownKeys ? Reflect.ownKeys(object) : Object.getOwnPropertyNames(object).concat(Object.getOwnPropertySymbols(object));\n\n return keys.reduce((descriptors, key) => {\n return Object.defineProperty(descriptors, key, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: Object.getOwnPropertyDescriptor(object, key),\n });\n }, {});\n },\n });\n}\n","/* eslint-disable prefer-destructuring */\n/* eslint-disable prefer-rest-params */\n/* eslint-disable no-restricted-globals */\n/* eslint-disable no-bitwise */\n\nif (!Object.prototype.merge) {\n Object.defineProperty(Object.prototype, 'merge', {\n enumerable: false,\n configurable: true,\n writable: true,\n value(...objs) {\n const mergeObj = [this, ...objs].reduce((acc, obj) => Object.keys(obj).reduce((a, k) => {\n if (acc.hasOwnProperty(k)) {\n if (acc[k] instanceof Array) {\n acc[k] = [].concat(acc[k], obj[k]);\n } else if (acc[k] instanceof Object && Object.keys(acc[k]).length > 0 && obj[k] instanceof Object && Object.keys(obj[k]).length > 0) {\n acc[k].merge(obj[k]);\n } else {\n acc[k] = obj[k];\n }\n } else {\n acc[k] = obj[k];\n }\n\n return acc;\n }, {}), {});\n\n return Object.assign(this, mergeObj);\n },\n });\n}\n","/**\n *\n *\n * @export\n * @class Asserts\n */\nexport class Asserts {\n static #checkAssert(assert, safe = false) {\n if (!!assert) {\n if (assert instanceof Function) {\n if (!!safe) {\n try {\n return assert();\n } catch (e) {\n return false;\n }\n }\n\n return assert();\n }\n\n return assert;\n }\n\n return false;\n }\n\n /**\n * Check for every assert to be true\n *\n * @static\n * @param {any} [asserts=[]] - array of asserts (can be boolean, strings, functions, whatever you want ;-)\n * @param {boolean} [safe=false] - executes asserts in a safe mode (try/catch)\n * @returns boolean\n *\n * @memberOf Asserts\n */\n static all(asserts: any[] = [], safe = false) {\n return asserts.every((assert) => {\n return Asserts.#checkAssert(assert, safe);\n });\n }\n\n /**\n * Check for at least one assert to be true\n *\n * @static\n * @param {any} [asserts=[]] - array of asserts (can be boolean, strings, functions, whatever you want ;-)\n * @param {boolean} [safe=false] - executes asserts in a safe mode (try/catch)\n * @returns boolean\n *\n * @memberOf Asserts\n */\n static one(asserts: any[] = [], safe = false) {\n return asserts.some((assert) => {\n return Asserts.#checkAssert(assert, safe);\n });\n }\n}\n","/**\n *\n *\n * @export\n * @class FlagsClass\n */\nexport class FlagsClass {\n #booleanFlagsValuePropertyName: string;\n\n get booleanFlagsValuePropertyName() {\n return this.#booleanFlagsValuePropertyName;\n }\n\n set booleanFlagsValuePropertyName(booleanFlagsValuePropertyName: string) {\n this.#booleanFlagsValuePropertyName = booleanFlagsValuePropertyName;\n }\n\n #root: Window & typeof globalThis;\n\n get root() {\n return this.#root;\n }\n\n #process: any; // NodeJS.Process\n\n get process() {\n return this.#process;\n }\n\n #navigator: Navigator;\n\n get navigator() {\n return this.#navigator;\n }\n\n #document: Document;\n\n get document() {\n return this.#document;\n }\n\n #ua: string;\n\n get ua() {\n return this.#ua;\n }\n\n /**\n * Creates an instance of FlagsClass.\n * @param {any} [ua=null]\n *\n * @memberOf FlagsClass\n */\n constructor(ua: string | null = null) {\n this.#booleanFlagsValuePropertyName = 'name';\n this.#root = self || window || global || {};\n\n this.#process = this.#root.process || {};\n this.#navigator = this.#root.navigator || {};\n this.#document = this.#root.document || null;\n this.#ua = ua || this.#navigator.userAgent || 'n/a';\n }\n\n /**\n *\n *\n * @returns {object}\n *\n * @memberOf FlagsClass\n */\n toValues() {\n const proto = Object.getPrototypeOf(this);\n const protoName = (this.#booleanFlagsValuePropertyName || this.constructor.name).toLowerCase();\n\n const protoProperties = Object.getOwnPropertyNames(proto)\n .filter((prop) => {\n return !!Object.getOwnPropertyDescriptors(proto)[prop].get;\n })\n .concat(\n Object.getOwnPropertyNames(this).filter((prop) => {\n return !prop.startsWith('_') && !Object.getOwnPropertyDescriptor(this, prop)?.get;\n })\n );\n\n const protoPropertiesReduced = protoProperties.reduce((acc, prop) => {\n if (!!this[prop]) {\n if (typeof this[prop] === 'boolean') {\n acc[protoName] = prop;\n } else {\n acc[prop] = this[prop];\n }\n }\n return acc;\n }, {});\n\n return protoPropertiesReduced;\n }\n\n /**\n *\n *\n * @returns {object}\n *\n * @memberOf FlagsClass\n */\n toFlags() {\n const proto = Object.getPrototypeOf(this);\n\n return (\n Object.getOwnPropertyNames(proto)\n .filter((prop) => {\n return !!Object.getOwnPropertyDescriptors(proto)[prop].get;\n })\n .reduce((acc, prop) => {\n acc[prop] = this[prop];\n\n return acc;\n }, {})\n //@ts-ignore\n .merge(\n Object.getOwnPropertyNames(this)\n .filter((prop) => {\n return !prop.startsWith('_') && !Object.getOwnPropertyDescriptor(this, prop)?.get;\n })\n .reduce((acc, prop) => {\n acc[prop] = this[prop];\n\n return acc;\n }, {})\n )\n );\n }\n}\n","import { FlagsClass } from './flagsClass';\n\n/**\n *\n *\n * @export\n * @class CssFlagsClass\n * @extends {FlagsClass}\n */\nexport class CssFlagsClass extends FlagsClass {\n #flags: any;\n\n get flags() {\n return this.#flags;\n }\n\n #cssFlagsPrefix: string;\n\n get cssFlagsPrefix() {\n return this.#cssFlagsPrefix;\n }\n\n /**\n * Creates an instance of CssFlagsClass.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='flags']\n *\n * @memberOf CssFlagsClass\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'flags') {\n super(ua);\n\n this.#flags = flags;\n\n this.#flags[1] = true;\n this.#cssFlagsPrefix = cssFlagsPrefix;\n }\n\n /**\n *\n *\n * @returns object\n *\n * @memberOf CssFlagsClass\n */\n toCssFlags() {\n const proto = Object.getPrototypeOf(this);\n\n return Object.getOwnPropertyNames(proto)\n .filter((prop) => {\n return !!Object.getOwnPropertyDescriptors(proto)[prop].get;\n })\n .reduce((acc: string[], prop) => {\n if (!!this[prop]) {\n acc.push(\n `${this.#cssFlagsPrefix}--${prop}--${\n typeof this[prop] !== 'boolean' ? '--' + this[prop] : ''\n }`.toLowerCase()\n );\n }\n\n return acc;\n }, []);\n }\n}\n"],"names":[],"version":3,"file":"core.mjs.map"} \ No newline at end of file diff --git a/packages/core/dist/core.types.d.ts b/packages/core/dist/core.types.d.ts new file mode 100644 index 0000000..61fb4d3 --- /dev/null +++ b/packages/core/dist/core.types.d.ts @@ -0,0 +1,101 @@ +/** + * + * + * @export + * @class Asserts + */ +export class Asserts { + #private; + /** + * Check for every assert to be true + * + * @static + * @param {any} [asserts=[]] - array of asserts (can be boolean, strings, functions, whatever you want ;-) + * @param {boolean} [safe=false] - executes asserts in a safe mode (try/catch) + * @returns boolean + * + * @memberOf Asserts + */ + static all(asserts?: any[], safe?: boolean): boolean; + /** + * Check for at least one assert to be true + * + * @static + * @param {any} [asserts=[]] - array of asserts (can be boolean, strings, functions, whatever you want ;-) + * @param {boolean} [safe=false] - executes asserts in a safe mode (try/catch) + * @returns boolean + * + * @memberOf Asserts + */ + static one(asserts?: any[], safe?: boolean): boolean; +} +/** + * + * + * @export + * @class FlagsClass + */ +export class FlagsClass { + #private; + get booleanFlagsValuePropertyName(): string; + set booleanFlagsValuePropertyName(booleanFlagsValuePropertyName: string); + get root(): Window & typeof globalThis; + get process(): any; + get navigator(): Navigator; + get document(): Document; + get ua(): string; + /** + * Creates an instance of FlagsClass. + * @param {any} [ua=null] + * + * @memberOf FlagsClass + */ + constructor(ua?: string | null); + /** + * + * + * @returns {object} + * + * @memberOf FlagsClass + */ + toValues(): {}; + /** + * + * + * @returns {object} + * + * @memberOf FlagsClass + */ + toFlags(): any; +} +/** + * + * + * @export + * @class CssFlagsClass + * @extends {FlagsClass} + */ +export class CssFlagsClass extends FlagsClass { + #private; + get flags(): any; + get cssFlagsPrefix(): string; + /** + * Creates an instance of CssFlagsClass. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='flags'] + * + * @memberOf CssFlagsClass + */ + constructor(ua?: string | null, flags?: {}, cssFlagsPrefix?: string); + /** + * + * + * @returns object + * + * @memberOf CssFlagsClass + */ + toCssFlags(): string[]; +} + +//# sourceMappingURL=core.types.d.ts.map diff --git a/packages/core/dist/core.types.d.ts.map b/packages/core/dist/core.types.d.ts.map new file mode 100644 index 0000000..4a55daa --- /dev/null +++ b/packages/core/dist/core.types.d.ts.map @@ -0,0 +1 @@ +{"mappings":"AAAA;;;;;GAKG;AACH;;IAqBE;;;;;;;;;OASG;IACH,MAAM,CAAC,GAAG,CAAC,OAAO,GAAE,GAAG,EAAO,EAAE,IAAI,UAAQ;IAM5C;;;;;;;;;OASG;IACH,MAAM,CAAC,GAAG,CAAC,OAAO,GAAE,GAAG,EAAO,EAAE,IAAI,UAAQ;CAK7C;AC1DD;;;;;GAKG;AACH;;IAGE,IAAI,6BAA6B,IAIgC,MAAM,CAFtE;IAED,IAAI,6BAA6B,CAAC,6BAA6B,EAAE,MAAM,EAEtE;IAID,IAAI,IAAI,+BAEP;IAID,IAAI,OAAO,QAEV;IAID,IAAI,SAAS,cAEZ;IAID,IAAI,QAAQ,aAEX;IAID,IAAI,EAAE,WAEL;IAED;;;;;OAKG;gBACS,EAAE,GAAE,MAAM,GAAG,IAAW;IAUpC;;;;;;OAMG;IACH,QAAQ;IA4BR;;;;;;OAMG;IACH,OAAO;CA2BR;AClID;;;;;;GAMG;AACH,0BAA2B,SAAQ,UAAU;;IAG3C,IAAI,KAAK,QAER;IAID,IAAI,cAAc,WAEjB;IAED;;;;;;;OAOG;gBACS,EAAE,GAAE,MAAM,GAAG,IAAW,EAAE,KAAK,KAAK,EAAE,cAAc,SAAU;IAS1E;;;;;;OAMG;IACH,UAAU;CAmBX","sources":["packages/core/lib/lib/asserts.ts","packages/core/lib/lib/flagsClass.ts","packages/core/lib/lib/cssFlagsClass.ts","packages/core/lib/lib/core.ts","packages/core/lib/core.ts"],"sourcesContent":[null,null,null,null,"'use strict';\n\nimport './polyfills';\n\nexport * from './asserts';\nexport * from './flagsClass';\nexport * from './cssFlagsClass';\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n"],"names":[],"version":3,"file":"core.types.d.ts.map"} \ No newline at end of file diff --git a/packages/detector/dist/detector.js b/packages/detector/dist/detector.js new file mode 100644 index 0000000..5cc1b67 --- /dev/null +++ b/packages/detector/dist/detector.js @@ -0,0 +1,169 @@ +var $fCGpa$detectorjscore = require("@detector-js/core"); +var $fCGpa$detectorjsfeature = require("@detector-js/feature"); +var $fCGpa$detectorjshardware = require("@detector-js/hardware"); +var $fCGpa$detectorjssoftware = require("@detector-js/software"); + +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} + +$parcel$export(module.exports, "Detector", () => $8759a583cb8914ae$export$e695250628cde35); +/*jshint expr: true */ + + + +class $8759a583cb8914ae$export$e695250628cde35 extends (0, $fCGpa$detectorjscore.FlagsClass) { + #values; + #cssFlags; + #cssFlagsPrefix; + /** + * Creates an instance of Detector. + * @param {boolean} [cssFlags=false] + * @param {string} [cssFlagsPrefix='djs'] + * @param {any} [ua=null] + * + * @memberOf Detector + */ constructor(ua = null, values = true, cssFlags = false, cssFlagsPrefix = "djs"){ + super(ua); + this.#values = values; + this.#cssFlags = !!cssFlags ? [] : null; + this.#cssFlagsPrefix = cssFlagsPrefix + (!!cssFlagsPrefix ? "--" : ""); + //! Features + this.checkFeature(); + //! Software + this.checkEngine(); + this.checkBrowser(); + this.checkOS(); + //! Hardware + // this.checkDevice(); + this.checkCPU(); + this.checkGPU(); + this.checkPlatform(); + this.setCssFlags(); + // remove unnecessary memory usage + // delete this.booleanFlagsValuePropertyName; + // delete this._values; + // delete this._cssFlags; + // delete this._cssFlagsPrefix; + // delete this.root; + // delete this.process; + // delete this.navigator; + // delete this.document; + // delete this.ua; + // console.warn('DetectorJS initialized', this.toFlags()); + } + //! Feature + /** + * + * + * + * @memberOf Detector + */ checkFeature() { + const feature = new (0, $fCGpa$detectorjsfeature.Feature)(this.ua); + const audio = new (0, $fCGpa$detectorjsfeature.AudioFeature)(this.ua); + const video = new (0, $fCGpa$detectorjsfeature.VideoFeature)(this.ua); + this.feature = feature.toFlags().merge({ + audio: audio.toFlags(), + video: video.toFlags() + }); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(feature.toCssFlags(), audio.toCssFlags(), video.toCssFlags()); + } + //! Software + /** + * + * + * + * @memberOf Detector + */ checkEngine() { + const engine = new (0, $fCGpa$detectorjssoftware.Engine)(this.ua, this.toFlags()); + if (this.#values) this.engine = engine.toValues(); + else this.engine = engine.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(engine.toCssFlags()); + } + /** + * + * + * + * @memberOf Detector + */ checkBrowser() { + const browser = new (0, $fCGpa$detectorjssoftware.Browser)(this.ua, this.toFlags()); + if (this.#values) this.browser = browser.toValues(); + else this.browser = browser.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(browser.toCssFlags()); + } + /** + * + * + * + * @memberOf Detector + */ checkOS() { + const os = new (0, $fCGpa$detectorjssoftware.OS)(this.ua, this.toFlags()); + if (this.#values) this.os = os.toValues(); + else this.os = os.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(os.toCssFlags()); + } + //! Hardware + /** + * + * + * + * @memberOf Detector + */ checkDevice() { + const device = new (0, $fCGpa$detectorjshardware.Device)(this.ua, this.toFlags()); + this.device = device.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(device.toCssFlags()); + } + /** + * + * + * + * @memberOf Detector + */ checkCPU() { + const cpu = new (0, $fCGpa$detectorjshardware.CPU)(this.ua, this.toFlags()); + if (this.#values) this.cpu = cpu.toValues(); + else this.cpu = cpu.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(cpu.toCssFlags()); + } + /** + * + * + * + * @memberOf Detector + */ checkGPU() { + const gpu = new (0, $fCGpa$detectorjshardware.GPU)(this.ua, this.toFlags()); + this.gpu = gpu.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(gpu.toCssFlags()); + } + /** + * + * + * + * @memberOf Detector + */ checkPlatform() { + const platform = new (0, $fCGpa$detectorjshardware.Platform)(this.ua, this.toFlags()); + if (this.#values) this.platform = platform.toValues(); + else this.platform = platform.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(platform.toCssFlags()); + } + //! CSS Flags + /** + * + * + * + * @memberOf Detector + */ setCssFlags() { + if (!!this.#cssFlags) { + const cssFlagsPrefixed = this.#cssFlags.map((cssFlag)=>{ + return this.#cssFlagsPrefix + cssFlag; + }); + const htmlElement = document.documentElement || document.querySelector("html"); + cssFlagsPrefixed.forEach((cssFlag)=>{ + return htmlElement.className.replace(cssFlag, ""); + }); + htmlElement.className += cssFlagsPrefixed.join(" ").trim(); + } + } +} + + +//# sourceMappingURL=detector.js.map diff --git a/packages/detector/dist/detector.js.map b/packages/detector/dist/detector.js.map new file mode 100644 index 0000000..ab542ed --- /dev/null +++ b/packages/detector/dist/detector.js.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;;;AAAA,oBAAoB,GACpB;;;;AAkBO,MAAM,iDAAiB,CAAA,GAAA,gCAAU,AAAD;IACrC,CAAC,MAAM,CAAU;IACjB,CAAC,QAAQ,CAAkB;IAC3B,CAAC,cAAc,CAAS;IAWxB;;;;;;;GAOC,GACD,YAAY,KAAoB,IAAI,EAAE,SAAS,IAAI,EAAE,WAAW,KAAK,EAAE,iBAAiB,KAAK,CAAE;QAC7F,KAAK,CAAC;QAEN,IAAI,CAAC,CAAC,MAAM,GAAG;QACf,IAAI,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI;QACvC,IAAI,CAAC,CAAC,cAAc,GAAG,iBAAkB,CAAA,CAAC,CAAC,iBAAiB,OAAO,EAAE,AAAD;QAEpE,YAAY;QACZ,IAAI,CAAC,YAAY;QAEjB,YAAY;QACZ,IAAI,CAAC,WAAW;QAChB,IAAI,CAAC,YAAY;QACjB,IAAI,CAAC,OAAO;QAEZ,YAAY;QACZ,sBAAsB;QACtB,IAAI,CAAC,QAAQ;QACb,IAAI,CAAC,QAAQ;QACb,IAAI,CAAC,aAAa;QAElB,IAAI,CAAC,WAAW;IAEhB,kCAAkC;IAClC,6CAA6C;IAC7C,uBAAuB;IACvB,yBAAyB;IACzB,+BAA+B;IAC/B,oBAAoB;IACpB,uBAAuB;IACvB,yBAAyB;IACzB,wBAAwB;IACxB,kBAAkB;IAElB,0DA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ts"],"sourcesContent":["/*jshint expr: true */\nimport { FlagsClass } from '@detector-js/core';\n\n//! Features\nimport { Feature, AudioFeature, VideoFeature } from '@detector-js/feature';\n\n//! Hardware\nimport { Platform, Device, CPU, GPU } from '@detector-js/hardware';\n\n//! Software\nimport { Browser, Engine, OS } from '@detector-js/software';\n\n/**\n *\n *\n * @export\n * @class Detector\n * @extends {FlagsClass}\n */\nexport class Detector extends FlagsClass {\n #values: boolean;\n #cssFlags: string[] | null;\n #cssFlagsPrefix: string;\n\n feature: any;\n browser: {};\n engine: any;\n os: {};\n device: any;\n cpu: {};\n gpu: any;\n platform: string;\n\n /**\n * Creates an instance of Detector.\n * @param {boolean} [cssFlags=false]\n * @param {string} [cssFlagsPrefix='djs']\n * @param {any} [ua=null]\n *\n * @memberOf Detector\n */\n constructor(ua: string | null = null, values = true, cssFlags = false, cssFlagsPrefix = 'djs') {\n super(ua);\n\n this.#values = values;\n this.#cssFlags = !!cssFlags ? [] : null;\n this.#cssFlagsPrefix = cssFlagsPrefix + (!!cssFlagsPrefix ? '--' : '');\n\n //! Features\n this.checkFeature();\n\n //! Software\n this.checkEngine();\n this.checkBrowser();\n this.checkOS();\n\n //! Hardware\n // this.checkDevice();\n this.checkCPU();\n this.checkGPU();\n this.checkPlatform();\n\n this.setCssFlags();\n\n // remove unnecessary memory usage\n // delete this.booleanFlagsValuePropertyName;\n // delete this._values;\n // delete this._cssFlags;\n // delete this._cssFlagsPrefix;\n // delete this.root;\n // delete this.process;\n // delete this.navigator;\n // delete this.document;\n // delete this.ua;\n\n // console.warn('DetectorJS initialized', this.toFlags());\n }\n\n //! Feature\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkFeature() {\n const feature = new Feature(this.ua);\n const audio = new AudioFeature(this.ua);\n const video = new VideoFeature(this.ua);\n\n this.feature = feature.toFlags().merge({\n audio: audio.toFlags(),\n video: video.toFlags()\n });\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(feature.toCssFlags(), audio.toCssFlags(), video.toCssFlags());\n }\n }\n\n //! Software\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkEngine() {\n const engine = new Engine(this.ua, this.toFlags());\n\n if (this.#values) {\n this.engine = engine.toValues();\n } else {\n this.engine = engine.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(engine.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkBrowser() {\n const browser = new Browser(this.ua, this.toFlags());\n\n if (this.#values) {\n this.browser = browser.toValues();\n } else {\n this.browser = browser.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(browser.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkOS() {\n const os = new OS(this.ua, this.toFlags());\n\n if (this.#values) {\n this.os = os.toValues();\n } else {\n this.os = os.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(os.toCssFlags());\n }\n }\n\n //! Hardware\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkDevice() {\n const device = new Device(this.ua, this.toFlags());\n\n this.device = device.toFlags();\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(device.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkCPU() {\n const cpu = new CPU(this.ua, this.toFlags());\n\n if (this.#values) {\n this.cpu = cpu.toValues();\n } else {\n this.cpu = cpu.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(cpu.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkGPU() {\n const gpu = new GPU(this.ua, this.toFlags());\n\n this.gpu = gpu.toFlags();\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(gpu.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkPlatform() {\n const platform = new Platform(this.ua, this.toFlags());\n\n if (this.#values) {\n this.platform = platform.toValues();\n } else {\n this.platform = platform.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(platform.toCssFlags());\n }\n }\n\n //! CSS Flags\n /**\n *\n *\n *\n * @memberOf Detector\n */\n setCssFlags() {\n if (!!this.#cssFlags) {\n const cssFlagsPrefixed = this.#cssFlags.map((cssFlag) => {\n return this.#cssFlagsPrefix + cssFlag;\n });\n\n const htmlElement = document.documentElement || document.querySelector('html');\n\n cssFlagsPrefixed.forEach((cssFlag) => {\n return htmlElement.className.replace(cssFlag, '');\n });\n\n htmlElement.className += cssFlagsPrefixed.join(' ').trim();\n }\n }\n}\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n"],"names":[],"version":3,"file":"detector.js.map"} \ No newline at end of file diff --git a/packages/detector/dist/detector.mjs b/packages/detector/dist/detector.mjs new file mode 100644 index 0000000..e33f0b5 --- /dev/null +++ b/packages/detector/dist/detector.mjs @@ -0,0 +1,165 @@ +import {FlagsClass as $gVSaN$FlagsClass} from "@detector-js/core"; +import {Feature as $gVSaN$Feature, AudioFeature as $gVSaN$AudioFeature, VideoFeature as $gVSaN$VideoFeature} from "@detector-js/feature"; +import {Device as $gVSaN$Device, CPU as $gVSaN$CPU, GPU as $gVSaN$GPU, Platform as $gVSaN$Platform} from "@detector-js/hardware"; +import {Engine as $gVSaN$Engine, Browser as $gVSaN$Browser, OS as $gVSaN$OS} from "@detector-js/software"; + +/*jshint expr: true */ + + + +class $031f18e04186d349$export$e695250628cde35 extends (0, $gVSaN$FlagsClass) { + #values; + #cssFlags; + #cssFlagsPrefix; + /** + * Creates an instance of Detector. + * @param {boolean} [cssFlags=false] + * @param {string} [cssFlagsPrefix='djs'] + * @param {any} [ua=null] + * + * @memberOf Detector + */ constructor(ua = null, values = true, cssFlags = false, cssFlagsPrefix = "djs"){ + super(ua); + this.#values = values; + this.#cssFlags = !!cssFlags ? [] : null; + this.#cssFlagsPrefix = cssFlagsPrefix + (!!cssFlagsPrefix ? "--" : ""); + //! Features + this.checkFeature(); + //! Software + this.checkEngine(); + this.checkBrowser(); + this.checkOS(); + //! Hardware + // this.checkDevice(); + this.checkCPU(); + this.checkGPU(); + this.checkPlatform(); + this.setCssFlags(); + // remove unnecessary memory usage + // delete this.booleanFlagsValuePropertyName; + // delete this._values; + // delete this._cssFlags; + // delete this._cssFlagsPrefix; + // delete this.root; + // delete this.process; + // delete this.navigator; + // delete this.document; + // delete this.ua; + // console.warn('DetectorJS initialized', this.toFlags()); + } + //! Feature + /** + * + * + * + * @memberOf Detector + */ checkFeature() { + const feature = new (0, $gVSaN$Feature)(this.ua); + const audio = new (0, $gVSaN$AudioFeature)(this.ua); + const video = new (0, $gVSaN$VideoFeature)(this.ua); + this.feature = feature.toFlags().merge({ + audio: audio.toFlags(), + video: video.toFlags() + }); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(feature.toCssFlags(), audio.toCssFlags(), video.toCssFlags()); + } + //! Software + /** + * + * + * + * @memberOf Detector + */ checkEngine() { + const engine = new (0, $gVSaN$Engine)(this.ua, this.toFlags()); + if (this.#values) this.engine = engine.toValues(); + else this.engine = engine.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(engine.toCssFlags()); + } + /** + * + * + * + * @memberOf Detector + */ checkBrowser() { + const browser = new (0, $gVSaN$Browser)(this.ua, this.toFlags()); + if (this.#values) this.browser = browser.toValues(); + else this.browser = browser.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(browser.toCssFlags()); + } + /** + * + * + * + * @memberOf Detector + */ checkOS() { + const os = new (0, $gVSaN$OS)(this.ua, this.toFlags()); + if (this.#values) this.os = os.toValues(); + else this.os = os.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(os.toCssFlags()); + } + //! Hardware + /** + * + * + * + * @memberOf Detector + */ checkDevice() { + const device = new (0, $gVSaN$Device)(this.ua, this.toFlags()); + this.device = device.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(device.toCssFlags()); + } + /** + * + * + * + * @memberOf Detector + */ checkCPU() { + const cpu = new (0, $gVSaN$CPU)(this.ua, this.toFlags()); + if (this.#values) this.cpu = cpu.toValues(); + else this.cpu = cpu.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(cpu.toCssFlags()); + } + /** + * + * + * + * @memberOf Detector + */ checkGPU() { + const gpu = new (0, $gVSaN$GPU)(this.ua, this.toFlags()); + this.gpu = gpu.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(gpu.toCssFlags()); + } + /** + * + * + * + * @memberOf Detector + */ checkPlatform() { + const platform = new (0, $gVSaN$Platform)(this.ua, this.toFlags()); + if (this.#values) this.platform = platform.toValues(); + else this.platform = platform.toFlags(); + if (!!this.#cssFlags) this.#cssFlags = this.#cssFlags.concat(platform.toCssFlags()); + } + //! CSS Flags + /** + * + * + * + * @memberOf Detector + */ setCssFlags() { + if (!!this.#cssFlags) { + const cssFlagsPrefixed = this.#cssFlags.map((cssFlag)=>{ + return this.#cssFlagsPrefix + cssFlag; + }); + const htmlElement = document.documentElement || document.querySelector("html"); + cssFlagsPrefixed.forEach((cssFlag)=>{ + return htmlElement.className.replace(cssFlag, ""); + }); + htmlElement.className += cssFlagsPrefixed.join(" ").trim(); + } + } +} + + +export {$031f18e04186d349$export$e695250628cde35 as Detector}; +//# sourceMappingURL=detector.mjs.map diff --git a/packages/detector/dist/detector.mjs.map b/packages/detector/dist/detector.mjs.map new file mode 100644 index 0000000..b09342d --- /dev/null +++ b/packages/detector/dist/detector.mjs.map @@ -0,0 +1 @@ +{"mappings":";;;;;AAAA,oBAAoB,GACpB;;;;AAkBO,MAAM,iDAAiB,CAAA,GAAA,iBAAU,AAAD;IACrC,CAAC,MAAM,CAAU;IACjB,CAAC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AI,CAAC,OAAO;QAEnD,IAAI,IAAI,CAAC,CAAC,MAAM,EACd,IAAI,CAAC,QAAQ,GAAG,SAAS,QAAQ;aAEjC,IAAI,CAAC,QAAQ,GAAG,SAAS,OAAO;QAGlC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAClB,IAAI,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,UAAU;IAE9D;IAEA,aAAa;IACb;;;;;GAKC,GACD,cAAc;QACZ,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YACpB,MAAM,mBAAmB,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,UAAY;gBACvD,OAAO,IAAI,CAAC,CAAC,cAAc,GAAG;YAChC;YAEA,MAAM,cAAc,SAAS,eAAe,IAAI,SAAS,aAAa,CAAC;YAEvE,iBAAiB,OAAO,CAAC,CAAC,UAAY;gBACpC,OAAO,YAAY,SAAS,CAAC,OAAO,CAAC,SAAS;YAChD;YAEA,YAAY,SAAS,IAAI,iBAAiB,IAAI,CAAC,KAAK,IAAI;QAC1D,CAAC;IACH;AACF","sources":["packages/detector/lib/detector.ts"],"sourcesContent":["/*jshint expr: true */\nimport { FlagsClass } from '@detector-js/core';\n\n//! Features\nimport { Feature, AudioFeature, VideoFeature } from '@detector-js/feature';\n\n//! Hardware\nimport { Platform, Device, CPU, GPU } from '@detector-js/hardware';\n\n//! Software\nimport { Browser, Engine, OS } from '@detector-js/software';\n\n/**\n *\n *\n * @export\n * @class Detector\n * @extends {FlagsClass}\n */\nexport class Detector extends FlagsClass {\n #values: boolean;\n #cssFlags: string[] | null;\n #cssFlagsPrefix: string;\n\n feature: any;\n browser: {};\n engine: any;\n os: {};\n device: any;\n cpu: {};\n gpu: any;\n platform: string;\n\n /**\n * Creates an instance of Detector.\n * @param {boolean} [cssFlags=false]\n * @param {string} [cssFlagsPrefix='djs']\n * @param {any} [ua=null]\n *\n * @memberOf Detector\n */\n constructor(ua: string | null = null, values = true, cssFlags = false, cssFlagsPrefix = 'djs') {\n super(ua);\n\n this.#values = values;\n this.#cssFlags = !!cssFlags ? [] : null;\n this.#cssFlagsPrefix = cssFlagsPrefix + (!!cssFlagsPrefix ? '--' : '');\n\n //! Features\n this.checkFeature();\n\n //! Software\n this.checkEngine();\n this.checkBrowser();\n this.checkOS();\n\n //! Hardware\n // this.checkDevice();\n this.checkCPU();\n this.checkGPU();\n this.checkPlatform();\n\n this.setCssFlags();\n\n // remove unnecessary memory usage\n // delete this.booleanFlagsValuePropertyName;\n // delete this._values;\n // delete this._cssFlags;\n // delete this._cssFlagsPrefix;\n // delete this.root;\n // delete this.process;\n // delete this.navigator;\n // delete this.document;\n // delete this.ua;\n\n // console.warn('DetectorJS initialized', this.toFlags());\n }\n\n //! Feature\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkFeature() {\n const feature = new Feature(this.ua);\n const audio = new AudioFeature(this.ua);\n const video = new VideoFeature(this.ua);\n\n this.feature = feature.toFlags().merge({\n audio: audio.toFlags(),\n video: video.toFlags()\n });\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(feature.toCssFlags(), audio.toCssFlags(), video.toCssFlags());\n }\n }\n\n //! Software\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkEngine() {\n const engine = new Engine(this.ua, this.toFlags());\n\n if (this.#values) {\n this.engine = engine.toValues();\n } else {\n this.engine = engine.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(engine.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkBrowser() {\n const browser = new Browser(this.ua, this.toFlags());\n\n if (this.#values) {\n this.browser = browser.toValues();\n } else {\n this.browser = browser.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(browser.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkOS() {\n const os = new OS(this.ua, this.toFlags());\n\n if (this.#values) {\n this.os = os.toValues();\n } else {\n this.os = os.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(os.toCssFlags());\n }\n }\n\n //! Hardware\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkDevice() {\n const device = new Device(this.ua, this.toFlags());\n\n this.device = device.toFlags();\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(device.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkCPU() {\n const cpu = new CPU(this.ua, this.toFlags());\n\n if (this.#values) {\n this.cpu = cpu.toValues();\n } else {\n this.cpu = cpu.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(cpu.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkGPU() {\n const gpu = new GPU(this.ua, this.toFlags());\n\n this.gpu = gpu.toFlags();\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(gpu.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkPlatform() {\n const platform = new Platform(this.ua, this.toFlags());\n\n if (this.#values) {\n this.platform = platform.toValues();\n } else {\n this.platform = platform.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(platform.toCssFlags());\n }\n }\n\n //! CSS Flags\n /**\n *\n *\n *\n * @memberOf Detector\n */\n setCssFlags() {\n if (!!this.#cssFlags) {\n const cssFlagsPrefixed = this.#cssFlags.map((cssFlag) => {\n return this.#cssFlagsPrefix + cssFlag;\n });\n\n const htmlElement = document.documentElement || document.querySelector('html');\n\n cssFlagsPrefixed.forEach((cssFlag) => {\n return htmlElement.className.replace(cssFlag, '');\n });\n\n htmlElement.className += cssFlagsPrefixed.join(' ').trim();\n }\n }\n}\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n"],"names":[],"version":3,"file":"detector.mjs.map"} \ No newline at end of file diff --git a/packages/detector/dist/detector.types.d.ts b/packages/detector/dist/detector.types.d.ts new file mode 100644 index 0000000..fa2fece --- /dev/null +++ b/packages/detector/dist/detector.types.d.ts @@ -0,0 +1,93 @@ +import { FlagsClass } from "@detector-js/core"; +/** + * + * + * @export + * @class Detector + * @extends {FlagsClass} + */ +export class Detector extends FlagsClass { + #private; + feature: any; + browser: {}; + engine: any; + os: {}; + device: any; + cpu: {}; + gpu: any; + platform: string; + /** + * Creates an instance of Detector. + * @param {boolean} [cssFlags=false] + * @param {string} [cssFlagsPrefix='djs'] + * @param {any} [ua=null] + * + * @memberOf Detector + */ + constructor(ua?: string | null, values?: boolean, cssFlags?: boolean, cssFlagsPrefix?: string); + /** + * + * + * + * @memberOf Detector + */ + checkFeature(): void; + /** + * + * + * + * @memberOf Detector + */ + checkEngine(): void; + /** + * + * + * + * @memberOf Detector + */ + checkBrowser(): void; + /** + * + * + * + * @memberOf Detector + */ + checkOS(): void; + /** + * + * + * + * @memberOf Detector + */ + checkDevice(): void; + /** + * + * + * + * @memberOf Detector + */ + checkCPU(): void; + /** + * + * + * + * @memberOf Detector + */ + checkGPU(): void; + /** + * + * + * + * @memberOf Detector + */ + checkPlatform(): void; + /** + * + * + * + * @memberOf Detector + */ + setCssFlags(): void; +} + +//# sourceMappingURL=detector.types.d.ts.map diff --git a/packages/detector/dist/detector.types.d.ts.map b/packages/detector/dist/detector.types.d.ts.map new file mode 100644 index 0000000..3c55b0d --- /dev/null +++ b/packages/detector/dist/detector.types.d.ts.map @@ -0,0 +1 @@ +{"mappings":";AAYA;;;;;;GAMG;AACH,qBAAsB,SAAQ,UAAU;;IAKtC,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,EAAE,EAAE,CAAC;IACZ,MAAM,EAAE,GAAG,CAAC;IACZ,EAAE,EAAE,EAAE,CAAC;IACP,MAAM,EAAE,GAAG,CAAC;IACZ,GAAG,EAAE,EAAE,CAAC;IACR,GAAG,EAAE,GAAG,CAAC;IACT,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;;OAOG;gBACS,EAAE,GAAE,MAAM,GAAG,IAAW,EAAE,MAAM,UAAO,EAAE,QAAQ,UAAQ,EAAE,cAAc,SAAQ;IAsC7F;;;;;OAKG;IACH,YAAY;IAgBZ;;;;;OAKG;IACH,WAAW;IAcX;;;;;OAKG;IACH,YAAY;IAcZ;;;;;OAKG;IACH,OAAO;IAeP;;;;;OAKG;IACH,WAAW;IAUX;;;;;OAKG;IACH,QAAQ;IAcR;;;;;OAKG;IACH,QAAQ;IAUR;;;;;OAKG;IACH,aAAa;IAeb;;;;;OAKG;IACH,WAAW;CAeZ","sources":["packages/detector/lib/lib/detector.ts","packages/detector/lib/detector.ts"],"sourcesContent":[null,"/*jshint expr: true */\nimport { FlagsClass } from '@detector-js/core';\n\n//! Features\nimport { Feature, AudioFeature, VideoFeature } from '@detector-js/feature';\n\n//! Hardware\nimport { Platform, Device, CPU, GPU } from '@detector-js/hardware';\n\n//! Software\nimport { Browser, Engine, OS } from '@detector-js/software';\n\n/**\n *\n *\n * @export\n * @class Detector\n * @extends {FlagsClass}\n */\nexport class Detector extends FlagsClass {\n #values: boolean;\n #cssFlags: string[] | null;\n #cssFlagsPrefix: string;\n\n feature: any;\n browser: {};\n engine: any;\n os: {};\n device: any;\n cpu: {};\n gpu: any;\n platform: string;\n\n /**\n * Creates an instance of Detector.\n * @param {boolean} [cssFlags=false]\n * @param {string} [cssFlagsPrefix='djs']\n * @param {any} [ua=null]\n *\n * @memberOf Detector\n */\n constructor(ua: string | null = null, values = true, cssFlags = false, cssFlagsPrefix = 'djs') {\n super(ua);\n\n this.#values = values;\n this.#cssFlags = !!cssFlags ? [] : null;\n this.#cssFlagsPrefix = cssFlagsPrefix + (!!cssFlagsPrefix ? '--' : '');\n\n //! Features\n this.checkFeature();\n\n //! Software\n this.checkEngine();\n this.checkBrowser();\n this.checkOS();\n\n //! Hardware\n // this.checkDevice();\n this.checkCPU();\n this.checkGPU();\n this.checkPlatform();\n\n this.setCssFlags();\n\n // remove unnecessary memory usage\n // delete this.booleanFlagsValuePropertyName;\n // delete this._values;\n // delete this._cssFlags;\n // delete this._cssFlagsPrefix;\n // delete this.root;\n // delete this.process;\n // delete this.navigator;\n // delete this.document;\n // delete this.ua;\n\n // console.warn('DetectorJS initialized', this.toFlags());\n }\n\n //! Feature\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkFeature() {\n const feature = new Feature(this.ua);\n const audio = new AudioFeature(this.ua);\n const video = new VideoFeature(this.ua);\n\n this.feature = feature.toFlags().merge({\n audio: audio.toFlags(),\n video: video.toFlags()\n });\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(feature.toCssFlags(), audio.toCssFlags(), video.toCssFlags());\n }\n }\n\n //! Software\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkEngine() {\n const engine = new Engine(this.ua, this.toFlags());\n\n if (this.#values) {\n this.engine = engine.toValues();\n } else {\n this.engine = engine.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(engine.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkBrowser() {\n const browser = new Browser(this.ua, this.toFlags());\n\n if (this.#values) {\n this.browser = browser.toValues();\n } else {\n this.browser = browser.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(browser.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkOS() {\n const os = new OS(this.ua, this.toFlags());\n\n if (this.#values) {\n this.os = os.toValues();\n } else {\n this.os = os.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(os.toCssFlags());\n }\n }\n\n //! Hardware\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkDevice() {\n const device = new Device(this.ua, this.toFlags());\n\n this.device = device.toFlags();\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(device.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkCPU() {\n const cpu = new CPU(this.ua, this.toFlags());\n\n if (this.#values) {\n this.cpu = cpu.toValues();\n } else {\n this.cpu = cpu.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(cpu.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkGPU() {\n const gpu = new GPU(this.ua, this.toFlags());\n\n this.gpu = gpu.toFlags();\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(gpu.toCssFlags());\n }\n }\n\n /**\n *\n *\n *\n * @memberOf Detector\n */\n checkPlatform() {\n const platform = new Platform(this.ua, this.toFlags());\n\n if (this.#values) {\n this.platform = platform.toValues();\n } else {\n this.platform = platform.toFlags();\n }\n\n if (!!this.#cssFlags) {\n this.#cssFlags = this.#cssFlags.concat(platform.toCssFlags());\n }\n }\n\n //! CSS Flags\n /**\n *\n *\n *\n * @memberOf Detector\n */\n setCssFlags() {\n if (!!this.#cssFlags) {\n const cssFlagsPrefixed = this.#cssFlags.map((cssFlag) => {\n return this.#cssFlagsPrefix + cssFlag;\n });\n\n const htmlElement = document.documentElement || document.querySelector('html');\n\n cssFlagsPrefixed.forEach((cssFlag) => {\n return htmlElement.className.replace(cssFlag, '');\n });\n\n htmlElement.className += cssFlagsPrefixed.join(' ').trim();\n }\n }\n}\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n"],"names":[],"version":3,"file":"detector.types.d.ts.map"} \ No newline at end of file diff --git a/packages/feature/dist/feature.js b/packages/feature/dist/feature.js new file mode 100644 index 0000000..35240c9 --- /dev/null +++ b/packages/feature/dist/feature.js @@ -0,0 +1,929 @@ +var $eoSfW$detectorjscore = require("@detector-js/core"); + +function $parcel$exportWildcard(dest, source) { + Object.keys(source).forEach(function(key) { + if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) { + return; + } + + Object.defineProperty(dest, key, { + enumerable: true, + get: function get() { + return source[key]; + } + }); + }); + + return dest; +} +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} + +$parcel$export(module.exports, "Feature", () => $b0c7589c0f8f2d7d$export$6e91cf7616333d5); + +var $421dd7944bd14278$exports = {}; + +$parcel$export($421dd7944bd14278$exports, "AudioFeature", () => $421dd7944bd14278$export$ae7d97a50b8bcedb); + +class $421dd7944bd14278$export$ae7d97a50b8bcedb extends (0, $eoSfW$detectorjscore.CssFlagsClass) { + #audioElement; + /** + * Creates an instance of AudioFeature. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='audio'] + * + * @memberOf AudioFeature + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "audio"){ + super(ua, flags, cssFlagsPrefix); + this.#createTestElements(); + this.context = this.getContext(); + this.formats = { + mp3: this.getMp3(), + webm: this.getWebm(), + ogg: this.getOgg(), + opus: this.getOpus(), + wav: this.getWav(), + m4a: this.getM4a() + }; + } + /** + * + * + * @memberof AudioFeature + */ #createTestElements() { + this.#audioElement = this.document.createElement("audio"); + } + // /** + // * + // * + // * @memberof AudioFeature + // */ + // _destroyTestElements() { + // this.#audioElement = null; + // delete this.#audioElement; + // } + /** + * + * + * @readonly + * + * @memberOf AudioFeature + */ get supported() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + "Audio" in this.root, + "HTMLAudioElement" in this.root, + "HTMLMediaElement" in this.root, + ()=>!!this.#audioElement && "canPlayType" in this.#audioElement && this.#audioElement instanceof HTMLAudioElement && this.#audioElement instanceof HTMLMediaElement + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getContext() { + return (0, $eoSfW$detectorjscore.Asserts).one([ + "AudioContext" in this.root, + "webkitAudioContext" in this.root + ]); + } + /** + *__ + * + * @returns boolean + * + * @memberOf AudioFeature + */ getMp3() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>this.supported && this.#audioElement.canPlayType("audio/mpeg;").replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getWebm() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>this.supported && this.#audioElement.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getOgg() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>this.supported && this.#audioElement.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getOpus() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>this.supported && this.#audioElement.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getWav() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>this.supported && this.#audioElement.canPlayType('audio/wav; codecs="1"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getM4a() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>this.supported && (this.#audioElement.canPlayType("audio/x-m4a;").replace(/^no$/, "") || this.#audioElement.canPlayType("audio/aac;").replace(/^no$/, "")) !== "" + ], true); + } +} + + +var $8a75deb56432f7a3$exports = {}; + +$parcel$export($8a75deb56432f7a3$exports, "VideoFeature", () => $8a75deb56432f7a3$export$4d7d44add0424e8a); + +class $8a75deb56432f7a3$export$4d7d44add0424e8a extends (0, $eoSfW$detectorjscore.CssFlagsClass) { + #videoElement; + /** + * Creates an instance of VideoFeature. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='video'] + * + * @memberOf VideoFeature + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "video"){ + super(ua, flags, cssFlagsPrefix); + this._createTestElements(); + this.formats = { + mp4: this.getMp4(), + ogv: this.getOgv(), + webm: this.getWebm() + }; + } + /** + * + * + * @memberof VideoFeature + */ _createTestElements() { + this.#videoElement = this.document.createElement("video"); + } + // /** + // * + // * + // * @memberof VideoFeature + // */ + // _destroyTestElements() { + // this._viewElement = null; + // delete this._videoElement; + // } + /** + * + * + * @readonly + * + * @memberOf VideoFeature + */ get supported() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + "HTMLVideoElement" in this.root, + "HTMLMediaElement" in this.root, + ()=>!!this.#videoElement && "canPlayType" in this.#videoElement && this.#videoElement instanceof HTMLVideoElement && this.#videoElement instanceof HTMLMediaElement + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf VideoFeature + */ getMp4() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>this.supported && this.#videoElement.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf VideoFeature + */ getOgv() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>this.supported && this.#videoElement.canPlayType('video/ogg; codecs="theora, vorbis"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf VideoFeature + */ getWebm() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>this.supported && this.#videoElement.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, "") !== "" + ], true); + } +} + + +class $b0c7589c0f8f2d7d$export$6e91cf7616333d5 extends (0, $eoSfW$detectorjscore.CssFlagsClass) { + #cssPrefixes; + #script; + #canvas; + #div; + #input; + #img; + #xmlHttpRequest; + /** + * Creates an instance of Feature. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='feature'] + * + * @memberOf Feature + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "feature"){ + super(ua, flags, cssFlagsPrefix); + this.#createTestElements(); + this.addEventListener = this.getAddEventListener(); + this.asyncScript = this.getAsyncScript(); + this.battery = this.getBattery(); + this.cors = this.getCors(); + this.deferScript = this.getDeferScript(); + this.file = this.getFile(); + this.fileSystem = this.getFileSystem(); + this.fullscreen = this.getFullscreen(); + this.fullscreenKeyboard = this.getFullscreenKeyboard(); + this.geolocation = this.getGeolocation(); + this.historyAPI = this.getHistoryAPI(); + this.littleEndian = this.getLittleEndian(); + this.localStorage = this.getLocalStorage(); + this.matchMedia = this.getMatchMedia(); + this.querySelector = this.getQuerySelector(); + this.querySelectorAll = this.getQuerySelectorAll(); + this.serviceWorker = this.getServiceWorker(); + this.typedArray = this.getTypedArray(); + this.userMedia = this.getUserMedia(); + this.vibration = this.getVibration(); + this.worker = this.getWorker(); + } + /** + * + * + * @param {any} prop + * @param {any} [prefixes=this.#cssPrefixes] + * @returns {string} + * + * @memberOf Feature + */ #getCssPrefixedProp(prop, prefixes = this.#cssPrefixes) { + prop = prop.toCamelCase(); + const prefixedProps = prefixes.map((item)=>{ + return (item === "spec" ? "" : "-" + item + "-") + prop; + }); + // if ('CSS' in this.root && 'supports' in this.root.CSS) { + // return this.root.CSS.supports(prefixedProps.map(item => '(' + item + ': inherit)').join(' or ')); + // } + const prefixedPropsFound = prefixedProps.filter((item)=>{ + return item in this.#div.style; + }); + if (prefixedPropsFound.length > 0) return prefixedPropsFound[0]; + return null; + } + /** + * + * + * @param {any} prop + * @param {any} [prefixes=this.#cssPrefixes] + * @returns {string} + * + * @memberOf Feature + */ _checkCssPrefixedProp(prop, prefixes = this.#cssPrefixes) { + return !!this.#getCssPrefixedProp(prop, prefixes); + } + /** + * + * + * @param {any} prop + * @param {any} value + * @returns {any} + * + * @memberOf Feature + */ _getCssPrefixedPropValue(prop, value) { + const prefixedProp = this.#getCssPrefixedProp(prop); + if (prefixedProp) { + this.document.body.insertBefore(this.#div, null); + this.#div.style[prefixedProp] = value; + const computedStylePropValue = this.root.getComputedStyle(this.#div).getPropertyValue(prefixedProp); + this.document.body.removeChild(this.#div); + if (!!computedStylePropValue && typeof computedStylePropValue === "string") return computedStylePropValue; + return null; + } + return null; + } + /** + * + * + * @param {any} prop + * @param {any} value + * @returns {any} + * + * @memberOf Feature + */ _checkCssPrefixedPropValue(prop, value) { + const prefixedPropValue = this._getCssPrefixedPropValue(prop, value); + return !!prefixedPropValue && prefixedPropValue !== "none"; + } + /** + * + * + * @memberof Feature + */ #createTestElements() { + this.#cssPrefixes = [ + "spec", + "webkit", + "moz", + "ms", + "o" + ]; + this.#script = this.document.createElement("script"); + this.#canvas = this.document.createElement("canvas"); + this.#div = this.document.createElement("div"); + this.#input = this.document.createElement("input"); + this.#img = this.document.createElement("img"); + this.#xmlHttpRequest = new this.root.XMLHttpRequest(); + } + // /** + // * + // * + // * @memberof Feature + // */ + // _destroyTestElements() { + // this.#cssPrefixes = null; + // this._script = null; + // this._canvas = null; + // this._div = null; + // this._input = null; + // this._img = null; + // this._xmlHttpRequest = null; + // delete this.#cssPrefixes; + // delete this._script; + // delete this._canvas; + // delete this._div; + // delete this._input; + // delete this._img; + // delete this._xmlHttpRequest; + // } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getAddEventListener() { + return "addEventListener" in this.root; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getAsyncScript() { + return "async" in this.#script; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getBattery() { + return "battery" in this.navigator; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getCors() { + return "XMLHttpRequest" in this.root && "withCredentials" in this.#xmlHttpRequest; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getDeferScript() { + return "defer" in this.#script; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getFile() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + "File" in this.root, + "FileReader" in this.root, + "FileList" in this.root, + "Blob" in this.root + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getFileSystem() { + return "requestFileSystem" in this.root; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getFullscreen() { + return (0, $eoSfW$detectorjscore.Asserts).one([ + "requestFullscreen" in this.#canvas, + "webkitRequestFullscreen" in this.#canvas, + "msRequestFullscreen" in this.#canvas, + "mozRequestFullScreen" in this.#canvas + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getFullscreenKeyboard() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>"Element" in this.root && "ALLOW_KEYBOARD_INPUT" in this.root.Element + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getGeolocation() { + return "geolocation" in this.navigator; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getHistoryAPI() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>"history" in this.root && "pushState" in this.root.history + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getLittleEndian() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + this.getTypedArray, + ()=>new this.root.Int8Array(new this.root.Int16Array([ + 1 + ]).buffer)[0] > 0 + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getLocalStorage() { + return (0, $eoSfW$detectorjscore.Asserts).one([ + ()=>"localStorage" in this.root + ], true) && (0, $eoSfW$detectorjscore.Asserts).one([ + ()=>{ + const test = "x"; + this.root.localStorage.setItem(test, test); + this.root.localStorage.removeItem(test); + return true; + } + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getMatchMedia() { + return "matchMedia" in this.root; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getQuerySelector() { + return "querySelector" in this.document; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getQuerySelectorAll() { + return "querySelectorAll" in this.document; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getServiceWorker() { + return "serviceWorker" in this.navigator; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getTypedArray() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>"Int8Array" in this.root && typeof this.root.Int8Array !== "undefined" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getUserMedia() { + return (0, $eoSfW$detectorjscore.Asserts).one([ + "getUserMedia" in this.navigator, + "webkitGetUserMedia" in this.navigator, + "mozGetUserMedia" in this.navigator, + "msGetUserMedia" in this.navigator + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getVibration() { + return (0, $eoSfW$detectorjscore.Asserts).one([ + "vibrate" in this.navigator, + "webkitVibrate" in this.navigator, + "mozVibrate" in this.navigator, + "msVibrate" in this.navigator + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getWorker() { + return "Worker" in this.root; + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get pointerEnabled() { + return (0, $eoSfW$detectorjscore.Asserts).one([ + "pointerEnabled" in this.navigator, + "msPointerEnabled" in this.navigator + ]); + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get pixelRatio() { + return this.root.devicePixelRatio || 1; + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get pointerLock() { + return (0, $eoSfW$detectorjscore.Asserts).one([ + "pointerLockElement" in this.document, + "webkitPointerLockElement" in this.document, + "mozPointerLockElement" in this.document + ]); + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get quirksMode() { + return this.document.compatMode !== "CSS1Compat"; + } + /** + * Test if CSS 3D transforms are supported + * + * @readonly + * + * @memberOf Feature + */ get css3D() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + this._checkCssPrefixedPropValue.bind(this, "transform", "translate3d(1px,1px,1px)"), + this._checkCssPrefixedProp.bind(this, "perspective") + ], true); + } + // Test if CSS transforms are supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get cssTransform() { + return (0, $eoSfW$detectorjscore.Asserts).one([ + this._checkCssPrefixedProp.bind(this, "transform-origin") + ], true); + } + // Test if CSS transitions are supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get cssTransition() { + return (0, $eoSfW$detectorjscore.Asserts).one([ + this._checkCssPrefixedProp.bind(this, "transition") + ], true); + } + // Test if Device Motion is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get deviceMotion() { + return "DeviceMotionEvent" in this.root; + } + // Test if Device Orientation is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get deviceOrientation() { + return "DeviceOrientationEvent" in this.root; + } + // Test if Context Menu is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get contextMenu() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + "contextMenu" in this.document, + "HTMLMenuItemElement" in this.root + ]); + } + // Test if classList API is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get classList() { + return "classList" in this.document; + } + // Test if placeholder attribute is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get placeholder() { + return "placeholder" in this.#input; + } + // Test if viewport units are supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get viewportUnit() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>(this.#img.style.width = "1vw", this.#img.style.width !== "") + ], true); + } + // Test if REM units are supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get remUnit() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>(this.#img.style.width = "1rem", this.#img.style.width !== "") + ], true); + } + // Test if Canvas is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get canvas() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>"getContext" in this.#canvas && !!this.#canvas.getContext("2d") + ], true); + } + // Test if SVG is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get svg() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>"createElementNS" in this.document && "createSVGRect" in this.document.createElementNS("http://www.w3.org/2000/svg", "svg") + ], true); + } + // Test if WebP is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get webp() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>{ + const elem = document.createElement("canvas"); + if (!!(elem.getContext && elem.getContext("2d"))) // was able or not to get WebP representation + return elem.toDataURL("image/webp").indexOf("data:image/webp") === 0; + return false; + } + ], true); + } + // Test if WebGL is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get webGL() { + return (0, $eoSfW$detectorjscore.Asserts).one([ + ()=>this.canvas && "WebGLRenderingContext" in this.root && (this.#canvas.getContext("webgl") || this.#canvas.getContext("experimental-webgl")), + ()=>this.canvas && "WebGL2RenderingContext" in this.root && this.#canvas.getContext("webgl2") + ], true); + } + // Test if WebVR is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get webVR() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + "getVRDisplays" in this.navigator + ]); + } + // Tests if touch events are supported, but doesn't necessarily reflect a touchscreen device + /** + * + * + * @readonly + * + * @memberOf Feature + */ get touch() { + return (0, $eoSfW$detectorjscore.Asserts).one([ + ()=>"ontouchstart" in this.root, + ()=>"ontouchstart" in this.document.documentElement + ], true) && (0, $eoSfW$detectorjscore.Asserts).one([ + ()=>"DocumentTouch" in this.root, + ()=>this.pointerEnabled && "MSGesture" in this.root, + ()=>"maxTouchPoints" in this.navigator && this.navigator.maxTouchPoints > 1 + ], true); + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get forceTouch() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + ()=>"MouseEvent" in this.root && "WEBKIT_FORCE_AT_MOUSE_DOWN" in this.root.MouseEvent && "WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN" in this.root.MouseEvent + ], true); + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get pointerEvents() { + return (0, $eoSfW$detectorjscore.Asserts).all([ + this.root.PointerEvent + ], true); + } + // Test if img srcset attribute is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get srcset() { + return "srcset" in this.#img; + } + // Test if img sizes attribute is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get sizes() { + return "sizes" in this.#img; + } + // Test if Picture element is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get pictureElement() { + return "HTMLPictureElement" in this.root; + } + // Test if Picture element is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get dialogElement() { + return "HTMLDialogElement" in this.root; + } +} +$parcel$exportWildcard(module.exports, $421dd7944bd14278$exports); +$parcel$exportWildcard(module.exports, $8a75deb56432f7a3$exports); + + +//# sourceMappingURL=feature.js.map diff --git a/packages/feature/dist/feature.js.map b/packages/feature/dist/feature.js.map new file mode 100644 index 0000000..dcb03ef --- /dev/null +++ b/packages/feature/dist/feature.js.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;ACAA;AASO,MAAM,kDAAqB,CAAA,GAAA,mCAAa,AAAD;IAC5C,CAAC,YAAY,CAAmB;IAahC;;;;;;;GAOC,GACD,YAAY,KAAoB,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,iBAAiB,OAAO,CAAE;QAC1E,KAAK,CAAC,IAAI,OAAO;QAEjB,IAAI,CAAC,CAAC,kBAAkB;QAExB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU;QAE9B,IAAI,CAAC,OAAO,GAAG;YACb,KAAK,IAAI,CAAC,MAAM;YAChB,MAAM,IAAI,CAAC,OAAO;YAClB,KAAK,IAAI,CAAC,MAAM;YAChB,MAAM,IAAI,CAAC,OAAO;YAClB,KAAK,IAAI,CAAC,MAAM;YAChB,KAAK,IAAI,CAAC,MAAM;QAClB;IACF;IAEA;;;;GAIC,GACD,CAAC,kBAAkB,GAAG;QACpB,IAAI,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;IACnD;IAEA,MAAM;IACN,KAAK;IACL,KAAK;IACL,4BAA4B;IAC5B,MAAM;IACN,2BAA2B;IAC3B,+BAA+B;IAE/B,+BAA+B;IAC/B,IAAI;IAEJ;;;;;;GAMC,GACD,IAAI,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AAO,YAAY,IAAI,CAAC,CAAC,GAAG;IAC9B;IAEA,2CAA2C;IAC3C;;;;;;GAMC,GACD,IAAI,QAAQ;QACV,OAAO,WAAW,IAAI,CAAC,CAAC,GAAG;IAC7B;IAEA,uCAAuC;IACvC;;;;;;GAMC,GACD,IAAI,iBAAiB;QACnB,OAAO,wBAAwB,IAAI,CAAC,IAAI;IAC1C;IAEA,uCAAuC;IACvC;;;;;;GAMC,GACD,IAAI,gBAAgB;QAClB,OAAO,uBAAuB,IAAI,CAAC,IAAI;IACzC;AACF","sources":["packages/feature/lib/feature.ts","packages/feature/lib/audioFeature.ts","packages/feature/lib/videoFeature.ts"],"sourcesContent":["import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class Feature\n * @extends {CssFlagsClass}\n */\nexport class Feature extends CssFlagsClass {\n #cssPrefixes: string[];\n #script: HTMLScriptElement;\n #canvas: HTMLCanvasElement;\n #div: HTMLDivElement;\n #input: HTMLInputElement;\n #img: HTMLImageElement;\n #xmlHttpRequest: XMLHttpRequest;\n\n addEventListener: boolean;\n asyncScript: boolean;\n battery: boolean;\n cors: boolean;\n deferScript: boolean;\n file: boolean;\n fileSystem: boolean;\n fullscreen: boolean;\n fullscreenKeyboard: boolean;\n geolocation: boolean;\n historyAPI: boolean;\n littleEndian: boolean;\n localStorage: boolean;\n matchMedia: boolean;\n querySelector: boolean;\n querySelectorAll: boolean;\n serviceWorker: boolean;\n typedArray: boolean;\n userMedia: boolean;\n vibration: boolean;\n worker: boolean;\n\n /**\n * Creates an instance of Feature.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='feature']\n *\n * @memberOf Feature\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'feature') {\n super(ua, flags, cssFlagsPrefix);\n\n this.#createTestElements();\n\n this.addEventListener = this.getAddEventListener();\n this.asyncScript = this.getAsyncScript();\n this.battery = this.getBattery();\n this.cors = this.getCors();\n this.deferScript = this.getDeferScript();\n this.file = this.getFile();\n this.fileSystem = this.getFileSystem();\n this.fullscreen = this.getFullscreen();\n this.fullscreenKeyboard = this.getFullscreenKeyboard();\n this.geolocation = this.getGeolocation();\n this.historyAPI = this.getHistoryAPI();\n this.littleEndian = this.getLittleEndian();\n this.localStorage = this.getLocalStorage();\n this.matchMedia = this.getMatchMedia();\n this.querySelector = this.getQuerySelector();\n this.querySelectorAll = this.getQuerySelectorAll();\n this.serviceWorker = this.getServiceWorker();\n this.typedArray = this.getTypedArray();\n this.userMedia = this.getUserMedia();\n this.vibration = this.getVibration();\n this.worker = this.getWorker();\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} [prefixes=this.#cssPrefixes]\n * @returns {string}\n *\n * @memberOf Feature\n */\n #getCssPrefixedProp(prop, prefixes = this.#cssPrefixes) {\n prop = prop.toCamelCase();\n\n const prefixedProps = prefixes.map((item) => {\n return (item === 'spec' ? '' : '-' + item + '-') + prop;\n });\n\n // if ('CSS' in this.root && 'supports' in this.root.CSS) {\n // return this.root.CSS.supports(prefixedProps.map(item => '(' + item + ': inherit)').join(' or '));\n // }\n\n const prefixedPropsFound = prefixedProps.filter((item) => {\n return item in this.#div.style;\n });\n\n if (prefixedPropsFound.length > 0) {\n return prefixedPropsFound[0];\n }\n\n return null;\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} [prefixes=this.#cssPrefixes]\n * @returns {string}\n *\n * @memberOf Feature\n */\n _checkCssPrefixedProp(prop, prefixes = this.#cssPrefixes) {\n return !!this.#getCssPrefixedProp(prop, prefixes);\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} value\n * @returns {any}\n *\n * @memberOf Feature\n */\n _getCssPrefixedPropValue(prop, value) {\n const prefixedProp = this.#getCssPrefixedProp(prop);\n\n if (prefixedProp) {\n this.document.body.insertBefore(this.#div, null);\n\n this.#div.style[prefixedProp] = value;\n\n const computedStylePropValue = this.root.getComputedStyle(this.#div).getPropertyValue(prefixedProp);\n\n this.document.body.removeChild(this.#div);\n\n if (!!computedStylePropValue && typeof computedStylePropValue === 'string') {\n return computedStylePropValue;\n }\n\n return null;\n }\n\n return null;\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} value\n * @returns {any}\n *\n * @memberOf Feature\n */\n _checkCssPrefixedPropValue(prop, value) {\n const prefixedPropValue = this._getCssPrefixedPropValue(prop, value);\n\n return !!prefixedPropValue && prefixedPropValue !== 'none';\n }\n\n /**\n *\n *\n * @memberof Feature\n */\n #createTestElements() {\n this.#cssPrefixes = ['spec', 'webkit', 'moz', 'ms', 'o'];\n\n this.#script = this.document.createElement('script');\n this.#canvas = this.document.createElement('canvas');\n this.#div = this.document.createElement('div');\n this.#input = this.document.createElement('input');\n this.#img = this.document.createElement('img');\n this.#xmlHttpRequest = new this.root.XMLHttpRequest();\n }\n\n // /**\n // *\n // *\n // * @memberof Feature\n // */\n // _destroyTestElements() {\n // this.#cssPrefixes = null;\n\n // this._script = null;\n // this._canvas = null;\n // this._div = null;\n // this._input = null;\n // this._img = null;\n // this._xmlHttpRequest = null;\n\n // delete this.#cssPrefixes;\n\n // delete this._script;\n // delete this._canvas;\n // delete this._div;\n // delete this._input;\n // delete this._img;\n // delete this._xmlHttpRequest;\n // }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getAddEventListener() {\n return 'addEventListener' in this.root;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getAsyncScript() {\n return 'async' in this.#script;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getBattery() {\n return 'battery' in this.navigator;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getCors() {\n return 'XMLHttpRequest' in this.root && 'withCredentials' in this.#xmlHttpRequest;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getDeferScript() {\n return 'defer' in this.#script;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFile() {\n return Asserts.all(['File' in this.root, 'FileReader' in this.root, 'FileList' in this.root, 'Blob' in this.root]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFileSystem() {\n return 'requestFileSystem' in this.root;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFullscreen() {\n return Asserts.one([\n 'requestFullscreen' in this.#canvas,\n 'webkitRequestFullscreen' in this.#canvas,\n 'msRequestFullscreen' in this.#canvas,\n 'mozRequestFullScreen' in this.#canvas\n ]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFullscreenKeyboard() {\n return Asserts.all([() => 'Element' in this.root && 'ALLOW_KEYBOARD_INPUT' in this.root.Element], true);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getGeolocation() {\n return 'geolocation' in this.navigator;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getHistoryAPI() {\n return Asserts.all([() => 'history' in this.root && 'pushState' in this.root.history], true);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getLittleEndian() {\n return Asserts.all(\n [this.getTypedArray, () => new this.root.Int8Array(new this.root.Int16Array([1]).buffer)[0] > 0],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getLocalStorage() {\n return (\n Asserts.one([() => 'localStorage' in this.root], true) &&\n Asserts.one(\n [\n () => {\n const test = 'x';\n this.root.localStorage.setItem(test, test);\n this.root.localStorage.removeItem(test);\n\n return true;\n }\n ],\n true\n )\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getMatchMedia() {\n return 'matchMedia' in this.root;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getQuerySelector() {\n return 'querySelector' in this.document;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getQuerySelectorAll() {\n return 'querySelectorAll' in this.document;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getServiceWorker() {\n return 'serviceWorker' in this.navigator;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getTypedArray() {\n return Asserts.all([() => 'Int8Array' in this.root && typeof this.root.Int8Array !== 'undefined'], true);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getUserMedia() {\n return Asserts.one([\n 'getUserMedia' in this.navigator,\n 'webkitGetUserMedia' in this.navigator,\n 'mozGetUserMedia' in this.navigator,\n 'msGetUserMedia' in this.navigator\n ]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getVibration() {\n return Asserts.one([\n 'vibrate' in this.navigator,\n 'webkitVibrate' in this.navigator,\n 'mozVibrate' in this.navigator,\n 'msVibrate' in this.navigator\n ]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getWorker() {\n return 'Worker' in this.root;\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pointerEnabled() {\n return Asserts.one(['pointerEnabled' in this.navigator, 'msPointerEnabled' in this.navigator]);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pixelRatio() {\n return this.root.devicePixelRatio || 1;\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pointerLock() {\n return Asserts.one([\n 'pointerLockElement' in this.document,\n 'webkitPointerLockElement' in this.document,\n 'mozPointerLockElement' in this.document\n ]);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get quirksMode() {\n return this.document.compatMode !== 'CSS1Compat';\n }\n\n /**\n * Test if CSS 3D transforms are supported\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get css3D() {\n return Asserts.all(\n [\n this._checkCssPrefixedPropValue.bind(this, 'transform', 'translate3d(1px,1px,1px)'),\n this._checkCssPrefixedProp.bind(this, 'perspective')\n ],\n true\n );\n }\n\n // Test if CSS transforms are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get cssTransform() {\n return Asserts.one([this._checkCssPrefixedProp.bind(this, 'transform-origin')], true);\n }\n\n // Test if CSS transitions are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get cssTransition() {\n return Asserts.one([this._checkCssPrefixedProp.bind(this, 'transition')], true);\n }\n\n // Test if Device Motion is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get deviceMotion() {\n return 'DeviceMotionEvent' in this.root;\n }\n\n // Test if Device Orientation is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get deviceOrientation() {\n return 'DeviceOrientationEvent' in this.root;\n }\n\n // Test if Context Menu is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get contextMenu() {\n return Asserts.all(['contextMenu' in this.document, 'HTMLMenuItemElement' in this.root]);\n }\n\n // Test if classList API is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get classList() {\n return 'classList' in this.document;\n }\n\n // Test if placeholder attribute is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get placeholder() {\n return 'placeholder' in this.#input;\n }\n\n // Test if viewport units are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get viewportUnit() {\n return Asserts.all([() => (this.#img.style.width = '1vw') && this.#img.style.width !== ''], true);\n }\n\n // Test if REM units are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get remUnit() {\n return Asserts.all([() => (this.#img.style.width = '1rem') && this.#img.style.width !== ''], true);\n }\n\n // Test if Canvas is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get canvas() {\n return Asserts.all([() => 'getContext' in this.#canvas && !!this.#canvas.getContext('2d')], true);\n }\n\n // Test if SVG is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get svg() {\n return Asserts.all(\n [\n () =>\n 'createElementNS' in this.document &&\n 'createSVGRect' in this.document.createElementNS('http://www.w3.org/2000/svg', 'svg')\n ],\n true\n );\n }\n\n // Test if WebP is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get webp() {\n return Asserts.all(\n [\n () => {\n const elem = document.createElement('canvas');\n\n if (!!(elem.getContext && elem.getContext('2d'))) {\n // was able or not to get WebP representation\n return elem.toDataURL('image/webp').indexOf('data:image/webp') === 0;\n }\n\n return false;\n }\n ],\n true\n );\n }\n\n // Test if WebGL is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get webGL() {\n return Asserts.one(\n [\n () =>\n this.canvas &&\n 'WebGLRenderingContext' in this.root &&\n (this.#canvas.getContext('webgl') || this.#canvas.getContext('experimental-webgl')),\n () => this.canvas && 'WebGL2RenderingContext' in this.root && this.#canvas.getContext('webgl2')\n ],\n true\n );\n }\n\n // Test if WebVR is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get webVR() {\n return Asserts.all(['getVRDisplays' in this.navigator]);\n }\n\n // Tests if touch events are supported, but doesn't necessarily reflect a touchscreen device\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get touch() {\n return (\n Asserts.one([() => 'ontouchstart' in this.root, () => 'ontouchstart' in this.document.documentElement], true) &&\n Asserts.one(\n [\n () => 'DocumentTouch' in this.root,\n () => this.pointerEnabled && 'MSGesture' in this.root,\n () => 'maxTouchPoints' in this.navigator && this.navigator.maxTouchPoints > 1\n ],\n true\n )\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get forceTouch() {\n return Asserts.all(\n [\n () =>\n 'MouseEvent' in this.root &&\n 'WEBKIT_FORCE_AT_MOUSE_DOWN' in this.root.MouseEvent &&\n 'WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN' in this.root.MouseEvent\n ],\n true\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pointerEvents() {\n return Asserts.all([this.root.PointerEvent], true);\n }\n\n // Test if img srcset attribute is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get srcset() {\n return 'srcset' in this.#img;\n }\n\n // Test if img sizes attribute is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get sizes() {\n return 'sizes' in this.#img;\n }\n\n // Test if Picture element is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pictureElement() {\n return 'HTMLPictureElement' in this.root;\n }\n\n // Test if Picture element is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get dialogElement() {\n return 'HTMLDialogElement' in this.root;\n }\n}\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n\nexport * from './audioFeature';\nexport * from './videoFeature';\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class AudioFeature\n * @extends {CssFlagsClass}\n */\nexport class AudioFeature extends CssFlagsClass {\n #audioElement: HTMLAudioElement;\n\n context: boolean;\n\n formats: {\n mp3: boolean;\n webm: boolean;\n ogg: boolean;\n opus: boolean;\n wav: boolean;\n m4a: boolean;\n };\n\n /**\n * Creates an instance of AudioFeature.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='audio']\n *\n * @memberOf AudioFeature\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'audio') {\n super(ua, flags, cssFlagsPrefix);\n\n this.#createTestElements();\n\n this.context = this.getContext();\n\n this.formats = {\n mp3: this.getMp3(),\n webm: this.getWebm(),\n ogg: this.getOgg(),\n opus: this.getOpus(),\n wav: this.getWav(),\n m4a: this.getM4a()\n };\n }\n\n /**\n *\n *\n * @memberof AudioFeature\n */\n #createTestElements() {\n this.#audioElement = this.document.createElement('audio');\n }\n\n // /**\n // *\n // *\n // * @memberof AudioFeature\n // */\n // _destroyTestElements() {\n // this.#audioElement = null;\n\n // delete this.#audioElement;\n // }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf AudioFeature\n */\n get supported() {\n return Asserts.all(\n [\n 'Audio' in this.root,\n 'HTMLAudioElement' in this.root,\n 'HTMLMediaElement' in this.root,\n () =>\n !!this.#audioElement &&\n 'canPlayType' in this.#audioElement &&\n this.#audioElement instanceof HTMLAudioElement &&\n this.#audioElement instanceof HTMLMediaElement\n ],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getContext() {\n return Asserts.one(['AudioContext' in this.root, 'webkitAudioContext' in this.root]);\n }\n\n /**\n *__\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getMp3() {\n return Asserts.all(\n [() => this.supported && this.#audioElement.canPlayType('audio/mpeg;').replace(/^no$/, '') !== ''],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getWebm() {\n return Asserts.all(\n [\n () => this.supported && this.#audioElement.canPlayType('audio/webm; codecs=\"vorbis\"').replace(/^no$/, '') !== ''\n ],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getOgg() {\n return Asserts.all(\n [() => this.supported && this.#audioElement.canPlayType('audio/ogg; codecs=\"vorbis\"').replace(/^no$/, '') !== ''],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getOpus() {\n return Asserts.all(\n [() => this.supported && this.#audioElement.canPlayType('audio/ogg; codecs=\"opus\"').replace(/^no$/, '') !== ''],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getWav() {\n return Asserts.all(\n [() => this.supported && this.#audioElement.canPlayType('audio/wav; codecs=\"1\"').replace(/^no$/, '') !== ''],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getM4a() {\n return Asserts.all(\n [\n () =>\n this.supported &&\n (this.#audioElement.canPlayType('audio/x-m4a;').replace(/^no$/, '') ||\n this.#audioElement.canPlayType('audio/aac;').replace(/^no$/, '')) !== ''\n ],\n true\n );\n }\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class VideoFeature\n * @extends {CssFlagsClass}\n */\nexport class VideoFeature extends CssFlagsClass {\n #videoElement: HTMLVideoElement;\n\n formats: {\n mp4: boolean;\n ogv: boolean;\n webm: boolean;\n };\n\n /**\n * Creates an instance of VideoFeature.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='video']\n *\n * @memberOf VideoFeature\n */\n constructor(ua: string|null = null, flags = {}, cssFlagsPrefix = 'video') {\n super(ua, flags, cssFlagsPrefix);\n\n this._createTestElements();\n\n this.formats = {\n mp4: this.getMp4(),\n ogv: this.getOgv(),\n webm: this.getWebm()\n };\n }\n\n /**\n *\n *\n * @memberof VideoFeature\n */\n _createTestElements() {\n this.#videoElement = this.document.createElement('video');\n }\n\n // /**\n // *\n // *\n // * @memberof VideoFeature\n // */\n // _destroyTestElements() {\n // this._viewElement = null;\n\n // delete this._videoElement;\n // }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf VideoFeature\n */\n get supported() {\n return Asserts.all(\n [\n 'HTMLVideoElement' in this.root,\n 'HTMLMediaElement' in this.root,\n () =>\n !!this.#videoElement &&\n 'canPlayType' in this.#videoElement &&\n this.#videoElement instanceof HTMLVideoElement &&\n this.#videoElement instanceof HTMLMediaElement\n ],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf VideoFeature\n */\n getMp4() {\n return Asserts.all(\n [\n () =>\n this.supported &&\n this.#videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E, mp4a.40.2\"').replace(/^no$/, '') !== ''\n ],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf VideoFeature\n */\n getOgv() {\n return Asserts.all(\n [\n () =>\n this.supported &&\n this.#videoElement.canPlayType('video/ogg; codecs=\"theora, vorbis\"').replace(/^no$/, '') !== ''\n ],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf VideoFeature\n */\n getWebm() {\n return Asserts.all(\n [\n () =>\n this.supported &&\n this.#videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(/^no$/, '') !== ''\n ],\n true\n );\n }\n}\n"],"names":[],"version":3,"file":"feature.js.map"} \ No newline at end of file diff --git a/packages/feature/dist/feature.mjs b/packages/feature/dist/feature.mjs new file mode 100644 index 0000000..3b4bf1a --- /dev/null +++ b/packages/feature/dist/feature.mjs @@ -0,0 +1,910 @@ +import {Asserts as $8UoK4$Asserts, CssFlagsClass as $8UoK4$CssFlagsClass} from "@detector-js/core"; + +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} + +var $ccc43333c299fe3b$exports = {}; + +$parcel$export($ccc43333c299fe3b$exports, "AudioFeature", () => $ccc43333c299fe3b$export$ae7d97a50b8bcedb); + +class $ccc43333c299fe3b$export$ae7d97a50b8bcedb extends (0, $8UoK4$CssFlagsClass) { + #audioElement; + /** + * Creates an instance of AudioFeature. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='audio'] + * + * @memberOf AudioFeature + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "audio"){ + super(ua, flags, cssFlagsPrefix); + this.#createTestElements(); + this.context = this.getContext(); + this.formats = { + mp3: this.getMp3(), + webm: this.getWebm(), + ogg: this.getOgg(), + opus: this.getOpus(), + wav: this.getWav(), + m4a: this.getM4a() + }; + } + /** + * + * + * @memberof AudioFeature + */ #createTestElements() { + this.#audioElement = this.document.createElement("audio"); + } + // /** + // * + // * + // * @memberof AudioFeature + // */ + // _destroyTestElements() { + // this.#audioElement = null; + // delete this.#audioElement; + // } + /** + * + * + * @readonly + * + * @memberOf AudioFeature + */ get supported() { + return (0, $8UoK4$Asserts).all([ + "Audio" in this.root, + "HTMLAudioElement" in this.root, + "HTMLMediaElement" in this.root, + ()=>!!this.#audioElement && "canPlayType" in this.#audioElement && this.#audioElement instanceof HTMLAudioElement && this.#audioElement instanceof HTMLMediaElement + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getContext() { + return (0, $8UoK4$Asserts).one([ + "AudioContext" in this.root, + "webkitAudioContext" in this.root + ]); + } + /** + *__ + * + * @returns boolean + * + * @memberOf AudioFeature + */ getMp3() { + return (0, $8UoK4$Asserts).all([ + ()=>this.supported && this.#audioElement.canPlayType("audio/mpeg;").replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getWebm() { + return (0, $8UoK4$Asserts).all([ + ()=>this.supported && this.#audioElement.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getOgg() { + return (0, $8UoK4$Asserts).all([ + ()=>this.supported && this.#audioElement.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getOpus() { + return (0, $8UoK4$Asserts).all([ + ()=>this.supported && this.#audioElement.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getWav() { + return (0, $8UoK4$Asserts).all([ + ()=>this.supported && this.#audioElement.canPlayType('audio/wav; codecs="1"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ getM4a() { + return (0, $8UoK4$Asserts).all([ + ()=>this.supported && (this.#audioElement.canPlayType("audio/x-m4a;").replace(/^no$/, "") || this.#audioElement.canPlayType("audio/aac;").replace(/^no$/, "")) !== "" + ], true); + } +} + + +var $fc06d02525f7f7d3$exports = {}; + +$parcel$export($fc06d02525f7f7d3$exports, "VideoFeature", () => $fc06d02525f7f7d3$export$4d7d44add0424e8a); + +class $fc06d02525f7f7d3$export$4d7d44add0424e8a extends (0, $8UoK4$CssFlagsClass) { + #videoElement; + /** + * Creates an instance of VideoFeature. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='video'] + * + * @memberOf VideoFeature + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "video"){ + super(ua, flags, cssFlagsPrefix); + this._createTestElements(); + this.formats = { + mp4: this.getMp4(), + ogv: this.getOgv(), + webm: this.getWebm() + }; + } + /** + * + * + * @memberof VideoFeature + */ _createTestElements() { + this.#videoElement = this.document.createElement("video"); + } + // /** + // * + // * + // * @memberof VideoFeature + // */ + // _destroyTestElements() { + // this._viewElement = null; + // delete this._videoElement; + // } + /** + * + * + * @readonly + * + * @memberOf VideoFeature + */ get supported() { + return (0, $8UoK4$Asserts).all([ + "HTMLVideoElement" in this.root, + "HTMLMediaElement" in this.root, + ()=>!!this.#videoElement && "canPlayType" in this.#videoElement && this.#videoElement instanceof HTMLVideoElement && this.#videoElement instanceof HTMLMediaElement + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf VideoFeature + */ getMp4() { + return (0, $8UoK4$Asserts).all([ + ()=>this.supported && this.#videoElement.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf VideoFeature + */ getOgv() { + return (0, $8UoK4$Asserts).all([ + ()=>this.supported && this.#videoElement.canPlayType('video/ogg; codecs="theora, vorbis"').replace(/^no$/, "") !== "" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf VideoFeature + */ getWebm() { + return (0, $8UoK4$Asserts).all([ + ()=>this.supported && this.#videoElement.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, "") !== "" + ], true); + } +} + + +class $11243eacb42ad96e$export$6e91cf7616333d5 extends (0, $8UoK4$CssFlagsClass) { + #cssPrefixes; + #script; + #canvas; + #div; + #input; + #img; + #xmlHttpRequest; + /** + * Creates an instance of Feature. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='feature'] + * + * @memberOf Feature + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "feature"){ + super(ua, flags, cssFlagsPrefix); + this.#createTestElements(); + this.addEventListener = this.getAddEventListener(); + this.asyncScript = this.getAsyncScript(); + this.battery = this.getBattery(); + this.cors = this.getCors(); + this.deferScript = this.getDeferScript(); + this.file = this.getFile(); + this.fileSystem = this.getFileSystem(); + this.fullscreen = this.getFullscreen(); + this.fullscreenKeyboard = this.getFullscreenKeyboard(); + this.geolocation = this.getGeolocation(); + this.historyAPI = this.getHistoryAPI(); + this.littleEndian = this.getLittleEndian(); + this.localStorage = this.getLocalStorage(); + this.matchMedia = this.getMatchMedia(); + this.querySelector = this.getQuerySelector(); + this.querySelectorAll = this.getQuerySelectorAll(); + this.serviceWorker = this.getServiceWorker(); + this.typedArray = this.getTypedArray(); + this.userMedia = this.getUserMedia(); + this.vibration = this.getVibration(); + this.worker = this.getWorker(); + } + /** + * + * + * @param {any} prop + * @param {any} [prefixes=this.#cssPrefixes] + * @returns {string} + * + * @memberOf Feature + */ #getCssPrefixedProp(prop, prefixes = this.#cssPrefixes) { + prop = prop.toCamelCase(); + const prefixedProps = prefixes.map((item)=>{ + return (item === "spec" ? "" : "-" + item + "-") + prop; + }); + // if ('CSS' in this.root && 'supports' in this.root.CSS) { + // return this.root.CSS.supports(prefixedProps.map(item => '(' + item + ': inherit)').join(' or ')); + // } + const prefixedPropsFound = prefixedProps.filter((item)=>{ + return item in this.#div.style; + }); + if (prefixedPropsFound.length > 0) return prefixedPropsFound[0]; + return null; + } + /** + * + * + * @param {any} prop + * @param {any} [prefixes=this.#cssPrefixes] + * @returns {string} + * + * @memberOf Feature + */ _checkCssPrefixedProp(prop, prefixes = this.#cssPrefixes) { + return !!this.#getCssPrefixedProp(prop, prefixes); + } + /** + * + * + * @param {any} prop + * @param {any} value + * @returns {any} + * + * @memberOf Feature + */ _getCssPrefixedPropValue(prop, value) { + const prefixedProp = this.#getCssPrefixedProp(prop); + if (prefixedProp) { + this.document.body.insertBefore(this.#div, null); + this.#div.style[prefixedProp] = value; + const computedStylePropValue = this.root.getComputedStyle(this.#div).getPropertyValue(prefixedProp); + this.document.body.removeChild(this.#div); + if (!!computedStylePropValue && typeof computedStylePropValue === "string") return computedStylePropValue; + return null; + } + return null; + } + /** + * + * + * @param {any} prop + * @param {any} value + * @returns {any} + * + * @memberOf Feature + */ _checkCssPrefixedPropValue(prop, value) { + const prefixedPropValue = this._getCssPrefixedPropValue(prop, value); + return !!prefixedPropValue && prefixedPropValue !== "none"; + } + /** + * + * + * @memberof Feature + */ #createTestElements() { + this.#cssPrefixes = [ + "spec", + "webkit", + "moz", + "ms", + "o" + ]; + this.#script = this.document.createElement("script"); + this.#canvas = this.document.createElement("canvas"); + this.#div = this.document.createElement("div"); + this.#input = this.document.createElement("input"); + this.#img = this.document.createElement("img"); + this.#xmlHttpRequest = new this.root.XMLHttpRequest(); + } + // /** + // * + // * + // * @memberof Feature + // */ + // _destroyTestElements() { + // this.#cssPrefixes = null; + // this._script = null; + // this._canvas = null; + // this._div = null; + // this._input = null; + // this._img = null; + // this._xmlHttpRequest = null; + // delete this.#cssPrefixes; + // delete this._script; + // delete this._canvas; + // delete this._div; + // delete this._input; + // delete this._img; + // delete this._xmlHttpRequest; + // } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getAddEventListener() { + return "addEventListener" in this.root; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getAsyncScript() { + return "async" in this.#script; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getBattery() { + return "battery" in this.navigator; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getCors() { + return "XMLHttpRequest" in this.root && "withCredentials" in this.#xmlHttpRequest; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getDeferScript() { + return "defer" in this.#script; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getFile() { + return (0, $8UoK4$Asserts).all([ + "File" in this.root, + "FileReader" in this.root, + "FileList" in this.root, + "Blob" in this.root + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getFileSystem() { + return "requestFileSystem" in this.root; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getFullscreen() { + return (0, $8UoK4$Asserts).one([ + "requestFullscreen" in this.#canvas, + "webkitRequestFullscreen" in this.#canvas, + "msRequestFullscreen" in this.#canvas, + "mozRequestFullScreen" in this.#canvas + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getFullscreenKeyboard() { + return (0, $8UoK4$Asserts).all([ + ()=>"Element" in this.root && "ALLOW_KEYBOARD_INPUT" in this.root.Element + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getGeolocation() { + return "geolocation" in this.navigator; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getHistoryAPI() { + return (0, $8UoK4$Asserts).all([ + ()=>"history" in this.root && "pushState" in this.root.history + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getLittleEndian() { + return (0, $8UoK4$Asserts).all([ + this.getTypedArray, + ()=>new this.root.Int8Array(new this.root.Int16Array([ + 1 + ]).buffer)[0] > 0 + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getLocalStorage() { + return (0, $8UoK4$Asserts).one([ + ()=>"localStorage" in this.root + ], true) && (0, $8UoK4$Asserts).one([ + ()=>{ + const test = "x"; + this.root.localStorage.setItem(test, test); + this.root.localStorage.removeItem(test); + return true; + } + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getMatchMedia() { + return "matchMedia" in this.root; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getQuerySelector() { + return "querySelector" in this.document; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getQuerySelectorAll() { + return "querySelectorAll" in this.document; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getServiceWorker() { + return "serviceWorker" in this.navigator; + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getTypedArray() { + return (0, $8UoK4$Asserts).all([ + ()=>"Int8Array" in this.root && typeof this.root.Int8Array !== "undefined" + ], true); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getUserMedia() { + return (0, $8UoK4$Asserts).one([ + "getUserMedia" in this.navigator, + "webkitGetUserMedia" in this.navigator, + "mozGetUserMedia" in this.navigator, + "msGetUserMedia" in this.navigator + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getVibration() { + return (0, $8UoK4$Asserts).one([ + "vibrate" in this.navigator, + "webkitVibrate" in this.navigator, + "mozVibrate" in this.navigator, + "msVibrate" in this.navigator + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ getWorker() { + return "Worker" in this.root; + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get pointerEnabled() { + return (0, $8UoK4$Asserts).one([ + "pointerEnabled" in this.navigator, + "msPointerEnabled" in this.navigator + ]); + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get pixelRatio() { + return this.root.devicePixelRatio || 1; + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get pointerLock() { + return (0, $8UoK4$Asserts).one([ + "pointerLockElement" in this.document, + "webkitPointerLockElement" in this.document, + "mozPointerLockElement" in this.document + ]); + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get quirksMode() { + return this.document.compatMode !== "CSS1Compat"; + } + /** + * Test if CSS 3D transforms are supported + * + * @readonly + * + * @memberOf Feature + */ get css3D() { + return (0, $8UoK4$Asserts).all([ + this._checkCssPrefixedPropValue.bind(this, "transform", "translate3d(1px,1px,1px)"), + this._checkCssPrefixedProp.bind(this, "perspective") + ], true); + } + // Test if CSS transforms are supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get cssTransform() { + return (0, $8UoK4$Asserts).one([ + this._checkCssPrefixedProp.bind(this, "transform-origin") + ], true); + } + // Test if CSS transitions are supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get cssTransition() { + return (0, $8UoK4$Asserts).one([ + this._checkCssPrefixedProp.bind(this, "transition") + ], true); + } + // Test if Device Motion is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get deviceMotion() { + return "DeviceMotionEvent" in this.root; + } + // Test if Device Orientation is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get deviceOrientation() { + return "DeviceOrientationEvent" in this.root; + } + // Test if Context Menu is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get contextMenu() { + return (0, $8UoK4$Asserts).all([ + "contextMenu" in this.document, + "HTMLMenuItemElement" in this.root + ]); + } + // Test if classList API is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get classList() { + return "classList" in this.document; + } + // Test if placeholder attribute is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get placeholder() { + return "placeholder" in this.#input; + } + // Test if viewport units are supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get viewportUnit() { + return (0, $8UoK4$Asserts).all([ + ()=>(this.#img.style.width = "1vw", this.#img.style.width !== "") + ], true); + } + // Test if REM units are supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get remUnit() { + return (0, $8UoK4$Asserts).all([ + ()=>(this.#img.style.width = "1rem", this.#img.style.width !== "") + ], true); + } + // Test if Canvas is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get canvas() { + return (0, $8UoK4$Asserts).all([ + ()=>"getContext" in this.#canvas && !!this.#canvas.getContext("2d") + ], true); + } + // Test if SVG is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get svg() { + return (0, $8UoK4$Asserts).all([ + ()=>"createElementNS" in this.document && "createSVGRect" in this.document.createElementNS("http://www.w3.org/2000/svg", "svg") + ], true); + } + // Test if WebP is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get webp() { + return (0, $8UoK4$Asserts).all([ + ()=>{ + const elem = document.createElement("canvas"); + if (!!(elem.getContext && elem.getContext("2d"))) // was able or not to get WebP representation + return elem.toDataURL("image/webp").indexOf("data:image/webp") === 0; + return false; + } + ], true); + } + // Test if WebGL is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get webGL() { + return (0, $8UoK4$Asserts).one([ + ()=>this.canvas && "WebGLRenderingContext" in this.root && (this.#canvas.getContext("webgl") || this.#canvas.getContext("experimental-webgl")), + ()=>this.canvas && "WebGL2RenderingContext" in this.root && this.#canvas.getContext("webgl2") + ], true); + } + // Test if WebVR is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get webVR() { + return (0, $8UoK4$Asserts).all([ + "getVRDisplays" in this.navigator + ]); + } + // Tests if touch events are supported, but doesn't necessarily reflect a touchscreen device + /** + * + * + * @readonly + * + * @memberOf Feature + */ get touch() { + return (0, $8UoK4$Asserts).one([ + ()=>"ontouchstart" in this.root, + ()=>"ontouchstart" in this.document.documentElement + ], true) && (0, $8UoK4$Asserts).one([ + ()=>"DocumentTouch" in this.root, + ()=>this.pointerEnabled && "MSGesture" in this.root, + ()=>"maxTouchPoints" in this.navigator && this.navigator.maxTouchPoints > 1 + ], true); + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get forceTouch() { + return (0, $8UoK4$Asserts).all([ + ()=>"MouseEvent" in this.root && "WEBKIT_FORCE_AT_MOUSE_DOWN" in this.root.MouseEvent && "WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN" in this.root.MouseEvent + ], true); + } + /** + * + * + * @readonly + * + * @memberOf Feature + */ get pointerEvents() { + return (0, $8UoK4$Asserts).all([ + this.root.PointerEvent + ], true); + } + // Test if img srcset attribute is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get srcset() { + return "srcset" in this.#img; + } + // Test if img sizes attribute is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get sizes() { + return "sizes" in this.#img; + } + // Test if Picture element is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get pictureElement() { + return "HTMLPictureElement" in this.root; + } + // Test if Picture element is supported + /** + * + * + * @readonly + * + * @memberOf Feature + */ get dialogElement() { + return "HTMLDialogElement" in this.root; + } +} + + +export {$11243eacb42ad96e$export$6e91cf7616333d5 as Feature, $ccc43333c299fe3b$export$ae7d97a50b8bcedb as AudioFeature, $fc06d02525f7f7d3$export$4d7d44add0424e8a as VideoFeature}; +//# sourceMappingURL=feature.mjs.map diff --git a/packages/feature/dist/feature.mjs.map b/packages/feature/dist/feature.mjs.map new file mode 100644 index 0000000..d57fb73 --- /dev/null +++ b/packages/feature/dist/feature.mjs.map @@ -0,0 +1 @@ +{"mappings":";;;;;AAAA;;;;ACAA;AASO,MAAM,kDAAqB,CAAA,GAAA,oBAAa,AAAD;IAC5C,CAAC,YAAY,CAAmB;IAahC;;;;;;;GAOC,GACD,YAAY,KAAoB,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,iBAAiB,OAAO,CAAE;QAC1E,KAAK,CAAC,IAAI,OAAO;QAEjB,IAAI,CAAC,CAAC,kBAAkB;QAExB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU;QAE9B,IAAI,CAAC,OAAO,GAAG;YACb,KAAK,IAAI,CAAC,MAAM;YAChB,MAAM,IAAI,CAAC,OAAO;YAClB,KAAK,IAAI,CAAC,MAAM;YAChB,MAAM,IAAI,CAAC,OAAO;YAClB,KAAK,IAAI,CAAC,MAAM;YAChB,KAAK,IAAI,CAAC,MAAM;QAClB;IACF;IAEA;;;;GAIC,GACD,CAAC,kBAAkB,GAAG;QACpB,IAAI,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;IACnD;IAEA,MAAM;IACN,KAAK;IACL,KAAK;IACL,4BAA4B;IAC5B,MAAM;IACN,2BAA2B;IAC3B,+BAA+B;IAE/B,+BAA+B;IAC/B,IAAI;IAEJ;;;;;;GAMC,GACD,IAAI,YAAY;QACd,OAAO,CAAA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;GAMC,GACD,IAAI,QAAQ;QACV,OAAO,WAAW,IAAI,CAAC,CAAC,GAAG;IAC7B;IAEA,uCAAuC;IACvC;;;;;;GAMC,GACD,IAAI,iBAAiB;QACnB,OAAO,wBAAwB,IAAI,CAAC,IAAI;IAC1C;IAEA,uCAAuC;IACvC;;;;;;GAMC,GACD,IAAI,gBAAgB;QAClB,OAAO,uBAAuB,IAAI,CAAC,IAAI;IACzC;AACF","sources":["packages/feature/lib/feature.ts","packages/feature/lib/audioFeature.ts","packages/feature/lib/videoFeature.ts"],"sourcesContent":["import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class Feature\n * @extends {CssFlagsClass}\n */\nexport class Feature extends CssFlagsClass {\n #cssPrefixes: string[];\n #script: HTMLScriptElement;\n #canvas: HTMLCanvasElement;\n #div: HTMLDivElement;\n #input: HTMLInputElement;\n #img: HTMLImageElement;\n #xmlHttpRequest: XMLHttpRequest;\n\n addEventListener: boolean;\n asyncScript: boolean;\n battery: boolean;\n cors: boolean;\n deferScript: boolean;\n file: boolean;\n fileSystem: boolean;\n fullscreen: boolean;\n fullscreenKeyboard: boolean;\n geolocation: boolean;\n historyAPI: boolean;\n littleEndian: boolean;\n localStorage: boolean;\n matchMedia: boolean;\n querySelector: boolean;\n querySelectorAll: boolean;\n serviceWorker: boolean;\n typedArray: boolean;\n userMedia: boolean;\n vibration: boolean;\n worker: boolean;\n\n /**\n * Creates an instance of Feature.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='feature']\n *\n * @memberOf Feature\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'feature') {\n super(ua, flags, cssFlagsPrefix);\n\n this.#createTestElements();\n\n this.addEventListener = this.getAddEventListener();\n this.asyncScript = this.getAsyncScript();\n this.battery = this.getBattery();\n this.cors = this.getCors();\n this.deferScript = this.getDeferScript();\n this.file = this.getFile();\n this.fileSystem = this.getFileSystem();\n this.fullscreen = this.getFullscreen();\n this.fullscreenKeyboard = this.getFullscreenKeyboard();\n this.geolocation = this.getGeolocation();\n this.historyAPI = this.getHistoryAPI();\n this.littleEndian = this.getLittleEndian();\n this.localStorage = this.getLocalStorage();\n this.matchMedia = this.getMatchMedia();\n this.querySelector = this.getQuerySelector();\n this.querySelectorAll = this.getQuerySelectorAll();\n this.serviceWorker = this.getServiceWorker();\n this.typedArray = this.getTypedArray();\n this.userMedia = this.getUserMedia();\n this.vibration = this.getVibration();\n this.worker = this.getWorker();\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} [prefixes=this.#cssPrefixes]\n * @returns {string}\n *\n * @memberOf Feature\n */\n #getCssPrefixedProp(prop, prefixes = this.#cssPrefixes) {\n prop = prop.toCamelCase();\n\n const prefixedProps = prefixes.map((item) => {\n return (item === 'spec' ? '' : '-' + item + '-') + prop;\n });\n\n // if ('CSS' in this.root && 'supports' in this.root.CSS) {\n // return this.root.CSS.supports(prefixedProps.map(item => '(' + item + ': inherit)').join(' or '));\n // }\n\n const prefixedPropsFound = prefixedProps.filter((item) => {\n return item in this.#div.style;\n });\n\n if (prefixedPropsFound.length > 0) {\n return prefixedPropsFound[0];\n }\n\n return null;\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} [prefixes=this.#cssPrefixes]\n * @returns {string}\n *\n * @memberOf Feature\n */\n _checkCssPrefixedProp(prop, prefixes = this.#cssPrefixes) {\n return !!this.#getCssPrefixedProp(prop, prefixes);\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} value\n * @returns {any}\n *\n * @memberOf Feature\n */\n _getCssPrefixedPropValue(prop, value) {\n const prefixedProp = this.#getCssPrefixedProp(prop);\n\n if (prefixedProp) {\n this.document.body.insertBefore(this.#div, null);\n\n this.#div.style[prefixedProp] = value;\n\n const computedStylePropValue = this.root.getComputedStyle(this.#div).getPropertyValue(prefixedProp);\n\n this.document.body.removeChild(this.#div);\n\n if (!!computedStylePropValue && typeof computedStylePropValue === 'string') {\n return computedStylePropValue;\n }\n\n return null;\n }\n\n return null;\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} value\n * @returns {any}\n *\n * @memberOf Feature\n */\n _checkCssPrefixedPropValue(prop, value) {\n const prefixedPropValue = this._getCssPrefixedPropValue(prop, value);\n\n return !!prefixedPropValue && prefixedPropValue !== 'none';\n }\n\n /**\n *\n *\n * @memberof Feature\n */\n #createTestElements() {\n this.#cssPrefixes = ['spec', 'webkit', 'moz', 'ms', 'o'];\n\n this.#script = this.document.createElement('script');\n this.#canvas = this.document.createElement('canvas');\n this.#div = this.document.createElement('div');\n this.#input = this.document.createElement('input');\n this.#img = this.document.createElement('img');\n this.#xmlHttpRequest = new this.root.XMLHttpRequest();\n }\n\n // /**\n // *\n // *\n // * @memberof Feature\n // */\n // _destroyTestElements() {\n // this.#cssPrefixes = null;\n\n // this._script = null;\n // this._canvas = null;\n // this._div = null;\n // this._input = null;\n // this._img = null;\n // this._xmlHttpRequest = null;\n\n // delete this.#cssPrefixes;\n\n // delete this._script;\n // delete this._canvas;\n // delete this._div;\n // delete this._input;\n // delete this._img;\n // delete this._xmlHttpRequest;\n // }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getAddEventListener() {\n return 'addEventListener' in this.root;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getAsyncScript() {\n return 'async' in this.#script;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getBattery() {\n return 'battery' in this.navigator;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getCors() {\n return 'XMLHttpRequest' in this.root && 'withCredentials' in this.#xmlHttpRequest;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getDeferScript() {\n return 'defer' in this.#script;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFile() {\n return Asserts.all(['File' in this.root, 'FileReader' in this.root, 'FileList' in this.root, 'Blob' in this.root]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFileSystem() {\n return 'requestFileSystem' in this.root;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFullscreen() {\n return Asserts.one([\n 'requestFullscreen' in this.#canvas,\n 'webkitRequestFullscreen' in this.#canvas,\n 'msRequestFullscreen' in this.#canvas,\n 'mozRequestFullScreen' in this.#canvas\n ]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFullscreenKeyboard() {\n return Asserts.all([() => 'Element' in this.root && 'ALLOW_KEYBOARD_INPUT' in this.root.Element], true);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getGeolocation() {\n return 'geolocation' in this.navigator;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getHistoryAPI() {\n return Asserts.all([() => 'history' in this.root && 'pushState' in this.root.history], true);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getLittleEndian() {\n return Asserts.all(\n [this.getTypedArray, () => new this.root.Int8Array(new this.root.Int16Array([1]).buffer)[0] > 0],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getLocalStorage() {\n return (\n Asserts.one([() => 'localStorage' in this.root], true) &&\n Asserts.one(\n [\n () => {\n const test = 'x';\n this.root.localStorage.setItem(test, test);\n this.root.localStorage.removeItem(test);\n\n return true;\n }\n ],\n true\n )\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getMatchMedia() {\n return 'matchMedia' in this.root;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getQuerySelector() {\n return 'querySelector' in this.document;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getQuerySelectorAll() {\n return 'querySelectorAll' in this.document;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getServiceWorker() {\n return 'serviceWorker' in this.navigator;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getTypedArray() {\n return Asserts.all([() => 'Int8Array' in this.root && typeof this.root.Int8Array !== 'undefined'], true);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getUserMedia() {\n return Asserts.one([\n 'getUserMedia' in this.navigator,\n 'webkitGetUserMedia' in this.navigator,\n 'mozGetUserMedia' in this.navigator,\n 'msGetUserMedia' in this.navigator\n ]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getVibration() {\n return Asserts.one([\n 'vibrate' in this.navigator,\n 'webkitVibrate' in this.navigator,\n 'mozVibrate' in this.navigator,\n 'msVibrate' in this.navigator\n ]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getWorker() {\n return 'Worker' in this.root;\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pointerEnabled() {\n return Asserts.one(['pointerEnabled' in this.navigator, 'msPointerEnabled' in this.navigator]);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pixelRatio() {\n return this.root.devicePixelRatio || 1;\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pointerLock() {\n return Asserts.one([\n 'pointerLockElement' in this.document,\n 'webkitPointerLockElement' in this.document,\n 'mozPointerLockElement' in this.document\n ]);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get quirksMode() {\n return this.document.compatMode !== 'CSS1Compat';\n }\n\n /**\n * Test if CSS 3D transforms are supported\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get css3D() {\n return Asserts.all(\n [\n this._checkCssPrefixedPropValue.bind(this, 'transform', 'translate3d(1px,1px,1px)'),\n this._checkCssPrefixedProp.bind(this, 'perspective')\n ],\n true\n );\n }\n\n // Test if CSS transforms are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get cssTransform() {\n return Asserts.one([this._checkCssPrefixedProp.bind(this, 'transform-origin')], true);\n }\n\n // Test if CSS transitions are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get cssTransition() {\n return Asserts.one([this._checkCssPrefixedProp.bind(this, 'transition')], true);\n }\n\n // Test if Device Motion is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get deviceMotion() {\n return 'DeviceMotionEvent' in this.root;\n }\n\n // Test if Device Orientation is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get deviceOrientation() {\n return 'DeviceOrientationEvent' in this.root;\n }\n\n // Test if Context Menu is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get contextMenu() {\n return Asserts.all(['contextMenu' in this.document, 'HTMLMenuItemElement' in this.root]);\n }\n\n // Test if classList API is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get classList() {\n return 'classList' in this.document;\n }\n\n // Test if placeholder attribute is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get placeholder() {\n return 'placeholder' in this.#input;\n }\n\n // Test if viewport units are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get viewportUnit() {\n return Asserts.all([() => (this.#img.style.width = '1vw') && this.#img.style.width !== ''], true);\n }\n\n // Test if REM units are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get remUnit() {\n return Asserts.all([() => (this.#img.style.width = '1rem') && this.#img.style.width !== ''], true);\n }\n\n // Test if Canvas is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get canvas() {\n return Asserts.all([() => 'getContext' in this.#canvas && !!this.#canvas.getContext('2d')], true);\n }\n\n // Test if SVG is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get svg() {\n return Asserts.all(\n [\n () =>\n 'createElementNS' in this.document &&\n 'createSVGRect' in this.document.createElementNS('http://www.w3.org/2000/svg', 'svg')\n ],\n true\n );\n }\n\n // Test if WebP is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get webp() {\n return Asserts.all(\n [\n () => {\n const elem = document.createElement('canvas');\n\n if (!!(elem.getContext && elem.getContext('2d'))) {\n // was able or not to get WebP representation\n return elem.toDataURL('image/webp').indexOf('data:image/webp') === 0;\n }\n\n return false;\n }\n ],\n true\n );\n }\n\n // Test if WebGL is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get webGL() {\n return Asserts.one(\n [\n () =>\n this.canvas &&\n 'WebGLRenderingContext' in this.root &&\n (this.#canvas.getContext('webgl') || this.#canvas.getContext('experimental-webgl')),\n () => this.canvas && 'WebGL2RenderingContext' in this.root && this.#canvas.getContext('webgl2')\n ],\n true\n );\n }\n\n // Test if WebVR is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get webVR() {\n return Asserts.all(['getVRDisplays' in this.navigator]);\n }\n\n // Tests if touch events are supported, but doesn't necessarily reflect a touchscreen device\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get touch() {\n return (\n Asserts.one([() => 'ontouchstart' in this.root, () => 'ontouchstart' in this.document.documentElement], true) &&\n Asserts.one(\n [\n () => 'DocumentTouch' in this.root,\n () => this.pointerEnabled && 'MSGesture' in this.root,\n () => 'maxTouchPoints' in this.navigator && this.navigator.maxTouchPoints > 1\n ],\n true\n )\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get forceTouch() {\n return Asserts.all(\n [\n () =>\n 'MouseEvent' in this.root &&\n 'WEBKIT_FORCE_AT_MOUSE_DOWN' in this.root.MouseEvent &&\n 'WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN' in this.root.MouseEvent\n ],\n true\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pointerEvents() {\n return Asserts.all([this.root.PointerEvent], true);\n }\n\n // Test if img srcset attribute is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get srcset() {\n return 'srcset' in this.#img;\n }\n\n // Test if img sizes attribute is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get sizes() {\n return 'sizes' in this.#img;\n }\n\n // Test if Picture element is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pictureElement() {\n return 'HTMLPictureElement' in this.root;\n }\n\n // Test if Picture element is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get dialogElement() {\n return 'HTMLDialogElement' in this.root;\n }\n}\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n\nexport * from './audioFeature';\nexport * from './videoFeature';\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class AudioFeature\n * @extends {CssFlagsClass}\n */\nexport class AudioFeature extends CssFlagsClass {\n #audioElement: HTMLAudioElement;\n\n context: boolean;\n\n formats: {\n mp3: boolean;\n webm: boolean;\n ogg: boolean;\n opus: boolean;\n wav: boolean;\n m4a: boolean;\n };\n\n /**\n * Creates an instance of AudioFeature.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='audio']\n *\n * @memberOf AudioFeature\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'audio') {\n super(ua, flags, cssFlagsPrefix);\n\n this.#createTestElements();\n\n this.context = this.getContext();\n\n this.formats = {\n mp3: this.getMp3(),\n webm: this.getWebm(),\n ogg: this.getOgg(),\n opus: this.getOpus(),\n wav: this.getWav(),\n m4a: this.getM4a()\n };\n }\n\n /**\n *\n *\n * @memberof AudioFeature\n */\n #createTestElements() {\n this.#audioElement = this.document.createElement('audio');\n }\n\n // /**\n // *\n // *\n // * @memberof AudioFeature\n // */\n // _destroyTestElements() {\n // this.#audioElement = null;\n\n // delete this.#audioElement;\n // }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf AudioFeature\n */\n get supported() {\n return Asserts.all(\n [\n 'Audio' in this.root,\n 'HTMLAudioElement' in this.root,\n 'HTMLMediaElement' in this.root,\n () =>\n !!this.#audioElement &&\n 'canPlayType' in this.#audioElement &&\n this.#audioElement instanceof HTMLAudioElement &&\n this.#audioElement instanceof HTMLMediaElement\n ],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getContext() {\n return Asserts.one(['AudioContext' in this.root, 'webkitAudioContext' in this.root]);\n }\n\n /**\n *__\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getMp3() {\n return Asserts.all(\n [() => this.supported && this.#audioElement.canPlayType('audio/mpeg;').replace(/^no$/, '') !== ''],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getWebm() {\n return Asserts.all(\n [\n () => this.supported && this.#audioElement.canPlayType('audio/webm; codecs=\"vorbis\"').replace(/^no$/, '') !== ''\n ],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getOgg() {\n return Asserts.all(\n [() => this.supported && this.#audioElement.canPlayType('audio/ogg; codecs=\"vorbis\"').replace(/^no$/, '') !== ''],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getOpus() {\n return Asserts.all(\n [() => this.supported && this.#audioElement.canPlayType('audio/ogg; codecs=\"opus\"').replace(/^no$/, '') !== ''],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getWav() {\n return Asserts.all(\n [() => this.supported && this.#audioElement.canPlayType('audio/wav; codecs=\"1\"').replace(/^no$/, '') !== ''],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf AudioFeature\n */\n getM4a() {\n return Asserts.all(\n [\n () =>\n this.supported &&\n (this.#audioElement.canPlayType('audio/x-m4a;').replace(/^no$/, '') ||\n this.#audioElement.canPlayType('audio/aac;').replace(/^no$/, '')) !== ''\n ],\n true\n );\n }\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class VideoFeature\n * @extends {CssFlagsClass}\n */\nexport class VideoFeature extends CssFlagsClass {\n #videoElement: HTMLVideoElement;\n\n formats: {\n mp4: boolean;\n ogv: boolean;\n webm: boolean;\n };\n\n /**\n * Creates an instance of VideoFeature.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='video']\n *\n * @memberOf VideoFeature\n */\n constructor(ua: string|null = null, flags = {}, cssFlagsPrefix = 'video') {\n super(ua, flags, cssFlagsPrefix);\n\n this._createTestElements();\n\n this.formats = {\n mp4: this.getMp4(),\n ogv: this.getOgv(),\n webm: this.getWebm()\n };\n }\n\n /**\n *\n *\n * @memberof VideoFeature\n */\n _createTestElements() {\n this.#videoElement = this.document.createElement('video');\n }\n\n // /**\n // *\n // *\n // * @memberof VideoFeature\n // */\n // _destroyTestElements() {\n // this._viewElement = null;\n\n // delete this._videoElement;\n // }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf VideoFeature\n */\n get supported() {\n return Asserts.all(\n [\n 'HTMLVideoElement' in this.root,\n 'HTMLMediaElement' in this.root,\n () =>\n !!this.#videoElement &&\n 'canPlayType' in this.#videoElement &&\n this.#videoElement instanceof HTMLVideoElement &&\n this.#videoElement instanceof HTMLMediaElement\n ],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf VideoFeature\n */\n getMp4() {\n return Asserts.all(\n [\n () =>\n this.supported &&\n this.#videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E, mp4a.40.2\"').replace(/^no$/, '') !== ''\n ],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf VideoFeature\n */\n getOgv() {\n return Asserts.all(\n [\n () =>\n this.supported &&\n this.#videoElement.canPlayType('video/ogg; codecs=\"theora, vorbis\"').replace(/^no$/, '') !== ''\n ],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf VideoFeature\n */\n getWebm() {\n return Asserts.all(\n [\n () =>\n this.supported &&\n this.#videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(/^no$/, '') !== ''\n ],\n true\n );\n }\n}\n"],"names":[],"version":3,"file":"feature.mjs.map"} \ No newline at end of file diff --git a/packages/feature/dist/feature.types.d.ts b/packages/feature/dist/feature.types.d.ts new file mode 100644 index 0000000..69cf43b --- /dev/null +++ b/packages/feature/dist/feature.types.d.ts @@ -0,0 +1,603 @@ +import { CssFlagsClass } from "@detector-js/core"; +/** + * + * + * @export + * @class AudioFeature + * @extends {CssFlagsClass} + */ +export class AudioFeature extends CssFlagsClass { + #private; + context: boolean; + formats: { + mp3: boolean; + webm: boolean; + ogg: boolean; + opus: boolean; + wav: boolean; + m4a: boolean; + }; + /** + * Creates an instance of AudioFeature. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='audio'] + * + * @memberOf AudioFeature + */ + constructor(ua?: string | null, flags?: {}, cssFlagsPrefix?: string); + /** + * + * + * @readonly + * + * @memberOf AudioFeature + */ + get supported(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ + getContext(): boolean; + /** + *__ + * + * @returns boolean + * + * @memberOf AudioFeature + */ + getMp3(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ + getWebm(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ + getOgg(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ + getOpus(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ + getWav(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf AudioFeature + */ + getM4a(): boolean; +} +/** + * + * + * @export + * @class VideoFeature + * @extends {CssFlagsClass} + */ +export class VideoFeature extends CssFlagsClass { + #private; + formats: { + mp4: boolean; + ogv: boolean; + webm: boolean; + }; + /** + * Creates an instance of VideoFeature. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='video'] + * + * @memberOf VideoFeature + */ + constructor(ua?: string | null, flags?: {}, cssFlagsPrefix?: string); + /** + * + * + * @memberof VideoFeature + */ + _createTestElements(): void; + /** + * + * + * @readonly + * + * @memberOf VideoFeature + */ + get supported(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf VideoFeature + */ + getMp4(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf VideoFeature + */ + getOgv(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf VideoFeature + */ + getWebm(): boolean; +} +/** + * + * + * @export + * @class Feature + * @extends {CssFlagsClass} + */ +export class Feature extends CssFlagsClass { + #private; + addEventListener: boolean; + asyncScript: boolean; + battery: boolean; + cors: boolean; + deferScript: boolean; + file: boolean; + fileSystem: boolean; + fullscreen: boolean; + fullscreenKeyboard: boolean; + geolocation: boolean; + historyAPI: boolean; + littleEndian: boolean; + localStorage: boolean; + matchMedia: boolean; + querySelector: boolean; + querySelectorAll: boolean; + serviceWorker: boolean; + typedArray: boolean; + userMedia: boolean; + vibration: boolean; + worker: boolean; + /** + * Creates an instance of Feature. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='feature'] + * + * @memberOf Feature + */ + constructor(ua?: string | null, flags?: {}, cssFlagsPrefix?: string); + /** + * + * + * @param {any} prop + * @param {any} [prefixes=this.#cssPrefixes] + * @returns {string} + * + * @memberOf Feature + */ + _checkCssPrefixedProp(prop: any, prefixes?: string[]): boolean; + /** + * + * + * @param {any} prop + * @param {any} value + * @returns {any} + * + * @memberOf Feature + */ + _getCssPrefixedPropValue(prop: any, value: any): string | null; + /** + * + * + * @param {any} prop + * @param {any} value + * @returns {any} + * + * @memberOf Feature + */ + _checkCssPrefixedPropValue(prop: any, value: any): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getAddEventListener(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getAsyncScript(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getBattery(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getCors(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getDeferScript(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getFile(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getFileSystem(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getFullscreen(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getFullscreenKeyboard(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getGeolocation(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getHistoryAPI(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getLittleEndian(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getLocalStorage(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getMatchMedia(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getQuerySelector(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getQuerySelectorAll(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getServiceWorker(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getTypedArray(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getUserMedia(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getVibration(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf Feature + */ + getWorker(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get pointerEnabled(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get pixelRatio(): number; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get pointerLock(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get quirksMode(): boolean; + /** + * Test if CSS 3D transforms are supported + * + * @readonly + * + * @memberOf Feature + */ + get css3D(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get cssTransform(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get cssTransition(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get deviceMotion(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get deviceOrientation(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get contextMenu(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get classList(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get placeholder(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get viewportUnit(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get remUnit(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get canvas(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get svg(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get webp(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get webGL(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get webVR(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get touch(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get forceTouch(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get pointerEvents(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get srcset(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get sizes(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get pictureElement(): boolean; + /** + * + * + * @readonly + * + * @memberOf Feature + */ + get dialogElement(): boolean; +} + +//# sourceMappingURL=feature.types.d.ts.map diff --git a/packages/feature/dist/feature.types.d.ts.map b/packages/feature/dist/feature.types.d.ts.map new file mode 100644 index 0000000..882d418 --- /dev/null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;;;;OAMG;IACH,IAAI,cAAc,YAEjB;IAGD;;;;;;OAMG;IACH,IAAI,aAAa,YAEhB;CACF","sources":["packages/feature/lib/lib/audioFeature.ts","packages/feature/lib/lib/videoFeature.ts","packages/feature/lib/lib/feature.ts","packages/feature/lib/feature.ts"],"sourcesContent":[null,null,null,"import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class Feature\n * @extends {CssFlagsClass}\n */\nexport class Feature extends CssFlagsClass {\n #cssPrefixes: string[];\n #script: HTMLScriptElement;\n #canvas: HTMLCanvasElement;\n #div: HTMLDivElement;\n #input: HTMLInputElement;\n #img: HTMLImageElement;\n #xmlHttpRequest: XMLHttpRequest;\n\n addEventListener: boolean;\n asyncScript: boolean;\n battery: boolean;\n cors: boolean;\n deferScript: boolean;\n file: boolean;\n fileSystem: boolean;\n fullscreen: boolean;\n fullscreenKeyboard: boolean;\n geolocation: boolean;\n historyAPI: boolean;\n littleEndian: boolean;\n localStorage: boolean;\n matchMedia: boolean;\n querySelector: boolean;\n querySelectorAll: boolean;\n serviceWorker: boolean;\n typedArray: boolean;\n userMedia: boolean;\n vibration: boolean;\n worker: boolean;\n\n /**\n * Creates an instance of Feature.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='feature']\n *\n * @memberOf Feature\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'feature') {\n super(ua, flags, cssFlagsPrefix);\n\n this.#createTestElements();\n\n this.addEventListener = this.getAddEventListener();\n this.asyncScript = this.getAsyncScript();\n this.battery = this.getBattery();\n this.cors = this.getCors();\n this.deferScript = this.getDeferScript();\n this.file = this.getFile();\n this.fileSystem = this.getFileSystem();\n this.fullscreen = this.getFullscreen();\n this.fullscreenKeyboard = this.getFullscreenKeyboard();\n this.geolocation = this.getGeolocation();\n this.historyAPI = this.getHistoryAPI();\n this.littleEndian = this.getLittleEndian();\n this.localStorage = this.getLocalStorage();\n this.matchMedia = this.getMatchMedia();\n this.querySelector = this.getQuerySelector();\n this.querySelectorAll = this.getQuerySelectorAll();\n this.serviceWorker = this.getServiceWorker();\n this.typedArray = this.getTypedArray();\n this.userMedia = this.getUserMedia();\n this.vibration = this.getVibration();\n this.worker = this.getWorker();\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} [prefixes=this.#cssPrefixes]\n * @returns {string}\n *\n * @memberOf Feature\n */\n #getCssPrefixedProp(prop, prefixes = this.#cssPrefixes) {\n prop = prop.toCamelCase();\n\n const prefixedProps = prefixes.map((item) => {\n return (item === 'spec' ? '' : '-' + item + '-') + prop;\n });\n\n // if ('CSS' in this.root && 'supports' in this.root.CSS) {\n // return this.root.CSS.supports(prefixedProps.map(item => '(' + item + ': inherit)').join(' or '));\n // }\n\n const prefixedPropsFound = prefixedProps.filter((item) => {\n return item in this.#div.style;\n });\n\n if (prefixedPropsFound.length > 0) {\n return prefixedPropsFound[0];\n }\n\n return null;\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} [prefixes=this.#cssPrefixes]\n * @returns {string}\n *\n * @memberOf Feature\n */\n _checkCssPrefixedProp(prop, prefixes = this.#cssPrefixes) {\n return !!this.#getCssPrefixedProp(prop, prefixes);\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} value\n * @returns {any}\n *\n * @memberOf Feature\n */\n _getCssPrefixedPropValue(prop, value) {\n const prefixedProp = this.#getCssPrefixedProp(prop);\n\n if (prefixedProp) {\n this.document.body.insertBefore(this.#div, null);\n\n this.#div.style[prefixedProp] = value;\n\n const computedStylePropValue = this.root.getComputedStyle(this.#div).getPropertyValue(prefixedProp);\n\n this.document.body.removeChild(this.#div);\n\n if (!!computedStylePropValue && typeof computedStylePropValue === 'string') {\n return computedStylePropValue;\n }\n\n return null;\n }\n\n return null;\n }\n\n /**\n *\n *\n * @param {any} prop\n * @param {any} value\n * @returns {any}\n *\n * @memberOf Feature\n */\n _checkCssPrefixedPropValue(prop, value) {\n const prefixedPropValue = this._getCssPrefixedPropValue(prop, value);\n\n return !!prefixedPropValue && prefixedPropValue !== 'none';\n }\n\n /**\n *\n *\n * @memberof Feature\n */\n #createTestElements() {\n this.#cssPrefixes = ['spec', 'webkit', 'moz', 'ms', 'o'];\n\n this.#script = this.document.createElement('script');\n this.#canvas = this.document.createElement('canvas');\n this.#div = this.document.createElement('div');\n this.#input = this.document.createElement('input');\n this.#img = this.document.createElement('img');\n this.#xmlHttpRequest = new this.root.XMLHttpRequest();\n }\n\n // /**\n // *\n // *\n // * @memberof Feature\n // */\n // _destroyTestElements() {\n // this.#cssPrefixes = null;\n\n // this._script = null;\n // this._canvas = null;\n // this._div = null;\n // this._input = null;\n // this._img = null;\n // this._xmlHttpRequest = null;\n\n // delete this.#cssPrefixes;\n\n // delete this._script;\n // delete this._canvas;\n // delete this._div;\n // delete this._input;\n // delete this._img;\n // delete this._xmlHttpRequest;\n // }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getAddEventListener() {\n return 'addEventListener' in this.root;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getAsyncScript() {\n return 'async' in this.#script;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getBattery() {\n return 'battery' in this.navigator;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getCors() {\n return 'XMLHttpRequest' in this.root && 'withCredentials' in this.#xmlHttpRequest;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getDeferScript() {\n return 'defer' in this.#script;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFile() {\n return Asserts.all(['File' in this.root, 'FileReader' in this.root, 'FileList' in this.root, 'Blob' in this.root]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFileSystem() {\n return 'requestFileSystem' in this.root;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFullscreen() {\n return Asserts.one([\n 'requestFullscreen' in this.#canvas,\n 'webkitRequestFullscreen' in this.#canvas,\n 'msRequestFullscreen' in this.#canvas,\n 'mozRequestFullScreen' in this.#canvas\n ]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getFullscreenKeyboard() {\n return Asserts.all([() => 'Element' in this.root && 'ALLOW_KEYBOARD_INPUT' in this.root.Element], true);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getGeolocation() {\n return 'geolocation' in this.navigator;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getHistoryAPI() {\n return Asserts.all([() => 'history' in this.root && 'pushState' in this.root.history], true);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getLittleEndian() {\n return Asserts.all(\n [this.getTypedArray, () => new this.root.Int8Array(new this.root.Int16Array([1]).buffer)[0] > 0],\n true\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getLocalStorage() {\n return (\n Asserts.one([() => 'localStorage' in this.root], true) &&\n Asserts.one(\n [\n () => {\n const test = 'x';\n this.root.localStorage.setItem(test, test);\n this.root.localStorage.removeItem(test);\n\n return true;\n }\n ],\n true\n )\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getMatchMedia() {\n return 'matchMedia' in this.root;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getQuerySelector() {\n return 'querySelector' in this.document;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getQuerySelectorAll() {\n return 'querySelectorAll' in this.document;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getServiceWorker() {\n return 'serviceWorker' in this.navigator;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getTypedArray() {\n return Asserts.all([() => 'Int8Array' in this.root && typeof this.root.Int8Array !== 'undefined'], true);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getUserMedia() {\n return Asserts.one([\n 'getUserMedia' in this.navigator,\n 'webkitGetUserMedia' in this.navigator,\n 'mozGetUserMedia' in this.navigator,\n 'msGetUserMedia' in this.navigator\n ]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getVibration() {\n return Asserts.one([\n 'vibrate' in this.navigator,\n 'webkitVibrate' in this.navigator,\n 'mozVibrate' in this.navigator,\n 'msVibrate' in this.navigator\n ]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf Feature\n */\n getWorker() {\n return 'Worker' in this.root;\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pointerEnabled() {\n return Asserts.one(['pointerEnabled' in this.navigator, 'msPointerEnabled' in this.navigator]);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pixelRatio() {\n return this.root.devicePixelRatio || 1;\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pointerLock() {\n return Asserts.one([\n 'pointerLockElement' in this.document,\n 'webkitPointerLockElement' in this.document,\n 'mozPointerLockElement' in this.document\n ]);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get quirksMode() {\n return this.document.compatMode !== 'CSS1Compat';\n }\n\n /**\n * Test if CSS 3D transforms are supported\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get css3D() {\n return Asserts.all(\n [\n this._checkCssPrefixedPropValue.bind(this, 'transform', 'translate3d(1px,1px,1px)'),\n this._checkCssPrefixedProp.bind(this, 'perspective')\n ],\n true\n );\n }\n\n // Test if CSS transforms are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get cssTransform() {\n return Asserts.one([this._checkCssPrefixedProp.bind(this, 'transform-origin')], true);\n }\n\n // Test if CSS transitions are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get cssTransition() {\n return Asserts.one([this._checkCssPrefixedProp.bind(this, 'transition')], true);\n }\n\n // Test if Device Motion is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get deviceMotion() {\n return 'DeviceMotionEvent' in this.root;\n }\n\n // Test if Device Orientation is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get deviceOrientation() {\n return 'DeviceOrientationEvent' in this.root;\n }\n\n // Test if Context Menu is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get contextMenu() {\n return Asserts.all(['contextMenu' in this.document, 'HTMLMenuItemElement' in this.root]);\n }\n\n // Test if classList API is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get classList() {\n return 'classList' in this.document;\n }\n\n // Test if placeholder attribute is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get placeholder() {\n return 'placeholder' in this.#input;\n }\n\n // Test if viewport units are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get viewportUnit() {\n return Asserts.all([() => (this.#img.style.width = '1vw') && this.#img.style.width !== ''], true);\n }\n\n // Test if REM units are supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get remUnit() {\n return Asserts.all([() => (this.#img.style.width = '1rem') && this.#img.style.width !== ''], true);\n }\n\n // Test if Canvas is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get canvas() {\n return Asserts.all([() => 'getContext' in this.#canvas && !!this.#canvas.getContext('2d')], true);\n }\n\n // Test if SVG is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get svg() {\n return Asserts.all(\n [\n () =>\n 'createElementNS' in this.document &&\n 'createSVGRect' in this.document.createElementNS('http://www.w3.org/2000/svg', 'svg')\n ],\n true\n );\n }\n\n // Test if WebP is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get webp() {\n return Asserts.all(\n [\n () => {\n const elem = document.createElement('canvas');\n\n if (!!(elem.getContext && elem.getContext('2d'))) {\n // was able or not to get WebP representation\n return elem.toDataURL('image/webp').indexOf('data:image/webp') === 0;\n }\n\n return false;\n }\n ],\n true\n );\n }\n\n // Test if WebGL is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get webGL() {\n return Asserts.one(\n [\n () =>\n this.canvas &&\n 'WebGLRenderingContext' in this.root &&\n (this.#canvas.getContext('webgl') || this.#canvas.getContext('experimental-webgl')),\n () => this.canvas && 'WebGL2RenderingContext' in this.root && this.#canvas.getContext('webgl2')\n ],\n true\n );\n }\n\n // Test if WebVR is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get webVR() {\n return Asserts.all(['getVRDisplays' in this.navigator]);\n }\n\n // Tests if touch events are supported, but doesn't necessarily reflect a touchscreen device\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get touch() {\n return (\n Asserts.one([() => 'ontouchstart' in this.root, () => 'ontouchstart' in this.document.documentElement], true) &&\n Asserts.one(\n [\n () => 'DocumentTouch' in this.root,\n () => this.pointerEnabled && 'MSGesture' in this.root,\n () => 'maxTouchPoints' in this.navigator && this.navigator.maxTouchPoints > 1\n ],\n true\n )\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get forceTouch() {\n return Asserts.all(\n [\n () =>\n 'MouseEvent' in this.root &&\n 'WEBKIT_FORCE_AT_MOUSE_DOWN' in this.root.MouseEvent &&\n 'WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN' in this.root.MouseEvent\n ],\n true\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pointerEvents() {\n return Asserts.all([this.root.PointerEvent], true);\n }\n\n // Test if img srcset attribute is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get srcset() {\n return 'srcset' in this.#img;\n }\n\n // Test if img sizes attribute is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get sizes() {\n return 'sizes' in this.#img;\n }\n\n // Test if Picture element is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get pictureElement() {\n return 'HTMLPictureElement' in this.root;\n }\n\n // Test if Picture element is supported\n /**\n *\n *\n * @readonly\n *\n * @memberOf Feature\n */\n get dialogElement() {\n return 'HTMLDialogElement' in this.root;\n }\n}\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n\nexport * from './audioFeature';\nexport * from './videoFeature';\n"],"names":[],"version":3,"file":"feature.types.d.ts.map"} \ No newline at end of file diff --git a/packages/hardware/dist/hardware.js b/packages/hardware/dist/hardware.js new file mode 100644 index 0000000..b25f858 --- /dev/null +++ b/packages/hardware/dist/hardware.js @@ -0,0 +1,467 @@ +var $kGCNT$detectorjscore = require("@detector-js/core"); + +function $parcel$exportWildcard(dest, source) { + Object.keys(source).forEach(function(key) { + if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) { + return; + } + + Object.defineProperty(dest, key, { + enumerable: true, + get: function get() { + return source[key]; + } + }); + }); + + return dest; +} +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} +var $5c2278ac07d05d78$exports = {}; + +$parcel$export($5c2278ac07d05d78$exports, "Platform", () => $5c2278ac07d05d78$export$2dffd0b5373a4389); + +class $5c2278ac07d05d78$export$2dffd0b5373a4389 extends (0, $kGCNT$detectorjscore.CssFlagsClass) { + /** + * Creates an instance of Platform. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='platform'] + * + * @memberOf Platform + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "platform"){ + super(ua, flags, cssFlagsPrefix); + } + /** + * + * + * @readonly + * @memberOf Platform + */ get bot() { + return (0, $kGCNT$detectorjscore.Asserts).one([ + /googlebot/i.test(this.ua) + ]); + } + /** + * + * + * @readonly + * @memberof Platform + */ get console() { + return (0, $kGCNT$detectorjscore.Asserts).all([ + /(?:xbox|playstation|nintendo|archos.*gamepad([2]?))/i.test(this.ua), + !/(?:xbmc|kodi|nexbox|newfoxbox)/i.test(this.ua) + ]); + } + /** + * + * + * @readonly + * @memberof Platform + */ get tv() { + return (0, $kGCNT$detectorjscore.Asserts).one([ + /(?:google|smart(?:-)|internet\.|(?:i)net|apple|(?:pov|aoc)\_|hbb|web|sonyd|vs|cloud)tv/i.test(this.ua), + /(?:viera|bravia|bangolufsen|humax|airties|netcast|owb|grundig|thom(?:son)|arcelik|telefunken|panasonic|hisense|boxee|kylo|dlnadoc|ce-html|tb-pO1|netbox|tv(\s?:box|build))/i.test(this.ua) + ]) && (0, $kGCNT$detectorjscore.Asserts).one([ + !this.mobile, + !this.bot, + this.flags.feature.fullscreenKeyboard + ]) && (0, $kGCNT$detectorjscore.Asserts).one([ + this.flags.os.Android, + this.flags.os.Tizen, + this.flags.os.WebOS + ]); + } + /** + * + * + * @readonly + * + * @memberOf Platform + */ get tablet() { + return (0, $kGCNT$detectorjscore.Asserts).all([ + this.mobile, + /(ipad|tab(?:let)|kindle|playbook|vega|sm-t|lenovo\st(?:a)b)/i.test(this.ua) + ]); + } + /** + * + * + * @readonly + * + * @memberOf Platform + */ get smartphone() { + return (0, $kGCNT$detectorjscore.Asserts).all([ + this.mobile, + !this.tablet + ]); + } + /** + * + * + * @readonly + * + * @memberOf Platform + */ get mobile() { + return (0, $kGCNT$detectorjscore.Asserts).one([ + this.flags.feature.deviceMotion, + this.flags.feature.deviceOrientation, + this.flags.feature.pixelRatio > 1 + ]) && (0, $kGCNT$detectorjscore.Asserts).one([ + this.flags.feature.touch, + this.flags.feature.forceTouch, + [ + "ChromeMobile", + "EdgeMobile", + "IEMobile", + "FirefoxMobile", + "MaxthonMobile", + "OperaMobile", + "SafariMobile" + ].includes(this.flags.browser.name) + ]) && (0, $kGCNT$detectorjscore.Asserts).all([ + !this.flags.feature.pointerEvents, + this.flags.feature.file + ]) || (0, $kGCNT$detectorjscore.Asserts).all([ + [ + "Android", + "iOS", + "WindowsPhone", + "Bada", + "Blackberry", + "Contiki", + "MeeGo", + "RIM", + "QNX", + "Palm", + "Symbian", + "WebOS" + ].includes(this.flags.os.name), + [ + "ChromeMobile", + "EdgeMobile", + "IEMobile", + "FirefoxMobile", + "MaxthonMobile", + "OperaMobile", + "SafariMobile" + ].includes(this.flags.browser.name) + ]); + } + /** + * + * + * @readonly + * @memberOf Platform + */ get desktop() { + return (0, $kGCNT$detectorjscore.Asserts).all([ + !this.bot, + !this.console, + !this.mobile, + !this.tv + ]); + } + toValues() { + const proto = Object.getPrototypeOf(this); + const protoProperties = Object.getOwnPropertyNames(proto).filter((prop)=>{ + return !!Object.getOwnPropertyDescriptors(proto)[prop].get && !!this[prop]; + }); + return protoProperties[0] || "n/a"; + } +} + + +var $8fbb520c1e8c0144$exports = {}; + +$parcel$export($8fbb520c1e8c0144$exports, "Device", () => $8fbb520c1e8c0144$export$8215d14a63d9fb10); + +class $8fbb520c1e8c0144$export$8215d14a63d9fb10 extends (0, $kGCNT$detectorjscore.CssFlagsClass) { + /** + * Creates an instance of Device. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='device'] + * + * @memberOf Device + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "device"){ + super(ua, flags, cssFlagsPrefix); + } +} + + +var $9c2e00f29d58ee23$exports = {}; + +$parcel$export($9c2e00f29d58ee23$exports, "CPU", () => $9c2e00f29d58ee23$export$5ebf4cde340e6028); + +class $9c2e00f29d58ee23$export$5ebf4cde340e6028 extends (0, $kGCNT$detectorjscore.CssFlagsClass) { + constructor(ua = null, flags = {}, cssFlagsPrefix = "cpu"){ + super(ua, flags, cssFlagsPrefix); + this.booleanFlagsValuePropertyName = "vendor"; + this.platform = this.getPlatform(); + this.cores = this.getCores(); + this.architecture = this.getArchitecture(); + this.sparc = this.getSparc(); + this.irix = this.getIrix(); + this.mips = this.getMips(); + this.risc = this.getRisc(); + this.avr = this.getAvr(); + this.arm = this.getArm(); + this.powerPC = this.getPowerPC(); + this.amd = this.getAmd(); + this.intel = this.getIntel(); + } + /** + * + * + * @returns number + * + * @memberOf CPU + */ getCores() { + return this.navigator.hardwareConcurrency || 1; + } + /** + * + * + * @returns string + * + * @memberOf CPU + */ getPlatform() { + return this.navigator.platform || "Win32"; + } + /** + * + * + * @returns string + * + * @memberOf CPU + */ getArchitecture() { + // @ts-ignore + let cpuClass = this.navigator.cpuClass || "x86"; + if ((0, $kGCNT$detectorjscore.Asserts).one([ + cpuClass === "x64", + [ + "Win64", + "MacIntel", + "Linux x86_64", + "Linux i686" + ].includes(this.navigator.platform), + /(?:x86_64|x86-64|win64|wow64|x64;|amd64|arm64|ia64|sparc64|ppc64|mips64|pa-risc64|irix64|ppc64|powerpc64)/i.test(this.ua) + ])) cpuClass = "x64"; + return cpuClass; + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getSparc() { + return (0, $kGCNT$detectorjscore.Asserts).one([ + /(sun4\w)[;\)]/i.test(this.ua), + /sparc(?:64)?(?=;);/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getIrix() { + return (0, $kGCNT$detectorjscore.Asserts).all([ + /irix(?:64)?(?=;);/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getMips() { + return (0, $kGCNT$detectorjscore.Asserts).all([ + /mips(?:64)?(?=;);/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getRisc() { + return (0, $kGCNT$detectorjscore.Asserts).all([ + /pa-risc(?:64)?(?=;);/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getAvr() { + return (0, $kGCNT$detectorjscore.Asserts).all([ + /(?=atmel\s)avr/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getArm() { + return (0, $kGCNT$detectorjscore.Asserts).one([ + /windows\s(ce|mobile);\sppc;/i.test(this.ua), + /arm(?:64|(?=v\d+[;l]))/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getPowerPC() { + return (0, $kGCNT$detectorjscore.Asserts).one([ + /((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i.test(this.ua), + this.navigator.platform === "MacPPC" + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getAmd() { + return (0, $kGCNT$detectorjscore.Asserts).one([ + /(?:(amd(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i.test(this.ua), + // @ts-ignore + this.navigator.cpuClass === "x64", + this.navigator.platform === "Linux x86_64" + ]) || (0, $kGCNT$detectorjscore.Asserts).one([ + /(?:(amd(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i.test(this.ua), + /((?:i[346]|x)86)[;\)]/i.test(this.ua), + // @ts-ignore + this.navigator.cpuClass === "x86" + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getIntel() { + return (0, $kGCNT$detectorjscore.Asserts).one([ + /(?:avr32|ia64(?=;))|68k(?=\))/i.test(this.ua), + /(?:(x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i.test(this.ua), + // @ts-ignore + this.navigator.cpuClass === "x64", + this.navigator.platform === "MacIntel", + this.navigator.platform === "Linux x86_64" + ]) || (0, $kGCNT$detectorjscore.Asserts).one([ + /(?:(x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i.test(this.ua), + /(ia32(?=;))/i.test(this.ua), + /((?:i[346]|x)86)[;\)]/i.test(this.ua), + // @ts-ignore + this.navigator.cpuClass === "x86" + ]); + } +} + + +var $3b0981556cb66547$exports = {}; + +$parcel$export($3b0981556cb66547$exports, "GPU", () => $3b0981556cb66547$export$f9febed8cec1c27c); + +class $3b0981556cb66547$export$f9febed8cec1c27c extends (0, $kGCNT$detectorjscore.CssFlagsClass) { + #canvas; + #info; + /** + * Creates an instance of GPU. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='gpu'] + * + * @memberOf GPU + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "gpu"){ + super(ua, flags, cssFlagsPrefix); + this.#createTestElements(); + this.webGLVendor = this.#info.webGLVendor; + this.webGLRenderer = this.#info.webGLRenderer; + this.vendor = this.#info.vendor; + this.model = this.#info.model; + this.renderer = this.#info.renderer; + } + /** + * + * + * + * @memberOf GPU + */ #createTestElements() { + this.#canvas = this.document.createElement("canvas"); + this.#info = this.getInfo(); + } + // /** + // * + // * + // * + // * @memberOf GPU + // */ + // _destroyTestElements() { + // this._canvas = null; + // this._info = null; + // delete this._canvas; + // delete this._info; + // } + /** + * + * + * @returns object + * + * @memberOf GPU + */ getInfo() { + const info = { + webGLVendor: "n/a", + webGLRenderer: "n/a", + vendor: "n/a", + model: "n/a", + renderer: "n/a" + }; + try { + const webGLContext = this.#canvas.getContext("webgl") ?? this.#canvas.getContext("experimental-webgl"); + if (webGLContext) { + const dbgRenderInfo = webGLContext.getExtension("WEBGL_debug_renderer_info"); + if (dbgRenderInfo != null) // @ts-ignore + info.merge({ + vendor: webGLContext.getParameter(dbgRenderInfo.UNMASKED_VENDOR_WEBGL), + model: webGLContext.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL).replace(" OpenGL Engine", ""), + renderer: webGLContext.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL) + }); + // @ts-ignore + info.merge({ + webGLVendor: webGLContext.getParameter(webGLContext.VENDOR), + webGLRenderer: webGLContext.getParameter(webGLContext.RENDERER) + }); + } + } catch (e) { + console.warn("webGL is not supported", e.message); + } + return info; + } +} + + +"use strict"; +$parcel$exportWildcard(module.exports, $5c2278ac07d05d78$exports); +$parcel$exportWildcard(module.exports, $8fbb520c1e8c0144$exports); +$parcel$exportWildcard(module.exports, $9c2e00f29d58ee23$exports); +$parcel$exportWildcard(module.exports, $3b0981556cb66547$exports); + + +//# sourceMappingURL=hardware.js.map diff --git a/packages/hardware/dist/hardware.js.map b/packages/hardware/dist/hardware.js.map new file mode 100644 index 0000000..47a9be5 --- /dev/null +++ b/packages/hardware/dist/hardware.js.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;ACAA;AAQO,MAAM,kDAAiB,CAAA,GAAA,mCAAa,AAAD;IACxC;;;;;;;GAOC,GACD,YAAY,KAAoB,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,iBAAiB,UAAU,CAAE;QAC7E,KAAK,CAAC,IAAI,OAAO;IACnB;IAEA;;;;;GAKC,GACD,IAAI,MAAM;QACR,OAAO,CAAA,GAAA,6BAAO,AAAD,EAAE,GAAG,CAAC;YAAC,aAAa,IAAI,CAAC,IAAI,CAAC,EAAE;SAAE;IACjD;IAEA;;;;;GAKC,GACD,IAAI,UAAU;QACZ,OAAO,CAAA,GAAA,6BAAO,AAAD,EAAE,GAAG,CAAC;YACjB,uDAAuD,IAAI,CAAC,IAAI,CAAC,EAAE;YACnE,CAAC,kCAAkC,IAAI,CAAC,IAAI,CAAC,EAAE;SAChD;IACH;IAEA;;;;;GAKC,GACD,IAAI,KAAK;QACP,OACE,CAAA,GAAA,6BAAO,AAAD,EAAE,GAAG,CAAC;YACV,0FAA0F,IAAI,CAAC,IAAI,CAAC,EAAE;YACtG,8KAA8K,IAAI,CAChL,IAAI,CAAC,EAAE;SAEV,KACD,CAAA,GAAA,6BAAO,AAAD,EAAE,GAAG,CAAC;YAAC,CAAC,IAAI,CAAC,MAAM;YAAE,CAAC,IAAI,CAAC,GAAG;YAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB;SAAC,KAC5E,CAAA,GAAA,6BAAO,AAAD,EAAE,GAAG,CAAC;YAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO;YAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK;SAAC;IAEjF;IAE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C,aAAa,CAAC;QAC3C,IAAI,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO;IAC3B;IAEA,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,mBAAmB;IACnB,MAAM;IACN,2BAA2B;IAC3B,yBAAyB;IACzB,uBAAuB;IAEvB,yBAAyB;IACzB,uBAAuB;IACvB,IAAI;IAEJ;;;;;;GAMC,GACD,UAAU;QACR,MAAM,OAAO;YACX,aAAa;YACb,eAAe;YACf,QAAQ;YACR,OAAO;YACP,UAAU;QACZ;QAEA,IAAI;YACF,MAAM,eACJ,IAAI,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,YAAa,IAAI,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;YAE/D,IAAI,cAAc;gBAChB,MAAM,gBAAgB,aAAa,YAAY,CAAC;gBAEhD,IAAI,iBAAiB,IAAI,EACvB,aAAa;gBACb,KAAK,KAAK,CAAC;oBACT,QAAQ,aAAa,YAAY,CAAC,cAAc,qBAAqB;oBACrE,OAAO,aAAa,YAAY,CAAC,cAAc,uBAAuB,EAAE,OAAO,CAAC,kBAAkB;oBAClG,UAAU,aAAa,YAAY,CAAC,cAAc,uBAAuB;gBAC3E;gBAGF,aAAa;gBACb,KAAK,KAAK,CAAC;oBACT,aAAa,aAAa,YAAY,CAAC,aAAa,MAAM;oBAC1D,eAAe,aAAa,YAAY,CAAC,aAAa,QAAQ;gBAChE;YACF,CAAC;QACH,EAAE,OAAO,GAAG;YACV,QAAQ,IAAI,CAAC,0BAA0B,EAAE,OAAO;QAClD;QAEA,OAAO;IACT;AACF;;;AJ5GA","sources":["packages/hardware/lib/hardware.ts","packages/hardware/lib/platform.ts","packages/hardware/lib/device.ts","packages/hardware/lib/cpu.ts","packages/hardware/lib/gpu.ts"],"sourcesContent":["'use strict';\n\nexport * from './platform';\nexport * from './device';\nexport * from './cpu';\nexport * from './gpu';\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n/**\n *\n *\n * @export\n * @class Platform\n * @extends {CssFlagsClass}\n */\nexport class Platform extends CssFlagsClass {\n /**\n * Creates an instance of Platform.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='platform']\n *\n * @memberOf Platform\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'platform') {\n super(ua, flags, cssFlagsPrefix);\n }\n\n /**\n *\n *\n * @readonly\n * @memberOf Platform\n */\n get bot() {\n return Asserts.one([/googlebot/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @readonly\n * @memberof Platform\n */\n get console() {\n return Asserts.all([\n /(?:xbox|playstation|nintendo|archos.*gamepad([2]?))/i.test(this.ua),\n !/(?:xbmc|kodi|nexbox|newfoxbox)/i.test(this.ua)\n ]);\n }\n\n /**\n *\n *\n * @readonly\n * @memberof Platform\n */\n get tv() {\n return (\n Asserts.one([\n /(?:google|smart(?:-)|internet\\.|(?:i)net|apple|(?:pov|aoc)\\_|hbb|web|sonyd|vs|cloud)tv/i.test(this.ua),\n /(?:viera|bravia|bangolufsen|humax|airties|netcast|owb|grundig|thom(?:son)|arcelik|telefunken|panasonic|hisense|boxee|kylo|dlnadoc|ce-html|tb-pO1|netbox|tv(\\s?:box|build))/i.test(\n this.ua\n )\n ]) &&\n Asserts.one([!this.mobile, !this.bot, this.flags.feature.fullscreenKeyboard]) &&\n Asserts.one([this.flags.os.Android, this.flags.os.Tizen, this.flags.os.WebOS])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Platform\n */\n get tablet() {\n return Asserts.all([this.mobile, /(ipad|tab(?:let)|kindle|playbook|vega|sm-t|lenovo\\st(?:a)b)/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Platform\n */\n get smartphone() {\n return Asserts.all([this.mobile, !this.tablet]);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Platform\n */\n get mobile() {\n return (\n (Asserts.one([\n this.flags.feature.deviceMotion,\n this.flags.feature.deviceOrientation,\n this.flags.feature.pixelRatio > 1\n ]) &&\n Asserts.one([\n this.flags.feature.touch,\n this.flags.feature.forceTouch,\n [\n 'ChromeMobile',\n 'EdgeMobile',\n 'IEMobile',\n 'FirefoxMobile',\n 'MaxthonMobile',\n 'OperaMobile',\n 'SafariMobile'\n ].includes(this.flags.browser.name)\n ]) &&\n Asserts.all([!this.flags.feature.pointerEvents, this.flags.feature.file])) ||\n Asserts.all([\n [\n 'Android',\n 'iOS',\n 'WindowsPhone',\n 'Bada',\n 'Blackberry',\n 'Contiki',\n 'MeeGo',\n 'RIM',\n 'QNX',\n 'Palm',\n 'Symbian',\n 'WebOS'\n ].includes(this.flags.os.name),\n [\n 'ChromeMobile',\n 'EdgeMobile',\n 'IEMobile',\n 'FirefoxMobile',\n 'MaxthonMobile',\n 'OperaMobile',\n 'SafariMobile'\n ].includes(this.flags.browser.name)\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n * @memberOf Platform\n */\n get desktop() {\n return Asserts.all([!this.bot, !this.console, !this.mobile, !this.tv]);\n }\n\n toValues() {\n const proto = Object.getPrototypeOf(this);\n\n const protoProperties = Object.getOwnPropertyNames(proto).filter((prop) => {\n return !!Object.getOwnPropertyDescriptors(proto)[prop].get && !!this[prop];\n });\n\n return protoProperties[0] || 'n/a';\n }\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class Device\n * @extends {CssFlagsClass}\n */\nexport class Device extends CssFlagsClass {\n /**\n * Creates an instance of Device.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='device']\n *\n * @memberOf Device\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'device') {\n super(ua, flags, cssFlagsPrefix);\n }\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\nexport class CPU extends CssFlagsClass {\n platform: string;\n cores: number;\n architecture: string;\n\n sparc: boolean;\n irix: boolean;\n mips: boolean;\n risc: boolean;\n avr: boolean;\n arm: boolean;\n powerPC: boolean;\n amd: boolean;\n intel: boolean;\n\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'cpu') {\n super(ua, flags, cssFlagsPrefix);\n\n this.booleanFlagsValuePropertyName = 'vendor';\n\n this.platform = this.getPlatform();\n this.cores = this.getCores();\n this.architecture = this.getArchitecture();\n\n this.sparc = this.getSparc();\n this.irix = this.getIrix();\n this.mips = this.getMips();\n this.risc = this.getRisc();\n this.avr = this.getAvr();\n this.arm = this.getArm();\n this.powerPC = this.getPowerPC();\n this.amd = this.getAmd();\n this.intel = this.getIntel();\n }\n\n /**\n *\n *\n * @returns number\n *\n * @memberOf CPU\n */\n getCores() {\n return this.navigator.hardwareConcurrency || 1;\n }\n\n /**\n *\n *\n * @returns string\n *\n * @memberOf CPU\n */\n getPlatform() {\n return this.navigator.platform || 'Win32';\n }\n\n /**\n *\n *\n * @returns string\n *\n * @memberOf CPU\n */\n getArchitecture() {\n // @ts-ignore\n let cpuClass = this.navigator.cpuClass || 'x86';\n\n if (\n Asserts.one([\n cpuClass === 'x64',\n ['Win64', 'MacIntel', 'Linux x86_64', 'Linux i686'].includes(this.navigator.platform),\n /(?:x86_64|x86-64|win64|wow64|x64;|amd64|arm64|ia64|sparc64|ppc64|mips64|pa-risc64|irix64|ppc64|powerpc64)/i.test(\n this.ua\n )\n ])\n ) {\n cpuClass = 'x64';\n }\n\n return cpuClass;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getSparc() {\n return Asserts.one([/(sun4\\w)[;\\)]/i.test(this.ua), /sparc(?:64)?(?=;);/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getIrix() {\n return Asserts.all([/irix(?:64)?(?=;);/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getMips() {\n return Asserts.all([/mips(?:64)?(?=;);/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getRisc() {\n return Asserts.all([/pa-risc(?:64)?(?=;);/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getAvr() {\n return Asserts.all([/(?=atmel\\s)avr/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getArm() {\n return Asserts.one([/windows\\s(ce|mobile);\\sppc;/i.test(this.ua), /arm(?:64|(?=v\\d+[;l]))/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getPowerPC() {\n return Asserts.one([/((?:ppc|powerpc)(?:64)?)(?:\\smac|;|\\))/i.test(this.ua), this.navigator.platform === 'MacPPC']);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getAmd() {\n return (\n Asserts.one([\n /(?:(amd(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i.test(this.ua),\n // @ts-ignore\n this.navigator.cpuClass === 'x64',\n this.navigator.platform === 'Linux x86_64'\n ]) ||\n Asserts.one([\n /(?:(amd(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i.test(this.ua),\n /((?:i[346]|x)86)[;\\)]/i.test(this.ua),\n // @ts-ignore\n this.navigator.cpuClass === 'x86'\n ])\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getIntel() {\n return (\n Asserts.one([\n /(?:avr32|ia64(?=;))|68k(?=\\))/i.test(this.ua),\n /(?:(x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i.test(this.ua),\n // @ts-ignore\n this.navigator.cpuClass === 'x64',\n this.navigator.platform === 'MacIntel',\n this.navigator.platform === 'Linux x86_64'\n ]) ||\n Asserts.one([\n /(?:(x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i.test(this.ua),\n /(ia32(?=;))/i.test(this.ua),\n /((?:i[346]|x)86)[;\\)]/i.test(this.ua),\n // @ts-ignore\n this.navigator.cpuClass === 'x86'\n ])\n );\n }\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class GPU\n * @extends {CssFlagsClass}\n */\nexport class GPU extends CssFlagsClass {\n webGLVendor: string;\n webGLRenderer: string;\n vendor: string;\n model: string;\n renderer: string;\n\n #canvas: HTMLCanvasElement;\n #info: { webGLVendor: string; webGLRenderer: string; vendor: string; model: string; renderer: string };\n\n /**\n * Creates an instance of GPU.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='gpu']\n *\n * @memberOf GPU\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'gpu') {\n super(ua, flags, cssFlagsPrefix);\n\n this.#createTestElements();\n\n this.webGLVendor = this.#info.webGLVendor;\n this.webGLRenderer = this.#info.webGLRenderer;\n this.vendor = this.#info.vendor;\n this.model = this.#info.model;\n this.renderer = this.#info.renderer;\n }\n\n /**\n *\n *\n *\n * @memberOf GPU\n */\n #createTestElements() {\n this.#canvas = this.document.createElement('canvas');\n this.#info = this.getInfo();\n }\n\n // /**\n // *\n // *\n // *\n // * @memberOf GPU\n // */\n // _destroyTestElements() {\n // this._canvas = null;\n // this._info = null;\n\n // delete this._canvas;\n // delete this._info;\n // }\n\n /**\n *\n *\n * @returns object\n *\n * @memberOf GPU\n */\n getInfo() {\n const info = {\n webGLVendor: 'n/a',\n webGLRenderer: 'n/a',\n vendor: 'n/a',\n model: 'n/a',\n renderer: 'n/a'\n };\n\n try {\n const webGLContext: WebGLRenderingContext | RenderingContext =\n this.#canvas.getContext('webgl')! ?? this.#canvas.getContext('experimental-webgl')!;\n\n if (webGLContext) {\n const dbgRenderInfo = webGLContext.getExtension('WEBGL_debug_renderer_info');\n\n if (dbgRenderInfo != null) {\n // @ts-ignore\n info.merge({\n vendor: webGLContext.getParameter(dbgRenderInfo.UNMASKED_VENDOR_WEBGL),\n model: webGLContext.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL).replace(' OpenGL Engine', ''),\n renderer: webGLContext.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL)\n });\n }\n\n // @ts-ignore\n info.merge({\n webGLVendor: webGLContext.getParameter(webGLContext.VENDOR),\n webGLRenderer: webGLContext.getParameter(webGLContext.RENDERER)\n });\n }\n } catch (e) {\n console.warn('webGL is not supported', e.message);\n }\n\n return info;\n }\n}\n"],"names":[],"version":3,"file":"hardware.js.map"} \ No newline at end of file diff --git a/packages/hardware/dist/hardware.mjs b/packages/hardware/dist/hardware.mjs new file mode 100644 index 0000000..c9c3f2a --- /dev/null +++ b/packages/hardware/dist/hardware.mjs @@ -0,0 +1,448 @@ +import {Asserts as $kXPso$Asserts, CssFlagsClass as $kXPso$CssFlagsClass} from "@detector-js/core"; + +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} +var $8a3b30760b8675e4$exports = {}; + +$parcel$export($8a3b30760b8675e4$exports, "Platform", () => $8a3b30760b8675e4$export$2dffd0b5373a4389); + +class $8a3b30760b8675e4$export$2dffd0b5373a4389 extends (0, $kXPso$CssFlagsClass) { + /** + * Creates an instance of Platform. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='platform'] + * + * @memberOf Platform + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "platform"){ + super(ua, flags, cssFlagsPrefix); + } + /** + * + * + * @readonly + * @memberOf Platform + */ get bot() { + return (0, $kXPso$Asserts).one([ + /googlebot/i.test(this.ua) + ]); + } + /** + * + * + * @readonly + * @memberof Platform + */ get console() { + return (0, $kXPso$Asserts).all([ + /(?:xbox|playstation|nintendo|archos.*gamepad([2]?))/i.test(this.ua), + !/(?:xbmc|kodi|nexbox|newfoxbox)/i.test(this.ua) + ]); + } + /** + * + * + * @readonly + * @memberof Platform + */ get tv() { + return (0, $kXPso$Asserts).one([ + /(?:google|smart(?:-)|internet\.|(?:i)net|apple|(?:pov|aoc)\_|hbb|web|sonyd|vs|cloud)tv/i.test(this.ua), + /(?:viera|bravia|bangolufsen|humax|airties|netcast|owb|grundig|thom(?:son)|arcelik|telefunken|panasonic|hisense|boxee|kylo|dlnadoc|ce-html|tb-pO1|netbox|tv(\s?:box|build))/i.test(this.ua) + ]) && (0, $kXPso$Asserts).one([ + !this.mobile, + !this.bot, + this.flags.feature.fullscreenKeyboard + ]) && (0, $kXPso$Asserts).one([ + this.flags.os.Android, + this.flags.os.Tizen, + this.flags.os.WebOS + ]); + } + /** + * + * + * @readonly + * + * @memberOf Platform + */ get tablet() { + return (0, $kXPso$Asserts).all([ + this.mobile, + /(ipad|tab(?:let)|kindle|playbook|vega|sm-t|lenovo\st(?:a)b)/i.test(this.ua) + ]); + } + /** + * + * + * @readonly + * + * @memberOf Platform + */ get smartphone() { + return (0, $kXPso$Asserts).all([ + this.mobile, + !this.tablet + ]); + } + /** + * + * + * @readonly + * + * @memberOf Platform + */ get mobile() { + return (0, $kXPso$Asserts).one([ + this.flags.feature.deviceMotion, + this.flags.feature.deviceOrientation, + this.flags.feature.pixelRatio > 1 + ]) && (0, $kXPso$Asserts).one([ + this.flags.feature.touch, + this.flags.feature.forceTouch, + [ + "ChromeMobile", + "EdgeMobile", + "IEMobile", + "FirefoxMobile", + "MaxthonMobile", + "OperaMobile", + "SafariMobile" + ].includes(this.flags.browser.name) + ]) && (0, $kXPso$Asserts).all([ + !this.flags.feature.pointerEvents, + this.flags.feature.file + ]) || (0, $kXPso$Asserts).all([ + [ + "Android", + "iOS", + "WindowsPhone", + "Bada", + "Blackberry", + "Contiki", + "MeeGo", + "RIM", + "QNX", + "Palm", + "Symbian", + "WebOS" + ].includes(this.flags.os.name), + [ + "ChromeMobile", + "EdgeMobile", + "IEMobile", + "FirefoxMobile", + "MaxthonMobile", + "OperaMobile", + "SafariMobile" + ].includes(this.flags.browser.name) + ]); + } + /** + * + * + * @readonly + * @memberOf Platform + */ get desktop() { + return (0, $kXPso$Asserts).all([ + !this.bot, + !this.console, + !this.mobile, + !this.tv + ]); + } + toValues() { + const proto = Object.getPrototypeOf(this); + const protoProperties = Object.getOwnPropertyNames(proto).filter((prop)=>{ + return !!Object.getOwnPropertyDescriptors(proto)[prop].get && !!this[prop]; + }); + return protoProperties[0] || "n/a"; + } +} + + +var $706aaf1de3a3b693$exports = {}; + +$parcel$export($706aaf1de3a3b693$exports, "Device", () => $706aaf1de3a3b693$export$8215d14a63d9fb10); + +class $706aaf1de3a3b693$export$8215d14a63d9fb10 extends (0, $kXPso$CssFlagsClass) { + /** + * Creates an instance of Device. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='device'] + * + * @memberOf Device + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "device"){ + super(ua, flags, cssFlagsPrefix); + } +} + + +var $882ec8e9ec1b87e1$exports = {}; + +$parcel$export($882ec8e9ec1b87e1$exports, "CPU", () => $882ec8e9ec1b87e1$export$5ebf4cde340e6028); + +class $882ec8e9ec1b87e1$export$5ebf4cde340e6028 extends (0, $kXPso$CssFlagsClass) { + constructor(ua = null, flags = {}, cssFlagsPrefix = "cpu"){ + super(ua, flags, cssFlagsPrefix); + this.booleanFlagsValuePropertyName = "vendor"; + this.platform = this.getPlatform(); + this.cores = this.getCores(); + this.architecture = this.getArchitecture(); + this.sparc = this.getSparc(); + this.irix = this.getIrix(); + this.mips = this.getMips(); + this.risc = this.getRisc(); + this.avr = this.getAvr(); + this.arm = this.getArm(); + this.powerPC = this.getPowerPC(); + this.amd = this.getAmd(); + this.intel = this.getIntel(); + } + /** + * + * + * @returns number + * + * @memberOf CPU + */ getCores() { + return this.navigator.hardwareConcurrency || 1; + } + /** + * + * + * @returns string + * + * @memberOf CPU + */ getPlatform() { + return this.navigator.platform || "Win32"; + } + /** + * + * + * @returns string + * + * @memberOf CPU + */ getArchitecture() { + // @ts-ignore + let cpuClass = this.navigator.cpuClass || "x86"; + if ((0, $kXPso$Asserts).one([ + cpuClass === "x64", + [ + "Win64", + "MacIntel", + "Linux x86_64", + "Linux i686" + ].includes(this.navigator.platform), + /(?:x86_64|x86-64|win64|wow64|x64;|amd64|arm64|ia64|sparc64|ppc64|mips64|pa-risc64|irix64|ppc64|powerpc64)/i.test(this.ua) + ])) cpuClass = "x64"; + return cpuClass; + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getSparc() { + return (0, $kXPso$Asserts).one([ + /(sun4\w)[;\)]/i.test(this.ua), + /sparc(?:64)?(?=;);/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getIrix() { + return (0, $kXPso$Asserts).all([ + /irix(?:64)?(?=;);/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getMips() { + return (0, $kXPso$Asserts).all([ + /mips(?:64)?(?=;);/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getRisc() { + return (0, $kXPso$Asserts).all([ + /pa-risc(?:64)?(?=;);/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getAvr() { + return (0, $kXPso$Asserts).all([ + /(?=atmel\s)avr/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getArm() { + return (0, $kXPso$Asserts).one([ + /windows\s(ce|mobile);\sppc;/i.test(this.ua), + /arm(?:64|(?=v\d+[;l]))/i.test(this.ua) + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getPowerPC() { + return (0, $kXPso$Asserts).one([ + /((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i.test(this.ua), + this.navigator.platform === "MacPPC" + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getAmd() { + return (0, $kXPso$Asserts).one([ + /(?:(amd(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i.test(this.ua), + // @ts-ignore + this.navigator.cpuClass === "x64", + this.navigator.platform === "Linux x86_64" + ]) || (0, $kXPso$Asserts).one([ + /(?:(amd(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i.test(this.ua), + /((?:i[346]|x)86)[;\)]/i.test(this.ua), + // @ts-ignore + this.navigator.cpuClass === "x86" + ]); + } + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ getIntel() { + return (0, $kXPso$Asserts).one([ + /(?:avr32|ia64(?=;))|68k(?=\))/i.test(this.ua), + /(?:(x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i.test(this.ua), + // @ts-ignore + this.navigator.cpuClass === "x64", + this.navigator.platform === "MacIntel", + this.navigator.platform === "Linux x86_64" + ]) || (0, $kXPso$Asserts).one([ + /(?:(x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i.test(this.ua), + /(ia32(?=;))/i.test(this.ua), + /((?:i[346]|x)86)[;\)]/i.test(this.ua), + // @ts-ignore + this.navigator.cpuClass === "x86" + ]); + } +} + + +var $8096443807d82e67$exports = {}; + +$parcel$export($8096443807d82e67$exports, "GPU", () => $8096443807d82e67$export$f9febed8cec1c27c); + +class $8096443807d82e67$export$f9febed8cec1c27c extends (0, $kXPso$CssFlagsClass) { + #canvas; + #info; + /** + * Creates an instance of GPU. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='gpu'] + * + * @memberOf GPU + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "gpu"){ + super(ua, flags, cssFlagsPrefix); + this.#createTestElements(); + this.webGLVendor = this.#info.webGLVendor; + this.webGLRenderer = this.#info.webGLRenderer; + this.vendor = this.#info.vendor; + this.model = this.#info.model; + this.renderer = this.#info.renderer; + } + /** + * + * + * + * @memberOf GPU + */ #createTestElements() { + this.#canvas = this.document.createElement("canvas"); + this.#info = this.getInfo(); + } + // /** + // * + // * + // * + // * @memberOf GPU + // */ + // _destroyTestElements() { + // this._canvas = null; + // this._info = null; + // delete this._canvas; + // delete this._info; + // } + /** + * + * + * @returns object + * + * @memberOf GPU + */ getInfo() { + const info = { + webGLVendor: "n/a", + webGLRenderer: "n/a", + vendor: "n/a", + model: "n/a", + renderer: "n/a" + }; + try { + const webGLContext = this.#canvas.getContext("webgl") ?? this.#canvas.getContext("experimental-webgl"); + if (webGLContext) { + const dbgRenderInfo = webGLContext.getExtension("WEBGL_debug_renderer_info"); + if (dbgRenderInfo != null) // @ts-ignore + info.merge({ + vendor: webGLContext.getParameter(dbgRenderInfo.UNMASKED_VENDOR_WEBGL), + model: webGLContext.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL).replace(" OpenGL Engine", ""), + renderer: webGLContext.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL) + }); + // @ts-ignore + info.merge({ + webGLVendor: webGLContext.getParameter(webGLContext.VENDOR), + webGLRenderer: webGLContext.getParameter(webGLContext.RENDERER) + }); + } + } catch (e) { + console.warn("webGL is not supported", e.message); + } + return info; + } +} + + +"use strict"; + + +export {$8a3b30760b8675e4$export$2dffd0b5373a4389 as Platform, $706aaf1de3a3b693$export$8215d14a63d9fb10 as Device, $882ec8e9ec1b87e1$export$5ebf4cde340e6028 as CPU, $8096443807d82e67$export$f9febed8cec1c27c as GPU}; +//# sourceMappingURL=hardware.mjs.map diff --git a/packages/hardware/dist/hardware.mjs.map b/packages/hardware/dist/hardware.mjs.map new file mode 100644 index 0000000..e5e5030 --- /dev/null +++ b/packages/hardware/dist/hardware.mjs.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;ACAA;AAQO,MAAM,kDAAiB,CAAA,GAAA,oBAAa,AAAD;IACxC;;;;;;;GAOC,GACD,YAAY,KAAoB,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,iBAAiB,UAAU,CAAE;QAC7E,KAAK,CAAC,IAAI,OAAO;IACnB;IAEA;;;;;GAKC,GACD,IAAI,MAAM;QACR,OAAO,CAAA,GAAA,cAAO,AAAD,EAAE,G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AAC,UAAU,CAAC;YAE/D,IAAI,cAAc;gBAChB,MAAM,gBAAgB,aAAa,YAAY,CAAC;gBAEhD,IAAI,iBAAiB,IAAI,EACvB,aAAa;gBACb,KAAK,KAAK,CAAC;oBACT,QAAQ,aAAa,YAAY,CAAC,cAAc,qBAAqB;oBACrE,OAAO,aAAa,YAAY,CAAC,cAAc,uBAAuB,EAAE,OAAO,CAAC,kBAAkB;oBAClG,UAAU,aAAa,YAAY,CAAC,cAAc,uBAAuB;gBAC3E;gBAGF,aAAa;gBACb,KAAK,KAAK,CAAC;oBACT,aAAa,aAAa,YAAY,CAAC,aAAa,MAAM;oBAC1D,eAAe,aAAa,YAAY,CAAC,aAAa,QAAQ;gBAChE;YACF,CAAC;QACH,EAAE,OAAO,GAAG;YACV,QAAQ,IAAI,CAAC,0BAA0B,EAAE,OAAO;QAClD;QAEA,OAAO;IACT;AACF;;;AJ5GA","sources":["packages/hardware/lib/hardware.ts","packages/hardware/lib/platform.ts","packages/hardware/lib/device.ts","packages/hardware/lib/cpu.ts","packages/hardware/lib/gpu.ts"],"sourcesContent":["'use strict';\n\nexport * from './platform';\nexport * from './device';\nexport * from './cpu';\nexport * from './gpu';\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n/**\n *\n *\n * @export\n * @class Platform\n * @extends {CssFlagsClass}\n */\nexport class Platform extends CssFlagsClass {\n /**\n * Creates an instance of Platform.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='platform']\n *\n * @memberOf Platform\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'platform') {\n super(ua, flags, cssFlagsPrefix);\n }\n\n /**\n *\n *\n * @readonly\n * @memberOf Platform\n */\n get bot() {\n return Asserts.one([/googlebot/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @readonly\n * @memberof Platform\n */\n get console() {\n return Asserts.all([\n /(?:xbox|playstation|nintendo|archos.*gamepad([2]?))/i.test(this.ua),\n !/(?:xbmc|kodi|nexbox|newfoxbox)/i.test(this.ua)\n ]);\n }\n\n /**\n *\n *\n * @readonly\n * @memberof Platform\n */\n get tv() {\n return (\n Asserts.one([\n /(?:google|smart(?:-)|internet\\.|(?:i)net|apple|(?:pov|aoc)\\_|hbb|web|sonyd|vs|cloud)tv/i.test(this.ua),\n /(?:viera|bravia|bangolufsen|humax|airties|netcast|owb|grundig|thom(?:son)|arcelik|telefunken|panasonic|hisense|boxee|kylo|dlnadoc|ce-html|tb-pO1|netbox|tv(\\s?:box|build))/i.test(\n this.ua\n )\n ]) &&\n Asserts.one([!this.mobile, !this.bot, this.flags.feature.fullscreenKeyboard]) &&\n Asserts.one([this.flags.os.Android, this.flags.os.Tizen, this.flags.os.WebOS])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Platform\n */\n get tablet() {\n return Asserts.all([this.mobile, /(ipad|tab(?:let)|kindle|playbook|vega|sm-t|lenovo\\st(?:a)b)/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Platform\n */\n get smartphone() {\n return Asserts.all([this.mobile, !this.tablet]);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Platform\n */\n get mobile() {\n return (\n (Asserts.one([\n this.flags.feature.deviceMotion,\n this.flags.feature.deviceOrientation,\n this.flags.feature.pixelRatio > 1\n ]) &&\n Asserts.one([\n this.flags.feature.touch,\n this.flags.feature.forceTouch,\n [\n 'ChromeMobile',\n 'EdgeMobile',\n 'IEMobile',\n 'FirefoxMobile',\n 'MaxthonMobile',\n 'OperaMobile',\n 'SafariMobile'\n ].includes(this.flags.browser.name)\n ]) &&\n Asserts.all([!this.flags.feature.pointerEvents, this.flags.feature.file])) ||\n Asserts.all([\n [\n 'Android',\n 'iOS',\n 'WindowsPhone',\n 'Bada',\n 'Blackberry',\n 'Contiki',\n 'MeeGo',\n 'RIM',\n 'QNX',\n 'Palm',\n 'Symbian',\n 'WebOS'\n ].includes(this.flags.os.name),\n [\n 'ChromeMobile',\n 'EdgeMobile',\n 'IEMobile',\n 'FirefoxMobile',\n 'MaxthonMobile',\n 'OperaMobile',\n 'SafariMobile'\n ].includes(this.flags.browser.name)\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n * @memberOf Platform\n */\n get desktop() {\n return Asserts.all([!this.bot, !this.console, !this.mobile, !this.tv]);\n }\n\n toValues() {\n const proto = Object.getPrototypeOf(this);\n\n const protoProperties = Object.getOwnPropertyNames(proto).filter((prop) => {\n return !!Object.getOwnPropertyDescriptors(proto)[prop].get && !!this[prop];\n });\n\n return protoProperties[0] || 'n/a';\n }\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class Device\n * @extends {CssFlagsClass}\n */\nexport class Device extends CssFlagsClass {\n /**\n * Creates an instance of Device.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='device']\n *\n * @memberOf Device\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'device') {\n super(ua, flags, cssFlagsPrefix);\n }\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\nexport class CPU extends CssFlagsClass {\n platform: string;\n cores: number;\n architecture: string;\n\n sparc: boolean;\n irix: boolean;\n mips: boolean;\n risc: boolean;\n avr: boolean;\n arm: boolean;\n powerPC: boolean;\n amd: boolean;\n intel: boolean;\n\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'cpu') {\n super(ua, flags, cssFlagsPrefix);\n\n this.booleanFlagsValuePropertyName = 'vendor';\n\n this.platform = this.getPlatform();\n this.cores = this.getCores();\n this.architecture = this.getArchitecture();\n\n this.sparc = this.getSparc();\n this.irix = this.getIrix();\n this.mips = this.getMips();\n this.risc = this.getRisc();\n this.avr = this.getAvr();\n this.arm = this.getArm();\n this.powerPC = this.getPowerPC();\n this.amd = this.getAmd();\n this.intel = this.getIntel();\n }\n\n /**\n *\n *\n * @returns number\n *\n * @memberOf CPU\n */\n getCores() {\n return this.navigator.hardwareConcurrency || 1;\n }\n\n /**\n *\n *\n * @returns string\n *\n * @memberOf CPU\n */\n getPlatform() {\n return this.navigator.platform || 'Win32';\n }\n\n /**\n *\n *\n * @returns string\n *\n * @memberOf CPU\n */\n getArchitecture() {\n // @ts-ignore\n let cpuClass = this.navigator.cpuClass || 'x86';\n\n if (\n Asserts.one([\n cpuClass === 'x64',\n ['Win64', 'MacIntel', 'Linux x86_64', 'Linux i686'].includes(this.navigator.platform),\n /(?:x86_64|x86-64|win64|wow64|x64;|amd64|arm64|ia64|sparc64|ppc64|mips64|pa-risc64|irix64|ppc64|powerpc64)/i.test(\n this.ua\n )\n ])\n ) {\n cpuClass = 'x64';\n }\n\n return cpuClass;\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getSparc() {\n return Asserts.one([/(sun4\\w)[;\\)]/i.test(this.ua), /sparc(?:64)?(?=;);/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getIrix() {\n return Asserts.all([/irix(?:64)?(?=;);/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getMips() {\n return Asserts.all([/mips(?:64)?(?=;);/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getRisc() {\n return Asserts.all([/pa-risc(?:64)?(?=;);/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getAvr() {\n return Asserts.all([/(?=atmel\\s)avr/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getArm() {\n return Asserts.one([/windows\\s(ce|mobile);\\sppc;/i.test(this.ua), /arm(?:64|(?=v\\d+[;l]))/i.test(this.ua)]);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getPowerPC() {\n return Asserts.one([/((?:ppc|powerpc)(?:64)?)(?:\\smac|;|\\))/i.test(this.ua), this.navigator.platform === 'MacPPC']);\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getAmd() {\n return (\n Asserts.one([\n /(?:(amd(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i.test(this.ua),\n // @ts-ignore\n this.navigator.cpuClass === 'x64',\n this.navigator.platform === 'Linux x86_64'\n ]) ||\n Asserts.one([\n /(?:(amd(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i.test(this.ua),\n /((?:i[346]|x)86)[;\\)]/i.test(this.ua),\n // @ts-ignore\n this.navigator.cpuClass === 'x86'\n ])\n );\n }\n\n /**\n *\n *\n * @returns boolean\n *\n * @memberOf CPU\n */\n getIntel() {\n return (\n Asserts.one([\n /(?:avr32|ia64(?=;))|68k(?=\\))/i.test(this.ua),\n /(?:(x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i.test(this.ua),\n // @ts-ignore\n this.navigator.cpuClass === 'x64',\n this.navigator.platform === 'MacIntel',\n this.navigator.platform === 'Linux x86_64'\n ]) ||\n Asserts.one([\n /(?:(x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i.test(this.ua),\n /(ia32(?=;))/i.test(this.ua),\n /((?:i[346]|x)86)[;\\)]/i.test(this.ua),\n // @ts-ignore\n this.navigator.cpuClass === 'x86'\n ])\n );\n }\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class GPU\n * @extends {CssFlagsClass}\n */\nexport class GPU extends CssFlagsClass {\n webGLVendor: string;\n webGLRenderer: string;\n vendor: string;\n model: string;\n renderer: string;\n\n #canvas: HTMLCanvasElement;\n #info: { webGLVendor: string; webGLRenderer: string; vendor: string; model: string; renderer: string };\n\n /**\n * Creates an instance of GPU.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='gpu']\n *\n * @memberOf GPU\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'gpu') {\n super(ua, flags, cssFlagsPrefix);\n\n this.#createTestElements();\n\n this.webGLVendor = this.#info.webGLVendor;\n this.webGLRenderer = this.#info.webGLRenderer;\n this.vendor = this.#info.vendor;\n this.model = this.#info.model;\n this.renderer = this.#info.renderer;\n }\n\n /**\n *\n *\n *\n * @memberOf GPU\n */\n #createTestElements() {\n this.#canvas = this.document.createElement('canvas');\n this.#info = this.getInfo();\n }\n\n // /**\n // *\n // *\n // *\n // * @memberOf GPU\n // */\n // _destroyTestElements() {\n // this._canvas = null;\n // this._info = null;\n\n // delete this._canvas;\n // delete this._info;\n // }\n\n /**\n *\n *\n * @returns object\n *\n * @memberOf GPU\n */\n getInfo() {\n const info = {\n webGLVendor: 'n/a',\n webGLRenderer: 'n/a',\n vendor: 'n/a',\n model: 'n/a',\n renderer: 'n/a'\n };\n\n try {\n const webGLContext: WebGLRenderingContext | RenderingContext =\n this.#canvas.getContext('webgl')! ?? this.#canvas.getContext('experimental-webgl')!;\n\n if (webGLContext) {\n const dbgRenderInfo = webGLContext.getExtension('WEBGL_debug_renderer_info');\n\n if (dbgRenderInfo != null) {\n // @ts-ignore\n info.merge({\n vendor: webGLContext.getParameter(dbgRenderInfo.UNMASKED_VENDOR_WEBGL),\n model: webGLContext.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL).replace(' OpenGL Engine', ''),\n renderer: webGLContext.getParameter(dbgRenderInfo.UNMASKED_RENDERER_WEBGL)\n });\n }\n\n // @ts-ignore\n info.merge({\n webGLVendor: webGLContext.getParameter(webGLContext.VENDOR),\n webGLRenderer: webGLContext.getParameter(webGLContext.RENDERER)\n });\n }\n } catch (e) {\n console.warn('webGL is not supported', e.message);\n }\n\n return info;\n }\n}\n"],"names":[],"version":3,"file":"hardware.mjs.map"} \ No newline at end of file diff --git a/packages/hardware/dist/hardware.types.d.ts b/packages/hardware/dist/hardware.types.d.ts new file mode 100644 index 0000000..bd42350 --- /dev/null +++ b/packages/hardware/dist/hardware.types.d.ts @@ -0,0 +1,241 @@ +import { CssFlagsClass } from "@detector-js/core"; +/** + * + * + * @export + * @class Platform + * @extends {CssFlagsClass} + */ +export class Platform extends CssFlagsClass { + /** + * Creates an instance of Platform. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='platform'] + * + * @memberOf Platform + */ + constructor(ua?: string | null, flags?: {}, cssFlagsPrefix?: string); + /** + * + * + * @readonly + * @memberOf Platform + */ + get bot(): boolean; + /** + * + * + * @readonly + * @memberof Platform + */ + get console(): boolean; + /** + * + * + * @readonly + * @memberof Platform + */ + get tv(): boolean; + /** + * + * + * @readonly + * + * @memberOf Platform + */ + get tablet(): boolean; + /** + * + * + * @readonly + * + * @memberOf Platform + */ + get smartphone(): boolean; + /** + * + * + * @readonly + * + * @memberOf Platform + */ + get mobile(): boolean; + /** + * + * + * @readonly + * @memberOf Platform + */ + get desktop(): boolean; + toValues(): string; +} +/** + * + * + * @export + * @class Device + * @extends {CssFlagsClass} + */ +export class Device extends CssFlagsClass { + /** + * Creates an instance of Device. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='device'] + * + * @memberOf Device + */ + constructor(ua?: string | null, flags?: {}, cssFlagsPrefix?: string); +} +export class CPU extends CssFlagsClass { + platform: string; + cores: number; + architecture: string; + sparc: boolean; + irix: boolean; + mips: boolean; + risc: boolean; + avr: boolean; + arm: boolean; + powerPC: boolean; + amd: boolean; + intel: boolean; + constructor(ua?: string | null, flags?: {}, cssFlagsPrefix?: string); + /** + * + * + * @returns number + * + * @memberOf CPU + */ + getCores(): number; + /** + * + * + * @returns string + * + * @memberOf CPU + */ + getPlatform(): string; + /** + * + * + * @returns string + * + * @memberOf CPU + */ + getArchitecture(): any; + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ + getSparc(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ + getIrix(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ + getMips(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ + getRisc(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ + getAvr(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ + getArm(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ + getPowerPC(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ + getAmd(): boolean; + /** + * + * + * @returns boolean + * + * @memberOf CPU + */ + getIntel(): boolean; +} +/** + * + * + * @export + * @class GPU + * @extends {CssFlagsClass} + */ +export class GPU extends CssFlagsClass { + #private; + webGLVendor: string; + webGLRenderer: string; + vendor: string; + model: string; + renderer: string; + /** + * Creates an instance of GPU. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='gpu'] + * + * @memberOf GPU + */ + constructor(ua?: string | null, flags?: {}, cssFlagsPrefix?: string); + /** + * + * + * @returns object + * + * @memberOf GPU + */ + getInfo(): { + webGLVendor: string; + webGLRenderer: string; + vendor: string; + model: string; + renderer: string; + }; +} + +//# sourceMappingURL=hardware.types.d.ts.map diff --git a/packages/hardware/dist/hardware.types.d.ts.map b/packages/hardware/dist/hardware.types.d.ts.map new file mode 100644 index 0000000..3f4ab26 --- /dev/null +++ b/packages/hardware/dist/hardware.types.d.ts.map @@ -0,0 +1 @@ +{"mappings":";AACA;;;;;;GAMG;AACH,qBAAsB,SAAQ,aAAa;IACzC;;;;;;;OAOG;gBACS,EAAE,GAAE,MAAM,GAAG,IAAW,EAAE,KAAK,KAAK,EAAE,cAAc,SAAa;IAI7E;;;;;OAKG;IACH,IAAI,GAAG,YAEN;IAED;;;;;OAKG;IACH,IAAI,OAAO,YAKV;IAED;;;;;OAKG;IACH,IAAI,EAAE,YAWL;IAED;;;;;;OAMG;IACH,IAAI,MAAM,YAET;IAED;;;;;;OAMG;IACH,IAAI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AC;IACd,QAAQ,EAAE,MAAM,CAAC;IAKjB;;;;;;;OAOG;gBACS,EAAE,GAAE,MAAM,GAAG,IAAW,EAAE,KAAK,KAAK,EAAE,cAAc,SAAQ;IAqCxE;;;;;;OAMG;IACH,OAAO;;;;;;;CAqCR","sources":["packages/hardware/lib/lib/platform.ts","packages/hardware/lib/lib/device.ts","packages/hardware/lib/lib/cpu.ts","packages/hardware/lib/lib/gpu.ts","packages/hardware/lib/lib/hardware.ts","packages/hardware/lib/hardware.ts"],"sourcesContent":[null,null,null,null,null,"'use strict';\n\nexport * from './platform';\nexport * from './device';\nexport * from './cpu';\nexport * from './gpu';\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n"],"names":[],"version":3,"file":"hardware.types.d.ts.map"} \ No newline at end of file diff --git a/packages/software/dist/software.js b/packages/software/dist/software.js new file mode 100644 index 0000000..5b72fd7 --- /dev/null +++ b/packages/software/dist/software.js @@ -0,0 +1,2063 @@ +var $dlFi5$detectorjscore = require("@detector-js/core"); + +function $parcel$exportWildcard(dest, source) { + Object.keys(source).forEach(function(key) { + if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) { + return; + } + + Object.defineProperty(dest, key, { + enumerable: true, + get: function get() { + return source[key]; + } + }); + }); + + return dest; +} +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} +var $ef23c985e5649af8$exports = {}; + +$parcel$export($ef23c985e5649af8$exports, "Browser", () => $ef23c985e5649af8$export$5fefc2586e00a689); + +class $ef23c985e5649af8$export$5fefc2586e00a689 extends (0, $dlFi5$detectorjscore.CssFlagsClass) { + #reStrVerNum; + #reStrVer; + #reVer; + /** + * Creates an instance of Browser. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='browser'] + * + * @memberOf Browser + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "browser"){ + super(ua, flags, cssFlagsPrefix); + this.#createTestElements(); + this.setVersion(); + } + /** + * + * + * + * @memberOf Browser + */ #createTestElements() { + this.#reStrVerNum = "(?:\\:|\\s|\\/)?(?:(\\w+(?:(?:\\.|\\_)\\w+)+)|\\d+)?"; + this.#reStrVer = "(?:version)" + this.#reStrVerNum; + this.#reVer = new RegExp(this.#reStrVer, "i"); + this.ua.match(this.#reVer); + } + // /** + // * + // * + // * + // * @memberOf Browser + // */ + // _destroyTestElements() { + // this._reStrVerNum = null; + // this._reStrVer = null; + // this._reVer = null; + // delete this._reStrVerNum; + // delete this._reStrVer; + // delete this._reVer; + // } + #reTest(reStr = this.#reStrVer) { + return new RegExp(reStr, "i").test(this.ua); + } + //#region Un-Common/Rare/Mythic Browsers + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Amaya() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:amaya)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Arora() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:arora)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Avant() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:avant(?:sbrowser))" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Baidu() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:(?:b(?:(?:a)?idu)?(?:d)?)(?:browser)(?:\\_i18n)?)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Basilisk() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:basilisk)" + this.#reStrVer) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get BlackBerry() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:blackberry|bb.*;.*\\)\\s)" + this.#reStrVer) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Blazer() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:blazer)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Bolt() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:bolt)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Brave() { + return this.#checkAssertsResult(// @ts-ignore + (0, $dlFi5$detectorjscore.Asserts).one([ + !!window.navigator.brave || !!window.navigator.Brave, + this.#reTest("(?:brave)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Camino() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:camino)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Chimera() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:chimera)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get ComodoDragon() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:comodo(?:\\_|\\s)dragon)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Conkeror() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:conkeror)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Dillo() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:dillo)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Dolphin() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:dolfin)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Dorado() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:dorado.+ser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Doris() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:doris)" + this.#reStrVerNum) + ])); + } + #getElectronVersion() { + return this.process?.versions?.electron ?? "n/a"; + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Electron() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + // @ts-ignore + ()=>this.process.type === "renderer", + ()=>!!this.process.versions.electron, + ()=>!!this.navigator && this.#reTest("electron") // Detect the user agent when the `nodeIntegration` option is set to true + ], true), false, this.#getElectronVersion()); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Epiphany() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:epiphany)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Falkon() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:falkon)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Fennec() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:fennec)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Firebird() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:firebird)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Flock() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:flock)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get GoBrowser() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:gobrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get GoogleBot() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:googlebot)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get iCab() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:icab)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IceApe() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:iceape)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IceBrowser() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:ices?browser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IceCat() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:icecat)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IceDragon() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:icedragon)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Iridium() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:iridium)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Iron() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:iron)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Jasmine() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:jasmine)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Konqueror() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:konqueror)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get KMeleon() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:k-meleon)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Links() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:links)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Linx() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:lynx)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Lunascape() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:lunascape)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Maemo() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:maemosbrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get MaxthonMobile() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:mxios)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Maxthon() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + !this.MaxthonMobile, + this.#reTest("(?:maxthon|mxnitro)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Midori() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:midori)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Minimo() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:minimo)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get MIUIBrowser() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:xiaomi\\/miuibrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Mosaic() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:mosaic)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get MZBrowser() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:MZBrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Netfront() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:netfront)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Netscape() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:navigator|netscape)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get NetSurf() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:netsurf)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get NokiaBrowser() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:nokias?browser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OmniWeb() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:omniweb)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OviBrowser() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:ovibrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Palemoon() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:palemoon)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Phoenix() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:phoenix)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get PhantomJS() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:phantomjs)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Polaris() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:polaris)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Puffin() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:puffin)" + this.#reStrVerNum) + ]), true); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get QQBrowserMobile() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:mqq(?:browser)?)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get QQBrowser() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + !this.QQBrowserMobile, + this.#reTest("(?:qq(?:browser)?(?:lite)?)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Quark() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:quark)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get QupZilla() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:qupzilla)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Reconq() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:rekonq)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get RockMelt() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:rockmelt)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Sailfish() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:sailfish(?:s?browser))" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get SamsungBrowser() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:samsungbrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get SeaMonkey() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:seamonkey)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Silk() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:silk)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Skyfire() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:skyfire)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Sleipnir() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:sleipnir)" + this.#reStrVerNum) + ]), true); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Slim() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:slim(?:browser)?)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get SlimerJS() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:slimerjs)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Swing() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:swing)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get TizenBrowser() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:tizen(?:browser)?)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get UCBrowser() { + // a.k.a. UCBrowserMobile || UCBrowserMini + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:uc(?:mini|browser))" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Vivaldi() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:vivaldi)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get w3m() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:w3m)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Waterfox() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:waterfox)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get WebOSBrowser() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:w(?:eb)?osbrowser)" + this.#reStrVerNum) + ]), true); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get WeChat() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:micromessenger)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Whale() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + this.#reTest("(?:whale)" + this.#reStrVerNum) + ]), true); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Yandex() { + return (0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:ya(?:browser|ndex))" + this.#reStrVerNum) + ]); + } + //#endregion + //#region Common Browsers + /** + * + * + * @readonly + * + * @memberOf Browser + */ get AndroidBrowser() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + !this.#reTest("like android"), + this.#reTest("(?:android.*)" + this.#reStrVer) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get ChromeMobile() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + !this.#reTest("like chrome"), + this.#reTest("((?:android.+)crmo|crios)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Chrome() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + !this.Brave, + !this.ChromeMobile, + !this.AndroidBrowser, + !this.#reTest("like chrome"), + this.#reTest("(?:(?:headless)?chrome)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Chromium() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:chromium)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get EdgeMobile() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:edg(?:ios|a))" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Edge() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + !this.IE, + this.#reTest("(?:^(?:(?!mobile|android|ios).)*)(?:edge)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get FirefoxFocus() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:focus)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get FirefoxMobile() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.FirefoxFocus, + this.#reTest("(?:fxios)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Firefox() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:firefox|iceweasel)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IEMobile() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:iemobile)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IE() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + !this.IEMobile, + /(?:msie|ie|trident).*(?:;\srv:(?:(\w+(?:(?:\.|\_)\w+)+)|\d+))/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OperaMini() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:operasmini)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OperaTouch() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:opt)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OperaCoast() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:coast)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OperaMobile() { + // a.k.a. Opera Mobile || Opera Coast || Opera Mini || Opera Touch || Opera iOS + return this.#checkAssertsResult(// @ts-ignore + (0, $dlFi5$detectorjscore.Asserts).one([ + !!this.root.opera, + !!this.root.opr + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + this.OperaMini, + this.OperaCoast, + this.OperaTouch, + this.#reTest("(?:op(?:r|ios))" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Opera() { + return this.#checkAssertsResult(// @ts-ignore + (0, $dlFi5$detectorjscore.Asserts).one([ + !!this.root.opera, + !!this.root.opr + ]) && (0, $dlFi5$detectorjscore.Asserts).all([ + !this.OperaMobile + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + this.#reTest("(?:op(?:era|r)|mms)" + this.#reStrVerNum) + ]), true); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get SafariMobile() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /iphone|ipad|ipod/i.test(this.ua), + !this.AndroidBrowser, + !this.Chrome, + !this.PhantomJS + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /version\/([\w\.]+).+?mobile\/\w+\s(safari)/i.test(this.ua), + /(?:Version\/(\d+[\.\d]+).*)?Mobile.*Safari\//i.test(this.ua), + /(?:(?:iPod|iPad|iPhone).+Version|MobileSafari)\/(\d+[\.\d]+)/i.test(this.ua), + /(?:applewebkit\/\d+.*)(?:.*mobile\/(?:\d+)?)(?:.*safari\/(?:\d+)?)(?:\s|\/)?(\w+(?:(?:[._])\w+)+|\d+)?/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Safari() { + return this.#checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /safari|applewebkit/i.test(this.ua), + !this.AndroidBrowser, + !this.SafariMobile, + !this.Chrome, + !this.PhantomJS + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /(?:applewebkit\/\d+.*)(?:version)(?:\s|\/)?(\w+(?:(?:[._])\w+)+|\d+)?(?:.*safari\/(?:\d+)?)?/i.test(this.ua) + ])); + } + //#endregion + /** + * + * + * @param {boolean} [assertsResult=false] + * @param {boolean} [inverted=false] + * @param {any} [version=null] + * @returns boolean + * + * @memberOf Browser + */ #checkAssertsResult(assertsResult = false, inverted = false, version = null) { + if (assertsResult) { + this.setVersion(version, inverted); + return true; + } + return false; + } + /** + * + * + * @param {any} [version=null] + * @param {boolean} [inverted=false] + * + * @memberOf Browser + */ setVersion(version = null, inverted = false) { + if (inverted) version = version || this.version || RegExp.$1 || "n/a"; + else version = version || RegExp.$1 || this.version || "n/a"; + this.version = version.replace(/_/gi, "."); + } +} + + +var $3e347ec9821bd83f$exports = {}; + +$parcel$export($3e347ec9821bd83f$exports, "Engine", () => $3e347ec9821bd83f$export$2c3b404bf3a77a1f); + +class $3e347ec9821bd83f$export$2c3b404bf3a77a1f extends (0, $dlFi5$detectorjscore.CssFlagsClass) { + /** + * Creates an instance of Engine. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='engine'] + * + * @memberOf Engine + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "engine"){ + super(ua, flags, cssFlagsPrefix); + this.version = "n/a"; + } + //#region Un-Common/Rare/Mythic Engines + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Amaya() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /(amaya)\/([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Goanna() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /(goanna)\/([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get iCab() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /(icab)[\/\s]([23]\.[\d\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get KHTML() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /(khtml)[\/\s]\(?([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Links() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /(links)[\/\s]\(?([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Linx() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /(lynx)\/([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get NetFront() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /(netfront)\/([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get NetSurf() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /(netsurf)\/([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Presto() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(presto)\/([\w\.]+)/i.test(this.ua), + /presto\/(\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Tasman() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /(tasman)[\/\s]\(?([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get w3m() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /w3m[\/\s]([\w\.]+)/i.test(this.ua) + ])); + } + //#endregion + //#region Common Engines + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Trident() { + return this._checkAssertsResult(// @ts-ignore + (0, $dlFi5$detectorjscore.Asserts).all([ + !!this.document.documentMode + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /trident[\/\s](\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Blink() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + ()=>"Intl" in this.root && "v8BreakIterator" in this.root.Intl, + "CSS" in this.root, + /webkit\/537\.36.+chrome\/(?!27)/i.test(this.ua) + ], true)); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get EdgeHTML() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + "StyleMedia" in this.root, + !this.Trident + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /edge\/(\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Gecko() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + "InstallTrigger" in this.root, + !/like gecko/i.test(this.ua) + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /rv\:([\w\.]{1,9}).+(gecko)/i.test(this.ua), + /gecko\/(\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get WebKit() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + "webkitConvertPointFromNodeToPage" in this.root + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /(?:(?:apple)?webkit)\/(\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + //#endregion + /** + * + * + * @param {boolean} [assertsResult=false] + * @param {any} [version=null] + * @returns boolean + * + * @memberOf Engine + */ _checkAssertsResult(assertsResult = false, version = null) { + if (assertsResult) { + this.setVersion(version); + return true; + } + return false; + } + /** + * + * + * @param {any} [version=null] + * + * @memberOf Engine + */ /** + * + * + * @param {any} [version=null] + * + * @memberOf Engine + */ setVersion(version = null) { + this.version = version || RegExp.$1 || "n/a"; + } +} + + +var $69fd0fec61e94cbc$exports = {}; + +$parcel$export($69fd0fec61e94cbc$exports, "OS", () => $69fd0fec61e94cbc$export$decc4a6e69bbf763); +/* eslint-disable quote-props */ /* eslint-disable no-else-return */ /* eslint-disable radix */ /* eslint-disable indent */ +class $69fd0fec61e94cbc$export$decc4a6e69bbf763 extends (0, $dlFi5$detectorjscore.CssFlagsClass) { + /** + * Creates an instance of OS. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='os'] + * + * @memberOf OS + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "os"){ + super(ua, flags, cssFlagsPrefix); + this.version = "n/a"; + this.versionName = "n/a"; + } + /** + * + * + * @param {any} [versionNames={}] + * @param {any} [version=null] + * @returns string + * + * @memberOf OS + */ #getVersionNames(versionNames = {}, version = null) { + if (!!version) { + version = version.replace(/_/gi, "."); + return Object.getOwnPropertyNames(versionNames).filter((versionName)=>{ + return !!versionNames[versionName]; + })[0] || "n/a"; + } + return "n/a"; + } + //! Desktop OSs + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ #getWindowsVersionName(version1 = RegExp.$1 || "") { + return this.#getVersionNames({ + CE: /CE/i.test(version1), + 95: /95/i.test(version1), + 98: /98/i.test(version1), + ME: /ME/i.test(version1), + 2000: /NT(\s)?5\.0/i.test(version1), + XP: /NT(\s)?5\.1/i.test(version1) || /XP/i.test(version1), + 2003: /NT(\s)?5\.2/i.test(version1), + Vista: /NT(\s)?6\.0/i.test(version1), + 7: /NT(\s)?6\.1/i.test(version1), + 8: /NT(\s)?6\.2/i.test(version1), + 8.1: /NT(\s)?6\.3/i.test(version1), + 10: /NT(\s)?6\.4/i.test(version1) || /NT(\s)?10\.0/i.test(version1), + RT: /ARM/.test(version1) + }, version1); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Windows() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /Win/i.test(this.ua) + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /Windows ((NT|XP)( \d\d?.\d)?)/i.test(this.ua) + ]), null, this.#getWindowsVersionName); + } + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ #getMacOSVersionName(version2 = RegExp.$1 || "") { + return this.#getVersionNames({ + // source https://en.wikipedia.org/wiki/Mac_OS_8 + Tempo: /^8\.0(\.+\d)?$/i.test(version2), + "Bride of Buster": /^8\.1(\.+\d)?$/i.test(version2), + Allegro: /^8\.5(\.+\d)?$/i.test(version2), + Veronica: /^8\.6(\.+\d)?$/i.test(version2), + // source https://en.wikipedia.org/wiki/Mac_OS_9 + Sonata: /^9\.0(\.+[012356789])?$/i.test(version2), + Minuet: /^9\.0\.4$/i.test(version2), + Fortissimo: /^9\.1(\.+\d)?$/i.test(version2), + Moonlight: /^9\.2(\.+[023456789])?$/i.test(version2), + Limelight: /^9\.2\.1$/i.test(version2), + // source https://en.wikipedia.org/wiki/List_of_Apple_operating_systems + Cheetah: /^10\.0(\.+\d)?$/i.test(version2), + Puma: /^10\.1(\.+\d)?$/i.test(version2), + Jaguar: /^10\.2(\.+\d)?$/i.test(version2), + Panther: /^10\.3(\.+\d)?$/i.test(version2), + Tiger: /^10\.4(\.+\d)?$/i.test(version2), + Leopard: /^10\.5(\.+\d)?$/i.test(version2), + "Snow Leopard": /^10\.6(\.+\d)?$/i.test(version2), + Lion: /^10\.7(\.+\d)?$/i.test(version2), + "Mountain Lion": /^10\.8(\.+\d)?$/i.test(version2), + Mavericks: /^10\.9(\.+\d)?$/i.test(version2), + Yosemite: /^10\.10(\.+\d)?$/i.test(version2), + "El Capitan": /^10\.11(\.+\d)?$/i.test(version2), + Sierra: /^10\.12(\.+\d)?$/i.test(version2), + "High Sierra": /^10\.13(\.+\d)?$/i.test(version2), + Mojave: /^10\.14(\.+\d)?$/i.test(version2), + Catalina: /^10\.15(\.+\d)?$/i.test(version2), + "Big Sur": /^11(\.+\d)(\.+\d)?$/i.test(version2), + Monterey: /^12(\.+\d)(\.+\d)?$/i.test(version2), + Ventura: /^13(\.+\d)(\.+\d)?$/i.test(version2) + }, version2); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get macOS() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + !this.iOS, + !/mobile\//i.test(this.ua), + /mac/i.test(this.ua), + !/like mac/i.test(this.ua) + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /(macintosh|mac(?=_powerpc)\s)/i.test(this.ua), + /(mac\sos\sx)\s?([\w\s\.]*)/i.test(this.ua) + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /Mac[ +]OS[ +]X(?:[ /](?:Version )?(\d+(?:[_\.]\d+)+))?/i.test(this.ua), + /Mac (\d+(?:[_\.]\d+)+)/i.test(this.ua), + /mac os x (\d+(\.?_?\d+)+)/i.test(this.ua) + ]), null, this.#getMacOSVersionName); + } + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ _getUnixDistroName(version = RegExp.$1 || "") { + return this.#getVersionNames({ + FreeBSD: /\s(freebsd)\s?([\w\.]*)/i.test(version), + NetBSD: /\s(netbsd|dragonfly)\s?([\w\.]*)/i.test(version), + OpenBSD: /\s(openbsd|dragonfly)\s?([\w\.]*)/i.test(version), + "PC-BSD": /\s(pc-bsd|dragonfly)\s?([\w\.]*)/i.test(version), + DragonFly: /\s(dragonfly)\s?([\w\.]*)/i.test(version) + }, version); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Unix() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + /X11/i.test(this.ua) + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /(unix)\s?([\w\.]*)/i.test(this.ua) + ]), null, this._getUnixDistroName); + } + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ _getLinuxDistroName(version = RegExp.$1 || "") { + return this.#getVersionNames({ + Mint: /(mint)[\/\s\(]?(\w*)/i.test(version), + Mageia: /(mageia)[;\s]/i.test(version), + VectorLinux: /(vectorlinux)[;\s]/i.test(version), + Joli: /(joli)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Ubuntu: /([kxln]?ubuntu)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Debian: /(debian)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + SuSE: /(suse|opensuse)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Gentoo: /(gentoo)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Arch: /((?=\s)arch)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Slackware: /(slackware)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Fedora: /(fedora)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Mandriva: /(mandriva)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + CentOS: /(centos)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + PCLinuxOS: /(pclinuxos)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + RedHat: /(redhat)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Zenwalk: /(zenwalk)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Linpus: /(linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version) + }, version); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Linux() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).all([ + !this.Android, + /Linux/i.test(this.ua) + ]), null, this._getLinuxDistroName); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get ChromiumOS() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(cros)\s[\w]+\s([\w\.]+\w)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Solaris() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(sunos)\s?([\w\.\d]*)/i.test(this.ua), + /((?:open)?solaris)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Plan9() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(plan\s9)/i.test(this.ua) + ])); + } + get Minix() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(minix)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get BeOS() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(beos)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get OS2() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(os\/2)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get AmigaOS() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(amigaos)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get MorphOS() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(morphos)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get RISCOS() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(risc\sos)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get OpenVMS() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(openvms)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Fuchsia() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(fuchsia)/i.test(this.ua) + ])); + } + //! Mobile OSs + /** + * + * + * @readonly + * + * @memberOf OS + */ get WindowsPhone() { + // a.k.a. Windows Mobile + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i.test(this.ua), + /(windows\smobile)[\s\/]?([ntce\d\.\s]+\w)/i.test(this.ua), + /windows phone (?:os)?\s?(\d+(\.\d+)*)/i.test(this.ua) + ])); + // // Detect Windows Phone 7 desktop mode. + // if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua) || 0)[1])) { + // name += ' Mobile'; + // os = 'Windows Phone ' + (/\+$/.test(data) ? data : data + '.x'); + // description.unshift('desktop mode'); + // } + // // Detect Windows Phone 8.x desktop mode. + // if (/\bWPDesktop\b/i.test(ua)) { + // name = 'IE Mobile'; + // os = 'Windows Phone 8.x'; + // description.unshift('desktop mode'); + // version || (version = (/\brv:([\d.]+)/.exec(ua) || 0)[1]); + // } + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get iOS() { + return this._checkAssertsResult(// @ts-ignore + (0, $dlFi5$detectorjscore.Asserts).all([ + !window.MSStream, + /iP(?:ad|hone|od)/.test(this.ua) + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /os\s((\d+([_\s]\d+)*)|(\d+(?:[_\.]\d+)*)) like mac os x/i.test(this.ua) + ])); + } + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ _getAndroidVersionName(version = RegExp.$1 || "") { + return this.#getVersionNames({ + "1.0": /^1\.[01234]$/i.test(version), + Cupcake: /^1\.5(\.+\d)?$/i.test(version), + Donut: /^1\.6(\.+\d)?$/i.test(version), + Eclair: /^2\.[01](\.+\d)?$/i.test(version), + Froyo: /^2\.2(\.+\d)?$/i.test(version), + Gingerbread: /^2\.3(\.+\d)?$/i.test(version), + Honeycomb: /^3(\.+\d)(\.+\d)?$/i.test(version), + "Ice Cream Sandwich": /^4\.[01](\.+\d)?$/i.test(version), + "Jelly Bean": /^4\.[23](\.+\d)?$/i.test(version), + KitKat: /^4\.[456789](\.+\d)?$/i.test(version), + Lollipop: /^5(\.\d)(\.+\d)?$/i.test(version), + Marshmallow: /^6(\.\d)(\.+\d)?$/i.test(version), + Nougat: /^7(\.\d)(\.+\d)?$/i.test(version), + Oreo: /^8(\.\d)(\.+\d)?$/i.test(version), + Pie: /^9(\.\d)(\.+\d)?$/i.test(version) + }, version); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Android() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /android[\s/-](\d+(\.\d+)*)/i.test(this.ua) + ]), null, this._getAndroidVersionName); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Bada() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(bada)[\/\s-]?([\w\.]*)/i.test(this.ua), + /bada\/(\d+(\.\d+)*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Blackberry() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /blackberry|\bbb\d+/i.test(this.ua), + /rim\stablet/i.test(this.ua) + ]) && (0, $dlFi5$detectorjscore.Asserts).one([ + /rim\stablet\sos\s(\d+(\.\d+)*)/i.test(this.ua), + /blackberry\d+\/(\d+([_\s]\d+)*)/i.test(this.ua), + /blackberry[\d]+\/(\d+(\.?_?\d+)+)/i.test(this.ua), + /(blackberry)\w*\/?([\w\.]*)/i.test(this.ua), + /\bbb(\d+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Contiki() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(contiki)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get MeeGo() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(meego)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get RIM() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(rim\stablet\sos)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get QNX() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(qnx)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Palm() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(palm\sos)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Symbian() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + //! TV OSs + /** + * + * + * @readonly + * + * @memberOf OS + */ get WebOS() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(webos)[\/\s-]?([\w\.]*)/i.test(this.ua), + /(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i.test(this.ua), + /w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Tizen() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /(tizen)[/\s](\d+(\.\d+)*)/i.test(this.ua) + ])); + } + //! Other OSs + /** + * + * + * @readonly + * + * @memberOf OS + */ get Raspbian() { + return this._checkAssertsResult((0, $dlFi5$detectorjscore.Asserts).one([ + /raspbian[/\s](\d+(\.\d+)*)/i.test(this.ua) + ])); + } + /** + * + * + * @param {boolean} [assertsResult=false] + * @param {any} [version=null] + * @param {any} [versionNameFn=null] + * @returns boolean + * + * @memberOf OS + */ _checkAssertsResult(assertsResult = false, version = null, versionNameFn = null) { + if (assertsResult) { + this.setVersion(version); + this.setVersionName(versionNameFn); + return true; + } + return false; + } + /** + * + * + * @param {any} [version=null] + * + * @memberOf OS + */ setVersion(version = null) { + this.version = (version || RegExp.$1 || "n/a").replace(/_/gi, "."); + } + /** + * + * + * @param {any} [versionNameFn=null] + * + * @memberOf OS + */ setVersionName(versionNameFn = null) { + if (versionNameFn instanceof Function) this.versionName = versionNameFn.call(this, this.version); + } +} + + +"use strict"; +$parcel$exportWildcard(module.exports, $ef23c985e5649af8$exports); +$parcel$exportWildcard(module.exports, $3e347ec9821bd83f$exports); +$parcel$exportWildcard(module.exports, $69fd0fec61e94cbc$exports); + + +//# sourceMappingURL=software.js.map diff --git a/packages/software/dist/software.js.map b/packages/software/dist/software.js.map new file mode 100644 index 0000000..12b391d --- /dev/null +++ b/packages/software/dist/software.js.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;ACAA;AASO,MAAM,kDAAgB,CAAA,GAAA,mCAAa,AAAD;IACvC,CAAC,WAAW,CAAS;IACrB,CAAC,QAAQ,CAAS;IAClB,CAAC,KAAK,CAAS;IAEf;;;;;;;GAOC,GACD,YAAY,KAAoB,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,iBAAiB,SAAS,CAAE;QAC5E,KAAK,CAAC,IAAI,OAAO;QAEjB,IAAI,CAAC,CAAC,kBAAkB;QAExB,IAAI,CAAC,UAAU;IACjB;IAEA;;;;;GAKC,GACD,CAAC,kBAAkB,GAAG;QACpB,IAAI,CAAC,CAAC,WAAW,GAAG;QACpB,IAAI,CAAC,CAAC,QAAQ,GAAG,gBAAgB,IAAI,CAAC,CAAC,WAAW;QAClD,IAAI,CAAC,CAAC,KAAK,GAAG,IAAI,OAAO,IAAI,CAAC,CAAC,QAAQ,EAAE;QAEzC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK;IAC3B;IAEA,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,uBAAuB;IACvB,MAAM;IACN,2BAA2B;IAC3B,8BAA8B;IAC9B,2BAA2B;IAC3B,wBAAwB;IAExB,8BAA8B;IAC9B,2BAA2B;IAC3B,wBAAwB;IACxB,IAAI;IAEJ,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,CAAC,QAAQ,EAAE;QAC9B,OAAO,IAAI,OAAO,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE;IAC5C;IAEA,wCAAw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;IAC1F;IAEA,aAAa;IACb;;;;;;GAMC,GACD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAA,GAAA,6BAAO,AAAD,EAAE,GAAG,CAAC;YAAC,8BAA8B,IAAI,CAAC,IAAI,CAAC,EAAE;SAAE;IAC3F;IAEA;;;;;;;;;GASC,GACD,oBACE,gBAAyB,KAAK,EAC9B,UAAyB,IAAI,EAC7B,gBAAiC,IAAI,EACrC;QACA,IAAI,eAAe;YACjB,IAAI,CAAC,UAAU,CAAC;YAChB,IAAI,CAAC,cAAc,CAAC;YAEpB,OAAO,IAAI;QACb,CAAC;QAED,OAAO,KAAK;IACd;IAEA;;;;;;GAMC,GACD,WAAW,UAAyB,IAAI,EAAE;QACxC,IAAI,CAAC,OAAO,GAAG,AAAC,CAAA,WAAW,OAAO,EAAE,IAAI,KAAI,EAAG,OAAO,CAAC,OAAO;IAChE;IAEA;;;;;;GAMC,GACD,eAAe,gBAAiC,IAAI,EAAE;QACpD,IAAI,yBAAyB,UAC3B,IAAI,CAAC,WAAW,GAAG,cAAc,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO;IAE5D;AACF;;;AHlpBA","sources":["packages/software/lib/software.ts","packages/software/lib/browser.ts","packages/software/lib/engine.ts","packages/software/lib/os.ts"],"sourcesContent":["'use strict';\n\nexport * from './browser';\nexport * from './engine';\nexport * from './os';\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class Browser\n * @extends {CssFlagsClass}\n */\nexport class Browser extends CssFlagsClass {\n #reStrVerNum: string;\n #reStrVer: string;\n #reVer: RegExp;\n version: any;\n /**\n * Creates an instance of Browser.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='browser']\n *\n * @memberOf Browser\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'browser') {\n super(ua, flags, cssFlagsPrefix);\n\n this.#createTestElements();\n\n this.setVersion();\n }\n\n /**\n *\n *\n *\n * @memberOf Browser\n */\n #createTestElements() {\n this.#reStrVerNum = '(?:\\\\:|\\\\s|\\\\/)?(?:(\\\\w+(?:(?:\\\\.|\\\\_)\\\\w+)+)|\\\\d+)?';\n this.#reStrVer = '(?:version)' + this.#reStrVerNum;\n this.#reVer = new RegExp(this.#reStrVer, 'i');\n\n this.ua.match(this.#reVer);\n }\n\n // /**\n // *\n // *\n // *\n // * @memberOf Browser\n // */\n // _destroyTestElements() {\n // this._reStrVerNum = null;\n // this._reStrVer = null;\n // this._reVer = null;\n\n // delete this._reStrVerNum;\n // delete this._reStrVer;\n // delete this._reVer;\n // }\n\n #reTest(reStr = this.#reStrVer) {\n return new RegExp(reStr, 'i').test(this.ua);\n }\n\n //#region Un-Common/Rare/Mythic Browsers\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Amaya() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:amaya)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Arora() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:arora)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Avant() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:avant(?:sbrowser))' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Baidu() {\n return this.#checkAssertsResult(\n Asserts.one([this.#reTest('(?:(?:b(?:(?:a)?idu)?(?:d)?)(?:browser)(?:\\\\_i18n)?)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Basilisk() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:basilisk)' + this.#reStrVer)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get BlackBerry() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:blackberry|bb.*;.*\\\\)\\\\s)' + this.#reStrVer)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Blazer() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:blazer)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Bolt() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:bolt)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Brave() {\n return this.#checkAssertsResult(\n // @ts-ignore\n Asserts.one([!!window.navigator.brave || !!window.navigator.Brave, this.#reTest('(?:brave)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Camino() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:camino)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Chimera() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:chimera)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get ComodoDragon() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:comodo(?:\\\\_|\\\\s)dragon)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Conkeror() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:conkeror)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Dillo() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:dillo)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Dolphin() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:dolfin)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Dorado() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:dorado.+ser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Doris() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:doris)' + this.#reStrVerNum)]));\n }\n\n #getElectronVersion() {\n return this.process?.versions?.electron ?? 'n/a';\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Electron() {\n return this.#checkAssertsResult(\n Asserts.one(\n [\n // @ts-ignore\n () => this.process.type === 'renderer', // Renderer process\n () => !!this.process.versions.electron, // Main process\n () => !!this.navigator && this.#reTest('electron') // Detect the user agent when the `nodeIntegration` option is set to true\n ],\n true\n ),\n false,\n this.#getElectronVersion()\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Epiphany() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:epiphany)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Falkon() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:falkon)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Fennec() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:fennec)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Firebird() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:firebird)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Flock() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:flock)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get GoBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:gobrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get GoogleBot() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:googlebot)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get iCab() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:icab)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IceApe() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:iceape)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IceBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:ices?browser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IceCat() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:icecat)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IceDragon() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:icedragon)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Iridium() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:iridium)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Iron() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:iron)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Jasmine() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:jasmine)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Konqueror() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:konqueror)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get KMeleon() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:k-meleon)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Links() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:links)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Linx() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:lynx)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Lunascape() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:lunascape)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Maemo() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:maemosbrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get MaxthonMobile() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:mxios)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Maxthon() {\n return this.#checkAssertsResult(\n Asserts.all([!this.MaxthonMobile, this.#reTest('(?:maxthon|mxnitro)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Midori() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:midori)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Minimo() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:minimo)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get MIUIBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:xiaomi\\\\/miuibrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Mosaic() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:mosaic)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get MZBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:MZBrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Netfront() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:netfront)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Netscape() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:navigator|netscape)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get NetSurf() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:netsurf)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get NokiaBrowser() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:nokias?browser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OmniWeb() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:omniweb)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OviBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:ovibrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Palemoon() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:palemoon)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Phoenix() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:phoenix)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get PhantomJS() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:phantomjs)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Polaris() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:polaris)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Puffin() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:puffin)' + this.#reStrVerNum)]), true);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get QQBrowserMobile() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:mqq(?:browser)?)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get QQBrowser() {\n return this.#checkAssertsResult(\n Asserts.all([!this.QQBrowserMobile, this.#reTest('(?:qq(?:browser)?(?:lite)?)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Quark() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:quark)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get QupZilla() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:qupzilla)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Reconq() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:rekonq)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get RockMelt() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:rockmelt)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Sailfish() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:sailfish(?:s?browser))' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get SamsungBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:samsungbrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get SeaMonkey() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:seamonkey)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Silk() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:silk)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Skyfire() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:skyfire)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Sleipnir() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:sleipnir)' + this.#reStrVerNum)]), true);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Slim() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:slim(?:browser)?)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get SlimerJS() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:slimerjs)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Swing() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:swing)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get TizenBrowser() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:tizen(?:browser)?)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get UCBrowser() {\n // a.k.a. UCBrowserMobile || UCBrowserMini\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:uc(?:mini|browser))' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Vivaldi() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:vivaldi)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get w3m() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:w3m)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Waterfox() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:waterfox)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get WebOSBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:w(?:eb)?osbrowser)' + this.#reStrVerNum)]), true);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get WeChat() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:micromessenger)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Whale() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:whale)' + this.#reStrVerNum)]), true);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Yandex() {\n return Asserts.one([this.#reTest('(?:ya(?:browser|ndex))' + this.#reStrVerNum)]);\n }\n //#endregion\n\n //#region Common Browsers\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get AndroidBrowser() {\n return this.#checkAssertsResult(\n Asserts.all([!this.#reTest('like android'), this.#reTest('(?:android.*)' + this.#reStrVer)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get ChromeMobile() {\n return this.#checkAssertsResult(\n Asserts.all([!this.#reTest('like chrome'), this.#reTest('((?:android.+)crmo|crios)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Chrome() {\n return this.#checkAssertsResult(\n Asserts.all([\n !this.Brave,\n !this.ChromeMobile,\n !this.AndroidBrowser,\n !this.#reTest('like chrome'),\n this.#reTest('(?:(?:headless)?chrome)' + this.#reStrVerNum)\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Chromium() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:chromium)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get EdgeMobile() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:edg(?:ios|a))' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Edge() {\n return this.#checkAssertsResult(\n Asserts.all([!this.IE, this.#reTest('(?:^(?:(?!mobile|android|ios).)*)(?:edge)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get FirefoxFocus() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:focus)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get FirefoxMobile() {\n return this.#checkAssertsResult(Asserts.one([this.FirefoxFocus, this.#reTest('(?:fxios)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Firefox() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:firefox|iceweasel)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IEMobile() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:iemobile)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IE() {\n return this.#checkAssertsResult(\n Asserts.all([!this.IEMobile, /(?:msie|ie|trident).*(?:;\\srv:(?:(\\w+(?:(?:\\.|\\_)\\w+)+)|\\d+))/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OperaMini() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:operasmini)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OperaTouch() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:opt)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OperaCoast() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:coast)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OperaMobile() {\n // a.k.a. Opera Mobile || Opera Coast || Opera Mini || Opera Touch || Opera iOS\n return this.#checkAssertsResult(\n // @ts-ignore\n Asserts.one([!!this.root.opera, !!this.root.opr]) &&\n Asserts.one([\n this.OperaMini,\n this.OperaCoast,\n this.OperaTouch,\n this.#reTest('(?:op(?:r|ios))' + this.#reStrVerNum)\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Opera() {\n return this.#checkAssertsResult(\n // @ts-ignore\n Asserts.one([!!this.root.opera, !!this.root.opr]) &&\n Asserts.all([!this.OperaMobile]) &&\n Asserts.one([this.#reTest('(?:op(?:era|r)|mms)' + this.#reStrVerNum)]),\n true\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get SafariMobile() {\n return this.#checkAssertsResult(\n Asserts.all([/iphone|ipad|ipod/i.test(this.ua), !this.AndroidBrowser, !this.Chrome, !this.PhantomJS]) &&\n Asserts.one([\n /version\\/([\\w\\.]+).+?mobile\\/\\w+\\s(safari)/i.test(this.ua),\n /(?:Version\\/(\\d+[\\.\\d]+).*)?Mobile.*Safari\\//i.test(this.ua),\n /(?:(?:iPod|iPad|iPhone).+Version|MobileSafari)\\/(\\d+[\\.\\d]+)/i.test(this.ua),\n /(?:applewebkit\\/\\d+.*)(?:.*mobile\\/(?:\\d+)?)(?:.*safari\\/(?:\\d+)?)(?:\\s|\\/)?(\\w+(?:(?:[._])\\w+)+|\\d+)?/i.test(\n this.ua\n )\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Safari() {\n return this.#checkAssertsResult(\n Asserts.all([\n /safari|applewebkit/i.test(this.ua),\n !this.AndroidBrowser,\n !this.SafariMobile,\n !this.Chrome,\n !this.PhantomJS\n ]) &&\n Asserts.one([\n /(?:applewebkit\\/\\d+.*)(?:version)(?:\\s|\\/)?(\\w+(?:(?:[._])\\w+)+|\\d+)?(?:.*safari\\/(?:\\d+)?)?/i.test(this.ua)\n ])\n );\n }\n //#endregion\n\n /**\n *\n *\n * @param {boolean} [assertsResult=false]\n * @param {boolean} [inverted=false]\n * @param {any} [version=null]\n * @returns boolean\n *\n * @memberOf Browser\n */\n #checkAssertsResult(assertsResult: boolean = false, inverted: boolean = false, version: string | null = null) {\n if (assertsResult) {\n this.setVersion(version, inverted);\n\n return true;\n }\n\n return false;\n }\n\n /**\n *\n *\n * @param {any} [version=null]\n * @param {boolean} [inverted=false]\n *\n * @memberOf Browser\n */\n setVersion(version: string | null = null, inverted = false) {\n if (inverted) {\n version = version || this.version || RegExp.$1 || 'n/a';\n } else {\n version = version || RegExp.$1 || this.version || 'n/a';\n }\n\n this.version = version!.replace(/_/gi, '.');\n }\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class Engine\n * @extends {CssFlagsClass}\n */\nexport class Engine extends CssFlagsClass {\n version: string;\n\n /**\n * Creates an instance of Engine.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='engine']\n *\n * @memberOf Engine\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'engine') {\n super(ua, flags, cssFlagsPrefix);\n\n this.version = 'n/a';\n }\n\n //#region Un-Common/Rare/Mythic Engines\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Amaya() {\n return this._checkAssertsResult(Asserts.all([/(amaya)\\/([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Goanna() {\n return this._checkAssertsResult(Asserts.all([/(goanna)\\/([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get iCab() {\n return this._checkAssertsResult(Asserts.all([/(icab)[\\/\\s]([23]\\.[\\d\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get KHTML() {\n return this._checkAssertsResult(Asserts.all([/(khtml)[\\/\\s]\\(?([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Links() {\n return this._checkAssertsResult(Asserts.all([/(links)[\\/\\s]\\(?([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Linx() {\n return this._checkAssertsResult(Asserts.all([/(lynx)\\/([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get NetFront() {\n return this._checkAssertsResult(Asserts.all([/(netfront)\\/([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get NetSurf() {\n return this._checkAssertsResult(Asserts.all([/(netsurf)\\/([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Presto() {\n return this._checkAssertsResult(\n Asserts.one([/(presto)\\/([\\w\\.]+)/i.test(this.ua), /presto\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Tasman() {\n return this._checkAssertsResult(Asserts.all([/(tasman)[\\/\\s]\\(?([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get w3m() {\n return this._checkAssertsResult(Asserts.all([/w3m[\\/\\s]([\\w\\.]+)/i.test(this.ua)]));\n }\n //#endregion\n\n //#region Common Engines\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Trident() {\n return this._checkAssertsResult(\n // @ts-ignore\n Asserts.all([/*@cc_on!@*/ false || !!this.document.documentMode]) &&\n Asserts.one([/trident[\\/\\s](\\d+(\\.?_?\\d+)+)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Blink() {\n return this._checkAssertsResult(\n Asserts.all(\n [\n () => 'Intl' in this.root && 'v8BreakIterator' in this.root.Intl,\n 'CSS' in this.root,\n /webkit\\/537\\.36.+chrome\\/(?!27)/i.test(this.ua)\n ],\n true\n )\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get EdgeHTML() {\n return this._checkAssertsResult(\n Asserts.all(['StyleMedia' in this.root, !this.Trident]) && Asserts.one([/edge\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Gecko() {\n return this._checkAssertsResult(\n Asserts.all(['InstallTrigger' in this.root, !/like gecko/i.test(this.ua)]) &&\n Asserts.one([/rv\\:([\\w\\.]{1,9}).+(gecko)/i.test(this.ua), /gecko\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get WebKit() {\n return this._checkAssertsResult(\n Asserts.all(['webkitConvertPointFromNodeToPage' in this.root]) &&\n Asserts.one([/(?:(?:apple)?webkit)\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua)])\n );\n }\n //#endregion\n\n /**\n *\n *\n * @param {boolean} [assertsResult=false]\n * @param {any} [version=null]\n * @returns boolean\n *\n * @memberOf Engine\n */\n _checkAssertsResult(assertsResult = false, version = null) {\n if (assertsResult) {\n this.setVersion(version);\n\n return true;\n }\n\n return false;\n }\n\n /**\n *\n *\n * @param {any} [version=null]\n *\n * @memberOf Engine\n */\n /**\n *\n *\n * @param {any} [version=null]\n *\n * @memberOf Engine\n */\n setVersion(version = null) {\n this.version = version || RegExp.$1 || 'n/a';\n }\n}\n","/* eslint-disable quote-props */\n/* eslint-disable no-else-return */\n/* eslint-disable radix */\n/* eslint-disable indent */\nimport { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class OS\n * @extends {CssFlagsClass}\n */\nexport class OS extends CssFlagsClass {\n version: string;\n versionName: string;\n\n /**\n * Creates an instance of OS.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='os']\n *\n * @memberOf OS\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'os') {\n super(ua, flags, cssFlagsPrefix);\n\n this.version = 'n/a';\n this.versionName = 'n/a';\n }\n\n /**\n *\n *\n * @param {any} [versionNames={}]\n * @param {any} [version=null]\n * @returns string\n *\n * @memberOf OS\n */\n #getVersionNames(versionNames = {}, version: string | null = null) {\n if (!!version) {\n version = version.replace(/_/gi, '.');\n\n return (\n Object.getOwnPropertyNames(versionNames).filter((versionName) => {\n return !!versionNames[versionName];\n })[0] || 'n/a'\n );\n }\n\n return 'n/a';\n }\n\n //! Desktop OSs\n /**\n *\n *\n * @param {any} [version=RegExp.$1 || null]\n * @returns string\n *\n * @memberOf OS\n */\n #getWindowsVersionName(version: string = RegExp.$1 || '') {\n return this.#getVersionNames(\n {\n CE: /CE/i.test(version),\n 95: /95/i.test(version),\n 98: /98/i.test(version),\n ME: /ME/i.test(version),\n 2000: /NT(\\s)?5\\.0/i.test(version),\n XP: /NT(\\s)?5\\.1/i.test(version) || /XP/i.test(version),\n 2003: /NT(\\s)?5\\.2/i.test(version),\n Vista: /NT(\\s)?6\\.0/i.test(version),\n 7: /NT(\\s)?6\\.1/i.test(version),\n 8: /NT(\\s)?6\\.2/i.test(version),\n 8.1: /NT(\\s)?6\\.3/i.test(version),\n 10: /NT(\\s)?6\\.4/i.test(version) || /NT(\\s)?10\\.0/i.test(version),\n RT: /ARM/.test(version)\n },\n version\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Windows() {\n return this._checkAssertsResult(\n Asserts.all([/Win/i.test(this.ua)]) &&\n Asserts.one([\n /Windows ((NT|XP)( \\d\\d?.\\d)?)/i.test(this.ua)\n // /(windows)\\snt\\s6\\.2;\\s(arm)/i, // Windows RT\n // // ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [\n // /(win(?=3|9|n)|win\\s9x\\s)([nt\\d\\.]+)/i,\n // // ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [\n ]),\n null,\n this.#getWindowsVersionName\n );\n }\n\n /**\n *\n *\n * @param {any} [version=RegExp.$1 || null]\n * @returns string\n *\n * @memberOf OS\n */\n #getMacOSVersionName(version: string = RegExp.$1 || '') {\n return this.#getVersionNames(\n {\n // source https://en.wikipedia.org/wiki/Mac_OS_8\n Tempo: /^8\\.0(\\.+\\d)?$/i.test(version),\n 'Bride of Buster': /^8\\.1(\\.+\\d)?$/i.test(version),\n Allegro: /^8\\.5(\\.+\\d)?$/i.test(version),\n Veronica: /^8\\.6(\\.+\\d)?$/i.test(version),\n // source https://en.wikipedia.org/wiki/Mac_OS_9\n Sonata: /^9\\.0(\\.+[012356789])?$/i.test(version),\n Minuet: /^9\\.0\\.4$/i.test(version),\n Fortissimo: /^9\\.1(\\.+\\d)?$/i.test(version),\n Moonlight: /^9\\.2(\\.+[023456789])?$/i.test(version),\n Limelight: /^9\\.2\\.1$/i.test(version),\n // source https://en.wikipedia.org/wiki/List_of_Apple_operating_systems\n Cheetah: /^10\\.0(\\.+\\d)?$/i.test(version),\n Puma: /^10\\.1(\\.+\\d)?$/i.test(version),\n Jaguar: /^10\\.2(\\.+\\d)?$/i.test(version),\n Panther: /^10\\.3(\\.+\\d)?$/i.test(version),\n Tiger: /^10\\.4(\\.+\\d)?$/i.test(version),\n Leopard: /^10\\.5(\\.+\\d)?$/i.test(version),\n 'Snow Leopard': /^10\\.6(\\.+\\d)?$/i.test(version),\n Lion: /^10\\.7(\\.+\\d)?$/i.test(version),\n 'Mountain Lion': /^10\\.8(\\.+\\d)?$/i.test(version),\n Mavericks: /^10\\.9(\\.+\\d)?$/i.test(version),\n Yosemite: /^10\\.10(\\.+\\d)?$/i.test(version),\n 'El Capitan': /^10\\.11(\\.+\\d)?$/i.test(version),\n Sierra: /^10\\.12(\\.+\\d)?$/i.test(version),\n 'High Sierra': /^10\\.13(\\.+\\d)?$/i.test(version),\n Mojave: /^10\\.14(\\.+\\d)?$/i.test(version),\n Catalina: /^10\\.15(\\.+\\d)?$/i.test(version),\n 'Big Sur': /^11(\\.+\\d)(\\.+\\d)?$/i.test(version),\n Monterey: /^12(\\.+\\d)(\\.+\\d)?$/i.test(version),\n Ventura: /^13(\\.+\\d)(\\.+\\d)?$/i.test(version)\n },\n version\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get macOS() {\n return this._checkAssertsResult(\n Asserts.all([!this.iOS, !/mobile\\//i.test(this.ua), /mac/i.test(this.ua), !/like mac/i.test(this.ua)]) &&\n Asserts.one([/(macintosh|mac(?=_powerpc)\\s)/i.test(this.ua), /(mac\\sos\\sx)\\s?([\\w\\s\\.]*)/i.test(this.ua)]) &&\n Asserts.one([\n /Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?/i.test(this.ua),\n /Mac (\\d+(?:[_\\.]\\d+)+)/i.test(this.ua),\n /mac os x (\\d+(\\.?_?\\d+)+)/i.test(this.ua)\n ]),\n null,\n this.#getMacOSVersionName\n );\n }\n\n /**\n *\n *\n * @param {any} [version=RegExp.$1 || null]\n * @returns string\n *\n * @memberOf OS\n */\n _getUnixDistroName(version: string = RegExp.$1 || '') {\n return this.#getVersionNames(\n {\n FreeBSD: /\\s(freebsd)\\s?([\\w\\.]*)/i.test(version),\n NetBSD: /\\s(netbsd|dragonfly)\\s?([\\w\\.]*)/i.test(version),\n OpenBSD: /\\s(openbsd|dragonfly)\\s?([\\w\\.]*)/i.test(version),\n 'PC-BSD': /\\s(pc-bsd|dragonfly)\\s?([\\w\\.]*)/i.test(version),\n DragonFly: /\\s(dragonfly)\\s?([\\w\\.]*)/i.test(version)\n },\n version\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Unix() {\n return this._checkAssertsResult(\n Asserts.all([/X11/i.test(this.ua)]) && Asserts.one([/(unix)\\s?([\\w\\.]*)/i.test(this.ua)]),\n null,\n this._getUnixDistroName\n );\n }\n\n /**\n *\n *\n * @param {any} [version=RegExp.$1 || null]\n * @returns string\n *\n * @memberOf OS\n */\n _getLinuxDistroName(version: string = RegExp.$1 || '') {\n return this.#getVersionNames(\n {\n Mint: /(mint)[\\/\\s\\(]?(\\w*)/i.test(version),\n Mageia: /(mageia)[;\\s]/i.test(version),\n VectorLinux: /(vectorlinux)[;\\s]/i.test(version),\n Joli: /(joli)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Ubuntu: /([kxln]?ubuntu)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Debian: /(debian)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n SuSE: /(suse|opensuse)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Gentoo: /(gentoo)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Arch: /((?=\\s)arch)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Slackware: /(slackware)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Fedora: /(fedora)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Mandriva: /(mandriva)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n CentOS: /(centos)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n PCLinuxOS: /(pclinuxos)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n RedHat: /(redhat)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Zenwalk: /(zenwalk)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Linpus: /(linpus)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version)\n },\n version\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Linux() {\n return this._checkAssertsResult(\n Asserts.all([!this.Android, /Linux/i.test(this.ua)]),\n null,\n this._getLinuxDistroName\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get ChromiumOS() {\n return this._checkAssertsResult(Asserts.one([/(cros)\\s[\\w]+\\s([\\w\\.]+\\w)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Solaris() {\n return this._checkAssertsResult(\n Asserts.one([/(sunos)\\s?([\\w\\.\\d]*)/i.test(this.ua), /((?:open)?solaris)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Plan9() {\n return this._checkAssertsResult(Asserts.one([/(plan\\s9)/i.test(this.ua)]));\n }\n\n get Minix() {\n return this._checkAssertsResult(Asserts.one([/(minix)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get BeOS() {\n return this._checkAssertsResult(Asserts.one([/(beos)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get OS2() {\n return this._checkAssertsResult(Asserts.one([/(os\\/2)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get AmigaOS() {\n return this._checkAssertsResult(Asserts.one([/(amigaos)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get MorphOS() {\n return this._checkAssertsResult(Asserts.one([/(morphos)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get RISCOS() {\n return this._checkAssertsResult(Asserts.one([/(risc\\sos)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get OpenVMS() {\n return this._checkAssertsResult(Asserts.one([/(openvms)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Fuchsia() {\n return this._checkAssertsResult(Asserts.one([/(fuchsia)/i.test(this.ua)]));\n }\n\n //! Mobile OSs\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get WindowsPhone() {\n // a.k.a. Windows Mobile\n return this._checkAssertsResult(\n Asserts.one([\n /(windows\\sphone(?:\\sos)*)[\\s\\/]?([\\d\\.\\s\\w]*)/i.test(this.ua),\n /(windows\\smobile)[\\s\\/]?([ntce\\d\\.\\s]+\\w)/i.test(this.ua),\n /windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i.test(this.ua)\n ])\n );\n\n // // Detect Windows Phone 7 desktop mode.\n // if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\\d+)/i.exec(ua) || 0)[1])) {\n // name += ' Mobile';\n // os = 'Windows Phone ' + (/\\+$/.test(data) ? data : data + '.x');\n // description.unshift('desktop mode');\n // }\n\n // // Detect Windows Phone 8.x desktop mode.\n // if (/\\bWPDesktop\\b/i.test(ua)) {\n // name = 'IE Mobile';\n // os = 'Windows Phone 8.x';\n // description.unshift('desktop mode');\n // version || (version = (/\\brv:([\\d.]+)/.exec(ua) || 0)[1]);\n // }\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get iOS() {\n return this._checkAssertsResult(\n // @ts-ignore\n Asserts.all([!window.MSStream, /iP(?:ad|hone|od)/.test(this.ua)]) &&\n Asserts.one([/os\\s((\\d+([_\\s]\\d+)*)|(\\d+(?:[_\\.]\\d+)*)) like mac os x/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @param {any} [version=RegExp.$1 || null]\n * @returns string\n *\n * @memberOf OS\n */\n _getAndroidVersionName(version: string = RegExp.$1 || '') {\n return this.#getVersionNames(\n {\n '1.0': /^1\\.[01234]$/i.test(version),\n Cupcake: /^1\\.5(\\.+\\d)?$/i.test(version),\n Donut: /^1\\.6(\\.+\\d)?$/i.test(version),\n Eclair: /^2\\.[01](\\.+\\d)?$/i.test(version),\n Froyo: /^2\\.2(\\.+\\d)?$/i.test(version),\n Gingerbread: /^2\\.3(\\.+\\d)?$/i.test(version),\n Honeycomb: /^3(\\.+\\d)(\\.+\\d)?$/i.test(version),\n 'Ice Cream Sandwich': /^4\\.[01](\\.+\\d)?$/i.test(version),\n 'Jelly Bean': /^4\\.[23](\\.+\\d)?$/i.test(version),\n KitKat: /^4\\.[456789](\\.+\\d)?$/i.test(version),\n Lollipop: /^5(\\.\\d)(\\.+\\d)?$/i.test(version),\n Marshmallow: /^6(\\.\\d)(\\.+\\d)?$/i.test(version),\n Nougat: /^7(\\.\\d)(\\.+\\d)?$/i.test(version),\n Oreo: /^8(\\.\\d)(\\.+\\d)?$/i.test(version),\n Pie: /^9(\\.\\d)(\\.+\\d)?$/i.test(version)\n },\n version\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Android() {\n return this._checkAssertsResult(\n Asserts.one([/android[\\s/-](\\d+(\\.\\d+)*)/i.test(this.ua)]),\n null,\n this._getAndroidVersionName\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Bada() {\n return this._checkAssertsResult(\n Asserts.one([/(bada)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua), /bada\\/(\\d+(\\.\\d+)*)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Blackberry() {\n return this._checkAssertsResult(\n Asserts.one([/blackberry|\\bbb\\d+/i.test(this.ua), /rim\\stablet/i.test(this.ua)]) &&\n Asserts.one([\n /rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i.test(this.ua),\n /blackberry\\d+\\/(\\d+([_\\s]\\d+)*)/i.test(this.ua),\n /blackberry[\\d]+\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua),\n /(blackberry)\\w*\\/?([\\w\\.]*)/i.test(this.ua),\n /\\bbb(\\d+)/i.test(this.ua)\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Contiki() {\n return this._checkAssertsResult(Asserts.one([/(contiki)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get MeeGo() {\n return this._checkAssertsResult(Asserts.one([/(meego)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get RIM() {\n return this._checkAssertsResult(Asserts.one([/(rim\\stablet\\sos)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get QNX() {\n return this._checkAssertsResult(Asserts.one([/(qnx)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Palm() {\n return this._checkAssertsResult(Asserts.one([/(palm\\sos)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Symbian() {\n return this._checkAssertsResult(Asserts.one([/(symbian\\s?os|symbos|s60(?=;))[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n //! TV OSs\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get WebOS() {\n return this._checkAssertsResult(\n Asserts.one([\n /(webos)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua),\n /(?:web|hpw)[o0]s\\/(\\d+(\\.\\d+)*)/i.test(this.ua),\n /w(?:eb)?[o0]sbrowser\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua)\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Tizen() {\n return this._checkAssertsResult(Asserts.one([/(tizen)[/\\s](\\d+(\\.\\d+)*)/i.test(this.ua)]));\n }\n\n //! Other OSs\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Raspbian() {\n return this._checkAssertsResult(Asserts.one([/raspbian[/\\s](\\d+(\\.\\d+)*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @param {boolean} [assertsResult=false]\n * @param {any} [version=null]\n * @param {any} [versionNameFn=null]\n * @returns boolean\n *\n * @memberOf OS\n */\n _checkAssertsResult(\n assertsResult: boolean = false,\n version: string | null = null,\n versionNameFn: Function | null = null\n ) {\n if (assertsResult) {\n this.setVersion(version);\n this.setVersionName(versionNameFn);\n\n return true;\n }\n\n return false;\n }\n\n /**\n *\n *\n * @param {any} [version=null]\n *\n * @memberOf OS\n */\n setVersion(version: string | null = null) {\n this.version = (version || RegExp.$1 || 'n/a').replace(/_/gi, '.');\n }\n\n /**\n *\n *\n * @param {any} [versionNameFn=null]\n *\n * @memberOf OS\n */\n setVersionName(versionNameFn: Function | null = null) {\n if (versionNameFn instanceof Function) {\n this.versionName = versionNameFn.call(this, this.version);\n }\n }\n}\n"],"names":[],"version":3,"file":"software.js.map"} \ No newline at end of file diff --git a/packages/software/dist/software.mjs b/packages/software/dist/software.mjs new file mode 100644 index 0000000..1cf081f --- /dev/null +++ b/packages/software/dist/software.mjs @@ -0,0 +1,2045 @@ +import {Asserts as $7wVXk$Asserts, CssFlagsClass as $7wVXk$CssFlagsClass} from "@detector-js/core"; + +function $parcel$export(e, n, v, s) { + Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); +} +var $2627ae31ee4eaf7f$exports = {}; + +$parcel$export($2627ae31ee4eaf7f$exports, "Browser", () => $2627ae31ee4eaf7f$export$5fefc2586e00a689); + +class $2627ae31ee4eaf7f$export$5fefc2586e00a689 extends (0, $7wVXk$CssFlagsClass) { + #reStrVerNum; + #reStrVer; + #reVer; + /** + * Creates an instance of Browser. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='browser'] + * + * @memberOf Browser + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "browser"){ + super(ua, flags, cssFlagsPrefix); + this.#createTestElements(); + this.setVersion(); + } + /** + * + * + * + * @memberOf Browser + */ #createTestElements() { + this.#reStrVerNum = "(?:\\:|\\s|\\/)?(?:(\\w+(?:(?:\\.|\\_)\\w+)+)|\\d+)?"; + this.#reStrVer = "(?:version)" + this.#reStrVerNum; + this.#reVer = new RegExp(this.#reStrVer, "i"); + this.ua.match(this.#reVer); + } + // /** + // * + // * + // * + // * @memberOf Browser + // */ + // _destroyTestElements() { + // this._reStrVerNum = null; + // this._reStrVer = null; + // this._reVer = null; + // delete this._reStrVerNum; + // delete this._reStrVer; + // delete this._reVer; + // } + #reTest(reStr = this.#reStrVer) { + return new RegExp(reStr, "i").test(this.ua); + } + //#region Un-Common/Rare/Mythic Browsers + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Amaya() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:amaya)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Arora() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:arora)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Avant() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:avant(?:sbrowser))" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Baidu() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:(?:b(?:(?:a)?idu)?(?:d)?)(?:browser)(?:\\_i18n)?)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Basilisk() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:basilisk)" + this.#reStrVer) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get BlackBerry() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:blackberry|bb.*;.*\\)\\s)" + this.#reStrVer) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Blazer() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:blazer)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Bolt() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:bolt)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Brave() { + return this.#checkAssertsResult(// @ts-ignore + (0, $7wVXk$Asserts).one([ + !!window.navigator.brave || !!window.navigator.Brave, + this.#reTest("(?:brave)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Camino() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:camino)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Chimera() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:chimera)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get ComodoDragon() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:comodo(?:\\_|\\s)dragon)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Conkeror() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:conkeror)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Dillo() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:dillo)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Dolphin() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:dolfin)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Dorado() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:dorado.+ser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Doris() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:doris)" + this.#reStrVerNum) + ])); + } + #getElectronVersion() { + return this.process?.versions?.electron ?? "n/a"; + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Electron() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + // @ts-ignore + ()=>this.process.type === "renderer", + ()=>!!this.process.versions.electron, + ()=>!!this.navigator && this.#reTest("electron") // Detect the user agent when the `nodeIntegration` option is set to true + ], true), false, this.#getElectronVersion()); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Epiphany() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:epiphany)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Falkon() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:falkon)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Fennec() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:fennec)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Firebird() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:firebird)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Flock() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:flock)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get GoBrowser() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:gobrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get GoogleBot() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:googlebot)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get iCab() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:icab)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IceApe() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:iceape)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IceBrowser() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:ices?browser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IceCat() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:icecat)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IceDragon() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:icedragon)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Iridium() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:iridium)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Iron() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:iron)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Jasmine() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:jasmine)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Konqueror() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:konqueror)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get KMeleon() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:k-meleon)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Links() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:links)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Linx() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:lynx)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Lunascape() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:lunascape)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Maemo() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:maemosbrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get MaxthonMobile() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:mxios)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Maxthon() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + !this.MaxthonMobile, + this.#reTest("(?:maxthon|mxnitro)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Midori() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:midori)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Minimo() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:minimo)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get MIUIBrowser() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:xiaomi\\/miuibrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Mosaic() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:mosaic)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get MZBrowser() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:MZBrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Netfront() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:netfront)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Netscape() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:navigator|netscape)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get NetSurf() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:netsurf)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get NokiaBrowser() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:nokias?browser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OmniWeb() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:omniweb)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OviBrowser() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:ovibrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Palemoon() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:palemoon)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Phoenix() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:phoenix)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get PhantomJS() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:phantomjs)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Polaris() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:polaris)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Puffin() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:puffin)" + this.#reStrVerNum) + ]), true); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get QQBrowserMobile() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:mqq(?:browser)?)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get QQBrowser() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + !this.QQBrowserMobile, + this.#reTest("(?:qq(?:browser)?(?:lite)?)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Quark() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:quark)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get QupZilla() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:qupzilla)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Reconq() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:rekonq)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get RockMelt() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:rockmelt)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Sailfish() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:sailfish(?:s?browser))" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get SamsungBrowser() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:samsungbrowser)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get SeaMonkey() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:seamonkey)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Silk() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:silk)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Skyfire() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:skyfire)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Sleipnir() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:sleipnir)" + this.#reStrVerNum) + ]), true); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Slim() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:slim(?:browser)?)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get SlimerJS() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:slimerjs)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Swing() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:swing)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get TizenBrowser() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:tizen(?:browser)?)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get UCBrowser() { + // a.k.a. UCBrowserMobile || UCBrowserMini + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:uc(?:mini|browser))" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Vivaldi() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:vivaldi)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get w3m() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:w3m)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Waterfox() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:waterfox)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get WebOSBrowser() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:w(?:eb)?osbrowser)" + this.#reStrVerNum) + ]), true); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get WeChat() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:micromessenger)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Whale() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + this.#reTest("(?:whale)" + this.#reStrVerNum) + ]), true); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Yandex() { + return (0, $7wVXk$Asserts).one([ + this.#reTest("(?:ya(?:browser|ndex))" + this.#reStrVerNum) + ]); + } + //#endregion + //#region Common Browsers + /** + * + * + * @readonly + * + * @memberOf Browser + */ get AndroidBrowser() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + !this.#reTest("like android"), + this.#reTest("(?:android.*)" + this.#reStrVer) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get ChromeMobile() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + !this.#reTest("like chrome"), + this.#reTest("((?:android.+)crmo|crios)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Chrome() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + !this.Brave, + !this.ChromeMobile, + !this.AndroidBrowser, + !this.#reTest("like chrome"), + this.#reTest("(?:(?:headless)?chrome)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Chromium() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:chromium)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get EdgeMobile() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:edg(?:ios|a))" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Edge() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + !this.IE, + this.#reTest("(?:^(?:(?!mobile|android|ios).)*)(?:edge)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get FirefoxFocus() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:focus)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get FirefoxMobile() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.FirefoxFocus, + this.#reTest("(?:fxios)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Firefox() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:firefox|iceweasel)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IEMobile() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:iemobile)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get IE() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + !this.IEMobile, + /(?:msie|ie|trident).*(?:;\srv:(?:(\w+(?:(?:\.|\_)\w+)+)|\d+))/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OperaMini() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:operasmini)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OperaTouch() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:opt)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OperaCoast() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).one([ + this.#reTest("(?:coast)" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get OperaMobile() { + // a.k.a. Opera Mobile || Opera Coast || Opera Mini || Opera Touch || Opera iOS + return this.#checkAssertsResult(// @ts-ignore + (0, $7wVXk$Asserts).one([ + !!this.root.opera, + !!this.root.opr + ]) && (0, $7wVXk$Asserts).one([ + this.OperaMini, + this.OperaCoast, + this.OperaTouch, + this.#reTest("(?:op(?:r|ios))" + this.#reStrVerNum) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Opera() { + return this.#checkAssertsResult(// @ts-ignore + (0, $7wVXk$Asserts).one([ + !!this.root.opera, + !!this.root.opr + ]) && (0, $7wVXk$Asserts).all([ + !this.OperaMobile + ]) && (0, $7wVXk$Asserts).one([ + this.#reTest("(?:op(?:era|r)|mms)" + this.#reStrVerNum) + ]), true); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get SafariMobile() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + /iphone|ipad|ipod/i.test(this.ua), + !this.AndroidBrowser, + !this.Chrome, + !this.PhantomJS + ]) && (0, $7wVXk$Asserts).one([ + /version\/([\w\.]+).+?mobile\/\w+\s(safari)/i.test(this.ua), + /(?:Version\/(\d+[\.\d]+).*)?Mobile.*Safari\//i.test(this.ua), + /(?:(?:iPod|iPad|iPhone).+Version|MobileSafari)\/(\d+[\.\d]+)/i.test(this.ua), + /(?:applewebkit\/\d+.*)(?:.*mobile\/(?:\d+)?)(?:.*safari\/(?:\d+)?)(?:\s|\/)?(\w+(?:(?:[._])\w+)+|\d+)?/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Browser + */ get Safari() { + return this.#checkAssertsResult((0, $7wVXk$Asserts).all([ + /safari|applewebkit/i.test(this.ua), + !this.AndroidBrowser, + !this.SafariMobile, + !this.Chrome, + !this.PhantomJS + ]) && (0, $7wVXk$Asserts).one([ + /(?:applewebkit\/\d+.*)(?:version)(?:\s|\/)?(\w+(?:(?:[._])\w+)+|\d+)?(?:.*safari\/(?:\d+)?)?/i.test(this.ua) + ])); + } + //#endregion + /** + * + * + * @param {boolean} [assertsResult=false] + * @param {boolean} [inverted=false] + * @param {any} [version=null] + * @returns boolean + * + * @memberOf Browser + */ #checkAssertsResult(assertsResult = false, inverted = false, version = null) { + if (assertsResult) { + this.setVersion(version, inverted); + return true; + } + return false; + } + /** + * + * + * @param {any} [version=null] + * @param {boolean} [inverted=false] + * + * @memberOf Browser + */ setVersion(version = null, inverted = false) { + if (inverted) version = version || this.version || RegExp.$1 || "n/a"; + else version = version || RegExp.$1 || this.version || "n/a"; + this.version = version.replace(/_/gi, "."); + } +} + + +var $213d9951548fc04c$exports = {}; + +$parcel$export($213d9951548fc04c$exports, "Engine", () => $213d9951548fc04c$export$2c3b404bf3a77a1f); + +class $213d9951548fc04c$export$2c3b404bf3a77a1f extends (0, $7wVXk$CssFlagsClass) { + /** + * Creates an instance of Engine. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='engine'] + * + * @memberOf Engine + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "engine"){ + super(ua, flags, cssFlagsPrefix); + this.version = "n/a"; + } + //#region Un-Common/Rare/Mythic Engines + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Amaya() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /(amaya)\/([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Goanna() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /(goanna)\/([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get iCab() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /(icab)[\/\s]([23]\.[\d\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get KHTML() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /(khtml)[\/\s]\(?([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Links() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /(links)[\/\s]\(?([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Linx() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /(lynx)\/([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get NetFront() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /(netfront)\/([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get NetSurf() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /(netsurf)\/([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Presto() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(presto)\/([\w\.]+)/i.test(this.ua), + /presto\/(\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Tasman() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /(tasman)[\/\s]\(?([\w\.]+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get w3m() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /w3m[\/\s]([\w\.]+)/i.test(this.ua) + ])); + } + //#endregion + //#region Common Engines + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Trident() { + return this._checkAssertsResult(// @ts-ignore + (0, $7wVXk$Asserts).all([ + !!this.document.documentMode + ]) && (0, $7wVXk$Asserts).one([ + /trident[\/\s](\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Blink() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + ()=>"Intl" in this.root && "v8BreakIterator" in this.root.Intl, + "CSS" in this.root, + /webkit\/537\.36.+chrome\/(?!27)/i.test(this.ua) + ], true)); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get EdgeHTML() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + "StyleMedia" in this.root, + !this.Trident + ]) && (0, $7wVXk$Asserts).one([ + /edge\/(\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get Gecko() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + "InstallTrigger" in this.root, + !/like gecko/i.test(this.ua) + ]) && (0, $7wVXk$Asserts).one([ + /rv\:([\w\.]{1,9}).+(gecko)/i.test(this.ua), + /gecko\/(\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf Engine + */ get WebKit() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + "webkitConvertPointFromNodeToPage" in this.root + ]) && (0, $7wVXk$Asserts).one([ + /(?:(?:apple)?webkit)\/(\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + //#endregion + /** + * + * + * @param {boolean} [assertsResult=false] + * @param {any} [version=null] + * @returns boolean + * + * @memberOf Engine + */ _checkAssertsResult(assertsResult = false, version = null) { + if (assertsResult) { + this.setVersion(version); + return true; + } + return false; + } + /** + * + * + * @param {any} [version=null] + * + * @memberOf Engine + */ /** + * + * + * @param {any} [version=null] + * + * @memberOf Engine + */ setVersion(version = null) { + this.version = version || RegExp.$1 || "n/a"; + } +} + + +var $562904da632f015c$exports = {}; + +$parcel$export($562904da632f015c$exports, "OS", () => $562904da632f015c$export$decc4a6e69bbf763); +/* eslint-disable quote-props */ /* eslint-disable no-else-return */ /* eslint-disable radix */ /* eslint-disable indent */ +class $562904da632f015c$export$decc4a6e69bbf763 extends (0, $7wVXk$CssFlagsClass) { + /** + * Creates an instance of OS. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='os'] + * + * @memberOf OS + */ constructor(ua = null, flags = {}, cssFlagsPrefix = "os"){ + super(ua, flags, cssFlagsPrefix); + this.version = "n/a"; + this.versionName = "n/a"; + } + /** + * + * + * @param {any} [versionNames={}] + * @param {any} [version=null] + * @returns string + * + * @memberOf OS + */ #getVersionNames(versionNames = {}, version = null) { + if (!!version) { + version = version.replace(/_/gi, "."); + return Object.getOwnPropertyNames(versionNames).filter((versionName)=>{ + return !!versionNames[versionName]; + })[0] || "n/a"; + } + return "n/a"; + } + //! Desktop OSs + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ #getWindowsVersionName(version1 = RegExp.$1 || "") { + return this.#getVersionNames({ + CE: /CE/i.test(version1), + 95: /95/i.test(version1), + 98: /98/i.test(version1), + ME: /ME/i.test(version1), + 2000: /NT(\s)?5\.0/i.test(version1), + XP: /NT(\s)?5\.1/i.test(version1) || /XP/i.test(version1), + 2003: /NT(\s)?5\.2/i.test(version1), + Vista: /NT(\s)?6\.0/i.test(version1), + 7: /NT(\s)?6\.1/i.test(version1), + 8: /NT(\s)?6\.2/i.test(version1), + 8.1: /NT(\s)?6\.3/i.test(version1), + 10: /NT(\s)?6\.4/i.test(version1) || /NT(\s)?10\.0/i.test(version1), + RT: /ARM/.test(version1) + }, version1); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Windows() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /Win/i.test(this.ua) + ]) && (0, $7wVXk$Asserts).one([ + /Windows ((NT|XP)( \d\d?.\d)?)/i.test(this.ua) + ]), null, this.#getWindowsVersionName); + } + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ #getMacOSVersionName(version2 = RegExp.$1 || "") { + return this.#getVersionNames({ + // source https://en.wikipedia.org/wiki/Mac_OS_8 + Tempo: /^8\.0(\.+\d)?$/i.test(version2), + "Bride of Buster": /^8\.1(\.+\d)?$/i.test(version2), + Allegro: /^8\.5(\.+\d)?$/i.test(version2), + Veronica: /^8\.6(\.+\d)?$/i.test(version2), + // source https://en.wikipedia.org/wiki/Mac_OS_9 + Sonata: /^9\.0(\.+[012356789])?$/i.test(version2), + Minuet: /^9\.0\.4$/i.test(version2), + Fortissimo: /^9\.1(\.+\d)?$/i.test(version2), + Moonlight: /^9\.2(\.+[023456789])?$/i.test(version2), + Limelight: /^9\.2\.1$/i.test(version2), + // source https://en.wikipedia.org/wiki/List_of_Apple_operating_systems + Cheetah: /^10\.0(\.+\d)?$/i.test(version2), + Puma: /^10\.1(\.+\d)?$/i.test(version2), + Jaguar: /^10\.2(\.+\d)?$/i.test(version2), + Panther: /^10\.3(\.+\d)?$/i.test(version2), + Tiger: /^10\.4(\.+\d)?$/i.test(version2), + Leopard: /^10\.5(\.+\d)?$/i.test(version2), + "Snow Leopard": /^10\.6(\.+\d)?$/i.test(version2), + Lion: /^10\.7(\.+\d)?$/i.test(version2), + "Mountain Lion": /^10\.8(\.+\d)?$/i.test(version2), + Mavericks: /^10\.9(\.+\d)?$/i.test(version2), + Yosemite: /^10\.10(\.+\d)?$/i.test(version2), + "El Capitan": /^10\.11(\.+\d)?$/i.test(version2), + Sierra: /^10\.12(\.+\d)?$/i.test(version2), + "High Sierra": /^10\.13(\.+\d)?$/i.test(version2), + Mojave: /^10\.14(\.+\d)?$/i.test(version2), + Catalina: /^10\.15(\.+\d)?$/i.test(version2), + "Big Sur": /^11(\.+\d)(\.+\d)?$/i.test(version2), + Monterey: /^12(\.+\d)(\.+\d)?$/i.test(version2), + Ventura: /^13(\.+\d)(\.+\d)?$/i.test(version2) + }, version2); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get macOS() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + !this.iOS, + !/mobile\//i.test(this.ua), + /mac/i.test(this.ua), + !/like mac/i.test(this.ua) + ]) && (0, $7wVXk$Asserts).one([ + /(macintosh|mac(?=_powerpc)\s)/i.test(this.ua), + /(mac\sos\sx)\s?([\w\s\.]*)/i.test(this.ua) + ]) && (0, $7wVXk$Asserts).one([ + /Mac[ +]OS[ +]X(?:[ /](?:Version )?(\d+(?:[_\.]\d+)+))?/i.test(this.ua), + /Mac (\d+(?:[_\.]\d+)+)/i.test(this.ua), + /mac os x (\d+(\.?_?\d+)+)/i.test(this.ua) + ]), null, this.#getMacOSVersionName); + } + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ _getUnixDistroName(version = RegExp.$1 || "") { + return this.#getVersionNames({ + FreeBSD: /\s(freebsd)\s?([\w\.]*)/i.test(version), + NetBSD: /\s(netbsd|dragonfly)\s?([\w\.]*)/i.test(version), + OpenBSD: /\s(openbsd|dragonfly)\s?([\w\.]*)/i.test(version), + "PC-BSD": /\s(pc-bsd|dragonfly)\s?([\w\.]*)/i.test(version), + DragonFly: /\s(dragonfly)\s?([\w\.]*)/i.test(version) + }, version); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Unix() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + /X11/i.test(this.ua) + ]) && (0, $7wVXk$Asserts).one([ + /(unix)\s?([\w\.]*)/i.test(this.ua) + ]), null, this._getUnixDistroName); + } + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ _getLinuxDistroName(version = RegExp.$1 || "") { + return this.#getVersionNames({ + Mint: /(mint)[\/\s\(]?(\w*)/i.test(version), + Mageia: /(mageia)[;\s]/i.test(version), + VectorLinux: /(vectorlinux)[;\s]/i.test(version), + Joli: /(joli)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Ubuntu: /([kxln]?ubuntu)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Debian: /(debian)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + SuSE: /(suse|opensuse)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Gentoo: /(gentoo)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Arch: /((?=\s)arch)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Slackware: /(slackware)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Fedora: /(fedora)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Mandriva: /(mandriva)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + CentOS: /(centos)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + PCLinuxOS: /(pclinuxos)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + RedHat: /(redhat)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Zenwalk: /(zenwalk)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version), + Linpus: /(linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i.test(version) + }, version); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Linux() { + return this._checkAssertsResult((0, $7wVXk$Asserts).all([ + !this.Android, + /Linux/i.test(this.ua) + ]), null, this._getLinuxDistroName); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get ChromiumOS() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(cros)\s[\w]+\s([\w\.]+\w)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Solaris() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(sunos)\s?([\w\.\d]*)/i.test(this.ua), + /((?:open)?solaris)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Plan9() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(plan\s9)/i.test(this.ua) + ])); + } + get Minix() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(minix)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get BeOS() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(beos)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get OS2() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(os\/2)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get AmigaOS() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(amigaos)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get MorphOS() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(morphos)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get RISCOS() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(risc\sos)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get OpenVMS() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(openvms)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Fuchsia() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(fuchsia)/i.test(this.ua) + ])); + } + //! Mobile OSs + /** + * + * + * @readonly + * + * @memberOf OS + */ get WindowsPhone() { + // a.k.a. Windows Mobile + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i.test(this.ua), + /(windows\smobile)[\s\/]?([ntce\d\.\s]+\w)/i.test(this.ua), + /windows phone (?:os)?\s?(\d+(\.\d+)*)/i.test(this.ua) + ])); + // // Detect Windows Phone 7 desktop mode. + // if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(ua) || 0)[1])) { + // name += ' Mobile'; + // os = 'Windows Phone ' + (/\+$/.test(data) ? data : data + '.x'); + // description.unshift('desktop mode'); + // } + // // Detect Windows Phone 8.x desktop mode. + // if (/\bWPDesktop\b/i.test(ua)) { + // name = 'IE Mobile'; + // os = 'Windows Phone 8.x'; + // description.unshift('desktop mode'); + // version || (version = (/\brv:([\d.]+)/.exec(ua) || 0)[1]); + // } + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get iOS() { + return this._checkAssertsResult(// @ts-ignore + (0, $7wVXk$Asserts).all([ + !window.MSStream, + /iP(?:ad|hone|od)/.test(this.ua) + ]) && (0, $7wVXk$Asserts).one([ + /os\s((\d+([_\s]\d+)*)|(\d+(?:[_\.]\d+)*)) like mac os x/i.test(this.ua) + ])); + } + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ _getAndroidVersionName(version = RegExp.$1 || "") { + return this.#getVersionNames({ + "1.0": /^1\.[01234]$/i.test(version), + Cupcake: /^1\.5(\.+\d)?$/i.test(version), + Donut: /^1\.6(\.+\d)?$/i.test(version), + Eclair: /^2\.[01](\.+\d)?$/i.test(version), + Froyo: /^2\.2(\.+\d)?$/i.test(version), + Gingerbread: /^2\.3(\.+\d)?$/i.test(version), + Honeycomb: /^3(\.+\d)(\.+\d)?$/i.test(version), + "Ice Cream Sandwich": /^4\.[01](\.+\d)?$/i.test(version), + "Jelly Bean": /^4\.[23](\.+\d)?$/i.test(version), + KitKat: /^4\.[456789](\.+\d)?$/i.test(version), + Lollipop: /^5(\.\d)(\.+\d)?$/i.test(version), + Marshmallow: /^6(\.\d)(\.+\d)?$/i.test(version), + Nougat: /^7(\.\d)(\.+\d)?$/i.test(version), + Oreo: /^8(\.\d)(\.+\d)?$/i.test(version), + Pie: /^9(\.\d)(\.+\d)?$/i.test(version) + }, version); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Android() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /android[\s/-](\d+(\.\d+)*)/i.test(this.ua) + ]), null, this._getAndroidVersionName); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Bada() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(bada)[\/\s-]?([\w\.]*)/i.test(this.ua), + /bada\/(\d+(\.\d+)*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Blackberry() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /blackberry|\bbb\d+/i.test(this.ua), + /rim\stablet/i.test(this.ua) + ]) && (0, $7wVXk$Asserts).one([ + /rim\stablet\sos\s(\d+(\.\d+)*)/i.test(this.ua), + /blackberry\d+\/(\d+([_\s]\d+)*)/i.test(this.ua), + /blackberry[\d]+\/(\d+(\.?_?\d+)+)/i.test(this.ua), + /(blackberry)\w*\/?([\w\.]*)/i.test(this.ua), + /\bbb(\d+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Contiki() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(contiki)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get MeeGo() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(meego)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get RIM() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(rim\stablet\sos)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get QNX() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(qnx)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Palm() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(palm\sos)[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Symbian() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i.test(this.ua) + ])); + } + //! TV OSs + /** + * + * + * @readonly + * + * @memberOf OS + */ get WebOS() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(webos)[\/\s-]?([\w\.]*)/i.test(this.ua), + /(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i.test(this.ua), + /w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i.test(this.ua) + ])); + } + /** + * + * + * @readonly + * + * @memberOf OS + */ get Tizen() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /(tizen)[/\s](\d+(\.\d+)*)/i.test(this.ua) + ])); + } + //! Other OSs + /** + * + * + * @readonly + * + * @memberOf OS + */ get Raspbian() { + return this._checkAssertsResult((0, $7wVXk$Asserts).one([ + /raspbian[/\s](\d+(\.\d+)*)/i.test(this.ua) + ])); + } + /** + * + * + * @param {boolean} [assertsResult=false] + * @param {any} [version=null] + * @param {any} [versionNameFn=null] + * @returns boolean + * + * @memberOf OS + */ _checkAssertsResult(assertsResult = false, version = null, versionNameFn = null) { + if (assertsResult) { + this.setVersion(version); + this.setVersionName(versionNameFn); + return true; + } + return false; + } + /** + * + * + * @param {any} [version=null] + * + * @memberOf OS + */ setVersion(version = null) { + this.version = (version || RegExp.$1 || "n/a").replace(/_/gi, "."); + } + /** + * + * + * @param {any} [versionNameFn=null] + * + * @memberOf OS + */ setVersionName(versionNameFn = null) { + if (versionNameFn instanceof Function) this.versionName = versionNameFn.call(this, this.version); + } +} + + +"use strict"; + + +export {$2627ae31ee4eaf7f$export$5fefc2586e00a689 as Browser, $213d9951548fc04c$export$2c3b404bf3a77a1f as Engine, $562904da632f015c$export$decc4a6e69bbf763 as OS}; +//# sourceMappingURL=software.mjs.map diff --git a/packages/software/dist/software.mjs.map b/packages/software/dist/software.mjs.map new file mode 100644 index 0000000..58ad4da --- /dev/null +++ b/packages/software/dist/software.mjs.map @@ -0,0 +1 @@ +{"mappings":";;;;;;;;ACAA;AASO,MAAM,kDAAgB,CAAA,GAAA,oBAAa,AAAD;IACvC,CAAC,WAAW,CAAS;IACrB,CAAC,QAAQ,CAAS;IAClB,CAAC,KAAK,CAAS;IAEf;;;;;;;GAOC,GACD,YAAY,KAAoB,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,iBAAiB,SAAS,CAAE;QAC5E,KAAK,CAAC,IAAI,OAAO;QAEjB,IAAI,CAAC,CAAC,kBAAkB;QAExB,IAAI,CAAC,UAAU;IACjB;IAEA;;;;;GAKC,GACD,CAAC,kBAAkB,GAAG;QACpB,IAAI,CAAC,CAAC,WAAW,GAAG;QACpB,IAAI,CAAC,CAAC,QAAQ,GAAG,gBAAgB,IAAI,CAAC,CAAC,WAAW;QAClD,IAAI,CAAC,CAAC,KAAK,GAAG,IAAI,OAAO,IAAI,CAAC,CAAC,QAAQ,EAAE;QAEzC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK;IAC3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MC,GACD,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAA,GAAA,cAAO,AAAD,EAAE,GAAG,CAAC;YAAC,6BAA6B,IAAI,CAAC,IAAI,CAAC,EAAE;SAAE;IAC1F;IAEA,aAAa;IACb;;;;;;GAMC,GACD,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,mBAAmB,CAAC,CAAA,GAAA,cAAO,AAAD,EAAE,GAAG,CAAC;YAAC,8BAA8B,IAAI,CAAC,IAAI,CAAC,EAAE;SAAE;IAC3F;IAEA;;;;;;;;;GASC,GACD,oBACE,gBAAyB,KAAK,EAC9B,UAAyB,IAAI,EAC7B,gBAAiC,IAAI,EACrC;QACA,IAAI,eAAe;YACjB,IAAI,CAAC,UAAU,CAAC;YAChB,IAAI,CAAC,cAAc,CAAC;YAEpB,OAAO,IAAI;QACb,CAAC;QAED,OAAO,KAAK;IACd;IAEA;;;;;;GAMC,GACD,WAAW,UAAyB,IAAI,EAAE;QACxC,IAAI,CAAC,OAAO,GAAG,AAAC,CAAA,WAAW,OAAO,EAAE,IAAI,KAAI,EAAG,OAAO,CAAC,OAAO;IAChE;IAEA;;;;;;GAMC,GACD,eAAe,gBAAiC,IAAI,EAAE;QACpD,IAAI,yBAAyB,UAC3B,IAAI,CAAC,WAAW,GAAG,cAAc,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO;IAE5D;AACF;;;AHlpBA","sources":["packages/software/lib/software.ts","packages/software/lib/browser.ts","packages/software/lib/engine.ts","packages/software/lib/os.ts"],"sourcesContent":["'use strict';\n\nexport * from './browser';\nexport * from './engine';\nexport * from './os';\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class Browser\n * @extends {CssFlagsClass}\n */\nexport class Browser extends CssFlagsClass {\n #reStrVerNum: string;\n #reStrVer: string;\n #reVer: RegExp;\n version: any;\n /**\n * Creates an instance of Browser.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='browser']\n *\n * @memberOf Browser\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'browser') {\n super(ua, flags, cssFlagsPrefix);\n\n this.#createTestElements();\n\n this.setVersion();\n }\n\n /**\n *\n *\n *\n * @memberOf Browser\n */\n #createTestElements() {\n this.#reStrVerNum = '(?:\\\\:|\\\\s|\\\\/)?(?:(\\\\w+(?:(?:\\\\.|\\\\_)\\\\w+)+)|\\\\d+)?';\n this.#reStrVer = '(?:version)' + this.#reStrVerNum;\n this.#reVer = new RegExp(this.#reStrVer, 'i');\n\n this.ua.match(this.#reVer);\n }\n\n // /**\n // *\n // *\n // *\n // * @memberOf Browser\n // */\n // _destroyTestElements() {\n // this._reStrVerNum = null;\n // this._reStrVer = null;\n // this._reVer = null;\n\n // delete this._reStrVerNum;\n // delete this._reStrVer;\n // delete this._reVer;\n // }\n\n #reTest(reStr = this.#reStrVer) {\n return new RegExp(reStr, 'i').test(this.ua);\n }\n\n //#region Un-Common/Rare/Mythic Browsers\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Amaya() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:amaya)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Arora() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:arora)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Avant() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:avant(?:sbrowser))' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Baidu() {\n return this.#checkAssertsResult(\n Asserts.one([this.#reTest('(?:(?:b(?:(?:a)?idu)?(?:d)?)(?:browser)(?:\\\\_i18n)?)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Basilisk() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:basilisk)' + this.#reStrVer)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get BlackBerry() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:blackberry|bb.*;.*\\\\)\\\\s)' + this.#reStrVer)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Blazer() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:blazer)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Bolt() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:bolt)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Brave() {\n return this.#checkAssertsResult(\n // @ts-ignore\n Asserts.one([!!window.navigator.brave || !!window.navigator.Brave, this.#reTest('(?:brave)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Camino() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:camino)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Chimera() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:chimera)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get ComodoDragon() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:comodo(?:\\\\_|\\\\s)dragon)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Conkeror() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:conkeror)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Dillo() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:dillo)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Dolphin() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:dolfin)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Dorado() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:dorado.+ser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Doris() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:doris)' + this.#reStrVerNum)]));\n }\n\n #getElectronVersion() {\n return this.process?.versions?.electron ?? 'n/a';\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Electron() {\n return this.#checkAssertsResult(\n Asserts.one(\n [\n // @ts-ignore\n () => this.process.type === 'renderer', // Renderer process\n () => !!this.process.versions.electron, // Main process\n () => !!this.navigator && this.#reTest('electron') // Detect the user agent when the `nodeIntegration` option is set to true\n ],\n true\n ),\n false,\n this.#getElectronVersion()\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Epiphany() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:epiphany)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Falkon() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:falkon)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Fennec() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:fennec)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Firebird() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:firebird)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Flock() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:flock)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get GoBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:gobrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get GoogleBot() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:googlebot)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get iCab() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:icab)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IceApe() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:iceape)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IceBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:ices?browser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IceCat() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:icecat)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IceDragon() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:icedragon)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Iridium() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:iridium)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Iron() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:iron)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Jasmine() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:jasmine)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Konqueror() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:konqueror)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get KMeleon() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:k-meleon)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Links() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:links)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Linx() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:lynx)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Lunascape() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:lunascape)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Maemo() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:maemosbrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get MaxthonMobile() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:mxios)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Maxthon() {\n return this.#checkAssertsResult(\n Asserts.all([!this.MaxthonMobile, this.#reTest('(?:maxthon|mxnitro)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Midori() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:midori)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Minimo() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:minimo)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get MIUIBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:xiaomi\\\\/miuibrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Mosaic() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:mosaic)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get MZBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:MZBrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Netfront() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:netfront)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Netscape() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:navigator|netscape)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get NetSurf() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:netsurf)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get NokiaBrowser() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:nokias?browser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OmniWeb() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:omniweb)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OviBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:ovibrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Palemoon() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:palemoon)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Phoenix() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:phoenix)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get PhantomJS() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:phantomjs)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Polaris() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:polaris)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Puffin() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:puffin)' + this.#reStrVerNum)]), true);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get QQBrowserMobile() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:mqq(?:browser)?)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get QQBrowser() {\n return this.#checkAssertsResult(\n Asserts.all([!this.QQBrowserMobile, this.#reTest('(?:qq(?:browser)?(?:lite)?)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Quark() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:quark)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get QupZilla() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:qupzilla)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Reconq() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:rekonq)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get RockMelt() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:rockmelt)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Sailfish() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:sailfish(?:s?browser))' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get SamsungBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:samsungbrowser)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get SeaMonkey() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:seamonkey)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Silk() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:silk)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Skyfire() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:skyfire)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Sleipnir() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:sleipnir)' + this.#reStrVerNum)]), true);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Slim() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:slim(?:browser)?)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get SlimerJS() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:slimerjs)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Swing() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:swing)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get TizenBrowser() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:tizen(?:browser)?)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get UCBrowser() {\n // a.k.a. UCBrowserMobile || UCBrowserMini\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:uc(?:mini|browser))' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Vivaldi() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:vivaldi)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get w3m() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:w3m)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Waterfox() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:waterfox)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get WebOSBrowser() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:w(?:eb)?osbrowser)' + this.#reStrVerNum)]), true);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get WeChat() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:micromessenger)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Whale() {\n return this.#checkAssertsResult(Asserts.all([this.#reTest('(?:whale)' + this.#reStrVerNum)]), true);\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Yandex() {\n return Asserts.one([this.#reTest('(?:ya(?:browser|ndex))' + this.#reStrVerNum)]);\n }\n //#endregion\n\n //#region Common Browsers\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get AndroidBrowser() {\n return this.#checkAssertsResult(\n Asserts.all([!this.#reTest('like android'), this.#reTest('(?:android.*)' + this.#reStrVer)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get ChromeMobile() {\n return this.#checkAssertsResult(\n Asserts.all([!this.#reTest('like chrome'), this.#reTest('((?:android.+)crmo|crios)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Chrome() {\n return this.#checkAssertsResult(\n Asserts.all([\n !this.Brave,\n !this.ChromeMobile,\n !this.AndroidBrowser,\n !this.#reTest('like chrome'),\n this.#reTest('(?:(?:headless)?chrome)' + this.#reStrVerNum)\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Chromium() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:chromium)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get EdgeMobile() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:edg(?:ios|a))' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Edge() {\n return this.#checkAssertsResult(\n Asserts.all([!this.IE, this.#reTest('(?:^(?:(?!mobile|android|ios).)*)(?:edge)' + this.#reStrVerNum)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get FirefoxFocus() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:focus)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get FirefoxMobile() {\n return this.#checkAssertsResult(Asserts.one([this.FirefoxFocus, this.#reTest('(?:fxios)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Firefox() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:firefox|iceweasel)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IEMobile() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:iemobile)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get IE() {\n return this.#checkAssertsResult(\n Asserts.all([!this.IEMobile, /(?:msie|ie|trident).*(?:;\\srv:(?:(\\w+(?:(?:\\.|\\_)\\w+)+)|\\d+))/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OperaMini() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:operasmini)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OperaTouch() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:opt)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OperaCoast() {\n return this.#checkAssertsResult(Asserts.one([this.#reTest('(?:coast)' + this.#reStrVerNum)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get OperaMobile() {\n // a.k.a. Opera Mobile || Opera Coast || Opera Mini || Opera Touch || Opera iOS\n return this.#checkAssertsResult(\n // @ts-ignore\n Asserts.one([!!this.root.opera, !!this.root.opr]) &&\n Asserts.one([\n this.OperaMini,\n this.OperaCoast,\n this.OperaTouch,\n this.#reTest('(?:op(?:r|ios))' + this.#reStrVerNum)\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Opera() {\n return this.#checkAssertsResult(\n // @ts-ignore\n Asserts.one([!!this.root.opera, !!this.root.opr]) &&\n Asserts.all([!this.OperaMobile]) &&\n Asserts.one([this.#reTest('(?:op(?:era|r)|mms)' + this.#reStrVerNum)]),\n true\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get SafariMobile() {\n return this.#checkAssertsResult(\n Asserts.all([/iphone|ipad|ipod/i.test(this.ua), !this.AndroidBrowser, !this.Chrome, !this.PhantomJS]) &&\n Asserts.one([\n /version\\/([\\w\\.]+).+?mobile\\/\\w+\\s(safari)/i.test(this.ua),\n /(?:Version\\/(\\d+[\\.\\d]+).*)?Mobile.*Safari\\//i.test(this.ua),\n /(?:(?:iPod|iPad|iPhone).+Version|MobileSafari)\\/(\\d+[\\.\\d]+)/i.test(this.ua),\n /(?:applewebkit\\/\\d+.*)(?:.*mobile\\/(?:\\d+)?)(?:.*safari\\/(?:\\d+)?)(?:\\s|\\/)?(\\w+(?:(?:[._])\\w+)+|\\d+)?/i.test(\n this.ua\n )\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Browser\n */\n get Safari() {\n return this.#checkAssertsResult(\n Asserts.all([\n /safari|applewebkit/i.test(this.ua),\n !this.AndroidBrowser,\n !this.SafariMobile,\n !this.Chrome,\n !this.PhantomJS\n ]) &&\n Asserts.one([\n /(?:applewebkit\\/\\d+.*)(?:version)(?:\\s|\\/)?(\\w+(?:(?:[._])\\w+)+|\\d+)?(?:.*safari\\/(?:\\d+)?)?/i.test(this.ua)\n ])\n );\n }\n //#endregion\n\n /**\n *\n *\n * @param {boolean} [assertsResult=false]\n * @param {boolean} [inverted=false]\n * @param {any} [version=null]\n * @returns boolean\n *\n * @memberOf Browser\n */\n #checkAssertsResult(assertsResult: boolean = false, inverted: boolean = false, version: string | null = null) {\n if (assertsResult) {\n this.setVersion(version, inverted);\n\n return true;\n }\n\n return false;\n }\n\n /**\n *\n *\n * @param {any} [version=null]\n * @param {boolean} [inverted=false]\n *\n * @memberOf Browser\n */\n setVersion(version: string | null = null, inverted = false) {\n if (inverted) {\n version = version || this.version || RegExp.$1 || 'n/a';\n } else {\n version = version || RegExp.$1 || this.version || 'n/a';\n }\n\n this.version = version!.replace(/_/gi, '.');\n }\n}\n","import { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class Engine\n * @extends {CssFlagsClass}\n */\nexport class Engine extends CssFlagsClass {\n version: string;\n\n /**\n * Creates an instance of Engine.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='engine']\n *\n * @memberOf Engine\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'engine') {\n super(ua, flags, cssFlagsPrefix);\n\n this.version = 'n/a';\n }\n\n //#region Un-Common/Rare/Mythic Engines\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Amaya() {\n return this._checkAssertsResult(Asserts.all([/(amaya)\\/([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Goanna() {\n return this._checkAssertsResult(Asserts.all([/(goanna)\\/([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get iCab() {\n return this._checkAssertsResult(Asserts.all([/(icab)[\\/\\s]([23]\\.[\\d\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get KHTML() {\n return this._checkAssertsResult(Asserts.all([/(khtml)[\\/\\s]\\(?([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Links() {\n return this._checkAssertsResult(Asserts.all([/(links)[\\/\\s]\\(?([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Linx() {\n return this._checkAssertsResult(Asserts.all([/(lynx)\\/([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get NetFront() {\n return this._checkAssertsResult(Asserts.all([/(netfront)\\/([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get NetSurf() {\n return this._checkAssertsResult(Asserts.all([/(netsurf)\\/([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Presto() {\n return this._checkAssertsResult(\n Asserts.one([/(presto)\\/([\\w\\.]+)/i.test(this.ua), /presto\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Tasman() {\n return this._checkAssertsResult(Asserts.all([/(tasman)[\\/\\s]\\(?([\\w\\.]+)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get w3m() {\n return this._checkAssertsResult(Asserts.all([/w3m[\\/\\s]([\\w\\.]+)/i.test(this.ua)]));\n }\n //#endregion\n\n //#region Common Engines\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Trident() {\n return this._checkAssertsResult(\n // @ts-ignore\n Asserts.all([/*@cc_on!@*/ false || !!this.document.documentMode]) &&\n Asserts.one([/trident[\\/\\s](\\d+(\\.?_?\\d+)+)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Blink() {\n return this._checkAssertsResult(\n Asserts.all(\n [\n () => 'Intl' in this.root && 'v8BreakIterator' in this.root.Intl,\n 'CSS' in this.root,\n /webkit\\/537\\.36.+chrome\\/(?!27)/i.test(this.ua)\n ],\n true\n )\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get EdgeHTML() {\n return this._checkAssertsResult(\n Asserts.all(['StyleMedia' in this.root, !this.Trident]) && Asserts.one([/edge\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get Gecko() {\n return this._checkAssertsResult(\n Asserts.all(['InstallTrigger' in this.root, !/like gecko/i.test(this.ua)]) &&\n Asserts.one([/rv\\:([\\w\\.]{1,9}).+(gecko)/i.test(this.ua), /gecko\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf Engine\n */\n get WebKit() {\n return this._checkAssertsResult(\n Asserts.all(['webkitConvertPointFromNodeToPage' in this.root]) &&\n Asserts.one([/(?:(?:apple)?webkit)\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua)])\n );\n }\n //#endregion\n\n /**\n *\n *\n * @param {boolean} [assertsResult=false]\n * @param {any} [version=null]\n * @returns boolean\n *\n * @memberOf Engine\n */\n _checkAssertsResult(assertsResult = false, version = null) {\n if (assertsResult) {\n this.setVersion(version);\n\n return true;\n }\n\n return false;\n }\n\n /**\n *\n *\n * @param {any} [version=null]\n *\n * @memberOf Engine\n */\n /**\n *\n *\n * @param {any} [version=null]\n *\n * @memberOf Engine\n */\n setVersion(version = null) {\n this.version = version || RegExp.$1 || 'n/a';\n }\n}\n","/* eslint-disable quote-props */\n/* eslint-disable no-else-return */\n/* eslint-disable radix */\n/* eslint-disable indent */\nimport { Asserts, CssFlagsClass } from '@detector-js/core';\n\n/**\n *\n *\n * @export\n * @class OS\n * @extends {CssFlagsClass}\n */\nexport class OS extends CssFlagsClass {\n version: string;\n versionName: string;\n\n /**\n * Creates an instance of OS.\n * @param {any} [ua=null]\n * @param {any} [flags={}]\n * @param {string} [cssFlagsPrefix='os']\n *\n * @memberOf OS\n */\n constructor(ua: string | null = null, flags = {}, cssFlagsPrefix = 'os') {\n super(ua, flags, cssFlagsPrefix);\n\n this.version = 'n/a';\n this.versionName = 'n/a';\n }\n\n /**\n *\n *\n * @param {any} [versionNames={}]\n * @param {any} [version=null]\n * @returns string\n *\n * @memberOf OS\n */\n #getVersionNames(versionNames = {}, version: string | null = null) {\n if (!!version) {\n version = version.replace(/_/gi, '.');\n\n return (\n Object.getOwnPropertyNames(versionNames).filter((versionName) => {\n return !!versionNames[versionName];\n })[0] || 'n/a'\n );\n }\n\n return 'n/a';\n }\n\n //! Desktop OSs\n /**\n *\n *\n * @param {any} [version=RegExp.$1 || null]\n * @returns string\n *\n * @memberOf OS\n */\n #getWindowsVersionName(version: string = RegExp.$1 || '') {\n return this.#getVersionNames(\n {\n CE: /CE/i.test(version),\n 95: /95/i.test(version),\n 98: /98/i.test(version),\n ME: /ME/i.test(version),\n 2000: /NT(\\s)?5\\.0/i.test(version),\n XP: /NT(\\s)?5\\.1/i.test(version) || /XP/i.test(version),\n 2003: /NT(\\s)?5\\.2/i.test(version),\n Vista: /NT(\\s)?6\\.0/i.test(version),\n 7: /NT(\\s)?6\\.1/i.test(version),\n 8: /NT(\\s)?6\\.2/i.test(version),\n 8.1: /NT(\\s)?6\\.3/i.test(version),\n 10: /NT(\\s)?6\\.4/i.test(version) || /NT(\\s)?10\\.0/i.test(version),\n RT: /ARM/.test(version)\n },\n version\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Windows() {\n return this._checkAssertsResult(\n Asserts.all([/Win/i.test(this.ua)]) &&\n Asserts.one([\n /Windows ((NT|XP)( \\d\\d?.\\d)?)/i.test(this.ua)\n // /(windows)\\snt\\s6\\.2;\\s(arm)/i, // Windows RT\n // // ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [\n // /(win(?=3|9|n)|win\\s9x\\s)([nt\\d\\.]+)/i,\n // // ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [\n ]),\n null,\n this.#getWindowsVersionName\n );\n }\n\n /**\n *\n *\n * @param {any} [version=RegExp.$1 || null]\n * @returns string\n *\n * @memberOf OS\n */\n #getMacOSVersionName(version: string = RegExp.$1 || '') {\n return this.#getVersionNames(\n {\n // source https://en.wikipedia.org/wiki/Mac_OS_8\n Tempo: /^8\\.0(\\.+\\d)?$/i.test(version),\n 'Bride of Buster': /^8\\.1(\\.+\\d)?$/i.test(version),\n Allegro: /^8\\.5(\\.+\\d)?$/i.test(version),\n Veronica: /^8\\.6(\\.+\\d)?$/i.test(version),\n // source https://en.wikipedia.org/wiki/Mac_OS_9\n Sonata: /^9\\.0(\\.+[012356789])?$/i.test(version),\n Minuet: /^9\\.0\\.4$/i.test(version),\n Fortissimo: /^9\\.1(\\.+\\d)?$/i.test(version),\n Moonlight: /^9\\.2(\\.+[023456789])?$/i.test(version),\n Limelight: /^9\\.2\\.1$/i.test(version),\n // source https://en.wikipedia.org/wiki/List_of_Apple_operating_systems\n Cheetah: /^10\\.0(\\.+\\d)?$/i.test(version),\n Puma: /^10\\.1(\\.+\\d)?$/i.test(version),\n Jaguar: /^10\\.2(\\.+\\d)?$/i.test(version),\n Panther: /^10\\.3(\\.+\\d)?$/i.test(version),\n Tiger: /^10\\.4(\\.+\\d)?$/i.test(version),\n Leopard: /^10\\.5(\\.+\\d)?$/i.test(version),\n 'Snow Leopard': /^10\\.6(\\.+\\d)?$/i.test(version),\n Lion: /^10\\.7(\\.+\\d)?$/i.test(version),\n 'Mountain Lion': /^10\\.8(\\.+\\d)?$/i.test(version),\n Mavericks: /^10\\.9(\\.+\\d)?$/i.test(version),\n Yosemite: /^10\\.10(\\.+\\d)?$/i.test(version),\n 'El Capitan': /^10\\.11(\\.+\\d)?$/i.test(version),\n Sierra: /^10\\.12(\\.+\\d)?$/i.test(version),\n 'High Sierra': /^10\\.13(\\.+\\d)?$/i.test(version),\n Mojave: /^10\\.14(\\.+\\d)?$/i.test(version),\n Catalina: /^10\\.15(\\.+\\d)?$/i.test(version),\n 'Big Sur': /^11(\\.+\\d)(\\.+\\d)?$/i.test(version),\n Monterey: /^12(\\.+\\d)(\\.+\\d)?$/i.test(version),\n Ventura: /^13(\\.+\\d)(\\.+\\d)?$/i.test(version)\n },\n version\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get macOS() {\n return this._checkAssertsResult(\n Asserts.all([!this.iOS, !/mobile\\//i.test(this.ua), /mac/i.test(this.ua), !/like mac/i.test(this.ua)]) &&\n Asserts.one([/(macintosh|mac(?=_powerpc)\\s)/i.test(this.ua), /(mac\\sos\\sx)\\s?([\\w\\s\\.]*)/i.test(this.ua)]) &&\n Asserts.one([\n /Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?/i.test(this.ua),\n /Mac (\\d+(?:[_\\.]\\d+)+)/i.test(this.ua),\n /mac os x (\\d+(\\.?_?\\d+)+)/i.test(this.ua)\n ]),\n null,\n this.#getMacOSVersionName\n );\n }\n\n /**\n *\n *\n * @param {any} [version=RegExp.$1 || null]\n * @returns string\n *\n * @memberOf OS\n */\n _getUnixDistroName(version: string = RegExp.$1 || '') {\n return this.#getVersionNames(\n {\n FreeBSD: /\\s(freebsd)\\s?([\\w\\.]*)/i.test(version),\n NetBSD: /\\s(netbsd|dragonfly)\\s?([\\w\\.]*)/i.test(version),\n OpenBSD: /\\s(openbsd|dragonfly)\\s?([\\w\\.]*)/i.test(version),\n 'PC-BSD': /\\s(pc-bsd|dragonfly)\\s?([\\w\\.]*)/i.test(version),\n DragonFly: /\\s(dragonfly)\\s?([\\w\\.]*)/i.test(version)\n },\n version\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Unix() {\n return this._checkAssertsResult(\n Asserts.all([/X11/i.test(this.ua)]) && Asserts.one([/(unix)\\s?([\\w\\.]*)/i.test(this.ua)]),\n null,\n this._getUnixDistroName\n );\n }\n\n /**\n *\n *\n * @param {any} [version=RegExp.$1 || null]\n * @returns string\n *\n * @memberOf OS\n */\n _getLinuxDistroName(version: string = RegExp.$1 || '') {\n return this.#getVersionNames(\n {\n Mint: /(mint)[\\/\\s\\(]?(\\w*)/i.test(version),\n Mageia: /(mageia)[;\\s]/i.test(version),\n VectorLinux: /(vectorlinux)[;\\s]/i.test(version),\n Joli: /(joli)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Ubuntu: /([kxln]?ubuntu)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Debian: /(debian)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n SuSE: /(suse|opensuse)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Gentoo: /(gentoo)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Arch: /((?=\\s)arch)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Slackware: /(slackware)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Fedora: /(fedora)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Mandriva: /(mandriva)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n CentOS: /(centos)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n PCLinuxOS: /(pclinuxos)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n RedHat: /(redhat)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Zenwalk: /(zenwalk)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version),\n Linpus: /(linpus)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i.test(version)\n },\n version\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Linux() {\n return this._checkAssertsResult(\n Asserts.all([!this.Android, /Linux/i.test(this.ua)]),\n null,\n this._getLinuxDistroName\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get ChromiumOS() {\n return this._checkAssertsResult(Asserts.one([/(cros)\\s[\\w]+\\s([\\w\\.]+\\w)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Solaris() {\n return this._checkAssertsResult(\n Asserts.one([/(sunos)\\s?([\\w\\.\\d]*)/i.test(this.ua), /((?:open)?solaris)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Plan9() {\n return this._checkAssertsResult(Asserts.one([/(plan\\s9)/i.test(this.ua)]));\n }\n\n get Minix() {\n return this._checkAssertsResult(Asserts.one([/(minix)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get BeOS() {\n return this._checkAssertsResult(Asserts.one([/(beos)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get OS2() {\n return this._checkAssertsResult(Asserts.one([/(os\\/2)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get AmigaOS() {\n return this._checkAssertsResult(Asserts.one([/(amigaos)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get MorphOS() {\n return this._checkAssertsResult(Asserts.one([/(morphos)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get RISCOS() {\n return this._checkAssertsResult(Asserts.one([/(risc\\sos)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get OpenVMS() {\n return this._checkAssertsResult(Asserts.one([/(openvms)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Fuchsia() {\n return this._checkAssertsResult(Asserts.one([/(fuchsia)/i.test(this.ua)]));\n }\n\n //! Mobile OSs\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get WindowsPhone() {\n // a.k.a. Windows Mobile\n return this._checkAssertsResult(\n Asserts.one([\n /(windows\\sphone(?:\\sos)*)[\\s\\/]?([\\d\\.\\s\\w]*)/i.test(this.ua),\n /(windows\\smobile)[\\s\\/]?([ntce\\d\\.\\s]+\\w)/i.test(this.ua),\n /windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i.test(this.ua)\n ])\n );\n\n // // Detect Windows Phone 7 desktop mode.\n // if (name == 'IE' && (data = (/; *(?:XBLWP|ZuneWP)(\\d+)/i.exec(ua) || 0)[1])) {\n // name += ' Mobile';\n // os = 'Windows Phone ' + (/\\+$/.test(data) ? data : data + '.x');\n // description.unshift('desktop mode');\n // }\n\n // // Detect Windows Phone 8.x desktop mode.\n // if (/\\bWPDesktop\\b/i.test(ua)) {\n // name = 'IE Mobile';\n // os = 'Windows Phone 8.x';\n // description.unshift('desktop mode');\n // version || (version = (/\\brv:([\\d.]+)/.exec(ua) || 0)[1]);\n // }\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get iOS() {\n return this._checkAssertsResult(\n // @ts-ignore\n Asserts.all([!window.MSStream, /iP(?:ad|hone|od)/.test(this.ua)]) &&\n Asserts.one([/os\\s((\\d+([_\\s]\\d+)*)|(\\d+(?:[_\\.]\\d+)*)) like mac os x/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @param {any} [version=RegExp.$1 || null]\n * @returns string\n *\n * @memberOf OS\n */\n _getAndroidVersionName(version: string = RegExp.$1 || '') {\n return this.#getVersionNames(\n {\n '1.0': /^1\\.[01234]$/i.test(version),\n Cupcake: /^1\\.5(\\.+\\d)?$/i.test(version),\n Donut: /^1\\.6(\\.+\\d)?$/i.test(version),\n Eclair: /^2\\.[01](\\.+\\d)?$/i.test(version),\n Froyo: /^2\\.2(\\.+\\d)?$/i.test(version),\n Gingerbread: /^2\\.3(\\.+\\d)?$/i.test(version),\n Honeycomb: /^3(\\.+\\d)(\\.+\\d)?$/i.test(version),\n 'Ice Cream Sandwich': /^4\\.[01](\\.+\\d)?$/i.test(version),\n 'Jelly Bean': /^4\\.[23](\\.+\\d)?$/i.test(version),\n KitKat: /^4\\.[456789](\\.+\\d)?$/i.test(version),\n Lollipop: /^5(\\.\\d)(\\.+\\d)?$/i.test(version),\n Marshmallow: /^6(\\.\\d)(\\.+\\d)?$/i.test(version),\n Nougat: /^7(\\.\\d)(\\.+\\d)?$/i.test(version),\n Oreo: /^8(\\.\\d)(\\.+\\d)?$/i.test(version),\n Pie: /^9(\\.\\d)(\\.+\\d)?$/i.test(version)\n },\n version\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Android() {\n return this._checkAssertsResult(\n Asserts.one([/android[\\s/-](\\d+(\\.\\d+)*)/i.test(this.ua)]),\n null,\n this._getAndroidVersionName\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Bada() {\n return this._checkAssertsResult(\n Asserts.one([/(bada)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua), /bada\\/(\\d+(\\.\\d+)*)/i.test(this.ua)])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Blackberry() {\n return this._checkAssertsResult(\n Asserts.one([/blackberry|\\bbb\\d+/i.test(this.ua), /rim\\stablet/i.test(this.ua)]) &&\n Asserts.one([\n /rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i.test(this.ua),\n /blackberry\\d+\\/(\\d+([_\\s]\\d+)*)/i.test(this.ua),\n /blackberry[\\d]+\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua),\n /(blackberry)\\w*\\/?([\\w\\.]*)/i.test(this.ua),\n /\\bbb(\\d+)/i.test(this.ua)\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Contiki() {\n return this._checkAssertsResult(Asserts.one([/(contiki)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get MeeGo() {\n return this._checkAssertsResult(Asserts.one([/(meego)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get RIM() {\n return this._checkAssertsResult(Asserts.one([/(rim\\stablet\\sos)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get QNX() {\n return this._checkAssertsResult(Asserts.one([/(qnx)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Palm() {\n return this._checkAssertsResult(Asserts.one([/(palm\\sos)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Symbian() {\n return this._checkAssertsResult(Asserts.one([/(symbian\\s?os|symbos|s60(?=;))[\\/\\s-]?([\\w\\.]*)/i.test(this.ua)]));\n }\n\n //! TV OSs\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get WebOS() {\n return this._checkAssertsResult(\n Asserts.one([\n /(webos)[\\/\\s-]?([\\w\\.]*)/i.test(this.ua),\n /(?:web|hpw)[o0]s\\/(\\d+(\\.\\d+)*)/i.test(this.ua),\n /w(?:eb)?[o0]sbrowser\\/(\\d+(\\.?_?\\d+)+)/i.test(this.ua)\n ])\n );\n }\n\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Tizen() {\n return this._checkAssertsResult(Asserts.one([/(tizen)[/\\s](\\d+(\\.\\d+)*)/i.test(this.ua)]));\n }\n\n //! Other OSs\n /**\n *\n *\n * @readonly\n *\n * @memberOf OS\n */\n get Raspbian() {\n return this._checkAssertsResult(Asserts.one([/raspbian[/\\s](\\d+(\\.\\d+)*)/i.test(this.ua)]));\n }\n\n /**\n *\n *\n * @param {boolean} [assertsResult=false]\n * @param {any} [version=null]\n * @param {any} [versionNameFn=null]\n * @returns boolean\n *\n * @memberOf OS\n */\n _checkAssertsResult(\n assertsResult: boolean = false,\n version: string | null = null,\n versionNameFn: Function | null = null\n ) {\n if (assertsResult) {\n this.setVersion(version);\n this.setVersionName(versionNameFn);\n\n return true;\n }\n\n return false;\n }\n\n /**\n *\n *\n * @param {any} [version=null]\n *\n * @memberOf OS\n */\n setVersion(version: string | null = null) {\n this.version = (version || RegExp.$1 || 'n/a').replace(/_/gi, '.');\n }\n\n /**\n *\n *\n * @param {any} [versionNameFn=null]\n *\n * @memberOf OS\n */\n setVersionName(versionNameFn: Function | null = null) {\n if (versionNameFn instanceof Function) {\n this.versionName = versionNameFn.call(this, this.version);\n }\n }\n}\n"],"names":[],"version":3,"file":"software.mjs.map"} \ No newline at end of file diff --git a/packages/software/dist/software.types.d.ts b/packages/software/dist/software.types.d.ts new file mode 100644 index 0000000..b3c105e --- /dev/null +++ b/packages/software/dist/software.types.d.ts @@ -0,0 +1,1296 @@ +import { CssFlagsClass } from "@detector-js/core"; +/** + * + * + * @export + * @class Browser + * @extends {CssFlagsClass} + */ +export class Browser extends CssFlagsClass { + #private; + version: any; + /** + * Creates an instance of Browser. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='browser'] + * + * @memberOf Browser + */ + constructor(ua?: string | null, flags?: {}, cssFlagsPrefix?: string); + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Amaya(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Arora(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Avant(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Baidu(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Basilisk(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get BlackBerry(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Blazer(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Bolt(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Brave(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Camino(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Chimera(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get ComodoDragon(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Conkeror(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Dillo(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Dolphin(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Dorado(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Doris(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Electron(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Epiphany(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Falkon(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Fennec(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Firebird(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Flock(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get GoBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get GoogleBot(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get iCab(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get IceApe(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get IceBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get IceCat(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get IceDragon(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Iridium(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Iron(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Jasmine(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Konqueror(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get KMeleon(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Links(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Linx(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Lunascape(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Maemo(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get MaxthonMobile(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Maxthon(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Midori(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Minimo(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get MIUIBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Mosaic(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get MZBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Netfront(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Netscape(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get NetSurf(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get NokiaBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get OmniWeb(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get OviBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Palemoon(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Phoenix(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get PhantomJS(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Polaris(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Puffin(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get QQBrowserMobile(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get QQBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Quark(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get QupZilla(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Reconq(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get RockMelt(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Sailfish(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get SamsungBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get SeaMonkey(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Silk(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Skyfire(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Sleipnir(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Slim(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get SlimerJS(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Swing(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get TizenBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get UCBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Vivaldi(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get w3m(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Waterfox(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get WebOSBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get WeChat(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Whale(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Yandex(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get AndroidBrowser(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get ChromeMobile(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Chrome(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Chromium(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get EdgeMobile(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Edge(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get FirefoxFocus(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get FirefoxMobile(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Firefox(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get IEMobile(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get IE(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get OperaMini(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get OperaTouch(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get OperaCoast(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get OperaMobile(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Opera(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get SafariMobile(): boolean; + /** + * + * + * @readonly + * + * @memberOf Browser + */ + get Safari(): boolean; + /** + * + * + * @param {any} [version=null] + * @param {boolean} [inverted=false] + * + * @memberOf Browser + */ + setVersion(version?: string | null, inverted?: boolean): void; +} +/** + * + * + * @export + * @class Engine + * @extends {CssFlagsClass} + */ +export class Engine extends CssFlagsClass { + version: string; + /** + * Creates an instance of Engine. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='engine'] + * + * @memberOf Engine + */ + constructor(ua?: string | null, flags?: {}, cssFlagsPrefix?: string); + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get Amaya(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get Goanna(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get iCab(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get KHTML(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get Links(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get Linx(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get NetFront(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get NetSurf(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get Presto(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get Tasman(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get w3m(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get Trident(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get Blink(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get EdgeHTML(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get Gecko(): boolean; + /** + * + * + * @readonly + * + * @memberOf Engine + */ + get WebKit(): boolean; + /** + * + * + * @param {boolean} [assertsResult=false] + * @param {any} [version=null] + * @returns boolean + * + * @memberOf Engine + */ + _checkAssertsResult(assertsResult?: boolean, version?: null): boolean; + /** + * + * + * @param {any} [version=null] + * + * @memberOf Engine + */ + /** + * + * + * @param {any} [version=null] + * + * @memberOf Engine + */ + setVersion(version?: null): void; +} +/** + * + * + * @export + * @class OS + * @extends {CssFlagsClass} + */ +export class OS extends CssFlagsClass { + #private; + version: string; + versionName: string; + /** + * Creates an instance of OS. + * @param {any} [ua=null] + * @param {any} [flags={}] + * @param {string} [cssFlagsPrefix='os'] + * + * @memberOf OS + */ + constructor(ua?: string | null, flags?: {}, cssFlagsPrefix?: string); + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Windows(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get macOS(): boolean; + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ + _getUnixDistroName(version?: string): string; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Unix(): boolean; + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ + _getLinuxDistroName(version?: string): string; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Linux(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get ChromiumOS(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Solaris(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Plan9(): boolean; + get Minix(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get BeOS(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get OS2(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get AmigaOS(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get MorphOS(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get RISCOS(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get OpenVMS(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Fuchsia(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get WindowsPhone(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get iOS(): boolean; + /** + * + * + * @param {any} [version=RegExp.$1 || null] + * @returns string + * + * @memberOf OS + */ + _getAndroidVersionName(version?: string): string; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Android(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Bada(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Blackberry(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Contiki(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get MeeGo(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get RIM(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get QNX(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Palm(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Symbian(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get WebOS(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Tizen(): boolean; + /** + * + * + * @readonly + * + * @memberOf OS + */ + get Raspbian(): boolean; + /** + * + * + * @param {boolean} [assertsResult=false] + * @param {any} [version=null] + * @param {any} [versionNameFn=null] + * @returns boolean + * + * @memberOf OS + */ + _checkAssertsResult(assertsResult?: boolean, version?: string | null, versionNameFn?: Function | null): boolean; + /** + * + * + * @param {any} [version=null] + * + * @memberOf OS + */ + setVersion(version?: string | null): void; + /** + * + * + * @param {any} [versionNameFn=null] + * + * @memberOf OS + */ + setVersionName(versionNameFn?: Function | null): void; +} + +//# sourceMappingURL=software.types.d.ts.map diff --git a/packages/software/dist/software.types.d.ts.map b/packages/software/dist/software.types.d.ts.map new file mode 100644 index 0000000..f346dbd --- /dev/null +++ b/packages/software/dist/software.types.d.ts.map @@ -0,0 +1 @@ +{"mappings":";AAEA;;;;;;GAMG;AACH,oBAAqB,SAAQ,aAAa;;IAIxC,OAAO,EAAE,GAAG,CAAC;IACb;;;;;;;OAOG;gBACS,EAAE,GAAE,MAAM,GAAG,IAAW,EAAE,KAAK,KAAK,EAAE,cAAc,SAAY;IA2C5E;;;;;;OAMG;IACH,IAAI,KAAK,YAER;IAED;;;;;;OAMG;IACH,IAAI,KAAK,YAER;IAED;;;;;;OAMG;IACH,IAAI,KAAK,YAER;IAED;;;;;;OAMG;IACH,IAAI,KAAK,YAIR;IAED;;;;;;OAMG;IACH,IAAI,QAAQ,YAEX;IAED;;;;;;OAMG;IACH,IAAI,UAAU,YAEb;IAED;;;;;;OAMG;IACH,IAAI,MAAM,YAET;IAED;;;;;;OAMG;IACH,IAAI,IAAI,YAEP;IAED;;;;;;OAMG;IACH,IAAI,KAAK,YAKR;IAED;;;;;;OAMG;IACH,IAAI,MAAM,YAET;IAED;;;;;;OAMG;IACH,IAAI,OAAO,YAEV;IAED;;;;;;OAMG;IACH,IAAI,YAAY,YAEf;IAED;;;;;;OAMG;IACH,IAAI,QAAQ,YAEX;IAED;;;;;;OAMG;IACH,IAAI,KAAK,YAER;IAED;;;;;;OAMG;IACH,IAAI,OAAO,YAEV;IAED;;;;;;OAMG;IACH,IAAI,MAAM,YAET;IAED;;;;;;OAMG;IACH,IAAI,KAAK,YAER;IAMD;;;;;;OAMG;IACH,IAAI,QAAQ,YAcX;IAED;;;;;;OAMG;IACH,IAAI,QAAQ,YAEX;IAED;;;;;;OAMG;IACH,IAAI,MAAM,YAET;IAED;;;;;;OAMG;IACH,IAAI,MAAM,YAET;IAED;;;;;;OAMG;IACH,IAAI,QAAQ,Y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M,YAET;IAED;;;;;;OAMG;IACH,IAAI,OAAO,YAEV;IAED;;;;;;OAMG;IACH,IAAI,OAAO,YAEV;IAGD;;;;;;OAMG;IACH,IAAI,YAAY,YAwBf;IAED;;;;;;OAMG;IACH,IAAI,GAAG,YAMN;IAED;;;;;;;OAOG;IACH,sBAAsB,CAAC,OAAO,GAAE,MAAwB;IAuBxD;;;;;;OAMG;IACH,IAAI,OAAO,YAMV;IAED;;;;;;OAMG;IACH,IAAI,IAAI,YAIP;IAED;;;;;;OAMG;IACH,IAAI,UAAU,YAWb;IAED;;;;;;OAMG;IACH,IAAI,OAAO,YAEV;IAED;;;;;;OAMG;IACH,IAAI,KAAK,YAER;IAED;;;;;;OAMG;IACH,IAAI,GAAG,YAEN;IAED;;;;;;OAMG;IACH,IAAI,GAAG,YAEN;IAED;;;;;;OAMG;IACH,IAAI,IAAI,YAEP;IAED;;;;;;OAMG;IACH,IAAI,OAAO,YAEV;IAGD;;;;;;OAMG;IACH,IAAI,KAAK,YAQR;IAED;;;;;;OAMG;IACH,IAAI,KAAK,YAER;IAGD;;;;;;OAMG;IACH,IAAI,QAAQ,YAEX;IAED;;;;;;;;;OASG;IACH,mBAAmB,CACjB,aAAa,GAAE,OAAe,EAC9B,OAAO,GAAE,MAAM,GAAG,IAAW,EAC7B,aAAa,GAAE,QAAQ,GAAG,IAAW;IAYvC;;;;;;OAMG;IACH,UAAU,CAAC,OAAO,GAAE,MAAM,GAAG,IAAW;IAIxC;;;;;;OAMG;IACH,cAAc,CAAC,aAAa,GAAE,QAAQ,GAAG,IAAW;CAKrD","sources":["packages/software/lib/lib/browser.ts","packages/software/lib/lib/engine.ts","packages/software/lib/lib/os.ts","packages/software/lib/lib/software.ts","packages/software/lib/software.ts"],"sourcesContent":[null,null,null,null,"'use strict';\n\nexport * from './browser';\nexport * from './engine';\nexport * from './os';\n\nif (process.env.NODE_ENV === 'development') {\n const packageJSON = require('../package.json');\n\n console.log(`${packageJSON.description} v${packageJSON.version} initialized`);\n}\n"],"names":[],"version":3,"file":"software.types.d.ts.map"} \ No newline at end of file diff --git a/src/detector.ts b/src/detector.ts index df544d7..8883a3f 100644 --- a/src/detector.ts +++ b/src/detector.ts @@ -1,9 +1,5 @@ 'use strict'; -export * from '@detector-js/detector'; +import { Detector } from '@detector-js/detector'; -if (process.env.NODE_ENV === 'development') { - const packageJSON = require('../package.json'); - - console.log(`DetectorJS v${packageJSON.version} initialized`); -} +export { Detector }; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..1b78387 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "ESNext", + "moduleResolution": "Node", + "target": "ESNext", + "jsx": "react", + "checkJs": false, + "allowJs": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "esModuleInterop": true, + "resolveJsonModule": true, + + // These options are necessary so that TypeDoc can resolve references across packages + "declaration": true, + "declarationMap": true, + // These options are necessary so that TypeDoc can resolve references across packages + + "lib": ["DOM", "ESNext", "ESNext.Symbol", "ESNext.Intl"] + }, + "exclude": ["node_modules", "**/node_modules/*"], +}