PageSourceSearch

https://www.auctioneers.org/app/themes/is-auctioneers.org/assets/js/waypoints.min.js

js auctioneers.org collected 2026-10-03 17:34:17 UTC 12,655 bytes, 395 lines download raw bytes

vendor: 12,655 bytes, lines 1-395
1(function() {
2  var t = [].indexOf || function(t2) {
3    for (var e2 = 0, n = this.length; e2 < n; e2++) {
4      if (e2 in this && this[e2] === t2) return e2;
5    }
6    return -1;
7  }, e = [].slice;
8  (function(t2, e2) {
9    if (typeof define === "function" && define.amd) {
10      return define("waypoints", ["jquery"], function(n) {
11        return e2(n, t2);
12      });
13    } else {
14      return e2(t2.jQuery, t2);
15    }
16  })(this, function(n, r) {
17    var i, o, l, s, f, u, a, c, h, d, p, y, v, w, g, m;
18    i = n(r);
19    c = t.call(r, "ontouchstart") >= 0;
20    s = { horizontal: {}, vertical: {} };
21    f = 1;
22    a = {};
23    u = "waypoints-context-id";
24    p = "resize.waypoints";
25    y = "scroll.waypoints";
26    v = 1;
27    w = "waypoints-waypoint-ids";
28    g = "waypoint";
29    m = "waypoints";
30    o = (function() {
31      function t2(t3) {
32        var e2 = this;
33        this.$element = t3;
34        this.element = t3[0];
35        this.didResize = false;
36        this.didScroll = false;
37        this.id = "context" + f++;
38        this.oldScroll = { x: t3.scrollLeft(), y: t3.scrollTop() };
39        this.waypoints = { horizontal: {}, vertical: {} };
40        t3.data(u, this.id);
41        a[this.id] = this;
42        t3.bind(y, function() {
43          var t4;
44          if (!(e2.didScroll || c)) {
45            e2.didScroll = true;
46            t4 = function() {
47              e2.doScroll();
48              return e2.didScroll = false;
49            };
50            return r.setTimeout(t4, n[m].settings.scrollThrottle);
51          }
52        });
53        t3.bind(p, function() {
54          var t4;
55          if (!e2.didResize) {
56            e2.didResize = true;
57            t4 = function() {
58              n[m]("refresh");
59              return e2.didResize = false;
60            };
61            return r.setTimeout(t4, n[m].settings.resizeThrottle);
62          }
63        });
64      }
65      t2.prototype.doScroll = function() {
66        var t3, e2 = this;
67        t3 = { horizontal: { newScroll: this.$element.scrollLeft(), oldScroll: this.oldScroll.x, forward: "right", backward: "left" }, vertical: { newScroll: this.$element.scrollTop(), oldScroll: this.oldScroll.y, forward: "down", backward: "up" } };
68        if (c && (!t3.vertical.oldScroll || !t3.vertical.newScroll)) {
69          n[m]("refresh");
70        }
71        n.each(t3, function(t4, r2) {
72          var i2, o2, l2;
73          l2 = [];
74          o2 = r2.newScroll > r2.oldScroll;
75          i2 = o2 ? r2.forward : r2.backward;
76          n.each(e2.waypoints[t4], function(t5, e3) {
77            var n2, i3;
78            if (r2.oldScroll < (n2 = e3.offset) && n2 <= r2.newScroll) {
79              return l2.push(e3);
80            } else if (r2.newScroll < (i3 = e3.offset) && i3 <= r2.oldScroll) {
81              return l2.push(e3);
82            }
83          });
84          l2.sort(function(t5, e3) {
85            return t5.offset - e3.offset;
86          });
87          if (!o2) {
88            l2.reverse();
89          }
90          return n.each(l2, function(t5, e3) {
91            if (e3.options.continuous || t5 === l2.length - 1) {
92              return e3.trigger([i2]);
93            }
94          });
95        });
96        return this.oldScroll = { x: t3.horizontal.newScroll, y: t3.vertical.newScroll };
97      };
98      t2.prototype.refresh = function() {
99        var t3, e2, r2, i2 = this;
100        r2 = n.isWindow(this.element);
101        e2 = this.$element.offset();
102        this.doScroll();
103        t3 = { horizontal: { contextOffset: r2 ? 0 : e2.left, contextScroll: r2 ? 0 : this.oldScroll.x, contextDimension: this.$element.width(), oldScroll: this.oldScroll.x, forward: "right", backward: "left", offsetProp: "left" }, vertical: { contextOffset: r2 ? 0 : e2.top, contextScroll: r2 ? 0 : this.oldScroll.y, contextDimension: r2 ? n[m]("viewportHeight") : this.$element.height(), oldScroll: this.oldScroll.y, forward: "down", backward: "up", offsetProp: "top" } };
104        return n.each(t3, function(t4, e3) {
105          return n.each(i2.waypoints[t4], function(t5, r3) {
106            var i3, o2, l2, s2, f2;
107            i3 = r3.options.offset;
108            l2 = r3.offset;
109            o2 = n.isWindow(r3.element) ? 0 : r3.$element.offset()[e3.offsetProp];
110            if (n.isFunction(i3)) {
111              i3 = i3.apply(r3.element);
112            } else if (typeof i3 === "string") {
113              i3 = parseFloat(i3);
114              if (r3.options.offset.indexOf("%") > -1) {
115                i3 = Math.ceil(e3.contextDimension * i3 / 100);
116              }
117            }
118            r3.offset = o2 - e3.contextOffset + e3.contextScroll - i3;
119            if (r3.options.onlyOnScroll && l2 != null || !r3.enabled) {
120              return;
121            }
122            if (l2 !== null && l2 < (s2 = e3.oldScroll) && s2 <= r3.offset) {
123              return r3.trigger([e3.backward]);
124            } else if (l2 !== null && l2 > (f2 = e3.oldScroll) && f2 >= r3.offset) {
125              return r3.trigger([e3.forward]);
126            } else if (l2 === null && e3.oldScroll >= r3.offset) {
127              return r3.trigger([e3.forward]);
128            }
129          });
130        });
131      };
132      t2.prototype.checkEmpty = function() {
133        if (n.isEmptyObject(this.waypoints.horizontal) && n.isEmptyObject(this.waypoints.vertical)) {
134          this.$element.unbind([p, y].join(" "));
135          return delete a[this.id];
136        }
137      };
138      return t2;
139    })();
140    l = (function() {
141      function t2(t3, e2, r2) {
142        var i2, o2;
143        r2 = n.extend({}, n.fn[g].defaults, r2);
144        if (r2.offset === "bottom-in-view") {
145          r2.offset = function() {
146            var t4;
147            t4 = n[m]("viewportHeight");
148            if (!n.isWindow(e2.element)) {
149              t4 = e2.$element.height();
150            }
151            return t4 - n(this).outerHeight();
152          };
153        }
154        this.$element = t3;
155        this.element = t3[0];
156        this.axis = r2.horizontal ? "horizontal" : "vertical";
157        this.callback = r2.handler;
158        this.context = e2;
159        this.enabled = r2.enabled;
160        this.id = "waypoints" + v++;
161        this.offset = null;
162        this.options = r2;
163        e2.waypoints[this.axis][this.id] = this;
164        s[this.axis][this.id] = this;
165        i2 = (o2 = t3.data(w)) != null ? o2 : [];
166        i2.push(this.id);
167        t3.data(w, i2);
168      }
169      t2.prototype.trigger = function(t3) {
170        if (!this.enabled) {
171          return;
172        }
173        if (this.callback != null) {
174          this.callback.apply(this.element, t3);
175        }
176        if (this.options.triggerOnce) {
177          return this.destroy();
178        }
179      };
180      t2.prototype.disable = function() {
181        return this.enabled = false;
182      };
183      t2.prototype.enable = function() {
184        this.context.refresh();
185        return this.enabled = true;
186      };
187      t2.prototype.destroy = function() {
188        delete s[this.axis][this.id];
189        delete this.context.waypoints[this.axis][this.id];
190        return this.context.checkEmpty();
191      };
192      t2.getWaypointsByElement = function(t3) {
193        var e2, r2;
194        r2 = n(t3).data(w);
195        if (!r2) {
196          return [];
197        }
198        e2 = n.extend({}, s.horizontal, s.vertical);
199        return n.map(r2, function(t4) {
200          return e2[t4];
201        });
202      };
203      return t2;
204    })();
205    d = { init: function(t2, e2) {
206      if (e2 == null) {
207        e2 = {};
208      }
209      if (e2.handler == null) {
210        e2.handler = t2;
211      }
212      this.each(function() {
213        var t3, r2, i2, s2;
214        t3 = n(this);
215        i2 = (s2 = e2.context) != null ? s2 : n.fn[g].defaults.context;
216        if (!n.isWindow(i2)) {
217          i2 = t3.closest(i2);
218        }
219        i2 = n(i2);
220        r2 = a[i2.data(u)];
221        if (!r2) {
222          r2 = new o(i2);
223        }
224        return new l(t3, r2, e2);
225      });
226      n[m]("refresh");
227      return this;
228    }, disable: function() {
229      return d._invoke(this, "disable");
230    }, enable: function() {
231      return d._invoke(this, "enable");
232    }, destroy: function() {
233      return d._invoke(this, "destroy");
234    }, prev: function(t2, e2) {
235      return d._traverse.call(this, t2, e2, function(t3, e3, n2) {
236        if (e3 > 0) {
237          return t3.push(n2[e3 - 1]);
238        }
239      });
240    }, next: function(t2, e2) {
241      return d._traverse.call(this, t2, e2, function(t3, e3, n2) {
242        if (e3 < n2.length - 1) {
243          return t3.push(n2[e3 + 1]);
244        }
245      });
246    }, _traverse: function(t2, e2, i2) {
247      var o2, l2;
248      if (t2 == null) {
249        t2 = "vertical";
250      }
251      if (e2 == null) {
252        e2 = r;
253      }
254      l2 = h.aggregate(e2);
255      o2 = [];
256      this.each(function() {
257        var e3;
258        e3 = n.inArray(this, l2[t2]);
259        return i2(o2, e3, l2[t2]);
260      });
261      return this.pushStack(o2);
262    }, _invoke: function(t2, e2) {
263      t2.each(function() {
264        var t3;
265        t3 = l.getWaypointsByElement(this);
266        return n.each(t3, function(t4, n2) {
267          n2[e2]();
268          return true;
269        });
270      });
271      return this;
272    } };
273    n.fn[g] = function() {
274      var t2, r2;
275      r2 = arguments[0], t2 = 2 <= arguments.length ? e.call(arguments, 1) : [];
276      if (d[r2]) {
277        return d[r2].apply(this, t2);
278      } else if (n.isFunction(r2)) {
279        return d.init.apply(this, arguments);
280      } else if (n.isPlainObject(r2)) {
281        return d.init.apply(this, [null, r2]);
282      } else if (!r2) {
283        return n.error("jQuery Waypoints needs a callback function or handler option.");
284      } else {
285        return n.error("The " + r2 + " method does not exist in jQuery Waypoints.");
286      }
287    };
288    n.fn[g].defaults = { context: r, continuous: true, enabled: true, horizontal: false, offset: 0, triggerOnce: false };
289    h = { refresh: function() {
290      return n.each(a, function(t2, e2) {
291        return e2.refresh();
292      });
293    }, viewportHeight: function() {
294      var t2;
295      return (t2 = r.innerHeight) != null ? t2 : i.height();
296    }, aggregate: function(t2) {
297      var e2, r2, i2;
298      e2 = s;
299      if (t2) {
300        e2 = (i2 = a[n(t2).data(u)]) != null ? i2.waypoints : void 0;
301      }
302      if (!e2) {
303        return [];
304      }
305      r2 = { horizontal: [], vertical: [] };
306      n.each(r2, function(t3, i3) {
307        n.each(e2[t3], function(t4, e3) {
308          return i3.push(e3);
309        });
310        i3.sort(function(t4, e3) {
311          return t4.offset - e3.offset;
312        });
313        r2[t3] = n.map(i3, function(t4) {
314          return t4.element;
315        });
316        return r2[t3] = n.unique(r2[t3]);
317      });
318      return r2;
319    }, above: function(t2) {
320      if (t2 == null) {
321        t2 = r;
322      }
323      return h._filter(t2, "vertical", function(t3, e2) {
324        return e2.offset <= t3.oldScroll.y;
325      });
326    }, below: function(t2) {
327      if (t2 == null) {
328        t2 = r;
329      }
330      return h._filter(t2, "vertical", function(t3, e2) {
331        return e2.offset > t3.oldScroll.y;
332      });
333    }, left: function(t2) {
334      if (t2 == null) {
335        t2 = r;
336      }
337      return h._filter(t2, "horizontal", function(t3, e2) {
338        return e2.offset <= t3.oldScroll.x;
339      });
340    }, right: function(t2) {
341      if (t2 == null) {
342        t2 = r;
343      }
344      return h._filter(t2, "horizontal", function(t3, e2) {
345        return e2.offset > t3.oldScroll.x;
346      });
347    }, enable: function() {
348      return h._invoke("enable");
349    }, disable: function() {
350      return h._invoke("disable");
351    }, destroy: function() {
352      return h._invoke("destroy");
353    }, extendFn: function(t2, e2) {
354      return d[t2] = e2;
355    }, _invoke: function(t2) {
356      var e2;
357      e2 = n.extend({}, s.vertical, s.horizontal);
358      return n.each(e2, function(e3, n2) {
359        n2[t2]();
360        return true;
361      });
362    }, _filter: function(t2, e2, r2) {
363      var i2, o2;
364      i2 = a[n(t2).data(u)];
365      if (!i2) {
366        return [];
367      }
368      o2 = [];
369      n.each(i2.waypoints[e2], function(t3, e3) {
370        if (r2(i2, e3)) {
371          return o2.push(e3);
372        }
373      });
374      o2.sort(function(t3, e3) {
375        return t3.offset - e3.offset;
376      });
377      return n.map(o2, function(t3) {
378        return t3.element;
379      });
380    } };
381    n[m] = function() {
382      var t2, n2;
383      n2 = arguments[0], t2 = 2 <= arguments.length ? e.call(arguments, 1) : [];
384      if (h[n2]) {
385        return h[n2].apply(null, t2);
386      } else {
387        return h.aggregate.call(null, n2);
388      }
389    };
390    n[m].settings = { resizeThrottle: 100, scrollThrottle: 30 };
391    return i.load(function() {
392      return n[m]("refresh");
393    });
394  });
395}).call(void 0);

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.