(()=>{(function(){"use strict";let t={getDarkMode(){let e=localStorage.getItem("darkMode");return e===null?"inactive":e==="system"?window.matchMedia("(prefers-color-scheme:dark)").matches?"active":"inactive":e},toggleDarkMode(e){localStorage.setItem("darkMode",e),t.applyDarkMode()},applyDarkMode(){t.getDarkMode()==="active"?$("html").addClass("dark"):$("html").removeClass("dark")}},o={getThemeColor(){let e=localStorage.getItem("themeColor");return e===null?"default":e},setThemeColor(e){localStorage.setItem("themeColor",e),o.applyThemeColor()},applyThemeColor(){$("html").data("theme",o.getThemeColor())}};(function(){t.applyDarkMode(),o.applyThemeColor()})(),$("[data-theme]").on("click",function(){o.setThemeColor($(this).data("theme"))}),$("[data-dark-mode]").on("click",function(){t.toggleDarkMode($(this).data("dark-mode"))})})();})();
