2021-01-20 16:18:36 +01:00
|
|
|
!function(){"use strict";var t={n:function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,{a:o}),o},d:function(e,o){for(var a in o)t.o(o,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:o[a]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},e=jQuery,o="ajax-load",a="back-online",n="load";function _typeof(t){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _defineProperties(t,e){for(var o=0;o<e.length;o++){var a=e[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}!function($){var t=window,e=$(t),i=document,c=$("body"),l="MetaLightboxUI",r='<div class="meta-lightbox-error"><div class="alert alert-error alert-danger">Connection failure.</div></div>',s=function(){function MetaLightboxUI(){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,MetaLightboxUI)}return function _createClass(t,e,o){return e&&_defineProperties(t.prototype,e),o&&_defineProperties(t,o),t}(MetaLightboxUI,null,[{key:"init",value:function init(){console.log("".concat(l,": init ..."));var t=this;t.isMSIE=0;try{t.isHidpi=t.is_hdpi()}catch(e){console.log("".concat(l,": catch"))}$(".js".concat(l,',[data-toggle="lightbox"],[data-lightbox-gallery]')).on("click",(function(e){e.preventDefault(),e.stopPropagation();var o=$(e.currentTarget);t.show(o)})),$(".js".concat(l,"-close-inline")).on("click",(function(t){$(t.currentTarget).parents(".meta-lightbox-overlay").removeClass("meta-lightbox-open")}))}},{key:"is_hdpi",value:function is_hdpi(){console.log("".concat(l,": isHidpi"));return t.devicePixelRatio>1||t.matchMedia&&t.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches}},{key:"show",value:function show(t){console.log("".concat(l,": show"));var e=this;if(e.constructLightbox()){var o=e.$content;if(o){if(c.addClass("meta-lightbox-body-effect-fade"),e.process(o,t),t.data("lightbox-gallery")){var a=$('[data-lightbox-gallery="'.concat(t.data("lightbox-gallery"),'"]'));1===a.length?$(".meta-lightbox-nav").hide():$(".meta-lightbox-nav").show(),$(".meta-lightbox-prev").off("click").on("click",(function(o){o.preventDefault();var n=a.index(t),i=a.eq(n-1);i.length||(i=a.last()),setTimeout((function(){e.show(i)}),10)})),$(".meta-lightbox-next").off("click").on("click",(function(o){o.preventDefault();var n=a.index(t),i=a.eq(n+1);i.length||(i=a.first()),setTimeout((function(){e.show(i)}),10)}))}setTimeout((function(){e.$overlay.addClass("meta-lightbox-open")}),1)}}}},{key:"constructLightbox",value:function constructLightbox(){console.log("".concat(l,": constructLightbox"));var t=this,e=$("<div>",{class:"meta-lightbox-overlay meta-lightbox-theme-default meta-lightbox-effect-fade"}),o=$("<div>",{class:"meta-lightbox-wrap"}),a=$("<div>",{class:"meta-lightbox-content"}),n=$('<a href="#" class="meta-lightbox-nav meta-lightbox-prev"><i class="fas fa fa-chevron-left"></i> <span class="sr-only">Previous</span></a><a href="#" class="meta-lightbox-nav meta-lightbox-next"><i class="fa fas fa-chevron-right"></i> <span class="sr-only">Next</span></a>'),i=$('<a href="#" class="meta-lightbox-close fas fa fa-times" title="Close"><span class="sr-only">Close</span></a>'),r=$("<div>",{class:"meta-lightbox-title-wrap"});return t.$overlay||(t.isMSIE&&e.addClass("meta-lightbox-ie"),o.append(a),o.append(r),e.append(o),e.append(n),e.append(i),c.append(e),e.on("click",(function(e){e.preventDefault(),t.hide()})),i.on("click",(function(e){e.preventDefault(),t.hide()})),t.$overlay=e,t.$content=a,t.$title=r),t.$overlay}},{key:"setTitle",value:function setTitle(t){this.$title.html(t)}},{key:"process",value:function process(o,a){console.log("".concat(l,": process"));var n=this,c=a.att
|