Вход Регистрация
Файл: js/popup.js
Строк: 551
<?php
/**
 * Minified by jsDelivr using Terser v3.14.1.
 * Original file: /gh/vast-engineering/jquery-popup-overlay@2.1.1/jquery.popupoverlay.js
 * 
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
! function(t) {
    var 
eot(window),
        
= {},
        
= [],
        
= [],
        
null,
        
= [],
        
null,
        
= /(iPad|iPhone|iPod)/.test(navigator.userAgent),
        
= {
            
_init: function(e) {
                var 
t(e),
                    
o.data("popupoptions");
                
p[e.id] = !1a[e.id] = 0o.data("popup-initialized") || (o.attr("data-popup-initialized""true"), c._initonce(e)), i.autoopen && setTimeout(function() {
                    
c.show(e0)
                }, 
0)
            },
            
_initonce: function(o) {
                var 
inat(o),
                    
t("body"),
                    
p.data("popupoptions");
                (
parseInt(l.css("margin-right"), 10), void 0 !== document.body.style.webkitTransition || void 0 !== document.body.style.MozTransition || void 0 !== document.body.style.msTransition || void 0 !== document.body.style.OTransition || void 0 !== document.body.style.transitionu.scrolllock) && (void 0 === && (= (t('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body")).children(), a.innerWidth() - a.height(99).innerWidth(), n.remove()));
                if (
p.attr("id") || p.attr("id""j-popup-" parseInt(1e8 Math.random(), 10)), p.addClass("popup_content"), u.background && !t("#" o.id "_background").length) {
                    
l.append('<div id="' o.id '_background" class="popup_background"></div>');
                    var 
t("#" o.id "_background");
                    
f.css({
                        
opacity0,
                        
visibility"hidden",
                        
backgroundColoru.color,
                        
position"fixed",
                        
top0,
                        
right0,
                        
bottom0,
                        
left0
                    
}), u.setzindex && !u.autozindex && f.css("z-index""100000"), u.transition && f.css("transition"u.transition)
                }
                
l.append(o), p.wrap('<div id="' o.id '_wrapper" class="popup_wrapper" />'), (t("#" o.id "_wrapper")).css({
                    
opacity0,
                    
visibility"hidden",
                    
position"absolute"
                
}), && ((t("#" o.id "_background")).css("cursor""pointer"), t(u.pagecontainer).css("cursor""pointer")), "overlay" == u.type && !u.absolute && u.background && (i.css("overflow""auto"), i[0].style.WebkitOverflowScrolling "touch"), p.css({
                    
opacity0,
                    
visibility"hidden",
                    
"pointer-events""auto",
                    
display"inline-block"
                
}), u.setzindex && !u.autozindex && i.css("z-index""100001"), u.outline || p.css("outline""none"), u.transition && (p.css("transition"u.transition), i.css("transition"u.transition)), p.attr("aria-hidden", !0), "overlay" == u.type && (p.css({
                    
textAlign"left",
                    
position"relative",
                    
verticalAlign"middle"
                
}), i.css({
                    
position"fixed",
                    
width"100%",
                    
height"100%",
                    
top0,
                    
left0,
                    
textAlign"center"
                
}), i.append('<div class="popup_align" />'), t(".popup_align").css({
                    
display"inline-block",
                    
verticalAlign"middle",
                    
height"100%"
                
})), p.attr("role""dialog");
                var 
u.openelement u.openelement "." o.id "_open";
                
t(h).each(function(eo) {
                    
t(o).attr("data-popup-ordinal"e), o.id || t(o).attr("id""open_" parseInt(1e8 Math.random(), 10))
                }), 
p.attr("aria-labelledby") || p.attr("aria-label") || p.attr("aria-labelledby"t(h).attr("id")), "hover" == u.action ? (u.keepfocus = !1t(h).on("mouseenter", function() {
                    
c.show(ot(this).data("popup-ordinal"))
                }), 
t(h).on("mouseleave", function() {
                    
c.hide(o)
                })) : 
t(document).on("click.jqp"h, function(e) {
                    
e.preventDefault();
                    var 
t(this).data("popup-ordinal");
                    
setTimeout(function() {
                        
c.show(oi)
                    }, 
0)
                }), 
u.closebutton && c.addclosebutton(o), u.detach p.detach() : p.hide()
            },
            
show: function(nr) {
                var 
t(n);
                if (!
f.data("popup-visible")) {
                    
f.data("popup-initialized") || c._init(n), f.attr("data-popup-initialized""true");
                    var 
t("body"),
                        
f.data("popupoptions"),
                        
t("#" n.id "_wrapper"),
                        
t("#" n.id "_background");
                    if (
u(nrb.beforeopen), p[n.id] = rsetTimeout(function() {
                            
l.push(n.id)
                        }, 
0), b.autozindex) {
                        for (var 
document.getElementsByTagName("*"), m.length00yk++) {
                            var 
t(m[k]).css("z-index");
                            
"auto" !== && < (parseInt(w10)) && (w)
                        }
                        
a[n.id] = _b.background && a[n.id] >= && t("#" n.id "_background").css({
                            
zIndexa[n.id] + 1
                        
}), a[n.id] >= && g.css({
                            
zIndexa[n.id] + 2
                        
})
                    }
                    
b.detach ? (g.prepend(n), f.show()) : f.show(), setTimeout(function() {
                        
g.css({
                            
visibility"visible",
                            
opacity1
                        
}), t("html").addClass("popup_visible").addClass("popup_visible_" n.id), g.addClass("popup_wrapper_visible")
                    }, 
20), b.scrolllock && (h.css("overflow""hidden"), h.height() > i.height() && h.css("margin-right"e)), f.css({
                        
visibility"visible",
                        
opacity1
                    
}), b.background && (v.css({
                        
visibility"visible",
                        
opacityb.opacity
                    
}), setTimeout(function() {
                        
v.css({
                            
opacityb.opacity
                        
})
                    }, 
0)), f.data("popup-visible", !0), c.reposition(nr), f.data("focusedelementbeforepopup"document.activeElement), f.attr("tabindex", -1), setTimeout(function() {
                        
"closebutton" === b.focuselement t("#" n.id " ." n.id "_close:first").focus() : b.focuselement t(b.focuselement).focus() : (!=== b.focuselement || b.keepfocus) && f.focus()
                    }, 
b.focusdelay), b.keepfocus && t(b.pagecontainer).attr("aria-hidden", !0), f.attr("aria-hidden", !1), u(nrb.onopen), g.one("transitionend", function() {
                        
u(nrb.opentransitionend)
                    }) : 
u(nrb.opentransitionend), "tooltip" == b.type && t(window).on("resize." n.id, function() {
                        
c.reposition(nr)
                    })
                }
            },
            
hide: function(ei) {
                var 
t.inArray(e.idl);
                if (-
!== n) {
                    
&& clearTimeout(o);
                    var 
t("body"),
                        
t(e),
                        
r.data("popupoptions"),
                        
t("#" e.id "_wrapper"),
                        
t("#" e.id "_background");
                    
r.data("popup-visible", !1), === l.length t("html").removeClass("popup_visible").removeClass("popup_visible_" e.id) : t("html").hasClass("popup_visible_" e.id) && t("html").removeClass("popup_visible_" e.id), l.splice(n1), f.hasClass("popup_wrapper_visible") && f.removeClass("popup_wrapper_visible"), c.keepfocus && !&& setTimeout(function() {
                        
t(r.data("focusedelementbeforepopup")).is(":visible") && r.data("focusedelementbeforepopup").focus()
                    }, 
0), f.css({
                        
visibility"hidden",
                        
opacity0
                    
}), r.css({
                        
visibility"hidden",
                        
opacity0
                    
}), c.background && h.css({
                        
visibility"hidden",
                        
opacity0
                    
}), t(c.pagecontainer).attr("aria-hidden", !1), r.attr("aria-hidden", !0), u(ep[e.id], c.onclose), && "0s" !== r.css("transition-duration") ? r.one("transitionend", function() {
                        
r.data("popup-visible") || (c.detach r.detach() : r.hide()), c.scrolllock && setTimeout(function() {
                            
t.grep(l, function(e) {
                                return 
t("#" e).data("popupoptions").scrolllock
                            
}).length || a.css({
                                
overflow"visible",
                                
"margin-right"s
                            
})
                        }, 
10), u(ep[e.id], c.closetransitionend)
                    }) : (
c.detach r.detach() : r.hide(), c.scrolllock && setTimeout(function() {
                        
t.grep(l, function(e) {
                            return 
t("#" e).data("popupoptions").scrolllock
                        
}).length || a.css({
                            
overflow"visible",
                            
"margin-right"s
                        
})
                    }, 
10), u(ep[e.id], c.closetransitionend)), "tooltip" == c.type && t(window).off("resize." e.id)
                }
            },
            
toggle: function(eo) {
                
t(e).data("popup-visible") ? c.hide(e) : setTimeout(function() {
                    
c.show(eo)
                }, 
0)
            },
            
reposition: function(eo) {
                var 
t(e),
                    
n.data("popupoptions"),
                    
t("#" e.id "_wrapper");
                if (
|| 0"tooltip" == a.type) {
                    var 
s;
                    
p.css({
                        
position"absolute"
                    
});
                    var 
= (a.tooltipanchor t(a.tooltipanchor) : a.openelement t(a.openelement).filter('[data-popup-ordinal="' '"]') : t("." e.id '_open[data-popup-ordinal="' '"]')).offset() || {
                        
left0,
                        
top0
                    
};
                    
"right" == a.horizontal p.css("left"l.left s.outerWidth() + a.offsetleft) : "leftedge" == a.horizontal p.css("left"l.left a.offsetleft) : "left" == a.horizontal p.css("right"i.width() - l.left a.offsetleft) : "rightedge" == a.horizontal p.css("right"i.width() - l.left s.outerWidth() - a.offsetleft) : p.css("left"l.left s.outerWidth() / n.outerWidth() / parseFloat(n.css("marginLeft")) + a.offsetleft), "bottom" == a.vertical p.css("top"l.top s.outerHeight() + a.offsettop) : "bottomedge" == a.vertical p.css("top"l.top s.outerHeight() - n.outerHeight() + a.offsettop) : "top" == a.vertical p.css("bottom"i.height() - l.top a.offsettop) : "topedge" == a.vertical p.css("bottom"i.height() - l.top n.outerHeight() - a.offsettop) : p.css("top"l.top s.outerHeight() / n.outerHeight() / parseFloat(n.css("marginTop")) + a.offsettop)
                } else 
"overlay" == a.type && (a.horizontal p.css("text-align"a.horizontal) : p.css("text-align""center"), a.vertical n.css("vertical-align"a.vertical) : n.css("vertical-align""middle"), a.absolute && p.css({
                    
position"absolute",
                    
topwindow.scrollY
                
}), a.background || (p.css({
                    
"pointer-events""none"
                
}), a.absolute || f(e) || (n.css("overflow""auto"), n[0].style.WebkitOverflowScrolling "touch"n.css("max-height""calc(100% - " n.css("margin-top") + " - " n.css("margin-bottom") + ")"))))
            },
            
addclosebutton: function(e) {
                var 
o;
                
t(e).data("popupoptions").closebuttonmarkup t(n.closebuttonmarkup).addClass(e.id "_close") : '<button class="popup_close ' e.id '_close" title="Close" aria-label="Close"><span aria-hidden="true">×</span></button>'t(e).data("popup-initialized") && t(e).append(o)
            }
        },
        
= function(eoi) {
            var 
nat(e).data("popupoptions");
            
void 0 !== && (p.openelement p.openelement "." e.id "_open"t('[data-popup-ordinal="' '"]'), "function" == typeof i && i.call(t(e), ea))
        },
        
= function(t) {
            var 
t.getBoundingClientRect();
            return 
e.top >= && e.left >= && e.bottom <= (window.innerHeight || document.documentElement.clientHeight) && e.right <= (window.innerWidth || document.documentElement.clientWidth)
        };
    
t(document).on("keydown", function(e) {
        if (
l.length) {
            var 
l[l.length 1],
                
document.getElementById(o);
            
t(i).data("popupoptions").escape && 27 == e.keyCode && c.hide(i)
        }
    }), 
t(document).on("click", function(e) {
        if (
l.length) {
            var 
l[l.length 1],
                
document.getElementById(o),
                
t(i).data("popupoptions").closeelement t(i).data("popupoptions").closeelement "." i.id "_close";
            
t(e.target).closest(n).length && (e.preventDefault(), c.hide(i)), t(i).data("popupoptions") && t(i).data("popupoptions").blur && !t(e.target).closest(t(i).data("popupoptions").blurignore).length && !t(e.target).closest("#" o).length && !== e.which && t(e.target).is(":visible") && (t(i).data("popupoptions").background ? (c.hide(i), e.preventDefault()) : c.hide(i, !0))
        }
    }), 
t(document).on("keydown", function(e) {
        if (
l.length && == e.which) {
            var 
l[l.length 1],
                
document.getElementById(o);
            if (!
t(i).data("popupoptions").keepfocus) return;
            var 
t(i).find("*").filter("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(":visible"),
                
t(":focus"),
                
n.length,
                
n.index(a);
            
=== ? (t(i).focus(), e.preventDefault()) : e.shiftKey === && (n.get(1).focus(), e.preventDefault()) : == && (n.get(0).focus(), e.preventDefault())
        }
    }), 
t.fn.popup = function(e) {
        return 
this.each(function() {
            var 
t(this),
                
t.extend(!0, {}, t.fn.popup.defaults);
            if (
&& "tooltip" === e.type && (i.background = !1), "object" == typeof e) {
                var 
t.extend({}, io.data("popupoptions"), e);
                
o.data("popupoptions"a), o.data("popupoptions"), c._init(this)
            } else 
"string" == typeof e ? (o.data("popupoptions") || (o.data("popupoptions"i), o.data("popupoptions")), c[e].call(thisthis)) : (o.data("popupoptions") || (o.data("popupoptions"i), o.data("popupoptions")), c._init(this))
        })
    }, 
t.fn.popup.destroyall = function() {
        for (var 
0l.lengthe++) t("#" l[e]).popup("hide");
        
t(".popup_wrapper").remove(), t(".popup_background").remove(), t(document).off("click.jqp")
    }, 
t.fn.popup.defaults = {
        
type"overlay",
        
absolute: !1,
        
autoopen: !1,
        
background: !0,
        
color"black",
        
opacity"0.5",
        
horizontal"center",
        
vertical"top"
        
offsettop100,
        
offsetleft0,
        
escape: !0,
        
blur: !0,
        
blurignorenull,
        
setzindex: !0,
        
autozindex: !1,
        
scrolllock: !1,
        
closebutton: !1,
        
closebuttonmarkupnull,
        
keepfocus: !0,
        
focuselementnull,
        
focusdelay50,
        
outline: !1,
        
pagecontainernull,
        
detach: !1,
        
openelementnull,
        
closeelementnull,
        
transitionnull,
        
tooltipanchornull,
        
beforeopennull,
        
onclosenull,
        
onopennull,
        
opentransitionendnull,
        
closetransitionendnull
    
}
}(
jQuery);
//# sourceMappingURL=/sm/2035d47cc4dfefbedc1c893619378163bec0745a97d37c6079983849bfcce499.map
?>
Онлайн: 1
Реклама