// source --> https://ecografoportatil.es/wp-content/plugins/cookie-law-info/lite/frontend/js/script.min.js?ver=3.5.1 
(()=>{var O=(e,t,n)=>new Promise((o,c)=>{var s=u=>{try{l(n.next(u))}catch(d){c(d)}},i=u=>{try{l(n.throw(u))}catch(d){c(d)}},l=u=>u.done?o(u.value):Promise.resolve(u.value).then(s,i);l((n=n.apply(e,t)).next())});const r=window._ckyConfig,W=window._ckyStyles;r._backupNodes=[];r._resetConsentID=!1;r._bannerState=!1;r._preferenceOriginTag=!1;r._optoutSuccessCountdownInterval=null;r._optoutSuccessAutoCloseTimer=null;r._optoutSuccessSubtextTemplate="";const ue=15e3,V=15;window.cookieyes=window.cookieyes||{};const a=window.cookieyes;a._ckyConsentStore=new Map;a._ckyGetCookieMap=function(){const e={};try{document.cookie.split(";").map(t=>{const[n,o]=t.split("=");if(n)return e[n.trim()]=o,o})}catch(t){}return e};const de=a._ckyGetCookieMap();a._ckyGetFromStore=function(e){return a._ckyConsentStore.get(e)||""};a._ckySetInStore=function(e,t){a._ckyConsentStore.set(e,t);let n=[];for(const[c,s]of a._ckyConsentStore)n.push(`${c}:${s}`);const o=r&&r._expiry?r._expiry:365;a._ckySetCookie("cookieyes-consent",n.join(","),o)};const ye=(de["cookieyes-consent"]||"").split(",").reduce((e,t)=>{if(!t)return e;const[n,o]=t.split(":");return e[n]=o,e},{});["consentid","consent","action"].concat(r._categories.map(({slug:e})=>e)).map(e=>a._ckyConsentStore.set(e,ye[e]||""));a._ckyGetCookie=function(e){const t=new RegExp(`${e}=([^;]+)`).exec(document.cookie);return t&&Array.isArray(t)&&t[1]?unescape(t[1]):null};a._ckySetCookie=function(e,t,n=0,o=r._rootDomain){const c=new Date;o&&(o=`domain=${o}`);const s=n===0?0:c.setTime(c.getTime()+n*24*60*60*1e3);document.cookie=`${e}=${t}; expires=${new Date(s).toUTCString()}; path=/;${o}; SameSite=Strict;`};function fe(){if(a._ckyGetFromStore("consentid"))return;const t=a._ckyRandomString(32);a._ckySetInStore("consentid",t),r._resetConsentID=!0}const E=function(){p()==="classic"&&$(),P(),Ae()};function f(e){const t=document.querySelector("[data-cky-tag="+e+"]");return t||!1}function ke(e){return e.replace(/[.*+?^${}()[\]\\]/g,"\\$&")}function y(e,t){const n=q(e);n&&n.addEventListener("click",t)}function Y(){return N("add",...arguments)}function x(){return N("remove",...arguments)}function Q(){return N("toggle",...arguments)}function N(e,t,n,o=!0){const c=q(t,o);return c&&c.classList[e](n)}function q(e,t){let n=e;switch(!0){case e.startsWith("="):n=`[data-cky-tag="${e.substring(1)}"]`;break;default:break}const o=document.querySelector(n);return!o||t&&!o.parentElement?null:t?o.parentElement:o}function z(e){const t=new CustomEvent("cookieyes_consent_update",{detail:e});document.dispatchEvent(t)}function pe(){const e=document.getElementById("cky-style-inline");e&&e.remove()}a._ckyRandomString=function(e,t=!0){const n=`${t?"0123456789":""}ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnopqrstuvwxyz`,o=[];for(let c=0;c<e;c++)o.push(n[Math.floor(Math.random()*n.length)]);return t?btoa(o.join("")).replace(/\=+$/,""):o.join("")};function I(){H(),r._bannerConfig.config.revisitConsent.status===!0&&R()}function ge(){Xe(),je(),He(),Re(),!a._ckyGetFromStore("action")||me()?($(),_e(),fe()):I()}function me(){let e=new URL(document.location).searchParams;return e.get("cky_preview")&&e.get("cky_preview")==="true"}function m(e,t=null){const n=q(e);if(!n)return;if(n.classList.contains("cky-accordion-btn")){const s=n.closest(".cky-accordion");if(s){const i=s.querySelector(".cky-accordion-body");if(i){let l=i.id;l||(l=`ckyDetailCategory${s.id.replace("ckyDetailCategory","")}Body`,i.id=l),n.setAttribute("aria-controls",l)}}}const o=n.getAttribute("aria-expanded"),c=t||(o==="true"?"false":"true");n.setAttribute("aria-expanded",c)}function _e(){const e=k();a._ckySetInStore("consent","no");const t=T(),n={accepted:[],rejected:[]};let o="yes";for(const c of r._categories)(e==="gdpr"&&!c.isNecessary&&!c.defaultConsent[e]||e==="ccpa"&&t&&!c.defaultConsent.ccpa)&&(o="no"),o==="no"?n.rejected.push(c.slug):n.accepted.push(c.slug),a._ckySetInStore(`${c.slug}`,o);re(),z(n)}function Ce(){const e=f("notice");if(!e)return!1;const t=e.closest(".cky-consent-container");if(!t)return!1;t.setAttribute("aria-label","We value your privacy"),t.setAttribute("role","region");const n=r._bannerConfig.settings.type;let o=r._bannerConfig.settings.position,c=n;c==="popup"&&(o="center"),c=S()==="pushdown"?"classic":c;const s=`cky-${c}-${o}`;t.classList.add(s);const i=f("revisit-consent");if(!i)return!1;const l="cky-revisit-"+r._bannerConfig.config.revisitConsent.position;i.classList.add(l)}function be(){const e=k()==="ccpa"?f("optout-popup"):f("detail");if(!e)return!1;const t=e.closest(".cky-modal");if(!t)return!1;if(S()!=="pushdown"&&S()!=="popup"){const c=`cky-${r._bannerConfig.settings.preferenceCenterType}`;t.classList.add(c)}const n=t.querySelector(".cky-preference-center");if(n){const o=k()==="ccpa"?"ckyOptoutPreferenceCenter":"ckyPreferenceCenter";n.setAttribute("id",o),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true");const c=k()==="ccpa"?"Opt-out Preferences":"Customise Consent Preferences";n.setAttribute("aria-label",c)}}function he(){return O(this,null,function*(){try{ge(),rt(),ct()}catch(e){console.error(e)}})}function Se(e){if(typeof document!="undefined"){if(document.readyState==="complete"||document.readyState==="interactive")return void e();document.addEventListener("DOMContentLoaded",e)}}Se(function(){return O(this,null,function*(){try{yield he()}catch(e){console.error(e)}})});function ve(){for(const{slug:e}of r._categories)y("detail-category-title",()=>document.getElementById(`ckyCategory${e}`).classList.toggle("cky-tab-active"));y("=settings-button",()=>P("settings-button")),y("=detail-close",()=>v()),y("=optout-cancel-button",()=>v()),y("=close-button",()=>Fe()),y("=donotsell-button",()=>P("donotsell-button")),y("=reject-button",b("reject")),y("=accept-button",b("all")),y("=detail-accept-button",b("all")),y("=detail-save-button",b()),y("=detail-category-preview-save-button",b()),y("=optout-confirm-button",qe()),y("=detail-reject-button",b("reject")),y("=revisit-consent",()=>E()),y("=optout-close",()=>Ge())}function we(){if(!r._bannerConfig.config.auditTable.status)return;const e=r._categories.map(({slug:t})=>t);e.map(t=>{const n=`#ckyDetailCategory${t}`,o=`${n}  .cky-accordion-btn`,c=document.querySelector(o);if(c){const s=c.closest(".cky-accordion");if(s){const i=s.querySelector(".cky-accordion-body");if(i){let l=i.id;l||(l=`ckyDetailCategory${s.id.replace("ckyDetailCategory","")}Body`,i.id=l),c.setAttribute("aria-controls",l)}}}return m(o,"false"),y(n,({target:{id:s}})=>{if(s===`ckySwitch${t}`||!Q(n,"cky-accordion-active",!1)){m(o,"false");return}m(o,"true"),e.filter(i=>i!==t).map(i=>(x(`#ckyDetailCategory${i}`,"cky-accordion-active",!1),m(`#ckyDetailCategory${i} .cky-accordion-btn`,"false"),i))}),t})}function Ae(e=!1){const t=Z();t&&(e===!0?_ckyRevisitHide():t.classList.toggle("cky-revisit-hide"))}function k(){return r._bannerConfig.settings.applicableLaw}function p(){return r._bannerConfig.settings.type}function S(){return p()==="classic"?"pushdown":r._bannerConfig.settings.preferenceCenterType}function G(){const e=f("notice"),t=e&&e.closest(".cky-consent-container")||!1;return t&&t||!1}function H(){const e=G();e&&e.classList.add("cky-hide")}function $(){const e=G();e&&e.classList.remove("cky-hide")}function J(){const e=document.querySelector(".cky-overlay");e&&e.classList.add("cky-hide")}function X(){const e=document.querySelector(".cky-overlay");e&&e.classList.remove("cky-hide")}function Le(){const e=document.querySelector(".cky-overlay");e&&e.classList.toggle("cky-hide")}function F(){if(p()==="classic")return G();let e=k()==="ccpa"?f("optout-popup"):f("detail");return e&&e.closest(".cky-modal")||!1}function v(){Ne();const e=F();e&&e.classList.remove(h()),p()!=="classic"?(J(),a._ckyGetFromStore("action")||$()):(m("=settings-button","false"),x("=notice","cky-consent-bar-expand")),a._ckyGetFromStore("action")&&R();const t=r._preferenceOriginTag;t&&ae(t)}function Te(){const e=F();if(e&&e.classList.add(h()),e){const t=e.querySelector(".cky-preference-center");if(t){const n=k()==="ccpa"?"ckyOptoutPreferenceCenter":"ckyPreferenceCenter";t.setAttribute("id",n),t.setAttribute("role","dialog"),t.setAttribute("aria-modal","true");const o=k()==="ccpa"?"Opt-out Preferences":"Customise Consent Preferences";t.setAttribute("aria-label",o)}}p()!=="classic"?(X(),H()):(m("=settings-button"),Y("=notice","cky-consent-bar-expand"))}function Ee(){const e=F();if(!e)return;e.classList.toggle(h()),S()!=="pushdown"&&Le();const t=e.classList.contains(h());if(e.classList.toggle(h()),p()==="classic"){const o=e.querySelector(".cky-preference-center");if(o){const c=k()==="ccpa"?"ckyOptoutPreferenceCenter":"ckyPreferenceCenter";o.setAttribute("id",c),o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true");const s=k()==="ccpa"?"Opt-out Preferences":"Customise Consent Preferences";o.setAttribute("aria-label",s)}m("=settings-button"),Q("=notice","cky-consent-bar-expand")}else t?(J(),a._ckyGetFromStore("action")||$()):(X(),H());a._ckyGetFromStore("action")&&R();const n=r._preferenceOriginTag;n&&ae(n)}function h(){return S()==="pushdown"?"cky-consent-bar-expand":"cky-modal-open"}function Z(){const e=f("revisit-consent");return e&&e||!1}function R(){const e=Z();e&&e.classList.remove("cky-revisit-hide")}function P(e=!1){r._preferenceOriginTag=e,p()==="classic"?(Ee(),m("=settings-button")):Te()}function K(e){const t=document.querySelector(`[data-cky-tag="${e}"]`);if(!t)return[];const n=Array.from(t.querySelectorAll('a:not([disabled]), button:not([disabled]), [tabindex]:not([disabled]):not([tabindex="-1"])')).filter(o=>o.style.display!=="none");return n.length<=0?[]:[n[0],n[n.length-1]]}function xe(){const e=k(),t=p();if(t==="classic")return;if(t==="popup"){const[c,s]=K("notice");w(c,s,!0),w(s,c)}const[n,o]=K(e==="ccpa"?"optout-popup":"detail");w(n,o,!0),w(o,n)}function w(e,t,n=!1){!e||!t||e.addEventListener("keydown",o=>{o.which!==9||n&&!o.shiftKey||!n&&o.shiftKey||(o.preventDefault(),t.focus())})}function Ie(e){const t=e.querySelector('[data-cky-tag="detail"] .cky-footer-shadow'),n=e.querySelector('[data-cky-tag="detail"]');if(!t)return;const o=n&&n.style.backgroundColor||"#ffffff";t.style.background=`linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, ${o} 100%)`}function ee({cookies:e}){const t=a._ckyGetCookieMap();for(const{cookieID:n,domain:o}of e)t[n]&&[o,""].map(c=>a._ckySetCookie(n,"",0,c))}function te(e=!1){for(const t of r._categories){const n=a._ckyGetFromStore(t.slug),o=n==="yes"||!n&&t.defaultConsent[k()]||t.isNecessary,c=t.isNecessary,i=r._shortCodes.find(l=>l.key==="cky_category_toggle_label").content.replace("[cky_preference_{{category_slug}}_title]",t.name);$e(t,o,c,i,e),Me(t)}}function $e(e,t,n,o,c=!1){const s=r._bannerConfig.config.preferenceCenter.toggle,i=s.states.active.styles["background-color"],l=s.states.inactive.styles["background-color"];["ckyCategoryDirect","ckySwitch"].map(u=>{const d=document.getElementById(`${u}${e.slug}`);if(d&&(Be(d,e,c),d.checked=t,d.disabled=n,d.style.backgroundColor=t?i:l,A(d,t,o),!c))return d.addEventListener("change",({currentTarget:g})=>{const _=g.checked;g.style.backgroundColor=_?i:l,A(d,_,o)}),d})}function Be(e,t={},n=!1){if(!n&&(e.parentElement.getAttribute("data-cky-tag")==="detail-category-toggle"?Oe(e,t):e.parentElement.getAttribute("data-cky-tag")==="detail-category-preview-toggle"&&Pe(e,t),!t.isNecessary)){const o=t.name,c=document.querySelector(`[data-cky-tag="detail-category-title"][aria-label="${o}"]`);if(c){const i=c.closest(".cky-accordion-item").querySelector(".cky-always-active");i&&i.remove()}}}function Oe(e,t){let n=e.closest(".cky-accordion-item");if(!n)return;const o=n.querySelector(".cky-switch");t.isNecessary?o&&o.remove():(p()==="classic"&&r._bannerConfig.config.categoryPreview.status||t.cookies&&t.cookies.length===0)&&o&&o.remove()}function Me(e){if(r._bannerConfig.config.auditTable.status===!1){const t=document.querySelector(`#ckyDetailCategory${e.slug} [data-cky-tag="audit-table"]`);t&&t.remove();const n=document.querySelector(`#ckyDetailCategory${e.slug} .cky-accordion-chevron`);n&&n.classList.add("cky-accordion-chevron-hide")}}function Pe(e,t){t.cookies&&t.cookies.length===0&&!t.isNecessary&&e.parentElement.parentElement.remove()}function A(e,t,n,o=!1){if(!e)return;const c=t?"disable":"enable",s=`cky_${c}_${o?"optout":"category"}_label`,i=r._shortCodes.find(u=>u.key===s);if(!i)return;const l=n.replace(/{{status}}/g,c).replace(`[${s}]`,i.content);e.setAttribute("aria-label",l)}function ne(){r._optoutSuccessCountdownInterval&&(clearInterval(r._optoutSuccessCountdownInterval),r._optoutSuccessCountdownInterval=null),r._optoutSuccessAutoCloseTimer&&(clearTimeout(r._optoutSuccessAutoCloseTimer),r._optoutSuccessAutoCloseTimer=null)}function oe(){const e=f("optout-success");return!!(e&&!e.classList.contains("cky-hide"))}function L(){I(),v(),ie()}function De(){ne();const e=f("optout-buttons"),t=f("optout-success"),n=f("optout-success-subtext"),o=document.getElementById("ckyCCPAOptOut");if(!e||!t){L();return}e.style.display="none",t.classList.remove("cky-hide"),t.setAttribute("aria-live","polite"),t.focus(),o&&(o.disabled=!0),Y("=optout-option","cky-disabled",!1);const c=n&&n.querySelector("#ckyCountdownTimer")||document.getElementById("ckyCountdownTimer");let s=V;n&&!c&&!r._optoutSuccessSubtextTemplate&&(r._optoutSuccessSubtextTemplate=n.textContent||`Banner closes automatically in ${V} s...`);const i=r._optoutSuccessSubtextTemplate,l=i&&/\d+/.test(i),u=()=>{if(n){if(c){c.textContent=String(s);return}n.textContent=l?i.replace(/\d+/,String(s)):`Banner closes automatically in ${s} s...`}};u(),r._optoutSuccessCountdownInterval=setInterval(()=>{s-=1,s>=0&&u()},1e3),r._optoutSuccessAutoCloseTimer=setTimeout(L,ue)}function Ne(){ne();const e=f("optout-buttons"),t=f("optout-success"),n=f("optout-success-subtext"),o=document.getElementById("ckyCCPAOptOut");e&&(e.style.display=""),t&&t.classList.add("cky-hide"),o&&(o.disabled=!1),x("=optout-option","cky-disabled",!1);const c=n&&n.querySelector("#ckyCountdownTimer")||document.getElementById("ckyCountdownTimer");c?c.textContent="":n&&r._optoutSuccessSubtextTemplate&&(n.textContent=r._optoutSuccessSubtextTemplate)}function qe(){return()=>{if(k()!=="ccpa"||!T()){b()();return}ce(),De()}}function Ge(){if(oe()){a._ckySetInStore("action","yes"),L();return}v()}function He(){const t=document.getElementById("ckyBannerTemplate").innerHTML,n=new DOMParser().parseFromString(t,"text/html");Ie(n),document.body.insertAdjacentHTML("afterbegin",n.body.innerHTML),p()==="classic"&&m("=settings-button","false"),te(),we(),ve(),st(),tt(),Qe(),D(),ze(),Je(),pe(),Ce(),nt(),ot(),xe(),be()}function b(e="custom"){return()=>{ce(e),I(),v(),ie()}}function Fe(){if(a._ckySetInStore("action","yes"),oe()){L();return}I()}function ce(e="all"){const t=k(),n=T();a._ckySetInStore("action","yes"),t==="gdpr"?a._ckySetInStore("consent",e==="reject"?"no":"yes"):a._ckySetInStore("consent",n?"yes":"no");const o={accepted:[],rejected:[]};for(const c of r._categories){let s="no";t==="gdpr"?s=!c.isNecessary&&(e==="reject"||e==="custom"&&!T(c.slug))?"no":"yes":s=n&&!c.defaultConsent.ccpa?"no":"yes",a._ckySetInStore(`${c.slug}`,s),s==="no"?(o.rejected.push(c.slug),ee(c)):o.accepted.push(c.slug)}re(),z(o)}function Re(){const e=k(),t=r._shortCodes.find(C=>C.key==="cky_show_desc"),n=r._shortCodes.find(C=>C.key==="cky_hide_desc");if(!t||!n)return;const o=n.content,c=t.content,s=window.innerWidth<376?150:300,i=document.querySelector(`[data-cky-tag="${e==="gdpr"?"detail":"optout"}-description"]`);if(!i||i.textContent.length<s)return;const u=i.innerHTML,g=new DOMParser().parseFromString(u,"text/html").querySelectorAll("body > p");if(g.length<=1)return;let _="";for(let C=0;C<g.length;C++){if(C===g.length-1)continue;const B=g[C];if(`${_}${B.outerHTML}`.length>s&&B.insertAdjacentHTML("beforeend",`...&nbsp;${c}`),_=`${_}${B.outerHTML}`,_.length>s)break}function le(){i.innerHTML=`${u}${o}`,y("=hide-desc-button",U),D()}function U(){i.innerHTML=_,y("=show-desc-button",le),D()}U()}function je(){const e=r._tags;Array.prototype.forEach.call(e,function(t){document.querySelectorAll("[data-cky-tag="+t.tag+"]").forEach(function(n){let o="";for(const c in t.styles)o+=`${c}: ${t.styles[c]};`;n.style.cssText=o})})}const Ue=document.createElement;document.createElement=(...e)=>{const t=Ue.call(document,...e);if(t.nodeName.toLowerCase()!=="script")return t;const n=t.setAttribute.bind(t);return Object.defineProperties(t,{src:{get:function(){return t.getAttribute("src")},set:function(o){return M(t,o)&&n("type","javascript/blocked"),n("src",o),!0}},type:{get:function(){return t.getAttribute("type")},set:function(o){return o=M(t)?"javascript/blocked":o,n("type",o),!0}}}),t.setAttribute=(o,c)=>{if(o==="type"||o==="src")return t[o]=c;n(o,c),o==="data-cookieyes"&&!M(t)&&n("type","text/javascript")},t};function We(e){for(const{addedNodes:t}of e)for(const n of t)if(!(!n.src||!n.nodeName||!["script","iframe"].includes(n.nodeName.toLowerCase())))try{const o=n.src.startsWith("//")?`${window.location.protocol}${n.src}`:n.src,{hostname:c,pathname:s}=new URL(o),i=Ye(`${c}${s}`);if(Ve(n,i),!j(i))continue;const l=a._ckyRandomString(8,!1);if(n.nodeName.toLowerCase()==="iframe")Ze(n,l);else{n.type="javascript/blocked";const d=function(g){g.preventDefault(),n.removeEventListener("beforescriptexecute",d)};n.addEventListener("beforescriptexecute",d)}const u=document.head.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY?"head":"body";n.remove(),r._backupNodes.push({position:u,node:n.cloneNode(),uniqueID:l})}catch(o){}}function re(){if(navigator.doNotTrack===1)return;const e=a._ckyGetFromStore("consent");k()==="gdpr"&&(!e||e!=="yes")||(r._backupNodes=r._backupNodes.filter(({position:t,node:n,uniqueID:o})=>{try{if(j(n.src))return!0;if(n.nodeName.toLowerCase()==="script"){const c=document.createElement("script");c.src=n.src,c.type="text/javascript",document[t].appendChild(c)}else{const c=document.getElementById(o);if(!c)return!1;const s=document.createElement("iframe");s.src=n.src,s.width=c.offsetWidth,s.height=c.offsetHeight,c.parentNode.insertBefore(s,c),c.parentNode.removeChild(c)}return!1}catch(c){return console.error(c),!1}}))}function Ve(e,t){const n=e.hasAttribute("data-cookieyes")&&e.getAttribute("data-cookieyes");if(!n)return;const o=n.replace("cookieyes-","");for(const s of r._categories)if(s.isNecessary&&s.slug===o)return;const c=r._providersToBlock.find(({re:s})=>s===t);c?c.isOverridden?c.categories.includes(o)||c.categories.push(o):(c.categories=[o],c.isOverridden=!0):r._providersToBlock.push({re:t,categories:[o],fullPath:!1})}const Ke=new MutationObserver(We);Ke.observe(document.documentElement,{childList:!0,subtree:!0});function Ye(e){return e.replace(/^www./,"")}function se(e){const t=a._ckyGetFromStore(e);return t==="no"||!t&&r._categories.some(n=>n.slug===e&&!n.isNecessary)}function j(e){const t=r._providersToBlock.find(({re:n})=>new RegExp(ke(n)).test(e));return t&&t.categories.some(n=>se(n))}function M(e,t){return e.hasAttribute("data-cookieyes")&&se(e.getAttribute("data-cookieyes").replace("cookieyes-",""))||j(t||e.src)}function Qe(){const e=r._shortCodes.find(s=>s.key==="cky_readmore");if(!e.status)return;const t=e.content,n=r._bannerConfig.config.readMore.styles,o=document.querySelector('[data-cky-tag="description"]');if(!o)return;if(o.childNodes.length>1){const s=document.querySelector('[data-cky-tag="description"] p:last-child');s&&s.insertAdjacentHTML("beforeend",`&nbsp;${t}`)}else o.insertAdjacentHTML("beforeend",`&nbsp;${t}`);const c=document.querySelectorAll('[data-cky-tag="readmore-button"]');c.length<1||Array.from(c).forEach(s=>{for(const i in n)n[i]&&(s.style[i]=n[i])})}function D(){if(!r._bannerConfig.config.showMore||!r._bannerConfig.config.showLess)return;const e=r._bannerConfig.config.showMore.styles,t=r._bannerConfig.config.showLess.styles;if(e){const n=document.querySelectorAll('[data-cky-tag="show-desc-button"]');n.length>0&&Array.from(n).forEach(o=>{for(const c in e)e[c]&&(o.style[c]=e[c])})}if(t){const n=document.querySelectorAll('[data-cky-tag="hide-desc-button"]');n.length>0&&Array.from(n).forEach(o=>{for(const c in t)t[c]&&(o.style[c]=t[c])})}}function ze(){if(!r._bannerConfig.config.alwaysActive)return;const e=r._bannerConfig.config.alwaysActive.styles;if(!e)return;const t=document.querySelectorAll(".cky-always-active");t.length<1||Array.from(t).forEach(n=>{for(const o in e)e[o]&&(n.style[o]=e[o])})}function Je(){if(!r._bannerConfig.config.manualLinks)return;const e=r._bannerConfig.config.manualLinks.styles;if(!e)return;const t=document.querySelectorAll('.cky-link, a.cky-link, [data-cky-tag="detail"] a, [data-cky-tag="optout-popup"] a, [data-cky-tag="notice"] a');t.length<1||Array.from(t).forEach(n=>{if(n.getAttribute("data-cky-tag")!=="readmore-button"){for(const o in e)e[o]&&(n.style[o]=e[o]);e.color&&(n.style.textDecorationColor=e.color)}})}function ie(){k()==="gdpr"&&te(!0),r._bannerConfig.behaviours.reloadBannerOnAccept===!0&&window.location.reload()}function Xe(){document.getElementById("cky-style")||!W||document.head.insertAdjacentHTML("beforeend",` <style id="cky-style">${W.css}</style>`)}function T(e=""){return(e?["ckySwitch","ckyCategoryDirect"]:["ckyCCPAOptOut"]).some(n=>{const o=document.getElementById(`${n}${e}`);return o&&o.checked})}function Ze(e,t){const o=r._shortCodes.find(d=>d.key==="cky_video_placeholder").content,{offsetWidth:c,offsetHeight:s}=e;if(c===0||s===0)return;e.insertAdjacentHTML("beforebegin",`${o}`.replace("[UNIQUEID]",t));const i=document.getElementById(t);i.style.width=`${c}px`,i.style.height=`${s}px`;const l=document.querySelector(`#${t} .video-placeholder-text-normal`);l.style.display="none";const u=et(e.src);u&&(i.classList.replace("video-placeholder-normal","video-placeholder-youtube"),i.style.backgroundImage=`linear-gradient(rgba(76,72,72,.7),rgba(76,72,72,.7)),url('https://img.youtube.com/vi/${u}/maxresdefault.jpg')`,l.classList.replace("video-placeholder-text-normal","video-placeholder-text-youtube"))}function et(e){const t=e.match(/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return t&&Array.isArray(t)&&t[2]&&t[2].length===11?t[2]:!1}function tt(){const e=r._bannerConfig.config.videoPlaceholder.status,t=r._bannerConfig.config.videoPlaceholder.styles;if(!e||!e)return;const n=document.querySelectorAll('[data-cky-tag="placeholder-title"]');n.length<1||Array.from(n).forEach(o=>{o.style.display="block",o.addEventListener("click",()=>{a._ckyGetFromStore("action")&&E()});for(const c in t)t[c]&&(o.style[c]=t[c])})}function nt(){if(!r._rtl)return;["notice","detail","optout-popup","revisit-consent","video-placeholder"].forEach(function(t){f(t)&&f(t).classList.add("cky-rtl")})}function ae(e){const t=f(e);t&&t.focus()}function ot(){let e="flex-end";["detail-powered-by","optout-powered-by"].map(t=>{const n=document.querySelector(`[data-cky-tag="${t}"]`);if(n)return n.style.display="flex",n.style.justifyContent=e,n.style.alignItems="center",n})}function ct(){document.querySelector("body").addEventListener("click",e=>{const t=".cky-banner-element, .cky-banner-element *";(e.target.matches?e.target.matches(t):e.target.msMatchesSelector(t))&&E()})}function rt(){for(const e of r._categories)a._ckyGetFromStore(e.slug)!=="yes"&&ee(e)}function st(){const e=r._bannerConfig.config.optOption.toggle,t=e.states.active.styles["background-color"],n=e.states.inactive.styles["background-color"];x("=optout-option","cky-disabled",!1);const o=r._shortCodes.find(l=>l.key==="cky_optout_toggle_label"),c=r._shortCodes.find(l=>l.key==="cky_optout_option_title"),s=o.content.replace("[cky_optout_option_title]",c.content),i=a._ckyGetFromStore("consent")==="yes";it(document.getElementById("ckyCCPAOptOut"),s,{checked:i,disabled:!1,addListeners:!0},{activeColor:t,inactiveColor:n},!0)}function it(e,t,{checked:n,disabled:o,addListeners:c},{activeColor:s,inactiveColor:i},l=!1){e&&(l&&c&&y("=optout-option-title",()=>e.click()),e.checked=n,e.disabled=o,e.style.backgroundColor=n?s:i,A(e,n,t,l),c&&e.addEventListener("change",({currentTarget:u})=>{const d=u.checked;u.style.backgroundColor=d?s:i,A(e,d,t,l)}))}window.revisitCkyConsent=()=>E();window.getCkyConsent=function(){const e={activeLaw:"",categories:{},isUserActionCompleted:!1,consentID:"",languageCode:""};try{e.activeLaw=k(),r._categories.forEach(t=>{e.categories[t.slug]=a._ckyGetFromStore(t.slug)==="yes"}),e.isUserActionCompleted=a._ckyGetFromStore("action")==="yes",e.consentID=a._ckyGetFromStore("consentid")||"",e.languageCode=r._language||""}catch(t){}return e};})();