PageSourceSearch

https://www.viaorg.uk/wp-content/themes/v-i-a-wp-theme/assets/js/libs/jquery.device.js?ver=3.6.3

js viaorg.uk collected 2026-10-05 18:10:25 UTC 34,874 bytes, 534 lines download raw bytes

vendor: 15,754 bytes, lines 1-20
1/* Modernizr 2.7.1 (Custom Build) | MIT & BSD
2 * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
3 */
4;window.Modernizr=function(a,b,c){function C(a){j.cssText=a}function D(a,b){return C(n.join(a+";")+(b||""))}function E(a,b){return typeof a===b}function F(a,b){return!!~(""+a).indexOf(b)}function G(a,b){for(var d in a){var e=a[d];if(!F(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:E(f,"function")?f.bind(d||b):f}return!1}function I(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return E(b,"string")||E(b,"undefined")?G(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),H(e,b,c))}function J(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=E(e[d],"function"),E(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),A={}.hasOwnProperty,B;!E(A,"undefined")&&!E(A.call,"undefined")?B=function(a,b){return A.call(a,b)}:B=function(a,b){return b in a&&E(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return I("flexWrap")},s.flexboxlegacy=function(){return I("boxDirection")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!E(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!I("indexedDB",a)},s.hashchange=function(){return z("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return C("background-color:rgba(150,255,150,.5)"),F(j.backgroundColor,"rgba")},s.hsla=function(){return C("background-color:hsla(120,40%,100%,.5)"),F(j.backgroundColor,"rgba")||F(j.backgroundColor,"hsla")},s.multiplebgs=function(){return C("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return I("backgroundSize")},s.borderimage=function(){return I("borderImage")},s.borderradius=function(){return I("borderRadius")},s.boxshadow=function(){return I("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return D("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return I("animationName")},s.csscolumns=function(){return I("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return C((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),F(j.backgroundImage,"gradient")},s.cssreflections=function(){return I("boxReflect")},s.csstransforms=function(){return!!I("transform")},s.csstransforms3d=function(){var a=!!I("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return I("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var K in s)B(s,K)&&(x=K.toLowerCase(),e[x]=s[K](),v.push((e[x]?"":"no-")+x));return e.input||J(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)B(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},C(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.hasEvent=z,e.testProp=function(a){return G([a])},e.testAllProps=I,e.testStyles=y,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
5
6/*!
7 * Detectizr v@VERSION
8 * http://barisaydinoglu.github.com/Detectizr/
9 *
10 * Written by Baris Aydinoglu (http://baris.aydinoglu.info) - Copyright 2012
11 * Released under the MIT license
12 *
13 * Date: @DATE
14 */
15window.Detectizr = (function(window, navigator, document, undefined) {
16  var Detectizr = {},
17    Modernizr = window.Modernizr,
18    deviceTypes = ["tv", "tablet", "mobile", "desktop"],
19    options = {
20      // option for enabling HTML classes of all features (not only the true features) to be added
21      addAllFeaturesAsClass: false,
22      // option for enabling detection of device
23      detectDevice: true,
24      // option for enabling detection of device model
25      detectDeviceModel: true,
26      // option for enabling detection of screen size
27      detectScreen: true,
28      // option for enabling detection of operating system type and version
29      detectOS: true,
30      // option for enabling detection of browser type and version
31      detectBrowser: true,
32      // option for enabling detection of common browser plugins
33      detectPlugins: true
34    },
35    plugins2detect = [{
36      name: "adobereader",
37      substrs: ["Adobe", "Acrobat"],
38      // AcroPDF.PDF is used by version 7 and later
39      // PDF.PdfCtrl is used by version 6 and earlier
40      progIds: ["AcroPDF.PDF", "PDF.PDFCtrl.5"]
41    }, {
42      name: "flash",
43      substrs: ["Shockwave Flash"],
44      progIds: ["ShockwaveFlash.ShockwaveFlash.1"]
45    }, {
46      name: "wmplayer",
47      substrs: ["Windows Media"],
48      progIds: ["wmplayer.ocx"]
49    }, {
50      name: "silverlight",
51      substrs: ["Silverlight"],
52      progIds: ["AgControl.AgControl"]
53    }, {
54      name: "quicktime",
55      substrs: ["QuickTime"],
56      progIds: ["QuickTime.QuickTime"]
57    }],
58    rclass = /[\t\r\n]/g,
59    docElement = document.documentElement,
60    resizeTimeoutId,
61    oldOrientation;
62
63  // Create Global "extend" method, so Detectizr does not need jQuery.extend
64  function extend(obj, extObj) {
65    var a, b, i;
66    if (arguments.length > 2) {
67      for (a = 1, b = arguments.length; a < b; a += 1) {
68        extend(obj, arguments[a]);
69      }
70    } else {
71      for (i in extObj) {
72        if (extObj.hasOwnProperty(i)) {
73          obj[i] = extObj[i];
74        }
75      }
76    }
77    return obj;
78  }
79
80  // simplified and localized indexOf method as one parameter fixed as useragent
81  function is(key) {
82    return Detectizr.browser.userAgent.indexOf(key) > -1;
83  }
84
85  // simplified and localized regex test method as one parameter fixed as useragent
86  function test(regex) {
87    return regex.test(Detectizr.browser.userAgent);
88  }
89
90  // simplified and localized regex exec method as one parameter fixed as useragent
91  function exec(regex) {
92    return regex.exec(Detectizr.browser.userAgent);
93  }
94
95  // localized string trim method
96  function trim(value) {
97    return value.replace(/^\s+|\s+$/g, "");
98  }
99
100  // convert string to camelcase
101  function toCamel(string) {
102    if (string === null || string === undefined) {
103      return "";
104    }
105    return String(string).replace(/((\s|\-|\.)+[a-z0-9])/g, function($1) {
106      return $1.toUpperCase().replace(/(\s|\-|\.)/g, "");
107    });
108  }
109
110  // removeClass function inspired from jQuery.removeClass
111  function removeClass(element, value) {
112    var class2remove = value || "",
113      cur = element.nodeType === 1 && (element.className ? (" " + element.className + " ").replace(rclass, " ") : "");
114    if (cur) {
115      while (cur.indexOf(" " + class2remove + " ") >= 0) {
116        cur = cur.replace(" " + class2remove + " ", " ");
117      }
118      element.className = value ? trim(cur) : "";
119    }
120  }
121
122  // add version test to Modernizr
123  function addVersionTest(version, major, minor) {
124    if (!!version) {
125      version = toCamel(version);
126      if (!!major) {
127        major = toCamel(major);
128        addConditionalTest(version + major, true);
129        if (!!minor) {
130          addConditionalTest(version + major + "_" + minor, true);
131        }
132      }
133    }
134  }
135
136  // add test to Modernizr based on a condition
137  function addConditionalTest(feature, test) {
138    if (!!feature && !!Modernizr) {
139      if (options.addAllFeaturesAsClass) {
140        Modernizr.addTest(feature, test);
141      } else {
142        test = typeof test === "function" ? test() : test;
143        if (test) {
144          Modernizr.addTest(feature, true);
145        } else {
146          delete Modernizr[feature];
147          removeClass(docElement, feature);
148        }
149      }
150    }
151  }
152
153  // set version based on versionFull
154  function setVersion(versionType, versionFull) {
155    versionType.version = versionFull;
156    var versionArray = versionFull.split(".");
157    if (versionArray.length > 0) {
158      versionArray = versionArray.reverse();
159      versionType.major = versionArray.pop();
160      if (versionArray.length > 0) {
161        versionType.minor = versionArray.pop();
162        if (versionArray.length > 0) {
163          versionArray = versionArray.reverse();
164          versionType.patch = versionArray.join(".");
165        } else {
166          versionType.patch = "0";
167        }
168      } else {
169        versionType.minor = "0";
170      }
171    } else {
172      versionType.major = "0";
173    }
174  }
175
176  function checkOrientation() {
177    //timeout wrapper points with doResizeCode as callback
178    window.clearTimeout(resizeTimeoutId);
179    resizeTimeoutId = window.setTimeout(function() {
180      oldOrientation = Detectizr.device.orientation;
181      //wrapper for height/width check
182      if (window.innerHeight > window.innerWidth) {
183        Detectizr.device.orientation = "portrait";
184      } else {
185        Detectizr.device.orientation = "cape";
186      }
187      addConditionalTest(Detectizr.device.orientation, true);
188      if (oldOrientation !== Detectizr.device.orientation) {
189        addConditionalTest(oldOrientation, false);
190      }
191    }, 10);
192  }
193
194  function detectPlugin(substrs) {
195    var plugins = navigator.plugins,
196      plugin, haystack, pluginFoundText, j, k;
197    for (j = plugins.length - 1; j >= 0; j--) {
198      plugin = plugins[j];
199      haystack = plugin.name + plugin.description;
200      pluginFoundText = 0;
201      for (k = substrs.length; k >= 0; k--) {
202        if (haystack.indexOf(substrs[k]) !== -1) {
203          pluginFoundText += 1;
204        }
205      }
206      if (pluginFoundText === substrs.length) {
207        return true;
208      }
209    }
210    return false;
211  }
212
213  function detectObject(progIds) {
214    var j;
215    for (j = progIds.length - 1; j >= 0; j--) {
216      try {
217        new ActiveXObject(progIds[j]);
218      } catch (e) {
219        // Ignore
220      }
221    }
222    return false;
223  }
224
225  function detect(opt) {
226    var i, j, device, os, browser, plugin2detect, pluginFound;
227
228    options = extend({}, options, opt || {});
229
230    /** Device detection **/
231    if (options.detectDevice) {
232      Detectizr.device = {
233        type: "",
234        model: "",
235        orientation: ""
236      };
237      device = Detectizr.device;
238      if (test(/googletv|smarttv|smart-tv|internet.tv|netcast|nettv|appletv|boxee|kylo|roku|dlnadoc|roku|pov_tv|hbbtv|ce\-html/)) {
239        // Check if user agent is a smart tv
240        device.type = deviceTypes[0];
241        device.model = "smartTv";
242      } else if (test(/xbox|playstation.3|wii/)) {
243        // Check if user agent is a game console
244        device.type = deviceTypes[0];
245        device.model = "gameConsole";
246      } else if (test(/ip(a|ro)d/)) {
247        // Check if user agent is a iPad
248        device.type = deviceTypes[1];
249        device.model = "ipad";
250      } else if ((test(/tablet/) && !test(/rx-34/) && !test(/shield/)) || test(/folio/)) {
251        // Check if user agent is a Tablet
252        device.type = deviceTypes[1];
253        device.model = String(exec(/playbook/) || "");
254      } else if (test(/linux/) && test(/android/) && !test(/fennec|mobi|htc.magic|htcX06ht|nexus.one|sc-02b|fone.945/)) {
255        // Check if user agent is an Android Tablet
256        device.type = deviceTypes[1];
257        device.model = "android";
258      } else if (test(/kindle/) || (test(/mac.os/) && test(/silk/))) {
259        // Check if user agent is a Kindle or Kindle Fire
260        device.type = deviceTypes[1];
261        device.model = "kindle";
262      } else if (test(/gt-p10|sc-01c|shw-m180s|sgh-t849|sch-i800|shw-m180l|sph-p100|sgh-i987|zt180|htc(.flyer|\_flyer)|sprint.atp51|viewpad7|pandigital(sprnova|nova)|ideos.s7|dell.streak.7|advent.vega|a101it|a70bht|mid7015|next2|nook/) || (test(/mb511/) && test(/rutem/))) {
263        // Check if user agent is a pre Android 3.0 Tablet
264        device.type = deviceTypes[1];
265        device.model = "android";
266      } else if (test(/bb10/)) {
267        // Check if user agent is a BB10 device
268        device.type = deviceTypes[2];
269        device.model = "blackberry";
270      } else {
271        // Check if user agent is one of common mobile types
272        device.model = exec(/iphone|ipod|android|blackberry|opera mini|opera mobi|skyfire|maemo|windows phone|palm|iemobile|symbian|symbianos|fennec|j2me/);
273        if (device.model !== null) {
274          device.type = deviceTypes[2];
275          device.model = String(device.model);
276        } else {
277          device.model = "";
278          if (test(/bolt|fennec|iris|maemo|minimo|mobi|mowser|netfront|novarra|prism|rx-34|skyfire|tear|xv6875|xv6975|google.wireless.transcoder/)) {
279            // Check if user agent is unique Mobile User Agent
280            device.type = deviceTypes[2];
281          } else if (test(/opera/) && test(/windows.nt.5/) && test(/htc|xda|mini|vario|samsung\-gt\-i8000|samsung\-sgh\-i9/)) {
282            // Check if user agent is an odd Opera User Agent - http://goo.gl/nK90K
283            device.type = deviceTypes[2];
284          } else if (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1) {
285            device.type = deviceTypes[1];
286          } else if ((test(/windows.(nt|xp|me|9)/) && !test(/phone/)) || test(/win(9|.9|nt)/) || test(/\(windows 8\)/)) {
287            // Check if user agent is Windows Desktop, "(Windows 8)" Chrome extra exception
288            device.type = deviceTypes[3];
289          } else if (test(/macintosh|powerpc/) && !test(/silk/)) {
290            // Check if agent is Mac Desktop
291            device.type = deviceTypes[3];
292            device.model = "mac";
293          } else if (test(/linux/) && test(/x11/)) {
294            // Check if user agent is a Linux Desktop
295            device.type = deviceTypes[3];
296          } else if (test(/solaris|sunos|bsd/)) {
297            // Check if user agent is a Solaris, SunOS, BSD Desktop
298            device.type = deviceTypes[3];
299          } else if (test(/cros/)) {
300            // Check if user agent is a Chromebook
301            device.type = deviceTypes[3];
302          }
302 else if (test(/bot|crawler|spider|yahoo|ia_archiver|covario-ids|findlinks|dataparksearch|larbin|mediapartners-google|ng-search|snappy|teoma|jeeves|tineye/) && !test(/mobile/)) {
303            // Check if user agent is a Desktop BOT/Crawler/Spider
304            device.type = deviceTypes[3];
305            device.model = "crawler";
306          } else {
307            // Otherwise assume it is a Mobile Device
308            device.type = deviceTypes[2];
309          }
310        }
311      }
312      for (i = 0, j = deviceTypes.length; i < j; i += 1) {
313        addConditionalTest(deviceTypes[i], (device.type === deviceTypes[i]));
314      }
315      if (options.detectDeviceModel) {
316        addConditionalTest(toCamel(device.model), true);
317      }
318    }
319
320    /** Screen detection **/
321    if (options.detectScreen) {
322      device.screen = {};
323      if (!!Modernizr && !!Modernizr.mq) {
324        if (Modernizr.mq("only screen and (max-width: 240px)")) {
325          device.screen.size = "veryVerySmall";
326          addConditionalTest("veryVerySmallScreen", true);
327        } else if (Modernizr.mq("only screen and (max-width: 320px)")) {
328          device.screen.size = "verySmall";
329          addConditionalTest("verySmallScreen", true);
330        } else if (Modernizr.mq("only screen and (max-width: 480px)")) {
331          device.screen.size = "small";
332          addConditionalTest("smallScreen", true);
333        }
334        if (device.type === deviceTypes[1] || device.type === deviceTypes[2]) {
335          if (Modernizr.mq("only screen and (-moz-min-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen  and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)")) {
336            device.screen.resolution = "high";
337            addConditionalTest("highresolution", true);
338          }
339        }
340      }
341//      if (device.type === deviceTypes[1] || device.type === deviceTypes[2]) {
342        window.onresize = function(event) {
343          checkOrientation(event);
344        };
345        checkOrientation();
346//      } else {
347//        device.orientation = "cape";
348//        addConditionalTest(device.orientation, true);
349//     }
350    }
351
352    /** OS detection **/
353    if (options.detectOS) {
354      Detectizr.os = {};
355      os = Detectizr.os;
356      if (device.model !== "") {
357        if (device.model === "ipad" || device.model === "iphone" || device.model === "ipod") {
358          os.name = "ios";
359          setVersion(os, (test(/os\s([\d_]+)/) ? RegExp.$1 : "").replace(/_/g, "."));
360        } else if (device.model === "android") {
361          os.name = "android";
362          setVersion(os, (test(/android\s([\d\.]+)/) ? RegExp.$1 : ""));
363        } else if (device.model === "blackberry") {
364          os.name = "blackberry";
365          setVersion(os, (test(/version\/([^\s]+)/) ? RegExp.$1 : ""));
366        } else if (device.model === "playbook") {
367          os.name = "blackberry";
368          setVersion(os, (test(/os ([^\s]+)/) ? RegExp.$1.replace(";", "") : ""));
369        }
370      }
371      if (!os.name) {
372        if (is("win") || is("16bit")) {
373          os.name = "windows";
374          if (is("windows nt 10")) {
375            setVersion(os, "10");
376          } else if (is("windows nt 6.3")) {
377            setVersion(os, "8.1");
378          } else if (is("windows nt 6.2") || test(/\(windows 8\)/)) { //windows 8 chrome mac fix
379            setVersion(os, "8");
380          } else if (is("windows nt 6.1")) {
381            setVersion(os, "7");
382          } else if (is("windows nt 6.0")) {
383            setVersion(os, "vista");
384          } else if (is("windows nt 5.2") || is("windows nt 5.1") || is("windows xp")) {
385            setVersion(os, "xp");
386          } else if (is("windows nt 5.0") || is("windows 2000")) {
387            setVersion(os, "2k");
388          } else if (is("winnt") || is("windows nt")) {
389            setVersion(os, "nt");
390          } else if (is("win98") || is("windows 98")) {
391            setVersion(os, "98");
392          } else if (is("win95") || is("windows 95")) {
393            setVersion(os, "95");
394          }
395        } else if (is("mac") || is("darwin")) {
396          os.name = "mac os";
397          if (is("68k") || is("68000")) {
398            setVersion(os, "68k");
399          } else if (is("ppc") || is("powerpc")) {
400            setVersion(os, "ppc");
401          } else if (is("os x")) {
402            setVersion(os, (test(/os\sx\s([\d_]+)/) ? RegExp.$1 : "os x").replace(/_/g, "."));
403          }
404        } else if (is("webtv")) {
405          os.name = "webtv";
406        } else if (is("x11") || is("inux")) {
407          os.name = "linux";
408        } else if (is("sunos")) {
409          os.name = "sun";
410        } else if (is("irix")) {
411          os.name = "irix";
412        } else if (is("freebsd")) {
413          os.name = "freebsd";
414        } else if (is("bsd")) {
415          os.name = "bsd";
416        }
417      }
418      if (!!os.name) {
419        addConditionalTest(os.name, true);
420        if (!!os.major) {
421          addVersionTest(os.name, os.major);
422          if (!!os.minor) {
423            addVersionTest(os.name, os.major, os.minor);
424          }
425        }
426      }
427      if (test(/\sx64|\sx86|\swin64|\swow64|\samd64/)) {
428        os.addressRegisterSize = "64bit";
429      } else {
430        os.addressRegisterSize = "32bit";
431      }
432      addConditionalTest(os.addressRegisterSize, true);
433    }
434
435    /** Browser detection **/
436    if (options.detectBrowser) {
437      browser = Detectizr.browser;
438      if (!test(/opera|webtv/) && (test(/msie\s([\d\w\.]+)/) || is("trident"))) {
439        browser.engine = "trident";
440        browser.name = "ie";
441        if (!window.addEventListener && document.documentMode && document.documentMode === 7) {
442          setVersion(browser, "8.compat");
443        } else if (test(/trident.*rv[ :](\d+)\./)) {
444          setVersion(browser, RegExp.$1);
445        } else {
446          setVersion(browser, (test(/trident\/4\.0/) ? "8" : RegExp.$1));
447        }
448      } else if (is("firefox")) {
449        browser.engine = "gecko";
450        browser.name = "firefox";
451        setVersion(browser, (test(/firefox\/([\d\w\.]+)/) ? RegExp.$1 : ""));
452      } else if (is("gecko/")) {
453        browser.engine = "gecko";
454      } else if (is("opera")) {
455        browser.name = "opera";
456        browser.engine = "presto";
457        setVersion(browser, (test(/version\/([\d\.]+)/) ? RegExp.$1 : (test(/opera(\s|\/)([\d\.]+)/) ? RegExp.$2 : "")));
458      } else if (is("konqueror")) {
459        browser.name = "konqueror";
460      } else if (is("edge")) {
461        browser.engine = "webkit";
462        browser.name = "edge";
463        setVersion(browser, (test(/edge\/([\d\.]+)/) ? RegExp.$1 : ""));
464      } else if (is("chrome")) {
465        browser.engine = "webkit";
466        browser.name = "chrome";
467        setVersion(browser, (test(/chrome\/([\d\.]+)/) ? RegExp.$1 : ""));
468      } else if (is("iron")) {
469        browser.engine = "webkit";
470        browser.name = "iron";
471      } else if (is("crios")) {
472        browser.name = "chrome";
473        browser.engine = "webkit";
474        setVersion(browser, (test(/crios\/([\d\.]+)/) ? RegExp.$1 : ""));
475      } else if (is("applewebkit/")) {
476        browser.name = "safari";
477        browser.engine = "webkit";
478        setVersion(browser, (test(/version\/([\d\.]+)/) ? RegExp.$1 : ""));
479      } else if (is("mozilla/")) {
480        browser.engine = "gecko";
481      }
482      if (!!browser.name) {
483        addConditionalTest(browser.name, true);
484        if (!!browser.major) {
485          addVersionTest(browser.name, browser.major);
486          if (!!browser.minor) {
487            addVersionTest(browser.name, browser.major, browser.minor);
488          }
489        }
490      }
491      addConditionalTest(browser.engine, true);
492
493      // Browser Language
494      browser.language = navigator.userLanguage || navigator.language;
495      addConditionalTest(browser.language, true);
496    }
497
498    /** Plugin detection **/
499    if (options.detectPlugins) {
500      browser.plugins = [];
501      for (i = plugins2detect.length - 1; i >= 0; i--) {
502        plugin2detect = plugins2detect[i];
503        pluginFound = false;
504        if (window.ActiveXObject) {
505          pluginFound = detectObject(plugin2detect.progIds);
506        } else if (navigator.plugins) {
507          pluginFound = detectPlugin(plugin2detect.substrs);
508        }
509        if (pluginFound) {
510          browser.plugins.push(plugin2detect.name);
511          addConditionalTest(plugin2detect.name, true);
512        }
513      }
514      if (typeof navigator.javaEnabled === "function" && navigator.javaEnabled()) {
515        browser.plugins.push("java");
516        addConditionalTest("java", true);
517      }
518    }
519  }
520  Detectizr.detect = function(settings) {
521    return detect(settings);
522  };
523  Detectizr.init = function() {
524    if (Detectizr !== undefined) {
525      Detectizr.browser = {
526        userAgent: (navigator.userAgent || navigator.vendor || window.opera || "").toLowerCase()
527      };
528      Detectizr.detect();
529    }
530  };
531  Detectizr.init();
532
533  return Detectizr;
534}(this, this.navigator, this.document));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.