1(() => { 2 const storageKey = 'is-ai-native-theme'; 3 let mode = 'system'; 4 5 try { 6 const saved = localStorage.getItem(storageKey); 7 if (saved === 'light' || saved === 'dark' || saved === 'system') { 8 mode = saved; 9 } 10 } catch { 11 mode = 'system'; 12 } 13 14 const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches; 15 const resolved = mode === 'system' ? (prefersDark ? 'dark' : 'light') : mode; 16 const root = document.documentElement; 17 18 root.dataset.themeMode = mode; 19 root.dataset.theme = resolved; 20 root.style.colorScheme = resolved; 21})();
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.