1'use strict';let cmplz_cookie_data=[];let cmplzCleanCookieInterval;function cmplz_log(...args){if(typeof complianz==='undefined'||!complianz.debug){return} 2console.warn(...args)} 3function cmplz_create_element(el,content){const obj=document.createElement(el);obj.innerHtml=content;return obj} 4function cmplz_add_event(event,selector,callback){document.addEventListener(event,(e)=>{if(e.target.closest(selector)){callback(e)}})} 5function cmplz_is_hidden(el){return(el.offsetParent===null)} 6function cmplz_html_decode(input){const doc=new DOMParser().parseFromString(input,'text/html');return doc.documentElement.textContent} 7function cmplz_sanitize_placeholder_html(input){const template=document.createElement('template');template.innerHTML=String(input||'');template.content.querySelectorAll('script, iframe, object, embed, link, style, base, meta').forEach((el)=>{el.remove()});template.content.querySelectorAll('*').forEach((el)=>{Array.from(el.attributes).forEach((attr)=>{const attrName=attr.name.toLowerCase();if(attrName.indexOf('on')===0){el.removeAttribute(attr.name);return} 8const attrValue=attr.value.trim();if((attrName==='href'||attrName==='src'||attrName==='xlink:href')&&/^\s*(javascript:|data:)/i.test(attrValue)){el.removeAttribute(attr.name)}})});return template.innerHTML} 9function cmplz_is_safe_script_src(scriptUrl){if(typeof scriptUrl!=='string'){return!1} 10const trimmed=scriptUrl.trim();if(!trimmed){return!1} 11try{const parsedUrl=new URL(trimmed,window.location.href);return parsedUrl.protocol==='http:'||parsedUrl.protocol==='https:'}catch(e){return!1}} 12function cmplz_trap_focus(){if(!cmplz_banner){return} 13cmplz_original_active_element=cmplz_banner.ownerDocument.activeElement;if(complianz.soft_cookiewall){document.body.classList.add('cmplz-banner-active')} 14document.addEventListener('keydown',cmplz_handle_tab_navigation);const focusableElements=cmplz_banner.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(focusableElements.length>0){focusableElements[0].focus()}} 15function cmplz_handle_tab_navigation(e){if(e.key!=='Tab'||!cmplz_banner){return} 16const focusableElements=Array.from(cmplz_banner.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(function(el){return el.offsetParent!==null});if(focusableElements.length===0){e.preventDefault();return} 17const firstElement=focusableElements[0];const lastElement=focusableElements[focusableElements.length-1];const activeElement=cmplz_banner.ownerDocument.activeElement;const focusIsInBanner=cmplz_banner.contains(activeElement);if(e.shiftKey){if(!focusIsInBanner||activeElement===firstElement){e.preventDefault();lastElement.focus()}}else if(!focusIsInBanner||activeElement===lastElement){e.preventDefault();firstElement.focus()}} 18function cmplz_release_focus_trap(){document.removeEventListener('keydown',cmplz_handle_tab_navigation);document.body.classList.remove('cmplz-banner-active');const triggerSource=cmplz_banner_trigger_source;cmplz_banner_trigger_source='page-load';if(triggerSource==='manage-consent'){if(cmplz_original_active_element&&cmplz_original_active_element.focus){try{cmplz_original_active_element.focus()}catch(e){document.body.focus()}}}else if(cmplz_last_input_was_keyboard){const skipLink=document.querySelector('a[href="#content"], a[href="#main"], a[href="#main-content"], .skip-link');if(skipLink){skipLink.focus()}else{document.body.focus()}}} 19document.querySelectorAll('.cmplz-consent-area.cmplz-placeholder').forEach((cmplzConsentArea)=>{cmplzConsentArea.addEventListener('click',(e)=>{let container=e.target;if(!container.classList.contains('cmplz-consent-area')){container=e.target.closest('.cmplz-consent-area.cmplz-placeholder')} 20if(container){const consentedService=container.getAttribute('data-service');cmplz_set_service_consent(consentedService,!0);cmplzLoadConsentAreaContent(!1,consentedService);cmplz_enable_category(null,consentedService);cmplz_set_banner_status('dismissed')}});document.addEventListener('cmplz_enable_category',function(consentData){const consentedCategory=consentData.detail.category;const consentedService=consentData.detail.service;cmplzLoadConsentAreaContent(consentedCategory,consentedService)})});function cmplzLoadConsentAreaContent(consentedCategory,consentedService){document.querySelectorAll('.cmplz-consent-area.cmplz-placeholder').forEach((obj)=>{const category=obj.getAttribute('data-category');const service=obj.getAttribute('data-service');const postId=obj.getAttribute('data-post_id');const blockId=obj.getAttribute('data-block_id');if(consentedCategory===category||consentedService===service){const request=new XMLHttpRequest();request.open('GET',complianz.url+'consent-area/'+postId+'/'+blockId,!0);request.setRequestHeader('Content-type','application/json');request.send();obj.classList.remove('cmplz-placeholder');request.onload=function(){obj.innerHTML=JSON.parse(request.response);obj.querySelectorAll('script').forEach((scriptEl)=>{cmplz_run_script(scriptEl.innerHTML,category,service,'inline',scriptEl)})}}})} 21document.addEventListener('cmplz_manage_consent_container_loaded',function(){const url=window.location.href;if(url.indexOf('#')!==-1){const end_pos=url.lastIndexOf('?')!==-1?url.lastIndexOf('?'):undefined;const anchor=url.substring(url.indexOf('#')+1,end_pos);const element=document.getElementById(anchor);if(element){const y=element.getBoundingClientRect().top+window.pageYOffset-200;window.scrollTo({top:y,behavior:'smooth'})}}});complianz.locale=complianz.locale+'&token='+Math.random().toString(36).replace(/[^a-z]+/g,'').substr(0,5);(function(){if(typeof window.CustomEvent==='function'){return!1} 22function CustomEvent(event,params){params=params||{bubbles:!1,cancelable:!1,detail:undefined};const evt=document.createEvent('CustomEvent');evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail);return evt} 23CustomEvent.prototype=window.Event.prototype;window.CustomEvent=CustomEvent}());let cmplz_banner;const cmplz_banner_container=document.getElementById('cmplz-cookiebanner-container');let cmplz_manage_consent_button;const cmplz_waiting_inline_scripts=[];const cmplz_waiting_scripts=[];const cmplz_fired_scripts=[];let cmplz_placeholder_class_index=0;let cmplz_all_scripts_hook_fired=!1;let cmplz_consent_stored_once=!1;const cmplz_fired_category_events=['functional'];const cmplz_fired_service_events=[];const cmplz_categories=['functional','preferences','statistics','marketing',];let cmplz_original_active_element=null;
23let cmplz_banner_trigger_source='page-load';let cmplz_last_input_was_keyboard=!1;document.addEventListener('keydown',function(){cmplz_last_input_was_keyboard=!0},!0);document.addEventListener('pointerdown',function(){cmplz_last_input_was_keyboard=!1},!0);window.cmplz_get_cookie=function(name){if(typeof document==='undefined'){return''} 24name=complianz.prefix+name;const cookies=document.cookie.split(';');for(let i=0;i<cookies.length;i++){const cookie=cookies[i].trim();if(cookie.startsWith(name+'=')){return cookie.substring(name.length+1)}} 25return''};window.cmplz_set_cookie=function(name,value,use_prefix){if(typeof document==='undefined'){return} 26use_prefix=typeof use_prefix!=='undefined'?use_prefix:!0;const secure=window.location.protocol==='https:'?';secure':'';const date=new Date();date.setTime(date.getTime()+(complianz.cookie_expiry*24*60*60*1000));const expires=';expires='+date.toGMTString();const domain=cmplz_get_cookie_domain();const domainString=domain.length>0?`;domain=${ domain }`:'';const prefix=use_prefix?complianz.prefix:'';const cookiePath=cmplz_get_cookie_path();document.cookie=`${ prefix }${ name }=${ value };SameSite=Lax${ secure }${ expires }${ domainString };path=${ cookiePath }`};window.cmplz_in_array=function(needle,haystack){return haystack.includes(needle)};window.cmplz_highest_accepted_category=function(){const consentedCategories=cmplz_accepted_categories();const priorityCategories=['marketing','statistics','preferences'];for(let i=0;i<priorityCategories.length;i++){if(cmplz_in_array(priorityCategories[i],consentedCategories)){return priorityCategories[i]}} 27return'functional'};const cmplz_set_category_as_body_class=()=>{const classList=document.body.classList;for(let i=classList.length-1;i>=0;i--){if(classList[i].startsWith('cmplz-')&&classList[i]!=='cmplz-document'){classList.remove(classList[i])}} 28const cats=cmplz_accepted_categories();Object.values(cats).forEach((category)=>{if(typeof category==='string'){classList.add('cmplz-'+category)}});const services=cmplz_get_all_service_consents();Object.entries(services).forEach(([service,consent])=>{if(consent){classList.add('cmplz-'+service)}});classList.add('cmplz-'+complianz.region,'cmplz-'+complianz.consenttype);const event=new CustomEvent('cmplz_set_category_as_bodyclass');document.dispatchEvent(event)};const cmplz_append_css=(css)=>{const head=document.head||document.getElementsByTagName('head')[0];const style=document.createElement('style');style.setAttribute('type','text/css');style.appendChild(document.createTextNode(css));head.appendChild(style)};const cmplz_load_css=(path)=>{const head=document.head||document.getElementsByTagName('head')[0];const targetObj=document.createElement('link');targetObj.rel='stylesheet';targetObj.type='text/css';targetObj.href=path;head.appendChild(targetObj)};function cmplz_run_script(script,category,service,type,sourceObj){const targetObj=document.createElement('script');if(type!=='inline'&&cmplz_is_safe_script_src(script)){targetObj.src=script}else{if(typeof script!=='string'){script=script.innerHTML} 29targetObj.textContent=[script,'cmplzScriptLoaded();'].join('\n')} 30if(cmplz_in_array(script,cmplz_fired_scripts)){return} 31cmplzCopyAttributes(sourceObj,targetObj);try{if(type!=='inline'){targetObj.onload=function(){cmplz_run_after_all_scripts(category,service);cmplz_maybe_run_waiting_scripts(script,category,service,sourceObj)}}else{window.cmplzScriptLoaded=function(){cmplz_run_after_all_scripts(category,service);cmplz_maybe_run_waiting_scripts(script,category,service,sourceObj)}} 32document.head.appendChild(targetObj)}catch(exception){cmplz_run_after_all_scripts(category,service);throw 'Something went wrong '+exception+' while loading '+script}} 33function cmplz_maybe_run_waiting_scripts(script,category,service,sourceObj){const waitingScript=cmplz_get_waiting_script(cmplz_waiting_scripts,script);if(waitingScript){cmplz_run_script(waitingScript,category,service,'src',sourceObj)} 34const waiting_inline_script=cmplz_get_waiting_script(cmplz_waiting_inline_scripts,script);if(waiting_inline_script){cmplz_run_script(waiting_inline_script,category,service,'inline',sourceObj)}} 35const cmplzLazyLoader=()=>{const cmplzLazyLoadElements=document.querySelectorAll('.cmplz-blocked-content-container');const cmplzObserver=new IntersectionObserver((entries,observer)=>
35{entries.forEach((entry)=>{if(entry.isIntersecting){const element=entry.target;const src=element.getAttribute('data-placeholder-image');if(src){const index=element.getAttribute('data-placeholder_class_index');cmplz_append_css('.cmplz-placeholder-'+index+' {background-image: url('+src+') !important;}');cmplz_set_blocked_content_container_aspect_ratio(element,src,index)} 36observer.unobserve(element)}})});cmplzLazyLoadElements.forEach((element)=>{cmplzObserver.observe(element)})};function cmplz_set_blocked_content_container(){document.querySelectorAll('.cmplz-image').forEach((obj)=>{if(obj.classList.contains('cmplz-processed')){return} 37obj.classList.add('cmplz-processed');const service=obj.getAttribute('data-service');const category=obj.getAttribute('data-category');const blocked_image_container=obj.parentElement;blocked_image_container.classList.add('cmplz-blocked-content-container');const curIndex=blocked_image_container.getAttribute('data-placeholder_class_index');if(obj.getAttribute('loading')==='lazy'){obj.removeAttribute('loading');obj.setAttribute('data-deferlazy',1)} 38if(curIndex===null){cmplz_placeholder_class_index++;blocked_image_container.classList.add('cmplz-placeholder-'+cmplz_placeholder_class_index,'cmplz-blocked-content-container');blocked_image_container.setAttribute('data-placeholder_class_index',cmplz_placeholder_class_index);cmplz_insert_placeholder_text(blocked_image_container,category,service)}});document.querySelectorAll('.cmplz-placeholder-element').forEach((obj)=>{if(obj.classList.contains('cmplz-processed')){return} 39obj.classList.add('cmplz-processed');const service=obj.getAttribute('data-service');const category=obj.getAttribute('data-category');let blocked_content_container;if(obj.classList.contains('cmplz-iframe')){if(obj.getAttribute('loading')==='lazy'){obj.removeAttribute('loading');obj.setAttribute('data-deferlazy',1)} 40blocked_content_container=obj.parentElement}else{blocked_content_container=obj} 41const curIndex=blocked_content_container.getAttribute('data-placeholder_class_index');if(curIndex===null){cmplz_placeholder_class_index++;blocked_content_container.classList.add('cmplz-placeholder-'+cmplz_placeholder_class_index,'cmplz-blocked-content-container');blocked_content_container.setAttribute('data-placeholder_class_index',cmplz_placeholder_class_index);cmplz_insert_placeholder_text(blocked_content_container,category,service);const src=obj.getAttribute('data-placeholder-image');if(src&&typeof src!=='undefined'&&src.length){blocked_content_container.setAttribute('data-placeholder-image',src)}}});cmplzLazyLoader();if(cmplz_has_consent('statistics')){cmplz_enable_category('statistics')} 42if(cmplz_has_consent('marketing')){cmplz_enable_category('marketing')}} 43function cmplz_insert_placeholder_text(container,category,service){if(!container.querySelector('.cmplz-blocked-content-notice')){let placeholder_text=complianz.placeholdertext;category=category||'marketing';let body;if(typeof placeholder_text!=='undefined'){if(Number(complianz.clean_cookies)===1){let service_nicename=service?service.replace('-',' '):'';service_nicename=service_nicename.charAt(0).toUpperCase()+service_nicename.slice(1);placeholder_text=placeholder_text.replace('{service}',service_nicename);body=cmplz_create_element('div',placeholder_text);body.innerHTML=cmplz_sanitize_placeholder_html(placeholder_text);body.classList.add('cmplz-blocked-content-notice');const btn=body.querySelector('button');btn.setAttribute('data-service',service);btn.setAttribute('data-category',category);btn.setAttribute('aria-label',complianz.aria_label.replace('{service}',service_nicename));const pageLinks=complianz.page_links[complianz.region];const link=body.querySelector('.cmplz-links a');if(pageLinks&&pageLinks.hasOwnProperty('cookie-statement')){link.setAttribute('href',pageLinks['cookie-statement'].url);if(link.innerText==='{title}'){link.innerText=pageLinks['cookie-statement'].title}}else if(link){link.parentElement.style.display='none'}}else{const btn=cmplz_create_element('button','');const category_nicename=complianz.categories.hasOwnProperty(category)?complianz.categories[category]:'marketing';btn.innerText=placeholder_text.replace('{category}',category_nicename);btn.classList.add('cmplz-blocked-content-notice','cmplz-accept-category','cmplz-accept-'+category);btn.setAttribute('data-service',service);btn.setAttribute('data-category',category);btn.setAttribute('aria-label',complianz.aria_label.replace('{category}',category));body=btn} 44if(container.tagName!=='VIDEO'){container.appendChild(body)}else{container.parentElement.appendChild(body)}}}} 45function cmplz_set_blocked_content_container_aspect_ratio(container,src,placeholder_class_index){if(container==null){return} 46const img=new Image();img.addEventListener('load',function(){const imgWidth=this.naturalWi
46dth||1;const imgHeight=this.naturalHeight;const w=container.clientWidth;const h=imgHeight*(w/imgWidth);const heightCSS=src.indexOf('placeholder.jpg')===-1?'height:'+h+'px;':'';cmplz_append_css('.cmplz-placeholder-'+placeholder_class_index+' {'+heightCSS+'}')});img.src=src} 47let cmplzResizeTimer;window.addEventListener('resize',function(){clearTimeout(cmplzResizeTimer);cmplzResizeTimer=setTimeout(cmplz_set_blocked_content_container,500)},!0);if(Number(complianz.block_ajax_content)===1){setInterval(function(){cmplz_set_blocked_content_container()},2000)} 48function cmplz_enable_category(category,service){if(Number(complianz.tm_categories)===1&&category!==''){cmplz_run_tm_event(category)} 49const details={};details.category=category;details.categories=cmplz_accepted_categories();details.region=complianz.region;const event=new CustomEvent('cmplz_before_category',{detail:details});document.dispatchEvent(event);service=typeof service!=='undefined'?service:'do_not_match';if(category===''){category='do_not_match'} 50if(category==='functional'){return} 51if(category==='marketing'){cmplz_set_integrations_cookies()} 52let selector;if(service!=='do_not_match'){selector='.cmplz-blocked-content-notice [data-service="'+service+'"]'}else{selector=Number(complianz.clean_cookies)!==1?'.cmplz-blocked-content-notice.cmplz-accept-'+category:'.cmplz-blocked-content-notice [data-category="'+category+'"]'} 53document.querySelectorAll(selector).forEach((obj)=>{const blockedElementService=obj.getAttribute('data-service');if(obj.parentNode.classList.contains('cmplz-blocked-content-notice')){obj=obj.parentNode} 54if(!cmplz_is_service_denied(blockedElementService)){obj.parentNode.removeChild(obj)}});document.querySelectorAll('[data-category="'+category+'"], [data-service="'+service+'"]').forEach((obj)=>{const elementService=obj.getAttribute('data-service');if(cmplz_is_service_denied(elementService)){return} 55if(obj.getAttribute('data-category')==='functional'){return} 56if(obj.classList.contains('cmplz-activated')){return} 57const tagName=obj.tagName;if(tagName==='LINK'){obj.classList.add('cmplz-activated');const src=obj.getAttribute('data-href');cmplz_load_css(src,category)}else if(tagName==='IMG'){obj.classList.add('cmplz-activated');const src=obj.getAttribute('data-src-cmplz');obj.setAttribute('src',src);if(obj.getAttribute('data-deferlazy')){obj.setAttribute('loading','lazy')} 58cmplz_remove_placeholder(obj)}else if(tagName==='IFRAME'){obj.classList.add('cmplz-activated');let src=obj.getAttribute('data-src-cmplz');const srcAttribute=obj.getAttribute('data-cmplz-target')?obj.getAttribute('data-cmplz-target'):'src';const autoplay=cmplz_get_url_parameter(obj.getAttribute(srcAttribute),'autoplay');if(autoplay==='1'){src=src+'&autoplay=1'} 59if(obj.getAttribute('data-deferlazy')){obj.setAttribute('loading','lazy')} 60obj.addEventListener('load',()=>{cmplz_remove_placeholder(obj)});obj.setAttribute(srcAttribute,src)}else if(obj.classList.contains('cmplz-placeholder-element')){obj.classList.add('cmplz-activated');const cssIndex=obj.getAttribute('data-placeholder_class_index');obj.classList.remove('cmplz-blocked-content-container','cmplz-placeholder-'+cssIndex)}});const scriptElements=document.querySelectorAll('script[data-category="'+category+'"], script[data-service="'+service+'"]');scriptElements.forEach((obj)=>{const waitfor=obj.getAttribute('data-waitfor');const src=obj.getAttribute('data-cmplz-src');if(waitfor){if(src){cmplz_waiting_scripts[waitfor]=src}else if(obj.innerText.length>0){cmplz_waiting_inline_scripts[waitfor]=obj}} 61if(obj.parentElement){obj.parentElement.removeChild(obj)}});scriptElements.forEach((obj)=>{const script_mime_type=obj.getAttribute('type');if(obj.classList.contains('cmplz-activated')||(!script_mime_type||script_mime_type==='text/javascript')){return} 62obj.classList.add('cmplz-activated');const src=obj.getAttribute('data-cmplz-src');if(src){obj.removeAttribute('type');if(cmplz_is_waiting_script(cmplz_waiting_scripts,src)){return} 63if(obj.getAttribute('data-post_scribe_id')){const psID='#'+obj.getAttribute('data-post_scribe_id');const postScribeObj=document.querySelector(psID);if(postScribeObj){postScribeObj.innerHtml('');postscribe(psID,'<script src='+src+'></script>')}}
63else{cmplz_run_script(src,category,service,'src',obj)}}else if(obj.innerText.length>0){if(cmplz_is_waiting_script(cmplz_waiting_inline_scripts,obj.innerText)){return} 64cmplz_run_script(obj.innerText,category,service,'inline',obj)}});cmplz_run_after_all_scripts(category,service)} 65function cmplz_remove_placeholder(obj){const blocked_content_container=obj.closest('.cmplz-blocked-content-container');if(blocked_content_container){const cssIndex=blocked_content_container.getAttribute('data-placeholder_class_index');blocked_content_container.classList.remove('cmplz-blocked-content-container','cmplz-placeholder-'+cssIndex)} 66obj.classList.remove('cmplz-iframe-styles','cmplz-iframe','video-wrap')} 67function cmplz_get_waiting_script(waiting_scripts,src){for(const waitfor in waiting_scripts){if(waiting_scripts.hasOwnProperty(waitfor)){if(src.indexOf(waitfor)!==-1){const output=waiting_scripts[waitfor];delete waiting_scripts[waitfor];return output}}} 68return!1} 69function cmplz_array_is_empty(arr){for(const key in arr){if(arr.hasOwnProperty(key)){return!1}} 70return!0} 71function cmplz_is_waiting_script(waiting_scripts,srcOrScript){for(const waitfor in waiting_scripts){if(waiting_scripts.hasOwnProperty(waitfor)){let waitingScript=waiting_scripts[waitfor];if(typeof waitingScript!=='string'){waitingScript=waitingScript.innerText} 72if(srcOrScript.indexOf(waitingScript)!==-1||waitingScript.indexOf(srcOrScript)!==-1){return!0}}} 73return!1} 74function cmplz_run_after_all_scripts(category,service){const enableService=service!=='do_not_match'&&!cmplz_in_array(service,cmplz_fired_service_events);const enableCategory=category!=='do_not_match'&&!cmplz_in_array(category,cmplz_fired_category_events);if(enableCategory||enableService){if(enableCategory){cmplz_fired_category_events.push(category)} 75if(enableService){cmplz_fired_service_events.push(service)} 76const details={};details.category=category;details.service=service;details.categories=cmplz_accepted_categories();details.services=cmplz_get_all_service_consents();details.region=complianz.region;const event=new CustomEvent('cmplz_enable_category',{detail:details});document.dispatchEvent(event)} 77if(!cmplz_all_scripts_hook_fired&&cmplz_array_is_empty(cmplz_waiting_inline_scripts)&&cmplz_array_is_empty(cmplz_waiting_scripts)){const event=new CustomEvent('cmplz_run_after_all_scripts',{detail:category,service});document.dispatchEvent(event);cmplz_all_scripts_hook_fired=!0}} 78const cmplz_fired_events=[];function cmplz_run_tm_event(category){if(cmplz_fired_events.indexOf(category)===-1){cmplz_fired_events.push(category);window.dataLayer=window.dataLayer||[];window.dataLayer.push({event:'cmplz_event_'+category,});const event=new CustomEvent('cmplz_tag_manager_event',{detail:category});document.dispatchEvent(event)}} 79window.cmplz_accept_all=function(){cmplz_clear_all_service_consents();cmplz_fire_before_categories_consent(cmplz_categories);for(const key in cmplz_categories){if(cmplz_categories.hasOwnProperty(key)){cmplz_set_consent(cmplz_categories[key],'allow')}} 80cmplz_sync_category_checkboxes()};function cmplz_fire_before_categories_consent(categories){const details={};details.categories=categories;details.region=complianz.region;const event=new CustomEvent('cmplz_before_categories_consent',{detail:details});document.dispatchEvent(event)} 81window.cmplz_deny_all=function(){for(const key in cmplz_categories){if(cmplz_categories.hasOwnProperty(key)){cmplz_set_consent(cmplz_categories[key],'deny')}} 82const consentLevel=cmplz_highest_accepted_category();let reload=!1;if(consentLevel!=='functional'||cmplz_exists_service_consent()){reload=!0} 83if(cmplz_clear_cookies('cmplz_service')){reload=!0} 84cmplz_clear_all_service_consents();cmplz_integrations_revoke();cmplz_fire_categories_event();cmplz_track_status();const event=new CustomEvent('cmplz_revoke',{detail:reload});document.dispatchEvent(event);if(!complianz.tcf_active&&reload){cmplz_reload_browser_compatible()}};function cmplz_check_cookie_policy_id(){const user_policy_id=cmplz_get_cookie('policy_id');if(user_policy_id&&(parseInt(complianz.current_policy_id)!==parseInt(user_policy_id))){cmplz_deny_all();cmplz_set_banner_status('show');cmplz_clear_cookies('cmplz')}} 85window.conditionally_show_banner=function(){complianz=cmplz_merge_object(complianz,cmplz_user_data);cmplz_maybe_auto_redirect();cmplz_set_blocked_content_container();window.wp_consent_type=complianz.consenttype;let event=new CustomEvent('wp_consent_type_defined');document.dispatchEvent(event);event=new CustomEvent('cmplz_before_cookiebanner');document.dispatchEvent(event);
85if(Number(complianz.forceEnableStats)===1&&complianz.consenttype==='optin'){cmplz_set_consent('statistics','allow')} 86const rev_cats=cmplz_categories.reverse();const consented_categories=[];for(const key in rev_cats){if(rev_cats.hasOwnProperty(key)){const category=cmplz_categories[key];if(cmplz_has_consent(category)){consented_categories.push(category)}}} 87cmplz_fire_before_categories_consent(consented_categories);for(const key in consented_categories){if(rev_cats.hasOwnProperty(key)){const category=consented_categories[key];cmplz_enable_category(category)}} 88if(cmplz_exists_service_consent()){cmplz_enable_category('','general');const services=cmplz_get_services_on_page();for(const key in services){if(services.hasOwnProperty(key)){const service=services[key].service;const category=services[key].category;if(cmplz_has_service_consent(service,category)){document.querySelectorAll('.cmplz-accept-service[data-service="'+service+'"]').forEach((obj)=>{obj.checked=!0});cmplz_enable_category('',service)}}}} 89cmplz_sync_category_checkboxes();cmplz_integrations_init();cmplz_check_cookie_policy_id();cmplz_set_up_auto_dismiss();cmplz_load_manage_consent_container();event=new CustomEvent('cmplz_cookie_banner_data',{detail:complianz});document.dispatchEvent(event);if(cmplz_get_cookie('saved_categories')===''){if(complianz.consenttype!=='optin'&&complianz.consenttype!=='optout'){cmplz_track_status()}else if(cmplz_do_not_track()){cmplz_track_status('do_not_track')}} 90cmplz_set_category_as_body_class();cmplz_fire_categories_event();if(!cmplz_do_not_track()){if(complianz.consenttype==='optin'){if(complianz.forceEnableStats){cmplz_enable_category('statistics')} 91cmplz_log('opt-in');show_cookie_banner()}else if(complianz.consenttype==='optout'){cmplz_log('opt-out');show_cookie_banner()}else{cmplz_log('other consent type, no cookie warning');cmplz_accept_all()}}else{cmplz_log('global privacy control or do not track detected: no banner.');cmplz_track_status('do_not_track')}};function cmplz_do_not_track(){const dnt='doNotTrack' in navigator&&navigator.doNotTrack==='1';const gpc='globalPrivacyControl' in navigator&&navigator.globalPrivacyControl;return!!(complianz.do_not_track_enabled&&(gpc||dnt))} 92function cmplz_get_services_on_page(){const services=[];document.querySelectorAll('[data-service]').forEach((obj)=>{const service=obj.getAttribute('data-service');const category=obj.getAttribute('data-category');if(services.indexOf(service)===-1){services.push({category,service,})}});return services} 93window.show_cookie_banner=function(){let disableCookiebanner=complianz.disable_cookiebanner||cmplz_is_speedbot();let tmpDismissCookiebanner=!1;if(document.querySelector('#cmplz-manage-consent-container')||document.querySelector('.cmplz-dropdown-cookiepolicy')){tmpDismissCookiebanner=!0} 94const container=document.getElementById('cmplz-cookiebanner-container');if(container){document.body.prepend(container)} 95const pageLinks=complianz.page_links[complianz.region];cmplz_banner=document.querySelector('.cmplz-cookiebanner.banner-'+complianz.user_banner_id+'.'+complianz.consenttype);if(!cmplz_banner){disableCookiebanner=!0} 96cmplz_manage_consent_button=document.querySelector('#cmplz-manage-consent .cmplz-manage-consent.manage-consent-'+complianz.user_banner_id);const revealBanner=function(){if(disableCookiebanner){return} 97cmplz_banner.classList.remove('cmplz-hidden');cmplz_manage_consent_button.classList.remove('cmplz-hidden');if(cmplz_get_banner_status()==='show'){cmplz_trap_focus();const closeButton=cmplz_banner.querySelector('.cmplz-close');if(closeButton){closeButton.focus()}}};const bannerLink=cmplzEnsureBannerCss();if(!disableCookiebanner){if(bannerLink&&bannerLink.sheet){revealBanner()}else if(bannerLink){bannerLink.addEventListener('load',revealBanner);setTimeout(revealBanner,500)}else{revealBanner()}} 98if(cmplz_banner&&!disableCookiebanner){cmplz_banner.querySelectorAll('.cmplz-links a:not(.cmplz-external), .cmplz-buttons a:not(.cmplz-external)').forEach((obj)=>{const docElement=obj;docElement.classList.add('cmplz-hidden');for(const pageType in pageLinks){if(pageLinks.hasOwnProperty(pageType)&&docElement.classList.contains(pageType)){docElement.setAttribute('href',pageLinks[pageType].url+docElement.getAttribute('data-relative_url'));if(docElement.innerText==='{title}'){docElement.innerText=cmplz_html_decode(pageLinks[pageType].title)} 99docElement.classList.remove('cmplz-hidden')}}});cmplz_set_banner_status();if(tmpDismissCookiebanner){cmplz_banner.classList.remove('cmplz-show');cmplz_banner.classList.add('cmplz-dismissed');cmplz_manage_consent_button.classList.remove('cmplz-dismissed');cmplz_manage_consent_button.classList.add('cmplz-show')}} 100const event=new CustomEvent('cmplz_cookie_warning_loaded',{detail:complianz.region});document.dispatchEvent(event)};function cmplzEnsureBannerCss(){const handleId='cmplz-banner-'+complianz.user_banner_id+'-'+complianz.consenttype+'-css';const enqueued=document.getElementById(handleId);if(enqueued&&enqueued.rel==='stylesheet'){if(enqueued.sheet&&enqueued.sheet.disabled){enqueued.sheet.disabled=!1} 101return enqueued} 102const css_file_url=complianz.css_file.replace('{type}',complianz.consenttype).replace('{banner_id}',complianz.user_banner_id);if(complianz.css_file.indexOf('cookiebanner/css/defaults/banner')!==-1){cmplz_log('Fallback default css file used. Please re-save banner settings, or check file writing permissions in uploads directory')} 103const filename=css_file_url.split('?')[0].split('/').pop();let injected=null;document.querySelectorAll('link[rel="stylesheet"]').forEach(function(el){if(el.href.split('?')[0].split('/').pop()===filename){injected=el}});if(injected){if(injected.sheet&&injected.sheet.disabled){injected.sheet.disabled=!1} 104return injected} 105const link=document.createElement('link');link.href=css_file_url;link.type='text/css';link.rel='stylesheet';document.getElementsByTagName('head')[0].appendChild(link);return link} 106function cmplzSyncConsentState(){const banners=document.querySelectorAll('.cmplz-cookiebanner');if(banners.length>
1061){banners.forEach(function(banner){if(banner.closest('[data-wp-router-region]')){banner.remove()}})} 107const dismissed=cmplz_get_banner_status()==='dismissed';document.querySelectorAll('.cmplz-cookiebanner').forEach(function(banner){banner.classList.toggle('cmplz-show',!dismissed);banner.classList.toggle('cmplz-dismissed',dismissed)});const manageBtns=document.querySelectorAll('#cmplz-manage-consent');const hasOriginal=Array.prototype.some.call(manageBtns,function(btn){return!btn.closest('[data-wp-router-region]')});if(hasOriginal){manageBtns.forEach(function(btn){if(btn.closest('[data-wp-router-region]')){btn.remove()}})}} 108function cmplzInitNavigationHook(){if(!document.querySelector('[data-wp-router-region]')){return} 109const onNavigate=function(){cmplzEnsureBannerCss();cmplzSyncConsentState()};if(complianz.iapi_nav==='module'){document.addEventListener('cmplz_router_navigated',onNavigate);return} 110const onNavigateDeferred=function(){requestAnimationFrame(function(){onNavigate();setTimeout(onNavigate,150)})};['pushState','replaceState'].forEach(function(method){const original=history[method];history[method]=function(){const result=original.apply(this,arguments);onNavigateDeferred();return result}});window.addEventListener('popstate',onNavigateDeferred)} 111window.cmplz_get_banner_status=function(){return cmplz_get_cookie('banner-status')};window.cmplz_set_banner_status=function(status){let prevStatus=cmplz_get_cookie('banner-status');status=typeof status!=='undefined'?status:prevStatus;if(status!==prevStatus){cmplz_set_cookie('banner-status',status)} 112if(status.length===0){status='show'} 113if(status==='show'){prevStatus='dismissed'}else{prevStatus='show'} 114if(cmplz_banner&&status.length>0){cmplz_banner.classList.remove('cmplz-'+prevStatus);cmplz_banner.classList.add('cmplz-'+status);if(cmplz_manage_consent_button){cmplz_manage_consent_button.classList.add('cmplz-'+prevStatus);cmplz_manage_consent_button.classList.remove('cmplz-'+status)}} 115if(cmplz_banner_container&&complianz.soft_cookiewall){cmplz_banner_container.classList.remove('cmplz-'+prevStatus);cmplz_banner_container.classList.add('cmplz-'+status,'cmplz-soft-cookiewall')} 116const event=new CustomEvent('cmplz_banner_status',{detail:status});document.dispatchEvent(event);cmplz_start_clean();if(status==='show'){cmplz_trap_focus();const closeButton=cmplz_banner.querySelector('.cmplz-close');if(closeButton){closeButton.focus()}}else{cmplz_release_focus_trap()}};function cmplz_is_bot(){const botPattern='(googlebot\/|Googlebot-Mobile|Google-InspectionTool|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)';const reBot=new RegExp(botPattern,'i');const userAgent=navigator.userAgent;return reBot.test(userAgent)} 117function cmplz_is_speedbot(){const userAgent=navigator.userAgent;const speedBotPattern='(GTmetrix|pingdom|pingbot|Lighthouse)';const speedBot=new RegExp(speedBotPattern,'i');return speedBot.test(userAgent)} 118window.cmplz_has_consent=function(category){if(cmplz_is_bot()){return!0} 119if(category==='functional'){return!0} 120let has_consent,value;if(cmplz_do_not_track()){value=cmplz_get_cookie(category);has_consent=(value==='allow');return has_consent} 121value=cmplz_get_cookie(category);if((complianz.consenttype==='optout'||complianz.consenttype==='other')&&value===''){has_consent=!0}else{has_consent=(value==='allow')} 122return has_consent};window.cmplz_is_service_denied=function(service){const consented_services_json=cmplz_get_cookie('consented_services');let consented_services;try{consented_services=JSON.parse(consented_services_json)}catch(e){consented_services={}} 123if(!consented_services.hasOwnProperty(service)){return!1} 124return!consented_services[service]};window.cmplz_has_service_consent=function(service,category){const consented_services_json=cmplz_get_cookie('consented_services');let consented_services;try{consented_services=JSON.parse(consented_services_json)}catch(e){consented_services={}} 125if(!consented_services.hasOwnProperty(service)){return cmplz_has_consent(category)} 126return consented_services[service]};function cmplz_exists_service_consent(){const consented_services_json=cmplz_get_cookie('consented_services');let consented_services;try{consented_services=JSON.parse(consented_services_json);for(const key in consented_services){if(consented_services.hasOwnProperty(key)){if(consented_services[key]===!0){return!0}}}}catch(e){return!1} 127return!1} 128function cmplz_set_service_consent(service,consented){const consented_services_json=cmplz_get_cookie('consented_services');let consented_services;try{consented_services=JSON.parse(consented_services_json)}catch(e){consented_services={}} 129consented_services[service]=consented;cmplz_set_cookie('consented_services',JSON.stringify(consented_services));const details={};details.service=service;details.value=consented;
129details.region=complianz.region;cmplz_all_scripts_hook_fired=!1;const event=new CustomEvent('cmplz_status_change_service',{detail:details});document.dispatchEvent(event)} 130function cmplz_clear_all_service_consents(){cmplz_set_cookie('consented_services','')} 131function cmplz_get_all_service_consents(){const consented_services_json=cmplz_get_cookie('consented_services');let consented_services;try{consented_services=JSON.parse(consented_services_json)}catch(e){consented_services={}} 132return consented_services} 133function cmplz_get_cookie_path(){return typeof complianz.cookie_path!=='undefined'&&complianz.cookie_path!==''?complianz.cookie_path:'/'} 134function cmplz_get_cookie_domain(){if(Number(complianz.set_cookies_on_root)===1&&complianz.cookie_domain.length>3&&!complianz.cookie_domain.includes('localhost')){return complianz.cookie_domain} 135return''} 136window.cmplz_set_consent=function(category,value){cmplz_set_accepted_cookie_policy_id();value=category==='functional'?'allow':value;const previous_value=cmplz_get_cookie(category);const checked=value==='allow';document.querySelectorAll('input.cmplz-'+category).forEach((obj)=>{obj.checked=checked});if(previous_value===value){return} 137cmplz_set_cookie(category,value);if(value==='allow'){cmplz_enable_category(category)} 138cmplz_wp_set_consent(category,value);if(category==='statistics'){cmplz_wp_set_consent('statistics-anonymous','allow')} 139const details=new Object();details.category=category;details.value=value;details.region=complianz.region;details.categories=cmplz_accepted_categories();cmplz_all_scripts_hook_fired=!1;const event=new CustomEvent('cmplz_status_change',{detail:details});document.dispatchEvent(event);if(category==='marketing'&&value==='deny'&&previous_value==='allow'){cmplz_integrations_revoke();setTimeout(function(){cmplz_reload_browser_compatible()},500)}};function cmplz_reload_browser_compatible(){if(navigator.userAgent.toLowerCase().indexOf('firefox')>-1){const url=new URL(window.location.href);url.searchParams.set('cmplz-force-reload',Date.now().toString());window.location.href=url.toString()}else{window.location.reload()}} 140let cmplz_user_data=[];if(typeof(Storage)!=='undefined'&&sessionStorage.cmplz_user_data){cmplz_user_data=JSON.parse(sessionStorage.cmplz_user_data)} 141if(Number(complianz.geoip)===1&&(cmplz_user_data.length===0||(cmplz_user_data.version!==complianz.version)||(cmplz_user_data.banner_version!==complianz.banner_version))){const request=new XMLHttpRequest();let cmplzUserRegion=cmplz_get_url_parameter(window.location.href,'cmplz_user_region');cmplzUserRegion=cmplzUserRegion?'&cmplz_user_region='+cmplzUserRegion:'';request.open('GET',complianz.url+'banner?'+complianz.locale+cmplzUserRegion,!0);request.setRequestHeader('Content-type','application/json');request.send();request.onload=function(){cmplz_user_data=JSON.parse(request.response);sessionStorage.cmplz_user_data=JSON.stringify(cmplz_user_data);conditionally_show_banner()}}else{conditionally_show_banner()} 142cmplzInitNavigationHook();if(Number(complianz.store_consent)===1){const cmplz_id_cookie=cmplz_get_cookie('id');let cmplz_id_session='';let cmplz_id='';if(typeof(Storage)!=='undefined'&&sessionStorage.cmplz_id){cmplz_id_session=JSON.parse(sessionStorage.cmplz_id)} 143if(cmplz_id_cookie.length===0&&cmplz_id_session.length>0){cmplz_id=cmplz_id_session;cmplz_set_cookie('id',cmplz_id)} 144if(cmplz_id_cookie.length>0&&cmplz_id_session.length===0){cmplz_id=cmplz_id_cookie} 145if(typeof(Storage)!=='undefined'){sessionStorage.cmplz_id=JSON.stringify(cmplz_id)}} 146document.addEventListener('visibilitychange',function(){if(document.visibilityState==='hidden'){cmplz_track_status_end()}});window.addEventListener('pagehide',cmplz_track_status_end,!1);window.addEventListener('beforeunload',cmplz_track_status_end,!1);function cmplz_track_status_end(){if(!cmplz_consent_stored_once){cmplz_track_status()}} 147document.addEventListener('cmplz_consent_action',function(e){cmplz_set_consent(e.detail.category,'allow');cmplz_fire_categories_event();cmplz_track_status()});cmplz_add_event('click','.cmplz-accept',function(e){e.preventDefault();setTimeout(()=>{cmplz_accept_all();cmplz_set_banner_status('dismissed');cmplz_fire_categories_event();cmplz_track_status()},0)});cmplz_add_event('click','.cmplz-accept-category, .cmplz-accept-marketing',function(e){e.preventDefault();const obj=e.target;const service=obj.getAttribute('data-service');let category=obj.getAttribute('data-category');category=category?category:'marketing';if(Number(complianz.clean_cookies)===1&&typeof service!=='undefined'&&service){cmplz_set_service_consent(service,!0);cmplz_enable_category('','general');cmplz_enable_category('',service)}else{cmplz_set_consent(category,'allow')} 148cmplz_set_banner_status('dismissed');cmplz_fire_categories_event();cmplz_track_status()});cmplz_add_event('click','.cmplz-accept-service',function(e){const obj=e.target;const tagName=obj.tagName;if(tagName==='INPUT'){return} 149const service=obj.getAttribute('data-service');if(typeof service!=='undefined'){cmplz_set_service_consent(service,!0);cmplz_enable_category('','general');cmplz_enable_category('',service)} 150cmplz_fire_categories_event();cmplz_track_status()});cmplz_add_event('change','.cmplz-accept-service',function(e){const obj=e.target;const tagName=obj.tagName;const service=obj.getAttribute('data-service');if(typeof service!=='undefined'){if(tagName==='INPUT'){cmplz_set_banner_status('dismissed');if(obj.checked){cmplz_set_service_consent(service,!0);cmplz_enable_category('',service)}else{cmplz_set_service_consent(service,!1);setTimeout(function(){cmplz_reload_browser_compatible()},500)}}else{e.preventDefault();cmplz_set_service_consent(service,!0);cmplz_enable_category('','general');cmplz_enable_category('',service);setTimeout(function(){cmplz_reload_browser_compatible()},500)}} 151cmplz_fire_categories_event();cmplz_track_status()});cmplz_add_event('click','.cmplz-save-preferences',function(e){const obj=e.target;cmplz_banner=obj.closest('.cmplz-cookiebanner');const consented_categories=[];for(const key in cmplz_categories){if(cmplz_categories.hasOwnProperty(key)){const category=cmplz_categories[key];const categoryElement=cmplz_banner.querySelector('input.cmplz-'+category);if(categoryElement&&categoryElement.checked){consented_categories.push(category)}}} 152cmplz_fire_before_categories_consent(consented_categories);for(const key in cmplz_categories){if(cmplz_categories.hasOwnProperty(key)){const category=cmplz_categories[key];if(consented_categories.includes(category)){cmplz_set_consent(category,'allow')}else{cmplz_set_consent(category,'deny')}}} 153cmplz_set_banner_status('dismissed');cmplz_fire_categories_event();cmplz_track_status()});cmplz_add_event('click','.cmplz-close',function(){cmplz_set_banner_status('dismissed')});cmplz_add_event('click','.cmplz-view-preferences',function(e){const obj=e.target;cmplz_banner=obj.closest('.cmplz-cookiebanner');if(cmplz_banner.querySelector('.cmplz-categories').classList.contains('cmplz-fade-in')){cmplz_banner.classList.remove('cmplz-categories-v
153isible');cmplz_banner.querySelector('.cmplz-categories').classList.remove('cmplz-fade-in');cmplz_banner.querySelector('.cmplz-view-preferences').style.display='block';cmplz_banner.querySelector('.cmplz-save-preferences').style.display='none'}else{cmplz_banner.classList.add('cmplz-categories-visible');cmplz_banner.querySelector('.cmplz-categories').classList.add('cmplz-fade-in');cmplz_banner.querySelector('.cmplz-view-preferences').style.display='none';cmplz_banner.querySelector('.cmplz-save-preferences').style.display='block';const firstCategory=cmplz_banner.querySelector('.cmplz-categories .cmplz-category');if(firstCategory){const toggleBtn=firstCategory.querySelector('.cmplz-category-toggle');if(toggleBtn){toggleBtn.focus()}}}});cmplz_add_event('click','.cmplz-category-toggle',function(e){const btn=e.target.closest('.cmplz-category-toggle');if(!btn){return} 154const isExpanded=btn.getAttribute('aria-expanded')==='true';btn.setAttribute('aria-expanded',String(!isExpanded));const category=btn.closest('.cmplz-category');if(category){const desc=category.querySelector('.cmplz-description');if(desc){desc.hidden=isExpanded}}});cmplz_add_event('change','.cmplz-manage-consent-container .cmplz-category',function(){for(const key in cmplz_categories){if(cmplz_categories.hasOwnProperty(key)){const category=cmplz_categories[key];const categoryElement=document.querySelector('.cmplz-manage-consent-container input.cmplz-'+category);if(categoryElement){if(categoryElement.checked){cmplz_set_consent(category,'allow')}else{cmplz_set_consent(category,'deny')} 155cmplz_set_banner_status('dismissed');cmplz_fire_categories_event();cmplz_track_status()}}}});cmplz_add_event('click','.cmplz-deny',function(e){e.preventDefault();cmplz_set_banner_status('dismissed');cmplz_deny_all()});cmplz_add_event('click','button.cmplz-manage-settings',function(e){e.preventDefault();const catsContainer=document.querySelector('.cmplz-cookiebanner .cmplz-categories');const saveSettings=document.querySelector('.cmplz-save-settings');const manageSettings=document.querySelector('button.cmplz-manage-settings');if(!cmplz_is_hidden(catsContainer)){saveSettings.style.display='none';manageSettings.style.display='block';catsContainer.style.display='none'}else{saveSettings.style.display='block';manageSettings.style.display='none';catsContainer.style.display='block'}});cmplz_add_event('click','button.cmplz-manage-consent',function(e){e.preventDefault();cmplz_banner_trigger_source='manage-consent';cmplz_set_banner_status('show')});function cmplz_set_up_auto_dismiss(){if(cmplz_get_banner_status()==='dismissed'){return} 156if(complianz.consenttype==='optout'&&Number(complianz.dismiss_on_scroll)===1){const onWindowScroll=function(){if(window.pageYOffset>Math.floor(400)){window.removeEventListener('scroll',onWindowScroll);this.onWindowScroll=null;if(cmplz_get_banner_status()==='dismissed'){return} 157cmplz_set_banner_status('dismissed');cmplz_fire_categories_event();cmplz_track_status()}};window.addEventListener('scroll',onWindowScroll)} 158const delay=parseInt(complianz.dismiss_timeout);if(complianz.consenttype==='optout'&&delay>0){window.setTimeout(function(){if(cmplz_get_banner_status()==='dismissed'){return} 159cmplz_set_banner_status('dismissed');cmplz_fire_categories_event();cmplz_track_status()},Math.floor(delay))}} 160function cmplz_fire_categories_event(){const details=new Object();details.category=cmplz_highest_accepted_category();details.categories=cmplz_accepted_categories();details.region=complianz.region;const event=new CustomEvent('cmplz_fire_categories',{detail:details});document.dispatchEvent(event)} 161function cmplz_track_status(status){let cats=[];status=typeof status!=='undefined'?status:!1;const event=new CustomEvent('cmplz_track_status',{detail:status});document.dispatchEvent(event);if(!status){cats=cmplz_accepted_categories()}else{cats=[status]} 162cmplz_set_category_as_body_class();let saved_cats,saved_services;try{saved_cats=JSON.parse(cmplz_get_cookie('saved_categories'))}catch(e){saved_cats={}} 163try{saved_services=JSON.parse(cmplz_get_cookie('saved_services'))}catch(e){saved_services={}} 164const consented_services=cmplz_get_all_service_consents();if(cmplz_equals(saved_cats,cats)&&cmplz_equals(saved_services,consented_services)){return} 165if(Number(complianz.store_consent)!==1||cmplz_is_bot()||cmplz_is_speedbot()){return} 166cmplz_set_cookie('saved_categories',JSON.stringify(cats));cmplz_set_cookie('saved_services',JSON.stringify(consented_services));cmplz_consent_stored_once=!0;const data={consented_categories:cats,consented_services,consenttype:window.wp_consent_type,};const request=new XMLHttpRequest();request.open('POST',complianz.url+'track',!0);request.setRequestHeader('Content-type','application/json');request.send(JSON.stringify(data))} 167function cmplz_accepted_categories(){let consentedCategories=cmplz_categories;const consentedTemp=[];for(const key in consentedCategories){if(consentedCategories.hasOwnProperty(key)){const category=consentedCategories[key];if(cmplz_has_consent(category)){consentedTemp.push(category)}}} 168consentedCategories=consentedCategories.filter(function(value){return cmplz_in_array(value,consentedTemp)});return consentedCategories} 169function cmplz_sync_category_checkboxes(){for(const key in cmplz_categories){if(cmplz_categories.hasOwnProperty(key)){const category=cmplz_categories[key];if(cmplz_has_consent(category)||category==='functional'){document.querySelectorAll('input.cmplz-'+category).forEac
169h((obj)=>{obj.checked=!0})}else{document.querySelectorAll('input.cmplz-'+category).forEach((obj)=>{obj.checked=!1})}} 170document.querySelectorAll('.cmplz-accept-service').forEach((obj)=>{const service=obj.getAttribute('data-service');const category=obj.getAttribute('data-category');if(cmplz_has_service_consent(service,category)){obj.checked=!0}else if(cmplz_is_service_denied(service)){obj.checked=!1}else{obj.checked=!!cmplz_has_consent(category)}})}} 171function cmplz_merge_object(userdata,ajax_data){const output={};for(const key in ajax_data){if(ajax_data.hasOwnProperty(key)){output[key]=ajax_data[key]}} 172for(const key in userdata){if(!ajax_data.hasOwnProperty(key)||typeof ajax_data[key]==='undefined'){if(userdata.hasOwnProperty(key)){output[key]=userdata[key]}}} 173return output} 174function cmplz_clear_cookies(cookie_part){if(typeof document==='undefined'){return!1} 175let foundCookie=!1;const secure=window.location.protocol==='https:'?';secure':'';const expires='expires='+new Date().toGMTString();const pathParts=location.pathname.replace(/^\/|\/$/g,'').split('/');document.cookie.split('; ').forEach(function(cookie){const cookieName=cookie.split(';')[0].split('=')[0];if(cookieName.indexOf(cookie_part)!==-1){foundCookie=!0;const domainParts=window.location.hostname.split('.');const skipLast=domainParts.length>1;pathParts.forEach(function(pathPart){const path='/'+pathPart;document.cookie=encodeURIComponent(cookieName)+'=;SameSite=Lax'+secure+';'+expires+';domain=.'+domainParts.join('.')+';path='+path;document.cookie=encodeURIComponent(cookieName)+'=;SameSite=Lax'+secure+';'+expires+';domain=.'+domainParts.join('.')+';path='+path+'/'});while(domainParts.length>0){const domain='.'+domainParts.join('.');domainParts.shift();if(skipLast&&domainParts.length===1){domainParts.shift()} 176pathParts.forEach(function(pathPart){const path='/'+pathPart;document.cookie=encodeURIComponent(cookieName)+'=;SameSite=Lax'+secure+';'+expires+';domain='+domain+';path='+path;document.cookie=encodeURIComponent(cookieName)+'=;SameSite=Lax'+secure+';'+expires+';domain='+domain+';path='+path+'/'})}}});cmplz_set_accepted_cookie_policy_id();return foundCookie} 177function cmplz_set_accepted_cookie_policy_id(){cmplz_set_cookie('policy_id',complianz.current_policy_id)} 178function cmplz_integrations_init(){const cookiesToSet=complianz.set_cookies;for(const key in cookiesToSet){if(cookiesToSet.hasOwnProperty(key)&&cookiesToSet[key][1]==='1'){cmplz_set_cookie(key,cookiesToSet[key][1],!1)}}} 179function cmplz_integrations_revoke(){const cookiesToSet=complianz.set_cookies;for(const key in cookiesToSet){if(cookiesToSet.hasOwnProperty(key)){const revokeValue=cookiesToSet[key][1];cmplz_set_cookie(key,revokeValue,!1);if(Number(revokeValue)===0){cmplz_clear_cookies(key)}}}} 180function cmplz_set_integrations_cookies(){const cookiesToSet=complianz.set_cookies;for(const key in cookiesToSet){if(cookiesToSet.hasOwnProperty(key)){cmplz_set_cookie(key,cookiesToSet[key][0],!1)}}} 181function cmplz_get_url_parameter(sPageURL,sParam){if(!sPageURL||typeof sPageURL==='undefined'||sPageURL.indexOf('?')===-1){return!1} 182const queryString=sPageURL.split('?')[1];if(!queryString){return!1} 183const sURLVariables=queryString.split('&');for(let i=0;i<sURLVariables.length;i++){const sParameterName=sURLVariables[i].split('=');if(sParameterName[0]===sParam){return sParameterName[1]===undefined?!0:decodeURIComponent(sParameterName[1])}} 184return!1} 185function cmplz_maybe_auto_redirect(){const redirect=cmplz_get_url_parameter(window.location.href,'cmplz_region_redirect');const region=cmplz_get_url_parameter(window.location.href,'cmplz-region');if(redirect&&!region){const newUrl=window.location.href.split('#')[0]+'&cmplz-region='+complianz.region;const hash=window.location.hash;window.location.href=newUrl+hash}} 186function cmplz_wp_set_consent(type,value){if(typeof wp_set_consent==='function'){wp_set_consent(type,value)}} 187function cmplz_start_clean(){if(Number(complianz.clean_cookies)===1){if(typeof(Storage)!=='undefined'){cmplz_cookie_data=JSON.parse(sessionStorage.getItem('cmplz_cookie_data'))} 188if(!cmplz_cookie_data||cmplz_cookie_data.length===0){const request=new XMLHttpRequest();request.open('GET',complianz.url+'cookie_data',!0);request.setRequestHeader('Content-type','application/json');request.send();request.onload=function(){cmplz_cookie_data=JSON.parse(request.response);sessionStorage.setItem('cmplz_cookie_data',JSON.stringify(cmplz_cookie_data));cmplz_setup_clean_interval()}}else{cmplz_setup_clean_interval()}}} 189function cmplz_do_cleanup(){const consent_categories=['preferences','statistics','marketing'];for(const category of consent_categories){if(!cmplz_has_consent(category)&&cmplz_cookie_data.hasOwnProperty(category)){const services=cmplz_cookie_data[category];for(const service in services){if(!cmplz_has_service_consent(service,category)){const cookies=services[service];for(const item of cookies){cmplz_clear_cookies(item);cmplz_clear_storage(item)}}}}}} 190function cmplz_setup_clean_interval(){if(!cmplz_cookie_data){return} 191if(cmplzCleanCookieInterval){return} 192cmplz_do_cleanup();cmplzCleanCookieInterval=setInterval(cmplz_do_cleanup,1000)} 193function cmplz_clear_storage(item){if(typeof(Storage)!=='undefined'){if(localStorage.getItem(item)){localStorage.removeItem(item)} 194if(sessionStorage.getItem(item)){sessionStorage.removeItem(item)}}} 195function cmplz_load_manage_consent_container(){const manage_consent_container=document.querySelector('.cmplz-manage-consent-container');const is_block_editor=!1;if(manage_consent_container&&!is_block_editor){const request=new XMLHttpRequest();request.open('GET',complianz.url+'manage_consent_html?'+complianz.locale,!0);request.setRequestHeader('Content-type','application/json');request.send();request.onload=function(){const html=JSON.parse(request.response);manage_consent_container.insertAdjacentHTML('beforeend',html);cmplz_sync_category_checkboxes();const nojavascript=document.querySelector('#cmplz-manage-consent-container-nojavascript');nojavascript.style.display='none';manage_consent_container.style.display='block';const event=new CustomEvent('cmplz_manage_consent_container_loaded');document.dispatchEvent(event)}}} 196cmplz_add_event('keypress','.cmplz-banner-slider label',function(e){const keycode=(e.keyCode?e.keyCode:e.which);if(keycode===32){e.target.click()}});cmplz_add_event('keypress','.cmplz-cookiebanner .cmplz-header .cmplz-close',function(e){const keycode=(e.keyCode?e.keyCode:e.which);if(keycode===13){e.target.click()}});function cmplz_equals(array_1,array_2){if(typeof array_1==='object'&&array_1!==null&&!Array.isArray(array_1)&&typeof array_2==='object'&&array_2!==null&&!Array.isArray(array_2)){const allKeys=[...new Set([...Object.keys(array_1),...Object.keys(array_2)])];for(const key of allKeys){if(array_1[key]!==array_2[key]){return!1}} 197return!0} 198if(!Array.isArray(array_1)){array_1=Object.keys(array_1);array_2=Object.keys(array_2)} 199if(!array_1||!array_2){return!1} 200if(array_1.length!==array_2.length){return!1} 201for(let i=0,l=array_1.length;i<l;i++){if(array_1[i]instanceof Array&&array_2[i]instanceof Array){if(!cmplz_equals(array_1[i],array_2[i])){return!1}}else if(array_1[i]!==array_2[i]){return!1}} 202return!0} 203function cmplzCopyAttributes(source,target){const excludes=['type','data-service','data-category','async'];
203Array.from(source.attributes).forEach((attribute)=>{if(attribute.nodeName==='data-script-type'&&attribute.nodeValue==='module'){target.setAttribute('type','module');target.removeAttribute('data-script-type')}else if(!excludes.includes(attribute.nodeName)){target.setAttribute(attribute.nodeName,attribute.nodeValue)}})} 204const cmplz_has_wp_video=document.querySelector('.cmplz-wp-video-shortcode');let cmplz_times_checked=0;if('undefined'!==typeof window.jQuery){jQuery(document).ready(function($){if(cmplz_has_wp_video){document.addEventListener('cmplz_enable_category',function(){cmplz_activate_wp_video()});const cmplzInterval=setInterval(function(){cmplz_times_checked+=1;if(document.querySelector('.cmplz-wp-video-shortcode')&&cmplz_times_checked<100){cmplz_activate_wp_video()}else{clearInterval(cmplzInterval)}},500)} 205function cmplz_activate_wp_video(){if(!document.querySelector('.cmplz-wp-video-shortcode')){return} 206const categories=cmplz_accepted_categories();const services=cmplz_get_all_service_consents();let selectorVideo='';const selectorVideos=[];for(const c_key in categories){if(categories.hasOwnProperty(c_key)){const category=categories[c_key];if(category==='functional'){break} 207selectorVideos.push('.cmplz-wp-video-shortcode[data-category="'+category+'"]')}} 208for(const s_key in services){if(services.hasOwnProperty(s_key)){selectorVideos.push('.cmplz-wp-video-shortcode[data-service="'+s_key+'"]')}} 209selectorVideo=selectorVideos.join(',');let should_initialize_video=!1;if(selectorVideo.length>0){document.querySelectorAll(selectorVideo).forEach((obj)=>{should_initialize_video=!0;obj.setAttribute('controls','controls');obj.classList.add('wp-video-shortcode','cmplz-processed');obj.classList.remove('cmplz-wp-video-shortcode');obj.closest('.cmplz-wp-video').classList.remove('cmplz-wp-video');const blocked_notice=obj.closest('.wp-video').querySelector('.cmplz-blocked-content-notice');
209if(blocked_notice){blocked_notice.parentElement.removeChild(blocked_notice)} 210obj.classList.remove('cmplz-blocked-content-container')})} 211if(should_initialize_video){if(window.wp.mediaelement){window.wp.mediaelement.initialize()}else{const settings={};settings.videoWidth='100%';settings.videoHeight='100%';settings.enableAutosize=!0;$('.wp-video-shortcode').mediaelementplayer(settings)}}} 212document.querySelectorAll('.cmplz-video.cmplz-activated').forEach((obj)=>{cmplz_activate_fitvids(obj)});document.addEventListener('cmplz_enable_category',function(){document.querySelectorAll('.cmplz-video.cmplz-activated').forEach((obj)=>{cmplz_activate_fitvids(obj)})});function cmplz_activate_fitvids(obj){const $obj=$(obj);if(typeof $obj.parent().fitVids==='function'){$obj.parent().fitVids()}}})} 213;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.