4 lines
17 KiB
JavaScript
4 lines
17 KiB
JavaScript
|
/* UAParser.js v0.7.39
|
||
|
Copyright © 2012-2021 Faisal Salman <f@faisalman.com>
|
||
|
MIT License */
|
||
|
!function(s,l){"use strict";function i(i){for(var e={},o=0;o<i.length;o++)e[i[o].toUpperCase()]=i[o];return e}function r(i,e){return typeof i==p&&-1!==Z(e).indexOf(Z(i))}function b(i,e){if(typeof i==p)return i=i.replace(/^\s\s*/,""),typeof e==d?i:i.substring(0,500)}function w(i,e){for(var o,a,r,t,n,s=0;s<e.length&&!t;){for(var b=e[s],w=e[s+1],d=o=0;d<b.length&&!t&&b[d];)if(t=b[d++].exec(i))for(a=0;a<w.length;a++)n=t[++o],typeof(r=w[a])==u&&0<r.length?2===r.length?typeof r[1]==c?this[r[0]]=r[1].call(this,n):this[r[0]]=r[1]:3===r.length?typeof r[1]!=c||r[1].exec&&r[1].test?this[r[0]]=n?n.replace(r[1],r[2]):l:this[r[0]]=n?r[1].call(this,n,r[2]):l:4===r.length&&(this[r[0]]=n?r[3].call(this,n.replace(r[1],r[2])):l):this[r]=n||l;s+=2}}function e(i,e){for(var o in e)if(typeof e[o]==u&&0<e[o].length){for(var a=0;a<e[o].length;a++)if(r(e[o][a],i))return"?"===o?l:o}else if(r(e[o],i))return"?"===o?l:o;return e.hasOwnProperty("*")?e["*"]:i}var c="function",d="undefined",u="object",p="string",m="major",h="model",f="name",g="type",v="vendor",x="version",k="architecture",o="console",y="mobile",_="tablet",a="smarttv",t="wearable",n="embedded",T="Amazon",S="Apple",q="ASUS",z="BlackBerry",N="Browser",A="Chrome",O="Firefox",E="Google",C="Huawei",U="LG",P="Microsoft",j="Motorola",B="Opera",M="Samsung",R="Sharp",D="Sony",V="Xiaomi",I="Zebra",G="Facebook",L="Chromium OS",F="Mac OS",H=" Browser",Z=function(i){return i.toLowerCase()},$={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},W={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[x,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[x,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,x],[/opios[\/ ]+([\w\.]+)/i],[x,[f,B+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[x,[f,B+" GX"]],[/\bopr\/([\w\.]+)/i],[x,[f,B]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[x,[f,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,x],[/quark(?:pc)?\/([-\w\.]+)/i],[x,[f,"Quark"]],[/\bddg\/([\w\.]+)/i],[x,[f,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[x,[f,"UC"+N]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[x,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[x,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[x,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[x,[f,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[x,[f,"Smart Lenovo "+N]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+N],x],[/\bfocus\/([\w\.]+)/i],[x,[f,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[x,[f,B+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[x,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[x,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[x,[f,B+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[x,[f,"MIUI "+N]],[/fxios\/([-\w\.]+)/i],[x,[f,O]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360"+H]],[/\b(qq)\/([\w\.]+)/i],[[f,/(.+)/,"$1Browser"],x],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1"+H],x],[/samsungbrowser\/([\w\.]+)/i],[x,[f,M+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],x],[/metasr[\/ ]?([\d\.]+)/i],[x,[f,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[f,"Sogou Mobile"],x],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[f,x],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,G],x],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+
|