/*! * masonry packaged v4.2.2 * cascading grid layout library * https://masonry.desandro.com * mit license * by david desandro */ !function(t, e) { "function" == typeof define && define.amd ? define("jquery-bridget/jquery-bridget", ["jquery"], function(i) { return e(t, i) }) : "object" == typeof module && module.exports ? module.exports = e(t, require("jquery")) : t.jquerybridget = e(t, t.jquery) }(window, function(t, e) { "use strict"; function i(i, r, a) { function h(t, e, n) { var o, r = "$()." + i + '("' + e + '")'; return t.each(function(t, h) { var u = a.data(h, i); if (!u) return void s(i + " not initialized. cannot call methods, i.e. " + r); var d = u[e]; if (!d || "_" == e.charat(0)) return void s(r + " is not a valid method"); var l = d.apply(u, n); o = void 0 === o ? l : o }), void 0 !== o ? o : t } function u(t, e) { t.each(function(t, n) { var o = a.data(n, i); o ? (o.option(e), o._init()) : (o = new r(n,e), a.data(n, i, o)) }) } a = a || e || t.jquery, a && (r.prototype.option || (r.prototype.option = function(t) { a.isplainobject(t) && (this.options = a.extend(!0, this.options, t)) } ), a.fn[i] = function(t) { if ("string" == typeof t) { var e = o.call(arguments, 1); return h(this, t, e) } return u(this, t), this } , n(a)) } function n(t) { !t || t && t.bridget || (t.bridget = i) } var o = array.prototype.slice , r = t.console , s = "undefined" == typeof r ? function() {} : function(t) { r.error(t) } ; return n(e || t.jquery), i }), function(t, e) { "function" == typeof define && define.amd ? define("ev-emitter/ev-emitter", e) : "object" == typeof module && module.exports ? module.exports = e() : t.evemitter = e() }("undefined" != typeof window ? window : this, function() { function t() {} var e = t.prototype; return e.on = function(t, e) { if (t && e) { var i = this._events = this._events || {} , n = i[t] = i[t] || []; return -1 == n.indexof(e) && n.push(e), this } } , e.once = function(t, e) { if (t && e) { this.on(t, e); var i = this._onceevents = this._onceevents || {} , n = i[t] = i[t] || {}; return n[e] = !0, this } } , e.off = function(t, e) { var i = this._events && this._events[t]; if (i && i.length) { var n = i.indexof(e); return -1 != n && i.splice(n, 1), this } } , e.emitevent = function(t, e) { var i = this._events && this._events[t]; if (i && i.length) { i = i.slice(0), e = e || []; for (var n = this._onceevents && this._onceevents[t], o = 0; o < i.length; o++) { var r = i[o] , s = n && n[r]; s && (this.off(t, r), delete n[r]), r.apply(this, e) } return this } } , e.alloff = function() { delete this._events, delete this._onceevents } , t }), function(t, e) { "function" == typeof define && define.amd ? define("get-size/get-size", e) : "object" == typeof module && module.exports ? module.exports = e() : t.getsize = e() }(window, function() { "use strict"; function t(t) { var e = parsefloat(t) , i = -1 == t.indexof("%") && !isnan(e); return i && e } function e() {} function i() { for (var t = { width: 0, height: 0, innerwidth: 0, innerheight: 0, outerwidth: 0, outerheight: 0 }, e = 0; u > e; e++) { var i = h[e]; t[i] = 0 } return t } function n(t) { var e = getcomputedstyle(t); return e || a("style returned " + e + ". are you running this code in a hidden iframe on firefox? see https://bit.ly/getsizebug1"), e } function o() { if (!d) { d = !0; var e = document.createelement("div"); e.style.width = "200px", e.style.padding = "1px 2px 3px 4px", e.style.borderstyle = "solid", e.style.borderwidth = "1px 2px 3px 4px", e.style.boxsizing = "border-box"; var i = document.body || document.documentelement; i.appendchild(e); var o = n(e); s = 200 == math.round(t(o.width)), r.isboxsizeouter = s, i.removechild(e) } } function r(e) { if (o(), "string" == typeof e && (e = document.queryselector(e)), e && "object" == typeof e && e.nodetype) { var r = n(e); if ("none" == r.display) return i(); var a = {}; a.width = e.offsetwidth, a.height = e.offsetheight; for (var d = a.isborderbox = "border-box" == r.boxsizing, l = 0; u > l; l++) { var c = h[l] , f = r[c] , m = parsefloat(f); a[c] = isnan(m) ? 0 : m } var p = a.paddingleft + a.paddingright , g = a.paddingtop + a.paddingbottom , y = a.marginleft + a.marginright , v = a.margintop + a.marginbottom , _ = a.borderleftwidth + a.borderrightwidth , z = a.bordertopwidth + a.borderbottomwidth , e = d && s , b = t(r.width); b !== !1 && (a.width = b + (e ? 0 : p + _)); var x = t(r.height); return x !== !1 && (a.height = x + (e ? 0 : g + z)), a.innerwidth = a.width - (p + _), a.innerheight = a.height - (g + z), a.outerwidth = a.width + y, a.outerheight = a.height + v, a } } var s, a = "undefined" == typeof console ? e : function(t) { console.error(t) } , h = ["paddingleft", "paddingright", "paddingtop", "paddingbottom", "marginleft", "marginright", "margintop", "marginbottom", "borderleftwidth", "borderrightwidth", "bordertopwidth", "borderbottomwidth"], u = h.length, d = !1; return r }), function(t, e) { "use strict"; "function" == typeof define && define.amd ? define("desandro-matches-selector/matches-selector", e) : "object" == typeof module && module.exports ? module.exports = e() : t.matchesselector = e() }(window, function() { "use strict"; var t = function() { var t = window.element.prototype; if (t.matches) return "matches"; if (t.matchesselector) return "matchesselector"; for (var e = ["webkit", "moz", "ms", "o"], i = 0; i < e.length; i++) { var n = e[i] , o = n + "matchesselector"; if (t[o]) return o } }(); return function(e, i) { return e[t](i) } }), function(t, e) { "function" == typeof define && define.amd ? define("fizzy-ui-utils/utils", ["desandro-matches-selector/matches-selector"], function(i) { return e(t, i) }) : "object" == typeof module && module.exports ? module.exports = e(t, require("desandro-matches-selector")) : t.fizzyuiutils = e(t, t.matchesselector) }(window, function(t, e) { var i = {}; i.extend = function(t, e) { for (var i in e) t[i] = e[i]; return t } , i.modulo = function(t, e) { return (t % e + e) % e } ; var n = array.prototype.slice; i.makearray = function(t) { if (array.isarray(t)) return t; if (null === t || void 0 === t) return []; var e = "object" == typeof t && "number" == typeof t.length; return e ? n.call(t) : [t] } , i.removefrom = function(t, e) { var i = t.indexof(e); -1 != i && t.splice(i, 1) } , i.getparent = function(t, i) { for (; t.parentnode && t != document.body; ) if (t = t.parentnode, e(t, i)) return t } , i.getqueryelement = function(t) { return "string" == typeof t ? document.queryselector(t) : t } , i.handleevent = function(t) { var e = "on" + t.type; this[e] && this[e](t) } , i.filterfindelements = function(t, n) { t = i.makearray(t); var o = []; return t.foreach(function(t) { if (t instanceof htmlelement) { if (!n) return void o.push(t); e(t, n) && o.push(t); for (var i = t.queryselectorall(n), r = 0; r < i.length; r++) o.push(i[r]) } }), o } , i.debouncemethod = function(t, e, i) { i = i || 100; var n = t.prototype[e] , o = e + "timeout"; t.prototype[e] = function() { var t = this[o]; cleartimeout(t); var e = arguments , r = this; this[o] = settimeout(function() { n.apply(r, e), delete r[o] }, i) } } , i.docready = function(t) { var e = document.readystate; "complete" == e || "interactive" == e ? settimeout(t) : document.addeventlistener("domcontentloaded", t) } , i.todashed = function(t) { return t.replace(/(.)([a-z])/g, function(t, e, i) { return e + "-" + i }).tolowercase() } ; var o = t.console; return i.htmlinit = function(e, n) { i.docready(function() { var r = i.todashed(n) , s = "data-" + r , a = document.queryselectorall("[" + s + "]") , h = document.queryselectorall(".js-" + r) , u = i.makearray(a).concat(i.makearray(h)) , d = s + "-options" , l = t.jquery; u.foreach(function(t) { var i, r = t.getattribute(s) || t.getattribute(d); try { i = r && json.parse(r) } catch (a) { return void (o && o.error("error parsing " + s + " on " + t.classname + ": " + a)) } var h = new e(t,i); l && l.data(t, n, h) }) }) } , i }), function(t, e) { "function" == typeof define && define.amd ? define("outlayer/item", ["ev-emitter/ev-emitter", "get-size/get-size"], e) : "object" == typeof module && module.exports ? module.exports = e(require("ev-emitter"), require("get-size")) : (t.outlayer = {}, t.outlayer.item = e(t.evemitter, t.getsize)) }(window, function(t, e) { "use strict"; function i(t) { for (var e in t) return !1; return e = null, !0 } function n(t, e) { t && (this.element = t, this.layout = e, this.position = { x: 0, y: 0 }, this._create()) } function o(t) { return t.replace(/([a-z])/g, function(t) { return "-" + t.tolowercase() }) } var r = document.documentelement.style , s = "string" == typeof r.transition ? "transition" : "webkittransition" , a = "string" == typeof r.transform ? "transform" : "webkittransform" , h = { webkittransition: "webkittransitionend", transition: "transitionend" }[s] , u = { transform: a, transition: s, transitionduration: s + "duration", transitionproperty: s + "property", transitiondelay: s + "delay" } , d = n.prototype = object.create(t.prototype); d.constructor = n, d._create = function() { this._transn = { ingproperties: {}, clean: {}, onend: {} }, this.css({ position: "absolute" }) } , d.handleevent = function(t) { var e = "on" + t.type; this[e] && this[e](t) } , d.getsize = function() { this.size = e(this.element) } , d.css = function(t) { var e = this.element.style; for (var i in t) { var n = u[i] || i; e[n] = t[i] } } , d.getposition = function() { var t = getcomputedstyle(this.element) , e = this.layout._getoption("originleft") , i = this.layout._getoption("origintop") , n = t[e ? "left" : "right"] , o = t[i ? "top" : "bottom"] , r = parsefloat(n) , s = parsefloat(o) , a = this.layout.size; -1 != n.indexof("%") && (r = r / 100 * a.width), -1 != o.indexof("%") && (s = s / 100 * a.height), r = isnan(r) ? 0 : r, s = isnan(s) ? 0 : s, r -= e ? a.paddingleft : a.paddingright, s -= i ? a.paddingtop : a.paddingbottom, this.position.x = r, this.position.y = s } , d.layoutposition = function() { var t = this.layout.size , e = {} , i = this.layout._getoption("originleft") , n = this.layout._getoption("origintop") , o = i ? "paddingleft" : "paddingright" , r = i ? "left" : "right" , s = i ? "right" : "left" , a = this.position.x + t[o]; e[r] = this.getxvalue(a), e[s] = ""; var h = n ? "paddingtop" : "paddingbottom" , u = n ? "top" : "bottom" , d = n ? "bottom" : "top" , l = this.position.y + t[h]; e[u] = this.getyvalue(l), e[d] = "", this.css(e), this.emitevent("layout", [this]) } , d.getxvalue = function(t) { var e = this.layout._getoption("horizontal"); return this.layout.options.percentposition && !e ? t / this.layout.size.width * 100 + "%" : t + "px" } , d.getyvalue = function(t) { var e = this.layout._getoption("horizontal"); return this.layout.options.percentposition && e ? t / this.layout.size.height * 100 + "%" : t + "px" } , d._transitionto = function(t, e) { this.getposition(); var i = this.position.x , n = this.position.y , o = t == this.position.x && e == this.position.y; if (this.setposition(t, e), o && !this.istransitioning) return void this.layoutposition(); var r = t - i , s = e - n , a = {}; a.transform = this.gettranslate(r, s), this.transition({ to: a, ontransitionend: { transform: this.layoutposition }, iscleaning: !0 }) } , d.gettranslate = function(t, e) { var i = this.layout._getoption("originleft") , n = this.layout._getoption("origintop"); return t = i ? t : -t, e = n ? e : -e, "translate3d(" + t + "px, " + e + "px, 0)" } , d.goto = function(t, e) { this.setposition(t, e), this.layoutposition() } , d.moveto = d._transitionto, d.setposition = function(t, e) { this.position.x = parsefloat(t), this.position.y = parsefloat(e) } , d._nontransition = function(t) { this.css(t.to), t.iscleaning && this._removestyles(t.to); for (var e in t.ontransitionend) t.ontransitionend[e].call(this) } , d.transition = function(t) { if (!parsefloat(this.layout.options.transitionduration)) return void this._nontransition(t); var e = this._transn; for (var i in t.ontransitionend) e.onend[i] = t.ontransitionend[i]; for (i in t.to) e.ingproperties[i] = !0, t.iscleaning && (e.clean[i] = !0); if (t.from) { this.css(t.from); var n = this.element.offsetheight; n = null } this.enabletransition(t.to), this.css(t.to), this.istransitioning = !0 } ; var l = "opacity," + o(a); d.enabletransition = function() { if (!this.istransitioning) { var t = this.layout.options.transitionduration; t = "number" == typeof t ? t + "ms" : t, this.css({ transitionproperty: l, transitionduration: t, transitiondelay: this.staggerdelay || 0 }), this.element.addeventlistener(h, this, !1) } } , d.onwebkittransitionend = function(t) { this.ontransitionend(t) } , d.onotransitionend = function(t) { this.ontransitionend(t) } ; var c = { "-webkit-transform": "transform" }; d.ontransitionend = function(t) { if (t.target === this.element) { var e = this._transn , n = c[t.propertyname] || t.propertyname; 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) { var o = e.onend[n]; o.call(this), delete e.onend[n] } this.emitevent("transitionend", [this]) } } , d.disabletransition = function() { this.removetransitionstyles(), this.element.removeeventlistener(h, this, !1), this.istransitioning = !1 } , d._removestyles = function(t) { var e = {}; for (var i in t) e[i] = ""; this.css(e) } ; var f = { transitionproperty: "", transitionduration: "", transitiondelay: "" }; return d.removetransitionstyles = function() { this.css(f) } , d.stagger = function(t) { t = isnan(t) ? 0 : t, this.staggerdelay = t + "ms" } , d.removeelem = function() { this.element.parentnode.removechild(this.element), this.css({ display: "" }), this.emitevent("remove", [this]) } , d.remove = function() { return s && parsefloat(this.layout.options.transitionduration) ? (this.once("transitionend", function() { this.removeelem() }), void this.hide()) : void this.removeelem() } , d.reveal = function() { delete this.ishidden, this.css({ display: "" }); var t = this.layout.options , e = {} , i = this.gethiderevealtransitionendproperty("visiblestyle"); e[i] = this.onrevealtransitionend, this.transition({ from: t.hiddenstyle, to: t.visiblestyle, iscleaning: !0, ontransitionend: e }) } , d.onrevealtransitionend = function() { this.ishidden || this.emitevent("reveal") } , d.gethiderevealtransitionendproperty = function(t) { var e = this.layout.options[t]; if (e.opacity) return "opacity"; for (var i in e) return i } , d.hide = function() { this.ishidden = !0, this.css({ display: "" }); var t = this.layout.options , e = {} , i = this.gethiderevealtransitionendproperty("hiddenstyle"); e[i] = this.onhidetransitionend, this.transition({ from: t.visiblestyle, to: t.hiddenstyle, iscleaning: !0, ontransitionend: e }) } , d.onhidetransitionend = function() { this.ishidden && (this.css({ display: "none" }), this.emitevent("hide")) } , d.destroy = function() { this.css({ position: "", left: "", right: "", top: "", bottom: "", transition: "", transform: "" }) } , n }), function(t, e) { "use strict"; "function" == typeof define && define.amd ? define("outlayer/outlayer", ["ev-emitter/ev-emitter", "get-size/get-size", "fizzy-ui-utils/utils", "./item"], function(i, n, o, r) { return e(t, i, n, o, r) }) : "object" == typeof module && module.exports ? module.exports = e(t, require("ev-emitter"), require("get-size"), require("fizzy-ui-utils"), require("./item")) : t.outlayer = e(t, t.evemitter, t.getsize, t.fizzyuiutils, t.outlayer.item) }(window, function(t, e, i, n, o) { "use strict"; function r(t, e) { var i = n.getqueryelement(t); if (!i) return void (h && h.error("bad element for " + this.constructor.namespace + ": " + (i || t))); this.element = i, u && (this.$element = u(this.element)), this.options = n.extend({}, this.constructor.defaults), this.option(e); var o = ++l; this.element.outlayerguid = o, c[o] = this, this._create(); var r = this._getoption("initlayout"); r && this.layout() } function s(t) { function e() { t.apply(this, arguments) } return e.prototype = object.create(t.prototype), e.prototype.constructor = e, e } function a(t) { if ("number" == typeof t) return t; var e = t.match(/(^\d*\.?\d*)(\w*)/) , i = e && e[1] , n = e && e[2]; if (!i.length) return 0; i = parsefloat(i); var o = m[n] || 1; return i * o } var h = t.console , u = t.jquery , d = function() {} , l = 0 , c = {}; r.namespace = "outlayer", r.item = o, r.defaults = { containerstyle: { position: "relative" }, initlayout: !0, originleft: !0, origintop: !0, resize: !0, resizecontainer: !0, transitionduration: "0.4s", hiddenstyle: { opacity: 0, transform: "scale(0.001)" }, visiblestyle: { opacity: 1, transform: "scale(1)" } }; var f = r.prototype; n.extend(f, e.prototype), f.option = function(t) { n.extend(this.options, t) } , f._getoption = function(t) { var e = this.constructor.compatoptions[t]; return e && void 0 !== this.options[e] ? this.options[e] : this.options[t] } , r.compatoptions = { initlayout: "isinitlayout", horizontal: "ishorizontal", layoutinstant: "islayoutinstant", originleft: "isoriginleft", origintop: "isorigintop", resize: "isresizebound", resizecontainer: "isresizingcontainer" }, f._create = function() { this.reloaditems(), this.stamps = [], this.stamp(this.options.stamp), n.extend(this.element.style, this.options.containerstyle); var t = this._getoption("resize"); t && this.bindresize() } , f.reloaditems = function() { this.items = this._itemize(this.element.children) } , f._itemize = function(t) { for (var e = this._filterfinditemelements(t), i = this.constructor.item, n = [], o = 0; o < e.length; o++) { var r = e[o] , s = new i(r,this); n.push(s) } return n } , f._filterfinditemelements = function(t) { return n.filterfindelements(t, this.options.itemselector) } , f.getitemelements = function() { return this.items.map(function(t) { return t.element }) } , f.layout = function() { this._resetlayout(), this._managestamps(); var t = this._getoption("layoutinstant") , e = void 0 !== t ? t : !this._islayoutinited; this.layoutitems(this.items, e), this._islayoutinited = !0 } , f._init = f.layout, f._resetlayout = function() { this.getsize() } , f.getsize = function() { this.size = i(this.element) } , f._getmeasurement = function(t, e) { var n, o = this.options[t]; o ? ("string" == typeof o ? n = this.element.queryselector(o) : o instanceof htmlelement && (n = o), this[t] = n ? i(n)[e] : o) : this[t] = 0 } , f.layoutitems = function(t, e) { t = this._getitemsforlayout(t), this._layoutitems(t, e), this._postlayout() } , f._getitemsforlayout = function(t) { return t.filter(function(t) { return !t.isignored }) } , f._layoutitems = function(t, e) { if (this._emitcompleteonitems("layout", t), t && t.length) { var i = []; t.foreach(function(t) { var n = this._getitemlayoutposition(t); n.item = t, n.isinstant = e || t.islayoutinstant, i.push(n) }, this), this._processlayoutqueue(i) } } , f._getitemlayoutposition = function() { return { x: 0, y: 0 } } , f._processlayoutqueue = function(t) { this.updatestagger(), t.foreach(function(t, e) { this._positionitem(t.item, t.x, t.y, t.isinstant, e) }, this) } , f.updatestagger = function() { var t = this.options.stagger; return null === t || void 0 === t ? void (this.stagger = 0) : (this.stagger = a(t), this.stagger) } , f._positionitem = function(t, e, i, n, o) { n ? t.goto(e, i) : (t.stagger(o * this.stagger), t.moveto(e, i)) } , f._postlayout = function() { this.resizecontainer() } , f.resizecontainer = function() { var t = this._getoption("resizecontainer"); if (t) { var e = this._getcontainersize(); e && (this._setcontainermeasure(e.width, !0), this._setcontainermeasure(e.height, !1)) } } , f._getcontainersize = d, f._setcontainermeasure = function(t, e) { if (void 0 !== t) { var i = this.size; 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" } } , f._emitcompleteonitems = function(t, e) { function i() { o.dispatchevent(t + "complete", null, [e]) } function n() { s++, s == r && i() } var o = this , r = e.length; if (!e || !r) return void i(); var s = 0; e.foreach(function(e) { e.once(t, n) }) } , f.dispatchevent = function(t, e, i) { var n = e ? [e].concat(i) : i; if (this.emitevent(t, n), u) if (this.$element = this.$element || u(this.element), e) { var o = u.event(e); o.type = t, this.$element.trigger(o, i) } else this.$element.trigger(t, i) } , f.ignore = function(t) { var e = this.getitem(t); e && (e.isignored = !0) } , f.unignore = function(t) { var e = this.getitem(t); e && delete e.isignored } , f.stamp = function(t) { t = this._find(t), t && (this.stamps = this.stamps.concat(t), t.foreach(this.ignore, this)) } , f.unstamp = function(t) { t = this._find(t), t && t.foreach(function(t) { n.removefrom(this.stamps, t), this.unignore(t) }, this) } , f._find = function(t) { return t ? ("string" == typeof t && (t = this.element.queryselectorall(t)), t = n.makearray(t)) : void 0 } , f._managestamps = function() { this.stamps && this.stamps.length && (this._getboundingrect(), this.stamps.foreach(this._managestamp, this)) } , f._getboundingrect = function() { var t = this.element.getboundingclientrect() , e = this.size; 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) } } , f._managestamp = d, f._getelementoffset = function(t) { var e = t.getboundingclientrect() , n = this._boundingrect , o = i(t) , r = { left: e.left - n.left - o.marginleft, top: e.top - n.top - o.margintop, right: n.right - e.right - o.marginright, bottom: n.bottom - e.bottom - o.marginbottom }; return r } , f.handleevent = n.handleevent, f.bindresize = function() { t.addeventlistener("resize", this), this.isresizebound = !0 } , f.unbindresize = function() { t.removeeventlistener("resize", this), this.isresizebound = !1 } , f.onresize = function() { this.resize() } , n.debouncemethod(r, "onresize", 100), f.resize = function() { this.isresizebound && this.needsresizelayout() && this.layout() } , f.needsresizelayout = function() { var t = i(this.element) , e = this.size && t; return e && t.innerwidth !== this.size.innerwidth } , f.additems = function(t) { var e = this._itemize(t); return e.length && (this.items = this.items.concat(e)), e } , f.appended = function(t) { var e = this.additems(t); e.length && (this.layoutitems(e, !0), this.reveal(e)) } , f.prepended = function(t) { var e = this._itemize(t); if (e.length) { var i = this.items.slice(0); this.items = e.concat(i), this._resetlayout(), this._managestamps(), this.layoutitems(e, !0), this.reveal(e), this.layoutitems(i) } } , f.reveal = function(t) { if (this._emitcompleteonitems("reveal", t), t && t.length) { var e = this.updatestagger(); t.foreach(function(t, i) { t.stagger(i * e), t.reveal() }) } } , f.hide = function(t) { if (this._emitcompleteonitems("hide", t), t && t.length) { var e = this.updatestagger(); t.foreach(function(t, i) { t.stagger(i * e), t.hide() }) } } , f.revealitemelements = function(t) { var e = this.getitems(t); this.reveal(e) } , f.hideitemelements = function(t) { var e = this.getitems(t); this.hide(e) } , f.getitem = function(t) { for (var e = 0; e < this.items.length; e++) { var i = this.items[e]; if (i.element == t) return i } } , f.getitems = function(t) { t = n.makearray(t); var e = []; return t.foreach(function(t) { var i = this.getitem(t); i && e.push(i) }, this), e } , f.remove = function(t) { var e = this.getitems(t); this._emitcompleteonitems("remove", e), e && e.length && e.foreach(function(t) { t.remove(), n.removefrom(this.items, t) }, this) } , f.destroy = function() { var t = this.element.style; t.height = "", t.position = "", t.width = "", this.items.foreach(function(t) { t.destroy() }), this.unbindresize(); var e = this.element.outlayerguid; delete c[e], delete this.element.outlayerguid, u && u.removedata(this.element, this.constructor.namespace) } , r.data = function(t) { t = n.getqueryelement(t); var e = t && t.outlayerguid; return e && c[e] } , r.create = function(t, e) { var i = s(r); return i.defaults = n.extend({}, r.defaults), n.extend(i.defaults, e), i.compatoptions = n.extend({}, r.compatoptions), i.namespace = t, i.data = r.data, i.item = s(o), n.htmlinit(i, t), u && u.bridget && u.bridget(t, i), i } ; var m = { ms: 1, s: 1e3 }; return r.item = o, r }), function(t, e) { "function" == typeof define && define.amd ? define(["outlayer/outlayer", "get-size/get-size"], e) : "object" == typeof module && module.exports ? module.exports = e(require("outlayer"), require("get-size")) : t.masonry = e(t.outlayer, t.getsize) }(window, function(t, e) { var i = t.create("masonry"); i.compatoptions.fitwidth = "isfitwidth"; var n = i.prototype; return n._resetlayout = function() { this.getsize(), this._getmeasurement("columnwidth", "outerwidth"), this._getmeasurement("gutter", "outerwidth"), this.measurecolumns(), this.colys = []; for (var t = 0; t < this.cols; t++) this.colys.push(0); this.maxy = 0, this.horizontalcolindex = 0 } , n.measurecolumns = function() { if (this.getcontainerwidth(), !this.columnwidth) { var t = this.items[0] , i = t && t.element; this.columnwidth = i && e(i).outerwidth || this.containerwidth } var n = this.columnwidth += this.gutter , o = this.containerwidth + this.gutter , r = o / n , s = n - o % n , a = s && 1 > s ? "round" : "floor"; r = math[a](r), this.cols = math.max(r, 1) } , n.getcontainerwidth = function() { var t = this._getoption("fitwidth") , i = t ? this.element.parentnode : this.element , n = e(i); this.containerwidth = n && n.innerwidth } , n._getitemlayoutposition = function(t) { t.getsize(); var e = t.size.outerwidth % this.columnwidth , i = e && 1 > e ? "round" : "ceil" , n = math[i](t.size.outerwidth / this.columnwidth); n = math.min(n, this.cols); for (var o = this.options.horizontalorder ? "_gethorizontalcolposition" : "_gettopcolposition", r = this[o](n, t), s = { x: this.columnwidth * r.col, y: r.y }, a = r.y + t.size.outerheight, h = n + r.col, u = r.col; h > u; u++) this.colys[u] = a; return s } , n._gettopcolposition = function(t) { var e = this._gettopcolgroup(t) , i = math.min.apply(math, e); return { col: e.indexof(i), y: i } } , n._gettopcolgroup = function(t) { if (2 > t) return this.colys; for (var e = [], i = this.cols + 1 - t, n = 0; i > n; n++) e[n] = this._getcolgroupy(n, t); return e } , n._getcolgroupy = function(t, e) { if (2 > e) return this.colys[t]; var i = this.colys.slice(t, t + e); return math.max.apply(math, i) } , n._gethorizontalcolposition = function(t, e) { var i = this.horizontalcolindex % this.cols , n = t > 1 && i + t > this.cols; i = n ? 0 : i; var o = e.size.outerwidth && e.size.outerheight; return this.horizontalcolindex = o ? i + t : this.horizontalcolindex, { col: i, y: this._getcolgroupy(i, t) } } , n._managestamp = function(t) { var i = e(t) , n = this._getelementoffset(t) , o = this._getoption("originleft") , r = o ? n.left : n.right , s = r + i.outerwidth , a = math.floor(r / this.columnwidth); a = math.max(0, a); var h = math.floor(s / this.columnwidth); h -= s % this.columnwidth ? 0 : 1, h = math.min(this.cols - 1, h); for (var u = this._getoption("origintop"), d = (u ? n.top : n.bottom) + i.outerheight, l = a; h >= l; l++) this.colys[l] = math.max(d, this.colys[l]) } , n._getcontainersize = function() { this.maxy = math.max.apply(math, this.colys); var t = { height: this.maxy }; return this._getoption("fitwidth") && (t.width = this._getcontainerfitwidth()), t } , n._getcontainerfitwidth = function() { for (var t = 0, e = this.cols; --e && 0 === this.colys[e]; ) t++; return (this.cols - t) * this.columnwidth - this.gutter } , n.needsresizelayout = function() { var t = this.containerwidth; return this.getcontainerwidth(), t != this.containerwidth } , i });