function onTabSelect(n){var t=n.href.match(/(tabs\d+)_(.+)/),r,i;t!=null&&t.length==3&&(r=t[1],i=t[2],selectTabs(i),Cookies.set("preferred_language",i,{expires:365,path:"/"}))}function selectTabs(n){$('.nav-tabs a[href$="'+n+'"]').tab("show")}function ShowIOSandLinuxPackage(){$(".other-platform").show();$(".other-platform-switcher").hide()}function copyKeyToClipboard(n,t,i){var r=document.getElementById(n);r.select();document.execCommand("copy");window.getSelection().removeAllRanges();r.blur();t!==undefined&&setTooltipText(t,i)}function setTooltipText(n,t){var i=document.getElementById(n);i.innerHTML=t}function getCookie(n){for(var t,r=n+"=",u=document.cookie.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1,t.length);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return null}function setCookieLocal(n,t,i){var u="",r;i&&(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toUTCString());document.cookie=n+"="+(t||"")+u+"; path=/"}+function(){"use strict";function t(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var n=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),i=function(i){var r="ekkoLightbox",e=i.fn[r],f={title:"",footer:"",maxWidth:9999,maxHeight:9999,showArrows:!0,wrapping:!0,type:null,alwaysShowClose:!1,loadingMessage:'<div class="ekko-lightbox-loader"><div><div><\/div><div><\/div><\/div><\/div>',leftArrow:"<span>&#10094;<\/span>",rightArrow:"<span>&#10095;<\/span>",strings:{close:"Close",fail:"Failed to load image:",type:"Could not detect remote target type. Force the type using data-type"},doc:document,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}},u=function(){function r(n,u){var e=this;t(this,r);this._config=i.extend({},f,u);this._$modalArrows=null;this._galleryIndex=0;this._galleryName=null;this._padding=null;this._border=null;this._titleIsShown=!1;this._footerIsShown=!1;this._wantedWidth=0;this._wantedHeight=0;this._touchstartX=0;this._touchendX=0;this._modalId="ekkoLightbox-"+Math.floor(Math.random()*1e3+1);this._$element=n instanceof jQuery?n:i(n);this._isBootstrap3=i.fn.modal.Constructor.VERSION[0]==3;var o='<h4 class="modal-title">'+(this._config.title||"&nbsp;")+"<\/h4>",s='<button type="button" class="close" data-dismiss="modal" aria-label="'+this._config.strings.close+'"><span aria-hidden="true">&times;<\/span><\/button>',h='<div class="modal-header'+(this._config.title||this._config.alwaysShowClose?"":" hide")+'">'+(this._isBootstrap3?s+o:o+s)+"<\/div>",c='<div class="modal-footer'+(this._config.footer?"":" hide")+'">'+(this._config.footer||"&nbsp;")+"<\/div>",l='<div class="modal-dialog" role="document"><div class="modal-content">'+h+'<div class="modal-body"><div class="ekko-lightbox-container"><div class="ekko-lightbox-item fade in show"><\/div><div class="ekko-lightbox-item fade"><\/div><\/div><\/div>'+c+"<\/div><\/div>";if(i(this._config.doc.body).append('<div id="'+this._modalId+'" class="ekko-lightbox modal fade" tabindex="-1" tabindex="-1" role="dialog" aria-hidden="true">'+l+"<\/div>"),this._$modal=i("#"+this._modalId,this._config.doc),this._$modalDialog=this._$modal.find(".modal-dialog").first(),this._$modalContent=this._$modal.find(".modal-content").first(),this._$modalBody=this._$modal.find(".modal-body").first(),this._$modalHeader=this._$modal.find(".modal-header").first(),this._$modalFooter=this._$modal.find(".modal-footer").first(),this._$lightboxContainer=this._$modalBody.find(".ekko-lightbox-container").first(),this._$lightboxBodyOne=this._$lightboxContainer.find("> div:first-child").first(),this._$lightboxBodyTwo=this._$lightboxContainer.find("> div:last-child").first(),this._border=this._calculateBorders(),this._padding=this._calculatePadding(),this._galleryName=this._$element.data("gallery"),this._galleryName){this._$galleryItems=i(document.body).find('*[data-gallery="'+this._galleryName+'"]');this._galleryIndex=this._$galleryItems.index(this._$element);i(document).on("keydown.ekkoLightbox",this._navigationalBinder.bind(this));if(this._config.showArrows&&this._$galleryItems.length>1){this._$lightboxContainer.append('<div class="ekko-lightbox-nav-overlay"><a href="#">'+this._config.leftArrow+'<\/a><a href="#">'+this._config.rightArrow+"<\/a><\/div>");this._$modalArrows=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay").first();this._$lightboxContainer.on("click","a:first-child",function(n){return n.preventDefault(),e.navigateLeft()});this._$lightboxContainer.on("click","a:last-child",function(n){return n.preventDefault(),e.navigateRight()});this.updateNavigation()}}this._$modal.on("show.bs.modal",this._config.onShow.bind(this)).on("shown.bs.modal",function(){return e._toggleLoading(!0),e._handle(),e._config.onShown.call(e)}).on("hide.bs.modal",this._config.onHide.bind(this)).on("hidden.bs.modal",function(){return e._galleryName&&(i(document).off("keydown.ekkoLightbox"),i(window).off("resize.ekkoLightbox")),e._$modal.remove(),e._config.onHidden.call(e)}).modal(this._config);i(window).on("resize.ekkoLightbox",function(){e._resize(e._wantedWidth,e._wantedHeight)});this._$lightboxContainer.on("touchstart",function(){e._touchstartX=event.changedTouches[0].screenX}).on("touchend",function(){e._touchendX=event.changedTouches[0].screenX;e._swipeGesure()})}return n(r,null,[{key:"Default",get:function(){return f}}]),n(r,[{key:"element",value:function(){return this._$element}},{key:"modal",value:function(){return this._$modal}},{key:"navigateTo",value:function(n){if(n<0||n>this._$galleryItems.length-1)return this;this._galleryIndex=n;this.updateNavigation();this._$element=i(this._$galleryItems.get(this._galleryIndex));this._handle()}},{key:"navigateLeft",value:function(){if(this._$galleryItems&&this._$galleryItems.length!==1){if(this._galleryIndex===0)if(this._config.wrapping)this._galleryIndex=this._$galleryItems.length-1;else return;else this._galleryIndex--;return this._config.onNavigate.call(this,"left",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"navigateRight",value:function(){if(this._$galleryItems&&this._$galleryItems.length!==1){if(this._galleryIndex===this._$galleryItems.length-1)if(this._config.wrapping)this._galleryIndex=0;else return;else this._galleryIndex++;return this._config.onNavigate.call(this,"right",this._galleryIndex),this.navigateTo(this._galleryIndex)}}},{key:"updateNavigation",value:function(){if(!this._config.wrapping){var n=this._$lightboxContainer.find("div.ekko-lightbox-nav-overlay");this._galleryIndex===0?n.find("a:first-child").addClass("disabled"):n.find("a:first-child").removeClass("disabled");this._galleryIndex===this._$galleryItems.length-1?n.find("a:last-child").addClass("disabled"):n.find("a:last-child").removeClass("disabled")}}},{key:"close",value:function(){return this._$modal.modal("hide")}},{key:"_navigationalBinder",value:function(n){return(n=n||window.event,n.keyCode===39)?this.navigateRight():n.keyCode===37?this.navigateLeft():void 0}},{key:"_detectRemoteType",value:function(n,t){return t=t||!1,!t&&this._isImage(n)&&(t="image"),!t&&this._getYoutubeId(n)&&(t="youtube"),!t&&this._getVimeoId(n)&&(t="vimeo"),!t&&this._getInstagramId(n)&&(t="instagram"),(!t||["image","youtube","vimeo","instagram","video","url"].indexOf(t)<0)&&(t="url"),t}},{key:"_isImage",value:function(n){return n&&n.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)}},{key:"_containerToUse",value:function(){var n=this,t=this._$lightboxBodyTwo,i=this._$lightboxBodyOne;return this._$lightboxBodyTwo.hasClass("in")&&(t=this._$lightboxBodyOne,i=this._$lightboxBodyTwo),i.removeClass("in show"),setTimeout(function(){n._$lightboxBodyTwo.hasClass("in")||n._$lightboxBodyTwo.empty();n._$lightboxBodyOne.hasClass("in")||n._$lightboxBodyOne.empty()},500),t.addClass("in show"),t}},{key:"_handle",value:function(){var t=this._containerToUse(),n,i;if(this._updateTitleAndFooter(),n=this._$element.attr("data-remote")||this._$element.attr("href"),i=this._detectRemoteType(n,this._$element.attr("data-type")||!1),["image","youtube","vimeo","instagram","video","url"].indexOf(i)<0)return this._error(this._config.strings.type);switch(i){case"image":this._preloadImage(n,t);this._preloadImageByIndex(this._galleryIndex,3);break;case"youtube":this._showYoutubeVideo(n,t);break;case"vimeo":this._showVimeoVideo(this._getVimeoId(n),t);break;case"instagram":this._showInstagramVideo(this._getInstagramId(n),t);break;case"video":this._showHtml5Video(n,t);break;default:this._loadRemoteContent(n,t)}return this}},{key:"_getYoutubeId",value:function(n){if(!n)return!1;var t=n.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return t&&t[2].length===11?t[2]:!1}},{key:"_getVimeoId",value:function(n){return n&&n.indexOf("vimeo")>0?n:!1}},{key:"_getInstagramId",value:function(n){return n&&n.indexOf("instagram")>0?n:!1}},{key:"_toggleLoading",value:function(n){return n=n||!1,n?(this._$modalDialog.css("display","none"),this._$modal.removeClass("in show"),i(".modal-backdrop").append(this._config.loadingMessage)):(this._$modalDialog.css("display","block"),this._$modal.addClass("in show"),i(".modal-backdrop").find(".ekko-lightbox-loader").remove()),this}},{key:"_calculateBorders",value:function(){return{top:this._totalCssByAttribute("border-top-width"),right:this._totalCssByAttribute("border-right-width"),bottom:this._totalCssByAttribute("border-bottom-width"),left:this._totalCssByAttribute("border-left-width")}}},{key:"_calculatePadding",value:function(){return{top:this._totalCssByAttribute("padding-top"),right:this._totalCssByAttribute("padding-right"),bottom:this._totalCssByAttribute("padding-bottom"),left:this._totalCssByAttribute("padding-left")}}},{key:"_totalCssByAttribute",value:function(n){return parseInt(this._$modalDialog.css(n),10)+parseInt(this._$modalContent.css(n),10)+parseInt(this._$modalBody.css(n),10)}},{key:"_updateTitleAndFooter",value:function(){var n=this._$element.data("title")||"",t=this._$element.data("footer")||"";return this._titleIsShown=!1,n||this._config.alwaysShowClose?(this._titleIsShown=!0,this._$modalHeader.css("display","").find(".modal-title").html(n||"&nbsp;")):this._$modalHeader.css("display","none"),this._footerIsShown=!1,t?(this._footerIsShown=!0,this._$modalFooter.css("display","").html(t)):this._$modalFooter.css("display","none"),this}},{key:"_showYoutubeVideo",value:function(n,t){var r=this._getYoutubeId(n),u=n.indexOf("&")>0?n.substr(n.indexOf("&")):"",i=this._$element.data("width")||560,f=this._$element.data("height")||i/(560/315);return this._showVideoIframe("//www.youtube.com/embed/"+r+"?badge=0&autoplay=1&html5=1"+u,i,f,t)}},{key:"_showVimeoVideo",value:function(n,t){var i=this._$element.data("width")||500,r=this._$element.data("height")||i/(560/315);return this._showVideoIframe(n+"?autoplay=1",i,r,t)}},{key:"_showInstagramVideo",value:function(n,t){var i=this._$element.data("width")||612,r=i+80;return n=n.substr(-1)!=="/"?n+"/":n,t.html('<iframe width="'+i+'" height="'+r+'" src="'+n+'embed/" frameborder="0" allowfullscreen><\/iframe>'),this._resize(i,r),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showVideoIframe",value:function(n,t,i,r){return i=i||t,r.html('<div class="embed-responsive embed-responsive-16by9"><iframe width="'+t+'" height="'+i+'" src="'+n+'" frameborder="0" allowfullscreen class="embed-responsive-item"><\/iframe><\/div>'),this._resize(t,i),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Video",value:function(n,t){var i=this._$element.data("width")||560,r=this._$element.data("height")||i/(560/315);return t.html('<div class="embed-responsive embed-responsive-16by9"><video width="'+i+'" height="'+r+'" src="'+n+'" preload="auto" autoplay controls class="embed-responsive-item"><\/video><\/div>'),this._resize(i,r),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_loadRemoteContent",value:function(n,t){var r=this,u=this._$element.data("width")||560,f=this._$element.data("height")||560,e=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),e||this._isExternal(n)?(t.html('<iframe src="'+n+'" frameborder="0" allowfullscreen><\/iframe>'),this._config.onContentLoaded.call(this)):t.load(n,i.proxy(function(){return r._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(u,f),this}},{key:"_isExternal",value:function(n){var t=n.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return typeof t[1]=="string"&&t[1].length>0&&t[1].toLowerCase()!==location.protocol?!0:typeof t[2]=="string"&&t[2].length>0&&t[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host?!0:!1}},{key:"_error",value:function(n){return console.error(n),this._containerToUse().html(n),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(n,t){var r,u;if(this._$galleryItems)return(r=i(this._$galleryItems.get(n),!1),typeof r=="undefined")?void 0:(u=r.attr("data-remote")||r.attr("href"),(r.attr("data-type")==="image"||this._isImage(u))&&this._preloadImage(u,!1),t>0?this._preloadImageByIndex(n+1,t-1):void 0)}},{key:"_preloadImage",value:function(n,t){var r=this,u;return t=t||!1,u=new Image,t&&function(){var f=setTimeout(function(){t.append(r._config.loadingMessage)},200);u.onload=function(){f&&clearTimeout(f);f=null;var n=i("<img />");return n.attr("src",u.src),n.addClass("img-fluid"),n.css("width","100%"),t.html(n),r._$modalArrows&&r._$modalArrows.css("display",""),r._resize(u.width,u.height),r._toggleLoading(!1),r._config.onContentLoaded.call(r)};u.onerror=function(){return r._toggleLoading(!1),r._error(r._config.strings.fail+("  "+n))}}(),u.src=n,u}},{key:"_swipeGesure",value:function(){return this._touchendX<this._touchstartX?this.navigateRight():this._touchendX>this._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(n,t){var u,f,e;t=t||n;this._wantedWidth=n;this._wantedHeight=t;var h=n/t,r=this._padding.left+this._padding.right+this._border.left+this._border.right,l=this._config.doc.body.clientWidth>575?20:0,a=this._config.doc.body.clientWidth>575?0:20,o=Math.min(n+r,this._config.doc.body.clientWidth-l,this._config.maxWidth);n+r>o?(t=(o-r-a)/h,n=o):n=n+r;u=0;f=0;this._footerIsShown&&(f=this._$modalFooter.outerHeight(!0)||55);this._titleIsShown&&(u=this._$modalHeader.outerHeight(!0)||67);var c=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,v=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),s=Math.min(t,i(window).height()-c-v-u-f,this._config.maxHeight-c-u-f);if(t>s&&(n=Math.ceil(s*h)+r),this._$lightboxContainer.css("height",s),this._$modalDialog.css("flex",1).css("maxWidth",n),e=this._$modal.data("bs.modal"),e)try{e._handleUpdate()}catch(y){e.handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(n){var t=this;return n=n||{},this.each(function(){var u=i(t),f=i.extend({},r.Default,u.data(),typeof n=="object"&&n);new r(t,f)})}}]),r}();return i.fn[r]=u._jQueryInterface,i.fn[r].Constructor=u,i.fn[r].noConflict=function(){return i.fn[r]=e,u._jQueryInterface},u}(jQuery)}(jQuery)