!function(t,$){"use strict";$.extend(!0,$.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-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 e=function(t){this.instance=t,this.init()};$.extend(e.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,e=t.instance,o=e.group[e.currIndex].opts.slideShow;t.$button=e.$refs.toolbar.find("[data-fancybox-play]").on("click",(function(){t.toggle()})),e.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=$('<div class="fancybox-progress"></div>').appendTo(e.$refs.inner))},set:function(t){var e=this,o=e.instance,n=o.current;n&&(!0===t||n.opts.loop||o.currIndex<o.group.length-1)?e.isActive&&"video"!==n.contentType&&(e.$progress&&$.fancybox.animate(e.$progress.show(),{scaleX:1},n.opts.slideShow.speed),e.timer=setTimeout((function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)}),n.opts.slideShow.speed)):(e.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null,t.$progress&&t.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),$(t).on({"onInit.fb":function(t,o){o&&!o.SlideShow&&(o.SlideShow=new e(o))},"beforeShow.fb":function(t,e,o,n){var s=e&&e.SlideShow;n?s&&o.opts.slideShow.autoStart&&s.start():s&&s.isActive&&s.clear()},"afterShow.fb":function(t,e,o){var n=e&&e.SlideShow;n&&n.isActive&&n.set()},"afterKeydown.fb":function(e,o,n,s,i){var r=o&&o.SlideShow;!r||!n.opts.slideShow||80!==i&&32!==i||$(t.activeElement).is("button,a,input")||(s.preventDefault(),r.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var o=e&&e.SlideShow;o&&o.stop()}}),$(t).on("visibilitychange",(function(){var e=$.fancybox.getInstance(),o=e&&e.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())}))}(document,jQuery);