PageSourceSearch

https://rotor-vlg.ru/wp-content/themes/splash/assets/js/jquery.fancybox.pack.js?ver=4.3.2

js rotor-vlg.ru collected 2026-10-02 17:22:24 UTC 38,737 bytes, 815 lines download raw bytes

vendor: 5,446 bytes, lines 1-143
1/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
2(function (r, G, f, v) {
3    var J = f("html"),
4        n = f(r),
5        p = f(G),
6        b = (f.fancybox = function () {
7            b.open.apply(this, arguments);
8        }),
9        I = navigator.userAgent.match(/msie/i),
10        B = null,
11        s = G.createTouch !== v,
12        t = function (a) {
13            return a && a.hasOwnProperty && a instanceof f;
14        },
15        q = function (a) {
16            return a && "string" === f.type(a);
17        },
18        E = function (a) {
19            return q(a) && 0 < a.indexOf("%");
20        },
21        l = function (a, d) {
22            var e = parseInt(a, 10) || 0;
23            d && E(a) && (e *= b.getViewport()[d] / 100);
24            return Math.ceil(e);
25        },
26        w = function (a, b) {
27            return l(a, b) + "px";
28        };
29    f.extend(b, {
30        version: "2.1.5",
31        defaults: {
32            padding: 15,
33            margin: 20,
34            width: 800,
35            height: 600,
36            minWidth: 100,
37            minHeight: 100,
38            maxWidth: 9999,
39            maxHeight: 9999,
40            pixelRatio: 1,
41            autoSize: !0,
42            autoHeight: !1,
43            autoWidth: !1,
44            autoResize: !0,
45            autoCenter: !s,
46            fitToView: !0,
47            aspectRatio: !1,
48            topRatio: 0.5,
49            leftRatio: 0.5,
50            scrolling: "auto",
51            wrapCSS: "",
52            arrows: !0,
53            closeBtn: !0,
54            closeClick: !1,
55            nextClick: !1,
56            mouseWheel: !0,
57            autoPlay: !1,
58            playSpeed: 3e3,
59            preload: 3,
60            modal: !1,
61            loop: !0,
62            ajax: { dataType: "html", headers: { "X-fancyBox": !0 } },
63            iframe: { scrolling: "auto", preload: !0 },
64            swf: { wmode: "transparent", allowfullscreen: "true", allowscriptaccess: "always" },
65            keys: { next: { 13: "left", 34: "up", 39: "left", 40: "up" }, prev: { 8: "right", 33: "down", 37: "right", 38: "down" }, close: [27], play: [32], toggle: [70] },
66            direction: { next: "left", prev: "right" },
67            scrollOutside: !0,
68            index: 0,
69            type: null,
70            href: null,
71            content: null,
72            title: null,
73            tpl: {
74                wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
75                image: '<img class="fancybox-image" src="{href}" alt="" />',
76                iframe:
77                    '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' +
78                    (I ? ' allowtransparency="true"' : "") +
79                    "></iframe>",
80                error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',
81                closeBtn: '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',
82                next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
83                prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>',
84            },
85            openEffect: "fade",
86            openSpeed: 250,
87            openEasing: "swing",
88            openOpacity: !0,
89            openMethod: "zoomIn",
90            closeEffect: "fade",
91            closeSpeed: 250,
92            closeEasing: "swing",
93            closeOpacity: !0,
94            closeMethod: "zoomOut",
95            nextEffect: "elastic",
96            nextSpeed: 250,
97            nextEasing: "swing",
98            nextMethod: "changeIn",
99            prevEffect: "elastic",
100            prevSpeed: 250,
101            prevEasing: "swing",
102            prevMethod: "changeOut",
103            helpers: { overlay: !0, title: !0 },
104            onCancel: f.noop,
105            beforeLoad: f.noop,
106            afterLoad: f.noop,
107            beforeShow: f.noop,
108            afterShow: f.noop,
109            beforeChange: f.noop,
110            beforeClose: f.noop,
111            afterClose: f.noop,
112        },
113        group: {},
114        opts: {},
115        previous: null,
116        coming: null,
117        current: null,
118        isActive: !1,
119        isOpen: !1,
120        isOpened: !1,
121        wrap: null,
122        skin: null,
123        outer: null,
124        inner: null,
125        player: { timer: null, isActive: !1 },
126        ajaxLoad: null,
127        imgPreload: null,
128        transitions: {},
129        helpers: {},
130        open: function (a, d) {
131            if (a && (f.isPlainObject(d) || (d = {}), !1 !== b.close(!0)))
132                return (
133                    f.isArray(a) || (a = t(a) ? f(a).get() : [a]),
134                        f.each(a, function (e, c) {
135                            var k = {},
136                                g,
137                                h,
138                                j,
139                                m,
140                                l;
141                            "object" === f.type(c) &&
142                            (c.nodeType && (c = f(c)),
143                                t(c) ? ((k = { href: c.data("fancybox-href") || c.attr("href"), title: c.data("fancybox-title") || c.attr("title"), isDom: !0, element: c }
143), f.metadata && f.extend(!0, k, c.metadata())) : (k = c));
144                            g = d.href || k.href || (q(c) ? c : null);
145                            h = d.title !== v ? d.title : k.title || "";
146                            m = (j = d.content || k.content) ? "html" : d.type || k.type;
147                            !m && k.isDom && ((m = c.data("fancybox-type")), m || (m = (m = c.prop("class").match(/fancybox\.(\w+)/)) ? m[1] : null));
148                            q(g) &&
149                            (m || (b.isImage(g) ? (m = "image") : b.isSWF(g) ? (m = "swf") : "#" === g.charAt(0) ? (m = "inline") : q(c) && ((m = "html"), (j = c))),
150                            "ajax" === m && ((l = g.split(/\s+/, 2)), (g = l.shift()), (l = l.shift())));
151                            j || ("inline" === m ? (g ? (j = f(q(g) ? g.replace(/.*(?=#[^\s]+$)/, "") : g)) : k.isDom && (j = c)) : "html" === m ? (j = g) : !m && !g && k.isDom && ((m = "inline"), (j = c)));
152                            f.extend(k, { href: g, type: m, content: j, title: h, selector: l });
153                            a[e] = k;
154                        }),
155                        (b.opts = f.extend(!0, {}, b.defaults, d)),
156                    d.keys !== v && (b.opts.keys = d.keys ? f.extend({}, b.defaults.keys, d.keys) : !1),
157                        (b.group = a),
158                        b._start(b.opts.index)
159                );
160        },
161        cancel: function () {
162            var a = b.coming;
163            a &&
164            !1 !== b.trigger("onCancel") &&
165            (b.hideLoading(),
166            b.ajaxLoad && b.ajaxLoad.abort(),
167                (b.ajaxLoad = null),
168            b.imgPreload && (b.imgPreload.onload = b.imgPreload.onerror = null),
169            a.wrap && a.wrap.stop(!0, !0).trigger("onReset").remove(),
170                (b.coming = null),
171            b.current || b._afterZoomOut(a));
172        },
173        close: function (a) {
174            b.cancel();
175            !1 !== b.trigger("beforeClose") &&
176            (b.unbindEvents(),
177            b.isActive &&
178            (!b.isOpen || !0 === a
179                ? (f(".fancybox-wrap").stop(!0).trigger("onReset").remove(), b._afterZoomOut())
180                : ((b.isOpen = b.isOpened = !1), (b.isClosing = !0), f(".fancybox-item, .fancybox-nav").remove(), b.wrap.stop(!0, !0).removeClass("fancybox-opened"), b.transitions[b.current.closeMethod]())));
181        },
182        play: function (a) {
183            var d = function () {
184                    clearTimeout(b.player.timer);
185                },
186                e = function () {
187                    d();
188                    b.current && b.player.isActive && (b.player.timer = setTimeout(b.next, b.current.playSpeed));
189                },
190                c = function () {
191                    d();
192                    p.off(".player");
193                    b.player.isActive = !1;
194                    b.trigger("onPlayEnd");
195                };
196            if (!0 === a || (!b.player.isActive && !1 !== a)) {
197                if (b.current && (b.current.loop || b.current.index < b.group.length - 1))
198                    (b.player.isActive = !0), p.on({ "onCancel.player beforeClose.player": c, "onUpdate.player": e, "beforeLoad.player": d }), e(), b.trigger("onPlayStart");
199            } else c();
200        },
201        next: function (a) {
202            var d = b.current;
203            d && (q(a) || (a = d.direction.next), b.jumpto(d.index + 1, a, "next"));
204        },
205        prev: function (a) {
206            var d = b.current;
207            d && (q(a) || (a = d.direction.prev), b.jumpto(d.index - 1, a, "prev"));
208        },
209        jumpto: function (a, d, e) {
210            var c = b.current;
211            c &&
212            ((a = l(a)),
213                (b.direction = d || c.direction[a >= c.index ? "next" : "prev"]),
214                (b.router = e || "jumpto"),
215            c.loop && (0 > a && (a = c.group.length + (a % c.group.length)), (a %= c.group.length)),
216            c.group[a] !== v && (b.cancel(), b._start(a)));
217        },
218        reposition: function (a, d) {
219            var e = b.current,
220                c = e ? e.wrap : null,
221                k;
222            c && ((k = b._getPosition(d)), a && "scroll" === a.type ? (delete k.position, c.stop(!0, !0).animate(k, 200)) : (c.css(k), (e.pos = f.extend({}, e.dim, k))));
223        },
224        update: function (a) {
225            var d = a && a.type,
226                e = !d || "orientationchange" === d;
227            e && (clearTimeout(B), (B = null));
228            b.isOpen &&
229            !B &&
230            (B = setTimeout(
231                function () {
232                    var c = b.current;
233                    c &&
234                    !b.isClosing &&
235                    (b.wrap.removeClass("fancybox-tmp"), (e || "load" === d || ("resize" === d && c.autoResize)) && b._setDimension(), ("scroll" === d && c.canShrink) || b.reposition(a), b.trigger("onUpdate"), (B = null));
236                },
237                e && !s ? 0 : 300
238            ));
239        },
240        toggle: function (a) {
241            b.isOpen && ((b.current.fitToView = "boolean" === f.type(a) ? a : !b.current.fitToView), s && (b.wrap.removeAttr("style").addClass("fancybox-tmp"), b.trigger("onUpdate")), b.update(
241));
242        },
243        hideLoading: function () {
244            p.off(".loading");
245            f("#fancybox-loading").remove();
246        },
247        showLoading: function () {
248            var a, d;
249            b.hideLoading();
250            a = f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");
251            p.on("keydown.loading", function (a) {
252                if (27 === (a.which || a.keyCode)) a.preventDefault(), b.cancel();
253            });
254            b.defaults.fixed || ((d = b.getViewport()), a.css({ position: "absolute", top: 0.5 * d.h + d.y, left: 0.5 * d.w + d.x }));
255        },
256        getViewport: function () {
257            var a = (b.current && b.current.locked) || !1,
258                d = { x: n.scrollLeft(), y: n.scrollTop() };
259            a ? ((d.w = a[0].clientWidth), (d.h = a[0].clientHeight)) : ((d.w = s && r.innerWidth ? r.innerWidth : n.width()), (d.h = s && r.innerHeight ? r.innerHeight : n.height()));
260            return d;
261        },
262        unbindEvents: function () {
263            b.wrap && t(b.wrap) && b.wrap.off(".fb");
264            p.off(".fb");
265            n.off(".fb");
266        },
267        bindEvents: function () {
268            var a = b.current,
269                d;
270            a &&
271            (n.on("orientationchange.fb" + (s ? "" : " resize.fb") + (a.autoCenter && !a.locked ? " scroll.fb" : ""), b.update),
272            (d = a.keys) &&
273            p.on("keydown.fb", function (e) {
274                var c = e.which || e.keyCode,
275                    k = e.target || e.srcElement;
276                if (27 === c && b.coming) return !1;
277                !e.ctrlKey &&
278                !e.altKey &&
279                !e.shiftKey &&
280                !e.metaKey &&
281                (!k || (!k.type && !f(k).is("[contenteditable]"))) &&
282                f.each(d, function (d, k) {
283                    if (1 < a.group.length && k[c] !== v) return b[d](k[c]), e.preventDefault(), !1;
284                    if (-1 < f.inArray(c, k)) return b[d](), e.preventDefault(), !1;
285                });
286            }),
287            f.fn.mousewheel &&
288            a.mouseWheel &&
289            b.wrap.on("mousewheel.fb", function (d, c, k, g) {
290                for (var h = f(d.target || null), j = !1; h.length && !j && !h.is(".fancybox-skin") && !h.is(".fancybox-wrap"); )
291                    (j = h[0] && !(h[0].style.overflow && "hidden" === h[0].style.overflow) && ((h[0].clientWidth && h[0].scrollWidth > h[0].clientWidth) || (h[0].clientHeight && h[0].scrollHeight > h[0].clientHeight))),
292                        (h = f(h).parent());
293                if (0 !== c && !j && 1 < b.group.length && !a.canShrink) {
294                    if (0 < g || 0 < k) b.prev(0 < g ? "down" : "left");
295                    else if (0 > g || 0 > k) b.next(0 > g ? "up" : "right");
296                    d.preventDefault();
297                }
298            }));
299        },
300        trigger: function (a, d) {
301            var e,
302                c = d || b.coming || b.current;
303            if (c) {
304                f.isFunction(c[a]) && (e = c[a].apply(c, Array.prototype.slice.call(arguments, 1)));
305                if (!1 === e) return !1;
306                c.helpers &&
307                f.each(c.helpers, function (d, e) {
308                    if (e && b.helpers[d] && f.isFunction(b.helpers[d][a])) b.helpers[d][a](f.extend(!0, {}, b.helpers[d].defaults, e), c);
309                });
310                p.trigger(a);
311            }
312        },
313        isImage: function (a) {
314            return q(a) && a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i);
315        },
316        isSWF: function (a) {
317            return q(a) && a.match(/\.(swf)((\?|#).*)?$/i);
318        },
319        _start: function (a) {
320            var d = {},
321                e,
322                c;
323            a = l(a);
324            e = b.group[a] || null;
325            if (!e) return !1;
326            d = f.extend(!0, {}, b.opts, e);
327            e = d.margin;
328            c = d.padding;
329            "number" === f.type(e) && (d.margin = [e, e, e, e]);
330            "number" === f.type(c) && (d.padding = [c, c, c, c]);
331            d.modal && f.extend(!0, d, { closeBtn: !1, closeClick: !1, nextClick: !1, arrows: !1, mouseWheel: !1, keys: null, helpers: { overlay: { closeClick: !1 } } });
332            d.autoSize && (d.autoWidth = d.autoHeight = !0);
333            "auto" === d.width && (d.autoWidth = !0);
334            "auto" === d.height && (d.autoHeight = !0);
335            d.group = b.group;
336            d.index = a;
337            b.coming = d;
338            if (!1 === b.trigger("beforeLoad")) b.coming = null;
339            else {
340                c = d.type;
341                e = d.href;
342                if (!c) return (b.coming = null), b.current && b.router && "jumpto" !== b.router ? ((b.current.index = a), b[b.router](b.direction)) : !1;
343                b.isActive = !0;
344                if ("image" === c || "swf" === c) (d.autoHeight = d.autoWidth = !1), (d.scrolling = "visible");
345                "image" === c && (d.aspectRatio = !0);
346                "iframe" === c && s && (d.scrolling = "scroll");
347                d.wrap = f(d.tpl.wrap)
348                    .addClass("fancybox-" + (s ? "mobile" : "desktop") + " fancybox-type-" + c + " fancybox-tmp " + d.wrapCSS)
349                    .appendTo(d.parent || "body");
350                f.extend(d, { skin: f(".fancybox-skin", d.wrap), outer: f(".fancybox-outer", d.wrap), inner: f(".fancybox-inner", d.wrap) });
351                f.each(["Top", "Right", "Bottom", "Left"], function (a, b) {
352                    d.skin.css("padding" + b, w(d.padding[a]));
353                });
354                b.trigger("onReady");
355                if ("inline" === c || "html" === c) {
356                    if (!d.content || !d.content.length) return b._error("content");
357                } else if (!e) return b._error("href");
358                "image" === c ? b._loadImage() : "ajax" === c ? b._loadAjax() : "iframe" === c ? b._loadIframe() : b._afterLoad();
359            }
360        },
361        _error: function (a) {
362            f.extend(b.coming, { type: "html", autoWidth: !0, autoHeight: !0, minWidth: 0, minHeight: 0, scrolling: "no", hasError: a, content: b.coming.tpl.error });
363            b._afterLoad();
364        },
365        _loadImage: function () {
366            var a = (b.imgPreload = new Image());
367            a.onload = function () {
368                this.onload = this.onerror = null;
369                b.coming.width = this.width / b.opts.pixelRatio;
370                b.coming.height = this.height / b.opts.pixelRatio;
371                b._afterLoad();
372            };
373            a.onerror = function () {
374                this.onload = this.onerror = null;
375                b._error("image");
376            };
377            a.src = b.coming.href;
378            !0 !== a.complete && b.showLoading();
379        },
380        _loadAjax: function () {
381            var a = b.coming;
382            b.showLoading();
383            b.ajaxLoad = f.ajax(
384                f.extend({}, a.ajax, {
385                    url: a.href,
386                    error: function (a, e) {
387                        b.coming && "abort" !== e ? b._error("ajax", a) : b.hideLoading();
388                    },
389                    success: function (d, e) {
390                        "success" === e && ((a.content = d), b._afterLoad());
391                    },
392                })
393            );
394        },
395        _loadIframe: function () {
396            var a = b.coming,
397                d = f(a.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime()))
398                    .attr("scrolling", s ? "auto" : a.iframe.scrolling)
399                    .attr("src", a.href);
400            f(a.wrap).on("onReset", function () {
401                try {
402                    f(this).find("iframe").hide().attr("src", "//about:blank").end().empty();
403                } catch (a) {}
404            });
405            a.iframe.preload &&
406            (b.showLoading(),
407                d.one("load", function () {
408                    f(this).data("ready", 1);
409                    s || f(this).on("load.fb", b.update);
410                    f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();
411                    b._afterLoad();
412                }));
413            a.content = d.appendTo(a.inner);
414            a.iframe.preload || b._afterLoad();
415        },
416        _preloadImages: function () {
417            var a = b.group,
418                d = b.current,
419                e = a.length,
420                c = d.preload ? Math.min(d.preload, e - 1) : 0,
421                f,
422                g;
423            for (g = 1; g <= c; g += 1) (f = a[(d.index + g) % e]), "image" === f.type && f.href && (new Image().src = f.href);
424        },
425        _afterLoad: function () {
426            var a = b.coming,
427                d = b.current,
428                e,
429                c,
430                k,
431                g,
432                h;
433            b.hideLoading();
434            if (a && !1 !== b.isActive)
435                if (!1 === b.trigger("afterLoad", a, d)) a.wrap.stop(!0).trigger("onReset").remove(), (b.coming = null);
436                else {
437                    d && (b.trigger("beforeChange", d), d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());
438                    b.unbindEvents();
439                    e = a.content;
440                    c = a.type;
441                    k = a.scrolling;
442                    f.extend(b, { wrap: a.wrap, skin: a.skin, outer: a.outer, inner: a.inner, current: a, previous: d });
443                    g = a.href;
444                    switch (c) {
445                        case "inline":
446                        case "ajax":
447                        case "html":
448                            a.selector
449                                ? (e = f("<div>").html(e).find(a.selector))
450                                : t(e) &&
451                                (e.data("fancybox-placeholder") || e.data("fancybox-placeholder", f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),
452                                    (e = e.show().detach()),
453                                    a.wrap.on("onReset", function () {
454                                        f(this).find(e).length && e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", !1);
455                                    }));
456                            break;
457                        case "image":
458                            e = a.tpl.image.replace("{href}", g);
459                            break;
460                        case "swf":
461                            (e = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + g + '"></param>'),
462                                (h = ""),
463                                f.each(a.swf, function (a, b) {
464                                    e += '<param name="' + a + '" value="' + b + '"></param>';
465                                    h += " " + a + '="' + b + '"';
466                                }),
467                                (e += '<embed src="' + g + '" type="application/x-shockwave-flash" width="100%" height="100%"' + h + "></embed></object>");
468                    }
469                    (!t(e) || !e.parent().is(a.inner)) && a.inner.append(e);
470                    b.trigger("beforeShow");
471                    a.inner.css("overflow", "yes" === k ? "scroll" : "no" === k ? "hidden" : k);
472                    b._setDimension();
473                    b.reposition();
474                    b.isOpen = !1;
475                    b.coming = null;
476                    b.bindEvents();
477                    if (b.isOpened) {
478                        if (d.prevMethod) b.transitions[d.prevMethod]();
479                    } else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();
480                    b.transitions[b.isOpened ? a.nextMethod : a.openMethod]();
481                    b._preloadImages();
482                }
483        },
484        _setDimension: function () {
485            var a = b.getViewport(),
486                d = 0,
487                e = !1,
488                c = !1,
489                e = b.wrap,
490                k = b.skin,
491                g = b.inner,
492                h = b.current,
493                c = h.width,
494                j = h.height,
495                m = h.minWidth,
496                u = h.minHeight,
497                n = h.maxWidth,
498                p = h.maxHeight,
499                s = h.scrolling,
500                q = h.scrollOutside ? h.scrollbarWidth : 0,
501                x = h.margin,
502                y = l(x[1] + x[3]),
503                r = l(x[0] + x[2]),
504                v,
505                z,
506                t,
507                C,
508                A,
509                F,
510                B,
511                D,
512                H;
513            e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");
514            x = l(k.outerWidth(!0) - k.width());
515            v = l(k.outerHeight(!0) - k.height());
516            z = y + x;
517            t = r + v;
518            C = E(c) ? ((a.w - z) * l(c)) / 100 : c;
519            A = E(j) ? ((a.h - t) * l(j)) / 100 : j;
520            if ("iframe" === h.type) {
521                if (((H = h.content), h.autoHeight && 1 === H.data("ready")))
522                    try {
523                        H[0].contentWindow.document.location && (g.width(C).height(9999), (F = H.contents().find("body")), q && F.css("overflow-x", "hidden"), (A = F.outerHeight(!0)));
524                    } catch (G) {}
525            } else if (h.autoWidth || h.autoHeight) g.addClass("fancybox-tmp"), h.autoWidth || g.width(C), h.autoHeight || g.height(A), h.autoWidth && (C = g.width()), h.autoHeight && (A = g.he
525ight()), g.removeClass("fancybox-tmp");
526            c = l(C);
527            j = l(A);
528            D = C / A;
529            m = l(E(m) ? l(m, "w") - z : m);
530            n = l(E(n) ? l(n, "w") - z : n);
531            u = l(E(u) ? l(u, "h") - t : u);
532            p = l(E(p) ? l(p, "h") - t : p);
533            F = n;
534            B = p;
535            h.fitToView && ((n = Math.min(a.w - z, n)), (p = Math.min(a.h - t, p)));
536            z = a.w - y;
537            r = a.h - r;
538            h.aspectRatio
539                ? (c > n && ((c = n), (j = l(c / D))), j > p && ((j = p), (c = l(j * D))), c < m && ((c = m), (j = l(c / D))), j < u && ((j = u), (c = l(j * D))))
540                : ((c = Math.max(m, Math.min(c, n))), h.autoHeight && "iframe" !== h.type && (g.width(c), (j = g.height())), (j = Math.max(u, Math.min(j, p))));
541            if (h.fitToView)
542                if ((g.width(c).height(j), e.width(c + x), (a = e.width()), (y = e.height()), h.aspectRatio))
543                    for (; (a > z || y > r) && c > m && j > u && !(19 < d++); )
544                        (j = Math.max(u, Math.min(p, j - 10))), (c = l(j * D)), c < m && ((c = m), (j = l(c / D))), c > n && ((c = n), (j = l(c / D))), g.width(c).height(j), e.width(c + x), (a = e.width()), (y = e.height());
545                else (c = Math.max(m, Math.min(c, c - (a - z)))), (j = Math.max(u, Math.min(j, j - (y - r))));
546            q && "auto" === s && j < A && c + x + q < z && (c += q);
547            g.width(c).height(j);
548            e.width(c + x);
549            a = e.width();
550            y = e.height();
551            e = (a > z || y > r) && c > m && j > u;
552            c = h.aspectRatio ? c < F && j < B && c < C && j < A : (c < F || j < B) && (c < C || j < A);
553            f.extend(h, { dim: { width: w(a), height: w(y) }, origWidth: C, origHeight: A, canShrink: e, canExpand: c, wPadding: x, hPadding: v, wrapSpace: y - k.outerHeight(!0), skinSpace: k.height() - j });
554            !H && h.autoHeight && j > u && j < p && !c && g.height("auto");
555        },
556        _getPosition: function (a) {
557            var d = b.current,
558                e = b.getViewport(),
559                c = d.margin,
560                f = b.wrap.width() + c[1] + c[3],
561                g = b.wrap.height() + c[0] + c[2],
562                c = { position: "absolute", top: c[0], left: c[3] };
563            d.autoCenter && d.fixed && !a && g <= e.h && f <= e.w ? (c.position = "fixed") : d.locked || ((c.top += e.y), (c.left += e.x));
564            c.top = w(Math.max(c.top, c.top + (e.h - g) * d.topRatio));
565            c.left = w(Math.max(c.left, c.left + (e.w - f) * d.leftRatio));
566            return c;
567        },
568        _afterZoomIn: function () {
569            var a = b.current;
570            a &&
571            ((b.isOpen = b.isOpened = !0),
572                b.wrap.css("overflow", "visible").addClass("fancybox-opened"),
573                b.update(),
574            (a.closeClick || (a.nextClick && 1 < b.group.length)) &&
575            b.inner.css("cursor", "pointer").on("click.fb", function (d) {
576                !f(d.target).is("a") && !f(d.target).parent().is("a") && (d.preventDefault(), b[a.closeClick ? "close" : "next"]());
577            }),
578            a.closeBtn &&
579            f(a.tpl.closeBtn)
580                .appendTo(b.skin)
581                .on("click.fb", function (a) {
582                    a.preventDefault();
583                    b.close();
584                }),
585            a.arrows && 1 < b.group.length && ((a.loop || 0 < a.index) && f(a.tpl.prev).appendTo(b.outer).on("click.fb", b.prev), (a.loop || a.index < b.group.length - 1) && f(a.tpl.next).appendTo(b.outer).on("click.fb", b.next)),
586                b.trigger("afterShow"),
587                !a.loop && a.index === a.group.length - 1 ? b.play(!1) : b.opts.autoPlay && !b.player.isActive && ((b.opts.autoPlay = !1), b.play()));
588        },
589        _afterZoomOut: function (a) {
590            a = a || b.current;
591            f(".fancybox-wrap").trigger("onReset").remove();
592            f.extend(b, { group: {}, opts: {}, router: !1, current: null, isActive: !1, isOpened: !1, isOpen: !1, isClosing: !1, wrap: null, skin: null, outer: null, inner: null });
593            b.trigger("afterClose", a);
594        },
595    });
596    b.transitions = {
597        getOrigPosition: function () {
598            var a = b.current,
599                d = a.element,
600                e = a.orig,
601                c = {},
602                f = 50,
603                g = 50,
604                h = a.hPadding,
605                j = a.wPadding,
606                m = b.getViewport();
607            !e && a.isDom && d.is(":visible") && ((e = d.find("img:first")), e.length || (e = d));
608            t(e) ? ((c = e.offset()), e.is("img") && ((f = e.outerWidth()), (g = e.outerHeight()))) : ((c.top = m.y + (m.h - g) * a.topRatio), (c.left = m.x + (m.w - f) * a.leftRatio));
609            if ("fixed" === b.wrap.css("position") || a.locked) (c.top -= m.y), (c.left -= m.x);
610            return (c = { top: w(c.top - h * a.topRatio), left: w(c.left - j * a.leftRatio), width: w(f + j), height: w(g + h) });
611        },
612        step: function (a, d) {
613            var e,
614                c,
615                f = d.prop;
616            c = b.current;
617            var g = c.wrapSpace,
618                h = c.skinSpace;
619            if ("width" === f || "height" === f)
620                (e = d.end === d.start ? 1 : (a - d.start) / (d.end - d.start)),
621                b.isClosing && (e = 1 - e),
622                    (c = "width" === f ? c.wPadding : c.hPadding),
623                    (c = a - c),
624                    b.skin[f](l("width" === f ? c : c - g * e)),
625                    b.inner[f](l("width" === f ? c : c - g * e - h * e));
626        },
627        zoomIn: function () {
628            var a = b.current,
629                d = a.pos,
630                e = a.openEffect,
631                c = "elastic" === e,
632                k = f.extend({ opacity: 1 }, d);
633            delete k.position;
634            c ? ((d = this.getOrigPosition()), a.openOpacity && (d.opacity = 0.1)) : "fade" === e && (d.opacity = 0.1);
635            b.wrap.css(d).animate(k, { duration: "none" === e ? 0 : a.openSpeed, easing: a.openEasing, step: c ? this.step : null, complete: b._afterZoomIn });
636        },
637        zoomOut: function () {
638            var a = b.current,
639                d = a.closeEffect,
640                e = "elastic" === d,
641                c = { opacity: 0.1 };
642            e && ((c = this.getOrigPosition()), a.closeOpacity && (c.opacity = 0.1));
643            b.wrap.animate(c, { duration: "none" === d ? 0 : a.closeSpeed, easing: a.closeEasing, step: e ? this.step : null, complete: b._afterZoomOut });
644        },
645        changeIn: function () {
646            var a = b.current,
647                d = a.nextEffect,
648                e = a.pos,
649                c = { opacity: 1 },
650                f = b.direction,
651                g;
652            e.opacity = 0.1;
653            "elastic" === d && ((g = "down" === f || "up" === f ? "top" : "left"), "down" === f || "right" === f ? ((e[g] = w(l(e[g]) - 200)), (c[g] = "+=200px")) : ((e[g] = w(l(e[g]) + 200)), (c[g] = "-=200px")));
654            "none" === d ? b._afterZoomIn() : b.wrap.css(e).animate(c, { duration: a.nextSpeed, easing: a.nextEasing, complete: b._afterZoomIn });
655        },
656        changeOut: function () {
657            var a = b.previous,
658                d = a.prevEffect,
659                e = { opacity: 0.1 },
660                c = b.direction;
661            "elastic" === d && (e["down" === c || "up" === c ? "top" : "left"] = ("up" === c || "left" === c ? "-" : "+") + "=200px");
662            a.wrap.animate(e, {
663                duration: "none" === d ? 0 : a.prevSpeed,
664                easing: a.prevEasing,
665                complete: function () {
666                    f(this).trigger("onReset").remove();
667                },
668            });
669        },
670    };
671    b.helpers.overlay = {
672        defaults: { closeClick: !0, speedOut: 200, showEarly: !0, css: {}, locked: !s, fixed: !0 },
673        overlay: null,
674        fixed: !1,
675        el: f("html"),
676        create: function (a) {
677            a = f.extend({}, this.defaults, a);
678            this.overlay && this.close();
679            this.overlay = f('<div class="fancybox-overlay"></div>').appendTo(b.coming ? b.coming.parent : a.parent);
680            this.fixed = !1;
681            a.fixed && b.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), (this.fixed = !0));
682        },
683        open: function (a) {
684            var d = this;
685            a = f.extend({}, this.defaults, a);
686            this.overlay ? this.overlay.off(".overlay").width("auto").height("auto") : this.create(a);
687            this.fixed || (n.on("resize.overlay", f.proxy(this.update, this)), this.update());
688            a.closeClick &&
689            this.overlay.on("click.overlay", function (a) {
690                if (f(a.target).hasClass("fancybox-overlay")) return b.isActive ? b.close() : d.close(), !1;
691            });
692            this.overlay.css(a.css).show();
693        },
694        close: function () {
695            var a, b;
696            n.off("resize.overlay");
697            this.el.hasClass("fancybox-lock") && (f(".fancybox-margin").removeClass("fancybox-margin"), (a = n.scrollTop()), (b = n.scrollLeft()), this.el.removeClass("fancybox-lock"), n.scrollTop(a).scrollLeft(b));
698            f(".fancybox-overlay").remove().hide();
699            f.extend(this, { overlay: null, fixed: !1 });
700        },
701        update: function () {
702            var a = "100%",
703                b;
704            this.overlay.width(a).height("100%");
705            I ? ((b = Math.max(G.documentElement.offsetWidth, G.body.offsetWidth)), p.width() > b && (a = p.width())) : p.width() > n.width() && (a = p.width());
706            this.overlay.width(a).height(p.height());
707        },
708        onReady: function (a, b) {
709            var e = this.overlay;
710            f(".fancybox-overlay").stop(!0, !0);
711            e || this.create(a);
712            a.locked && this.fixed && b.fixed && (e || (this.margin = p.height() > n.height() ? f("html").css("margin-right").replace("px", "") : !1), (b.locked = this.overlay.append(b.wrap)), (b.fixed = !1));
713            !0 === a.showEarly && this.beforeShow.apply(this, arguments);
714        },
715        beforeShow: function (a, b) {
716            var e, c;
717            b.locked &&
718            (!1 !== this.margin &&
719            (f("*")
720                .filter(function () {
721                    return "fixed" === f(this).css("position") && !f(this).hasClass("fancybox-overlay") && !f(this).hasClass("fancybox-wrap");
722                })
723                .addClass("fancybox-margin"),
724                this.el.addClass("fancybox-margin")),
725                (e = n.scrollTop()),
726                (c = n.scrollLeft()),
727                this.el.addClass("fancybox-lock"),
728                n.scrollTop(e).scrollLeft(c));
729            this.open(a);
730        },
731        onUpdate: function () {
732            this.fixed || this.update();
733        },
734        afterClose: function (a) {
735            this.overlay && !b.coming && this.overlay.fadeOut(a.speedOut, f.proxy(this.close, this));
736        },
737    };
738    b.helpers.title = {
739        defaults: { type: "float", position: "bottom" },
740        beforeShow: function (a) {
741            var d = b.current,
742                e = d.title,
743                c = a.type;
744            f.isFunction(e) && (e = e.call(d.element, d));
745            if (q(e) && "" !== f.trim(e)) {
746                d = f('<div class="fancybox-title fancybox-title-' + c + '-wrap">' + e + "</div>");
747                switch (c) {
748                    case "inside":
749                        c = b.skin;
750                        break;
751                    case "outside":
752                        c = b.wrap;
753                        break;
754                    case "over":
755                        c = b.inner;
756                        break;
757                    default:
758                        (c = b.skin), d.appendTo("body"), I && d.width(d.width()), d.wrapInner('<span class="child"></span>'), (b.current.margin[2] += Math.abs(l(d.css("margin-bottom"))));
759                }
760                d["top" === a.position ? "prependTo" : "appendTo"](c);
761            }
762        },
763    };
764    f.fn.fancybox = function (a) {
765        var d,
766            e = f(this),
767            c = this.selector || "",
768            k = function (g) {
769                var h = f(this).blur(),
770                    j = d,
771                    k,
772                    l;
773                !g.ctrlKey &&
774                !g.altKey &&
775                !g.shiftKey &&
776                !g.metaKey &&
777                !h.is(".fancybox-wrap") &&
778                ((k = a.groupAttr || "data-fancybox-group"),
779                    (l = h.attr(k)),
780                l || ((k = "rel"), (l = h.get(0)[k])),
781                l && "" !== l && "nofollow" !== l && ((h = c.length ? f(c) : e), (h = h.filter("[" + k + '="' + l + '"]')), (j = h.index(this))),
782                    (a.index = j),
783                !1 !== b.open(h, a) && g.preventDefault());
784            };
785        a = a || {};
786        d = a.index || 0;
787        !c || !1 === a.live ? e.off("click.fb-start").on("click.fb-start", k) : p.undelegate(c, "click.fb-start").delegate(c + ":not('.fancybox-item, .fancybox-nav')", "click.fb-start", k);
788        this.filter("[data-fancybox-start=1]").trigger("click");
789        return this;
790    };
791    p.ready(function () {
792        var a, d;
793        f.scrollbarWidth === v &&
794        (f.scrollbarWidth = function () {
795            var a = f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),
796                b = a.children(),
797                b = b.innerWidth() - b.height(99).innerWidth();
798            a.remove();
799            return b;
800        });
801        if (f.support.fixedPosition === v) {
802            a = f.support;
803            d = f('<div style="position:fixed;top:20px;"></div>').appendTo("body");
804            var e = 20 === d[0].offsetTop || 15 === d[0].offsetTop;
805            d.remove();
806            a.fixedPosition = e;
807        }
808        f.extend(b.defaults, { scrollbarWidth: f.scrollbarWidth(), fixed: f.support.fixedPosition, parent: f("body") });
809        a = f(r).width();
810        J.addClass("fancybox-lock-test");
811        d = f(r).width();
812        J.removeClass("fancybox-lock-test");
813        f("<style type='text/css'>.fancybox-margin{margin-right:" + (d - a) + "px;}</style>").appendTo("head");
814    });
815})(window, document, jQuery);

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.