%PDF- %PDF-
Direktori : /home/eirtvhdf/makkitrust.org/wp-content/plugins/essential-grid/public/assets/js/ |
Current File : /home/eirtvhdf/makkitrust.org/wp-content/plugins/essential-grid/public/assets/js/esgbox.min.js |
!function(t,e,s,o){"use strict";if(t.console=t.console||{info:function(t){}},s)if(s.fn.esgbox)console.info("esgBox already initialized");else{var i,n,a={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{esgbox:!0}}},iframe:{tpl:'<iframe id="esgbox-frame{rnd}" name="esgbox-frame{rnd}" class="esgbox-iframe" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="esgbox-video" muted autoplay playsinline controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="esgbox-container" role="dialog" tabindex="-1"><div class="esgbox-bg"></div><div class="esgbox-inner"><div class="esgbox-infobar"><span data-esgbox-index></span> / <span data-esgbox-count></span></div><div class="esgbox-toolbar">{{buttons}}</div><div class="esgbox-navigation">{{arrows}}</div><div class="esgbox-stage"></div><div class="esgbox-caption"><div class="esgbox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="esgbox-loading"></div>',errorTpl:'<div class="esgbox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-esgbox-download class="esgbox-button esgbox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-esgbox-zoom class="esgbox-button esgbox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-esgbox-close class="esgbox-button esgbox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-esgbox-prev class="esgbox-button esgbox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-esgbox-next class="esgbox-button esgbox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-esgbox-close class="esgbox-button esgbox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".esgbox-container",axis:"y"},wheel:"auto",onInit:s.noop,beforeLoad:s.noop,afterLoad:s.noop,beforeShow:s.noop,afterShowESGBX:s.noop,beforeClose:s.noop,afterClose:s.noop,onActivate:s.noop,onDeactivate:s.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schließen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergrößern"}}},r=s(t),l=s(e),c=0,h=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)},d=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)},g=function(){var t,s=e.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(void 0!==s.style[t])return o[t];return"transitionend"}(),u=function(t){return t&&t.length&&t[0].offsetHeight},p=function(t,e){var o=s.extend(!0,{},t,e);return s.each(e,function(t,e){s.isArray(e)&&(o[t]=e)}),o},b=function(t,e,o){this.opts=p({index:o},s.esgbox.defaults),s.isPlainObject(e)&&(this.opts=p(this.opts,e)),s.esgbox.isMobile&&(this.opts=p(this.opts,this.opts.mobile)),this.id=this.opts.id||++c,this.currIndex=parseInt(this.opts.index,10)||0,this.prevIndex=null,this.prevPos=null,this.currPos=0,this.firstRun=!0,this.group=[],this.slides={},this.addContent(t),this.group.length&&this.init()};s.extend(b.prototype,{init:function(){var o,i,n=this,a=n.group[n.currIndex].opts;a.closeExisting&&s.esgbox.close(!0),s("body").addClass("esgbox-active"),!s.esgbox.getInstance()&&!1!==a.hideScrollbar&&!s.esgbox.isMobile&&e.body.scrollHeight>t.innerHeight&&(s("head").append('<style id="esgbox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(t.innerWidth-e.documentElement.clientWidth)+"px;}</style>"),s("body").addClass("compensate-for-scrollbar")),i="",s.each(a.buttons,function(t,e){i+=a.btnTpl[e]||""}),o=s(n.translate(n,a.baseTpl.replace("{{buttons}}",i).replace("{{arrows}}",a.btnTpl.arrowLeft+a.btnTpl.arrowRight))).attr("id","esgbox-container-"+n.id).addClass(a.baseClass).data("EsgBox",n).appendTo(a.parentEl),n.$refs={container:o},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){n.$refs[t]=o.find(".esgbox-"+t)}),n.trigger("onInit"),n.activate(),n.jumpTo(n.currIndex)},translate:function(t,e){var s=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return void 0===s[e]?t:s[e]})},addContent:function(t){var e,o=this,i=s.makeArray(t);s.each(i,function(t,e){var i,n,a,r,l,c={},h={};s.isPlainObject(e)?(c=e,h=e.opts||e):"object"===s.type(e)&&s(e).length?(h=(i=s(e)).data()||{},(h=s.extend(!0,{},h,h.options)).$orig=i,c.src=o.opts.src||h.src||i.attr("href"),c.type||c.src||(c.type="inline",c.src=e)):c={type:"html",src:e+""},c.opts=s.extend(!0,{},o.opts,h),s.isArray(h.buttons)&&(c.opts.buttons=h.buttons),s.esgbox.isMobile&&c.opts.mobile&&(c.opts=p(c.opts,c.opts.mobile)),n=c.type||c.opts.type,r=c.src||"",!n&&r&&((a=r.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(n="video","false"!=c.opts.videoAutoPlay&&!1!==c.opts.videoAutoPlay||(c.opts.video.autoStart=!1,c.opts.video.tpl=c.opts.video.tpl.replace("muted autoplay",'preload="none"')),c.opts.video.format||(c.opts.video.format="video/"+("ogv"===a[1]?"ogg":a[1]))):r.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?n="image":r.match(/\.(pdf)((\?|#).*)?$/i)?(n="iframe",c=s.extend(!0,c,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===r.charAt(0)&&(n="inline")),n?c.type=n:o.trigger("objectNeedsType",c),c.contentType||(c.contentType=s.inArray(c.type,["html","inline","ajax"])>-1?"html":c.type),c.index=o.group.length,"auto"==c.opts.smallBtn&&(c.opts.smallBtn=s.inArray(c.type,["html","inline","ajax"])>-1),"auto"===c.opts.toolbar&&(c.opts.toolbar=!c.opts.smallBtn),c.$thumb=c.opts.$thumb||null,c.opts.$trigger&&c.index===o.opts.index&&(c.$thumb=c.opts.$trigger.find("img:first"),c.$thumb.length&&(c.opts.$orig=c.opts.$trigger)),c.$thumb&&c.$thumb.length||!c.opts.$orig||(c.$thumb=c.opts.$orig.find("img:first")),c.$thumb&&!c.$thumb.length&&(c.$thumb=null),c.thumb=c.opts.thumb||(c.$thumb?c.$thumb[0].src:null),"function"===s.type(c.opts.caption)&&(c.opts.caption=c.opts.caption.apply(e,[o,c])),"function"===s.type(o.opts.caption)&&(c.opts.caption=o.opts.caption.apply(e,[o,c])),c.opts.caption instanceof s||(c.opts.caption=void 0===c.opts.caption?"":c.opts.caption+""),"ajax"===c.type&&(l=r.split(/\s+/,2)).length>1&&(c.src=l.shift(),c.opts.filter=l.shift()),c.opts.modal&&(c.opts=s.extend(!0,c.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),o.group.push(c)}),Object.keys(o.slides).length&&(o.updateControls(),(e=o.Thumbs)&&e.isActive&&(e.create(),e.focus()))},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on("click.egbx-close","[data-esgbox-close]",function(t){t.stopPropagation(),t.preventDefault(),e.close(t)}).on("touchstart.egbx-prev click.egbx-prev","[data-esgbox-prev]",function(t){t.stopPropagation(),t.preventDefault(),e.previous()}).on("touchstart.egbx-next click.egbx-next","[data-esgbox-next]",function(t){t.stopPropagation(),t.preventDefault(),e.next()}).on("click.egbx","[data-esgbox-zoom]",function(t){e[e.isScaledDown()?"scaleToActual":"scaleToFit"]()}),r.on("orientationchange.egbx resize.egbx",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(e.requestId&&d(e.requestId),e.requestId=h(function(){e.update(t)})):(e.current&&"iframe"===e.current.type&&e.$refs.stage.hide(),setTimeout(function(){e.$refs.stage.show(),e.update(t)},s.esgbox.isMobile?600:250))}),l.on("keydown.egbx",function(t){var o=(s.esgbox?s.esgbox.getInstance():null).current,i=t.keyCode||t.which;if(9!=i){if(!(!o.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||s(t.target).is("input,textarea,video,audio,select")))return 8===i||27===i?(t.preventDefault(),void e.close(t)):37===i||38===i?(t.preventDefault(),void e.previous()):39===i||40===i?(t.preventDefault(),void e.next()):void e.trigger("afterKeydown",t,i)}else o.opts.trapFocus&&e.focus(t)}),e.group[e.currIndex].opts.idleTime&&(e.idleSecondsCounter=0,l.on("mousemove.egbx-idle mouseleave.egbx-idle mousedown.egbx-idle touchstart.egbx-idle touchmove.egbx-idle scroll.egbx-idle keydown.egbx-idle",function(t){e.idleSecondsCounter=0,e.isIdle&&e.showControls(),e.isIdle=!1}),e.idleInterval=t.setInterval(function(){e.idleSecondsCounter++,e.idleSecondsCounter>=e.group[e.currIndex].opts.idleTime&&!e.isDragging&&(e.isIdle=!0,e.idleSecondsCounter=0,e.hideControls())},1e3))},removeEvents:function(){r.off("orientationchange.egbx resize.egbx"),l.off("keydown.egbx .egbx-idle"),this.$refs.container.off(".egbx-close .egbx-prev .egbx-next"),this.idleInterval&&(t.clearInterval(this.idleInterval),this.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e){var o,i,n,a,r,l,c,h,d,g=this,p=g.group.length;if(!(g.isDragging||g.isClosing||g.isAnimating&&g.firstRun)){if(t=parseInt(t,10),!(n=g.current?g.current.opts.loop:g.opts.loop)&&(t<0||t>=p))return!1;if(o=g.firstRun=!Object.keys(g.slides).length,r=g.current,g.prevIndex=g.currIndex,g.prevPos=g.currPos,a=g.createSlide(t),p>1&&((n||a.index<p-1)&&g.createSlide(t+1),(n||a.index>0)&&g.createSlide(t-1)),g.current=a,g.currIndex=a.index,g.currPos=a.pos,g.trigger("beforeShow",o),g.updateControls(),a.forcedDuration=void 0,s.isNumeric(e)?a.forcedDuration=e:e=a.opts[o?"animationDuration":"transitionDuration"],e=parseInt(e,10),i=g.isMoved(a),a.$slide.addClass("esgbox-slide--current"),o)return a.opts.animationEffect&&e&&g.$refs.container.css("transition-duration",e+"ms"),g.$refs.container.addClass("esgbox-is-open").trigger("focus"),g.loadSlide(a),void g.preload("image");l=s.esgbox.getTranslate(r.$slide),c=s.esgbox.getTranslate(g.$refs.stage),s.each(g.slides,function(t,e){s.esgbox.stop(e.$slide,!0)}),r.pos!==a.pos&&(r.isComplete=!1),r.$slide.removeClass("esgbox-slide--complete esgbox-slide--current"),i?(d=l.left-(r.pos*l.width+r.pos*r.opts.gutter),s.each(g.slides,function(t,o){o.$slide.removeClass("esgbox-animated").removeClass(function(t,e){return(e.match(/(^|\s)esgbox-fx-\S+/g)||[]).join(" ")});var i=o.pos*l.width+o.pos*o.opts.gutter;s.esgbox.setTranslate(o.$slide,{top:0,left:i-c.left+d}),o.pos!==a.pos&&o.$slide.addClass("esgbox-slide--"+(o.pos>a.pos?"next":"previous")),u(o.$slide),s.esgbox.animate(o.$slide,{top:0,left:(o.pos-a.pos)*l.width+(o.pos-a.pos)*o.opts.gutter},e,function(){o.$slide.css({transform:"",opacity:""}).removeClass("esgbox-slide--next esgbox-slide--previous"),o.pos===g.currPos&&g.complete()})})):e&&a.opts.transitionEffect&&(h="esgbox-animated esgbox-fx-"+a.opts.transitionEffect,r.$slide.addClass("esgbox-slide--"+(r.pos>a.pos?"next":"previous")),s.esgbox.animate(r.$slide,h,e,function(){r.$slide.removeClass(h).removeClass("esgbox-slide--next esgbox-slide--previous")},!1)),a.isLoaded?g.revealContent(a):g.loadSlide(a),g.preload("image")}},createSlide:function(t){var e,o;return o=(o=t%this.group.length)<0?this.group.length+o:o,!this.slides[t]&&this.group[o]&&(e=s('<div class="esgbox-slide"></div>').appendTo(this.$refs.stage),this.slides[t]=s.extend(!0,{},this.group[o],{pos:t,$slide:e,isLoaded:!1}),this.updateSlide(this.slides[t])),this.slides[t]},scaleToActual:function(t,e,o){var i,n,a,r,l,c=this,h=c.current,d=h.$content,g=s.esgbox.getTranslate(h.$slide).width,u=s.esgbox.getTranslate(h.$slide).height,p=h.width,b=h.height;c.isAnimating||c.isMoved()||!d||"image"!=h.type||!h.isLoaded||h.hasError||(c.isAnimating=!0,s.esgbox.stop(d),t=void 0===t?.5*g:t,e=void 0===e?.5*u:e,(i=s.esgbox.getTranslate(d)).top-=s.esgbox.getTranslate(h.$slide).top,i.left-=s.esgbox.getTranslate(h.$slide).left,r=p/i.width,l=b/i.height,n=.5*g-.5*p,a=.5*u-.5*b,p>g&&((n=i.left*r-(t*r-t))>0&&(n=0),n<g-p&&(n=g-p)),b>u&&((a=i.top*l-(e*l-e))>0&&(a=0),a<u-b&&(a=u-b)),c.updateCursor(p,b),s.esgbox.animate(d,{top:a,left:n,scaleX:r,scaleY:l},o||366,function(){c.isAnimating=!1}),c.SlideShow&&c.SlideShow.isActive&&c.SlideShow.stop())},scaleToFit:function(t){var e,o=this,i=o.current,n=i.$content;o.isAnimating||o.isMoved()||!n||"image"!=i.type||!i.isLoaded||i.hasError||(o.isAnimating=!0,s.esgbox.stop(n),e=o.getFitPos(i),o.updateCursor(e.width,e.height),s.esgbox.animate(n,{top:e.top,left:e.left,scaleX:e.width/n.width(),scaleY:e.height/n.height()},t||366,function(){o.isAnimating=!1}))},getFitPos:function(t){var e,o,i,n,a=t.$content,r=t.$slide,l=t.width||t.opts.width,c=t.height||t.opts.height,h={};return!!(t.isLoaded&&a&&a.length)&&(e=s.esgbox.getTranslate(this.$refs.stage).width,o=s.esgbox.getTranslate(this.$refs.stage).height,e-=parseFloat(r.css("paddingLeft"))+parseFloat(r.css("paddingRight"))+parseFloat(a.css("marginLeft"))+parseFloat(a.css("marginRight")),o-=parseFloat(r.css("paddingTop"))+parseFloat(r.css("paddingBottom"))+parseFloat(a.css("marginTop"))+parseFloat(a.css("marginBottom")),l&&c||(l=e,c=o),(l*=i=Math.min(1,e/l,o/c))>e-.5&&(l=e),(c*=i)>o-.5&&(c=o),"image"===t.type?(h.top=Math.floor(.5*(o-c))+parseFloat(r.css("paddingTop")),h.left=Math.floor(.5*(e-l))+parseFloat(r.css("paddingLeft"))):"video"===t.contentType&&(c>l/(n=t.opts.width&&t.opts.height?l/c:t.opts.ratio||16/9)?c=l/n:l>c*n&&(l=c*n)),h.width=l,h.height=c,h)},update:function(t){var e=this;s.each(e.slides,function(s,o){e.updateSlide(o,t)})},updateSlide:function(t,e){var o=t&&t.$content,i=t.width||t.opts.width,n=t.height||t.opts.height,a=t.$slide;this.adjustCaption(t),o&&(i||n||"video"===t.contentType)&&!t.hasError&&(s.esgbox.stop(o),s.esgbox.setTranslate(o,this.getFitPos(t)),t.pos===this.currPos&&(this.isAnimating=!1,this.updateCursor())),this.adjustLayout(t),a.length&&(a.trigger("refresh"),t.pos===this.currPos&&this.$refs.toolbar.add(this.$refs.navigation.find(".esgbox-button--arrow_right")).toggleClass("compensate-for-scrollbar",a.get(0).scrollHeight>a.get(0).clientHeight)),this.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,i=o.$slide;!e.isClosing&&o&&(i.siblings().css({transform:"",opacity:""}),i.parent().children().removeClass("esgbox-slide--previous esgbox-slide--next"),s.esgbox.animate(i,{top:0,left:0,opacity:1},void 0===t?0:t,function(){i.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o,i=t||this.current;return!!i&&(o=s.esgbox.getTranslate(this.$refs.stage),e=s.esgbox.getTranslate(i.$slide),!i.$slide.hasClass("esgbox-animated")&&(Math.abs(e.top-o.top)>.5||Math.abs(e.left-o.left)>.5))},updateCursor:function(t,e){var o,i,n=this.current,a=this.$refs.container;n&&!this.isClosing&&this.Guestures&&(a.removeClass("esgbox-is-zoomable esgbox-can-zoomIn esgbox-can-zoomOut esgbox-can-swipe esgbox-can-pan"),i=!!(o=this.canPan(t,e))||this.isZoomable(),a.toggleClass("esgbox-is-zoomable",i),s("[data-esgbox-zoom]").prop("disabled",!i),o?a.addClass("esgbox-can-pan"):i&&("zoom"===n.opts.clickContent||s.isFunction(n.opts.clickContent)&&"zoom"==n.opts.clickContent(n))?a.addClass("esgbox-can-zoomIn"):n.opts.touch&&(n.opts.touch.vertical||this.group.length>1)&&"video"!==n.contentType&&a.addClass("esgbox-can-swipe"))},isZoomable:function(){var t,e=this.current;if(e&&!this.isClosing&&"image"===e.type&&!e.hasError){if(!e.isLoaded)return!0;if((t=this.getFitPos(e))&&(e.width>t.width||e.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=!1,i=this.current,n=i.$content;return void 0!==t&&void 0!==e?o=t<i.width&&e<i.height:n&&(o=(o=s.esgbox.getTranslate(n)).width<i.width&&o.height<i.height),o},canPan:function(t,e){var o=this.current,i=null,n=!1;return"image"===o.type&&(o.isComplete||t&&e)&&!o.hasError&&(n=this.getFitPos(o),void 0!==t&&void 0!==e?i={width:t,height:e}:o.isComplete&&(i=s.esgbox.getTranslate(o.$content)),i&&n&&(n=Math.abs(i.width-n.width)>1.5||Math.abs(i.height-n.height)>1.5)),n},loadSlide:function(t){var e,o,i,n=this;if(!t.isLoading&&!t.isLoaded){if(t.isLoading=!0,!1===n.trigger("beforeLoad",t))return t.isLoading=!1,!1;switch(e=t.type,(o=t.$slide).off("refresh").trigger("onReset").addClass(t.opts.slideClass),e){case"image":n.setImage(t);break;case"iframe":n.setIframe(t);break;case"html":n.setContent(t,t.src||t.content);break;case"video":n.setContent(t,t.opts.video.tpl.replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.opts.videoFormat||t.opts.video.format||"").replace("{{poster}}",t.thumb||""));break;case"inline":s(t.src).length?n.setContent(t,s(t.src)):n.setError(t);break;case"ajax":n.showLoading(t),i=s.ajax(s.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,s){"success"===s&&n.setContent(t,e)},error:function(e,s){e&&"abort"!==s&&n.setError(t)}})),o.one("onReset",function(){i.abort()});break;default:n.setError(t)}return!0}},setImage:function(t){var o,i=this;setTimeout(function(){var e=t.$image;i.isClosing||!t.isLoading||e&&e.length&&e[0].complete||t.hasError||i.showLoading(t)},50),i.checkSrcset(t),t.$content=s('<div class="esgbox-content"></div>').addClass("esgbox-is-hidden").appendTo(t.$slide.addClass("esgbox-slide--image")),!1!==t.opts.preload&&t.opts.width&&t.opts.height&&t.thumb&&(t.width=t.opts.width,t.height=t.opts.height,(o=e.createElement("img")).onerror=function(){s(this).remove(),t.$ghost=null},o.onload=function(){i.afterLoad(t)},t.$ghost=s(o).addClass("esgbox-image").appendTo(t.$content).attr("src",t.thumb)),i.setBigImage(t)},checkSrcset:function(e){var s,o,i,n,a=e.opts.srcset||e.opts.image.srcset;if(a){i=t.devicePixelRatio||1,n=t.innerWidth*i,(o=a.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,s){var o=parseInt(t.substring(0,t.length-1),10);if(0===s)return e.url=t;o&&(e.value=o,e.postfix=t[t.length-1])}),e})).sort(function(t,e){return t.value-e.value});for(var r=0;r<o.length;r++){var l=o[r];if("w"===l.postfix&&l.value>=n||"x"===l.postfix&&l.value>=i){s=l;break}}!s&&o.length&&(s=o[o.length-1]),s&&(e.src=s.url,e.width&&e.height&&"w"==s.postfix&&(e.height=e.width/e.height*s.value,e.width=s.value),e.opts.srcset=a)}},setBigImage:function(t){var o=this,i=e.createElement("img"),n=s(i);t.$image=n.one("error",function(){o.setError(t)}).one("load",function(){var e;t.$ghost||(o.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),o.afterLoad(t)),o.isClosing||(t.opts.srcset&&((e=t.opts.sizes)&&"auto"!==e||(e=(t.width/t.height>1&&r.width()/r.height()>1?"100":Math.round(t.width/t.height*100))+"vw"),n.attr("sizes",e).attr("srcset",t.opts.srcset)),t.$ghost&&setTimeout(function(){t.$ghost&&!o.isClosing&&t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))),o.hideLoading(t))}).addClass("esgbox-image").attr("src",t.src).appendTo(t.$content),(i.complete||"complete"==i.readyState)&&n.naturalWidth&&n.naturalHeight?n.trigger("load"):i.error&&n.trigger("error")},resolveImageSlideSize:function(t,e,s){var o=parseInt(t.opts.width,10),i=parseInt(t.opts.height,10);t.width=e,t.height=s,o>0&&(t.width=o,t.height=Math.floor(o*s/e)),i>0&&(t.width=Math.floor(i*e/s),t.height=i)},setIframe:function(t){var e,o=this,i=t.opts.iframe,n=t.$slide;t.$content=s('<div class="esgbox-content'+(i.preload?" esgbox-is-hidden":"")+'"></div>').css(i.css).appendTo(n),n.addClass("esgbox-slide--"+t.contentType),t.$iframe=e=s(i.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(i.attr).appendTo(t.$content),i.preload?(o.showLoading(t),e.on("load.egbx error.egbx",function(e){this.isReady=1,t.$slide.trigger("refresh"),o.afterLoad(t)}),n.on("refresh.egbx",function(){var s,o=t.$content,a=i.css.width,r=i.css.height;if(1===e[0].isReady){try{s=e.contents().find("body")}catch(t){}s&&s.length&&s.children().length&&(n.css("overflow","visible"),o.css({width:"100%","max-width":"100%",height:"9999px"}),void 0===a&&(a=Math.ceil(Math.max(s[0].clientWidth,s.outerWidth(!0)))),o.css("width",a||"").css("max-width",""),void 0===r&&(r=Math.ceil(Math.max(s[0].clientHeight,s.outerHeight(!0)))),o.css("height",r||""),n.css("overflow","auto")),o.removeClass("esgbox-is-hidden")}})):o.afterLoad(t),e.attr("src",t.src),n.one("onReset",function(){try{s(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}s(this).off("refresh.egbx").empty(),t.isLoaded=!1,t.isRevealed=!1})},setContent:function(t,e){var o;this.isClosing||(this.hideLoading(t),t.$content&&s.esgbox.stop(t.$content),t.$slide.empty(),(o=e)&&o.hasOwnProperty&&o instanceof s&&e.parent().length?((e.hasClass("esgbox-content")||e.parent().hasClass("esgbox-content"))&&e.parents(".esgbox-slide").trigger("onReset"),t.$placeholder=s("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===s.type(e)&&(e=s("<div>").append(s.trim(e)).contents()),t.opts.filter&&(e=s("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){s(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("esgbox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(s(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),s(e).appendTo(t.$slide),s(e).is("video,audio")&&(s(e).addClass("esgbox-video"),s(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||s(e).attr("width"),t.opts.height=t.opts.height||s(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.esgbox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("esgbox-content"),t.$slide.addClass("esgbox-slide--"+t.contentType),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("esgbox-slide--"+t.contentType).addClass("esgbox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){(t=t||this.current)&&!t.$spinner&&(t.$spinner=s(this.translate(this,this.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){(t=t||this.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){this.isClosing||(t.isLoading=!1,t.isLoaded=!0,this.trigger("afterLoad",t),this.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=s(this.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.egbx",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&s('<div class="esgbox-spaceball"></div>').appendTo(t.$content)),this.adjustCaption(t),this.adjustLayout(t),t.pos===this.currPos&&this.updateCursor(),this.revealContent(t))},adjustCaption:function(t){var e,s=t||this.current,o=s.opts.caption,i=s.opts.preventCaptionOverlap,n=this.$refs.caption,a=!1;n.toggleClass("esgbox-caption--separate",i),i&&o&&o.length&&(s.pos!==this.currPos?((e=n.clone().appendTo(n.parent())).children().eq(0).empty().html(o),a=e.outerHeight(!0),e.empty().remove()):this.$caption&&(a=this.$caption.outerHeight(!0)),s.$slide.css("padding-bottom",a||""))},adjustLayout:function(t){var e,s,o,i,n=t||this.current;n.isLoaded&&!0!==n.opts.disableLayoutFix&&(n.$content.css("margin-bottom",""),n.$content.outerHeight()>n.$slide.height()+.5&&(o=n.$slide[0].style["padding-bottom"],i=n.$slide.css("padding-bottom"),parseFloat(i)>0&&(e=n.$slide[0].scrollHeight,n.$slide.css("padding-bottom",0),Math.abs(e-n.$slide[0].scrollHeight)<1&&(s=i),n.$slide.css("padding-bottom",o))),n.$content.css("margin-bottom",s))},revealContent:function(t){var e,o,i,n,a=this,r=t.$slide,l=!1,c=!1,h=a.isMoved(t),d=t.isRevealed;return t.isRevealed=!0,e=t.opts[a.firstRun?"animationEffect":"transitionEffect"],i=t.opts[a.firstRun?"animationDuration":"transitionDuration"],i=parseInt(void 0===t.forcedDuration?i:t.forcedDuration,10),!h&&t.pos===a.currPos&&i||(e=!1),"zoom"===e&&(t.pos===a.currPos&&i&&"image"===t.type&&!t.hasError&&(c=a.getThumbPos(t))?l=a.getFitPos(t):e="fade"),"zoom"===e?(a.isAnimating=!0,l.scaleX=l.width/c.width,l.scaleY=l.height/c.height,"auto"==(n=t.opts.zoomOpacity)&&(n=Math.abs(t.width/t.height-c.width/c.height)>.1),n&&(c.opacity=.1,l.opacity=1),s.esgbox.setTranslate(t.$content.removeClass("esgbox-is-hidden"),c),u(t.$content),void s.esgbox.animate(t.$content,l,i,function(){a.isAnimating=!1,a.complete()})):(a.updateSlide(t),e?(s.esgbox.stop(r),o="esgbox-slide--"+(t.pos>=a.prevPos?"next":"previous")+" esgbox-animated esgbox-fx-"+e,r.addClass(o).removeClass("esgbox-slide--current"),t.$content.removeClass("esgbox-is-hidden"),u(r),"image"!==t.type&&t.$content.hide().show(0),void s.esgbox.animate(r,"esgbox-slide--current",i,function(){r.removeClass(o).css({transform:"",opacity:""}),t.pos===a.currPos&&a.complete()},!0)):(t.$content.removeClass("esgbox-is-hidden"),d||!h||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===a.currPos&&a.complete())))},getThumbPos:function(t){var o,i,n,a,r,l,c=t.$thumb;return!(!c||!function(t){var o,i;return!(!t||t.ownerDocument!==e)&&(s(".esgbox-container").css("pointer-events","none"),o={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},i=e.elementFromPoint(o.x,o.y)===t,s(".esgbox-container").css("pointer-events",""),i)}(c[0]))&&(i=s.esgbox.getTranslate(c),n=parseFloat(c.css("border-top-width")||0),a=parseFloat(c.css("border-right-width")||0),r=parseFloat(c.css("border-bottom-width")||0),l=parseFloat(c.css("border-left-width")||0),o={top:i.top+n,left:i.left+l,width:i.width-a-l,height:i.height-n-r,scaleX:1,scaleY:1},i.width>0&&i.height>0&&o)},complete:function(){var t,e=this,o=e.current,i={};!e.isMoved()&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),e.preload("inline"),u(o.$slide),o.$slide.addClass("esgbox-slide--complete"),s.each(e.slides,function(t,o){o.pos>=e.currPos-1&&o.pos<=e.currPos+1?i[o.pos]=o:o&&(s.esgbox.stop(o.$slide),o.$slide.off().remove())}),e.slides=i),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShowESGBX"),o.opts.video.autoStart&&o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next()}),o.opts.autoFocus&&"html"===o.contentType&&((t=o.$content.find("input[autofocus]:enabled:visible:first")).length?t.trigger("focus"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,s;this.group.length<2||(s=this.slides[this.currPos+1],(e=this.slides[this.currPos-1])&&e.type===t&&this.loadSlide(e),s&&s.type===t&&this.loadSlide(s))},focus:function(t,o){var i,n,a=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");this.isClosing||((i=(i=!t&&this.current&&this.current.isComplete?this.current.$slide.find("*:visible"+(o?":not(.esgbox-close-small)":"")):this.$refs.container.find("*:visible")).filter(a).filter(function(){return"hidden"!==s(this).css("visibility")&&!s(this).hasClass("disabled")})).length?(n=i.index(e.activeElement),t&&t.shiftKey?(n<0||0==n)&&(t.preventDefault(),i.eq(i.length-1).trigger("focus")):(n<0||n==i.length-1)&&(t&&t.preventDefault(),i.eq(0).trigger("focus"))):this.$refs.container.trigger("focus"))},activate:function(){var t=this;s(".esgbox-container").each(function(){var e=s(this).data("EsgBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,n,a,r,l,c,d=this,g=d.current,p=function(){d.cleanUp(t)};return!d.isClosing&&(d.isClosing=!0,!1===d.trigger("beforeClose",t)?(d.isClosing=!1,h(function(){d.update()}),!1):(d.removeEvents(),n=g.$content,o=g.opts.animationEffect,i=s.isNumeric(e)?e:o?g.opts.animationDuration:0,g.$slide.removeClass("esgbox-slide--complete esgbox-slide--next esgbox-slide--previous esgbox-animated"),!0!==t?s.esgbox.stop(g.$slide):o=!1,g.$slide.siblings().trigger("onReset").remove(),i&&d.$refs.container.removeClass("esgbox-is-open").addClass("esgbox-is-closing").css("transition-duration",i+"ms"),d.hideLoading(g),d.hideControls(!0),d.updateCursor(),"zoom"!==o||n&&i&&"image"===g.type&&!d.isMoved()&&!g.hasError&&(c=d.getThumbPos(g))||(o="fade"),"zoom"===o?(s.esgbox.stop(n),l={top:(a=s.esgbox.getTranslate(n)).top,left:a.left,scaleX:a.width/c.width,scaleY:a.height/c.height,width:c.width,height:c.height},"auto"==(r=g.opts.zoomOpacity)&&(r=Math.abs(g.width/g.height-c.width/c.height)>.1),r&&(c.opacity=0),s.esgbox.setTranslate(n,l),u(n),s.esgbox.animate(n,c,i,p),!0):(o&&i?s.esgbox.animate(g.$slide.addClass("esgbox-slide--previous").removeClass("esgbox-slide--current"),"esgbox-animated esgbox-fx-"+o,i,p):!0===t?setTimeout(p,i):p(),!0)))},cleanUp:function(e){var o,i,n,a=this.current.opts.$orig;this.current.$slide.trigger("onReset"),this.$refs.container.empty().remove(),this.trigger("afterClose",e),this.current.opts.backFocus&&(a&&a.length&&a.is(":visible")||(a=this.$trigger),a&&a.length&&(i=t.scrollX,n=t.scrollY,a.trigger("focus"),s("html, body").scrollTop(n).scrollLeft(i))),this.current=null,(o=s.esgbox.getInstance())?o.activate():(s("body").removeClass("esgbox-active compensate-for-scrollbar"),s("#esgbox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),n=e&&e.opts?e:this.current;if(n?i.unshift(n):n=this,i.unshift(this),s.isFunction(n.opts[t])&&(o=n.opts[t].apply(n,i)),!1===o)return o;"afterClose"!==t&&this.$refs?this.$refs.container.trigger(t+".egbx",i):l.trigger(t+".egbx",i)},updateControls:function(){var t=this.current,o=t.index,i=this.$refs.container,n=this.$refs.caption,a=t.opts.caption;t.$slide.trigger("refresh"),a&&a.length?(this.$caption=n,n.children().eq(0).html(a)):this.$caption=null,this.hasHiddenControls||this.isIdle||this.showControls(),i.find("[data-esgbox-count]").html(this.group.length),i.find("[data-esgbox-index]").html(o+1),i.find("[data-esgbox-prev]").prop("disabled",!t.opts.loop&&o<=0),i.find("[data-esgbox-next]").prop("disabled",!t.opts.loop&&o>=this.group.length-1),"image"===t.type?i.find("[data-esgbox-zoom]").show().end().find("[data-esgbox-download]").attr("href",t.opts.image.src||t.src).show():t.opts.toolbar&&i.find("[data-esgbox-download],[data-esgbox-zoom]").hide(),s(e.activeElement).is(":hidden,[disabled]")&&this.$refs.container.trigger("focus")},hideControls:function(t){var e=["infobar","toolbar","nav"];!t&&this.current.opts.preventCaptionOverlap||e.push("caption"),this.$refs.container.removeClass(e.map(function(t){return"esgbox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this.current?this.current.opts:this.opts,e=this.$refs.container;this.hasHiddenControls=!1,this.idleSecondsCounter=0,e.toggleClass("esgbox-show-toolbar",!(!t.toolbar||!t.buttons)).toggleClass("esgbox-show-infobar",!!(t.infobar&&this.group.length>1)).toggleClass("esgbox-show-caption",!!this.$caption).toggleClass("esgbox-show-nav",!!(t.arrows&&this.group.length>1)).toggleClass("esgbox-is-modal",!!t.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),s.esgbox={version:"3.5.7",defaults:a,getInstance:function(t){var e=s('.esgbox-container:not(".esgbox-is-closing"):last').data("EsgBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&("string"===s.type(t)?e[t].apply(e,o):"function"===s.type(t)&&t.apply(e,o),e)},open:function(t,e,s){return new b(t,e,s)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),l.add("body").off("click.egbx-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(i=e.createElement("div"),t.getComputedStyle&&t.getComputedStyle(i)&&t.getComputedStyle(i).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)),getTranslate:function(t){var e;return!(!t||!t.length)&&{top:(e=t[0].getBoundingClientRect()).top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))}},setTranslate:function(t,e){var s="",o={};if(t&&e)return void 0===e.left&&void 0===e.top||(s=(void 0===e.left?t.position().left:e.left)+"px, "+(void 0===e.top?t.position().top:e.top)+"px",s=this.use3d?"translate3d("+s+", 0px)":"translate("+s+")"),void 0!==e.scaleX&&void 0!==e.scaleY?s+=" scale("+e.scaleX+", "+e.scaleY+")":void 0!==e.scaleX&&(s+=" scaleX("+e.scaleX+")"),s.length&&(o.transform=s),void 0!==e.opacity&&(o.opacity=e.opacity),void 0!==e.width&&(o.width=e.width),void 0!==e.height&&(o.height=e.height),t.css(o)},animate:function(t,e,o,i,n){var a,r=this;s.isFunction(o)&&(i=o,o=null),r.stop(t),a=r.getTranslate(t),t.on(g,function(l){(!l||!l.originalEvent||t.is(l.originalEvent.target)&&"z-index"!=l.originalEvent.propertyName)&&(r.stop(t),s.isNumeric(o)&&t.css("transition-duration",""),s.isPlainObject(e)?void 0!==e.scaleX&&void 0!==e.scaleY&&r.setTranslate(t,{top:e.top,left:e.left,width:a.width*e.scaleX,height:a.height*e.scaleY,scaleX:1,scaleY:1}):!0!==n&&t.removeClass(e),s.isFunction(i)&&i(l))}),s.isNumeric(o)&&t.css("transition-duration",o+"ms"),s.isPlainObject(e)?(void 0!==e.scaleX&&void 0!==e.scaleY&&(delete e.width,delete e.height,t.parent().hasClass("esgbox-slide--image")&&t.parent().addClass("esgbox-is-scaling")),s.esgbox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(g)},o+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(g),t.off(g).css("transition-duration",""),t.parent().removeClass("esgbox-is-scaling"))}},s.fn.esgbox=function(t){var e;return(e=(t=t||{}).selector||!1)?s("body").off("click.egbx-start",e).on("click.egbx-start",e,{options:t},f):this.off("click.egbx-start").on("click.egbx-start",{items:this,options:t},f),this},l.on("click.egbx-start","[data-esgbox]",f),l.on("click.egbx-start","[data-esgbox-trigger]",function(t){s('[data-esgbox="'+s(this).attr("data-esgbox-trigger")+'"]').eq(s(this).attr("data-esgbox-index")||0).trigger("click.egbx-start",{$trigger:s(this)})}),n=null,l.on("mousedown mouseup focus blur",".esgbox-button",function(t){switch(t.type){case"mousedown":n=s(this);break;case"mouseup":n=null;break;case"focusin":s(".esgbox-button").removeClass("esgbox-focus"),s(this).is(n)||s(this).is("[disabled]")||s(this).addClass("esgbox-focus");break;case"focusout":s(".esgbox-button").removeClass("esgbox-focus")}})}function f(t,e){var o,i,n,a=[],r=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=p(t.data.options,e)),o=e.$target||s(t.currentTarget).trigger("blur"),(n=s.esgbox.getInstance())&&n.$trigger&&n.$trigger.is(o)||(a=e.selector?s(e.selector):(i=o.attr("data-esgbox")||"")?(a=t.data?t.data.items:[]).length?a.filter('[data-esgbox="'+i+'"]'):s('[data-esgbox="'+i+'"]'):[o],(r=s(a).index(o))<0&&(r=0),(n=s.esgbox.open(a,e,r)).$trigger=o))}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{rel:0,autoplay:1,autohide:1,fs:1,hd:1,playsinline:1,wmode:"transparent",enablejsapi:1,html5:1,mute:0},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},s=function(e,s,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(s,function(t,s){e=e.replace("$"+t,s||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e};t(document).on("objectNeedsType.egbx",function(o,i,n){var a,r,l,c,h,d,g,u=n.src||"",p=!1;a=t.extend(!0,{},e,n.opts.media),t.each(a,function(e,o){if(l=u.match(o.matcher)){if(p=o.type,g=e,d={},o.paramPlace&&l[o.paramPlace]){"?"==(h=l[o.paramPlace])[0]&&(h=h.substring(1)),h=h.split("&");for(var i=0;i<h.length;++i){var b=h[i].split("=",2);2==b.length&&(d[b[0]]=decodeURIComponent(b[1].replace(/\+/g," ")))}}return c=t.extend(!0,{},o.params,n.opts[e],d),("youtube"===e&&"false"==n.opts.videoAutoPlay||!1===n.opts.videoAutoPlay)&&(n.opts.video.autoStart=!1,c.autoplay=0,c.mute=0),("vimeo"===e&&"false"==n.opts.videoAutoPlay||!1===n.opts.videoAutoPlay)&&(n.opts.video.autoStart=!1,c.autoplay=0,c.muted=0),u="function"===t.type(o.url)?o.url.call(this,l,c,n):s(o.url,l,c),r="function"===t.type(o.thumb)?o.thumb.call(this,l,c,n):s(o.thumb,l),"youtube"===e?("false"!=n.opts.videoAutoPlay&&!1!==n.opts.videoAutoPlay||(n.opts.video.autoStart=!1,a.youtube.params.autoplay=0,a.youtube.params.mute=0),u=u.replace(/&t=((\d+)m)?(\d+)s/,function(t,e,s,o){return"&start="+((s?60*parseInt(s,10):0)+parseInt(o,10))})):"vimeo"===e&&(u=u.replace("&%23","#")),!1}}),p?(n.opts.thumb||n.opts.$thumb&&n.opts.$thumb.length||(n.opts.thumb=r),"iframe"===p&&(n.opts=t.extend(!0,n.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),t.extend(n,{type:p,src:u,origSrc:n.src,contentSource:g,contentType:"image"===p?"image":"gmap_place"==g||"gmap_search"==g?"map":"video"})):u&&(n.type=n.opts.defaultType)});var o={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,s=this;this[t].loaded?setTimeout(function(){s.done(t)}):this[t].loading||(this[t].loading=!0,(e=document.createElement("script")).type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){s[t].loaded=!0,s.done(t)}:e.onload=function(){s[t].loaded=!0,s.done(t)},document.body.appendChild(e))},done:function(e){var s,o;"youtube"===e&&delete window.onYouTubeIframeAPIReady,(s=t.esgbox.getInstance())&&(o=s.current.$content.find("iframe"),"youtube"===e&&void 0!==YT&&YT?new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&&s.next()}}}):"vimeo"===e&&void 0!==Vimeo&&Vimeo&&new Vimeo.Player(o).on("ended",function(){s.next()}))}};t(document).on({"afterShowESGBX.egbx":function(t,e,s){e.group.length>1&&("youtube"===s.contentSource||"vimeo"===s.contentSource)&&o.load(s.contentSource)}})}(jQuery),function(t,e,s){"use strict";var o=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)},i=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)},n=function(e){var s=[];for(var o in e=(e=e.originalEvent||e||t.e).touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e])e[o].pageX?s.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&s.push({x:e[o].clientX,y:e[o].clientY});return s},a=function(t,e,s){return e&&t?"x"===s?t.x-e.x:"y"===s?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||s.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;e<i;e++)if("data-esgbox-"===o[e].nodeName.substr(0,14))return!0;return!1},l=function(e){for(var s,o,i,n,a,r=!1;s=e.get(0),o=void 0,i=void 0,n=void 0,a=void 0,o=t.getComputedStyle(s)["overflow-y"],i=t.getComputedStyle(s)["overflow-x"],n=("scroll"===o||"auto"===o)&&s.scrollHeight>s.clientHeight,a=("scroll"===i||"auto"===i)&&s.scrollWidth>s.clientWidth,!(r=n||a)&&(e=e.parent()).length&&!e.hasClass("esgbox-stage")&&!e.is("body"););return r},c=function(t){this.instance=t,this.$bg=t.$refs.bg,this.$stage=t.$refs.stage,this.$container=t.$refs.container,this.destroy(),this.$container.on("touchstart.egbx.touch mousedown.egbx.touch",s.proxy(this,"ontouchstart"))};c.prototype.destroy=function(){this.$container.off(".egbx.touch"),s(e).off(".egbx.touch"),this.requestId&&(i(this.requestId),this.requestId=null),this.tapped&&(clearTimeout(this.tapped),this.tapped=null)},c.prototype.ontouchstart=function(o){var i=s(o.target),c=this.instance,h=c.current,d=h.$slide,g=h.$content,u="touchstart"==o.type;if(u&&this.$container.off("mousedown.egbx.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&d.length&&i.length&&!r(i)&&!r(i.parent())&&(i.is("img")||!(o.originalEvent.clientX>i[0].clientWidth+i.offset().left))){if(!h||c.isAnimating||h.$slide.hasClass("esgbox-animated"))return o.stopPropagation(),void o.preventDefault();this.realPoints=this.startPoints=n(o),this.startPoints.length&&(h.touch&&o.stopPropagation(),this.startEvent=o,this.canTap=!0,this.$target=i,this.$content=g,this.opts=h.opts.touch,this.isPanning=!1,this.isSwiping=!1,this.isZooming=!1,this.isScrolling=!1,this.canPan=c.canPan(),this.startTime=(new Date).getTime(),this.distanceX=this.distanceY=this.distance=0,this.canvasWidth=Math.round(d[0].clientWidth),this.canvasHeight=Math.round(d[0].clientHeight),this.contentLastPos=null,this.contentStartPos=s.esgbox.getTranslate(this.$content)||{top:0,left:0},this.sliderStartPos=s.esgbox.getTranslate(d),this.stagePos=s.esgbox.getTranslate(c.$refs.stage),this.sliderStartPos.top-=this.stagePos.top,this.sliderStartPos.left-=this.stagePos.left,this.contentStartPos.top-=this.stagePos.top,this.contentStartPos.left-=this.stagePos.left,s(e).off(".egbx.touch").on(u?"touchend.egbx.touch touchcancel.egbx.touch":"mouseup.egbx.touch mouseleave.egbx.touch",s.proxy(this,"ontouchend")).on(u?"touchmove.egbx.touch":"mousemove.egbx.touch",s.proxy(this,"ontouchmove")),s.esgbox.isMobile&&e.addEventListener("scroll",this.onscroll,!0),((this.opts||this.canPan)&&(i.is(this.$stage)||this.$stage.find(i).length)||(i.is(".esgbox-image")&&o.preventDefault(),s.esgbox.isMobile&&i.parents(".esgbox-caption").length))&&(this.isScrollable=l(i)||l(i.parent()),s.esgbox.isMobile&&this.isScrollable||o.preventDefault(),(1===this.startPoints.length||h.hasError)&&(this.canPan?(s.esgbox.stop(this.$content),this.isPanning=!0):this.isSwiping=!0,this.$container.addClass("esgbox-is-grabbing")),2===this.startPoints.length&&"image"===h.type&&(h.isLoaded||h.$ghost)&&(this.canTap=!1,this.isSwiping=!1,this.isPanning=!1,this.isZooming=!0,s.esgbox.stop(this.$content),this.centerPointStartX=.5*(this.startPoints[0].x+this.startPoints[1].x)-s(t).scrollLeft(),this.centerPointStartY=.5*(this.startPoints[0].y+this.startPoints[1].y)-s(t).scrollTop(),this.percentageOfImageAtPinchPointX=(this.centerPointStartX-this.contentStartPos.left)/this.contentStartPos.width,this.percentageOfImageAtPinchPointY=(this.centerPointStartY-this.contentStartPos.top)/this.contentStartPos.height,this.startDistanceBetweenFingers=a(this.startPoints[0],this.startPoints[1]))))}},c.prototype.onscroll=function(t){this.isScrolling=!0,e.removeEventListener("scroll",this.onscroll,!0)},c.prototype.ontouchmove=function(t){void 0===t.originalEvent.buttons||0!==t.originalEvent.buttons?this.isScrolling?this.canTap=!1:(this.newPoints=n(t),(this.opts||this.canPan)&&this.newPoints.length&&this.newPoints.length&&(this.isSwiping&&!0===this.isSwiping||t.preventDefault(),this.distanceX=a(this.newPoints[0],this.startPoints[0],"x"),this.distanceY=a(this.newPoints[0],this.startPoints[0],"y"),this.distance=a(this.newPoints[0],this.startPoints[0]),this.distance>0&&(this.isSwiping?this.onSwipe(t):this.isPanning?this.onPan():this.isZooming&&this.onZoom()))):this.ontouchend(t)},c.prototype.onSwipe=function(e){var n,a=this,r=a.instance,l=a.isSwiping,c=a.sliderStartPos.left||0;if(!0!==l)"x"==l&&(a.distanceX>0&&(a.instance.group.length<2||0===a.instance.current.index&&!a.instance.current.opts.loop)?c+=Math.pow(a.distanceX,.8):a.distanceX<0&&(a.instance.group.length<2||a.instance.current.index===a.instance.group.length-1&&!a.instance.current.opts.loop)?c-=Math.pow(-a.distanceX,.8):c+=a.distanceX),a.sliderLastPos={top:"x"==l?0:a.sliderStartPos.top+a.distanceY,left:c},a.requestId&&(i(a.requestId),a.requestId=null),a.requestId=o(function(){a.sliderLastPos&&(s.each(a.instance.slides,function(t,e){var o=e.pos-a.instance.currPos;s.esgbox.setTranslate(e.$slide,{top:a.sliderLastPos.top,left:a.sliderLastPos.left+o*a.canvasWidth+o*e.opts.gutter})}),a.$container.addClass("esgbox-is-sliding"))});else if(Math.abs(a.distance)>10){if(a.canTap=!1,r.group.length<2&&a.opts.vertical?a.isSwiping="y":r.isDragging||!1===a.opts.vertical||"auto"===a.opts.vertical&&s(t).width()>800?a.isSwiping="x":(n=Math.abs(180*Math.atan2(a.distanceY,a.distanceX)/Math.PI),a.isSwiping=n>45&&n<135?"y":"x"),"y"===a.isSwiping&&s.esgbox.isMobile&&a.isScrollable)return void(a.isScrolling=!0);r.isDragging=a.isSwiping,a.startPoints=a.newPoints,s.each(r.slides,function(t,e){var o,i;s.esgbox.stop(e.$slide),o=s.esgbox.getTranslate(e.$slide),i=s.esgbox.getTranslate(r.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("esgbox-animated").removeClass(function(t,e){return(e.match(/(^|\s)esgbox-fx-\S+/g)||[]).join(" ")}),e.pos===r.current.pos&&(a.sliderStartPos.top=o.top-i.top,a.sliderStartPos.left=o.left-i.left),s.esgbox.setTranslate(e.$slide,{top:o.top-i.top,left:o.left-i.left})}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop()}},c.prototype.onPan=function(){var t=this;a(t.newPoints[0],t.realPoints[0])<(s.esgbox.isMobile?10:5)?t.startPoints=t.newPoints:(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&i(t.requestId),t.requestId=o(function(){s.esgbox.setTranslate(t.$content,t.contentLastPos)}))},c.prototype.limitMovement=function(){var t,e,s,o,i,n,a=this.canvasWidth,r=this.canvasHeight,l=this.distanceX,c=this.distanceY,h=this.contentStartPos,d=h.left,g=h.top,u=h.width,p=h.height;return i=u>a?d+l:d,n=g+c,t=Math.max(0,.5*a-.5*u),e=Math.max(0,.5*r-.5*p),s=Math.min(a-u,.5*a-.5*u),o=Math.min(r-p,.5*r-.5*p),l>0&&i>t&&(i=t-1+Math.pow(-t+d+l,.8)||0),l<0&&i<s&&(i=s+1-Math.pow(s-d-l,.8)||0),c>0&&n>e&&(n=e-1+Math.pow(-e+g+c,.8)||0),c<0&&n<o&&(n=o+1-Math.pow(o-g-c,.8)||0),{top:n,left:i}},c.prototype.limitPosition=function(t,e,s,o){var i=this.canvasWidth,n=this.canvasHeight;return t=s>i?(t=t>0?0:t)<i-s?i-s:t:Math.max(0,i/2-s/2),{top:e=o>n?(e=e>0?0:e)<n-o?n-o:e:Math.max(0,n/2-o/2),left:t}},c.prototype.onZoom=function(){var e=this,n=e.contentStartPos,r=n.width,l=n.height,c=n.left,h=n.top,d=a(e.newPoints[0],e.newPoints[1])/e.startDistanceBetweenFingers,g=Math.floor(r*d),u=Math.floor(l*d),p=(r-g)*e.percentageOfImageAtPinchPointX,b=(l-u)*e.percentageOfImageAtPinchPointY,f=(e.newPoints[0].x+e.newPoints[1].x)/2-s(t).scrollLeft(),m=(e.newPoints[0].y+e.newPoints[1].y)/2-s(t).scrollTop(),v=f-e.centerPointStartX,x={top:h+(b+(m-e.centerPointStartY)),left:c+(p+v),scaleX:d,scaleY:d};e.canTap=!1,e.newWidth=g,e.newHeight=u,e.contentLastPos=x,e.requestId&&i(e.requestId),e.requestId=o(function(){s.esgbox.setTranslate(e.$content,e.contentLastPos)})},c.prototype.ontouchend=function(t){var o=this.isSwiping,a=this.isPanning,r=this.isZooming,l=this.isScrolling;if(this.endPoints=n(t),this.dMs=Math.max((new Date).getTime()-this.startTime,1),this.$container.removeClass("esgbox-is-grabbing"),s(e).off(".egbx.touch"),e.removeEventListener("scroll",this.onscroll,!0),this.requestId&&(i(this.requestId),this.requestId=null),this.isSwiping=!1,this.isPanning=!1,this.isZooming=!1,this.isScrolling=!1,this.instance.isDragging=!1,this.canTap)return this.onTap(t);this.speed=100,this.velocityX=this.distanceX/this.dMs*.5,this.velocityY=this.distanceY/this.dMs*.5,a?this.endPanning():r?this.endZooming():this.endSwiping(o,l)},c.prototype.endSwiping=function(t,e){var o=!1,i=this.instance.group.length,n=Math.abs(this.distanceX),a="x"==t&&i>1&&(this.dMs>130&&n>10||n>50);this.sliderLastPos=null,"y"==t&&!e&&Math.abs(this.distanceY)>50?(s.esgbox.animate(this.instance.current.$slide,{top:this.sliderStartPos.top+this.distanceY+150*this.velocityY,opacity:0},200),o=this.instance.close(!0,250)):a&&this.distanceX>0?o=this.instance.previous(300):a&&this.distanceX<0&&(o=this.instance.next(300)),!1!==o||"x"!=t&&"y"!=t||this.instance.centerSlide(200),this.$container.removeClass("esgbox-is-sliding")},c.prototype.endPanning=function(){var t,e,o;this.contentLastPos&&(!1===this.opts.momentum||this.dMs>350?(t=this.contentLastPos.left,e=this.contentLastPos.top):(t=this.contentLastPos.left+500*this.velocityX,e=this.contentLastPos.top+500*this.velocityY),(o=this.limitPosition(t,e,this.contentStartPos.width,this.contentStartPos.height)).width=this.contentStartPos.width,o.height=this.contentStartPos.height,s.esgbox.animate(this.$content,o,366))},c.prototype.endZooming=function(){var t,e,o,i,n=this.instance.current,a=this.newWidth,r=this.newHeight;this.contentLastPos&&(t=this.contentLastPos.left,i={top:e=this.contentLastPos.top,left:t,width:a,height:r,scaleX:1,scaleY:1},s.esgbox.setTranslate(this.$content,i),a<this.canvasWidth&&r<this.canvasHeight?this.instance.scaleToFit(150):a>n.width||r>n.height?this.instance.scaleToActual(this.centerPointStartX,this.centerPointStartY,150):(o=this.limitPosition(t,e,a,r),s.esgbox.animate(this.$content,o,150)))},c.prototype.onTap=function(e){var o,i=this,a=s(e.target),r=i.instance,l=r.current,c=e&&n(e)||i.startPoints,h=c[0]?c[0].x-s(t).scrollLeft()-i.stagePos.left:0,d=c[0]?c[0].y-s(t).scrollTop()-i.stagePos.top:0,g=function(t){var o=l.opts[t];if(s.isFunction(o)&&(o=o.apply(r,[l,e])),o)switch(o){case"close":r.close(i.startEvent);break;case"toggleControls":r.toggleControls();break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(i.startEvent);break;case"zoom":"image"==l.type&&(l.isLoaded||l.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(h,d):r.group.length<2&&r.close(i.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(a.is("img")||!(h>a[0].clientWidth+a.offset().left))){if(a.is(".esgbox-bg,.esgbox-inner,.esgbox-outer,.esgbox-container"))o="Outside";else if(a.is(".esgbox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(a).addBack().filter(a).length)return;o="Content"}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(h-i.tapX)>50||Math.abs(d-i.tapY)>50)return this;g("dblclick"+o)}else i.tapX=h,i.tapY=d,l.opts["dblclick"+o]&&l.opts["dblclick"+o]!==l.opts["click"+o]?i.tapped=setTimeout(function(){i.tapped=null,r.isAnimating||g("click"+o)},500):g("click"+o);return this}},s(e).on("onActivate.egbx",function(t,e){e&&!e.Guestures&&(e.Guestures=new c(e))}).on("beforeClose.egbx",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.esgbox.defaults,{btnTpl:{slideShow:'<button data-esgbox-play class="esgbox-button esgbox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var s=function(t){this.instance=t,this.init()};e.extend(s.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,s=t.instance,o=s.group[s.currIndex].opts.slideShow;t.$button=s.$refs.toolbar.find("[data-esgbox-play]").on("click",function(){t.toggle()}),s.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=e('<div class="esgbox-progress"></div>').appendTo(s.$refs.inner))},set:function(t){var s=this.instance,o=s.current;o&&(!0===t||o.opts.loop||s.currIndex<s.group.length-1)?this.isActive&&"video"!==o.contentType&&(this.$progress&&e.esgbox.animate(this.$progress.show(),{scaleX:1},o.opts.slideShow.speed),this.timer=setTimeout(function(){s.current.opts.loop||s.current.index!=s.group.length-1?s.next():s.jumpTo(0)},o.opts.slideShow.speed)):(this.stop(),s.idleSecondsCounter=0,s.showControls())},clear:function(){clearTimeout(this.timer),this.timer=null,this.$progress&&this.$progress.removeAttr("style").hide()},start:function(){var t=this.instance.current;t&&(this.$button.attr("title",(t.opts.i18n[t.opts.lang]||t.opts.i18n.en).PLAY_STOP).removeClass("esgbox-button--play").addClass("esgbox-button--pause"),this.isActive=!0,t.isComplete&&this.set(!0),this.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this.instance.current;this.clear(),this.$button.attr("title",(t.opts.i18n[t.opts.lang]||t.opts.i18n.en).PLAY_START).removeClass("esgbox-button--pause").addClass("esgbox-button--play"),this.isActive=!1,this.instance.trigger("onSlideShowChange",!1),this.$progress&&this.$progress.removeAttr("style").hide()},toggle:function(){this.isActive?this.stop():this.start()}}),e(t).on({"onInit.egbx":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new s(e))},"beforeShow.egbx":function(t,e,s,o){var i=e&&e.SlideShow;o?i&&s.opts.slideShow.autoStart&&i.start():i&&i.isActive&&i.clear()},"afterShowESGBX.egbx":function(t,e,s){var o=e&&e.SlideShow;o&&o.isActive&&o.set()},"afterKeydown.egbx":function(s,o,i,n,a){var r=o&&o.SlideShow;!r||!i.opts.slideShow||80!==a&&32!==a||e(t.activeElement).is("button,a,input")||(n.preventDefault(),r.toggle())},"beforeClose.egbx onDeactivate.egbx":function(t,e){var s=e&&e.SlideShow;s&&s.stop()}}),e(t).on("visibilitychange",function(){var s=e.esgbox.getInstance(),o=s&&s.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())})}(document,jQuery),function(t,e){"use strict";var s=function(){for(var e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],s={},o=0;o<e.length;o++){var i=e[o];if(i&&i[1]in t){for(var n=0;n<i.length;n++)s[e[0][n]]=i[n];return s}}return!1}();if(s){var o={request:function(e){(e=e||t.documentElement)[s.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[s.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[s.fullscreenElement])},enabled:function(){return Boolean(t[s.fullscreenEnabled])}};e.extend(!0,e.esgbox.defaults,{btnTpl:{fullScreen:'<button data-esgbox-fullscreen class="esgbox-button esgbox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),e(t).on(s.fullscreenchange,function(){var t=o.isFullscreen(),s=e.esgbox.getInstance();s&&(s.current&&"image"===s.current.type&&s.isAnimating&&(s.isAnimating=!1,s.update(!0,!0,0),s.isComplete||s.complete()),s.trigger("onFullscreenChange",t),s.$refs.container.toggleClass("esgbox-is-fullscreen",t),s.$refs.toolbar.find("[data-esgbox-fullscreen]").toggleClass("esgbox-button--fsenter",!t).toggleClass("esgbox-button--fsexit",t))})}e(t).on({"onInit.egbx":function(t,e){s?e&&e.group[e.currIndex].opts.fullScreen?(e.$refs.container.on("click.egbx-fullscreen","[data-esgbox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-esgbox-fullscreen]").hide():e.$refs.toolbar.find("[data-esgbox-fullscreen]").remove()},"afterKeydown.egbx":function(t,e,s,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.egbx":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("esgbox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,e){"use strict";var s="esgbox-thumbs";e.esgbox.defaults=e.extend(!0,{btnTpl:{thumbs:'<button data-esgbox-thumbs class="esgbox-button esgbox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".esgbox-container",axis:"y"}},e.esgbox.defaults);var o=function(t){this.init(t)};e.extend(o.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,s=t.group,o=0;e.instance=t,e.opts=s[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-esgbox-thumbs]");for(var i=0,n=s.length;i<n&&(s[i].thumb&&o++,!(o>1));i++);o>1&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,o=this.instance,i=this.opts.parentEl,n=[];this.$grid||(this.$grid=e('<div class="'+s+" "+s+"-"+this.opts.axis+'"></div>').appendTo(o.$refs.container.find(i).addBack().filter(i)),this.$grid.on("click","a",function(){o.jumpTo(e(this).attr("data-index"))})),this.$list||(this.$list=e('<div class="'+s+'__list">').appendTo(this.$grid)),e.each(o.group,function(e,s){(t=s.thumb)||"image"!==s.type||(t=s.src),n.push('<a href="javascript:;" tabindex="0" data-index="'+e+'"'+(t&&t.length?' style="background-image:url('+t+')"':'class="esgbox-thumbs-missing"')+"></a>")}),this.$list[0].innerHTML=n.join(""),"x"===this.opts.axis&&this.$list.width(parseInt(this.$grid.css("padding-right"),10)+o.group.length*this.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,s,o=this.$list,i=this.$grid;this.instance.current&&(s=(e=o.children().removeClass("esgbox-thumbs-active").filter('[data-index="'+this.instance.current.index+'"]').addClass("esgbox-thumbs-active")).position(),"y"===this.opts.axis&&(s.top<0||s.top>o.height()-e.outerHeight())?o.stop().animate({scrollTop:o.scrollTop()+s.top},t):"x"===this.opts.axis&&(s.left<i.scrollLeft()||s.left>i.scrollLeft()+(i.width()-e.outerWidth()))&&o.parent().stop().animate({scrollLeft:s.left},t))},update:function(){this.instance.$refs.container.toggleClass("esgbox-show-thumbs",this.isVisible),this.isVisible?(this.$grid||this.create(),this.instance.trigger("onThumbsShow"),this.focus(0)):this.$grid&&this.instance.trigger("onThumbsHide"),this.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.egbx":function(t,e){var s;e&&!e.Thumbs&&(s=new o(e)).isActive&&!0===s.opts.autoStart&&s.show()},"beforeShow.egbx":function(t,e,s,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.egbx":function(t,e,s,o,i){var n=e&&e.Thumbs;n&&n.isActive&&71===i&&(o.preventDefault(),n.toggle())},"beforeClose.egbx":function(t,e){var s=e&&e.Thumbs;s&&s.isVisible&&!1!==s.opts.hideOnClose&&s.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";e.extend(!0,e.esgbox.defaults,{btnTpl:{share:'<button data-esgbox-share class="esgbox-button esgbox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location},tpl:'<div class="esgbox-share"><h1>{{SHARE}}</h1><p><a class="esgbox-share__button esgbox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="esgbox-share__button esgbox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="esgbox-share__button esgbox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="esgbox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>'}}),e(t).on("click","[data-esgbox-share]",function(){var t,s,o,i,n=e.esgbox.getInstance(),a=n.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[n,a])),s=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,(o=t,i={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},String(o).replace(/[&<>"'`=\/]/g,function(t){return i[t]}))).replace(/\{\{descr\}\}/g,n.$caption?encodeURIComponent(n.$caption.text()):""),e.esgbox.open({src:n.translate(n,s),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){n.$refs.container.one("beforeClose.egbx",function(){t.close(null,0)}),e.$content.find(".esgbox-share__button").on("click",function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,s){"use strict";function o(){var e=t.location.hash.substr(1),s=e.split("-"),o=s.length>1&&/^\+?\d+$/.test(s[s.length-1])&&parseInt(s.pop(-1),10)||1;return{hash:e,index:o<1?1:o,gallery:s.join("-")}}function i(t){""!==t.gallery&&s("[data-esgbox='"+s.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.egbx-start")}function n(t){var e,s;return!!t&&(""!==(s=(e=t.current?t.current.opts:t.opts).hash||(e.$orig?e.$orig.data("esgbox")||e.$orig.data("esgbox-trigger"):""))&&s)}s.escapeSelector||(s.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),s(function(){!1!==s.esgbox.defaults.hash&&(s(e).on({"onInit.egbx":function(t,e){var s,i;!1!==e.group[e.currIndex].opts.hash&&(s=o(),(i=n(e))&&s.gallery&&i==s.gallery&&(e.currIndex=s.index-1))},"beforeShow.egbx":function(s,o,i,a){var r;i&&!1!==i.opts.hash&&(r=n(o))&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(a&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[a?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),a&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300)))},"beforeClose.egbx":function(s,o,i){i&&!1!==i.opts.hash&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),s(t).on("hashchange.egbx",function(){var t=o(),e=null;s.each(s(".esgbox-container").get().reverse(),function(t,o){var i=s(o).data("EsgBox");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t)}),jQuery("body").on("essentialready",function(t,e){s.esgbox.getInstance()||i(o())}))})}(window,document,jQuery),function(t,e){"use strict";var s=(new Date).getTime();e(t).on({"onInit.egbx":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||!1===o.opts.wheel||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("esgbox-animated")||(t=t.originalEvent||t,i-s<250||(s=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);