!function(){"use strict";window.jnews=window.jnews||{},window.jnews.slider=window.jnews.slider||{};var e=function(){var e="object"==typeof jnews&&"object"==typeof jnews.library,t="function"==typeof jnews.tns;if(t&&e)var n=jnews.library,a=function(e,t){var a=t.getElementsByClassName("tns-controls button");if(a.length){var s=e.getElementsByClassName("thumbnail-container");if(s.length){var o=s[0].getBoundingClientRect().height;n.forEach(a,(function(e,t){var n=e.getBoundingClientRect().height,a=.5*o-.5*n;e.style.top=a+"px"}))}}},s=function(e){var t,s,o=function(e){var s,o,i,r,l,c={container:e.container,nav:!0,controls:!0,loop:!0,mouseDrag:!1,items:1,autoplay:!1,autoplayTimeout:5e3,textDirection:"ltr",controlsText:["prev","next"],edgePadding:0,gutter:0,lazyload:!1,lazyloadSelector:"img",responsive:!1,mode:"carousel",animateOut:"tns-fadeOut",speed:300,onInit:!1};return l="undefined"!=typeof jnewsoption?1==jnewsoption.rtl:"undefined"!=typeof jnewsgutenbergoption&&1==jnewsgutenbergoption.rtl,n.hasClass(c.container,"jeg_slider_type_1")?(t=1,c={container:e.container,textDirection:l?"rtl":"ltr"}):(c.autoplay=c.container.dataset.autoplay,c.autoplayTimeout=c.container.dataset.delay,c.textDirection=l?"rtl":"ltr",n.hasClass(c.container,"jeg_slider_type_2")?(t=2,c.controls=!1,c.mouseDrag=!0,c):n.hasClass(c.container,"jeg_slider_type_3")?(t=3,s=(s=n.getParents(c.container,".jeg_slider_wrapper")).length?s[s.length-1]:n.doc,c.items=c.container.dataset.items,o=c.items,i=c.items<3?c.items:3,r=c.items<2?c.items:2,n.hasClass(s,"jeg_col_2o3")?o>3&&1024==n.windowWidth()&&(o=3):n.hasClass(s,"jeg_col_1o3")&&(i=1,n.windowWidth()>=1024&&(o=1)),c.nav=!1,c.controlsText=["",""],c.mouseDrag=!0,c.edgePadding=35,c.gutter=5,c.lazyload=!0,c.lazyloadSelector=".jeg_slide_item .owl-lazy",c.responsive={0:{items:1},568:{items:r},768:{items:i},1024:{items:o}},c):n.hasClass(c.container,"jeg_slider_type_4")?(t=4,c.mode="gallery",c.controlsText=["",""],c.mouseDrag=!0,c.speed=1e3,c):n.hasClass(c.container,"jeg_slider_type_5")?(t=5,c.nav=!1,c.controlsText=["",""],c.mouseDrag=!0,c):n.hasClass(c.container,"jeg_slider_type_6")?(t=6,c.nav=!1,c.controlsText=[c.container.dataset.navPrev,c.container.dataset.navNext],c.mouseDrag=!0,c):n.hasClass(c.container,"jeg_slider_type_7")?(t=7,c.nav=!1,c.controls=!1,c.mode="gallery",c.speed=500,c):n.hasClass(c.container,"jeg_slider_type_8")?(t=8,s=(s=n.getParents(c.container,".jeg_slider_wrapper")).length?s[s.length-1]:n.doc,c.items=c.container.dataset.items,o=c.items,i=c.items<3?c.items:3,r=c.items<2?c.items:2,n.hasClass(s,"jeg_col_2o3")?o>3&&1024==n.windowWidth()&&(o=3):n.hasClass(s,"jeg_col_1o3")&&(i=1,n.windowWidth()>=1024&&(o=1)),c.nav=!1,c.controls=!0,c.controlsText=["",""],c.mouseDrag=!0,c.edgePadding=30,c.responsive={0:{items:1},568:{items:r},768:{items:i},1024:{items:o,edgePadding:o>1?50:30}},c.onInit=function(){a(c.container,s)},c):n.hasClass(c.container,"jeg_slider_type_9")?(t=9,c.nav=!1,c.controls=!1,c.mode="gallery",c):c)}(e);if(e=n.extend(o,e||{}),t)if(1!==t){if(!n.hasClass(e.container,"jeg_tns_active")){var i=jnews.tns(e);if(void 0!==i)switch(i.events.on("dragStart",(function(e){e.event.preventDefault(),e.event.stopPropagation()})),n.addClass(e.container,"jeg_tns_active"),n.dataStorage.put(e.container,"tiny-slider",i),t){case 7:n.forEach(e.container.querySelectorAll(".jeg_block_nav a"),(function(e,t){n.addEvents(e,{click:function(e){e.preventDefault(),n.hasClass(this,"next")?i.goTo("next"):i.goTo("prev")}})}));break;case 8:var r=n.getParents(e.container,".jeg_slider_wrapper");r=r.length?r[r.length-1]:n.doc,n.addEvents(n.win,{resize:function(){s&&n.cancelAnimationFrame.call(n.win,s),s=n.requestAnimationFrame.call(n.win,(function(){a(e.container,r)}))}});break;case 9:var l=n.getParents(e.container,".jeg_slider_wrapper");l=l.length?l[l.length-1]:n.doc,n.forEach(l.querySelectorAll(".jeg_slider_type_9_thumb article"),(function(e,t){n.addEvents(e,{click:function(e){e.preventDefault();var t=this.dataset.index;i.goTo(t)}})}))}}}else jnews.owlslider(e)};else t||console.warn("Tiny Slider could not be found"),e||console.warn("JNews Library could not be found");return s}();window.jnews.slider=e}();