1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(function(r,d){"use strict";var M="0.7.31",n="",P="?",u="function",t="undefined",c="object",s="string",V="major",b="model",w="name",l="type",p="vendor",m="version",f="architecture",i="console",e="mobile",o="tablet",a="smarttv",h="wearable",B="embedded",v=255;var g="Amazon",x="Apple",D="ASUS",I="BlackBerry",k="Browser",y="Chrome",W="Edge",_="Firefox",T="Google",F="Huawei",S="LG",N="Microsoft",G="Motorola",q="Opera",z="Samsung",A="Sony",L="Xiaomi",Z="Zebra",$="Facebook";var H=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},C=function(i){var e={};for(var o=0;o<i.length;o++){e[i[o].toUpperCase()]=i[o]}return e},X=function(i,e){return typeof i===s?E(e).indexOf(E(i))!==-1:false},E=function(i){return i.toLowerCase()},K=function(i){return typeof i===s?i.replace(/[^\d\.]/g,n).split(".")[0]:d},Q=function(i,e){if(typeof i===s){i=i.replace(/^\s\s*/,n).replace(/\s\s*$/,n);return typeof e===t?i:i.substring(0,v)}};var O=function(i,e){var o=0,a,r,n,t,s,b;while(o<e.length&&!s){var w=e[o],l=e[o+1];a=r=0;while(a<w.length&&!s){s=w[a++].exec(i);if(!!s){for(n=0;n<l.length;n++){b=s[++r];t=l[n];if(typeof t===c&&t.length>0){if(t.length===2){if(typeof t[1]==u){this[t[0]]=t[1].call(this,b)}else{this[t[0]]=t[1]}}else if(t.length===3){if(typeof t[1]===u&&!(t[1].exec&&t[1].test)){this[t[0]]=b?t[1].call(this,b,t[2]):d}else{this[t[0]]=b?b.replace(t[1],t[2]):d}}else if(t.length===4){this[t[0]]=b?t[3].call(this,b.replace(t[1],t[2])):d}}else{this[t]=b?b:d}}}}o+=2}},Y=function(i,e){for(var o in e){if(typeof e[o]===c&&e[o].length>0){for(var a=0;a<e[o].length;a++){if(X(e[o][a],i)){return o===P?d:o}}}else if(X(e[o],i)){return o===P?d:o}}return i};var J={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},ii={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"],11:"NT 11.0",RT:"ARM"};var ei={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[w,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[w,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[w,m],[/opios[\/ ]+([\w\.]+)/i],[m,[w,q+" Mini"]],[/\bopr\/([\w\.]+)/i],[m,[w,q]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[w,m],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[w,"UC"+k]],[/\bqbcore\/([\w\.]+)/i],[m,[w,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[m,[w,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[w,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[w,"IE"]],[/yabrowser\/([\w\.]+)/i],[m,[w,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[w,/(.+)/,"$1 Secure "+k],m],[/\bfocus\/([\w\.]+)/i],[m,[w,_+" Focus"]],[/\bopt\/([\w\.]+)/i],[m,[w,q+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[w,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[w,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[w,q+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[w,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[m,[w,_]],[/\bqihu|(qi?ho?o?|360)browser/i],[[w,"360 "+k]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[w,/(.+)/,"$1 "+k],m],[/(comodo_dragon)\/([\w\.]+)/i],[[w,/_/g," "],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[w,m],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[w],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[w,$],m],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[w,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[w,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[w,y+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[w,y+" WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[w,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[w,m],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[m,[w,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[m,w],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[w,[m,Y,J]],[/(webkit|khtml)\/([\w\.]+)/i],[w,m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[w,"Netscape"],m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[w,_+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[w,m]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,E]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,n,E]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,E]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[b,[p,z],[l,o]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[b,[p,z],[l,e]],[/\((ip(?:hone|od)[\w ]*);/i],[b,[p,x],[l,e]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[b,[p,x],[l,o]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[b,[p,F],[l,o]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[b,[p,F],[l,e]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[b,/_/g," "],[p,L],[l,e]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[b,/_/g," "],[p,L],[l,o]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[b,[p,"OPPO"],[l,e]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[b,[p,"Vivo"],[l,e]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[b,[p,"Realme"],[l,e]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[b,[p,G],[l,e]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[b,[p,G],[l,o]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[b,[p,S],[l,o]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[b,[p,S],[l,e]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[b,[p,"Lenovo"],[l,o]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[b,/_/g," "],[p,"Nokia"],[l,e]],[/(pixel c)\b/i],[b,[p,T],[l,o]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[b,[p,T],[l,e]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[b,[p,A],[l,e]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[b,"Xperia Tablet"],[p,A],[l,o]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[b,[p,"OnePlus"],[l,e]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[b,[p,g],[l,o]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[b,/(.+)/g,"Fire Phone $1"],[p,g],[l,e]],[/(playbook);[-\w\),; ]+(rim)/i],[b,p,[l,o]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[b,[p,I],[l,e]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[b,[p,D],[l,o]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[b,[p,D],[l,e]],[/(nexus 9)/i],[b,[p,"HTC"],[l,o]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[p,[b,/_/g," "],[l,e]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[b,[p,"Acer"],[l,o]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[b,[p,"Meizu"],[l,e]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[b,[p,"Sharp"],[l,e]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,b,[l,e]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,b,[l,o]],[/(surface duo)/i],[b,[p,N],[l,o]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[b,[p,"Fairphone"],[l,e]],[/(u304aa)/i],[b,[p,"AT&T"],[l,e]],[/\bsie-(\w*)/i],[b,[p,"Siemens"],[l,e]],[/\b(rct\w+) b/i],[b,[p,"RCA"],[l,o]],[/\b(venue[\d ]{2,7}) b/i],[b,[p,"Dell"],[l,o]],[/\b(q(?:mv|ta)\w+) b/i],[b,[p,"Verizon"],[l,o]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[b,[p,"Barnes & Noble"],[l,o]],[/\b(tm\d{3}\w+) b/i],[b,[p,"NuVision"],[l,o]],[/\b(k88) b/i],[b,[p,"ZTE"],[l,o]],[/\b(nx\d{3}j) b/i],[b,[p,"ZTE"],[l,e]],[/\b(gen\d{3}) b.+49h/i],[b,[p,"Swiss"],[l,e]],[/\b(zur\d{3}) b/i],[b,[p,"Swiss"],[l,o]],[/\b((zeki)?tb.*\b) b/i],[b,[p,"Zeki"],[l,o]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],b,[l,o]],[/\b(ns-?\w{0,9}) b/i],[b,[p,"Insignia"],[l,o]],[/\b((nxa|next)-?\w{0,9}) b/i],[b,[p,"NextBook"],[l,o]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],b,[l,e]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],b,[l,e]],[/\b(ph-1) /i],[b,[p,"Essential"],[l,e]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[b,[p,"Envizen"],[l,o]],[/\b(trio[-\w\. ]+) b/i],[b,[p,"MachSpeed"],[l,o]],[/\btu_(1491) b/i],[b,[p,"Rotor"],[l,o]],[/(shield[\w ]+) b/i],[b,[p,"Nvidia"],[l,o]],[/(sprint) (\w+)/i],[p,b,[l,e]],[/(kin\.[onetw]{3})/i],[[b,/\./g," "],[p,N],[l,e]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[b,[p,Z],[l,o]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[b,[p,Z],[l,e]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,b,[l,i]],[/droid.+; (shield) bui/i],[b,[p,"Nvidia"],[l,i]],[/(playstation [345portablevi]+)/i],[b,[p,A],[l,i]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[b,[p,N],[l,i]],[/smart-tv.+(samsung)/i],[p,[l,a]],[/hbbtv.+maple;(\d+)/i],[[b,/^/,"SmartTV"],[p,z],[l,a]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,S],[l,a]],[/(apple) ?tv/i],[p,[b,x+" TV"],[l,a]],[/crkey/i],[[b,y+"cast"],[p,T],[l,a]],[/droid.+aft(\w)( bui|\))/i],[b,[p,g],[l,a]],[/\(dtv[\);].+(aquos)/i],[b,[p,"Sharp"],[l,a]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[p,Q],[b,Q],[l,a]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,a]],[/((pebble))app/i],[p,b,[l,h]],[/droid.+; (glass) \d/i],[b,[p,T],[l,h]],[/droid.+; (wt63?0{2,3})\)/i],[b,[p,Z],[l,h]],[/(quest( 2)?)/i],[b,[p,$],[l,h]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[l,B]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[b,[l,e]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[b,[l,o]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,o]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[l,e]],[/(android[-\w\. ]{0,9});.+buil/i],[b,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[w,W+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[w,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[w,m],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,w]],os:[[/microsoft (windows) (vista|xp)/i],[w,m],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[w,[m,Y,ii]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[w,"Windows"],[m,Y,ii]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[w,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[w,"Mac OS"],[m,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[m,w],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[w,m],[/\(bb(10);/i],[m,[w,I]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[m,[w,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[m,[w,_+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[m,[w,"webOS"]],[/crkey\/([\d\.]+)/i],[m,[w,y+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[w,"Chromium OS"],m],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[w,m],[/(sunos) ?([\w\.\d]*)/i],[[w,"Solaris"],m],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[w,m]]};var U=function(i,e){if(typeof i===c){e=i;i=d}if(!(this instanceof U)){return new U(i,e).getResult()}var o=i||(typeof r!==t&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:n);var a=e?H(ei,e):ei;this.getBrowser=function(){var i={};i[w]=d;i[m]=d;O.call(i,o,a.browser);i.major=K(i.version);return i};this.getCPU=function(){var i={};i[f]=d;O.call(i,o,a.cpu);return i};this.getDevice=function(){var i={};i[p]=d;i[b]=d;i[l]=d;O.call(i,o,a.device);return i};this.getEngine=function(){var i={};i[w]=d;i[m]=d;O.call(i,o,a.engine);return i};this.getOS=function(){var i={};i[w]=d;i[m]=d;O.call(i,o,a.os);return i};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return o};this.setUA=function(i){o=typeof i===s&&i.length>v?Q(i,v):i;return this};this.setUA(o);return this};U.VERSION=M;U.BROWSER=C([w,m,V]);U.CPU=C([f]);U.DEVICE=C([b,p,l,i,e,a,o,h,B]);U.ENGINE=U.OS=C([w,m]);if(typeof exports!==t){if(typeof module!==t&&module.exports){exports=module.exports=U}exports.UAParser=U}else{if(typeof define===u&&define.amd){define(function(){return U})}else if(typeof r!==t){r.UAParser=U}}var j=typeof r!==t&&(r.jQuery||r.Zepto);if(j&&!j.ua){var R=new U;j.ua=R.getResult();j.ua.get=function(){return R.getUA()};j.ua.set=function(i){R.setUA(i);var e=R.getResult();for(var o in e){j.ua[o]=e[o]}}}})(typeof window==="object"?window:this); |