1/*! 2 * enquire.js v2.1.2 - Awesome Media Queries in JavaScript 3 * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/enquire.js 4 * License: MIT (http://www.opensource.org/licenses/mit-license.php) 5 */ 6 7!(function (a, b, c) { 8 var d = window.matchMedia; 9 "undefined" != typeof module && module.exports 10 ? (module.exports = c(d)) 11 : "function" == typeof define && define.amd 12 ? define(function () { 13 return (b[a] = c(d)); 14 }) 15 : (b[a] = c(d)); 16})("enquire", this, function (a) { 17 "use strict"; 18 function b(a, b) { 19 var c, 20 d = 0, 21 e = a.length; 22 for (d; e > d && ((c = b(a[d], d)), c !== !1); d++); 23 } 24 function c(a) { 25 return "[object Array]" === Object.prototype.toString.apply(a); 26 } 27 function d(a) { 28 return "function" == typeof a; 29 } 30 function e(a) { 31 (this.options = a), !a.deferSetup && this.setup(); 32 } 33 function f(b, c) { 34 (this.query = b), 35 (this.isUnconditional = c), 36 (this.handlers = []), 37 (this.mql = a(b)); 38 var d = this; 39 (this.listener = function (a) { 40 (d.mql = a), d.assess(); 41 }), 42 this.mql.addListener(this.listener); 43 } 44 function g() { 45 if (!a) 46 throw new Error(
47 "matchMedia not present, legacy browsers require a polyfill" 48 ); 49 (this.queries = {}), (this.browserIsIncapable = !a("only all").matches); 50 } 51 return ( 52 (e.prototype = { 53 setup: function () { 54 this.options.setup && this.options.setup(), 55 (this.initialised = !0); 56 }, 57 on: function () { 58 !this.initialised && this.setup(), 59 this.options.match && this.options.match(); 60 }, 61 off: function () { 62 this.options.unmatch && this.options.unmatch(); 63 }, 64 destroy: function () { 65 this.options.destroy ? this.options.destroy() : this.off(); 66 }, 67 equals: function (a) { 68 return this.options === a || this.options.match === a; 69 }, 70 }), 71 (f.prototype = { 72 addHandler: function (a) { 73 var b = new e(a); 74 this.handlers.push(b), this.matches() && b.on(); 75 }, 76 removeHandler: function (a) { 77 var c = this.handlers; 78 b(c, function (b, d) { 79 return b.equals(a) 80 ? (b.destroy(), !c.splice(d, 1)) 81 : void 0; 82 }); 83 }, 84 matches: function () { 85 return this.mql.matches || this.isUnconditional; 86 }, 87 clear: function () { 88 b(this.handlers, function (a) { 89 a.destroy(); 90 }), 91 this.mql.removeListener(this.listener), 92 (this.handlers.length = 0); 93 }, 94 assess: function () { 95 var a = this.matches() ? "on" : "off"; 96 b(this.handlers, function (b) { 97 b[a](); 98 }); 99 }, 100 }), 101 (g.prototype = { 102 register: function (a, e, g) { 103 var h = this.queries, 104 i = g && this.browserIsIncapable; 105 return ( 106 h[a] || (h[a] = new f(a, i)), 107 d(e) && (e = { match: e }), 108 c(e) || (e = [e]), 109 b(e, function (b) { 110 d(b) && (b = { match: b }), h[a].addHandler(b); 111 }), 112 this 113 ); 114 }, 115 unregister: function (a, b) { 116 var c = this.queries[a]; 117 return ( 118 c && 119 (b 120 ? c.removeHandler(b) 121 : (c.clear(), delete this.queries[a])), 122 this 123 ); 124 }, 125 }), 126 new g() 127 ); 128});
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.