document.querySelectorAll(".wp-theme-mixin-styles-gb, .mxs-card, .mxs-thin-header, .wp-block-navigation:not(.wp-block-navigation__container).is-style-flat-nav").forEach(e=>{if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background");if(!t.match(/\d+/g))return;const s=t.match(/\d+/g).map(Number);e.classList.add(function(){const t=(299*s[0]+587*s[1]+114*s[2])/1e3;return t>128?document.body===e?(e.classList.remove("mxs-dark-theme-bg"),"mxs-light-theme-bg"):(e.classList.remove("mxs-dark-bg"),"mxs-light-bg"):t<128?document.body===e?(e.classList.remove("mxs-light-theme-bg"),"mxs-dark-theme-bg"):(e.classList.remove("mxs-light-bg"),"mxs-dark-bg"):void 0}())});