/*! * jScroll - jQuery Plugin for Infinite Scrolling / Auto-Paging * @see @link{https://jscroll.com} * * @copyright Philip Klauzinski * @license Dual licensed under the MIT and GPL Version 2 licenses * @author Philip Klauzinski (https://webtopian.com) * @version 2.4.1 * @requires jQuery v1.8.0+ * @preserve */ !function (m) { "use strict"; m.jscroll = { defaults: { debug: !1, autoTrigger: !0, autoTriggerUntil: !1, loadingHtml: "Loading...", loadingFunction: !1, padding: 0, nextSelector: "a:last", contentSelector: "", pagingSelector: "", callback: !1 } }; var l = function (a, t) { var n, e = a.data("jscroll"), l = "function" == typeof t ? {callback: t} : t, s = m.extend({}, m.jscroll.defaults, l, e || {}), d = "visible" === a.css("overflow-y"), o = a.find(s.nextSelector).first(), r = m(window), i = m("body"), f = d ? r : a, c = m.trim(o.prop("href") + " " + s.contentSelector), g = function () { a.find(".jscroll-inner").length || a.contents().wrapAll('
') }, u = function (t) { s.pagingSelector ? t.closest(s.pagingSelector).hide() : t.parent().not(".jscroll-inner,.jscroll-added").addClass("jscroll-next-parent").hide().length || t.wrap('').parent().hide() }, p = function () { return f.unbind(".jscroll").removeData("jscroll").find(".jscroll-inner").children().unwrap().filter(".jscroll-added").children().unwrap() }, j = function () { if (a.is(":visible")) { g(); var t = a.find("div.jscroll-inner").first(), n = a.data("jscroll"), e = parseInt(a.css("borderTopWidth"), 10), l = isNaN(e) ? 0 : e, o = parseInt(a.css("paddingTop"), 10) + l, r = d ? f.scrollTop() : a.offset().top, i = t.length ? t.offset().top : 0, c = Math.ceil(r - i + f.height() + o); if (!n.waiting && c + s.padding >= t.outerHeight()) return b("info", "jScroll:", t.outerHeight() - c, "from bottom. Loading next request..."), v() } }, h = function () { var t = a.find(s.nextSelector).first(); if (t.length) if (s.autoTrigger && (!1 === s.autoTriggerUntil || 0 < s.autoTriggerUntil)) { u(t); var n = i.height() - a.offset().top; (a.height() < n ? a.height() : n) <= (0 < a.offset().top - r.scrollTop() ? r.height() - (a.offset().top - m(window).scrollTop()) : r.height()) && j(), f.unbind(".jscroll").bind("scroll.jscroll", function () { return j() }), 0 < s.autoTriggerUntil && s.autoTriggerUntil-- } else f.unbind(".jscroll"), t.bind("click.jscroll", function () { return u(t), v(), !1 }) }, v = function () { var t = a.find("div.jscroll-inner").first(), r = a.data("jscroll"); return r.waiting = !0, t.append('').children(".jscroll-added").last().html('