PageSourceSearch

https://mycomplaints.ai/assets/theme-provider-z2uKaDfw.js

js mycomplaints.ai collected 2026-10-05 12:17:59 UTC 773 bytes, 1 lines download raw bytes

1import{v as t,s as u}from"./chunk-4N6VE7H7-Bf9iXIPE.js";const d={theme:"light",setTheme:()=>null},c=t.createContext(d);function T({children:s,defaultTheme:i="light",storageKey:o="vite-ui-theme"}){const[r,n]=t.useState("light"),[a,m]=t.useState(!1);t.useEffect(()=>{const e=localStorage.getItem(o);n(e==="dark"||e==="light"?e:i),m(!0)},[i,o]),t.useEffect(()=>{if(!a)return;const e=window.document.documentElement;e.classList.remove("light","dark"),e.classList.add(r)},[r,a]);const h={theme:r,setTheme:e=>{localStorage.setItem(o,e),document.cookie=`theme=${e}; path=/; max-age=31536000`,n(e)}};return u.jsx(c.Provider,{value:h,children:s})}const f=()=>{const s=t.useContext(c);if(!s)throw new Error("useTheme must be used within a ThemeProvider");return s};export{T,f as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.