function getColorThemes(){const e="colorThemes_data",t="colorThemes_publishDate";function n(){const e=document.documentElement.previousSibling;return e?.nodeType===Node.COMMENT_NODE?new Date(e.textContent.match(/Last Published: (.+?) GMT/)[1]).getTime():null}window.colorThemes={themes:{},getTheme(e="",t=""){if(!e)return this.getTheme(Object.keys(this.themes)[0],t);const n=this.themes[e];return n?n.brands&&0!==Object.keys(n.brands).length?t?n.brands[t]||{}:n.brands[Object.keys(n.brands)[0]]:n:{}}};const o=function(){try{const o=localStorage.getItem(t),r=n();return r&&o&&o===r.toString()?JSON.parse(localStorage.getItem(e)):null}catch(e){return null}}();if(o)return window.colorThemes.themes=o,void document.dispatchEvent(new CustomEvent("colorThemesReady"));const r=document.querySelector('link[rel="stylesheet"]');if(!r?.href)return null;const s=new Set,c=new Set,a=new Set;fetch(r.href).then((e=>{if(!e.ok)throw new Error(`Failed to fetch stylesheet: ${e.statusText}`);return e.text()})).then((o=>{(o.match(/--_theme[\w-]+:\s*[^;]+/g)||[]).forEach((e=>s.add(e.split(":")[0].trim()))),(o.match(/\.u-(theme|brand)-[\w-]+/g)||[]).forEach((e=>{e.startsWith(".u-theme-")&&c.add(e),e.startsWith(".u-brand-")&&a.add(e)}));const r=Array.from(s);function l(e,t=null){let n=document.documentElement.getAttribute("class");document.documentElement.setAttribute("class",""),document.documentElement.classList.add(e,t);const o={};return r.forEach((e=>o[e]=getComputedStyle(document.documentElement).getPropertyValue(e))),document.documentElement.setAttribute("class",n),o}c.forEach((e=>{const t=e.replace(".","").replace("u-theme-","");window.colorThemes.themes[t]={brands:{}},a.forEach((n=>{const o=n.replace(".","").replace("u-brand-","");window.colorThemes.themes[t].brands[o]=l(e.replace(".",""),n.replace(".",""))})),a.size||(window.colorThemes.themes[t]=l(e.replace(".","")))})),function(o){try{const r=n();r&&(localStorage.setItem(t,r.toString()),localStorage.setItem(e,JSON.stringify(o)))}catch(e){}}(window.colorThemes.themes),document.dispatchEvent(new CustomEvent("colorThemesReady"))})).catch((e=>{}))}window.addEventListener("DOMContentLoaded",(e=>{getColorThemes()}));