Subtheme of barrio
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4 lines
15 KiB

2 years ago
/* UAParser.js v1.0.2
Copyright © 2012-2021 Faisal Salman <f@faisalman.com>
MIT License */
!function(r,d){"use strict";function i(i){for(var e={},o=0;o<i.length;o++)e[i[o].toUpperCase()]=i[o];return e}function n(i,e){return typeof i==w&&-1!==I(e).indexOf(I(i))}function t(i,e){if(typeof i==w)return i=i.replace(/^\s\s*/,"").replace(/\s\s*$/,""),typeof e==b?i:i.substring(0,255)}function s(i,e){for(var o,a,r,n,t,s=0;s<e.length&&!n;){for(var b=e[s],w=e[s+1],l=o=0;l<b.length&&!n;)if(n=b[l++].exec(i))for(a=0;a<w.length;a++)t=n[++o],typeof(r=w[a])==c&&0<r.length?2===r.length?typeof r[1]==u?this[r[0]]=r[1].call(this,t):this[r[0]]=r[1]:3===r.length?typeof r[1]!=u||r[1].exec&&r[1].test?this[r[0]]=t?t.replace(r[1],r[2]):d:this[r[0]]=t?r[1].call(this,t,r[2]):d:4===r.length&&(this[r[0]]=t?r[3].call(this,t.replace(r[1],r[2])):d):this[r]=t||d;s+=2}}function e(i,e){for(var o in e)if(typeof e[o]==c&&0<e[o].length){for(var a=0;a<e[o].length;a++)if(n(e[o][a],i))return"?"===o?d:o}else if(n(e[o],i))return"?"===o?d:o;return i}var u="function",b="undefined",c="object",w="string",l="model",p="name",m="type",f="vendor",h="version",g="architecture",o="console",a="mobile",v="tablet",x="smarttv",k="wearable",y="embedded",_="Amazon",S="Apple",T="ASUS",q="BlackBerry",z="Browser",N="Chrome",A="Firefox",C="Google",E="Huawei",O="LG",U="Microsoft",j="Motorola",R="Opera",M="Samsung",P="Sony",V="Xiaomi",B="Zebra",D="Facebook",I=function(i){return i.toLowerCase()},W={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"},F={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,h],[/opios[\/ ]+([\w\.]+)/i],[h,[p,R+" Mini"]],[/\bopr\/([\w\.]+)/i],[h,[p,R]],[/(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],[p,h],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[p,"UC"+z]],[/\bqbcore\/([\w\.]+)/i],[h,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[h,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+z],h],[/\bfocus\/([\w\.]+)/i],[h,[p,A+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[p,R+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[p,R+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[p,"MIUI "+z]],[/fxios\/([-\w\.]+)/i],[h,[p,A]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+z]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+z],h],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,h],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,D],h],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[p,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[p,N+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,N+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[p,"Android "+z]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,h],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[h,[p,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[h,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[h,e,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,h],[/