PageSourceSearch

https://rotor-vlg.ru/wp-content/themes/splash/assets/js/waypoints.min.js?ver=4.3.2

js rotor-vlg.ru collected 2026-10-02 17:22:27 UTC 17,040 bytes, 447 lines download raw bytes

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

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.