1/*! 2 * Masonry PACKAGED v3.1.4 3 * Cascading grid layout library 4 * http://masonry.desandro.com 5 * MIT License 6 * by David DeSandro 7 */ 8 9(function (t) { 10 function e() { 11 } 12 13 function i(t) { 14 function i(e) { 15 e.prototype.option || (e.prototype.option = function (e) { 16 t.isPlainObject(e) && (this.options = t.extend(!0, this.options, e)) 17 }) 18 } 19 20 function o(e, i) { 21 t.fn[e] = function (o) { 22 if ("string" == typeof o) { 23 for (var s = n.call(arguments, 1), a = 0, h = this.length; h > a; a++) { 24 var p = this[a], u = t.data(p, e); 25 if (u)if (t.isFunction(u[o]) && "_" !== o.charAt(0)) { 26 var f = u[o].apply(u, s); 27 if (void 0 !== f)return f 28 } else r("no such method '" + o + "' for " + e + " instance"); else r("cannot call methods on " + e + " prior to initialization; " + "attempted to call '" + o + "'") 29 } 30 return this 31 } 32 return this.each(function () { 33 var n = t.data(this, e); 34 n ? (n.option(o), n._init()) : (n = new i(this, o), t.data(this, e, n)) 35 }) 36 } 37 } 38 39 if (t) { 40 var r = "undefined" == typeof console ? e : function (t) { 41 console.error(t) 42 }; 43 return t.bridget = function (t, e) { 44 i(e), o(t, e) 45 }, t.bridget 46 } 47 } 48 49 var n = Array.prototype.slice; 50 "function" == typeof define && define.amd ? define("jquery-bridget/jquery.bridget", ["jquery"], i) : i(t.jQuery) 51})(window), function (t) { 52 function e(e) { 53 var i = t.event; 54 return i.target = i.target || i.srcElement || e, i 55 } 56 57 var i = document.documentElement, n = function () { 58 }; 59 i.addEventListener ? n = function (t, e, i) { 60 t.addEventListener(e, i, !1) 61 } : i.attachEvent && (n = function (t, i, n) { 62 t[i + n] = n.handleEvent ? function () { 63 var i = e(t); 64 n.handleEvent.call(n, i) 65 } : function () { 66 var i = e(t); 67 n.call(t, i) 68 }, t.attachEvent("on" + i, t[i + n]) 69 }); 70 var o = function () { 71 }; 72 i.removeEventListener ? o = function (t, e, i) { 73 t.removeEventListener(e, i, !1) 74 } : i.detachEvent && (o = function (t, e, i) { 75 t.detachEvent("on" + e, t[e + i]); 76 try { 77 delete t[e + i] 78 } catch (n) { 79 t[e + i] = void 0 80 } 81 }); 82 var r = {bind: n, unbind: o}; 83 "function" == typeof define && define.amd ? define("eventie/eventie", r) : "object" == typeof exports ? module.exports = r : t.eventie = r 84}(this), function (t) { 85 function e(t) { 86 "function" == typeof t && (e.isReady ? t() : r.push(t)) 87 } 88 89 function i(t) { 90 var i = "readystatechange" === t.type && "complete" !== o.readyState; 91 if (!e.isReady && !i) { 92 e.isReady = !0; 93 for (var n = 0, s = r.length; s > n; n++) { 94 var a = r[n]; 95 a() 96 } 97 } 98 } 99 100 function n(n) { 101 return n.bind(o, "DOMContentLoaded", i), n.bind(o, "readystatechange", i), n.bind(t, "load", i), e 102 } 103 104 var o = t.document, r = []; 105 e.isReady = !1, "function" == typeof define && define.amd ? (e.isReady = "function" == typeof requirejs, define("doc-ready/doc-ready", ["eventie/eventie"], n)) : t.docReady = n(t.eventie) 106}(this), function () { 107 function t() { 108 } 109 110 function e(t, e) { 111 for (var i = t.length; i--;)if (t[i].listener === e)return i; 112 return-1 113 } 114 115 function i(t) { 116 return function () { 117 return this[t].apply(this, arguments) 118 } 119 } 120 121 var n = t.prototype, o = this, r = o.EventEmitter; 122 n.getListeners = function (t) { 123 var e, i, n = this._getEvents(); 124 if (t instanceof RegExp) { 125 e = {}; 126 for (i in n)n.hasOwnProperty(i) && t.test(i) && (e[i] = n[i]) 127 } else e = n[t] || (n[t] = []); 128 return e 129 }, n.flattenListeners = function (t) { 130 var e, i = []; 131 for (e = 0; t.length > e; e += 1)i.push(t[e].listener); 132 return i 133 }, n.getListenersAsObject = function (t) { 134 var e, i = this.getListeners(t); 135 return i instanceof Array && (e = {}, e[t] = i), e || i 136 }, n.addListener = function (t, i) { 137 var n, o = this.getListenersAsObject(t), r = "object" == typeof i; 138 for (n in o)o.hasOwnProperty(n) && -1 === e(o[n], i) && o[n].push(r ? i : {listener: i, once: !1}); 139 return this 140 }, n.on = i("addListener"), n.addOnceListener = function (t, e) { 141 return this.addListener(t, {listener: e, once: !0}) 142 }, n.once = i("addOnceListener"), n.defineEvent = function (t) { 143 return this.getListeners(t), this 144 }, n.defineEvents = function (t) { 145 for (var e = 0; t.length > e; e += 1)this.defineEvent(t[e]); 146 return this 147 }, n.removeListener = function (t, i) { 148 var n, o, r = this.getListenersAsObject(t); 149 for (o in r)r.hasOwnProperty(o) && (n = e(r[o], i), -1 !== n && r[o].splice(n, 1)); 150 return this 151 }, n.off = i("removeListener"), n.addListeners = function (t, e) { 152 return this.manipulateListeners(!1, t, e) 153 }, n.removeListeners = function (t, e) { 154 return this.manipulateListeners(!0, t, e) 155 }, n.manipulateListeners = function (t, e, i) { 156 var n, o, r = t ? this.removeListener : this.addListener, s = t ? this.removeListeners : this.addListeners; 157 if ("object" != typeof e || e instanceof RegExp)for (n = i.length; n--;)r.call(this, e, i[n]); else for (n in e)e.hasOwnProperty(n) && (o = e[n]) && ("function" == typeof o ? r.call(this, n, o) : s.call(this, n, o)); 158 return this 159 }, n.removeEvent = function (t) { 160 var e, i = typeof t, n = this._getEvents(); 161 if ("string" === i)delete n[t]; else if (t instanceof RegExp)for (e in n)n.hasOwnProperty(e) && t.test(e) && delete n[e]; else delete this._events; 162 return this 163 }, n.removeAllListeners = i("removeEvent"), n.emitEvent = function (t, e) { 164 var i, n, o, r, s = this.getListenersAsObject(t); 165 for (o in s)if (s.hasOwnProperty(o))for (n = s[o].length; n--;)i = s[o][n], i.once === !0 && this.removeListener(t, i.listener), r = i.listener.apply(this, e || []), r === this._getOnceReturnValue() && this.removeListener(t, i.listener); 166 return this 167 }, n.trigger = i("emitEvent"), n.emit = function (t) { 168 var e = Array.prototype.slice.call(arguments, 1); 169 return this.emitEvent(t, e) 170 }, n.setOnceReturnValue = function (t) { 171 return this._onceReturnValue = t, this 172 }, n._getOnceReturnValue = function () { 173 return this.hasOwnProperty("_onceReturnValue") ? this._onceReturnValue : !0 174 }, n._getEvents = function () { 175 return this._events || (this._events = {}) 176 }, t.noConflict = function () { 177 return o.EventEmitter = r, t 178 }, "function" == typeof define && define.amd ? define("eventEmitter/EventEmitter", [], function () { 179 return t 180 }) : "object" == typeof module && module.exports ? module.exports = t : this.EventEmitter = t 181}.call(this), function (t) { 182 function e(t) { 183 if (t) { 184 if ("string" == typeof n[t])return t; 185 t = t.charAt(0).toUpperCase() + t.slice(1); 186 for (var e, o = 0, r = i.length; r > o; o++)if (e = i[o] + t, "string" == typeof n[e])return e 187 } 188 } 189 190 var i = "Webkit Moz ms Ms O".split(" "), n = document.documentElement.style; 191 "function" == typeof define && define.amd ? define("get-style-property/get-style-property", [], function () { 192 return e 193 }) : "object" == typeof exports ? module.exports = e : t.getStyleProperty = e 194}(window), function (t) { 195 function e(t) { 196 var e = parseFloat(t), i = -1 === t.indexOf("%") && !isNaN(e); 197 return i && e 198 } 199 200 function i() { 201 for (var t = {width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0}, e = 0, i = s.length; i > e; e++) { 202 var n = s[e]; 203 t[n] = 0 204 } 205 return t 206 } 207 208 function n(t) { 209 function n(t) { 210 if ("string" == typeof t && (t = document.querySelector(t)), t && "object" == typeof t && t.nodeType) { 211 var n = r(t); 212 if ("none" === n.display)return i(); 213 var o = {}; 214 o.width = t.offsetWidth, o.height = t.offsetHeight; 215 for (var u = o.isBorderBox = !(!p || !n[p] || "border-box" !== n[p]), f = 0, c = s.length; c > f; f++) { 216 var d = s[f], l = n[d]; 217 l = a(t, l); 218 var m = parseFloat(l); 219 o[d] = isNaN(m) ? 0 : m 220 } 221 var y = o.paddingLeft + o.paddingRight, g = o.paddingTop + o.paddingBottom, v = o.marginLeft + o.marginRight, b = o.marginTop + o.marginBottom, _ = o.borderLeftWidth + o.borderRightWidth, E = o.borderTopWidth + o.borderBottomWidth, L = u && h, x = e(n.width); 222 x !== !1 && (o.width = x + (L ? 0 : y + _)); 223 var z = e(n.height); 224 return z !== !1 && (o.height = z + (L ? 0 : g + E)), o.innerWidth = o.width - (y + _), o.innerHeight = o.height - (g + E), o.outerWidth = o.width + v, o.outerHeight = o.height + b, o 225 } 226 } 227 228 function a(t, e) { 229 if (o || -1 === e.indexOf("%"))return e; 230 var i = t.style, n = i.left, r = t.runtimeStyle, s = r && r.left; 231 return s && (r.left = t.currentStyle.left), i.left = e, e = i.pixelLeft, i.left = n, s && (r.left = s), e 232 } 233 234 var h, p = t("boxSizing"); 235 return function () { 236 if (p) { 237 var t = document.createElement("div"); 238 t.style.width = "200px", t.style.padding = "1px 2px 3px 4px", t.style.borderStyle = "solid", t.style.borderWidth = "1px 2px 3px 4px", t.style[p] = "border-box"; 239 var i = document.body || document.documentElement; 240 i.appendChild(t); 241 var n = r(t); 242 h = 200 === e(n.width), i.removeChild(t) 243 } 244 }(), n 245 } 246 247 var o = t.getComputedStyle, r = o ? function (t) { 248 return o(t, null) 249 } : function (t) { 250 return t.currentStyle 251 }, s = ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "marginLeft", "marginRight", "marginTop", "marginBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"]; 252 "function" == typeof define && define.amd ? define("get-size/get-size", ["get-style-property/get-style-property"], n) : "object" == typeof exports ? module.exports = n(require("get-style-property")) : t.getSize = n(t.getStyleProperty) 253}(window), function (t, e) { 254 function i(t, e) { 255 return t[a](e) 256 } 257 258 function n(t) { 259 if (!t.parentNode) { 260 var e = document.createDocumentFragment(); 261 e.appendChild(t) 262 } 263 } 264 265 function o(t, e) { 266 n(t); 267 for (var i = t.parentNode.querySelectorAll(e), o = 0, r = i.length; r > o; o++)if (i[o] === t)return!0; 268 return!1 269 } 270 271 function r(t, e) { 272 return n(t), i(t, e) 273 } 274 275 var s, a = function () { 276 if (e.matchesSelector)return"matchesSelector"; 277 for (var t = ["webkit", "moz", "ms", "o"], i = 0, n = t.length; n > i; i++) { 278 var o = t[i], r = o + "MatchesSelector"; 279 if (e[r])return r 280 } 281 }(); 282 if (a) { 283 var h = document.createElement("div"), p = i(h, "div"); 284 s = p ? i : r 285 } else s = o; 286 "function" == typeof define && define.amd ? define("matches-selector/matches-selector", [], function () { 287 return s 288 }) : window.matchesSelector = s 289}(this, Element.prototype), function (t) { 290 function e(t, e) { 291 for (var i in e)t[i] = e[i]; 292 return t 293 } 294 295 function i(t) { 296 for (var e in t)return!1; 297 return e = null, !0 298 } 299 300 function n(t) { 301 return t.replace(/([A-Z])/g, function (t) { 302 return"-" + t.toLowerCase() 303 }) 304 } 305 306 function o(t, o, r) { 307 function a(t, e) { 308 t && (this.element = t, this.layout = e, this.position = {x: 0, y: 0}, this._create()) 309 } 310 311 var h = r("transition"), p = r("transform"), u = h && p, f = !!r
311("perspective"), c = {WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "otransitionend", transition: "transitionend"}[h], d = ["transform", "transition", "transitionDuration", "transitionProperty"], l = function () { 312 for (var t = {}, e = 0, i = d.length; i > e; e++) { 313 var n = d[e], o = r(n); 314 o && o !== n && (t[n] = o) 315 } 316 return t 317 }(); 318 e(a.prototype, t.prototype), a.prototype._create = function () { 319 this._transn = {ingProperties: {}, clean: {}, onEnd: {}}, this.css({position: "absolute"}) 320 }, a.prototype.handleEvent = function (t) { 321 var e = "on" + t.type; 322 this[e] && this[e](t) 323 }, a.prototype.getSize = function () { 324 this.size = o(this.element) 325 }, a.prototype.css = function (t) { 326 var e = this.element.style; 327 for (var i in t) { 328 var n = l[i] || i; 329 e[n] = t[i] 330 } 331 }, a.prototype.getPosition = function () { 332 var t = s(this.element), e = this.layout.options, i = e.isOriginLeft, n = e.isOriginTop, o = parseInt(t[i ? "left" : "right"], 10), r = parseInt(t[n ? "top" : "bottom"], 10); 333 o = isNaN(o) ? 0 : o, r = isNaN(r) ? 0 : r; 334 var a = this.layout.size; 335 o -= i ? a.paddingLeft : a.paddingRight, r -= n ? a.paddingTop : a.paddingBottom, this.position.x = o, this.position.y = r 336 }, a.prototype.layoutPosition = function () { 337 var t = this.layout.size, e = this.layout.options, i = {}; 338 e.isOriginLeft ? (i.left = this.position.x + t.paddingLeft + "px", i.right = "") : (i.right = this.position.x + t.paddingRight + "px", i.left = ""), e.isOriginTop ? (i.top = this.position.y + t.paddingTop + "px", i.bottom = "") : (i.bottom = this.position.y + t.paddingBottom + "px", i.top = ""), this.css(i), this.emitEvent("layout", [this]) 339 }; 340 var m = f ? function (t, e) { 341 return"translate3d(" + t + "px, " + e + "px, 0)" 342 } : function (t, e) { 343 return"translate(" + t + "px, " + e + "px)" 344 }; 345 a.prototype._transitionTo = function (t, e) { 346 this.getPosition(); 347 var i = this.position.x, n = this.position.y, o = parseInt(t, 10), r = parseInt(e, 10), s = o === this.position.x && r === this.position.y; 348 if (this.setPosition(t, e), s && !this.isTransitioning)return this.layoutPosition(), void 0; 349 var a = t - i, h = e - n, p = {}, u = this.layout.options; 350 a = u.isOriginLeft ? a : -a, h = u.isOriginTop ? h : -h, p.transform = m(a, h), this.transition({to: p, onTransitionEnd: {transform: this.layoutPosition}, isCleaning: !0}) 351 }, a.prototype.goTo = function (t, e) { 352 this.setPosition(t, e), this.layoutPosition() 353 }, a.prototype.moveTo = u ? a.prototype._transitionTo : a.prototype.goTo, a.prototype.setPosition = function (t, e) { 354 this.position.x = parseInt(t, 10), this.position.y = parseInt(e, 10) 355 }, a.prototype._nonTransition = function (t) { 356 this.css(t.to), t.isCleaning && this._removeStyles(t.to); 357 for (var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this) 358 }, a.prototype._transition = function (t) { 359 if (!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t), void 0; 360 var e = this._transn; 361 for (var i in t.onTransitionEnd)e.onEnd[i] = t.onTransitionEnd[i]; 362 for (i in t.to)e.ingProperties[i] = !0, t.isCleaning && (e.clean[i] = !0); 363 if (t.from) { 364 this.css(t.from); 365 var n = this.element.offsetHeight; 366 n = null 367 } 368 this.enableTransition(t.to), this.css(t.to), this.isTransitioning = !0 369 }; 370 var y = p && n(p) + ",opacity"; 371 a.prototype.enableTransition = function () { 372 this.isTransitioning || (this.css({transitionProperty: y, transitionDuration: this.layout.options.transitionDuration}), this.element.addEventListener(c, this, !1)) 373 }, a.prototype.transition = a.prototype[h ? "_transition" : "_nonTransition"], a.prototype.onwebkitTransitionEnd = function (t) { 374 this.ontransitionend(t) 375 }, a.prototype.onotransitionend = function (t) { 376 this.ontransitionend(t) 377 }; 378 var g = {"-webkit-transform": "transform", "-moz-transform": "transform", "-o-transform": "transform"}; 379 a.prototype.ontransitionend = function (t) { 380 if (t.target === this.element) { 381 var e = this._transn, n = g[t.propertyName] || t.propertyName; 382 if (delete e.ingProperties[n], i(e.ingProperties) && this.disableTransition(), n in e.clean && (this.element.style[t.propertyName] = "", delete e.clean[n]), n in e.onEnd) { 383 var o = e.onEnd[n]; 384 o.call(this), delete e.onEnd[n] 385 } 386 this.emitEvent("transitionEnd", [this]) 387 } 388 }, a.prototype.disableTransition = function () { 389 this.removeTransitionStyles(), this.element.removeEventListener(c, this, !1), this.isTransitioning = !1 390 }, a.prototype._removeStyles = function (t) { 391 var e = {}; 392 for (var i in t)e[i] = ""; 393 this.css(e) 394 }; 395 var v = {transitionProperty: "", transitionDuration: ""}; 396 return a.prototype.removeTransitionStyles = function () { 397 this.css(v) 398 }, a.prototype.removeElem = function () { 399 this.element.parentNode.removeChild(this.element), this.emitEvent("remove", [this]) 400 }, a.prototype.remove = function () { 401 if (!h || !parseFloat(this.layout.options.transitionDuration))return this.removeElem(), void 0; 402 var t = this; 403 this.on("transitionEnd", function () { 404 return t.removeElem(), !0 405 }), this.hide() 406 }, a.prototype.reveal = function () { 407 delete this.isHidden, this.css({display: ""}); 408 var t = this.layout.options; 409 this.transition({from: t.hiddenStyle, to: t.visibleStyle, isCleaning: !0}) 410 }, a.prototype.hide = function () { 411 this.isHidden = !0, this.css({display: ""}); 412 var t = this.layout.options; 413 this.transition({from: t.visibleStyle, to: t.hiddenStyle, isCleaning: !0, onTransitionEnd: {opacity: function () { 414 this.isHidden && this.css({display: "none"}) 415 }}}) 416 }, a.prototype.destroy = function () { 417 this.css({position: "", left: "", right: "", top: "", bottom: "", transition: "", transform: ""}) 418 }, a 419 } 420 421 var r = document.defaultView, s = r && r.getComputedStyle ? function (t) { 422 return r.getComputedStyle(t, null) 423 } : function (t) { 424 return t.currentStyle 425 }; 426 "function" == typeof define && define.amd ? define("outlayer/item", ["eventEmitter/EventEmitter", "get-size/get-size", "get-style-property/get-style-property"], o) : (t.Outlayer = {}, t.Outlayer.Item = o(t.EventEmitter, t.getSize, t.getStyleProperty)) 427}(window), function (t) { 428 function e(t, e) { 429 for (var i in e)t[i] = e[i]; 430 return t 431 } 432 433 function i(t) { 434 return"[object Array]" === f.call(t) 435 } 436 437 function n(t) { 438 var e = []; 439 if (i(t))e = t; else if (t && "number" == typeof t.length)for (var n = 0, o = t.length; o > n; n++)e.push(t[n]); else e.push(t); 440 return e 441 } 442 443 function o(t, e) { 444 var i = d(e, t); 445 -1 !== i && e.splice(i, 1) 446 } 447 448 function r(t) { 449 return t.replace(/(.)([A-Z])/g,function (t, e, i) { 450 return e + "-" + i 451 }).toLowerCase() 452 } 453 454 function s(i, s, f, d, l, m) { 455 function y(t, i) { 456 if ("string" == typeof t && (t = a.querySelector(t)), !t || !c(t))return h && h.error("Bad " + this.constructor.namespace + " element: " + t), void 0; 457 this.element = t, this.options = e({}, this.options), this.option(i); 458 var n = ++v; 459 this.element.outlayerGUID = n, b[n] = this, this._create(), this.options.isInitLayout && this.layout() 460 } 461 462 function g(t, i) { 463 t.prototype[i] = e({}, y.prototype[i]) 464 } 465 466 var v = 0, b = {}; 467 return y.namespace = "outlayer", y.Item = m, y.prototype.options = {containerStyle: {position: "relative"}, isInitLayout: !0, isOriginLeft: !0, isOriginTop: !0, isResizeBound: !0, transitionDuration: "0.4s", hiddenStyle: {opacity: 0, transform: "scale(0.001)"}, visibleStyle: {opacity: 1, transform: "scale(1)"}}, e(y.prototype, f.prototype), y.prototype.option = function (t) { 468 e(this.options, t) 469 }, y.prototype._create = function () { 470 this.reloadItems(), this.stamps = [], this.stamp(this.options.stamp), e(this.element.style, this.options.containerStyle), this.options.isResizeBound && this.bindResize() 471 }, y.prototype.reloadItems = function () { 472 this.items = this._itemize(this.element.children) 473 }, y.prototype._itemize = function (t) { 474 for (var e = this._filterFindItemElements(t), i = this.constructor.Item, n = [], o = 0, r = e.length; r > o; o++) { 475 var s = e[o], a = new i(s, this); 476 n.push(a) 477 } 478 return n 479 }, y.prototype._filterFindItemElements = function (t) { 480 t = n(t); 481 for (var e = this.options.itemSelector, i = [], o = 0, r = t.length; r > o; o++) { 482 var s = t[o]; 483 if (c(s))if (e) { 484 l(s, e) && i.push(s); 485 for (var a = s.querySelectorAll(e), h = 0, p = a.length; p > h; h++)i.push(a[h]) 486 } else i.push(s) 487 } 488 return i 489 }, y.prototype.getItemElements = function () { 490 for (var t = [], e = 0, i = this.items.length; i > e; e++)t.push(this.items[e].element); 491 return t 492 }, y.prototype.layout = function () { 493 this._resetLayout(), this._manageStamps(); 494 var t = void 0 !== this.options.isLayoutInstant ? this.options.isLayoutInstant : !this._isLayoutInited; 495 this.layoutItems(this.items, t), this._isLayoutInited = !0 496 }, y.prototype._init = y.prototype.layout, y.prototype._resetLayout = function () {
497 this.getSize() 498 }, y.prototype.getSize = function () { 499 this.size = d(this.element) 500 }, y.prototype._getMeasurement = function (t, e) { 501 var i, n = this.options[t]; 502 n ? ("string" == typeof n ? i = this.element.querySelector(n) : c(n) && (i = n), this[t] = i ? d(i)[e] : n) : this[t] = 0 503 }, y.prototype.layoutItems = function (t, e) { 504 t = this._getItemsForLayout(t), this._layoutItems(t, e), this._postLayout() 505 }, y.prototype._getItemsForLayout = function (t) { 506 for (var e = [], i = 0, n = t.length; n > i; i++) { 507 var o = t[i]; 508 o.isIgnored || e.push(o) 509 } 510 return e 511 }, y.prototype._layoutItems = function (t, e) { 512 function i() { 513 n.emitEvent("layoutComplete", [n, t]) 514 } 515 516 var n = this; 517 if (!t || !t.length)return i(), void 0; 518 this._itemsOn(t, "layout", i); 519 for (var o = [], r = 0, s = t.length; s > r; r++) { 520 var a = t[r], h = this._getItemLayoutPosition(a); 521 h.item = a, h.isInstant = e || a.isLayoutInstant, o.push(h) 522 } 523 this._processLayoutQueue(o) 524 }, y.prototype._getItemLayoutPosition = function () { 525 return{x: 0, y: 0} 526 }, y.prototype._processLayoutQueue = function (t) { 527 for (var e = 0, i = t.length; i > e; e++) { 528 var n = t[e]; 529 this._positionItem(n.item, n.x, n.y, n.isInstant) 530 } 531 }, y.prototype._positionItem = function (t, e, i, n) { 532 n ? t.goTo(e, i) : t.moveTo(e, i) 533 }, y.prototype._postLayout = function () { 534 var t = this._getContainerSize(); 535 t && (this._setContainerMeasure(t.width, !0), this._setContainerMeasure(t.height, !1)) 536 }, y.prototype._getContainerSize = u, y.prototype._setContainerMeasure = function (t, e) { 537 if (void 0 !== t) { 538 var i = this.size; 539 i.isBorderBox && (t += e ? i.paddingLeft + i.paddingRight + i.borderLeftWidth + i.borderRightWidth : i.paddingBottom + i.paddingTop + i.borderTopWidth + i.borderBottomWidth), t = Math.max(t, 0), this.element.style[e ? "width" : "height"] = t + "px" 540 } 541 }, y.prototype._itemsOn = function (t, e, i) { 542 function n() { 543 return o++, o === r && i.call(s), !0 544 } 545 546 for (var o = 0, r = t.length, s = this, a = 0, h = t.length; h > a; a++) { 547 var p = t[a]; 548 p.on(e, n) 549 } 550 }, y.prototype.ignore = function (t) { 551 var e = this.getItem(t); 552 e && (e.isIgnored = !0) 553 }, y.prototype.unignore = function (t) { 554 var e = this.getItem(t); 555 e && delete e.isIgnored 556 }, y.prototype.stamp = function (t) { 557 if (t = this._find(t)) { 558 this.stamps = this.stamps.concat(t); 559 for (var e = 0, i = t.length; i > e; e++) { 560 var n = t[e]; 561 this.ignore(n) 562 } 563 } 564 }, y.prototype.unstamp = function (t) { 565 if (t = this._find(t))for (var e = 0, i = t.length; i > e; e++) { 566 var n = t[e]; 567 o(n, this.stamps), this.unignore(n) 568 } 569 }, y.prototype._find = function (t) { 570 return t ? ("string" == typeof t && (t = this.element.querySelectorAll(t)), t = n(t)) : void 0 571 }, y.prototype._manageStamps = function () { 572 if (this.stamps && this.stamps.length) { 573 this._getBoundingRect(); 574 for (var t = 0, e = this.stamps.length; e > t; t++) { 575 var i = this.stamps[t]; 576 this._manageStamp(i) 577 } 578 } 579 }, y.prototype._getBoundingRect = function () { 580 var t = this.element.getBoundingClientRect(), e = this.size; 581 this._boundingRect = {left: t.left + e.paddingLeft + e.borderLeftWidth, top: t.top + e.paddingTop + e.borderTopWidth, right: t.right - (e.paddingRight + e.borderRightWidth), bottom: t.bottom - (e.paddingBottom + e.borderBottomWidth)} 582 }, y.prototype._manageStamp = u, y.prototype._getElementOffset = function (t) { 583 var e = t.getBoundingClientRect(), i = this._boundingRect, n = d(t), o = {left: e.left - i.left - n.marginLeft, top: e.top - i.top - n.marginTop, right: i.right - e.right - n.marginRight, bottom: i.bottom - e.bottom - n.marginBottom}; 584 return o 585 }, y.prototype.handleEvent = function (t) { 586 var e = "on" + t.type; 587 this[e] && this[e](t) 588 }, y.prototype.bindResize = function () { 589 this.isResizeBound || (i.bind(t, "resize", this), this.isResizeBound = !0) 590 }, y.prototype.unbindResize = function () { 591 i.unbind(t, "resize", this), this.isResizeBound = !1 592 }, y.prototype.onresize = function () { 593 function t() { 594 e.resize(), delete e.resizeTimeout 595 } 596 597 this.resizeTimeout && clearTimeout(this.resizeTimeout); 598 var e = this; 599 this.resizeTimeout = setTimeout(t, 100) 600 }, y.prototype.resize = function () { 601 var t = d(this.element), e = this.size && t; 602 e && t.innerWidth === this.size.innerWidth || this.layout() 603 }, y.prototype.addItems = function (t) { 604 var e = this._itemize(t); 605 return e.length && (this.items = this.items.concat(e)), e 606 }, y.prototype.appended = function (t) { 607 var e = this.addItems(t); 608 e.length && (this.layoutItems(e, !0), this.reveal(e)) 609 }, y.prototype.prepended = function (t) { 610 var e = this._itemize(t); 611 if (e.length) { 612 var i = this.items.slice(0); 613 this.items = e.concat(i), this._resetLayout(), this._manageStamps(), this.layoutItems(e, !0), this.reveal(e), this.layoutItems(i) 614 } 615 }, y.prototype.reveal = function (t) { 616 var e = t && t.length; 617 if (e)for (var i = 0; e > i; i++) { 618 var n = t[i]; 619 n.reveal() 620 } 621 }, y.prototype.hide = function (t) { 622 var e = t && t.length; 623 if (e)for (var i = 0; e > i; i++) { 624 var n = t[i]; 625 n.hide() 626 } 627 }, y.prototype.getItem = function (t) { 628 for (var e = 0, i = this.items.length; i > e; e++) { 629 var n = this.items[e]; 630 if (n.element === t)return n 631 } 632 }, y.prototype.getItems = function (t) { 633 if (t && t.length) { 634 for (var e = [], i = 0, n = t.length; n > i; i++) { 635 var o = t[i], r = this.getItem(o); 636 r && e.push(r) 637 } 638 return e 639 } 640 }, y.prototype.remove = function (t) { 641 t = n(t); 642 var e = this.getItems(t); 643 if (e && e.length) { 644 this._itemsOn(e, "remove", function () { 645 this.emitEvent("removeComplete", [this, e]) 646 }); 647 for (var i = 0, r = e.length; r > i; i++) { 648 var s = e[i]; 649 s.remove(), o(s, this.items) 650 } 651 } 652 }, y.prototype.destroy = function () { 653 var t = this.element.style; 654 t.height = "", t.position = "", t.width = ""; 655 for (var e = 0, i = this.items.length; i > e; e++) { 656 var n = this.items[e]; 657 n.destroy() 658 } 659 this.unbindResize(), delete this.element.outlayerGUID, p && p.removeData(this.element, this.constructor.namespace) 660 }, y.data = function (t) { 661 var e = t && t.outlayerGUID; 662 return e && b[e] 663 }, y.create = function (t, i) { 664 function n() { 665 y.apply(this, arguments) 666 } 667 668 return Object.create ? n.prototype = Object.create(y.prototype) : e(n.prototype, y.prototype), n.prototype.constructor = n, g(n, "options"), e(n.prototype.options, i), n.namespace = t, n.data = y.data, n.Item = function () { 669 m.apply(this, arguments) 670 }, n.Item.prototype = new m, s(function () { 671 for (var e = r(t), i = a.querySelectorAll(".js-" + e), o = "data-" + e + "-options", s = 0, u = i.length; u > s; s++) { 672 var f, c = i[s], d = c.getAttribute(o); 673 try { 674 f = d && JSON.parse(d) 675 } catch (l) { 676 h && h.error("Error parsing " + o + " on " + c.nodeName.toLowerCase() + (c.id ? "#" + c.id : "") + ": " + l); 677 continue 678 } 679 var m = new n(c, f); 680 p && p.data(c, t, m) 681 } 682 }), p && p.bridget && p.bridget(t, n), n 683 }, y.Item = m, y 684 } 685 686 var a = t.document, h = t.console, p = t.jQuery, u = function () { 687 }, f = Object.prototype.toString, c = "object" == typeof HTMLElement ? function (t) { 688 return t instanceof HTMLElement 689 } : function (t) { 690 return t && "object" == typeof t && 1 === t.nodeType && "string" == typeof t.nodeName 691 }, d = Array.prototype.indexOf ? function (t, e) { 692 return t.indexOf(e) 693 } : function (t, e) { 694 for (var i = 0, n = t.length; n > i; i++)if (t[i] === e)return i; 695 return-1 696 }; 697 "function" == typeof define && define.amd ? define("outlayer/outlayer", ["eventie/eventie", "doc-ready/doc-ready", "eventEmitter/EventEmitter", "get-size/get-size", "matches-selector/matches-selector", "./item"], s) : t.Outlayer = s(t.eventie, t.docReady, t.EventEmitter, t.getSize, t.matchesSelector, t.Outlayer.Item) 698}(window), function (t) { 699 function e(t, e) { 700 var n = t.create("masonry"); 701 return n.prototype._resetLayout = function () {
702 this.getSize(), this._getMeasurement("columnWidth", "outerWidth"), this._getMeasurement("gutter", "outerWidth"), this.measureColumns(); 703 var t = this.cols; 704 for (this.colYs = []; t--;)this.colYs.push(0); 705 this.maxY = 0 706 }, n.prototype.measureColumns = function () { 707 if (this.getContainerWidth(), !this.columnWidth) { 708 var t = this.items[0], i = t && t.element; 709 this.columnWidth = i && e(i).outerWidth || this.containerWidth 710 } 711 this.columnWidth += this.gutter, this.cols = Math.floor((this.containerWidth + this.gutter) / this.columnWidth), this.cols = Math.max(this.cols, 1) 712 }, n.prototype.getContainerWidth = function () { 713 var t = this.options.isFitWidth ? this.element.parentNode : this.element, i = e(t); 714 this.containerWidth = i && i.innerWidth 715 }, n.prototype._getItemLayoutPosition = function (t) { 716 t.getSize(); 717 var e = t.size.outerWidth % this.columnWidth, n = e && 1 > e ? "round" : "ceil", o = Math[n](t.size.outerWidth / this.columnWidth); 718 o = Math.min(o, this.cols); 719 for (var r = this._getColGroup(o), s = Math.min.apply(Math, r), a = i(r, s), h = {x: this.columnWidth * a, y: s}, p = s + t.size.outerHeight, u = this.cols + 1 - r.length, f = 0; u > f; f++)this.colYs[a + f] = p; 720 return h 721 }, n.prototype._getColGroup = function (t) { 722 if (2 > t)return this.colYs; 723 for (var e = [], i = this.cols + 1 - t, n = 0; i > n; n++) { 724 var o = this.colYs.slice(n, n + t); 725 e[n] = Math.max.apply(Math, o) 726 } 727 return e 728 }, n.prototype._manageStamp = function (t) { 729 var i = e(t), n = this._getElementOffset(t), o = this.options.isOriginLeft ? n.left : n.right, r = o + i.outerWidth, s = Math.floor(o / this.columnWidth); 730 s = Math.max(0, s); 731 var a = Math.floor(r / this.columnWidth); 732 a -= r % this.columnWidth ? 0 : 1, a = Math.min(this.cols - 1, a); 733 for (var h = (this.options.isOriginTop ? n.top : n.bottom) + i.outerHeight, p = s; a >= p; p++)this.colYs[p] = Math.max(h, this.colYs[p]) 734 }, n.prototype._getContainerSize = function () { 735 this.maxY = Math.max.apply(Math, this.colYs); 736 var t = {height: this.maxY}; 737 return this.options.isFitWidth && (t.width = this._getContainerFitWidth()), t 738 }, n.prototype._getContainerFitWidth = function () { 739 for (var t = 0, e = this.cols; --e && 0 === this.colYs[e];)t++; 740 return(this.cols - t) * this.columnWidth - this.gutter 741 }, n.prototype.resize = function () { 742 var t = this.containerWidth; 743 this.getContainerWidth(), t !== this.containerWidth && this.layout() 744 }, n 745 } 746 747 var i = Array.prototype.indexOf ? function (t, e) { 748 return t.indexOf(e) 749 } : function (t, e) { 750 for (var i = 0, n = t.length; n > i; i++) { 751 var o = t[i]; 752 if (o === e)return i 753 } 754 return-1 755 }; 756 "function" == typeof define && define.amd ? define(["outlayer/outlayer", "get-size/get-size"], e) : t.Masonry = e(t.Outlayer, t.getSize) 757}(window);
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.