1$.fn.easeScroll = function(options) { 2 ! function() { 3 function e() { 4 var e = !1; 5 e && c("keydown", r), v.keyboardSupport && !e && u("keydown", r) 6 } 7 8 function t() { 9 if (document.body) { 10 var t = document.body, 11 o = document.documentElement, 12 n = window.innerHeight, 13 r = t.scrollHeight; 14 if (S = document.compatMode.indexOf("CSS") >= 0 ? o : t, w = t, e(), x = !0, top != self) y = !0; 15 else if (r > n && (t.offsetHeight <= n || o.offsetHeight <= n)) { 16 var a = !1, 17 i = function() { 18 a || o.scrollHeight == document.height || (a = !0, setTimeout(function() { 19 o.style.height = document.height + "px", a = !1 20 }, 100)) 21 }; 22 if (o.style.height = "auto", setTimeout(i, 10), S.offsetHeight <= n) { 23 var l = document.createElement("div"); 24 l.style.clear = "both", t.appendChild(l) 25 } 26 } 27 v.fixedBackground || b || (t.style.backgroundAttachment = "scroll", o.style.backgroundAttachment = "scroll") 28 } 29 } 30 31 function o(e, t, o, n) { 32 if (n || (n = 1e3), d(t, o), 1 != v.accelerationMax) { 33 var r = +new Date, 34 a = r - C; 35 if (a < v.accelerationDelta) { 36 var i = (1 + 30 / a) / 2; 37 i > 1 && (i = Math.min(i, v.accelerationMax), t *= i, o *= i) 38 } 39 C = +new Date 40 } 41 if (M.push({ 42 x: t, 43 y: o, 44 lastX: 0 > t ? .99 : -.99, 45 lastY: 0 > o ? .99 : -.99, 46 start: +new Date 47 }), !T) { 48 var l = e === document.body, 49 u = function() { 50 for (var r = +new Date, a = 0, i = 0, c = 0; c < M.length; c++) { 51 var s = M[c], 52 d = r - s.start, 53 f = d >= v.animationTime, 54 h = f ? 1 : d / v.animationTime; 55 v.pulseAlgorithm && (h = p(h)); 56 var m = s.x * h - s.lastX >> 0, 57 w = s.y * h - s.lastY >> 0;
58 a += m, i += w, s.lastX += m, s.lastY += w, f && (M.splice(c, 1), c--) 59 } 60 l ? window.scrollBy(a, i) : (a && (e.scrollLeft += a), i && (e.scrollTop += i)), t || o || (M = []), M.length ? E(u, e, n / v.frameRate + 1) : T = !1 61 }; 62 E(u, e, 0), T = !0 63 } 64 } 65 66 function n(e) { 67 x || t(); 68 var n = e.target, 69 r = l(n); 70 if (!r || e.defaultPrevented || s(w, "embed") || s(n, "embed") && /\.pdf/i.test(n.src)) return !0; 71 var a = e.wheelDeltaX || 0, 72 i = e.wheelDeltaY || 0; 73 return a || i || (i = e.wheelDelta || 0), !v.touchpadSupport && f(i) ? !0 : (Math.abs(a) > 1.2 && (a *= v.stepSize / 120), Math.abs(i) > 1.2 && (i *= v.stepSize / 120), o(r, -a, -i), void e.preventDefault()) 74 } 75 // wheel ì´ë²¤í¸ì passive: falseë¡ ì¤ì 76 document.addEventListener('wheel', n, { passive: false }); 77 78 function r(e) { 79 var t = e.target, 80 n = e.ctrlKey || e.altKey || e.metaKey || e.shiftKey && e.keyCode !== H.spacebar; 81 if (/input|textarea|select|embed/i.test(t.nodeName) || t.isContentEditable || e.defaultPrevented || n) return !0; 82 if (s(t, "button") && e.keyCode === H.spacebar) return !0; 83 var r, a = 0, 84 i = 0, 85 u = l(w), 86 c = u.clientHeight; 87 switch (u == document.body && (c = window.innerHeight), e.keyCode) { 88 case H.up: 89 i = -v.arrowScroll; 90 break; 91 case H.down: 92 i = v.arrowScroll; 93 break; 94 case H.spacebar: 95 r = e.shiftKey ? 1 : -1, i = -r * c * .9; 96 break; 97 case H.pageup: 98 i = .9 * -c; 99 break; 100 case H.pagedown: 101 i = .9 * c; 102 break; 103 case H.home: 104 i = -u.scrollTop; 105 break; 106 case H.end: 107 var d = u.scrollHeight - u.scrollTop - c; 108 i = d > 0 ? d + 10 : 0; 109 break; 110 case H.left: 111 a = -v.arrowScroll; 112 break; 113 case H.right: 114 a = v.arrowScroll; 115 break; 116 default: 117 return !0 118 } 119 o(u, a, i), e.preventDefault() 120 } 121 122 function a(e) { 123 w = e.target 124 } 125 126 function i(e, t) { 127 for (var o = e.length; o--;) z[N(e[o])] = t; 128 return t 129 } 130 131 function l(e) { 132 var t = [], 133 o = S.scrollHeight; 134 do { 135 var n = z[N(e)]; 136 if (n) return i(t, n); 137 if (t.push(e), o === e.scrollHeight) { 138 if (!y || S.clientHeight + 10 < o) return i(t, document.body) 139 } else if (e.clientHeight + 10 < e.scrollHeight && (overflow = getComputedStyle(e, "").getPropertyValue("overflow-y"), "scroll" === overflow || "auto" === overflow)) return i(t, e) 140 } while (e = e.parentNode) 141 } 142 143 function u(e, t, o) { 144 window.addEventListener(e, t, o || !1) 145 } 146 147 function c(e, t, o) { 148 window.removeEventListener(e, t, o || !1) 149 } 150 151 function s(e, t) { 152 return (e.nodeName || "").toLowerCase() === t.toLowerCase() 153 } 154 155 function d(e, t) { 156 e = e > 0 ? 1 : -1, t = t > 0 ? 1 : -1, (k.x !== e || k.y !== t) && (k.x = e, k.y = t, M = [], C = 0) 157 } 158 159 function f(e) { 160 if (e) { 161 e = Math.abs(e), D.push(e), D.shift(), clearTimeout(A); 162 var t = D[0] == D[1] && D[1] == D[2], 163 o = h(D[0], 120) && h(D[1], 120) && h(D[2], 120); 164 return !(t || o) 165 } 166 } 167 168 function h(e, t) { 169 return Math.floor(e / t) == e / t 170 } 171 172 function m(e) { 173 var t, o, n; 174 return e *= v.pulseScale, 1 > e ? t = e - (1 - Math.exp(-e)) : (o = Math.exp(-1), e -= 1, n = 1 - Math.exp(-e), t = o + n * (1 - o)), t * v.pulseNormalize 175 } 176 177 function p(e) { 178 return e >= 1 ? 1 : 0 >= e ? 0 : (1 == v.pulseNormalize && (v.pulseNormalize /= m(1)), m(e)) 179 } 180 181 var settings = $.extend({ 182 // These are the defaults. 183 frameRate: 60, 184 animationTime: 1000, 185 stepSize: 120, 186 pulseAlgorithm: !0, 187 pulseScale: 8, 188 pulseNormalize: 1, 189 accelerationDelta: 20, 190 accelerationMax: 1, 191 keyboardSupport: !0, 192 arrowScroll: 50, 193 touchpadSupport: !0,
194 fixedBackground: !0 195 }, options ); 196 197 var w, g = { 198 frameRate: settings.frameRate, 199 animationTime: settings.animationTime, 200 stepSize: settings.stepSize, 201 pulseAlgorithm: settings.pulseAlgorithm, 202 pulseScale: settings.pulseScale, 203 pulseNormalize: settings.pulseNormalize, 204 accelerationDelta: settings.accelerationDelta, 205 accelerationMax: settings.accelerationMax, 206 keyboardSupport: settings.keyboardSupport, 207 arrowScroll: settings.arrowScroll, 208 touchpadSupport: settings.touchpadSupport, 209 fixedBackground: settings.fixedBackground, 210 excluded: "" 211 }, 212 v = g, 213 b = !1, 214 y = !1, 215 k = { 216 x: 0, 217 y: 0 218 }, 219 x = !1, 220 S = document.documentElement, 221 D = [120, 120, 120], 222 H = { 223 left: 37, 224 up: 38, 225 right: 39, 226 down: 40, 227 spacebar: 32, 228 pageup: 33, 229 pagedown: 34, 230 end: 35, 231 home: 36 232 }, 233 v = g, 234 M = [], 235 T = !1, 236 C = +new Date, 237 z = {}; 238 setInterval(function() { 239 z = {} 240 }, 1e4); 241 var A, N = function() { 242 var e = 0; 243 return function(t) { 244 return t.uniqueID || (t.uniqueID = e++) 245 } 246 }(), 247 E = function() { 248 return window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(e, t, o) { 249 window.setTimeout(e, o || 1e3 / 60) 250 } 251 }(), 252 K = /chrome|iPad/i.test(window.navigator.userAgent), 253 L = "onmousewheel" in document; 254 L && K && (u("mousedown", a), u("mousewheel", n), u("load", t)) 255 }(); 256} 257 258
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.