bnbweb/back/assets/js/jquery.colorbox.min.js

6 lines
12 KiB
JavaScript
Raw Normal View History

2022-11-14 15:49:28 +00:00
/*!
Colorbox 1.6.3
license: MIT
http://www.jacklmoore.com/colorbox
*/
!function(a,b,c){function d(c,d,e){var f=b.createElement(c);return d&&(f.id=_+d),e&&(f.style.cssText=e),a(f)}function e(){return c.innerHeight?c.innerHeight:a(c).height()}function f(b,c){c!==Object(c)&&(c={}),this.cache={},this.el=b,this.value=function(b){var d;return void 0===this.cache[b]&&(d=a(this.el).attr("data-cbox-"+b),void 0!==d?this.cache[b]=d:void 0!==c[b]?this.cache[b]=c[b]:void 0!==Z[b]&&(this.cache[b]=Z[b])),this.cache[b]},this.get=function(b){var c=this.value(b);return a.isFunction(c)?c.call(this.el,this):c}}function g(a){var b=A.length,c=(R+a)%b;return 0>c?b+c:c}function h(a,b){return Math.round((/%/.test(a)?("x"===b?B.width():e())/100:1)*parseInt(a,10))}function i(a,b){return a.get("photo")||a.get("photoRegex").test(b)}function j(a,b){return a.get("retinaUrl")&&c.devicePixelRatio>1?b.replace(a.get("photoRegex"),a.get("retinaSuffix")):b}function k(a){"contains"in t[0]&&!t[0].contains(a.target)&&a.target!==s[0]&&(a.stopPropagation(),t.focus())}function l(a){l.str!==a&&(t.add(s).removeClass(l.str).addClass(a),l.str=a)}function m(b){R=0,b&&b!==!1&&"nofollow"!==b?(A=a("."+aa).filter(function(){var c=a.data(this,$),d=new f(this,c);return d.get("rel")===b}),R=A.index(M.el),-1===R&&(A=A.add(M.el),R=A.length-1)):A=a(M.el)}function n(c){a(b).trigger(c),ha.triggerHandler(c)}function o(c){var e;if(!V){if(e=a(c).data($),M=new f(c,e),m(M.get("rel")),!T){T=U=!0,l(M.get("className")),t.css({visibility:"hidden",display:"block",opacity:""}),C=d(ia,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),v.css({width:"",height:""}).append(C),N=w.height()+z.height()+v.outerHeight(!0)-v.height(),O=x.width()+y.width()+v.outerWidth(!0)-v.width(),P=C.outerHeight(!0),Q=C.outerWidth(!0);var g=h(M.get("initialWidth"),"x"),i=h(M.get("initialHeight"),"y"),j=M.get("maxWidth"),o=M.get("maxHeight");M.w=Math.max((j!==!1?Math.min(g,h(j,"x")):g)-Q-O,0),M.h=Math.max((o!==!1?Math.min(i,h(o,"y")):i)-P-N,0),C.css({width:"",height:M.h}),X.position(),n(ba),M.get("onOpen"),L.add(F).hide(),t.focus(),M.get("trapFocus")&&b.addEventListener&&(b.addEventListener("focus",k,!0),ha.one(fa,function(){b.removeEventListener("focus",k,!0)})),M.get("returnFocus")&&ha.one(fa,function(){a(M.el).focus()})}var p=parseFloat(M.get("opacity"));s.css({opacity:p===p?p:"",cursor:M.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),M.get("closeButton")?K.html(M.get("close")).appendTo(v):K.appendTo("<div/>"),r()}}function p(){t||(Y=!1,B=a(c),t=d(ia).attr({id:$,"class":a.support.opacity===!1?_+"IE":"",role:"dialog",tabindex:"-1"}).hide(),s=d(ia,"Overlay").hide(),E=a([d(ia,"LoadingOverlay")[0],d(ia,"LoadingGraphic")[0]]),u=d(ia,"Wrapper"),v=d(ia,"Content").append(F=d(ia,"Title"),G=d(ia,"Current"),J=a('<button type="button"/>').attr({id:_+"Previous"}),I=a('<button type="button"/>').attr({id:_+"Next"}),H=d("button","Slideshow"),E),K=a('<button type="button"/>').attr({id:_+"Close"}),u.append(d(ia).append(d(ia,"TopLeft"),w=d(ia,"TopCenter"),d(ia,"TopRight")),d(ia,!1,"clear:left").append(x=d(ia,"MiddleLeft"),v,y=d(ia,"MiddleRight")),d(ia,!1,"clear:left").append(d(ia,"BottomLeft"),z=d(ia,"BottomCenter"),d(ia,"BottomRight"))).find("div div").css({"float":"left"}),D=d(ia,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),L=I.add(J).add(G).add(H)),b.body&&!t.parent().length&&a(b.body).append(s,t.append(u,D))}function q(){function c(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||a.ctrlKey||(a.preventDefault(),o(this))}return t?(Y||(Y=!0,I.click(function(){X.next()}),J.click(function(){X.prev()}),K.click(function(){X.close()}),s.click(function(){M.get("overlayClose")&&X.close()}),a(b).bind("keydown."+_,function(a){var b=a.keyCode;T&&M.get("escKey")&&27===b&&(a.preventDefault(),X.close()),T&&M.get("arrowKey")&&A[1]&&!a.altKey&&(37===b?(a.preventDefault(),J.click()):39===b&&(a.preventDefault(),I.click()))}),a.isFunction(a.fn.on)?a(b).on("click."+_,"."+aa,c):a("."+aa).live("click."+_,c)),!0):!1}function r(){var b,e,f,g=X.prep,k=++ja;if(U=!0,S=!1,n(ga),n(ca),M.get("onLoad"),M.h=M.get("height")?h(M.get("height"),"y")-P-N:M.