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/web.ts"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n BatteryInfo,\n DeviceId,\n DeviceInfo,\n DevicePlugin,\n GetLanguageCodeResult,\n LanguageTag,\n} from './definitions';\n\ndeclare global {\n interface Navigator {\n getBattery: any;\n oscpu: any;\n }\n\n interface Window {\n InstallTrigger?: any;\n ApplePaySession?: any;\n chrome?: any;\n }\n}\n\nexport class DeviceWeb extends WebPlugin implements DevicePlugin {\n async getId(): Promise {\n return {\n identifier: this.getUid(),\n };\n }\n\n async getInfo(): Promise {\n if (typeof navigator === 'undefined' || !navigator.userAgent) {\n throw this.unavailable('Device API not available in this browser');\n }\n\n const ua = navigator.userAgent;\n const uaFields = this.parseUa(ua);\n\n return {\n model: uaFields.model,\n platform: 'web',\n operatingSystem: uaFields.operatingSystem,\n osVersion: uaFields.osVersion,\n manufacturer: navigator.vendor,\n isVirtual: false,\n webViewVersion: uaFields.browserVersion,\n };\n }\n\n async getBatteryInfo(): Promise {\n if (typeof navigator === 'undefined' || !navigator.getBattery) {\n throw this.unavailable('Device API not available in this browser');\n }\n let battery: any = {};\n\n try {\n battery = await navigator.getBattery();\n } catch (e) {\n // Let it fail, we don't care\n }\n\n return {\n batteryLevel: battery.level,\n isCharging: battery.charging,\n };\n }\n\n async getLanguageCode(): Promise {\n return {\n value: navigator.language.split('-')[0].toLowerCase(),\n };\n }\n\n async getLanguageTag(): Promise {\n return {\n value: navigator.language,\n };\n }\n\n parseUa(ua: string): any {\n const uaFields: any = {};\n const start = ua.indexOf('(') + 1;\n let end = ua.indexOf(') AppleWebKit');\n if (ua.indexOf(') Gecko') !== -1) {\n end = ua.indexOf(') Gecko');\n }\n const fields = ua.substring(start, end);\n if (ua.indexOf('Android') !== -1) {\n const tmpFields = fields.replace('; wv', '').split('; ').pop();\n if (tmpFields) {\n uaFields.model = tmpFields.split(' Build')[0];\n }\n uaFields.osVersion = fields.split('; ')[1];\n } else {\n uaFields.model = fields.split('; ')[0];\n if (typeof navigator !== 'undefined' && navigator.oscpu) {\n uaFields.osVersion = navigator.oscpu;\n } else {\n if (ua.indexOf('Windows') !== -1) {\n uaFields.osVersion = fields;\n } else {\n const tmpFields = fields.split('; ').pop();\n if (tmpFields) {\n const lastParts = tmpFields\n .replace(' like Mac OS X', '')\n .split(' ');\n uaFields.osVersion = lastParts[lastParts.length - 1].replace(\n /_/g,\n '.',\n );\n }\n }\n }\n }\n\n if (/android/i.test(ua)) {\n uaFields.operatingSystem = 'android';\n } else if (/iPad|iPhone|iPod/.test(ua) && !window.MSStream) {\n uaFields.operatingSystem = 'ios';\n } else if (/Win/.test(ua)) {\n uaFields.operatingSystem = 'windows';\n } else if (/Mac/i.test(ua)) {\n uaFields.operatingSystem = 'mac';\n } else {\n uaFields.operatingSystem = 'unknown';\n }\n\n // Check for browsers based on non-standard javascript apis, only not user agent\n const isSafari = !!window.ApplePaySession;\n const isChrome = !!window.chrome;\n const isFirefox = /Firefox/.test(ua);\n const isEdge = /Edg/.test(ua);\n const isFirefoxIOS = /FxiOS/.test(ua);\n const isChromeIOS = /CriOS/.test(ua);\n const isEdgeIOS = /EdgiOS/.test(ua);\n\n // FF and Edge User Agents both end with \"/MAJOR.MINOR\"\n if (\n isSafari ||\n (isChrome && !isEdge) ||\n isFirefoxIOS ||\n isChromeIOS ||\n isEdgeIOS\n ) {\n // Safari version comes as \"... Version/MAJOR.MINOR ...\"\n // Chrome version comes as \"... Chrome/MAJOR.MINOR ...\"\n // FirefoxIOS version comes as \"... FxiOS/MAJOR.MINOR ...\"\n // ChromeIOS version comes as \"... CriOS/MAJOR.MINOR ...\"\n let searchWord: string;\n if (isFirefoxIOS) {\n searchWord = 'FxiOS';\n } else if (isChromeIOS) {\n searchWord = 'CriOS';\n } else if (isEdgeIOS) {\n searchWord = 'EdgiOS';\n } else if (isSafari) {\n searchWord = 'Version';\n } else {\n searchWord = 'Chrome';\n }\n\n const words = ua.split(' ');\n for (const word of words) {\n if (word.includes(searchWord)) {\n const version = word.split('/')[1];\n uaFields.browserVersion = version;\n }\n }\n } else if (isFirefox || isEdge) {\n const reverseUA = ua.split('').reverse().join('');\n const reverseVersion = reverseUA.split('/')[0];\n const version = reverseVersion.split('').reverse().join('');\n uaFields.browserVersion = version;\n }\n\n return uaFields;\n }\n\n getUid(): string {\n if (typeof window !== 'undefined' && window.localStorage) {\n let uid = window.localStorage.getItem('_capuid');\n if (uid) {\n return uid;\n }\n\n uid = this.uuid4();\n window.localStorage.setItem('_capuid', uid);\n return uid;\n }\n return this.uuid4();\n }\n\n uuid4(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n function (c) {\n const r = (Math.random() * 16) | 0,\n v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n },\n );\n }\n}\n"],"names":["DeviceWeb","_WebPlugin","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","_getId","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","abrupt","identifier","this","getUid","stop","_getInfo","_callee2","ua","uaFields","_context2","navigator","userAgent","unavailable","parseUa","model","platform","operatingSystem","osVersion","manufacturer","vendor","isVirtual","webViewVersion","browserVersion","_getBatteryInfo","_callee3","battery","_context3","getBattery","sent","t0","batteryLevel","level","isCharging","charging","_getLanguageCode","_callee4","_context4","language","split","toLowerCase","_getLanguageTag","_callee5","_context5","start","indexOf","end","fields","substring","tmpFields","replace","pop","oscpu","lastParts","length","test","window","MSStream","isSafari","ApplePaySession","isChrome","chrome","isFirefox","isEdge","isFirefoxIOS","isChromeIOS","isEdgeIOS","searchWord","_step","words","_iterator","_createForOfIteratorHelper","s","n","done","word","includes","version","err","e","f","reverse","join","localStorage","uid","getItem","uuid4","setItem","c","r","Math","random","toString","WebPlugin"],"sourceRoot":""}