!function(){if("function"==typeof window.CustomEvent)return!1;function a(c,a){a=a||{bubbles:!1,cancelable:!1,detail:void 0};var b=document.createEvent("CustomEvent");return b.initCustomEvent(c,a.bubbles,a.cancelable,a.detail),b}a.prototype=window.Event.prototype,window.CustomEvent=a}(),function(){var b=function(a){return new RegExp("(^| )"+a+"( |$)")},c=function(b,c,d){for(var a=0;a0?" "+a:a)},this)},remove:function(){c(arguments,function(a){this.element.className=this.element.className.replace(b(a),"")},this)},toggle:function(a){return this.contains(a)?(this.remove(a),!1):(this.add(a),!0)},contains:function(a){return b(a).test(this.element.className)},replace:function(a,b){this.remove(a),this.add(b)}},"classList"in Element.prototype||Object.defineProperty(Element.prototype,"classList",{get:function(){return new a(this)}}),window.DOMTokenList&&null==DOMTokenList.prototype.replace&&(DOMTokenList.prototype.replace=a.prototype.replace)}(),function(a,b,c){var d=new function(){this.cookiesAccepted=null,this.noticeContainer=null,this.setStatus=function(c){var l=this,g="",h="",f=new Date,e=new Date;"1"===cnArgs.onScroll&&a.removeEventListener("scroll",this.handleScroll),"accept"===c?(c="true",e.setTime(parseInt(f.getTime())+1e3*parseInt(cnArgs.cookieTime))):(c="false",e.setTime(parseInt(f.getTime())+1e3*parseInt(cnArgs.cookieTimeRejected))),"1"===cnArgs.globalCookie&&(g=this.getDomain(b.location.hostname)),"localhost"===b.location.hostname&&(h=b.location.pathname.split("/")[1]);var i="";"https:"===b.location.protocol&&(i=";secure"),b.cookie=cnArgs.cookieName+"="+c+";expires="+e.toUTCString()+";path=/"+h+";domain="+g+i,this.cookiesAccepted="true"===c;var k=new CustomEvent("setCookieNotice",{detail:{value:c,time:f,expires:e,data:cnArgs}});if(b.dispatchEvent(k),this.setBodyClass(["cookies-set","true"===c?"cookies-accepted":"cookies-refused"]),this.hideCookieNotice(),"automatic"===cnArgs.revokeCookiesOpt&&(this.noticeContainer.addEventListener("animationend",function a(){l.noticeContainer.removeEventListener("animationend",a),l.showRevokeNotice()}),this.noticeContainer.addEventListener("webkitAnimationEnd",function a(){l.noticeContainer.removeEventListener("webkitAnimationEnd",a),l.showRevokeNotice()})),"1"===cnArgs.redirection&&("true"===c&&null===this.cookiesAccepted||c!==this.cookiesAccepted&&null!==this.cookiesAccepted)){var d=a.location.protocol+"//",j=a.location.host+"/"+a.location.pathname;"1"===cnArgs.cache?(d=d+j.replace("//","/")+(""===a.location.search?"?":a.location.search+"&")+"cn-reloaded=1"+a.location.hash,a.location.href=d):(d=d+j.replace("//","/")+a.location.search+a.location.hash,a.location.reload(!0));return}},this.getDomain=function(a){new RegExp(/https?:\/\//).test(a)||(a="http://"+a);var b=new URL(a).hostname.split(".");return b.slice(0).slice(-(4===b.length?3:2)).join(".")},this.getStatus=function(d){var a=("; "+b.cookie).split("; cookie_notice_accepted=");if(2!==a.length)return null;var c=a.pop().split(";").shift();return d?"true"===c:c},this.showCookieNotice=function(){var c=this,a=new CustomEvent("showCookieNotice",{detail:{data:cnArgs}});b.dispatchEvent(a),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 a(){c.noticeContainer.removeEventListener("animationend",a),c.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function a(){c.noticeContainer.removeEventListener("webkitAnimationEnd",a),c.noticeContainer.classList.remove("cn-animated")})},this.hideCookieNotice=function(){var c=this,a=new CustomEvent("hideCookieNotice",{detail:{data:cnArgs}});b.dispatchEvent(a),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-notice-visible"),this.noticeContainer.addEventListener("animationend",function a(){c.noticeContainer.removeEventListener("animationend",a),c.noticeContainer.classList.remove("cn-animated"),c.noticeContainer.classList.add("cookie-notice-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function a(){c.noticeContainer.removeEventListener("webkitAnimationEnd",a),c.noticeContainer.classList.remove("cn-animated"),c.noticeContainer.classList.add("cookie-notice-hidden")})},this.showRevokeNotice=function(){var c=this,a=new CustomEvent("showRevokeNotice",{detail:{data:cnArgs}});b.dispatchEvent(a),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 a(){c.noticeContainer.removeEventListener("animationend",a),c.noticeContainer.classList.remove("cn-animated")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function a(){c.noticeContainer.removeEventListener("webkitAnimationEnd",a),c.noticeContainer.classList.remove("cn-animated")})},this.hideRevokeNotice=function(){var c=this,a=new CustomEvent("hideRevokeNotice",{detail:{data:cnArgs}});b.dispatchEvent(a),this.noticeContainer.classList.add("cn-animated"),this.noticeContainer.classList.remove("cookie-revoke-visible"),this.noticeContainer.addEventListener("animationend",function a(){c.noticeContainer.removeEventListener("animationend",a),c.noticeContainer.classList.remove("cn-animated"),c.noticeContainer.classList.add("cookie-revoke-hidden")}),this.noticeContainer.addEventListener("webkitAnimationEnd",function a(){c.noticeContainer.removeEventListener("webkitAnimationEnd",a),c.noticeContainer.classList.remove("cn-animated"),c.noticeContainer.classList.add("cookie-revoke-hidden")})},this.setBodyClass=function(c){b.body.classList.remove("cookies-revoke"),b.body.classList.remove("cookies-accepted"),b.body.classList.remove("cookies-refused"),b.body.classList.remove("cookies-set"),b.body.classList.remove("cookies-not-set");for(var a=0;aparseInt(cnArgs.onScrollOffset)&&this.setStatus("accept")},this.getClosest=function(a,c){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(c){for(var b=(this.document||this.ownerDocument).querySelectorAll(c),a=b.length;--a>=0&&b.item(a)!==this;);return a> -1});a&&a!==b;a=a.parentNode)if(a.matches(c))return a;return null},this.inIframe=function(){try{return a.self!==a.top}catch(b){return!0}},this.init=function(){var g=this;if(!0!==this.inIframe()&&(this.cookiesAccepted=this.getStatus(!0),this.noticeContainer=b.getElementById("cookie-notice"),this.noticeContainer)){var d=b.getElementsByClassName("cn-set-cookie"),e=b.getElementsByClassName("cn-revoke-cookie"),f=b.getElementById("cn-close-notice");this.noticeContainer.classList.add("cn-effect-"+cnArgs.hideEffect),null===this.cookiesAccepted?("1"===cnArgs.onScroll&&a.addEventListener("scroll",function(a){g.handleScroll()}),"1"===cnArgs.onClick&&a.addEventListener("click",function(a){null===g.getClosest(a.target,"#cookie-notice")&&g.setStatus("accept")},!0),this.setBodyClass(["cookies-not-set"]),this.showCookieNotice()):(this.setBodyClass(["cookies-set",!0===this.cookiesAccepted?"cookies-accepted":"cookies-refused"]),"1"===cnArgs.revokeCookies&&"automatic"===cnArgs.revokeCookiesOpt&&this.showRevokeNotice());for(var c=0;c