4 lines
18 KiB
JavaScript
4 lines
18 KiB
JavaScript
![]() |
/* UAParser.js v1.0.40
|
||
|
Copyright © 2012-2024 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==m&&-1!==Z(e).indexOf(Z(i))}function b(i,e){if(typeof i==m)return i=i.replace(/^\s\s*/,""),typeof e==d?i:i.substring(0,500)}function w(i,e){for(var o,a,r,n,t,s=0;s<e.length&&!n;){for(var b=e[s],w=e[s+1],d=o=0;d<b.length&&!n&&b[d];)if(n=b[d++].exec(i))for(a=0;a<w.length;a++)t=n[++o],typeof(r=w[a])==u&&0<r.length?2===r.length?typeof r[1]==c?this[r[0]]=r[1].call(this,t):this[r[0]]=r[1]:3===r.length?typeof r[1]!=c||r[1].exec&&r[1].test?this[r[0]]=t?t.replace(r[1],r[2]):l:this[r[0]]=t?r[1].call(this,t,r[2]):l:4===r.length&&(this[r[0]]=t?r[3].call(this,t.replace(r[1],r[2])):l):this[r]=t||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",m="string",p="major",h="model",f="name",g="type",v="vendor",x="version",k="architecture",o="console",y="mobile",_="tablet",a="smarttv",n="wearable",t="embedded",T="Amazon",S="Apple",q="ASUS",z="BlackBerry",N="Browser",A="Chrome",O="Firefox",C="Google",E="Huawei",U="LG",P="Microsoft",j="Motorola",B="Opera",M="Samsung",R="Sharp",D="Sony",V="Xiaomi",I="Zebra",G="Facebook",L="Chromium OS",H="Mac OS",F=" 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"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[x,[f,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/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|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)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"+F]],[/fxios\/([\w\.-]+)/i],[x,[f,O]],[/\bqihoobrowser\/?([\w\.]*)/i],[x,[f,"360"]],[/\b(qq)\/([\w\.]+)/i],[[f,/(.+)/,"$1Browser"],x],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1"+F],x],[/samsungbrowser\/([\w\.]+)/i],[x,[f,M+" Internet"]],[/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|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[f,x],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[f],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[x,f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,G],x],[
|