import{w as p,r as M}from"./index.C6iEUy_w.js";import{l as S}from"./scheduler.VqJF7Vna.js";const m={};function h(e){return e==="local"?localStorage:sessionStorage}function l(e,t,s){const o=JSON,n="local";function u(c,d){h(n).setItem(c,o.stringify(d))}if(!m[e]){const c=p(t,r=>{const a=h(n).getItem(e);a&&r(o.parse(a));{const g=i=>{i.key===e&&r(i.newValue?o.parse(i.newValue):null)};return window.addEventListener("storage",g),()=>window.removeEventListener("storage",g)}}),{subscribe:d,set:f}=c;m[e]={set(r){u(e,r),f(r)},update(r){const a=r(S(c));u(e,a),f(a)},subscribe:d}}return m[e]}const L=l("modeOsPrefers",!1),P=l("modeUserPrefers",void 0),E=l("modeCurrent",!1);function b(){const e=window.matchMedia("(prefers-color-scheme: light)").matches;return L.set(e),e}function I(e){P.set(e)}function O(e){const t=document.documentElement.classList,s="dark";e===!0?t.remove(s):t.add(s),E.set(e)}function H(){const e=document.documentElement.classList,t=localStorage.getItem("modeUserPrefers")==="false",s=!("modeUserPrefers"in localStorage),o=window.matchMedia("(prefers-color-scheme: dark)").matches;t||s&&o?e.add("dark"):e.remove("dark")}function R(){const e=window.matchMedia("(prefers-color-scheme: light)");function t(s){const o=document.documentElement.classList,n="dark";s===!0?o.remove(n):o.add(n)}t(e.matches),e.onchange=()=>{t(e.matches)}}const w="(prefers-reduced-motion: reduce)";function v(){return window.matchMedia(w).matches}const k=M(v(),e=>{{const t=o=>{e(o.matches)},s=window.matchMedia(w);return s.addEventListener("change",t),()=>{s.removeEventListener("change",t)}}});export{O as a,I as b,R as c,b as g,E as m,k as p,H as s};
//# sourceMappingURL=ProgressBar.svelte_svelte_type_style_lang.BWJb3fM2.js.map
