let _t,_m,_s=localStorage.getItem("fcnSiteSettings"),_r=document.documentElement;if(_s&&(_s=JSON.parse(_s))&&null!==_s&&"object"==typeof _s){Object.entries(_s).forEach((t=>{switch(t[0]){case"minimal":_r.classList.toggle("minimal",t[1]);break;case"darken":_t=_s.darken,_m=_t>=0?1+Math.pow(_t,2):1-Math.pow(_t,2),_r.style.setProperty("--darken",_m);break;case"saturation":_t=_s.saturation,_m=_t>=0?1+Math.pow(_t,2):1-Math.pow(_t,2),_r.style.setProperty("--saturation",_m);break;case"font-saturation":_t=_s["font-saturation"],_m=_t>=0?1+Math.pow(_t,2):1-Math.pow(_t,2),_r.style.setProperty("--font-saturation",_m);break;case"hue-rotate":_m=Number.isInteger(_s["hue-rotate"])?_s["hue-rotate"]:0,_r.style.setProperty("--hue-rotate",`${_m}deg`);break;default:_r.classList.toggle(`no-${t[0]}`,!t[1])}})),_r.dataset.fontWeight=_s.hasOwnProperty("font-weight")?_s["font-weight"]:"default",_r.dataset.theme=_s.hasOwnProperty("site-theme")&&!_r.dataset.forceChildTheme?_s["site-theme"]:"default";let t=getComputedStyle(document.documentElement).getPropertyValue("--theme-color-base").trim().split(" "),e=_s.darken?_s.darken:0,a=_s.saturation?_s.saturation:0,s=_s["hue-rotate"]?_s["hue-rotate"]:0,r=e>=0?1+Math.pow(e,2):1-Math.pow(e,2);_s=a>=0?1+Math.pow(a,2):1-Math.pow(a,2),t=`hsl(${(parseInt(t[0])+s)%360}deg ${(parseInt(t[1])*_s).toFixed(2)}% ${(parseInt(t[2])*r).toFixed(2)}%)`,document.querySelector("meta[name=theme-color]").setAttribute("content",t)}localStorage.getItem("fcnLightmode")&&(_r.dataset.mode="true"==localStorage.getItem("fcnLightmode")?"light":"");