### Start Services Source: https://muspimerol.site/llms-full.txt Commands to start various services after a system restart. These include database services, chat applications, and other custom services. ```bash mysqld service mysqld start chat-proxy poetry run uvicorn main:app --reload --host 0.0.0.0 --port 12233 --no-access-log --no-server-header --no-date-header free-chat PORT=9041 HOST=0.0.0.0 node dist/server/entry.mjs new-bingo ./start.sh simple-poster poetry run flask run --host 0.0.0.0 chatgpt_academic poetry run python3 -O main.py gp poetry run uvicorn main:app --reload --port 9999 --host 0.0.0.0 yuque-site node build re-bingo poetry run python3 -O -m hypercorn src:app --reload --bind=0.0.0.0:443 --insecure-bind=0.0.0.0:80 --reload --keyfile ../bingo.key --certfile ../bingo.cer --ca-certs ../ca.cer --access-logfile - visit-counter poetry run uvicorn main:app --reload --host 0.0.0.0 --port 14141 tmp poetry run python3 -O main.py --reload ``` -------------------------------- ### Python Example for Handling Division by Zero Source: https://muspimerol.site/llms-full.txt A Python example demonstrating a function that performs division and might encounter a division by zero error. The accompanying link suggests a way to handle this, potentially by returning a specific value or raising a custom exception. ```python def f(): return 1 / 0 async def g(): return f() await g() ``` -------------------------------- ### Python Example for Patching linecache with exec Source: https://muspimerol.site/llms-full.txt This Python code illustrates how to patch the `linecache` module using `exec`. This technique can be used to modify the behavior of `linecache`, for example, to achieve custom effects like the one shown in the accompanying image. ```python # Example: Patching linecache # import linecache # exec(linecache.getlines('your_file.py')) ``` -------------------------------- ### Initialize SvelteKit Application - JavaScript Source: https://muspimerol.site/blog/wzakrq31d4zqsbog This JavaScript code initializes a SvelteKit application. It dynamically imports necessary modules and starts the application, rendering it into a specified DOM element. It handles routing, data loading, and error management for the application. Dependencies include SvelteKit's start function and application modules. ```javascript const element = document.currentScript.parentElement; Promise.all([ import("../_app/immutable/entry/start.B78HTVvQ.mjs"), import("../_app/immutable/entry/app.HvOIjkSg.mjs") ]).then(([kit, app]) => { kit.start(app, element, { node_ids: [0, 2, 5], data: [ { type: "data", data: { mode: void 0, language: "en-US" }, uses: {} }, { type: "data", data: { article: { id: 141827901, description: void 0, title: "节后统计", markdown: "![](/_app/immutable/assets/OM4oA2RxT3nKbPC.PNG-1761001e.png)\n\n![](/_app/immutable/assets/VGpJPUNth5nkWoq.PNG-05037c9a.png)kan\n\n", updated_at: "2023-10-12T10:57:12.000Z" } }, uses: { params: ["slug"], route: 1 } }, null ], form: null, error: null }); }); ``` -------------------------------- ### Initialize SvelteKit Application (JavaScript) Source: https://muspimerol.site/blog/rek9u3gmic663ack This JavaScript code snippet initializes the SvelteKit application. It dynamically imports the necessary SvelteKit modules and starts the application, passing configuration data and DOM element references. This is typically found in the main entry point of a SvelteKit project. ```javascript const __sveltekit_1qbzj99 = { base: ["about:", "data:"].includes(location.protocol) ? ".." : ["about:", "data:"].includes(location.protocol) ? ".." : ["about:", "data:"].includes(location.protocol) ? ".." : ["about:", "data:"].includes(location.protocol) ? ".." : ["about:", "data:"].includes(location.protocol) ? ".." : ["about:", "data:"].includes(location.protocol) ? ".." : ["about:", "data:"].includes(location.protocol) ? ".." : ["about:", "data:"].includes(location.protocol) ? ".." : ["about:", "data:"].includes(location.protocol) ? ".." : ["about:", "data:"].includes(location.protocol) ? ".." : ["about:", "data:"].includes(location.protocol) ? ".." : new URL("..", location).pathname.slice(0, -1) }; const element = document.currentScript.parentElement; Promise.all([ import("../_app/immutable/entry/start.B78HTVvQ.mjs"), import("../_app/immutable/entry/app.HvOIjkSg.mjs") ]).then(([kit, app]) => { kit.start(app, element, { node_ids: [0, 2, 5], data: [ { type: "data", data: { mode: void 0, language: "en-US" }, uses: {} }, { type: "data", data: { article: { id: 188062684, description: void 0, title: "Cerebras 与 Groq", markdown: "![](/nlark/yuque/0/2024/png/26070246/1727280704638-5d515c2d-7d78-4d92-b671-7f75487c300d.png)\n\n![](/nlark/yuque/0/2024/png/26070246/1727280715882-ba5b226d-077f-4039-8ab9-7a65673c1db2.png)\n\n", updated_at: "2024-09-25T16:12:27.000Z" } }, uses: { params: ["slug"], route: 1 } }, null ], form: null, error: null }); }); ``` -------------------------------- ### Initialize SvelteKit Application Source: https://muspimerol.site/blog/vgg9ytufpq5g9gxn Bootstraps the SvelteKit application by resolving the base path and dynamically importing the start and app modules. It initializes the application state with node IDs and data payloads. ```javascript { __sveltekit_1qbzj99 = { base: ['about:', 'data:'].includes(location.protocol) ? ".." : new URL("..", location).pathname.slice(0, -1) }; const element = document.currentScript.parentElement; Promise.all([ import("../_app/immutable/entry/start.B78HTVvQ.mjs"), import("../_app/immutable/entry/app.HvOIjkSg.mjs") ]).then(([kit, app]) => { kit.start(app, element, { node_ids: [0, 2, 5], data: [{type:"data",data:{mode:void 0,language:"en-US"},uses:{}},{type:"data",data:{article:{id:137295108,description:void 0,title:"104 hrs 35 mins over the last 14 days",markdown:"![]()\n\n",updated_at:"2023-08-24T21:14:52.000Z"}},uses:{params:["slug"],route:1}},null], form: null, error: null }); }); } ``` -------------------------------- ### Manage Linux Services Source: https://muspimerol.site/llms-full.txt A collection of shell commands used to start various web services, databases, and application proxies on a Linux server. These commands typically utilize process managers like poetry, node, or systemd. ```bash service mysqld start poetry run uvicorn main:app --reload --host 0.0.0.0 --port 12233 --no-access-log --no-server-header --no-date-header PORT=9041 HOST=0.0.0.0 node dist/server/entry.mjs ./start.sh poetry run flask run --host 0.0.0.0 poetry run python3 -O main.py poetry run uvicorn main:app --reload --port 9999 --host 0.0.0.0 node build poetry run python3 -O -m hypercorn src:app --reload --bind=0.0.0.0:443 --insecure-bind=0.0.0.0:80 --reload --keyfile ../bingo.key --certfile ../bingo.cer --ca-certs ../ca.cer --access-logfile - poetry run uvicorn main:app --reload --host 0.0.0.0 --port 14141 poetry run python3 -O main.py --reload ``` -------------------------------- ### Example TypeScript Parse Call with Partial Injection Source: https://muspimerol.site/llms-full.txt Demonstrates using the `parse` function with the `inject: true` option to enable partial information injection. The example shows how to access the `partial` symbol on the result to retrieve information about incomplete parsing at different levels of the data structure. ```typescript > res = parse(`[0, {"a": [{`, { allow: ALL, inject: true }) // [0, {"a": [{}]}] > res[0][partial] // undefined > res[1][partial] // { text: '{"a": [{' } > res[1].a[partial] // { text: '[{' } > res[1].a[0][partial] // { text: '{' } ``` -------------------------------- ### Python Example for Module Unloading Source: https://muspimerol.site/llms-full.txt This Python code snippet demonstrates how to unload a module by removing it from `sys.modules`. This is a simplified approach to module management in Python. ```python # Example: To unload a module named 'my_module' # import sys # if 'my_module' in sys.modules: # del sys.modules['my_module'] ``` -------------------------------- ### Bootstrap SvelteKit Application Source: https://muspimerol.site/blog/xc88oixrmv3qnl9v This script initializes the SvelteKit runtime environment. It sets the base URL path and asynchronously imports the application entry points to hydrate the page. ```JavaScript { __sveltekit_1qbzj99 = { base: ['about:', 'data:'].includes(location.protocol) ? ".." : new URL("..", location).pathname.slice(0, -1) }; const element = document.currentScript.parentElement; Promise.all([ import("../_app/immutable/entry/start.B78HTVvQ.mjs"), import("../_app/immutable/entry/app.HvOIjkSg.mjs") ]).then(([kit, app]) => { kit.start(app, element, { node_ids: [0, 2, 5], data: [{type:"data",data:{mode:void 0,language:"en-US"},uses:{}},{type:"data",data:{article:{id:190813205,description:void 0,title:"No. 923",markdown:"居然也是 7 的倍数 哈哈哈\n\n",updated_at:"2024-10-18T06:43:08.000Z"}},uses:{params:["slug"],route:1}},null], form: null, error: null }); }); } ``` -------------------------------- ### Bootstrap SvelteKit Application Source: https://muspimerol.site/blog/suac126h4dw6dizd Initializes the SvelteKit runtime environment by loading core modules and mounting the application to the DOM. It handles path resolution and initial state injection for the blog post. ```javascript { __sveltekit_1qbzj99 = { base: ['about:', 'data:'].includes(location.protocol) ? ".." : new URL("..", location).pathname.slice(0, -1) }; const element = document.currentScript.parentElement; Promise.all([ import("../_app/immutable/entry/start.B78HTVvQ.mjs"), import("../_app/immutable/entry/app.HvOIjkSg.mjs") ]).then(([kit, app]) => { kit.start(app, element, { node_ids: [0, 2, 5], data: [{type:"data",data:{mode:void 0,language:"en-US"},uses:{}},{type:"data",data:{article:{id:164229523,description:void 0,title:"Serverless era of Python",markdown:"![]()\n\n\n\n",updated_at:"2024-04-03T03:59:22.000Z"}},uses:{params:["slug"],route:1}},null], form: null, error: null }); }); } ``` -------------------------------- ### Initialize SvelteKit Application Environment Source: https://muspimerol.site/blog/eqongggr349ufs73 This snippet initializes the SvelteKit application state by determining the base URL and loading the core application modules asynchronously. It is used to bootstrap the front-end environment for the SymPy project documentation site. ```javascript { __sveltekit_1qbzj99 = { base: ['about:', 'data:'].includes(location.protocol) ? ".." : new URL("..", location).pathname.slice(0, -1) }; const element = document.currentScript.parentElement; Promise.all([ import("../_app/immutable/entry/start.B78HTVvQ.mjs"), import("../_app/immutable/entry/app.HvOIjkSg.mjs") ]).then(([kit, app]) => { kit.start(app, element, { node_ids: [0, 2, 5], data: [...] }); }); } ``` -------------------------------- ### Set Initial Mode and Theme - JavaScript Source: https://muspimerol.site/blog/wzakrq31d4zqsbog This JavaScript function initializes the website's mode (light/dark) and theme based on user preferences stored in localStorage or system settings. It manipulates CSS classes on the root element and sets theme-color meta tags. Dependencies include localStorage API and window.matchMedia. ```javascript function setInitialMode({ defaultMode = "system", themeColors: themeColors2, darkClassNames: darkClassNames2 = ["dark"], lightClassNames: lightClassNames2 = [], defaultTheme = "", modeStorageKey: modeStorageKey2 = "mode-watcher-mode", themeStorageKey: themeStorageKey2 = "mode-watcher-theme" }) { const rootEl = document.documentElement; const mode = localStorage.getItem(modeStorageKey2) ?? defaultMode; const theme = localStorage.getItem(themeStorageKey2) ?? defaultTheme; const light = mode === "light" || mode === "system" && window.matchMedia("(prefers-color-scheme: light)").matches; if (light) { if (darkClassNames2.length) rootEl.classList.remove(...darkClassNames2.filter(Boolean)); if (lightClassNames2.length) rootEl.classList.add(...lightClassNames2.filter(Boolean)); } else { if (lightClassNames2.length) rootEl.classList.remove(...lightClassNames2.filter(Boolean)); if (darkClassNames2.length) rootEl.classList.add(...darkClassNames2.filter(Boolean)); } rootEl.style.colorScheme = light ? "light" : "dark"; if (themeColors2) { const themeMetaEl = document.querySelector('meta[name="theme-color"]'); if (themeMetaEl) { themeMetaEl.setAttribute("content", mode === "light" ? themeColors2.light : themeColors2.dark); } } if (theme) { rootEl.setAttribute("data-theme", theme); localStorage.setItem(themeStorageKey2, theme); } localStorage.setItem(modeStorageKey2, mode); } ``` -------------------------------- ### Module System in JavaScript (CommonJS and ES Modules) Source: https://cdn.muspimerol.site/anti-dos-05-04 Illustrates how to use JavaScript modules for organizing code, covering both CommonJS (used in Node.js) and ES Modules (standard in modern JavaScript). Facilitates code reusability and maintainability. ```javascript // --- mathUtils.js (CommonJS) --- // const add = (a, b) => a + b; // const subtract = (a, b) => a - b; // module.exports = { add, subtract }; // --- main.js (CommonJS) --- // const math = require('./mathUtils.js'); // console.log(math.add(5, 3)); // --- mathUtils.mjs (ES Module) --- // export const add = (a, b) => a + b; // export const subtract = (a, b) => a - b; // --- main.mjs (ES Module) --- // import { add, subtract } from './mathUtils.mjs'; // console.log(add(10, 5)); // --- utils.js (ES Module with default export) --- // const greet = (name) => `Hello, ${name}!`; // export default greet; // --- main.mjs (ES Module with default import) --- // import sayHello from './utils.js'; // console.log(sayHello("World")); // --- main.mjs (ES Module with namespace import) --- // import * as math from './mathUtils.mjs'; // console.log(math.add(7, 2)); ``` -------------------------------- ### Asynchronous Operations in JavaScript (Promises and Async/Await) Source: https://cdn.muspimerol.site/anti-dos-05-04 Explains how to handle asynchronous operations using Promises and the async/await syntax. Crucial for managing operations like network requests and file I/O without blocking the main thread. ```javascript // Using Promises function delayedGreeting(name) { return new Promise((resolve, reject) => { setTimeout(() => { if (name) { resolve(`Hello, ${name}!`); } else { reject("Name is required."); } }, 1000); }); } delayedGreeting("Alice") .then(message => console.log(message)) .catch(error => console.error(error)); delayedGreeting() .then(message => console.log(message)) .catch(error => console.error(error)); // Using Async/Await async function fetchUserData() { try { const response = await fetch('https://jsonplaceholder.typicode.com/users/1'); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const data = await response.json(); console.log("User data:", data); } catch (error) { console.error("Failed to fetch user data:", error); } } fetchUserData(); // Async function with multiple awaits async function processData() { try { const result1 = await delayedGreeting("Bob"); console.log(result1); const result2 = await fetchUserData(); console.log("Data processing complete."); } catch (error) { console.error("Error during data processing:", error); } } processData(); ``` -------------------------------- ### Initialize Theme and Mode Management (JavaScript) Source: https://muspimerol.site/blog/rek9u3gmic663ack This JavaScript function initializes the website's theme and mode settings. It reads user preferences from localStorage, applies corresponding CSS classes to the root element, and sets the color scheme. It also handles theme color meta tags and data theme attributes. ```javascript function setInitialMode({ defaultMode = "system", themeColors: themeColors2, darkClassNames: darkClassNames2 = ["dark"], lightClassNames: lightClassNames2 = [], defaultTheme = "", modeStorageKey: modeStorageKey2 = "mode-watcher-mode", themeStorageKey: themeStorageKey2 = "mode-watcher-theme" }) { const rootEl = document.documentElement; const mode = localStorage.getItem(modeStorageKey2) ?? defaultMode; const theme = localStorage.getItem(themeStorageKey2) ?? defaultTheme; const light = mode === "light" || mode === "system" && window.matchMedia("(prefers-color-scheme: light)").matches; if (light) { if (darkClassNames2.length) rootEl.classList.remove(...darkClassNames2.filter(Boolean)); if (lightClassNames2.length) rootEl.classList.add(...lightClassNames2.filter(Boolean)); } else { if (lightClassNames2.length) rootEl.classList.remove(...lightClassNames2.filter(Boolean)); if (darkClassNames2.length) rootEl.classList.add(...darkClassNames2.filter(Boolean)); } rootEl.style.colorScheme = light ? "light" : "dark"; if (themeColors2) { const themeMetaEl = document.querySelector('meta[name="theme-color"]'); if (themeMetaEl) { themeMetaEl.setAttribute("content", mode === "light" ? themeColors2.light : themeColors2.dark); } } if (theme) { rootEl.setAttribute("data-theme", theme); localStorage.setItem(themeStorageKey2, theme); } localStorage.setItem(modeStorageKey2, mode); } setInitialMode({"defaultMode":"system","darkClassNames":["dark"],"lightClassNames":[],"defaultTheme":"","modeStorageKey":"mode-watcher-mode","themeStorageKey":"mode-watcher-theme"}); ``` -------------------------------- ### Boolean Retrieval: Efficient AND NOT Algorithm Source: https://muspimerol.site/llms-full.txt Discusses the challenges of efficiently handling 'AND NOT' boolean queries and outlines the need for a specialized postings merge algorithm to avoid expensive naive evaluation. ```text How should the Boolean query `x AND NOT y` be handled? Why is naive evaluation of this query normally very expensive? Write out a postings merge algorithm that evaluates this query efficiently. ``` -------------------------------- ### DOM Manipulation in JavaScript Source: https://cdn.muspimerol.site/anti-dos-05-04 Shows how to interact with the Document Object Model (DOM) using JavaScript to dynamically change web page content -------------------------------- ### Error Handling in JavaScript Source: https://cdn.muspimerol.site/anti-dos-05-04 Demonstrates how to handle errors gracefully in JavaScript using try...catch...finally blocks. Essential for robust application development and debugging. ```javascript function divide(a, b) { try { if (b === 0) { throw new Error("Division by zero is not allowed."); } const result = a / b; console.log(`Result: ${result}`); } catch (error) { console.error("An error occurred:", error.message); } finally { console.log("This block always executes."); } } divide(10, 2); divide(10, 0); // Custom Error class CustomError extends Error { constructor(message) { super(message); this.name = "CustomError"; } } try { throw new CustomError("Something specific went wrong."); } catch (error) { if (error instanceof CustomError) { console.error(`Caught a custom error: ${error.message}`); } else { console.error("Caught an unknown error:", error.message); } } ``` -------------------------------- ### Function Declarations and Expressions in JavaScript Source: https://cdn.muspimerol.site/anti-dos-05-04 Shows different ways to declare and use functions in JavaScript, including function declarations, function expressions, and arrow functions. Covers basic function invocation and parameter passing. ```javascript // Function Declaration function greet(name) { return "Hello, " + name; } console.log(greet("Alice")); // Function Expression const sayGoodbye = function(name) { return "Goodbye, " + name; }; console.log(sayGoodbye("Bob")); // Arrow Function const multiply = (a, b) => a * b; console.log(multiply(5, 3)); // Arrow Function with implicit return const square = x => x * x; console.log(square(4)); // Arrow Function with block body const add = (a, b) => { const sum = a + b; return sum; }; console.log(add(10, 20)); // IIFE (Immediately Invoked Function Expression) (function() { console.log("This runs immediately."); })(); // Async Function async function fetchData() { return new Promise(resolve => { setTimeout(() => { resolve("Data fetched!"); }, 1000); }); } fetchData().then(data => console.log(data)); // Generator Function function* idGenerator() { let i = 0; while (true) { yield i++; } } const generator = idGenerator(); console.log(generator.next().value); console.log(generator.next().value); ``` -------------------------------- ### Style UI Components Source: https://cdn.muspimerol.site/anti-dos-05-04 Provides specific CSS rules for UI components such as buttons, context menus, and dropdowns, utilizing CSS variables for theme-aware colors and borders. ```css .btn-primary, .btn-primary:hover { background: var(--color-primary); color: var(--color-primary-content); } .context-menu, .dropdown-menu { border: var(--menu-border-width) solid var(--border-color); background: var(--menu-background); } ``` -------------------------------- ### Define CSS Variables and Base Styles Source: https://cdn.muspimerol.site/anti-dos-05-04 Sets up global CSS variables for theme consistency and applies base styles to HTML elements like body, links, and text formatting tags to ensure a unified look across the site. ```css :root { --char-color: var(--md-brackets-expanded); --meta-content-color: inherit; --monospace: var(--font-family-mono); --search-select-bg-color: var(--search-match-background); --search-select-text-color: var(--search-match-color); --select-text-bg-color: var(--selection-background); --window-border: 1px solid var(--border-color); } *, ::before, ::after { box-sizing: border-box; border: 0; border-style: solid; border-color: currentColor; } html, body { margin: 0; line-height: var(--line-height); } ``` -------------------------------- ### Configure Mermaid Diagram Types Source: https://cdn.muspimerol.site/anti-dos-05-04 Applies specific padding and aspect ratio adjustments for various Mermaid diagram types such as Gantt, Pie, and Sequence diagrams. ```css pre.md-diagram[mermaid-type="gantt"] svg { padding: 8px 0 0; } pre.md-diagram[mermaid-type="pie"] svg { aspect-ratio: 16/9; padding-top: 15px; } pre.md-diagram[mermaid-type="sequenceDiagram"] svg { padding: 13px; } ``` -------------------------------- ### Object-Oriented Programming Concepts in JavaScript Source: https://cdn.muspimerol.site/anti-dos-05-04 Illustrates core OOP concepts in JavaScript, including constructor functions, prototypes, classes, inheritance, and encapsulation. Enables building modular and reusable code. ```javascript // Constructor Function function Person(name, age) { this.name = name; this.age = age; } // Adding a method to the prototype Person.prototype.greet = function() { console.log(`Hello, my name is ${this.name} and I am ${this.age} years old.`); }; const person1 = new Person("Alice", 30); person1.greet(); // ES6 Classes class Animal { constructor(name) { this.name = name; } speak() { console.log(`${this.name} makes a noise.`); } } class Dog extends Animal { constructor(name, breed) { super(name); // Call the parent constructor this.breed = breed; } speak() { console.log(`${this.name} barks.`); } getBreed() { return this.breed; } } const dog1 = new Dog("Buddy", "Golden Retriever"); dog1.speak(); // Output: Buddy barks. console.log(dog1.getBreed()); // Output: Golden Retriever // Encapsulation (using private fields - #) class Car { #speed; constructor(make, model) { this.make = make; this.model = model; this.#speed = 0; } accelerate(amount) { this.#speed += amount; console.log(`The ${this.make} ${this.model} is now going ${this.#speed} mph.`); } getCurrentSpeed() { return this.#speed; } } const myCar = new Car("Toyota", "Camry"); myCar.accelerate(50); // console.log(myCar.#speed); // Error: Private field '#speed' must be declared in an enclosing class console.log(myCar.getCurrentSpeed()); // Output: 50 // Inheritance using Object.create const vehicleProto = { startEngine: function() { console.log("Engine started."); } }; const carProto = Object.create(vehicleProto); carProto.drive = function() { console.log("Driving..."); }; const myCar2 = Object.create(carProto); myCar2.startEngine(); myCar2.drive(); ``` -------------------------------- ### Boolean Retrieval: Query Results Source: https://muspimerol.site/llms-full.txt Demonstrates the results of boolean queries on a given document collection, showing which documents are returned for specific AND, OR, and NOT combinations. ```text | Query | | Returned Documents | | --- | --- | | `schizophrenia AND drug` | Doc 1, Doc 2 | | `for AND NOT(drug OR approach)` | Doc 4 | ``` -------------------------------- ### Initialize UI Theme Mode Source: https://muspimerol.site/blog/eqongggr349ufs73 A JavaScript utility function that initializes the application's color mode (light/dark) and theme based on local storage or system preferences. It updates DOM class names, CSS color schemes, and meta theme-color tags accordingly. ```javascript (function setInitialMode({ defaultMode = "system", themeColors: themeColors2, darkClassNames: darkClassNames2 = ["dark"], lightClassNames: lightClassNames2 = [], defaultTheme = "", modeStorageKey: modeStorageKey2 = "mode-watcher-mode", themeStorageKey: themeStorageKey2 = "mode-watcher-theme" }) { const rootEl = document.documentElement; const mode = localStorage.getItem(modeStorageKey2) ?? defaultMode; const theme = localStorage.getItem(themeStorageKey2) ?? defaultTheme; const light = mode === "light" || mode === "system" && window.matchMedia("(prefers-color-scheme: light)").matches; if (light) { if (darkClassNames2.length) rootEl.classList.remove(...darkClassNames2.filter(Boolean)); if (lightClassNames2.length) rootEl.classList.add(...lightClassNames2.filter(Boolean)); } else { if (lightClassNames2.length) rootEl.classList.remove(...lightClassNames2.filter(Boolean)); if (darkClassNames2.length) rootEl.classList.add(...darkClassNames2.filter(Boolean)); } rootEl.style.colorScheme = light ? "light" : "dark"; if (themeColors2) { const themeMetaEl = document.querySelector('meta[name="theme-color"]'); if (themeMetaEl) { themeMetaEl.setAttribute("content", mode === "light" ? themeColors2.light : themeColors2.dark); } } if (theme) { rootEl.setAttribute("data-theme", theme); localStorage.setItem(themeStorageKey2, theme); } localStorage.setItem(modeStorageKey2, mode); })({ "defaultMode": "system", "darkClassNames": ["dark"], "lightClassNames": [], "defaultTheme": "", "modeStorageKey": "mode-watcher-mode", "themeStorageKey": "mode-watcher-theme" }); ``` -------------------------------- ### Style Sidebar and Outline Components Source: https://cdn.muspimerol.site/anti-dos-05-04 Defines layout and interaction styles for sidebar tabs, file nodes, and outline items. It includes specific selectors for hover states, active file indicators, and icon handling for folder expansion. ```css .info-panel-tab-border { border-radius: 100vw; } .active-tab-files #info-panel-tab-file, .active-tab-files #info-panel-tab-file:hover, .active-tab-outline #info-panel-tab-outline, .active-tab-outline #info-panel-tab-outline:hover, .ty-show-search #info-panel-tab-search { font-weight: var(--strong-font-weight); color: var(--strong-color); } .outline-item { display: flex; align-items: center; position: relative; padding-top: 0.4em; padding-bottom: 0.4em; } .file-node-icon.fa-folder::before { content: "\f114"; } .file-node-collapsed .fa-caret-right::before { content: "\f125"; font-family: Ionicons; font-size: 10px; } ```