/* https://ky.onair.cc/wp-content/themes/onair-7.0/lib/bootstrap/bootstrap.js */ try{ !function($){"use strict";$(function(){$.support.transition=(function(){var transitionEnd=(function(){var el=document.createElement('bootstrap'),transEndEventNames={'WebkitTransition':'webkitTransitionEnd','MozTransition':'transitionend','OTransition':'oTransitionEnd otransitionend','transition':'transitionend'},name for(name in transEndEventNames){if(el.style[name]!==undefined){return transEndEventNames[name]}}}()) return transitionEnd&&{end:transitionEnd}})()})}(window.jQuery);!function($){"use strict";var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on('click',dismiss,this.close)} Alert.prototype.close=function(e){var $this=$(this),selector=$this.attr('data-target'),$parent if(!selector){selector=$this.attr('href') selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')} $parent=$(selector) e&&e.preventDefault() $parent.length||($parent=$this.hasClass('alert')?$this:$this.parent()) $parent.trigger(e=$.Event('close')) if(e.isDefaultPrevented())return $parent.removeClass('in') function removeElement(){$parent.trigger('closed').remove()} $.support.transition&&$parent.hasClass('fade')?$parent.on($.support.transition.end,removeElement):removeElement()} var old=$.fn.alert $.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data('alert') if(!data)$this.data('alert',(data=new Alert(this))) if(typeof option=='string')data[option].call($this)})} $.fn.alert.Constructor=Alert $.fn.alert.noConflict=function(){$.fn.alert=old return this} $(document).on('click.alert.data-api',dismiss,Alert.prototype.close)}(window.jQuery);!function($){"use strict";var Button=function(element,options){this.$element=$(element) this.options=$.extend({},$.fn.button.defaults,options)} Button.prototype.setState=function(state){var d='disabled',$el=this.$element,data=$el.data(),val=$el.is('input')?'val':'html' state=state+'Text' data.resetText||$el.data('resetText',$el[val]()) $el[val](data[state]||this.options[state]) setTimeout(function(){state=='loadingText'?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)} Button.prototype.toggle=function(){var $parent=this.$element.closest('[data-toggle="buttons-radio"]') $parent&&$parent.find('.active').removeClass('active') this.$element.toggleClass('active')} var old=$.fn.button $.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data('button'),options=typeof option=='object'&&option if(!data)$this.data('button',(data=new Button(this,options))) if(option=='toggle')data.toggle() else if(option)data.setState(option)})} $.fn.button.defaults={loadingText:'loading...'} $.fn.button.Constructor=Button $.fn.button.noConflict=function(){$.fn.button=old return this} $(document).on('click.button.data-api','[data-toggle^=button]',function(e){var $btn=$(e.target) if(!$btn.hasClass('btn'))$btn=$btn.closest('.btn') $btn.button('toggle')})}(window.jQuery);!function($){"use strict";var Carousel=function(element,options){this.$element=$(element) this.$indicators=this.$element.find('.carousel-indicators') this.options=options this.options.pause=='hover'&&this.$element.on('mouseenter',$.proxy(this.pause,this)).on('mouseleave',$.proxy(this.cycle,this))} Carousel.prototype={cycle:function(e){if(!e)this.paused=!1 if(this.interval)clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)) return this},getActiveIndex:function(){this.$active=this.$element.find('.item.active') this.$items=this.$active.parent().children() return this.$items.index(this.$active)},to:function(pos){var activeIndex=this.getActiveIndex(),that=this if(pos>(this.$items.length-1)||pos<0)return if(this.sliding){return this.$element.one('slid',function(){that.to(pos)})} if(activeIndex==pos){return this.pause().cycle()} return this.slide(pos>activeIndex?'next':'prev',$(this.$items[pos]))},pause:function(e){if(!e)this.paused=!0 if(this.$element.find('.next, .prev').length&&$.support.transition.end){this.$element.trigger($.support.transition.end) this.cycle(!0)} clearInterval(this.interval) this.interval=null return this},next:function(){if(this.sliding)return return this.slide('next')},prev:function(){if(this.sliding)return return this.slide('prev')},slide:function(type,next){var $active=this.$element.find('.item.active'),$next=next||$active[type](),isCycling=this.interval,direction=type=='next'?'left':'right',fallback=type=='next'?'first':'last',that=this,e this.sliding=!0 isCycling&&this.pause() $next=$next.length?$next:this.$element.find('.item')[fallback]() e=$.Event('slide',{relatedTarget:$next[0],direction:direction}) if($next.hasClass('active'))return if(this.$indicators.length){this.$indicators.find('.active').removeClass('active') this.$element.one('slid',function(){var $nextIndicator=$(that.$indicators.children()[that.getActiveIndex()]) $nextIndicator&&$nextIndicator.addClass('active')})} if($.support.transition&&this.$element.hasClass('slide')){this.$element.trigger(e) if(e.isDefaultPrevented())return $next.addClass(type) $next[0].offsetWidth $active.addClass(direction) $next.addClass(direction) this.$element.one($.support.transition.end,function(){$next.removeClass([type,direction].join(' ')).addClass('active') $active.removeClass(['active',direction].join(' ')) that.sliding=!1 setTimeout(function(){that.$element.trigger('slid')},0)})}else{this.$element.trigger(e) if(e.isDefaultPrevented())return $active.removeClass('active') $next.addClass('active') this.sliding=!1 this.$element.trigger('slid')} isCycling&&this.cycle() return this}} var old=$.fn.carousel $.fn.carousel=function(option){return this.each(function(){var $this=$(this),data=$this.data('carousel'),options=$.extend({},$.fn.carousel.defaults,typeof option=='object'&&option),action=typeof option=='string'?option:options.slide if(!data)$this.data('carousel',(data=new Carousel(this,options))) if(typeof option=='number')data.to(option) else if(action)data[action]() else if(options.interval)data.pause().cycle()})} $.fn.carousel.defaults={interval:5000,pause:'hover'} $.fn.carousel.Constructor=Carousel $.fn.carousel.noConflict=function(){$.fn.carousel=old return this} $(document).on('click.carousel.data-api','[data-slide], [data-slide-to]',function(e){var $this=$(this),href,$target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')),options=$.extend({},$target.data(),$this.data()),slideIndex $target.carousel(options) if(slideIndex=$this.attr('data-slide-to')){$target.data('carousel').pause().to(slideIndex).cycle()} e.preventDefault()})}(window.jQuery);!function($){"use strict";var Collapse=function(element,options){this.$element=$(element) this.options=$.extend({},$.fn.collapse.defaults,options) if(this.options.parent){this.$parent=$(this.options.parent)} this.options.toggle&&this.toggle()} Collapse.prototype={constructor:Collapse,dimension:function(){var hasWidth=this.$element.hasClass('width') return hasWidth?'width':'height'},show:function(){var dimension,scroll,actives,hasData if(this.transitioning||this.$element.hasClass('in'))return dimension=this.dimension() scroll=$.camelCase(['scroll',dimension].join('-')) actives=this.$parent&&this.$parent.find('> .accordion-group > .in') if(actives&&actives.length){hasData=actives.data('collapse') if(hasData&&hasData.transitioning)return actives.collapse('hide') hasData||actives.data('collapse',null)} this.$element[dimension](0) this.transition('addClass',$.Event('show'),'shown') $.support.transition&&this.$element[dimension](this.$element[0][scroll])},hide:function(){var dimension if(this.transitioning||!this.$element.hasClass('in'))return dimension=this.dimension() this.reset(this.$element[dimension]()) this.transition('removeClass',$.Event('hide'),'hidden') this.$element[dimension](0)},reset:function(size){var dimension=this.dimension() this.$element.removeClass('collapse')[dimension](size||'auto')[0].offsetWidth this.$element[size!==null?'addClass':'removeClass']('collapse') return this},transition:function(method,startEvent,completeEvent){var that=this,complete=function(){if(startEvent.type=='show')that.reset() that.transitioning=0 that.$element.trigger(completeEvent)} this.$element.trigger(startEvent) if(startEvent.isDefaultPrevented())return this.transitioning=1 this.$element[method]('in') $.support.transition&&this.$element.hasClass('collapse')?this.$element.one($.support.transition.end,complete):complete()},toggle:function(){this[this.$element.hasClass('in')?'hide':'show']()}} var old=$.fn.collapse $.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data('collapse'),options=$.extend({},$.fn.collapse.defaults,$this.data(),typeof option=='object'&&option) if(!data)$this.data('collapse',(data=new Collapse(this,options))) if(typeof option=='string')data[option]()})} $.fn.collapse.defaults={toggle:!0} $.fn.collapse.Constructor=Collapse $.fn.collapse.noConflict=function(){$.fn.collapse=old return this} $(document).on('click.collapse.data-api','[data-toggle=collapse]',function(e){var $this=$(this),href,target=$this.attr('data-target')||e.preventDefault()||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''),option=$(target).data('collapse')?'toggle':$this.data() $this[$(target).hasClass('in')?'addClass':'removeClass']('collapsed') $(target).collapse(option)})}(window.jQuery);!function($){"use strict";var toggle='[data-toggle=dropdown]',Dropdown=function(element){var $el=$(element).on('click.dropdown.data-api',this.toggle) $('html').on('click.dropdown.data-api',function(){})} Dropdown.prototype={constructor:Dropdown,toggle:function(e){var $this=$(this),$parent,isActive if($this.is('.disabled, :disabled'))return $parent=getParent($this) isActive=$parent.hasClass('open') clearMenus($this) if(!isActive){$parent.toggleClass('open')} $this.focus() return!1},keydown:function(e){var $this,$items,$active,$parent,isActive,index if(!/(38|40|27)/.test(e.keyCode))return $this=$(this) e.preventDefault() e.stopPropagation() if($this.is('.disabled, :disabled'))return $parent=getParent($this) isActive=$parent.hasClass('open') if(!isActive||(isActive&&e.keyCode==27)){if(e.which==27)$parent.find(toggle).focus() return $this.click()} $items=$('[role=menu] li:not(.divider):visible a',$parent) if(!$items.length)return index=$items.index($items.filter(':focus')) if(e.keyCode==38&&index>0)index-- if(e.keyCode==40&&index<$items.length-1)index++ if(!~index)index=0 $items.eq(index).focus()}} function clearMenus(toggler){$(toggle).each(function(){var $parent=getParent($(this));if(toggler==undefined||toggler.closest==undefined||toggler.closest($parent).length==0)$parent.removeClass('open')})} function getParent($this){var selector=$this.attr('data-target'),$parent if(!selector){selector=$this.attr('href') selector=selector&&/#/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')} $parent=selector&&$(selector) if(!$parent||!$parent.length)$parent=$this.parent() return $parent} var old=$.fn.dropdown $.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data('dropdown') if(!data)$this.data('dropdown',(data=new Dropdown(this))) if(typeof option=='string')data[option].call($this)})} $.fn.dropdown.Constructor=Dropdown $.fn.dropdown.noConflict=function(){$.fn.dropdown=old return this} $(document).on('click.dropdown.data-api',clearMenus).on('click.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()}).on('click.dropdown-menu',function(e){e.stopPropagation()}).on('click.dropdown.data-api',toggle,Dropdown.prototype.toggle).on('keydown.dropdown.data-api',toggle+', [role=menu]',Dropdown.prototype.keydown)}(window.jQuery);!function($){"use strict";var Modal=function(element,options){this.options=options this.$element=$(element).delegate('[data-dismiss="modal"]','click.dismiss.modal',$.proxy(this.hide,this)) this.options.remote&&this.$element.find('.modal-body').load(this.options.remote)} Modal.prototype={constructor:Modal,toggle:function(){return this[!this.isShown?'show':'hide']()},show:function(){var that=this,e=$.Event('show') this.$element.trigger(e) if(this.isShown||e.isDefaultPrevented())return this.isShown=!0 this.escape() this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade') if(!that.$element.parent().length){that.$element.appendTo(document.body)} that.$element.show() if(transition){that.$element[0].offsetWidth} that.$element.addClass('in').attr('aria-hidden',!1) that.enforceFocus() transition?that.$element.one($.support.transition.end,function(){that.$element.focus().trigger('shown')}):that.$element.focus().trigger('shown')})},hide:function(e){e&&e.preventDefault() var that=this e=$.Event('hide') this.$element.trigger(e) if(!this.isShown||e.isDefaultPrevented())return this.isShown=!1 this.escape() $(document).off('focusin.modal') this.$element.removeClass('in').attr('aria-hidden',!0) $.support.transition&&this.$element.hasClass('fade')?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var that=this $(document).on('focusin.modal',function(e){if(that.$element[0]!==e.target&&!that.$element.has(e.target).length){that.$element.focus()}})},escape:function(){var that=this if(this.isShown&&this.options.keyboard){this.$element.on('keyup.dismiss.modal',function(e){e.which==27&&that.hide()})}else if(!this.isShown){this.$element.off('keyup.dismiss.modal')}},hideWithTransition:function(){var that=this,timeout=setTimeout(function(){that.$element.off($.support.transition.end) that.hideModal()},500) this.$element.one($.support.transition.end,function(){clearTimeout(timeout) that.hideModal()})},hideModal:function(){var that=this this.$element.hide() this.backdrop(function(){that.removeBackdrop() that.$element.trigger('hidden')})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove() this.$backdrop=null},backdrop:function(callback){var that=this,animate=this.$element.hasClass('fade')?'fade':'' if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate this.$backdrop=$('",t=(t+='
")+'
'+Favorites.jsData.authentication_modal_content+"
\x3c!-- .simplefavorites-modal-content-body --\x3e
\x3c!-- .simplefavorites-modal-content --\x3e",o("body").prepend(t))},e.closeModal=function(){o("["+Favorites.selectors.modals+"]").removeClass("active"),o(document).trigger("favorites-modal-closed")},e.bindEvents()},(Favorites=Favorites||{}).RequireConsent=function(){var s=this,o=jQuery;return s.consentData,s.postData,s.activeButton,s.bindEvents=function(){o(document).on("favorites-require-consent",function(t,e,o,a){s.consentData=e,s.postData=o,s.activeButton=a,s.openModal()}),o(document).on("favorites-user-consent-approved",function(t,e){void 0!==e?(o(s.activeButton).attr("data-user-consent-accepted","true"),o(s.activeButton).click(),s.closeModal()):s.setConsent(!0)}),o(document).on("favorites-user-consent-denied",function(){s.setConsent(!1)}),o(document).on("click",".simplefavorites-modal-backdrop",function(t){s.closeModal()}),o(document).on("click","[data-favorites-consent-deny]",function(t){t.preventDefault(),s.closeModal(),o(document).trigger("favorites-user-consent-denied")}),o(document).on("click","[data-favorites-consent-accept]",function(t){t.preventDefault(),o(document).trigger("favorites-user-consent-approved",[o(this)])})},s.openModal=function(){s.buildModal(),setTimeout(function(){o("["+Favorites.selectors.consentModal+"]").addClass("active")},10)},s.buildModal=function(){var t;0")+('
')+s.consentData.message+"
")+'\x3c!-- .simplefavorites-modal-footer --\x3e
\x3c!-- .simplefavorites-modal-content-body --\x3e
\x3c!-- .simplefavorites-modal-content --\x3e",o("body").prepend(t))},s.closeModal=function(){o("["+Favorites.selectors.consentModal+"]").removeClass("active")},s.setConsent=function(t){o.ajax({url:Favorites.jsData.ajaxurl,type:"post",dataType:"json",data:{action:Favorites.formActions.cookieConsent,consent:t}})},s.bindEvents()},jQuery(document).ready(function(){new Favorites.Factory}),(Favorites=Favorites||{}).selectors={button:".simplefavorite-button",list:".favorites-list",clear_button:".simplefavorites-clear",total_favorites:".simplefavorites-user-count",modals:"data-favorites-modal",consentModal:"data-favorites-consent-modal",close_modals:"data-favorites-modal-close",count:".simplefavorite-button-count",post_favorite_count:"data-favorites-post-count-id"},Favorites.cssClasses={loading:"loading",active:"active"},Favorites.jsData={ajaxurl:favorites_data.ajaxurl,favorite:favorites_data.favorite,favorited:favorites_data.favorited,include_count:favorites_data.includecount,indicate_loading:favorites_data.indicate_loading,loading_text:favorites_data.loading_text,loading_image_active:favorites_data.loading_image_active,loading_image:favorites_data.loading_image,cache_enabled:favorites_data.cache_enabled,authentication_modal_content:favorites_data.authentication_modal_content,authentication_redirect:favorites_data.authentication_redirect,authentication_redirect_url:favorites_data.authentication_redirect_url,button_options:favorites_data.button_options,dev_mode:favorites_data.dev_mode,logged_in:favorites_data.logged_in,user_id:favorites_data.user_id},Favorites.userFavorites=null,Favorites.authenticated=!0,Favorites.formActions={favoritesarray:"favorites_array",favorite:"favorites_favorite",clearall:"favorites_clear",favoritelist:"favorites_list",cookieConsent:"favorites_cookie_consent"},Favorites.Factory=function(){jQuery;return this.build=function(){new Favorites.UserFavorites,new Favorites.Lists,new Favorites.Clear,new Favorites.Button,new Favorites.ButtonUpdater,new Favorites.TotalCount,new Favorites.PostFavoriteCount,new Favorites.RequireAuthentication,new Favorites.RequireConsent},this.build()}; } catch(e){console.error("An error has occurred: "+e.stack);} try{ var cnArgs = {"ajaxUrl":"https:\/\/ky.onair.cc\/wp-admin\/admin-ajax.php","nonce":"41f0c666da","hideEffect":"fade","position":"bottom","onScroll":false,"onScrollOffset":100,"onClick":false,"cookieName":"cookie_notice_accepted","cookieTime":2592000,"cookieTimeRejected":2592000,"globalCookie":false,"redirection":false,"cache":true,"revokeCookies":false,"revokeCookiesOpt":"automatic"}; } catch(e){console.error("An error has occurred: "+e.stack);} /* https://ky.onair.cc/wp-content/plugins/cookie-notice/js/front.min.js */ try{ !function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}(),function(){var e=function(e){return RegExp("(^| )"+e+"( |$)")},t=function(e,t,n){for(var i=0;i0?" "+e:e)},this)},remove:function(){t(arguments,function(t){this.element.className=this.element.className.replace(e(t),"")},this)},toggle:function(e){return this.contains(e)?(this.remove(e),!1):(this.add(e),!0)},contains:function(t){return e(t).test(this.element.className)},replace:function(e,t){this.remove(e),this.add(t)}},"classList"in Element.prototype||Object.defineProperty(Element.prototype,"classList",{get:function(){return new n(this)}}),window.DOMTokenList&&null==DOMTokenList.prototype.replace&&(DOMTokenList.prototype.replace=n.prototype.replace)}(),function(e,t,n){var i=new function(){this.cookiesAccepted=null,this.noticeContainer=null,this.setStatus=function(n){var i=this,o="",s="",c=new Date,a=new Date;cnArgs.onScroll&&e.removeEventListener("scroll",this.handleScroll),"accept"===n?(n="true",a.setTime(parseInt(c.getTime())+1e3*parseInt(cnArgs.cookieTime))):(n="false",a.setTime(parseInt(c.getTime())+1e3*parseInt(cnArgs.cookieTimeRejected))),cnArgs.globalCookie&&(o=this.getDomain(t.location.hostname)),"localhost"===t.location.hostname&&(s=t.location.pathname.split("/")[1]);var r="";"https:"===t.location.protocol&&(r=";secure"),t.cookie=cnArgs.cookieName+"="+n+";expires="+a.toUTCString()+";path=/"+s+";domain="+o+r,this.cookiesAccepted="true"===n;var d=new CustomEvent("setCookieNotice",{detail:{value:n,time:c,expires:a,data:cnArgs}});if(t.dispatchEvent(d),this.setBodyClass(["cookies-set","true"===n?"cookies-accepted":"cookies-refused"]),this.hideCookieNotice(),"automatic"===cnArgs.revokeCookiesOpt&&(this.noticeContainer.addEventListener("animationend",function e(){i.noticeContainer.removeEventListener("animationend",e),i.showRevokeNotice()}),this.noticeContainer.addEventListener("webkitAnimationEnd",function e(){i.noticeContainer.removeEventListener("webkitAnimationEnd",e),i.showRevokeNotice()})),cnArgs.redirection&&("true"===n&&null===this.cookiesAccepted||n!==this.cookiesAccepted&&null!==this.cookiesAccepted)){var l=e.location.protocol+"//",h=e.location.host+"/"+e.location.pathname;cnArgs.cache?(l=l+h.replace("//","/")+(""===e.location.search?"?":e.location.search+"&")+"cn-reloaded=1"+e.location.hash,e.location.href=l):(l=l+h.replace("//","/")+e.location.search+e.location.hash,e.location.reload(!0));return}},this.getDomain=function(e){RegExp(/https?:\/\//).test(e)||(e="https://"+e);var t=new URL(e).hostname.split(".");return t.slice(0).slice(-(4===t.length?3:2)).join(".")},this.getStatus=function(e){var n=("; "+t.cookie).split("; cookie_notice_accepted=");if(2!==n.length)return null;var i=n.pop().split(";").shift();return e?"true"===i:i},this.showCookieNotice=function(){var e=this,n=new CustomEvent("showCookieNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.remove("cookie-notice-hidden"),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.add("cookie-notice-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated")})},this.hideCookieNotice=function(){var e=this,n=new CustomEvent("hideCookieNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-notice-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-notice-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-notice-hidden")})},this.showRevokeNotice=function(){var e=this,n=new CustomEvent("showRevokeNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.remove("cookie-revoke-hidden"),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.add("cookie-revoke-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated")})},this.hideRevokeNotice=function(){var e=this,n=new CustomEvent("hideRevokeNotice",{detail:{data:cnArgs}});t.dispatchEvent(n),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-revoke-visible"),this.noticeContainer.addEventListener("animationend",function t(){e.noticeContainer.removeEventListener("animationend",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-revoke-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function t(){e.noticeContainer.removeEventListener("webkitAnimationEnd",t),e.noticeContainer.classList.remove("cn-animated"),e.noticeContainer.classList.add("cookie-revoke-hidden")})},this.setBodyClass=function(e){t.body.classList.remove("cookies-revoke"),t.body.classList.remove("cookies-accepted"),t.body.classList.remove("cookies-refused"),t.body.classList.remove("cookies-set"),t.body.classList.remove("cookies-not-set");for(var n=0;nparseInt(cnArgs.onScrollOffset)&&this.setStatus("accept")},this.getClosest=function(e,n){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1});e&&e!==t;e=e.parentNode)if(e.matches(n))return e;return null},this.inIframe=function(){try{return e.self!==e.top}catch(t){return!0}},this.init=function(){var n=this;if(!0!==this.inIframe()&&(this.cookiesAccepted=this.getStatus(!0),this.noticeContainer=t.getElementById("cookie-notice"),this.noticeContainer)){var i=t.getElementsByClassName("cn-set-cookie"),o=t.getElementsByClassName("cn-revoke-cookie"),s=t.getElementById("cn-close-notice");this.noticeContainer.classList.add("cn-effect-"+cnArgs.hideEffect),null===this.cookiesAccepted?(cnArgs.onScroll&&e.addEventListener("scroll",function(e){n.handleScroll()}),cnArgs.onClick&&e.addEventListener("click",function(e){null===n.getClosest(e.target,"#cookie-notice")&&n.setStatus("accept")},!0),this.setBodyClass(["cookies-not-set"]),this.showCookieNotice()):(this.setBodyClass(["cookies-set",!0===this.cookiesAccepted?"cookies-accepted":"cookies-refused"]),cnArgs.revokeCookies&&"automatic"===cnArgs.revokeCookiesOpt&&this.showRevokeNotice());for(var c=0;c=options.elements.length){log('invalid slide index: '+num);return!1} options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0} if(typeof arg2=='string') options.oneTimeFx=arg2;go(options.elements,options,1,num>=options.currSlide);return!1} return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===!0){var options=$(cont).data('cycle.opts');if(!options){log('options not found, can not resume');return!1} if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0} go(options.elements,options,1,!options.backwards)}}};function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute('filter')}catch(smother){}}};function destroy(opts){if(opts.next) $(opts.next).unbind(opts.prevNextEvent);if(opts.prev) $(opts.prev).unbind(opts.prevNextEvent);if(opts.pager||opts.pagerAnchorBuilder) $.each(opts.pagerAnchors||[],function(){this.unbind().remove()});opts.pagerAnchors=null;if(opts.destroy) opts.destroy(opts)};function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});var meta=$.isFunction($cont.data)?$cont.data(opts.metaAttr):null;if(meta) opts=$.extend(opts,meta);if(opts.autostop) opts.countdown=opts.autostopCount||els.length;var cont=$cont[0];$cont.data('cycle.opts',opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];if(!$.support.opacity&&opts.cleartype) opts.after.push(function(){removeFilter(this,opts)});if(opts.continuous) opts.after.push(function(){go(els,opts,0,!opts.backwards)});saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg) clearTypeFix($slides);if($cont.css('position')=='static') $cont.css('position','relative');if(opts.width) $cont.width(opts.width);if(opts.height&&opts.height!='auto') $cont.height(opts.height);if(opts.startingSlide) opts.startingSlide=parseInt(opts.startingSlide,10);else if(opts.backwards) opts.startingSlide=els.length-1;if(opts.random){opts.randomMap=[];for(var i=0;i=els.length) opts.startingSlide=0;opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){var z;if(opts.backwards) z=first?i<=first?els.length+(i-first):first-i:els.length-i;else z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css('z-index',z)});$(els[first]).css('opacity',1).show();removeFilter(els[first],opts);if(opts.fit){if(!opts.aspect){if(opts.width) $slides.width(opts.width);if(opts.height&&opts.height!='auto') $slides.height(opts.height)}else{$slides.each(function(){var $slide=$(this);var ratio=(opts.aspect===!0)?$slide.width()/$slide.height():opts.aspect;if(opts.width&&$slide.width()!=opts.width){$slide.width(opts.width);$slide.height(opts.width/ratio)} if(opts.height&&$slide.height()maxw?w:maxw;maxh=h>maxh?h:maxh} if(maxw>0&&maxh>0) $cont.css({width:maxw+'px',height:maxh+'px'})} var pauseFlag=!1;if(opts.pause) $cont.hover(function(){pauseFlag=!0;this.cyclePause++;triggerPause(cont,!0)},function(){pauseFlag&&this.cyclePause--;triggerPause(cont,!0)});if(supportMultiTransitions(opts)===!1) return!1;var requeue=!1;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr('height')||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr('width')||0);if($el.is('img')){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ',this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options)},opts.requeueTimeout);requeue=!0;return!1}else{log('could not determine size of image: '+this.src,this.cycleW,this.cycleH)}}} return!0});if(requeue) return!1;opts.cssBefore=opts.cssBefore||{};opts.cssAfter=opts.cssAfter||{};opts.cssFirst=opts.cssFirst||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(':eq('+first+')').css(opts.cssBefore);$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout,10);if(opts.speed.constructor==String) opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed,10);if(!opts.sync) opts.speed=opts.speed/2;var buffer=opts.fx=='none'?0:opts.fx=='shuffle'?500:250;while((opts.timeout-opts.speed)=(els.length-1)?0:opts.startingSlide+1;if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)) init($cont,$slides,opts);else if(opts.fx!='custom'&&!opts.multiFx){log('unknown transition: '+opts.fx,'; slideshow terminating');return!1}} var e0=$slides[first];if(!opts.skipInitializationCallbacks){if(opts.before.length) opts.before[0].apply(e0,[e0,e0,opts,!0]);if(opts.after.length) opts.after[0].apply(e0,[e0,e0,opts,!0])} if(opts.next) $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1)});if(opts.prev) $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0)});if(opts.pager||opts.pagerAnchorBuilder) buildPager(els,opts);exposeAddSlide(opts,els);return opts};function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this)});$.each(opts.after,function(){opts.original.after.push(this)})};function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(',')>0){opts.multiFx=!0;opts.fxs=opts.fx.replace(/\s*/g,'').split(',');for(i=0;i=opts.fxs.length)) opts.lastFx=0;else if(!fwd&&(opts.lastFx==undefined||--opts.lastFx<0)) opts.lastFx=opts.fxs.length-1;fx=opts.fxs[opts.lastFx]} if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null} $.fn.cycle.resetState(opts,fx);if(opts.before.length) $.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd])});var after=function(){opts.busy=0;$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd])})};debug('tx firing('+fx+'); currSlide: '+opts.currSlide+'; nextSlide: '+opts.nextSlide);opts.busy=1;if(opts.fxFn) opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else if($.isFunction($.fn.cycle[opts.fx])) $.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);else $.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent)} if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length) opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide) opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1}else if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1}}else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1}}} if(changed&&opts.pager) opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);var ms=0;if(opts.timeout&&!opts.continuous) ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);else if(opts.continuous&&p.cyclePause) ms=10;if(ms>0) p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.backwards)},ms)};$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName)})};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while(opts.fx!='none'&&(t-opts.speed)<250) t+=opts.speed;debug('calculated timeout: '+t+'; speed: '+opts.speed);if(t!==!1) return t} return opts.timeout};$.fn.cycle.next=function(opts){advance(opts,1)};$.fn.cycle.prev=function(opts){advance(opts,0)};function advance(opts,moveForward){var val=moveForward?1:-1;var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0} if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2) opts.randomIndex=els.length-2;else if(opts.randomIndex==-1) opts.randomIndex=els.length-1;opts.nextSlide=opts.randomMap[opts.randomIndex]}else if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex]}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap)return!1;opts.nextSlide=els.length-1}else if(opts.nextSlide>=els.length){if(opts.nowrap)return!1;opts.nextSlide=0}} var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)) cb(val>0,opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,moveForward);return!1};function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts)});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass)};$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug('pagerAnchorBuilder('+i+', el) returned: '+a)}else a=''+(i+1)+'';if(!a) return;var $a=$(a);if($a.parents('body').length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(!0);$(this).append($clone);arr.push($clone[0])});$a=$(arr)}else{$a.appendTo($p)}} opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);var pagerFn=function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0} var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)) cb(opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,opts.currSlidel?c-l:opts.slideCount-l;else hops=c=0){var rgb=v.match(/\d+/g);return'#'+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])} if(v&&v!='transparent') return v} return'#ffffff'};$slides.each(function(){$(this).css('background-color',getBg(this))})};$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();if(typeof opts.cssBefore.opacity=='undefined') opts.cssBefore.opacity=1;opts.cssBefore.display='block';if(opts.slideResize&&w!==!1&&next.cycleW>0) opts.cssBefore.width=next.cycleW;if(opts.slideResize&&h!==!1&&next.cycleH>0) opts.cssBefore.height=next.cycleH;opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display='none';$(curr).css('zIndex',opts.slideCount+(rev===!0?1:0));$(next).css('zIndex',opts.slideCount+(rev===!0?0:1))};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=='number') speedIn=speedOut=speedOverride;else speedIn=speedOut=1;easeIn=easeOut=null} var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,function(){cb()})};$l.animate(opts.animOut,speedOut,easeOut,function(){$l.css(opts.cssAfter);if(!opts.sync) fn()});if(opts.sync)fn()};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq('+opts.currSlide+')').css('opacity',0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0}}};$.fn.cycle.ver=function(){return ver};$.fn.cycle.defaults={activePagerClass:'activeSlide',after:null,allowPagerClickBubble:!1,animIn:null,animOut:null,aspect:!1,autostop:0,autostopCount:0,backwards:!1,before:null,center:null,cleartype:!$.support.opacity,cleartypeNoBg:!1,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:'fade',fxFn:null,height:'auto',manualTrump:!0,metaAttr:'cycle',next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:'click.cycle',pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:'click.cycle',random:0,randomizeEffects:1,requeueOnImageNotLoaded:!0,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:!1,slideExpr:null,slideResize:1,speed:1000,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4000,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery); /*! * jQuery Cycle Plugin Transition Definitions * This script is a plugin for the jQuery Cycle Plugin * Examples and documentation at: https://malsup.com/jquery/cycle/ * Copyright (c) 2007-2010 M. Alsup * Version: 2.73 * Dual licensed under the MIT and GPL licenses: * https://www.opensource.org/licenses/mit-license.php * https://www.gnu.org/licenses/gpl.html */ (function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after()}};$.fn.cycle.transitions.fadeout=function($cont,$slides,opts){$slides.not(':eq('+opts.currSlide+')').css({display:'block','opacity':1});opts.before.push(function(curr,next,opts,w,h,rev){$(curr).css('zIndex',opts.slideCount+(!rev===!0?1:0));$(next).css('zIndex',opts.slideCount+(!rev===!0?0:1))});opts.animIn.opacity=1;opts.animOut.opacity=0;opts.cssBefore.opacity=1;opts.cssBefore.display='block';opts.cssAfter.zIndex=0};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore.top=h;opts.cssBefore.left=0;opts.cssFirst.top=0;opts.animIn.top=0;opts.animOut.top=-h};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst.top=0;opts.cssBefore.top=-h;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.top=h};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=0-w};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst.left=0;opts.cssBefore.left=-w;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.left=w};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts,fwd){if(opts.rev) fwd=!fwd;$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW});opts.cssFirst.left=0;opts.cssBefore.top=0;opts.animIn.left=0;opts.animOut.top=0};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts,fwd){if(opts.rev) fwd=!fwd;$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH});opts.cssFirst.top=0;opts.cssBefore.left=0;opts.animIn.top=0;opts.animOut.left=0};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,!1,!0);opts.animIn.width=next.cycleW});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.width=0;opts.animIn.width='show';opts.animOut.width=0};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,!0,!1);opts.animIn.height=next.cycleH});opts.cssBefore.left=0;opts.cssBefore.top=0;opts.cssBefore.height=0;opts.animIn.height='show';opts.animOut.height=0};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css('overflow','visible').width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,!0,!0,!0)});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=!0} opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++) opts.els.push($slides[i]);for(i=0;i0&&ext.parent().find('arrow').length==0){ext.before('
');ext.prev().click(function(){var arrow=jQuery(this);if(arrow.hasClass('down')){arrow.attr('title','Read less');arrow.attr('alt','Read less')}else{arrow.attr('title','Read more');arrow.attr('alt','Read more')} jQuery(this).next().slideToggle("fast",function(){jQuery(this).prev().toggleClass('down')})})}} jQuery(document).ready(function(){jQuery('.sliderContainer .slider-main-content > .extended_summary').each(extendedSummaryToggle);jQuery('body.home #widgets .extended_summary').each(extendedSummaryToggle);jQuery('.cyclenav .excerpt .extended_summary').each(extendedSummaryToggle)}); } catch(e){console.error("An error has occurred: "+e.stack);}