diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml deleted file mode 100644 index 75fb024..0000000 --- a/.github/workflows/gh-pages.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Build and deploy Github pages -on: - push: - branches: - - main - paths: - - "docs/**" - - "gen-docs.ts" - - "crates/eww/src/widgets/widget_definitions.rs" - - "crates/eww/src/config/inbuilt.rs" - - ".github/workflows/**" -jobs: - build: - name: Build mdBook - runs-on: ubuntu-latest - steps: - # Checkout - - uses: actions/checkout@master - - # Build & deploy - - name: build mdBook page - uses: peaceiris/actions-mdbook@v1 - with: - mdbook-version: "0.4.8" - - run: mdbook build docs - - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/book/ diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 7585238..0000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -book diff --git a/docs/book.toml b/docs/book.toml deleted file mode 100644 index d2d69ba..0000000 --- a/docs/book.toml +++ /dev/null @@ -1,11 +0,0 @@ -[book] -authors = ["byson94"] -language = "en" -multilingual = false -src = "src" -title = "Ewii documentation" - -[output.html] -default-theme = "navy" -git-repository-url = "https://github.com/byson94/ewwii/tree/master/docs" -site-url = "/" \ No newline at end of file diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md deleted file mode 100644 index 183e524..0000000 --- a/docs/src/SUMMARY.md +++ /dev/null @@ -1,36 +0,0 @@ -# Summary - -[Introduction](introduction.md) - -- [Getting Started](getting_started.md) - - - [Installation](installation.md) - -- [Configuration & Syntax](config/config_and_syntax.md) - - - [Configuration](config/configuration.md) - - [Rendering and Best Practices](config/rendering_and_best_practices.md) - - [Fundamentals](config/config_fundamentals.md) - - [Variables](config/variables.md) - - [Expression Language](config/expression_language.md) - - -- [Theming & UI](theming/theming_and_ui.md) - - - [Working With GTK](theming/working_with_gtk.md) - - [Styling Widgets](theming/styling_widgets.md) - -- [Modules](modules/modules.md) - -- [Widgets](widgets/widgets.md) - - - [Widgets & Parameters](widgets/widgets_and_params.md) - - [Widget Properties](widgets/props.md) - -- [Examples](examples/examples.md) - - - [Common Layouts](examples/common_layouts.md) - - [Interactive Widgets](examples/interactive.md) - - [Theming Tricks](examples/theming.md) - -- [Troubleshooting](troubleshooting.md) diff --git a/docs/src/config/config_and_syntax.md b/docs/src/config/config_and_syntax.md deleted file mode 100644 index fad97db..0000000 --- a/docs/src/config/config_and_syntax.md +++ /dev/null @@ -1,14 +0,0 @@ -# Configuration & Syntax - -This section introduces the foundational systems that define how you configure your UI, express logic, and work with dynamic data in Rahi (Ewwii's configuration language). - -The configuration model is imparative by nature but will be used in a declarative format that is made to make configuring ewwii easy as well as to provide a logical way of configuring. You'll also work with special built in functions and modules that expose live system state and other information. - -We'll cover: - -- The structure of configuration files -- Embedding expressions within properties and attributes -- Accessing and using built-in variables -- Interpolation, scoping, and reactivity rules - -> If you're coming from EWW's Yuck, expect similarities in structure but with much more flexibility and logical programming. diff --git a/docs/src/config/config_fundamentals.md b/docs/src/config/config_fundamentals.md deleted file mode 100644 index ec71414..0000000 --- a/docs/src/config/config_fundamentals.md +++ /dev/null @@ -1,119 +0,0 @@ -# Fundamentals - -Ewwii uses Rhai as its configuration language. But instead of just pure Rhai, ewwii has its own layout that users should follow to create widgets using Rhai. And you may be wondering why ewwii has a "custom" layout instead of allowing users to just use pure Rhai. It's good question and the reason why ewwii has a custom layout is because it tries to remove unnecessary complexity. - -The full reasons for this layout wont be explained much more because it goes way deeper than just "decreasing complexity". - -For more information about Rhai, you can read [their documentation](https://rhai.rs/book/). - -## Widgets and their parameters - -Each widget in ewwii is a function (e.g: `button(#{...})` is a function call to create a button). So each one requires its own parameters. - -For example, `defwindow` expects a **String**, **Properties**, and a function call that **returns a widget.** - -**Example:** - -```rust,ignore -enter([ - // the string here (the text in "") is the name of the window - // the content in #{} is the properties - // and the 3rd `root_widget()` call is the function that returns a child. - - // defwindow cant have children in [] directly, but it expects a function returning it for it. - defwindow("example", #{ - monitor: 0, - windowtype: "dock", - stacking: "fg", - wm_ignore: false, - geometry: #{ - x: "0%", - y: "2px", - width: "90%", - height: "30px", - anchor: "top center" - }, - reserve: #{ distance: "40px" side: "top" } - }, root_widget()) -]) -``` - -This is not that complex once you know the parameters of defwindow as most of the other widgets only take in properties or optinally children. **Poll/Listen** are the only things that is similar to `defwindow` and you will learn about it later in the [variables chapter](./variables.md). - -## The root - -It is an important concept that users must know to go forward with this documentaiton. Ewwii's Rhai layout is made to be **logical and powerful**, so the user is given access the root of the entire widget system. - -The root is defined as `enter()` and it is where you should write `defwindow`. - -Here is an example: - -```rust,ignore -enter([ - defwindow("example", #{ - monitor: 0, - windowtype: "dock", - stacking: "fg", - wm_ignore: false, - geometry: #{ - x: "0%", - y: "2px", - width: "90%", - height: "30px", - anchor: "top center" - }, - reserve: #{ distance: "40px" side: "top" } - }, root_widget()) -]) -``` - -Now that you saw this example, you may be wondering why we are doing `enter([])` instead of `enter()`. That is due to another fundamental concept in ewwii which is very important. You will learn about it in the [properties and child definition section](#properties-and-child-definition). - -## Semi-colons - -Semi-colon is an important character in Rhai. Just like programming languages like JavaScript, Java, Rust etc. - -You can use the following link to read about semi-colons in the Rhai book as they have an awesome documentation. - -[https://rhai.rs/book/ref/statements.html#statements](https://rhai.rs/book/ref/statements.html#statements) - -## Properties and child definition - -The part where most people get confused is the use of `[]` and `#{}`. Let's get into what those are and how you can use them. - -The `[]` is used for adding **children** to a widget. - -**Example:** - -```rust,ignore -fn greeter(foo) { - return box(#{ - orientation: "horizontal", - halign: "center" - }, [ - // the `[]` holds a button which is the child widget of the box widget - // each element in a `[]` should end in a comma (,) instead of a semi-colon (;). - button(#{ onclick: `notify-send '${foo}'`, label: "baz" }), - label(#{ text: "example" }), - ]); -}; -``` - -The `#{}` works similar to the `[]` but, it is used to add properties into the widget. - -**Example:** - -```rust,ignore -fn greeter(foo) { - // the `#{}` holds the properties of the box widget - // each element in a `#{}` should end in a comma (,) instead of a semi-colon (;). - return box(#{ - orientation: "horizontal", - halign: "center" - }, [ - // properties are assigned to both button and label using the #{}. - button(#{ onclick: `notify-send '${foo}'`, label: "baz" }), - label(#{ text: "example" }), - ]); -}; -``` diff --git a/docs/src/config/configuration.md b/docs/src/config/configuration.md deleted file mode 100644 index 65d8c63..0000000 --- a/docs/src/config/configuration.md +++ /dev/null @@ -1,139 +0,0 @@ -# Writing your ewwii configuration - -(For a list of all built-in widgets (i.e. `box`, `label`, `button`), see [Widget Documentation](../widgets/widgets.md).)\ -Ewwii is configured using its own language called `rhai`. -Using rhai, you declare the structure and content of your widgets, the geometry, position, and behavior of any windows, -as well as any state and data that will be used in your widgets. -Rhai is based around imparative syntax, which you may know from programming languages like C, Rust etc. -If you're using vim, you can make use of [vim-rhai](https://github.com/rhaiscript/vim-rhai) for editor support. -If you're using VSCode, you can get syntax highlighting and formatting from [vscode-rhai](https://marketplace.visualstudio.com/items?itemName=rhaiscript.vscode-rhai). - -Additionally, any styles are defined in CSS or SCSS (which is mostly just slightly improved CSS syntax). -While ewwii supports a significant portion of the CSS you know from the web, -not everything is supported, as ewwii relies on GTK's own CSS engine. -Notably, some animation features are unsupported, -as well as most layout-related CSS properties such as flexbox, `float`, absolute position or `width`/`height`. - -To get started, you'll need to create two files: `ewwii.rhai` and `ewwii.scss` (or `ewwii.css`, if you prefer). -These files must be placed under `$XDG_CONFIG_HOME/ewwii` (this is most likely `~/.config/ewwii`). - -Now that those files are created, you can start writing your first widget! - -## Creating your first window - -Firstly, you will need to create a top-level window. Here, you configure things such as the name, position, geometry, and content of your window. - -Let's look at an example window definition: - -```rust,ignore -enter([ // Add all defwindow inside enter. Enter is the root of the config. - defwindow("example", #{ - monitor: 0, - windowtype: "dock", - stacking: "fg", - wm_ignore: false, - geometry: #{ - x: "0%", - y: "2px", - width: "90%", - height: "30px", - anchor: "top center" - }, - reserve: #{ distance: "40px" side: "top" } - }, label(#{ text: "example content" })) -]) -``` - -Here, we are defining a window named `example`, which we then define a set of properties for. Additionally, we set the content of the window to be the text `"example content"`. - -You can now open your first window by running `eww open example`! Glorious! - -### `defwindow`-properties - -| Property | Description | -| ---------: | ------------------------------------------------------------------------ | -| `monitor` | Which monitor this window should be displayed on. See below for details. | -| `geometry` | Geometry of the window. | - -**`monitor`-property** - -This field can be: - -- the string ``, in which case ewwii tries to identify the primary display (which may fail, especially on wayland) -- an integer, declaring the monitor index -- the name of the monitor -- a string containing a JSON-array of monitor matchers, such as: `'["", "HDMI-A-1", "PHL 345B1C", 0]'`. Ewwii will try to find a match in order, allowing you to specify fallbacks. - -**`geometry`-properties** - -| Property | Description | -| ----------------: | ----------------------------------------------------------------------------------------------------------------------- | -| `x`, `y` | Position of the window. Values may be provided in `px` or `%`. Will be relative to `anchor`. | -| `width`, `height` | Width and height of the window. Values may be provided in `px` or `%`. | -| `anchor` | Anchor-point of the window. Either `center` or combinations of `top`, `center`, `bottom` and `left`, `center`, `right`. | - -
-Depending on if you are using X11 or Wayland, some additional properties exist: - -#### X11 - -| Property | Description | -| -----------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `stacking` | Where the window should appear in the stack. Possible values: `fg`, `bg`. | -| `wm_ignore` | Whether the window manager should ignore this window. This is useful for dashboard-style widgets that don't need to interact with other windows at all. Note that this makes some of the other properties not have any effect. Either `true` or `false`. | -| `reserve` | Specify how the window manager should make space for your window. This is useful for bars, which should not overlap any other windows. | -| `windowtype` | Specify what type of window this is. This will be used by your window manager to determine how it should handle your window. Possible values: `normal`, `dock`, `toolbar`, `dialog`, `desktop`. Default: `dock` if `reserve` is specified, `normal` otherwise. | - -#### Wayland - -| Property | Description | -| ----------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `stacking` | Where the window should appear in the stack. Possible values: `fg`, `bg`, `overlay`, `bottom`. | -| `exclusive` | Whether the compositor should reserve space for the window automatically. Either `true` or `false`. If `true` `:anchor` has to include `center`. | -| `focusable` | Whether the window should be able to be focused. This is necessary for any widgets that use the keyboard to work. Possible values: `none`, `exclusive` and `ondemand`. | -| `namespace` | Set the wayland layersurface namespace ewwii uses. Accepts a `string` value. | - -## Your first widget - -While our bar is already looking great, it's a bit boring. Thus, let's add some actual content! - -```rust,ignore -fn greeter(name) { - return box(#{ - orientation: "horizontal", - halign: "center" - }, [ - button(#{ onclick: `notify-send 'Hello' 'Hello, ${name}'`, label: "Greet" }) - ]); -}; -``` - -To show this, let's replace the text in our window definition with a call to this new widget: - -```rust,ignore -enter([ - defwindow("example", #{ - // ... properties omitted - }, greeter("Bob")) -]) -``` - -There is a lot going on here, so let's step through this. - -We are creating a function named `greeter` and a function is equal to a component that returns a child (widget). So function has two uses: one to return a component, and the other to do a set of functions. -And this function takes one parameters, called `name`. The `name` parameter _must_ be provided or else, you should emit it. Rhai does allow adding optional parameters, but we will talk about it later for the sake of beginners who are in-experienced with imprative programming languages. - -Now inside the function, we declare the body of our widget that we are returning. We make use of a `box`, which we set a couple properties of. - -We need this `box`, as a function can only ever contain a single widget - otherwise, -ewwii would not know if it should align them vertically or horizontally, how it should space them, and so on. -Thus, we wrap multiple children in a `box`. -This box then contains a button. -In that button's `onclick` property, we refer to the provided `name` using string-interpolation syntax: `` `${name}` ``. It is not possible to use a variable within a `""` or `''` just like javascript. You can learn more about it [here](https://rhai.rs/book/ref/strings-chars.html?interpolation#string-interpolation). - - - - -To then use our widget, we call the function that provides the widget with the necessary parameters passed. - -As you may have noticed, we are using a couple predefined widgets here. These are all listed and explained in the [widgets chapter](widgets.md). diff --git a/docs/src/config/expression_language.md b/docs/src/config/expression_language.md deleted file mode 100644 index 911e499..0000000 --- a/docs/src/config/expression_language.md +++ /dev/null @@ -1,87 +0,0 @@ -# The Rhai Expression Engine - -Ewwii uses [Rhai](https://rhai.rs/) as its core expression and scripting engine. This means your configuration is more than just static values or simple substitutions—it’s **real code**, and you can use it anywhere dynamic behavior is needed. - -Rhai expressions can: - -- Perform logic and branching (`if`, `match`, `? :`) -- Handle mathematical calculations and string operations -- Access nested data from arrays, maps, or JSON -- Run custom functions -- Be used directly in layout definitions, widget attributes, and style rules - -Unlike Yuck, where expressions were embedded in `{ ... }` or `${ ... }`, Rhai treats expressions as **native**. They don’t need to be wrapped in special delimiters. If you can write it in Rhai, it just works. - -## Example - -```rust,ignore -let value = 12 + foo * 10; - -box(#{ - class: "baz" - orientation: "h", -}, [ - button(#{ - class: button_active ? "active" : "inactive", - on_click: "toggle_thing", - label: `Some math: ${value}`, - }), -]); -``` - -## Core Features - -Rhai supports a wide range of expression capabilities: - -- **Mathematics**: `+`, `-`, `*`, `/`, `%` -- **Comparisons**: `==`, `!=`, `<`, `>`, `<=`, `>=` -- **Boolean logic**: `&&`, `||`, `!` -- **Conditionals**: `if/else`, ternary (`cond ? a : b`) -- **Regex matching**: `=~` operator (Rust-style regex) -- **Optional access**: `?.` and `?.[index]` -- **Data structures**: maps/arrays (`obj.field`, `arr[3]`, `map["key"]`) -- **Function calls**: standard and Ewwii-specific built-ins (see below) -- **String interpolation**: `` `Value is ${value}` `` (standard Rhai feature) - -> Note -> -> --- -> -> Rhai only allows string interpolation only for the strings that are quoted in `` similar to JavaScript. -> -> > Learn more about it [here](https://rhai.rs/book/ref/strings-chars.html?interpolation#string-interpolation). - -## Common Built-in Functions - -💡 _You may recognize some of these from the old expression system—but now they're just Rhai functions._ - -Examples include: - -- `round()`, `floor()`, `ceil()`, `powi()`, `powf()` -- `min()`, `max()`, `sin()`, `cos()`, etc. -- `replace()`, `matches()`, `captures()` -- `strlength()`, `arraylength()`, `objectlength()` -- `jq()` – run jaq-compatible filters on JSON data -- `get_env()` – read environment variables -- `formattime()` – format UNIX timestamps -- `formatbytes()` – format file sizes (IEC or SI) - -## Dynamic Usage - -Because expressions are just Rhai, you can now write real logic inline or break it into reusable functions: - -```rust,ignore -fn status_text(active) { - return active ? "enabled" : "disabled"; -} - -label({ - text: `Status: ${status_text(system_active)}` -}); -``` - ---- - -### TL;DR - -> If you’ve used scripting languages like JavaScript or Lua, you’ll feel at home. Rhai gives you real control—not just interpolation tricks. diff --git a/docs/src/config/rendering_and_best_practices.md b/docs/src/config/rendering_and_best_practices.md deleted file mode 100644 index 3658cd1..0000000 --- a/docs/src/config/rendering_and_best_practices.md +++ /dev/null @@ -1,133 +0,0 @@ -# Rendering and Best Practices - -## Rendering children in your widgets - -As your configuration grows, you might want to improve its structure by factoring out pieces into reusable functions. - -In Ewwii’s Rhai-based configuration system, you can define wrapper functions that return widgets and accept a `children` parameter (or any parameter that you prefer), just like built-in widgets such as `box()` or `button()`. - -Here's an example of a custom container that adds a label before its children: - -```rust,ignore -fn labeled_container(name, children = []) { - return box(#{ class: "container" }, [label(#{text: name})] + children) -} -``` - -You can call it like this: - -```rust,ignore -labeled_container("foo", [ - button(#{ onclick: "notify-send hey ho", label: "Click me" }) -]); -``` - -Because children are just a list of widgets, you can also write functions that structure them however you'd like. For example, here's a layout that places the first two children side by side: - -```rust,ignore -fn two_boxes(children = []) { - return box(#{}, [ - box(#{ class: "first" }, [children[0]]), - box(#{ class: "second" }, [children[1]]) - ]); -} -``` - -And call it like this: - -```rust,ignore -two_boxes([ - label(#{ text: "First" }), - label(#{ text: "Second" }) -]); -``` - -If a child is missing (e.g., children[1] doesn't exist), make sure to handle that gracefully or document the expected number of children. - - - - -## Window ID - -In some cases you may want to use the same window configuration for multiple widgets, e.g. for multiple windows. This is where arguments and ids come in. - -Firstly let us start off with ids. An id can be specified in the `open` command -with `--id`, by default the id will be set to the name of the window -configuration. These ids allow you to spawn multiple of the same windows. So -for example you can do: - -```bash -ewwii open my_bar --screen 0 --id primary -ewwii open my_bar --screen 1 --id secondary -``` - -## Generating a list of widgets from array using `for` - -If you want to display a list of values, you can use the `for`-Element to fill a container with a list of elements generated from a JSON-array. - -```rust,ignore -let my_array = [1, 2, 3]; - -// Then, inside your widget, you can use -box(#{}, [ - for entry in my_array { - button(#{ onclick: `notify-send 'click' 'button ${entry}'`, label: entry.to_string() }) - } -]) -``` - -This can be useful in many situations, for example when generating a workspace list from an array representation of your workspaces. -In many cases, this can be used instead of `literal`, and should most likely be preferred in those cases. - - - -## Splitting up your configuration - -As time passes, your configuration might grow larger and larger. Luckily, you can easily split up your configuration into multiple files! - -There are two options to achieve this: - -### Using `import/export` - -```rust,ignore -// in ./foo/baz.rhai -fn greet() { return "Greetings!" } -export greet; - -// in ./ewwii.rhai -import "foo/baz" as example; -print(example::greet()); // output: Greetings! -``` - -A rhai file may import the contents of any other rhai file that they export. For this, make use of the `import` directive. If you are exporting a variable/function, make use the `export` directive. - -### Using a separate ewwii configuration directory - -If you want to separate different widgets even further, you can create a new ewwii config folder anywhere else. -Then, you can tell ewwii to use that configuration directory by passing _every_ command the `--config /path/to/your/config/dir` flag. -Make sure to actually include this in all your `ewwii` calls, including `ewwii kill`, `eww logs`, etc. -This launches a separate instance of the ewwii daemon that has separate logs and state from your main ewwii configuration. - -```bash -ewwii --config "/path/to/your/config/dir" -``` diff --git a/docs/src/config/variables.md b/docs/src/config/variables.md deleted file mode 100644 index 81e4dec..0000000 --- a/docs/src/config/variables.md +++ /dev/null @@ -1,131 +0,0 @@ -# Variables - -Now that you feel sufficiently greeted by your bar, you may realize that showing data like the time and date might be even more useful than having a button that greets you. - -To implement dynamic content in your widgets, you make use of _variables_. - -All variables are only locally available so you would need to pass it around using function parameters. And whenever the variable changes, the value in the widget will update! - -## Static variables - -In Rhai, all variables are dynamically typed bindings to values. You can define variables using let, pass them as function parameters. - -**Basic variables (`let`)** - -```rust,ignore -let foo = "value"; -``` - -This is the simplest type of variable. -Basic variables don't ever change automatically, if you need a dynamic variable, you can use built in functions like `poll()` and `listen()` to register dynamic values which we will talk about in the following section. - -## Dynamic variables - -Just having static variables that wont update is pretty limiting. So, ewwii has two built in functions to register dynamic variables that can change according to the command. - -**Polling variables (`poll`)** - -```rust,ignore -poll("var_name", #{ - // It is recommended to have initial property passed. - // If not provided, it will default to no value which may cause problems when used. - // You can pass something like "" if you want no initial value. - initial: "inital value", - interval: "2s", - cmd: "date +%H:%M:%S", // command to execute -}) -``` - -A polling variable is a variable which runs a provided shell-script repeatedly, in a given interval. - -This may be the most commonly used type of variable. -They are useful to access any quickly retrieved value repeatedly, -and thus are the perfect choice for showing your time, date, as well as other bits of information such as pending package updates, weather, and battery level. -But it is important to note that these variables are locally available only in enter (a.k.a the root) and you need to pass it to other functions with something like `some_fn(foo)` when you want to use a polled variable. - - - -To externally update a polling variable, `ewwii update` can be used like with basic variables to assign a value. - -**Listening variables (`listen`)** - -```rust,ignore -listen("foo", #{ - initial: "whatever", - cmd: "tail -F /tmp/some_file", -}) -``` - -Listening variables might be the most confusing of the bunch. -A listening variable runs a script once, and reads its output continously. -Whenever the script outputs a new line, the value will be updated to that new line. -In the example given above, the value of `foo` will start out as `"whatever"`, and will change whenever a new line is appended to `/tmp/some_file`. - -These are particularly useful when you want to apply changes instantaneously when an operation happens if you have a script -that can monitor some value on its own. Volume, brightness, workspaces that get added/removed at runtime, -monitoring currently focused desktop/tag, etc. are the most common usecases of this type of variable. -These are particularly efficient and should be preffered if possible. - -For example, the command `xprop -spy -root _NET_CURRENT_DESKTOP` writes the currently focused desktop whenever it changes. -Another example usecase is monitoring the currently playing song with playerctl: `playerctl --follow metadata --format {{title}}`. - - - -## Passing variables - -As we discussed earlier, all variables are only available locally. So, you would need to pass it around from the current scope. - -Here is an example of how it is done: - -```rust,ignore -let foo = "example"; - -poll("time", #{ - initial: "inital value", - interval: "2s", - cmd: "date +%H:%M:%S", -}) - -// Here we have 2 variables named "time" (registered dynamically by poll) and foo (a static variable) - -// here is an example of something that wont -fn wont_work() { - return box(#{}, [ label(#{ text: time }), label(#{ text: foo }) ]); -} -``` - -## dyn_id - -`dyn_id`'s are one of the most important properties of all. It is the property that decides if a widget should get updated dynamic or not. - -`dyn_id` property is used to assign an id to a widget which the system will track to update if there is a change in property under the same id. - -**Example usage:** - -```rust,ignore -fn foo(foo_var) { - return box(#{}, [ - label(#{ text: foo_var, dyn_id: "foo_var_user" }); // dyn_id used to make label dynamic - ]); -} - -enter([ - defpoll("foo", #{ - cmd: "echo baz", - initial: "", - interval: "1s" - }), - defwindow("bar", #{ - // .. properties omitted - }, bar(foo)), -]) -``` - -Here, when the variable foo changes, the text of label changes as well. If there is no `dyn_id` defined, then ewwii will ingore that change. But if it is defined with a unique value, then it will find the widget that is defined with the id that matches dyn_id and then update its text property which will result in a change in the UI. diff --git a/docs/src/examples.md b/docs/src/examples.md deleted file mode 100644 index cc9bbc7..0000000 --- a/docs/src/examples.md +++ /dev/null @@ -1,13 +0,0 @@ -# Examples - -This section provides hands-on, practical demonstrations of everything covered so far. Real layouts, interactive components, and theming techniques will be used in these examples. - -Each example is minimal but complete, focusing on a particular design pattern or technique. You can copy-paste them into your own config to experiment. - -Included: - -- Common layout patterns (e.g., bars, panels, dashboards) -- Interactive elements like buttons, sliders, toggles -- Theming techniques and tricks to override or enhance GTK styles - -If you're stuck or just looking for inspiration, this is your go-to reference. diff --git a/docs/src/examples/common_layouts.md b/docs/src/examples/common_layouts.md deleted file mode 100644 index 83dc4a5..0000000 --- a/docs/src/examples/common_layouts.md +++ /dev/null @@ -1 +0,0 @@ -# Common Layouts diff --git a/docs/src/examples/examples.md b/docs/src/examples/examples.md deleted file mode 100644 index df635b4..0000000 --- a/docs/src/examples/examples.md +++ /dev/null @@ -1 +0,0 @@ -# Examples diff --git a/docs/src/examples/interactive.md b/docs/src/examples/interactive.md deleted file mode 100644 index 69fe2e8..0000000 --- a/docs/src/examples/interactive.md +++ /dev/null @@ -1 +0,0 @@ -# Interactive Widgets diff --git a/docs/src/examples/theming.md b/docs/src/examples/theming.md deleted file mode 100644 index 11f0493..0000000 --- a/docs/src/examples/theming.md +++ /dev/null @@ -1 +0,0 @@ -# Theming Tricks diff --git a/docs/src/getting_started.md b/docs/src/getting_started.md deleted file mode 100644 index 718eda5..0000000 --- a/docs/src/getting_started.md +++ /dev/null @@ -1,3 +0,0 @@ -# Getting Started - -Getting starting with Ewwii. This section will cover how you can install and use ewwii. diff --git a/docs/src/installation.md b/docs/src/installation.md deleted file mode 100644 index 7ee615e..0000000 --- a/docs/src/installation.md +++ /dev/null @@ -1,90 +0,0 @@ -# Installation - -The first step of using Ewwii is installing it. You would need to have the following prerequesties installed on your system to build/install ewwii. - -**Prerequesties:** - -- rustc -- cargo - -Rather than with your system package manager, -I **strongly** recommend installing it using [rustup](https://rustup.rs/). - -Additionally, eww requires some dynamic libraries to be available on your system. -The exact names of the packages that provide these may differ depending on your distribution. -The following list of package names should work for arch linux: - -
-Packages (click here) - -- gtk3 (libgdk-3, libgtk-3) -- gtk-layer-shell (only on Wayland) -- pango (libpango) -- gdk-pixbuf2 (libgdk_pixbuf-2) -- libdbusmenu-gtk3 -- cairo (libcairo, libcairo-gobject) -- glib2 (libgio, libglib-2, libgobject-2) -- gcc-libs (libgcc) -- glibc - -
- -> **Note** that you will most likely need the -devel variants of your distro's packages to be able to compile ewwii. - -## Building - -Once you have the prerequisites ready, you're ready to install and build ewwii. - -First clone the repo: - -```bash -git clone https://github.com/byson94/ewwii -``` - -```bash -cd ewwii -``` - -Then build: - -```bash -cargo build --release --no-default-features --features x11 -``` - -**NOTE:** -When you're on Wayland, build with: - -```bash -cargo build --release --no-default-features --features=wayland -``` - -## Running ewwii - -Once you've built it you can now run it by entering: - -```bash -cd target/release -``` - -Then make the Eww binary executable: - -```bash -chmod +x ./ewwii -``` - -Then to run it, enter: - -```bash -./ewwii daemon -./ewwii open -``` - -## Installing via package managers - -If you don't want to go through the _very_ tedious task of cloning and building ewwii, you can install it using Cargo (Rust crate manager). - -You can run the following command to install ewwii from cargo: - -```bash -cargo install --git https://github.com/byson94/ewwii -``` diff --git a/docs/src/introduction.md b/docs/src/introduction.md deleted file mode 100644 index 8d52e27..0000000 --- a/docs/src/introduction.md +++ /dev/null @@ -1,26 +0,0 @@ -# Ewwii - Widgets for everyone made better! - -Ewwii (ElKowar's Wacky Widgets improved interface) is a foork of -Eww (ElKowar's Wacky Widgets) which is a -widget system made in [Rust](https://www.rust-lang.org/), -which lets you create your own widgets similarly to how you can in AwesomeWM. - -**Strength of Ewwii over Eww:** - -- Full-fledged scripting & expressions -- User-defined widget trees & composition -- Built-in configuration libraries -- Builtin tooling for better developer experience -- Full control over reactive updates (user defines if widget should update dynamically) - -Ewwii is configured in [Rhai](https://rhai.rs/) -and themed using [CSS](https://en.wikipedia.org/wiki/CSS) -or [SCSS](), -it is easy to customize and is powerful and dynamic. -The main goal of Ewwii is to make configuration easy -and to give the user all the power that they need. - -Rhai is not just a basic markup language. It is a full embeddable scripting language! -This makes ewwii's configuration even more flexible and powerful. - -Whether you're building a tiling-friendly status bar, a floating dashboard, or a themed control panel, Ewwii gives you the tools to design it, script it, and make it your own. diff --git a/docs/src/magic-vars.md b/docs/src/magic-vars.md deleted file mode 100644 index aed7637..0000000 --- a/docs/src/magic-vars.md +++ /dev/null @@ -1,6 +0,0 @@ -# Magic variables - -These are variables that are always there, without you having to import them. - -The delay between all the updating variables except `EWW_TIME` is 2s, for `EWW_TIME` it is 1s. - diff --git a/docs/src/modules/modules.md b/docs/src/modules/modules.md deleted file mode 100644 index 67e889b..0000000 --- a/docs/src/modules/modules.md +++ /dev/null @@ -1,94 +0,0 @@ -# Modules - -Modules undoubtedly are one of the most powerful features in Rhai. They provide infinite extensibility to ewwii. - -Every module follows the syntax: - -```rust,ignore -import "std::env" as env; -let home = env::get_home_dir(); -``` - -This allows you to write expressive, modular Rhai code with functions grouped logically under `std` or custom namespaces. - -## `std::env` - -The `std::env` module provides access to common system-level environment queries. It is supported on Unix-based systems (Linux, macOS). - -### Usage - -```rust,ignore -import "std::env" as env; - -// Get an environment variable, or fallback to a default -let shell = env::get_env("SHELL") ?? "unknown"; - -// Set an environment variable (current process only) -env::set_env("DEBUG_MODE", "true"); - -// Get the user's home directory -let home = env::get_home_dir() ?? "/home/user"; - -// Get the current working directory -let cwd = env::get_current_dir() ?? "/"; - -// Get the current username -let user = env::get_username() ?? "nobody"; -``` - -### Functions - -| Function | Description | -| ----------------- | ------------------------------------------------------- | -| `get_env` | Gets an environment variable's value | -| `set_env` | Sets an environment variable (current process only) | -| `get_home_dir` | Returns the current user's home directory path if found | -| `get_current_dir` | Returns the current working directory | -| `get_username` | Gets the current user's username from `$USER` | - -## `std::text` - -The `std::text` module provides access to more string manipulation that Rhai lacks. - -### Usage - -```rust,ignore -import "std::text" as text; - -// Convert a string to a URL-friendly slug -let slug = text::to_slug("Ewwii is cool!"); // output: "ewwii-is-cool" - -// Convert a string to camelCase -let camel = text::to_camel_case("my cool project"); // output: "myCoolProject" - -// Truncate a string to N characters (without splitting in the middle of a character) -let short = text::truncate_chars("hello world", 5); // output: "hello" - -// Convert a string to uppercase -let upper = text::to_upper("hello"); // output: "HELLO" - -// Convert a string to lowercase -let lower = text::to_lower("HELLO"); // output: "hello" -``` - -### Functions - -| Function | Description | -| ---------------- | ---------------------------------------------------------------------- | -| `to_slug` | Converts a string into a lowercase, hyphen-separated slug | -| `to_camel_case` | Converts a string into camelCase, removing non-alphanumeric characters | -| `truncate_chars` | Truncates a string to a maximum number of characters (UTF-8 safe) | -| `to_upper` | Converts a string to uppercase | -| `to_lower` | Converts a string to lowercase | - -## Future Plans - -Other modules coming soon under `std`: - -- `std::fs` — Filesystem operations (e.g., `read_file`, `write_file`, `list_dir`) -- `std::path` — Path helpers (e.g., `join`, `basename`, `dirname`) -- `std::time` — Time utilities (e.g., `now`, `sleep`, `format_time`) -- `std::math` — Numeric functions (e.g., `clamp`, `lerp`, `map_range`) -- `std::color` — Color parsing and manipulation (e.g., `hex_to_rgb`, `blend`) - -You can easily extend or override these by adding `.rhai` modules in your config path. diff --git a/docs/src/theming/styling_widgets.md b/docs/src/theming/styling_widgets.md deleted file mode 100644 index ea7f7a0..0000000 --- a/docs/src/theming/styling_widgets.md +++ /dev/null @@ -1,15 +0,0 @@ -# Styling Widgets - -Ewwii also allows writing inline styles to widgets using the `style` property. These styles are then applied at runtime using GTK's CSS system. - -**Example:** - -```rust,ignore -fn foo() { - return box(#{ - style: "color: black; background-color: #fff;", - }, [ label(#{ text: "baz" }) ]); -} -``` - -> This example makes the text color of all child widgets of box to black and sets the background color of the box to white (`#fff` is the hexadecimal for white). diff --git a/docs/src/theming/theming_and_ui.md b/docs/src/theming/theming_and_ui.md deleted file mode 100644 index f78a995..0000000 --- a/docs/src/theming/theming_and_ui.md +++ /dev/null @@ -1,11 +0,0 @@ -# Theming & UI - -This section focuses on visual styling and user interface customization. The core visual layer is built atop GTK, allowing deep integration with system themes while also enabling custom overrides through SCSS-style syntax. - -We'll explore: - -- How GTK theming works under the hood -- Styling your widgets using theme classes and custom CSS -- Layout implications of theme decisions (e.g., spacing, margins, z-order) - -Whether you're trying to match your system's look or building a highly customized UI, this section gives you the tools to style confidently. diff --git a/docs/src/theming/working_with_gtk.md b/docs/src/theming/working_with_gtk.md deleted file mode 100644 index b6e4874..0000000 --- a/docs/src/theming/working_with_gtk.md +++ /dev/null @@ -1,27 +0,0 @@ -# Working with GTK - -## Gtk Theming - -Ewwii is styled in GTK CSS. -You can use `Vanilla CSS` or `SCSS` to make theming even easier. The latter is compiled into CSS for you. -If you don't know any way to style something check out the [GTK CSS Overview wiki](https://docs.gtk.org/gtk3/css-overview.html), -the [GTK CSS Properties Overview wiki ](https://docs.gtk.org/gtk3/css-properties.html), -or use the [GTK-Debugger](#gtk-debugger). - -If you have **NO** clue about how to do CSS, check out some online guides or tutorials. - -SCSS is _very_ close to CSS, so if you know CSS you'll have no problem learning SCSS. - -## GTK Debugger - -The debugger can be used for **a lot** of things, especially if something doesn't work or isn't styled right. - -To open the GTK debugger, simply run - -```bash -eww inspector -``` - -If a style or something similar doesn't work, you can click on the icon in the top left to select the thing that isn't being styled correctly. - -Then you can click on the drop down menu in the top right corner and select CSS Nodes. Here you will see everything about styling it, CSS Properties, and how it's structured. diff --git a/docs/src/troubleshooting.md b/docs/src/troubleshooting.md deleted file mode 100644 index 83f1df2..0000000 --- a/docs/src/troubleshooting.md +++ /dev/null @@ -1,35 +0,0 @@ -# Troubleshooting - -Here you will find help if something doesn't work. If the issue isn't listed here, please [open an issue on the GitHub repo.](https://github.com/byson94/ewwii/issues) - -## Ewwii does not compile - -1. Make sure that you are compiling ewwii using a recent version of rust (run `rustup update` to be sure you have the latest version available) -2. Make sure you have all the necessary dependencies. If there are compile-errors, the compiler will tell you what you're missing. - -## Ewwii does not work on Wayland - -1. Make sure you compiled ewwii with the `--no-default-features --features=wayland` flags. -2. Make sure that you're not trying to use X11-specific features (these are (hopefully) explicitly specified as such in the documentation). - -## My configuration is not loaded correctly - -1. Make sure the `ewwii.rhai` and `ewwii.(s)css` files are in the correct places. -2. Sometimes, ewwii might fail to load your configuration as a result of a configuration error. Make sure your configuration is valid. - -## Something isn't styled correctly! - -Check the [GTK-Debugger](working_with_gtk.md#gtk-debugger) to get more insight into what styles GTK is applying to which elements. - -## General issues - -You should try the following things before opening an issue or doing more specialized troubleshooting: - -- Kill the ewwii daemon by running `ewwii kill` and re-open your window with the `--debug`-flag to get additional log output. -- Now you can take a look at the logs by running `ewwii logs`. -- Use `ewwii state` to see the state of all variables. -- Use `ewwii debug` to see the structure of your widget and other information. -- Update to the latest ewwii version. -- Sometimes hot reloading doesn't work. In that case, you can make use of `ewwii reload` manually. - -Remember, if your issue isn't listed here, [open an issue on the GitHub repo](https://github.com/byson94/ewwii/issues). diff --git a/docs/src/widgets/props.md b/docs/src/widgets/props.md deleted file mode 100644 index 44ff04f..0000000 --- a/docs/src/widgets/props.md +++ /dev/null @@ -1,251 +0,0 @@ -# Widget Properties - -## widget - -These properties apply to all widgets, and can be used anywhere! - -**Properties** - -- `class`: `string` css class name -- `valign`: `string` how to align this vertically. possible values: "fill", "baseline", "center", "start", "end" -- `halign`: `string` how to align this horizontally. possible values: "fill", "baseline", "center", "start", "end" -- `vexpand`: `bool` should this container expand vertically. Default: false -- `hexpand`: `bool` should this widget expand horizontally. Default: false -- `width`: `int` width of this element -- `height`: `int` height of this element -- `active`: `bool` If this widget can be interacted with -- `tooltip`: `string` tooltip text (on hover) -- `visible`: `bool` visibility of the widget -- `style`: `string` inline scss style applied to the widget -- `css`: `string` scss code applied to the widget - -## combo-box-text - -**Properties** - -- `items`: `vec` Items displayed in the combo box -- `timeout`: `duration` timeout of the command. Default: "200ms" -- `onchange`: `string` runs when an item is selected, replacing `{}` with the item - -## expander - -**Properties** - -- `name`: `string` name of the expander -- `expanded`: `bool` sets whether it's expanded - -## revealer - -**Properties** - -- `transition`: `string` animation name ("slideright", "slideleft", etc.) -- `reveal`: `bool` whether the child is revealed -- `duration`: `duration` how long the transition lasts. Default: "500ms" - -## checkbox - -**Properties** - -- `checked`: `bool` initial checked state -- `timeout`: `duration` command timeout. Default: "200ms" -- `onchecked`: `string` command when checked -- `onunchecked`: `string` command when unchecked - -## color-button - -**Properties** - -- `use-alpha`: `bool` use alpha channel -- `onchange`: `string` command on color select -- `timeout`: `duration` Default: "200ms" - -## color-chooser - -**Properties** - -- `use-alpha`: `bool` use alpha channel -- `onchange`: `string` command on color select -- `timeout`: `duration` Default: "200ms" - -## slider - -**Properties** - -- `flipped`: `bool` reverse direction -- `marks`: `string` draw marks -- `draw-value`: `bool` show value -- `value-pos`: `string` where to show value ("left", "right", etc.) -- `round-digits`: `int` number of decimal places -- `value`: `float` current value -- `min`: `float` minimum value -- `max`: `float` maximum value -- `timeout`: `duration` Default: "200ms" -- `onchange`: `string` command on change (use `{}` for value) -- `orientation`: `string` layout direction - -## progress - -**Properties** - -- `flipped`: `bool` reverse direction -- `value`: `float` progress (0–100) -- `orientation`: `string` layout direction - -## input - -**Properties** - -- `value`: `string` current text -- `onchange`: `string` command on change -- `timeout`: `duration` Default: "200ms" -- `onaccept`: `string` command on Enter -- `password`: `bool` obscure input - -## button - -**Properties** - -- `timeout`: `duration` Default: "200ms" -- `onclick`: `string` command on activation -- `onmiddleclick`: `string` command on middle click -- `onrightclick`: `string` command on right click - -## image - -**Properties** - -- `path`: `string` image file path -- `image-width`: `int` image width -- `image-height`: `int` image height -- `preserve-aspect-ratio`: `bool` keep aspect ratio -- `fill-svg`: `string` fill color for SVGs -- `icon`: `string` theme icon name -- `icon-size`: `string` size of the icon - -## box - -**Properties** - -- `spacing`: `int` spacing between children -- `orientation`: `string` direction of children -- `space-evenly`: `bool` distribute children evenly - -## overlay - -**Properties** - -_None_ - -## tooltip - -**Properties** - -_None listed_ - -## centerbox - -**Properties** - -- `orientation`: `string` direction of layout - -## scroll - -**Properties** - -- `hscroll`: `bool` allow horizontal scrolling -- `vscroll`: `bool` allow vertical scrolling - -## eventbox - -**Properties** - -- `timeout`: `duration` Default: "200ms" -- `onscroll`: `string` command on scroll (`{}` becomes direction) -- `onhover`: `string` command on hover -- `onhoverlost`: `string` command on hover exit -- `cursor`: `string` cursor type -- `ondropped`: `string` command on drop (`{}` is URI) -- `dragvalue`: `string` URI to drag from this widget -- `dragtype`: `string` type to drag ("file", "text") -- `onclick`: `string` command on click -- `onmiddleclick`: `string` command on middle click -- `onrightclick`: `string` command on right click - -## label - -**Properties** - -- `text`: `string` text to display -- `truncate`: `bool` truncate text -- `limit-width`: `int` max characters to show -- `truncate-left`: `bool` truncate beginning -- `show-truncated`: `bool` show truncation -- `unindent`: `bool` strip leading spaces -- `markup`: `string` Pango markup -- `wrap`: `bool` wrap text -- `angle`: `float` rotation angle -- `gravity`: `string` text gravity -- `xalign`: `float` horizontal alignment -- `yalign`: `float` vertical alignment -- `justify`: `string` text justification -- `wrap-mode`: `string` wrap mode ("word", "char", etc.) -- `lines`: `int` max lines (−1 = unlimited) - -## literal - -**Properties** - -- `content`: `string` raw yuck - -## calendar - -**Properties** - -- `day`: `float` selected day -- `month`: `float` selected month -- `year`: `float` selected year -- `show-details`: `bool` show details -- `show-heading`: `bool` show heading -- `show-day-names`: `bool` show day names -- `show-week-numbers`: `bool` show week numbers -- `onclick`: `string` command with `{0}`, `{1}`, `{2}` for day/month/year -- `timeout`: `duration` Default: "200ms" - -## stack - -**Properties** - -- `selected`: `int` child index -- `transition`: `string` animation name -- `same-size`: `bool` equal child size - -## transform - -**Properties** - -- `rotate`: `float` rotation angle -- `transform-origin-x`: `string` transform origin x -- `transform-origin-y`: `string` transform origin y -- `translate-x`: `string` shift x -- `translate-y`: `string` shift y -- `scale-x`: `string` scale x -- `scale-y`: `string` scale y - -## circular-progress - -**Properties** - -- `value`: `float` 0–100 progress -- `start-at`: `float` start percentage -- `thickness`: `float` line thickness -- `clockwise`: `bool` direction - -## graph - -**Properties** - -- `value`: `float` current value -- `thickness`: `float` line thickness -- `time-range`: `duration` duration to track -- `min`: `float` minimum value -- `max`: `float` maximum value diff --git a/docs/src/widgets/widgets.md b/docs/src/widgets/widgets.md deleted file mode 100644 index bcc5d5a..0000000 --- a/docs/src/widgets/widgets.md +++ /dev/null @@ -1,12 +0,0 @@ -# Widgets - -Widgets are the building blocks of your interface. Each widget represents a visual element—text, images, containers, interactive components—that can be composed, styled, and updated dynamically. - -This section introduces: - -- The basic anatomy of a widget definition -- How widgets are laid out within windows -- The attributes and properties available to each widget type -- Patterns for building reusable or dynamic widget trees - -You’ll also learn how widget properties interact with the expression language and how reactivity is handled across updates. diff --git a/docs/src/widgets/widgets_and_params.md b/docs/src/widgets/widgets_and_params.md deleted file mode 100644 index ec96df2..0000000 --- a/docs/src/widgets/widgets_and_params.md +++ /dev/null @@ -1,49 +0,0 @@ -# Widgets & Parameters - -Below is a list of available widgets and the parameters each accepts. - -## Widget Functions - -These functions correspond to actual GTK widgets and render visible UI elements. - -- **box**: `props`, `children` -- **centerbox**: `props`, `children` -- **eventbox**: `props`, `children` -- **tooltip**: `children` -- **circular_progress**: `props` -- **graph**: `props` -- **transform**: `props` -- **slider**: `props` -- **progress**: `props` -- **image**: `props` -- **button**: `props` -- **label**: `props` -- **input**: `props` -- **calendar**: `props` -- **color_button**: `props` -- **expander**: `props`, `children` -- **color_chooser**: `props` -- **combo_box_text**: `props` -- **checkbox**: `props` -- **revealer**: `props`, `children` -- **scroll**: `props`, `children` -- **overlay**: `children` -- **stack**: `props`, `children` - -## Utility Functions - -These are not visible UI widgets but are essential for layout, data binding, or dynamic behavior. - -- **defwindow**: `string`, `props`, `children` -- **poll**: `props` -- **listen**: `props` - -> **Let's recall** -> -> --- -> -> `props` param: Defined in `#{}` -> -> `children` param: Defined in `[]` -> -> > Both of these are discussed in [chapter 2.2](../config/config_fundamentals.md) diff --git a/docs/theme/book.js b/docs/theme/book.js deleted file mode 100644 index 5e38636..0000000 --- a/docs/theme/book.js +++ /dev/null @@ -1,660 +0,0 @@ -"use strict"; - -// Fix back button cache problem -window.onunload = function () { }; - -// Global variable, shared between modules -function playground_text(playground) { - let code_block = playground.querySelector("code"); - - if (window.ace && code_block.classList.contains("editable")) { - let editor = window.ace.edit(code_block); - return editor.getValue(); - } else { - return code_block.textContent; - } -} - -(function codeSnippets() { - function fetch_with_timeout(url, options, timeout = 6000) { - return Promise.race([ - fetch(url, options), - new Promise((_, reject) => setTimeout(() => reject(new Error('timeout')), timeout)) - ]); - } - - var playgrounds = Array.from(document.querySelectorAll(".playground")); - if (playgrounds.length > 0) { - fetch_with_timeout("https://play.rust-lang.org/meta/crates", { - headers: { - 'Content-Type': "application/json", - }, - method: 'POST', - mode: 'cors', - }) - .then(response => response.json()) - .then(response => { - // get list of crates available in the rust playground - let playground_crates = response.crates.map(item => item["id"]); - playgrounds.forEach(block => handle_crate_list_update(block, playground_crates)); - }); - } - - function handle_crate_list_update(playground_block, playground_crates) { - // update the play buttons after receiving the response - update_play_button(playground_block, playground_crates); - - // and install on change listener to dynamically update ACE editors - if (window.ace) { - let code_block = playground_block.querySelector("code"); - if (code_block.classList.contains("editable")) { - let editor = window.ace.edit(code_block); - editor.addEventListener("change", function (e) { - update_play_button(playground_block, playground_crates); - }); - // add Ctrl-Enter command to execute rust code - editor.commands.addCommand({ - name: "run", - bindKey: { - win: "Ctrl-Enter", - mac: "Ctrl-Enter" - }, - exec: _editor => run_rust_code(playground_block) - }); - } - } - } - - // updates the visibility of play button based on `no_run` class and - // used crates vs ones available on http://play.rust-lang.org - function update_play_button(pre_block, playground_crates) { - var play_button = pre_block.querySelector(".play-button"); - - // skip if code is `no_run` - if (pre_block.querySelector('code').classList.contains("no_run")) { - play_button.classList.add("hidden"); - return; - } - - // get list of `extern crate`'s from snippet - var txt = playground_text(pre_block); - var re = /extern\s+crate\s+([a-zA-Z_0-9]+)\s*;/g; - var snippet_crates = []; - var item; - while (item = re.exec(txt)) { - snippet_crates.push(item[1]); - } - - // check if all used crates are available on play.rust-lang.org - var all_available = snippet_crates.every(function (elem) { - return playground_crates.indexOf(elem) > -1; - }); - - if (all_available) { - play_button.classList.remove("hidden"); - } else { - play_button.classList.add("hidden"); - } - } - - function run_rust_code(code_block) { - var result_block = code_block.querySelector(".result"); - if (!result_block) { - result_block = document.createElement('code'); - result_block.className = 'result hljs language-bash'; - - code_block.append(result_block); - } - - let text = playground_text(code_block); - let classes = code_block.querySelector('code').classList; - let has_2018 = classes.contains("edition2018"); - let edition = has_2018 ? "2018" : "2015"; - - var params = { - version: "stable", - optimize: "0", - code: text, - edition: edition - }; - - if (text.indexOf("#![feature") !== -1) { - params.version = "nightly"; - } - - result_block.innerText = "Running..."; - - fetch_with_timeout("https://play.rust-lang.org/evaluate.json", { - headers: { - 'Content-Type': "application/json", - }, - method: 'POST', - mode: 'cors', - body: JSON.stringify(params) - }) - .then(response => response.json()) - .then(response => result_block.innerText = response.result) - .catch(error => result_block.innerText = "Playground Communication: " + error.message); - } - - // Syntax highlighting Configuration - hljs.configure({ - tabReplace: ' ', // 4 spaces - languages: [], // Languages used for auto-detection - }); - - let code_nodes = Array - .from(document.querySelectorAll('code')) - // Don't highlight `inline code` blocks in headers. - .filter(function (node) {return !node.parentElement.classList.contains("header"); }); - - if (window.ace) { - // language-rust class needs to be removed for editable - // blocks or highlightjs will capture events - Array - .from(document.querySelectorAll('code.editable')) - .forEach(function (block) { block.classList.remove('language-rust'); }); - - Array - .from(document.querySelectorAll('code:not(.editable)')) - .forEach(function (block) { hljs.highlightBlock(block); }); - } else { - code_nodes.forEach(function (block) { hljs.highlightBlock(block); }); - } - - // Adding the hljs class gives code blocks the color css - // even if highlighting doesn't apply - code_nodes.forEach(function (block) { block.classList.add('hljs'); }); - - Array.from(document.querySelectorAll("code.language-rust")).forEach(function (block) { - - var lines = Array.from(block.querySelectorAll('.boring')); - // If no lines were hidden, return - if (!lines.length) { return; } - block.classList.add("hide-boring"); - - var buttons = document.createElement('div'); - buttons.className = 'buttons'; - buttons.innerHTML = ""; - - // add expand button - var pre_block = block.parentNode; - pre_block.insertBefore(buttons, pre_block.firstChild); - - pre_block.querySelector('.buttons').addEventListener('click', function (e) { - if (e.target.classList.contains('fa-eye')) { - e.target.classList.remove('fa-eye'); - e.target.classList.add('fa-eye-slash'); - e.target.title = 'Hide lines'; - e.target.setAttribute('aria-label', e.target.title); - - block.classList.remove('hide-boring'); - } else if (e.target.classList.contains('fa-eye-slash')) { - e.target.classList.remove('fa-eye-slash'); - e.target.classList.add('fa-eye'); - e.target.title = 'Show hidden lines'; - e.target.setAttribute('aria-label', e.target.title); - - block.classList.add('hide-boring'); - } - }); - }); - - if (window.playground_copyable) { - Array.from(document.querySelectorAll('pre code')).forEach(function (block) { - var pre_block = block.parentNode; - if (!pre_block.classList.contains('playground')) { - var buttons = pre_block.querySelector(".buttons"); - if (!buttons) { - buttons = document.createElement('div'); - buttons.className = 'buttons'; - pre_block.insertBefore(buttons, pre_block.firstChild); - } - - var clipButton = document.createElement('button'); - clipButton.className = 'fa fa-copy clip-button'; - clipButton.title = 'Copy to clipboard'; - clipButton.setAttribute('aria-label', clipButton.title); - clipButton.innerHTML = ''; - - buttons.insertBefore(clipButton, buttons.firstChild); - } - }); - } - - // Process playground code blocks - Array.from(document.querySelectorAll(".playground")).forEach(function (pre_block) { - // Add play button - var buttons = pre_block.querySelector(".buttons"); - if (!buttons) { - buttons = document.createElement('div'); - buttons.className = 'buttons'; - pre_block.insertBefore(buttons, pre_block.firstChild); - } - - var runCodeButton = document.createElement('button'); - runCodeButton.className = 'fa fa-play play-button'; - runCodeButton.hidden = true; - runCodeButton.title = 'Run this code'; - runCodeButton.setAttribute('aria-label', runCodeButton.title); - - buttons.insertBefore(runCodeButton, buttons.firstChild); - runCodeButton.addEventListener('click', function (e) { - run_rust_code(pre_block); - }); - - if (window.playground_copyable) { - var copyCodeClipboardButton = document.createElement('button'); - copyCodeClipboardButton.className = 'fa fa-copy clip-button'; - copyCodeClipboardButton.innerHTML = ''; - copyCodeClipboardButton.title = 'Copy to clipboard'; - copyCodeClipboardButton.setAttribute('aria-label', copyCodeClipboardButton.title); - - buttons.insertBefore(copyCodeClipboardButton, buttons.firstChild); - } - - let code_block = pre_block.querySelector("code"); - if (window.ace && code_block.classList.contains("editable")) { - var undoChangesButton = document.createElement('button'); - undoChangesButton.className = 'fa fa-history reset-button'; - undoChangesButton.title = 'Undo changes'; - undoChangesButton.setAttribute('aria-label', undoChangesButton.title); - - buttons.insertBefore(undoChangesButton, buttons.firstChild); - - undoChangesButton.addEventListener('click', function () { - let editor = window.ace.edit(code_block); - editor.setValue(editor.originalCode); - editor.clearSelection(); - }); - } - }); -})(); - -(function themes() { - var html = document.querySelector('html'); - var themeToggleButton = document.getElementById('theme-toggle'); - var themePopup = document.getElementById('theme-list'); - var themeColorMetaTag = document.querySelector('meta[name="theme-color"]'); - var stylesheets = { - ayuHighlight: document.querySelector("[href$='ayu-highlight.css']"), - tomorrowNight: document.querySelector("[href$='tomorrow-night.css']"), - highlight: document.querySelector("[href$='highlight.css']"), - }; - - function showThemes() { - themePopup.style.display = 'block'; - themeToggleButton.setAttribute('aria-expanded', true); - themePopup.querySelector("button#" + get_theme()).focus(); - } - - function hideThemes() { - themePopup.style.display = 'none'; - themeToggleButton.setAttribute('aria-expanded', false); - themeToggleButton.focus(); - } - - function get_theme() { - var theme; - try { theme = localStorage.getItem('mdbook-theme'); } catch (e) { } - if (theme === null || theme === undefined) { - return default_theme; - } else { - return theme; - } - } - - function set_theme(theme, store = true) { - let ace_theme; - - if (theme == 'coal' || theme == 'navy') { - stylesheets.ayuHighlight.disabled = true; - stylesheets.tomorrowNight.disabled = false; - stylesheets.highlight.disabled = true; - - ace_theme = "ace/theme/tomorrow_night"; - } else if (theme == 'ayu') { - stylesheets.ayuHighlight.disabled = false; - stylesheets.tomorrowNight.disabled = true; - stylesheets.highlight.disabled = true; - ace_theme = "ace/theme/tomorrow_night"; - } else { - stylesheets.ayuHighlight.disabled = true; - stylesheets.tomorrowNight.disabled = true; - stylesheets.highlight.disabled = false; - ace_theme = "ace/theme/dawn"; - } - - setTimeout(function () { - themeColorMetaTag.content = getComputedStyle(document.body).backgroundColor; - }, 1); - - if (window.ace && window.editors) { - window.editors.forEach(function (editor) { - editor.setTheme(ace_theme); - }); - } - - var previousTheme = get_theme(); - - if (store) { - try { localStorage.setItem('mdbook-theme', theme); } catch (e) { } - } - - html.classList.remove(previousTheme); - html.classList.add(theme); - } - - // Set theme - var theme = get_theme(); - - set_theme(theme, false); - - themeToggleButton.addEventListener('click', function () { - if (themePopup.style.display === 'block') { - hideThemes(); - } else { - showThemes(); - } - }); - - themePopup.addEventListener('click', function (e) { - var theme = e.target.id || e.target.parentElement.id; - set_theme(theme); - }); - - themePopup.addEventListener('focusout', function(e) { - // e.relatedTarget is null in Safari and Firefox on macOS (see workaround below) - if (!!e.relatedTarget && !themeToggleButton.contains(e.relatedTarget) && !themePopup.contains(e.relatedTarget)) { - hideThemes(); - } - }); - - // Should not be needed, but it works around an issue on macOS & iOS: https://github.com/rust-lang/mdBook/issues/628 - document.addEventListener('click', function(e) { - if (themePopup.style.display === 'block' && !themeToggleButton.contains(e.target) && !themePopup.contains(e.target)) { - hideThemes(); - } - }); - - document.addEventListener('keydown', function (e) { - if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; } - if (!themePopup.contains(e.target)) { return; } - - switch (e.key) { - case 'Escape': - e.preventDefault(); - hideThemes(); - break; - case 'ArrowUp': - e.preventDefault(); - var li = document.activeElement.parentElement; - if (li && li.previousElementSibling) { - li.previousElementSibling.querySelector('button').focus(); - } - break; - case 'ArrowDown': - e.preventDefault(); - var li = document.activeElement.parentElement; - if (li && li.nextElementSibling) { - li.nextElementSibling.querySelector('button').focus(); - } - break; - case 'Home': - e.preventDefault(); - themePopup.querySelector('li:first-child button').focus(); - break; - case 'End': - e.preventDefault(); - themePopup.querySelector('li:last-child button').focus(); - break; - } - }); -})(); - -(function sidebar() { - var html = document.querySelector("html"); - var sidebar = document.getElementById("sidebar"); - var sidebarLinks = document.querySelectorAll('#sidebar a'); - var sidebarToggleButton = document.getElementById("sidebar-toggle"); - var sidebarResizeHandle = document.getElementById("sidebar-resize-handle"); - var firstContact = null; - - function showSidebar() { - html.classList.remove('sidebar-hidden') - html.classList.add('sidebar-visible'); - Array.from(sidebarLinks).forEach(function (link) { - link.setAttribute('tabIndex', 0); - }); - sidebarToggleButton.setAttribute('aria-expanded', true); - sidebar.setAttribute('aria-hidden', false); - try { localStorage.setItem('mdbook-sidebar', 'visible'); } catch (e) { } - } - - - var sidebarAnchorToggles = document.querySelectorAll('#sidebar a.toggle'); - - function toggleSection(ev) { - ev.currentTarget.parentElement.classList.toggle('expanded'); - } - - Array.from(sidebarAnchorToggles).forEach(function (el) { - el.addEventListener('click', toggleSection); - }); - - function hideSidebar() { - html.classList.remove('sidebar-visible') - html.classList.add('sidebar-hidden'); - Array.from(sidebarLinks).forEach(function (link) { - link.setAttribute('tabIndex', -1); - }); - sidebarToggleButton.setAttribute('aria-expanded', false); - sidebar.setAttribute('aria-hidden', true); - try { localStorage.setItem('mdbook-sidebar', 'hidden'); } catch (e) { } - } - - // Toggle sidebar - sidebarToggleButton.addEventListener('click', function sidebarToggle() { - if (html.classList.contains("sidebar-hidden")) { - var current_width = parseInt( - document.documentElement.style.getPropertyValue('--sidebar-width'), 10); - if (current_width < 150) { - document.documentElement.style.setProperty('--sidebar-width', '150px'); - } - showSidebar(); - } else if (html.classList.contains("sidebar-visible")) { - hideSidebar(); - } else { - if (getComputedStyle(sidebar)['transform'] === 'none') { - hideSidebar(); - } else { - showSidebar(); - } - } - }); - - sidebarResizeHandle.addEventListener('mousedown', initResize, false); - - function initResize(e) { - window.addEventListener('mousemove', resize, false); - window.addEventListener('mouseup', stopResize, false); - html.classList.add('sidebar-resizing'); - } - function resize(e) { - var pos = (e.clientX - sidebar.offsetLeft); - if (pos < 20) { - hideSidebar(); - } else { - if (html.classList.contains("sidebar-hidden")) { - showSidebar(); - } - pos = Math.min(pos, window.innerWidth - 100); - document.documentElement.style.setProperty('--sidebar-width', pos + 'px'); - } - } - //on mouseup remove windows functions mousemove & mouseup - function stopResize(e) { - html.classList.remove('sidebar-resizing'); - window.removeEventListener('mousemove', resize, false); - window.removeEventListener('mouseup', stopResize, false); - } - - document.addEventListener('touchstart', function (e) { - firstContact = { - x: e.touches[0].clientX, - time: Date.now() - }; - }, { passive: true }); - - document.addEventListener('touchmove', function (e) { - if (!firstContact) - return; - - var curX = e.touches[0].clientX; - var xDiff = curX - firstContact.x, - tDiff = Date.now() - firstContact.time; - - if (tDiff < 250 && Math.abs(xDiff) >= 150) { - if (xDiff >= 0 && firstContact.x < Math.min(document.body.clientWidth * 0.25, 300)) - showSidebar(); - else if (xDiff < 0 && curX < 300) - hideSidebar(); - - firstContact = null; - } - }, { passive: true }); - - // Scroll sidebar to current active section - var activeSection = document.getElementById("sidebar").querySelector(".active"); - if (activeSection) { - // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView - activeSection.scrollIntoView({ block: 'center' }); - } -})(); - -(function chapterNavigation() { - document.addEventListener('keydown', function (e) { - if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; } - if (window.search && window.search.hasFocus()) { return; } - - switch (e.key) { - case 'ArrowRight': - e.preventDefault(); - var nextButton = document.querySelector('.nav-chapters.next'); - if (nextButton) { - window.location.href = nextButton.href; - } - break; - case 'ArrowLeft': - e.preventDefault(); - var previousButton = document.querySelector('.nav-chapters.previous'); - if (previousButton) { - window.location.href = previousButton.href; - } - break; - } - }); -})(); - -(function clipboard() { - var clipButtons = document.querySelectorAll('.clip-button'); - - function hideTooltip(elem) { - elem.firstChild.innerText = ""; - elem.className = 'fa fa-copy clip-button'; - } - - function showTooltip(elem, msg) { - elem.firstChild.innerText = msg; - elem.className = 'fa fa-copy tooltipped'; - } - - var clipboardSnippets = new ClipboardJS('.clip-button', { - text: function (trigger) { - hideTooltip(trigger); - let playground = trigger.closest("pre"); - return playground_text(playground); - } - }); - - Array.from(clipButtons).forEach(function (clipButton) { - clipButton.addEventListener('mouseout', function (e) { - hideTooltip(e.currentTarget); - }); - }); - - clipboardSnippets.on('success', function (e) { - e.clearSelection(); - showTooltip(e.trigger, "Copied!"); - }); - - clipboardSnippets.on('error', function (e) { - showTooltip(e.trigger, "Clipboard error!"); - }); -})(); - -(function scrollToTop () { - var menuTitle = document.querySelector('.menu-title'); - - menuTitle.addEventListener('click', function () { - document.scrollingElement.scrollTo({ top: 0, behavior: 'smooth' }); - }); -})(); - -(function controllMenu() { - var menu = document.getElementById('menu-bar'); - - (function controllPosition() { - var scrollTop = document.scrollingElement.scrollTop; - var prevScrollTop = scrollTop; - var minMenuY = -menu.clientHeight - 50; - // When the script loads, the page can be at any scroll (e.g. if you reforesh it). - menu.style.top = scrollTop + 'px'; - // Same as parseInt(menu.style.top.slice(0, -2), but faster - var topCache = menu.style.top.slice(0, -2); - menu.classList.remove('sticky'); - var stickyCache = false; // Same as menu.classList.contains('sticky'), but faster - document.addEventListener('scroll', function () { - scrollTop = Math.max(document.scrollingElement.scrollTop, 0); - // `null` means that it doesn't need to be updated - var nextSticky = null; - var nextTop = null; - var scrollDown = scrollTop > prevScrollTop; - var menuPosAbsoluteY = topCache - scrollTop; - if (scrollDown) { - nextSticky = false; - if (menuPosAbsoluteY > 0) { - nextTop = prevScrollTop; - } - } else { - if (menuPosAbsoluteY > 0) { - nextSticky = true; - } else if (menuPosAbsoluteY < minMenuY) { - nextTop = prevScrollTop + minMenuY; - } - } - if (nextSticky === true && stickyCache === false) { - menu.classList.add('sticky'); - stickyCache = true; - } else if (nextSticky === false && stickyCache === true) { - menu.classList.remove('sticky'); - stickyCache = false; - } - if (nextTop !== null) { - menu.style.top = nextTop + 'px'; - topCache = nextTop; - } - prevScrollTop = scrollTop; - }, { passive: true }); - })(); - (function controllBorder() { - menu.classList.remove('bordered'); - document.addEventListener('scroll', function () { - if (menu.offsetTop === 0) { - menu.classList.remove('bordered'); - } else { - menu.classList.add('bordered'); - } - }, { passive: true }); - })(); -})(); diff --git a/docs/theme/css/chrome.css b/docs/theme/css/chrome.css deleted file mode 100644 index 21c08b9..0000000 --- a/docs/theme/css/chrome.css +++ /dev/null @@ -1,495 +0,0 @@ -/* CSS for UI elements (a.k.a. chrome) */ - -@import 'variables.css'; - -::-webkit-scrollbar { - background: var(--bg); -} -::-webkit-scrollbar-thumb { - background: var(--scrollbar); -} -html { - scrollbar-color: var(--scrollbar) var(--bg); -} -#searchresults a, -.content a:link, -a:visited, -a > .hljs { - color: var(--links); -} - -/* Menu Bar */ - -#menu-bar, -#menu-bar-hover-placeholder { - z-index: 101; - margin: auto calc(0px - var(--page-padding)); -} -#menu-bar { - position: relative; - display: flex; - flex-wrap: wrap; - background-color: var(--bg); - border-bottom-color: var(--bg); - border-bottom-width: 1px; - border-bottom-style: solid; -} -#menu-bar.sticky, -.js #menu-bar-hover-placeholder:hover + #menu-bar, -.js #menu-bar:hover, -.js.sidebar-visible #menu-bar { - position: -webkit-sticky; - position: sticky; - top: 0 !important; -} -#menu-bar-hover-placeholder { - position: sticky; - position: -webkit-sticky; - top: 0; - height: var(--menu-bar-height); -} -#menu-bar.bordered { - border-bottom-color: var(--table-border-color); -} -#menu-bar i, #menu-bar .icon-button { - position: relative; - padding: 0 8px; - z-index: 10; - line-height: var(--menu-bar-height); - cursor: pointer; - transition: color 0.5s; -} -@media only screen and (max-width: 420px) { - #menu-bar i, #menu-bar .icon-button { - padding: 0 5px; - } -} - -.icon-button { - border: none; - background: none; - padding: 0; - color: inherit; -} -.icon-button i { - margin: 0; -} - -.right-buttons { - margin: 0 15px; -} -.right-buttons a { - text-decoration: none; -} - -.left-buttons { - display: flex; - margin: 0 5px; -} -.no-js .left-buttons { - display: none; -} - -.menu-title { - display: inline-block; - font-weight: 200; - font-size: 2.4rem; - line-height: var(--menu-bar-height); - text-align: center; - margin: 0; - flex: 1; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.js .menu-title { - cursor: pointer; -} - -.menu-bar, -.menu-bar:visited, -.nav-chapters, -.nav-chapters:visited, -.mobile-nav-chapters, -.mobile-nav-chapters:visited, -.menu-bar .icon-button, -.menu-bar a i { - color: var(--icons); -} - -.menu-bar i:hover, -.menu-bar .icon-button:hover, -.nav-chapters:hover, -.mobile-nav-chapters i:hover { - color: var(--icons-hover); -} - -/* Nav Icons */ - -.nav-chapters { - font-size: 2.5em; - text-align: center; - text-decoration: none; - - position: fixed; - top: 0; - bottom: 0; - margin: 0; - max-width: 150px; - min-width: 90px; - - display: flex; - justify-content: center; - align-content: center; - flex-direction: column; - - transition: color 0.5s, background-color 0.5s; -} - -.nav-chapters:hover { - text-decoration: none; - background-color: var(--theme-hover); - transition: background-color 0.15s, color 0.15s; -} - -.nav-wrapper { - margin-top: 50px; - display: none; -} - -.mobile-nav-chapters { - font-size: 2.5em; - text-align: center; - text-decoration: none; - width: 90px; - border-radius: 5px; - background-color: var(--sidebar-bg); -} - -.previous { - float: left; -} - -.next { - float: right; - right: var(--page-padding); -} - -@media only screen and (max-width: 1080px) { - .nav-wide-wrapper { display: none; } - .nav-wrapper { display: block; } -} - -@media only screen and (max-width: 1380px) { - .sidebar-visible .nav-wide-wrapper { display: none; } - .sidebar-visible .nav-wrapper { display: block; } -} - -/* Inline code */ - -:not(pre) > .hljs { - display: inline; - padding: 0.1em 0.3em; - border-radius: 3px; -} - -:not(pre):not(a) > .hljs { - color: var(--inline-code-color); - overflow-x: initial; -} - -a:hover > .hljs { - text-decoration: underline; -} - -pre { - position: relative; -} -pre > .buttons { - position: absolute; - z-index: 100; - right: 5px; - top: 5px; - - color: var(--sidebar-fg); - cursor: pointer; -} -pre > .buttons :hover { - color: var(--sidebar-active); -} -pre > .buttons i { - margin-left: 8px; -} -pre > .buttons button { - color: inherit; - background: transparent; - border: none; - cursor: inherit; -} -pre > .result { - margin-top: 10px; -} - -/* Search */ - -#searchresults a { - text-decoration: none; -} - -mark { - border-radius: 2px; - padding: 0 3px 1px 3px; - margin: 0 -3px -1px -3px; - background-color: var(--search-mark-bg); - transition: background-color 300ms linear; - cursor: pointer; -} - -mark.fade-out { - background-color: rgba(0,0,0,0) !important; - cursor: auto; -} - -.searchbar-outer { - margin-left: auto; - margin-right: auto; - max-width: var(--content-max-width); -} - -#searchbar { - width: 100%; - margin: 5px auto 0px auto; - padding: 10px 16px; - transition: box-shadow 300ms ease-in-out; - border: 1px solid var(--searchbar-border-color); - border-radius: 3px; - background-color: var(--searchbar-bg); - color: var(--searchbar-fg); -} -#searchbar:focus, -#searchbar.active { - box-shadow: 0 0 3px var(--searchbar-shadow-color); -} - -.searchresults-header { - font-weight: bold; - font-size: 1em; - padding: 18px 0 0 5px; - color: var(--searchresults-header-fg); -} - -.searchresults-outer { - margin-left: auto; - margin-right: auto; - max-width: var(--content-max-width); - border-bottom: 1px dashed var(--searchresults-border-color); -} - -ul#searchresults { - list-style: none; - padding-left: 20px; -} -ul#searchresults li { - margin: 10px 0px; - padding: 2px; - border-radius: 2px; -} -ul#searchresults li.focus { - background-color: var(--searchresults-li-bg); -} -ul#searchresults span.teaser { - display: block; - clear: both; - margin: 5px 0 0 20px; - font-size: 0.8em; -} -ul#searchresults span.teaser em { - font-weight: bold; - font-style: normal; -} - -/* Sidebar */ - -.sidebar { - position: fixed; - left: 0; - top: 0; - bottom: 0; - width: var(--sidebar-width); - font-size: 0.875em; - box-sizing: border-box; - -webkit-overflow-scrolling: touch; - overscroll-behavior-y: contain; - background-color: var(--sidebar-bg); - color: var(--sidebar-fg); -} -.sidebar-resizing { - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; -} -.js:not(.sidebar-resizing) .sidebar { - transition: transform 0.3s; /* Animation: slide away */ -} -.sidebar code { - line-height: 2em; -} -.sidebar .sidebar-scrollbox { - overflow-y: auto; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - padding: 10px 10px; -} -.sidebar .sidebar-resize-handle { - position: absolute; - cursor: col-resize; - width: 0; - right: 0; - top: 0; - bottom: 0; -} -.js .sidebar .sidebar-resize-handle { - cursor: col-resize; - width: 5px; -} -.sidebar-hidden .sidebar { - transform: translateX(calc(0px - var(--sidebar-width))); -} -.sidebar::-webkit-scrollbar { - background: var(--sidebar-bg); -} -.sidebar::-webkit-scrollbar-thumb { - background: var(--scrollbar); -} - -.sidebar-visible .page-wrapper { - transform: translateX(var(--sidebar-width)); -} -@media only screen and (min-width: 620px) { - .sidebar-visible .page-wrapper { - transform: none; - margin-left: var(--sidebar-width); - } -} - -.chapter { - list-style: none outside none; - padding-left: 0; - line-height: 2.2em; -} - -.chapter ol { - width: 100%; -} - -.chapter li { - display: flex; - color: var(--sidebar-non-existant); -} -.chapter li a { - display: block; - padding: 0; - text-decoration: none; - color: var(--sidebar-fg); -} - -.chapter li a:hover { - color: var(--sidebar-active); -} - -.chapter li a.active { - color: var(--sidebar-active); -} - -.chapter li > a.toggle { - cursor: pointer; - display: block; - margin-left: auto; - padding: 0 10px; - user-select: none; - opacity: 0.68; -} - -.chapter li > a.toggle div { - transition: transform 0.5s; -} - -/* collapse the section */ -.chapter li:not(.expanded) + li > ol { - display: none; -} - -.chapter li.chapter-item { - line-height: 1.5em; - margin-top: 0.6em; -} - -.chapter li.expanded > a.toggle div { - transform: rotate(90deg); -} - -.spacer { - width: 100%; - height: 3px; - margin: 5px 0px; -} -.chapter .spacer { - background-color: var(--sidebar-spacer); -} - -@media (-moz-touch-enabled: 1), (pointer: coarse) { - .chapter li a { padding: 5px 0; } - .spacer { margin: 10px 0; } -} - -.section { - list-style: none outside none; - padding-left: 20px; - line-height: 1.9em; -} - -/* Theme Menu Popup */ - -.theme-popup { - position: absolute; - left: 10px; - top: var(--menu-bar-height); - z-index: 1000; - border-radius: 4px; - font-size: 0.7em; - color: var(--fg); - background: var(--theme-popup-bg); - border: 1px solid var(--theme-popup-border); - margin: 0; - padding: 0; - list-style: none; - display: none; -} -.theme-popup .default { - color: var(--icons); -} -.theme-popup .theme { - width: 100%; - border: 0; - margin: 0; - padding: 2px 10px; - line-height: 25px; - white-space: nowrap; - text-align: left; - cursor: pointer; - color: inherit; - background: inherit; - font-size: inherit; -} -.theme-popup .theme:hover { - background-color: var(--theme-hover); -} -.theme-popup .theme:hover:first-child, -.theme-popup .theme:hover:last-child { - border-top-left-radius: inherit; - border-top-right-radius: inherit; -} diff --git a/docs/theme/css/general.css b/docs/theme/css/general.css deleted file mode 100644 index a5be0f3..0000000 --- a/docs/theme/css/general.css +++ /dev/null @@ -1,220 +0,0 @@ -/* Base styles and content styles */ - -@import "variables.css"; - -:root { - /* Browser default font-size is 16px, this way 1 rem = 10px */ - font-size: 62.5%; -} - -html { - font-family: "Open Sans", sans-serif; - color: var(--fg); - background-color: var(--bg); - text-size-adjust: none; -} - -body { - margin: 0; - font-size: 1.6rem; - overflow-x: hidden; -} - -code { - font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, - "DejaVu Sans Mono", monospace, monospace !important; - font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */ - padding: 10px; - border-radius: 5px; -} - -details summary { - cursor: pointer; -} - -/* Don't change font size in headers. */ -h1 code, -h2 code, -h3 code, -h4 code, -h5 code, -h6 code { - font-size: unset; -} - -.left { - float: left; -} -.right { - float: right; -} -.boring { - opacity: 0.6; -} -.hide-boring .boring { - display: none; -} -.hidden { - display: none !important; -} - -h2, -h3 { - margin-top: 2.5em; -} -h4, -h5 { - margin-top: 2em; -} - -.header + .header h3, -.header + .header h4, -.header + .header h5 { - margin-top: 1em; -} - -h1:target::before, -h2:target::before, -h3:target::before, -h4:target::before, -h5:target::before, -h6:target::before { - display: inline-block; - content: "»"; - margin-left: -30px; - width: 30px; -} - -/* This is broken on Safari as of version 14, but is fixed - in Safari Technology Preview 117 which I think will be Safari 14.2. - https://bugs.webkit.org/show_bug.cgi?id=218076 -*/ -:target { - scroll-margin-top: calc(var(--menu-bar-height) + 0.5em); -} - -.page { - outline: 0; - padding: 0 var(--page-padding); - margin-top: calc( - 0px - var(--menu-bar-height) - ); /* Compensate for the #menu-bar-hover-placeholder */ -} -.page-wrapper { - box-sizing: border-box; -} -.js:not(.sidebar-resizing) .page-wrapper { - transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */ -} - -.content { - overflow-y: auto; - padding: 0 15px; - padding-bottom: 50px; -} -.content main { - margin-left: auto; - margin-right: auto; - max-width: var(--content-max-width); -} -.content p { - line-height: 1.45em; -} -.content ol { - line-height: 1.45em; -} -.content ul { - line-height: 1.45em; -} -.content a { - text-decoration: none; -} -.content a:hover { - text-decoration: underline; -} -.content img, -.content video { - max-width: 100%; -} -.content .header:link, -.content .header:visited { - color: var(--fg); -} -.content .header:link, -.content .header:visited:hover { - text-decoration: none; -} - -table { - margin: 0 auto; - border-collapse: collapse; -} -table td { - padding: 3px 20px; - border: 1px var(--table-border-color) solid; -} -table thead { - background: var(--table-header-bg); -} -table thead td { - font-weight: 700; - border: none; -} -table thead th { - padding: 3px 20px; -} -table thead tr { - border: 1px var(--table-header-bg) solid; -} -/* Alternate background colors for rows */ -table tbody tr:nth-child(2n) { - background: var(--table-alternate-bg); -} - -blockquote { - margin: 20px 0; - padding: 0 20px; - color: var(--fg); - background-color: var(--quote-bg); - border-top: 0.1em solid var(--quote-border); - border-bottom: 0.1em solid var(--quote-border); -} - -:not(.footnote-definition) + .footnote-definition, -.footnote-definition + :not(.footnote-definition) { - margin-top: 2em; -} -.footnote-definition { - font-size: 0.9em; - margin: 0.5em 0; -} -.footnote-definition p { - display: inline; -} - -.tooltiptext { - position: absolute; - visibility: hidden; - color: #fff; - background-color: #333; - transform: translateX( - -50% - ); /* Center by moving tooltip 50% of its width left */ - left: -8px; /* Half of the width of the icon */ - top: -35px; - font-size: 0.8em; - text-align: center; - border-radius: 6px; - padding: 5px 8px; - margin: 5px; - z-index: 1000; -} -.tooltipped .tooltiptext { - visibility: visible; -} - -.chapter li.part-title { - color: var(--sidebar-fg); - margin: 5px 0px; - font-weight: bold; -} diff --git a/docs/theme/css/print.css b/docs/theme/css/print.css deleted file mode 100644 index 5e690f7..0000000 --- a/docs/theme/css/print.css +++ /dev/null @@ -1,54 +0,0 @@ - -#sidebar, -#menu-bar, -.nav-chapters, -.mobile-nav-chapters { - display: none; -} - -#page-wrapper.page-wrapper { - transform: none; - margin-left: 0px; - overflow-y: initial; -} - -#content { - max-width: none; - margin: 0; - padding: 0; -} - -.page { - overflow-y: initial; -} - -code { - background-color: #666666; - border-radius: 5px; - - /* Force background to be printed in Chrome */ - -webkit-print-color-adjust: exact; -} - -pre > .buttons { - z-index: 2; -} - -a, a:visited, a:active, a:hover { - color: #4183c4; - text-decoration: none; -} - -h1, h2, h3, h4, h5, h6 { - page-break-inside: avoid; - page-break-after: avoid; -} - -pre, code { - page-break-inside: avoid; - white-space: pre-wrap; -} - -.fa { - display: none !important; -} diff --git a/docs/theme/css/variables.css b/docs/theme/css/variables.css deleted file mode 100644 index 9ff64d6..0000000 --- a/docs/theme/css/variables.css +++ /dev/null @@ -1,253 +0,0 @@ - -/* Globals */ - -:root { - --sidebar-width: 300px; - --page-padding: 15px; - --content-max-width: 750px; - --menu-bar-height: 50px; -} - -/* Themes */ - -.ayu { - --bg: hsl(210, 25%, 8%); - --fg: #c5c5c5; - - --sidebar-bg: #14191f; - --sidebar-fg: #c8c9db; - --sidebar-non-existant: #5c6773; - --sidebar-active: #ffb454; - --sidebar-spacer: #2d334f; - - --scrollbar: var(--sidebar-fg); - - --icons: #737480; - --icons-hover: #b7b9cc; - - --links: #0096cf; - - --inline-code-color: #ffb454; - - --theme-popup-bg: #14191f; - --theme-popup-border: #5c6773; - --theme-hover: #191f26; - - --quote-bg: hsl(226, 15%, 17%); - --quote-border: hsl(226, 15%, 22%); - - --table-border-color: hsl(210, 25%, 13%); - --table-header-bg: hsl(210, 25%, 28%); - --table-alternate-bg: hsl(210, 25%, 11%); - - --searchbar-border-color: #848484; - --searchbar-bg: #424242; - --searchbar-fg: #fff; - --searchbar-shadow-color: #d4c89f; - --searchresults-header-fg: #666; - --searchresults-border-color: #888; - --searchresults-li-bg: #252932; - --search-mark-bg: #e3b171; -} - -.coal { - --bg: hsl(200, 7%, 8%); - --fg: #98a3ad; - - --sidebar-bg: #292c2f; - --sidebar-fg: #a1adb8; - --sidebar-non-existant: #505254; - --sidebar-active: #3473ad; - --sidebar-spacer: #393939; - - --scrollbar: var(--sidebar-fg); - - --icons: #43484d; - --icons-hover: #b3c0cc; - - --links: #2b79a2; - - --inline-code-color: #c5c8c6;; - - --theme-popup-bg: #141617; - --theme-popup-border: #43484d; - --theme-hover: #1f2124; - - --quote-bg: hsl(234, 21%, 18%); - --quote-border: hsl(234, 21%, 23%); - - --table-border-color: hsl(200, 7%, 13%); - --table-header-bg: hsl(200, 7%, 28%); - --table-alternate-bg: hsl(200, 7%, 11%); - - --searchbar-border-color: #aaa; - --searchbar-bg: #b7b7b7; - --searchbar-fg: #000; - --searchbar-shadow-color: #aaa; - --searchresults-header-fg: #666; - --searchresults-border-color: #98a3ad; - --searchresults-li-bg: #2b2b2f; - --search-mark-bg: #355c7d; -} - -.light { - --bg: hsl(0, 0%, 100%); - --fg: hsl(0, 0%, 0%); - - --sidebar-bg: #fafafa; - --sidebar-fg: hsl(0, 0%, 0%); - --sidebar-non-existant: #aaaaaa; - --sidebar-active: #1f1fff; - --sidebar-spacer: #f4f4f4; - - --scrollbar: #8F8F8F; - - --icons: #747474; - --icons-hover: #000000; - - --links: #20609f; - - --inline-code-color: #301900; - - --theme-popup-bg: #fafafa; - --theme-popup-border: #cccccc; - --theme-hover: #e6e6e6; - - --quote-bg: hsl(197, 37%, 96%); - --quote-border: hsl(197, 37%, 91%); - - --table-border-color: hsl(0, 0%, 95%); - --table-header-bg: hsl(0, 0%, 80%); - --table-alternate-bg: hsl(0, 0%, 97%); - - --searchbar-border-color: #aaa; - --searchbar-bg: #fafafa; - --searchbar-fg: #000; - --searchbar-shadow-color: #aaa; - --searchresults-header-fg: #666; - --searchresults-border-color: #888; - --searchresults-li-bg: #e4f2fe; - --search-mark-bg: #a2cff5; -} - -.navy { - --bg: hsl(226, 23%, 11%); - --fg: #bcbdd0; - - --sidebar-bg: #282d3f; - --sidebar-fg: #c8c9db; - --sidebar-non-existant: #505274; - --sidebar-active: #2b79a2; - --sidebar-spacer: #2d334f; - - --scrollbar: var(--sidebar-fg); - - --icons: #737480; - --icons-hover: #b7b9cc; - - --links: #2b79a2; - - --inline-code-color: #c5c8c6;; - - --theme-popup-bg: #161923; - --theme-popup-border: #737480; - --theme-hover: #282e40; - - --quote-bg: hsl(226, 15%, 17%); - --quote-border: hsl(226, 15%, 22%); - - --table-border-color: hsl(226, 23%, 16%); - --table-header-bg: hsl(226, 23%, 31%); - --table-alternate-bg: hsl(226, 23%, 14%); - - --searchbar-border-color: #aaa; - --searchbar-bg: #aeaec6; - --searchbar-fg: #000; - --searchbar-shadow-color: #aaa; - --searchresults-header-fg: #5f5f71; - --searchresults-border-color: #5c5c68; - --searchresults-li-bg: #242430; - --search-mark-bg: #a2cff5; -} - -.rust { - --bg: hsl(60, 9%, 87%); - --fg: #262625; - - --sidebar-bg: #3b2e2a; - --sidebar-fg: #c8c9db; - --sidebar-non-existant: #505254; - --sidebar-active: #e69f67; - --sidebar-spacer: #45373a; - - --scrollbar: var(--sidebar-fg); - - --icons: #737480; - --icons-hover: #262625; - - --links: #2b79a2; - - --inline-code-color: #6e6b5e; - - --theme-popup-bg: #e1e1db; - --theme-popup-border: #b38f6b; - --theme-hover: #99908a; - - --quote-bg: hsl(60, 5%, 75%); - --quote-border: hsl(60, 5%, 70%); - - --table-border-color: hsl(60, 9%, 82%); - --table-header-bg: #b3a497; - --table-alternate-bg: hsl(60, 9%, 84%); - - --searchbar-border-color: #aaa; - --searchbar-bg: #fafafa; - --searchbar-fg: #000; - --searchbar-shadow-color: #aaa; - --searchresults-header-fg: #666; - --searchresults-border-color: #888; - --searchresults-li-bg: #dec2a2; - --search-mark-bg: #e69f67; -} - -@media (prefers-color-scheme: dark) { - .light.no-js { - --bg: hsl(200, 7%, 8%); - --fg: #98a3ad; - - --sidebar-bg: #292c2f; - --sidebar-fg: #a1adb8; - --sidebar-non-existant: #505254; - --sidebar-active: #3473ad; - --sidebar-spacer: #393939; - - --scrollbar: var(--sidebar-fg); - - --icons: #43484d; - --icons-hover: #b3c0cc; - - --links: #2b79a2; - - --inline-code-color: #c5c8c6;; - - --theme-popup-bg: #141617; - --theme-popup-border: #43484d; - --theme-hover: #1f2124; - - --quote-bg: hsl(234, 21%, 18%); - --quote-border: hsl(234, 21%, 23%); - - --table-border-color: hsl(200, 7%, 13%); - --table-header-bg: hsl(200, 7%, 28%); - --table-alternate-bg: hsl(200, 7%, 11%); - - --searchbar-border-color: #aaa; - --searchbar-bg: #b7b7b7; - --searchbar-fg: #000; - --searchbar-shadow-color: #aaa; - --searchresults-header-fg: #666; - --searchresults-border-color: #98a3ad; - --searchresults-li-bg: #2b2b2f; - --search-mark-bg: #355c7d; - } -} diff --git a/docs/theme/favicon.png b/docs/theme/favicon.png deleted file mode 100644 index a5b1aa1..0000000 Binary files a/docs/theme/favicon.png and /dev/null differ diff --git a/docs/theme/favicon.svg b/docs/theme/favicon.svg deleted file mode 100644 index 90e0ea5..0000000 --- a/docs/theme/favicon.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - diff --git a/docs/theme/highlight.css b/docs/theme/highlight.css deleted file mode 100644 index c234322..0000000 --- a/docs/theme/highlight.css +++ /dev/null @@ -1,83 +0,0 @@ -/* - * An increased contrast highlighting scheme loosely based on the - * "Base16 Atelier Dune Light" theme by Bram de Haan - * (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) - * Original Base16 color scheme by Chris Kempson - * (https://github.com/chriskempson/base16) - */ - -/* Comment */ -.hljs-comment, -.hljs-quote { - color: #575757; -} - -/* Red */ -.hljs-variable, -.hljs-template-variable, -.hljs-attribute, -.hljs-tag, -.hljs-name, -.hljs-regexp, -.hljs-link, -.hljs-name, -.hljs-selector-id, -.hljs-selector-class { - color: #d70025; -} - -/* Orange */ -.hljs-number, -.hljs-meta, -.hljs-built_in, -.hljs-builtin-name, -.hljs-literal, -.hljs-type, -.hljs-params { - color: #b21e00; -} - -/* Green */ -.hljs-string, -.hljs-symbol, -.hljs-bullet { - color: #008200; -} - -/* Blue */ -.hljs-title, -.hljs-section { - color: #0030f2; -} - -/* Purple */ -.hljs-keyword, -.hljs-selector-tag { - color: #9d00ec; -} - -.hljs { - display: block; - overflow-x: auto; - background: #f6f7f6; - color: #000; - padding: 0.5em; -} - -.hljs-emphasis { - font-style: italic; -} - -.hljs-strong { - font-weight: bold; -} - -.hljs-addition { - color: #22863a; - background-color: #f0fff4; -} - -.hljs-deletion { - color: #b31d28; - background-color: #ffeef0; -} diff --git a/docs/theme/highlight.js b/docs/theme/highlight.js deleted file mode 100644 index dd6fc1a..0000000 --- a/docs/theme/highlight.js +++ /dev/null @@ -1,668 +0,0 @@ -/*! - Highlight.js v11.0.1 (git: 1cf31f015d) - (c) 2006-2021 Ivan Sagalaev and other contributors - License: BSD-3-Clause - */ -var hljs=function(){"use strict";var e={exports:{}};function t(e){ -return e instanceof Map?e.clear=e.delete=e.set=()=>{ -throw Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=()=>{ -throw Error("set is read-only") -}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((n=>{var i=e[n] -;"object"!=typeof i||Object.isFrozen(i)||t(i)})),e} -e.exports=t,e.exports.default=t;var n=e.exports;class i{constructor(e){ -void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1} -ignoreMatch(){this.isMatchIgnored=!0}}function r(e){ -return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'") -}function s(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t] -;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n}const o=e=>!!e.kind -;class a{constructor(e,t){ -this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){ -this.buffer+=r(e)}openNode(e){if(!o(e))return;let t=e.kind -;t=e.sublanguage?"language-"+t:((e,{prefix:t})=>{if(e.includes(".")){ -const n=e.split(".") -;return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ") -}return`${t}${e}`})(t,{prefix:this.classPrefix}),this.span(t)}closeNode(e){ -o(e)&&(this.buffer+="")}value(){return this.buffer}span(e){ -this.buffer+=``}}class l{constructor(){this.rootNode={ -children:[]},this.stack=[this.rootNode]}get top(){ -return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ -this.top.children.push(e)}openNode(e){const t={kind:e,children:[]} -;this.add(t),this.stack.push(t)}closeNode(){ -if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ -for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} -walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){ -return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t), -t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){ -"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ -l._collapse(e)})))}}class c extends l{constructor(e){super(),this.options=e} -addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())} -addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root -;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){ -return new a(this,this.options).value()}finalize(){return!0}}function g(e){ -return e?"string"==typeof e?e:e.source:null}function d(...e){ -return e.map((e=>g(e))).join("")}function u(...e){return"("+((e=>{ -const t=e[e.length-1] -;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{} -})(e).capture?"":"?:")+e.map((e=>g(e))).join("|")+")"}function h(e){ -return RegExp(e.toString()+"|").exec("").length-1} -const f=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./ -;function p(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n -;let i=g(e),r="";for(;i.length>0;){const e=f.exec(i);if(!e){r+=i;break} -r+=i.substring(0,e.index), -i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+t):(r+=e[0], -"("===e[0]&&n++)}return r})).map((e=>`(${e})`)).join(t)} -const b="[a-zA-Z]\\w*",m="[a-zA-Z_]\\w*",E="\\b\\d+(\\.\\d+)?",x="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",y="\\b(0b[01]+)",w={ -begin:"\\\\[\\s\\S]",relevance:0},_={scope:"string",begin:"'",end:"'", -illegal:"\\n",contains:[w]},v={scope:"string",begin:'"',end:'"',illegal:"\\n", -contains:[w]},O=(e,t,n={})=>{const i=s({scope:"comment",begin:e,end:t, -contains:[]},n);i.contains.push({scope:"doctag", -begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)", -end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0}) -;const r=u("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/) -;return i.contains.push({begin:d(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i -},k=O("//","$"),N=O("/\\*","\\*/"),S=O("#","$");var M=Object.freeze({ -__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:b,UNDERSCORE_IDENT_RE:m, -NUMBER_RE:E,C_NUMBER_RE:x,BINARY_NUMBER_RE:y, -RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", -SHEBANG:(e={})=>{const t=/^#![ ]*\// -;return e.binary&&(e.begin=d(t,/.*\b/,e.binary,/\b.*/)),s({scope:"meta",begin:t, -end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)}, -BACKSLASH_ESCAPE:w,APOS_STRING_MODE:_,QUOTE_STRING_MODE:v,PHRASAL_WORDS_MODE:{ -begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ -},COMMENT:O,C_LINE_COMMENT_MODE:k,C_BLOCK_COMMENT_MODE:N,HASH_COMMENT_MODE:S, -NUMBER_MODE:{scope:"number",begin:E,relevance:0},C_NUMBER_MODE:{scope:"number", -begin:x,relevance:0},BINARY_NUMBER_MODE:{scope:"number",begin:y,relevance:0}, -REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//, -end:/\/[gimuy]*/,illegal:/\n/,contains:[w,{begin:/\[/,end:/\]/,relevance:0, -contains:[w]}]}]},TITLE_MODE:{scope:"title",begin:b,relevance:0}, -UNDERSCORE_TITLE_MODE:{scope:"title",begin:m,relevance:0},METHOD_GUARD:{ -begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{ -"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{ -t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function R(e,t){ -"."===e.input[e.index-1]&&t.ignoreMatch()}function j(e,t){ -void 0!==e.className&&(e.scope=e.className,delete e.className)}function A(e,t){ -t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", -e.__beforeBegin=R,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords, -void 0===e.relevance&&(e.relevance=0))}function I(e,t){ -Array.isArray(e.illegal)&&(e.illegal=u(...e.illegal))}function B(e,t){ -if(e.match){ -if(e.begin||e.end)throw Error("begin & end are not supported with match") -;e.begin=e.match,delete e.match}}function T(e,t){ -void 0===e.relevance&&(e.relevance=1)}const L=(e,t)=>{if(!e.beforeMatch)return -;if(e.starts)throw Error("beforeMatch cannot be used with starts") -;const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t] -})),e.keywords=n.keywords, -e.begin=d(n.beforeMatch,d("(?=",n.begin,")")),e.starts={relevance:0, -contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch -},D=["of","and","for","in","not","or","if","then","parent","list","value"] -;function P(e,t,n="keyword"){const i=Object.create(null) -;return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((n=>{ -Object.assign(i,P(e[n],t,n))})),i;function r(e,n){ -t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|") -;i[n[0]]=[e,C(n[0],n[1])]}))}}function C(e,t){ -return t?Number(t):(e=>D.includes(e.toLowerCase()))(e)?0:1}const H={},$=e=>{ -console.error(e)},U=(e,...t)=>{console.log("WARN: "+e,...t)},z=(e,t)=>{ -H[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),H[`${e}/${t}`]=!0) -},K=Error();function W(e,t,{key:n}){let i=0;const r=e[n],s={},o={} -;for(let e=1;e<=t.length;e++)o[e+i]=r[e],s[e+i]=!0,i+=h(t[e-1]) -;e[n]=o,e[n]._emit=s,e[n]._multi=!0}function X(e){(e=>{ -e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope, -delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={ -_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope -}),(e=>{if(Array.isArray(e.begin)){ -if(e.skip||e.excludeBegin||e.returnBegin)throw $("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), -K -;if("object"!=typeof e.beginScope||null===e.beginScope)throw $("beginScope must be object"), -K;W(e,e.begin,{key:"beginScope"}),e.begin=p(e.begin,{joinWith:""})}})(e),(e=>{ -if(Array.isArray(e.end)){ -if(e.skip||e.excludeEnd||e.returnEnd)throw $("skip, excludeEnd, returnEnd not compatible with endScope: {}"), -K -;if("object"!=typeof e.endScope||null===e.endScope)throw $("endScope must be object"), -K;W(e,e.end,{key:"endScope"}),e.end=p(e.end,{joinWith:""})}})(e)}function G(e){ -function t(t,n){return RegExp(g(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))} -class n{constructor(){ -this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} -addRule(e,t){ -t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]), -this.matchAt+=h(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null) -;const e=this.regexes.map((e=>e[1]));this.matcherRe=t(p(e,{joinWith:"|" -}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex -;const t=this.matcherRe.exec(e);if(!t)return null -;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n] -;return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){ -this.rules=[],this.multiRegexes=[], -this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ -if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n -;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))), -t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){ -return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){ -this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){ -const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex -;let n=t.exec(e) -;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{ -const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)} -return n&&(this.regexIndex+=n.position+1, -this.regexIndex===this.count&&this.considerAll()),n}} -if(e.compilerExtensions||(e.compilerExtensions=[]), -e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") -;return e.classNameAliases=s(e.classNameAliases||{}),function n(r,o){const a=r -;if(r.isCompiled)return a -;[j,B,X,L].forEach((e=>e(r,o))),e.compilerExtensions.forEach((e=>e(r,o))), -r.__beforeBegin=null,[A,I,T].forEach((e=>e(r,o))),r.isCompiled=!0;let l=null -;return"object"==typeof r.keywords&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords), -l=r.keywords.$pattern, -delete r.keywords.$pattern),l=l||/\w+/,r.keywords&&(r.keywords=P(r.keywords,e.case_insensitive)), -a.keywordPatternRe=t(l,!0), -o&&(r.begin||(r.begin=/\B|\b/),a.beginRe=t(r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/), -r.end&&(a.endRe=t(r.end)), -a.terminatorEnd=g(r.end)||"",r.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)), -r.illegal&&(a.illegalRe=t(r.illegal)), -r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>s(e,{ -variants:null},t)))),e.cachedVariants?e.cachedVariants:Z(e)?s(e,{ -starts:e.starts?s(e.starts):null -}):Object.isFrozen(e)?s(e):e))("self"===e?r:e)))),r.contains.forEach((e=>{n(e,a) -})),r.starts&&n(r.starts,o),a.matcher=(e=>{const t=new i -;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin" -}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end" -}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(a),a}(e)}function Z(e){ -return!!e&&(e.endsWithParent||Z(e.starts))}const F=r,V=s,q=Symbol("nomatch") -;var J=(e=>{const t=Object.create(null),r=Object.create(null),s=[];let o=!0 -;const a="Could not find the language '{}', did you forget to load/include a language module?",l={ -disableAutodetect:!0,name:"Plain text",contains:[]};let g={ -ignoreUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i, -languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", -cssSelector:"pre code",languages:null,__emitter:c};function d(e){ -return g.noHighlightRe.test(e)}function u(e,t,n,i){let r="",s="" -;"object"==typeof t?(r=e, -n=t.ignoreIllegals,s=t.language,i=void 0):(z("10.7.0","highlight(lang, code, ...args) has been deprecated."), -z("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), -s=e,r=t),void 0===n&&(n=!0);const o={code:r,language:s};w("before:highlight",o) -;const a=o.result?o.result:h(o.language,o.code,n,i) -;return a.code=o.code,w("after:highlight",a),a}function h(e,n,r,s){ -const l=Object.create(null);function c(){if(!k.keywords)return void S.addText(M) -;let e=0;k.keywordPatternRe.lastIndex=0;let t=k.keywordPatternRe.exec(M),n="" -;for(;t;){n+=M.substring(e,t.index) -;const r=_.case_insensitive?t[0].toLowerCase():t[0],s=(i=r,k.keywords[i]);if(s){ -const[e,i]=s -;if(S.addText(n),n="",l[r]=(l[r]||0)+1,l[r]<=7&&(R+=i),e.startsWith("_"))n+=t[0];else{ -const n=_.classNameAliases[e]||e;S.addKeyword(t[0],n)}}else n+=t[0] -;e=k.keywordPatternRe.lastIndex,t=k.keywordPatternRe.exec(M)}var i -;n+=M.substr(e),S.addText(n)}function d(){null!=k.subLanguage?(()=>{ -if(""===M)return;let e=null;if("string"==typeof k.subLanguage){ -if(!t[k.subLanguage])return void S.addText(M) -;e=h(k.subLanguage,M,!0,N[k.subLanguage]),N[k.subLanguage]=e._top -}else e=f(M,k.subLanguage.length?k.subLanguage:null) -;k.relevance>0&&(R+=e.relevance),S.addSublanguage(e._emitter,e.language) -})():c(),M=""}function u(e,t){let n=1;for(;void 0!==t[n];){if(!e._emit[n]){n++ -;continue}const i=_.classNameAliases[e[n]]||e[n],r=t[n] -;i?S.addKeyword(r,i):(M=r,c(),M=""),n++}}function p(e,t){ -return e.scope&&"string"==typeof e.scope&&S.openNode(_.classNameAliases[e.scope]||e.scope), -e.beginScope&&(e.beginScope._wrap?(S.addKeyword(M,_.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap), -M=""):e.beginScope._multi&&(u(e.beginScope,t),M="")),k=Object.create(e,{parent:{ -value:k}}),k}function b(e,t,n){let r=((e,t)=>{const n=e&&e.exec(t) -;return n&&0===n.index})(e.endRe,n);if(r){if(e["on:end"]){const n=new i(e) -;e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){ -for(;e.endsParent&&e.parent;)e=e.parent;return e}} -if(e.endsWithParent)return b(e.parent,t,n)}function m(e){ -return 0===k.matcher.regexIndex?(M+=e[0],1):(I=!0,0)}function x(e){ -const t=e[0],i=n.substr(e.index),r=b(k,e,i);if(!r)return q;const s=k -;k.endScope&&k.endScope._wrap?(d(), -S.addKeyword(t,k.endScope._wrap)):k.endScope&&k.endScope._multi?(d(), -u(k.endScope,e)):s.skip?M+=t:(s.returnEnd||s.excludeEnd||(M+=t), -d(),s.excludeEnd&&(M=t));do{ -k.scope&&!k.isMultiClass&&S.closeNode(),k.skip||k.subLanguage||(R+=k.relevance), -k=k.parent}while(k!==r.parent) -;return r.starts&&p(r.starts,e),s.returnEnd?0:t.length}let y={};function w(t,s){ -const a=s&&s[0];if(M+=t,null==a)return d(),0 -;if("begin"===y.type&&"end"===s.type&&y.index===s.index&&""===a){ -if(M+=n.slice(s.index,s.index+1),!o){const t=Error(`0 width match regex (${e})`) -;throw t.languageName=e,t.badRule=y.rule,t}return 1} -if(y=s,"begin"===s.type)return(e=>{ -const t=e[0],n=e.rule,r=new i(n),s=[n.__beforeBegin,n["on:begin"]] -;for(const n of s)if(n&&(n(e,r),r.isMatchIgnored))return m(t) -;return n.skip?M+=t:(n.excludeBegin&&(M+=t), -d(),n.returnBegin||n.excludeBegin||(M=t)),p(n,e),n.returnBegin?0:t.length})(s) -;if("illegal"===s.type&&!r){ -const e=Error('Illegal lexeme "'+a+'" for mode "'+(k.scope||"")+'"') -;throw e.mode=k,e}if("end"===s.type){const e=x(s);if(e!==q)return e} -if("illegal"===s.type&&""===a)return 1 -;if(A>1e5&&A>3*s.index)throw Error("potential infinite loop, way more iterations than matches") -;return M+=a,a.length}const _=E(e) -;if(!_)throw $(a.replace("{}",e)),Error('Unknown language: "'+e+'"') -;const v=G(_);let O="",k=s||v;const N={},S=new g.__emitter(g);(()=>{const e=[] -;for(let t=k;t!==_;t=t.parent)t.scope&&e.unshift(t.scope) -;e.forEach((e=>S.openNode(e)))})();let M="",R=0,j=0,A=0,I=!1;try{ -for(k.matcher.considerAll();;){ -A++,I?I=!1:k.matcher.considerAll(),k.matcher.lastIndex=j -;const e=k.matcher.exec(n);if(!e)break;const t=w(n.substring(j,e.index),e) -;j=e.index+t}return w(n.substr(j)),S.closeAllNodes(),S.finalize(),O=S.toHTML(),{ -language:e,value:O,relevance:R,illegal:!1,_emitter:S,_top:k}}catch(t){ -if(t.message&&t.message.includes("Illegal"))return{language:e,value:F(n), -illegal:!0,relevance:0,_illegalBy:{message:t.message,index:j, -context:n.slice(j-100,j+100),mode:t.mode,resultSoFar:O},_emitter:S};if(o)return{ -language:e,value:F(n),illegal:!1,relevance:0,errorRaised:t,_emitter:S,_top:k} -;throw t}}function f(e,n){n=n||g.languages||Object.keys(t);const i=(e=>{ -const t={value:F(e),illegal:!1,relevance:0,_top:l,_emitter:new g.__emitter(g)} -;return t._emitter.addText(e),t})(e),r=n.filter(E).filter(y).map((t=>h(t,e,!1))) -;r.unshift(i);const s=r.sort(((e,t)=>{ -if(e.relevance!==t.relevance)return t.relevance-e.relevance -;if(e.language&&t.language){if(E(e.language).supersetOf===t.language)return 1 -;if(E(t.language).supersetOf===e.language)return-1}return 0})),[o,a]=s,c=o -;return c.secondBest=a,c}function p(e){let t=null;const n=(e=>{ -let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"" -;const n=g.languageDetectRe.exec(t);if(n){const t=E(n[1]) -;return t||(U(a.replace("{}",n[1])), -U("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"} -return t.split(/\s+/).find((e=>d(e)||E(e)))})(e);if(d(n))return -;w("before:highlightElement",{el:e,language:n -}),!g.ignoreUnescapedHTML&&e.children.length>0&&(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), -console.warn("https://github.com/highlightjs/highlight.js/issues/2886"), -console.warn(e)),t=e;const i=t.textContent,s=n?u(i,{language:n,ignoreIllegals:!0 -}):f(i);e.innerHTML=s.value,((e,t,n)=>{const i=t&&r[t]||n -;e.classList.add("hljs"),e.classList.add("language-"+i) -})(e,n,s.language),e.result={language:s.language,re:s.relevance, -relevance:s.relevance},s.secondBest&&(e.secondBest={ -language:s.secondBest.language,relevance:s.secondBest.relevance -}),w("after:highlightElement",{el:e,result:s,text:i})}let b=!1;function m(){ -"loading"!==document.readyState?document.querySelectorAll(g.cssSelector).forEach(p):b=!0 -}function E(e){return e=(e||"").toLowerCase(),t[e]||t[r[e]]} -function x(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{ -r[e.toLowerCase()]=t}))}function y(e){const t=E(e) -;return t&&!t.disableAutodetect}function w(e,t){const n=e;s.forEach((e=>{ -e[n]&&e[n](t)}))} -"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{ -b&&m()}),!1),Object.assign(e,{highlight:u,highlightAuto:f,highlightAll:m, -highlightElement:p, -highlightBlock:e=>(z("10.7.0","highlightBlock will be removed entirely in v12.0"), -z("10.7.0","Please use highlightElement now."),p(e)),configure:e=>{g=V(g,e)}, -initHighlighting:()=>{ -m(),z("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")}, -initHighlightingOnLoad:()=>{ -m(),z("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.") -},registerLanguage:(n,i)=>{let r=null;try{r=i(e)}catch(e){ -if($("Language definition for '{}' could not be registered.".replace("{}",n)), -!o)throw e;$(e),r=l} -r.name||(r.name=n),t[n]=r,r.rawDefinition=i.bind(null,e),r.aliases&&x(r.aliases,{ -languageName:n})},unregisterLanguage:e=>{delete t[e] -;for(const t of Object.keys(r))r[t]===e&&delete r[t]}, -listLanguages:()=>Object.keys(t),getLanguage:E,registerAliases:x, -autoDetection:y,inherit:V,addPlugin:e=>{(e=>{ -e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{ -e["before:highlightBlock"](Object.assign({block:t.el},t)) -}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{ -e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),s.push(e)} -}),e.debugMode=()=>{o=!1},e.safeMode=()=>{o=!0},e.versionString="11.0.1" -;for(const e in M)"object"==typeof M[e]&&n(M[e]);return Object.assign(e,M),e -})({}),Y=Object.freeze({__proto__:null});const Q=J -;for(const e of Object.keys(Y)){const t=e.replace("grmr_","") -;Q.registerLanguage(t,Y[e])}return Q}() -;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);hljs.registerLanguage("scheme",(()=>{"use strict";return e=>{ -const t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",n={$pattern:t, -built_in:"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?" -},r={className:"literal",begin:"(#t|#f|#\\\\"+t+"|#\\\\.)"},a={ -className:"number",variants:[{begin:"(-|\\+)?\\d+([./]\\d+)?",relevance:0},{ -begin:"(-|\\+)?\\d+([./]\\d+)?[+\\-](-|\\+)?\\d+([./]\\d+)?i",relevance:0},{ -begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{ -begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},i=e.QUOTE_STRING_MODE,c=[e.COMMENT(";","$",{ -relevance:0}),e.COMMENT("#\\|","\\|#")],s={begin:t,relevance:0},l={ -className:"symbol",begin:"'"+t},o={endsWithParent:!0,relevance:0},g={variants:[{ -begin:/'/},{begin:"`"}],contains:[{begin:"\\(",end:"\\)", -contains:["self",r,i,a,s,l]}]},u={className:"name",relevance:0,begin:t, -keywords:n},d={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}], -contains:[{begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[u,{ -endsParent:!0,variants:[{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/}], -contains:[s]}]},u,o]};return o.contains=[r,a,i,s,l,g,d].concat(c),{ -name:"Scheme",illegal:/\S/,contains:[e.SHEBANG(),a,i,l,g,d].concat(c)}}})());hljs.registerLanguage("clojure",(()=>{"use strict";return e=>{ -const t="a-zA-Z_\\-!.?+*=<>&#'",n="["+t+"]["+t+"0-9/;:]*",r="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",a={ -$pattern:n, -built_in:r+" cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize" -},s={begin:n,relevance:0},o={className:"number",begin:"[-+]?\\d+(\\.\\d+)?", -relevance:0},i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null -}),c=e.COMMENT(";","$",{relevance:0}),d={className:"literal", -begin:/\b(true|false|nil)\b/},l={begin:"[\\[\\{]",end:"[\\]\\}]",relevance:0 -},m={className:"comment",begin:"\\^"+n},p=e.COMMENT("\\^\\{","\\}"),u={ -className:"symbol",begin:"[:]{1,2}"+n},f={begin:"\\(",end:"\\)"},h={ -endsWithParent:!0,relevance:0},y={keywords:a,className:"name",begin:n, -relevance:0,starts:h},g=[f,i,m,p,c,u,l,o,d,s],b={beginKeywords:r,keywords:{ -$pattern:n,keyword:r},end:'(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',contains:[{ -className:"title",begin:n,relevance:0,excludeEnd:!0,endsParent:!0}].concat(g)} -;return f.contains=[e.COMMENT("comment",""),b,y,h], -h.contains=g,l.contains=g,p.contains=[l],{name:"Clojure",aliases:["clj"], -illegal:/\S/,contains:[f,i,m,p,c,u,l,o,d]}}})());hljs.registerLanguage("bash",(()=>{"use strict";function e(...e){ -return e.map((e=>{return(s=e)?"string"==typeof s?s:s.source:null;var s -})).join("")}return s=>{const n={},t={begin:/\$\{/,end:/\}/,contains:["self",{ -begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{ -begin:e(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},t]});const a={ -className:"subst",begin:/\$\(/,end:/\)/,contains:[s.BACKSLASH_ESCAPE]},i={ -begin:/<<-?\s*(?=\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\w+)/, -end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/, -contains:[s.BACKSLASH_ESCAPE,n,a]};a.contains.push(c);const o={begin:/\$\(\(/, -end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},s.NUMBER_MODE,n] -},r=s.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 -}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, -contains:[s.inherit(s.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ -name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z._-]+\b/, -keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"], -literal:["true","false"], -built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp" -},contains:[r,s.SHEBANG(),l,o,s.HASH_COMMENT_MODE,i,c,{className:"",begin:/\\"/ -},{className:"string",begin:/'/,end:/'/},n]}}})());hljs.registerLanguage("lisp",(()=>{"use strict";return e=>{ -var n="[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*",a="\\|[^]*?\\|",i="(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|-)?\\d+)?",s={ -className:"literal",begin:"\\b(t{1}|nil)\\b"},l={className:"number",variants:[{ -begin:i,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{ -begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{ -begin:"#(c|C)\\("+i+" +"+i,end:"\\)"}]},b=e.inherit(e.QUOTE_STRING_MODE,{ -illegal:null}),g=e.COMMENT(";","$",{relevance:0}),r={begin:"\\*",end:"\\*"},t={ -className:"symbol",begin:"[:&]"+n},c={begin:n,relevance:0},d={begin:a},o={ -contains:[l,b,r,t,{begin:"\\(",end:"\\)",contains:["self",s,b,l,c]},c], -variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{ -name:"quote"}},{begin:"'"+a}]},v={variants:[{begin:"'"+n},{ -begin:"#'"+n+"(::"+n+")*"}]},m={begin:"\\(\\s*",end:"\\)"},u={endsWithParent:!0, -relevance:0};return m.contains=[{className:"name",variants:[{begin:n,relevance:0 -},{begin:a}]},u],u.contains=[o,v,m,s,l,b,g,r,t,d,c],{name:"Lisp",illegal:/\S/, -contains:[l,e.SHEBANG(),s,b,g,o,v,m,c]}}})());hljs.registerLanguage("css",(()=>{"use strict" -;const e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],o=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],r=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse() -;return n=>{const a=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},HEXCOLOR:{ -scope:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"}, -ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$", -contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{ -scope:"number", -begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", -relevance:0}}))(n),l=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS", -case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"}, -classNameAliases:{keyframePosition:"selector-tag"}, -contains:[n.C_BLOCK_COMMENT_MODE,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/ -},a.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0 -},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0 -},a.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{ -begin:":("+i.join("|")+")"},{begin:"::("+o.join("|")+")"}]},{ -className:"attribute",begin:"\\b("+r.join("|")+")\\b"},{begin:":",end:"[;}]", -contains:[a.HEXCOLOR,a.IMPORTANT,a.CSS_NUMBER_MODE,...l,{ -begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri" -},contains:[{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}] -},{className:"built_in",begin:/[\w-]+(?=\()/}]},{ -begin:(s=/@/,((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(?=",s,")")), -end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword", -begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0, -relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only", -attribute:t.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute" -},...l,a.CSS_NUMBER_MODE]}]},{className:"selector-tag", -begin:"\\b("+e.join("|")+")\\b"}]};var s}})());hljs.registerLanguage("vim",(()=>{"use strict";return e=>({name:"Vim Script", -keywords:{$pattern:/[!#@\w]+/, -keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank", -built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp" -},illegal:/;/,contains:[e.NUMBER_MODE,{className:"string",begin:"'",end:"'", -illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/ -},e.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]+/},{ -begin:[/\b(?:function|function!)/,/\s+/,e.IDENT_RE],className:{1:"keyword", -3:"title"},end:"$",relevance:0,contains:[{className:"params",begin:"\\(", -end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]})})());hljs.registerLanguage("xml",(()=>{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")} -function a(...n){return n.map((n=>e(n))).join("")}function s(...n){ -return"("+((e=>{const n=e[e.length-1] -;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} -})(n).capture?"":"?:")+n.map((n=>e(n))).join("|")+")"}return e=>{ -const t=a(/[A-Z_]/,a("(?:",/[A-Z0-9_.-]*:/,")?"),/[A-Z0-9_.-]*/),i={ -className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/, -contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}] -},r=e.inherit(c,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{ -className:"string"}),g=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),m={ -endsWithParent:!0,illegal:/`]+/}]}]}]};return{ -name:"HTML, XML", -aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"], -case_insensitive:!0,contains:[{className:"meta",begin://, -relevance:10,contains:[c,g,l,r,{begin:/\[/,end:/\]/,contains:[{className:"meta", -begin://,contains:[c,r,g,l]}]}]},e.COMMENT(//,{ -relevance:10}),{begin://,relevance:10},i,{ -className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag", -begin:/)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{ -end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag", -begin:/)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{ -end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{ -className:"tag",begin:/<>|<\/>/},{className:"tag", -begin:a(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name", -begin:t,relevance:0,starts:m}]},{className:"tag",begin:a(/<\//,n(a(t,/>/))), -contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0, -endsParent:!0}]}]}}})());hljs.registerLanguage("markdown",(()=>{"use strict";function n(...n){ -return n.map((n=>{return(e=n)?"string"==typeof e?e:e.source:null;var e -})).join("")}return e=>{const a={begin:/<\/?[A-Za-z_]/,end:">", -subLanguage:"xml",relevance:0},i={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0 -},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, -relevance:2},{begin:n(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/), -relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{ -begin:/\[.+?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{ -className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0, -returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)", -excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[", -end:"\\]",excludeBegin:!0,excludeEnd:!0}]},s={className:"strong",contains:[], -variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},c={ -className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{ -begin:/_(?!_)/,end:/_/,relevance:0}]};s.contains.push(c),c.contains.push(s) -;let t=[a,i] -;return s.contains=s.contains.concat(t),c.contains=c.contains.concat(t), -t=t.concat(s,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{ -className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:t},{ -begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n", -contains:t}]}]},a,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", -end:"\\s+",excludeEnd:!0},s,c,{className:"quote",begin:"^>\\s+",contains:t, -end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{ -begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{ -begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))", -contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ -begin:"^[-\\*]{3,}",end:"$"},i,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ -className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ -className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}})());hljs.registerLanguage("scss",(()=>{"use strict" -;const e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],t=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],i=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],r=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],o=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse() -;return a=>{const n=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},HEXCOLOR:{ -scope:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"}, -ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$", -contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{ -scope:"number", -begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", -relevance:0}}))(a),l=r,s=i,d="@[a-z-]+",c={className:"variable", -begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"};return{name:"SCSS",case_insensitive:!0, -illegal:"[=/|']",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{ -className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{ -className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0 -},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag", -begin:"\\b("+e.join("|")+")\\b",relevance:0},{className:"selector-pseudo", -begin:":("+s.join("|")+")"},{className:"selector-pseudo", -begin:"::("+l.join("|")+")"},c,{begin:/\(/,end:/\)/,contains:[n.CSS_NUMBER_MODE] -},{className:"attribute",begin:"\\b("+o.join("|")+")\\b"},{ -begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" -},{begin:":",end:";", -contains:[c,n.HEXCOLOR,n.CSS_NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,n.IMPORTANT] -},{begin:"@(page|font-face)",keywords:{$pattern:d,keyword:"@page @font-face"}},{ -begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/, -keyword:"and or not only",attribute:t.join(" ")},contains:[{begin:d, -className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute" -},c,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,n.HEXCOLOR,n.CSS_NUMBER_MODE]}]}} -})());hljs.registerLanguage("diff",(()=>{"use strict";function e(...e){ -return"("+((e=>{const n=e[e.length-1] -;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} -})(e).capture?"":"?:")+e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null -;var n})).join("|")+")"}return n=>({name:"Diff",aliases:["patch"],contains:[{ -className:"meta",relevance:10, -match:e(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/) -},{className:"comment",variants:[{ -begin:e(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/), -end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{ -className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/, -end:/$/}]})})());hljs.registerLanguage("plaintext",(()=>{"use strict";return t=>({ -name:"Plain text",aliases:["text","txt"],disableAutodetect:!0})})());hljs.registerLanguage("ruby",(()=>{"use strict";function e(e){ -return n("(?=",e,")")}function n(...e){return e.map((e=>{ -return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return a=>{ -const i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s={ -keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__", -built_in:"proc lambda",literal:"true false nil"},r={className:"doctag", -begin:"@[A-Za-z]+"},b={begin:"#<",end:">"},c=[a.COMMENT("#","$",{contains:[r] -}),a.COMMENT("^=begin","^=end",{contains:[r],relevance:10 -}),a.COMMENT("^__END__","\\n$")],t={className:"subst",begin:/#\{/,end:/\}/, -keywords:s},g={className:"string",contains:[a.BACKSLASH_ESCAPE,t],variants:[{ -begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/, -end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{ -begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/, -end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{ -begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{ -begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{ -begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{ -begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{ -begin:n(/<<[-~]?'?/,e(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)), -contains:[a.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/, -contains:[a.BACKSLASH_ESCAPE,t]})]}]},d="[0-9](_?[0-9])*",l={className:"number", -relevance:0,variants:[{ -begin:`\\b([1-9](_?[0-9])*|0)(\\.(${d}))?([eE][+-]?(${d})|r)?i?\\b`},{ -begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b" -},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{ -begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{ -begin:"\\b0(_?[0-7])+r?i?\\b"}]},o={className:"params",begin:"\\(",end:"\\)", -endsParent:!0,keywords:s},_=[g,{className:"class",beginKeywords:"class module", -end:"$|;",illegal:/=/,contains:[a.inherit(a.TITLE_MODE,{ -begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{ -begin:"("+a.IDENT_RE+"::)?"+a.IDENT_RE,relevance:0}]}].concat(c)},{ -className:"function",begin:n(/def\s+/,e(i+"\\s*(\\(|;|$)")),relevance:0, -keywords:"def",end:"$|;",contains:[a.inherit(a.TITLE_MODE,{begin:i -}),o].concat(c)},{begin:a.IDENT_RE+"::"},{className:"symbol", -begin:a.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol", -begin:":(?!\\s)",contains:[g,{begin:i}],relevance:0},l,{className:"variable", -begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{ -className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:s},{ -begin:"("+a.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{ -className:"regexp",contains:[a.BACKSLASH_ESCAPE,t],illegal:/\n/,variants:[{ -begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(", -end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}] -}].concat(b,c),relevance:0}].concat(b,c);t.contains=_,o.contains=_;const E=[{ -begin:/^\s*=>/,starts:{end:"$",contains:_}},{className:"meta", -begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])", -starts:{end:"$",contains:_}}];return c.unshift(b),{name:"Ruby", -aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/, -contains:[a.SHEBANG({binary:"ruby"})].concat(E).concat(c).concat(_)}}})());hljs.registerLanguage("yaml",(()=>{"use strict";return e=>{ -const n="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={ -className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/ -},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable", -variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=e.inherit(s,{ -variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={ -end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},t={begin:/\{/, -end:/\}/,contains:[l],illegal:"\\n",relevance:0},g={begin:"\\[",end:"\\]", -contains:[l],illegal:"\\n",relevance:0},b=[{className:"attr",variants:[{ -begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{ -begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)"}]},{className:"meta",begin:"^---\\s*$", -relevance:10},{className:"string", -begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{ -begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0, -relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type", -begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a -},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta", -begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)", -relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{ -className:"number", -begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b" -},{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},t,g,s],c=[...b] -;return c.pop(),c.push(i),l.contains=c,{name:"YAML",case_insensitive:!0, -aliases:["yml"],contains:b}}})());hljs.registerLanguage("rust",(()=>{"use strict";function e(...e){ -return e.map((e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t -})).join("")}return t=>{const n={className:"title.function.invoke",relevance:0, -begin:e(/\b/,/(?!let\b)/,t.IDENT_RE,(a=/\s*\(/,e("(?=",a,")")))};var a -;const r="([ui](8|16|32|64|128|size)|f(32|64))?",i=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","panic!","file!","format!","format_args!","include_bin!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"] -;return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?", -type:["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"], -keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"], -literal:["true","false","Some","None","Ok","Err"],built_in:i},illegal:""},n]}}})());hljs.registerLanguage("javascript",(()=>{"use strict" -;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],t=["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],s=["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],i=["arguments","this","super","console","window","document","localStorage","module","global"],c=[].concat(r,t,s) -;function o(e){return l("(?=",e,")")}function l(...e){return e.map((e=>{ -return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return b=>{ -const g=e,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/, -isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index,t=e.input[a] -;"<"!==t?">"===t&&(((e,{after:n})=>{const a="",B={ -match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,o(C)],className:{1:"keyword", -3:"title.function"},contains:[w]};return{name:"Javascript", -aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:S}, -illegal:/#(?![$_A-z])/,contains:[b.SHEBANG({label:"shebang",binary:"node", -relevance:5}),{label:"use_strict",className:"meta",relevance:10, -begin:/^\s*['"]use (strict|asm)['"]/ -},b.APOS_STRING_MODE,b.QUOTE_STRING_MODE,N,f,A,v,y,O,{className:"attr", -begin:g+o(":"),relevance:0},B,{ -begin:"("+b.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", -keywords:"return throw case",relevance:0,contains:[v,b.REGEXP_MODE,{ -className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{ -className:"params",variants:[{begin:b.UNDERSCORE_IDENT_RE,relevance:0},{ -className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0, -excludeEnd:!0,keywords:u,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/, -relevance:0},{variants:[{begin:"<>",end:""},{begin:d.begin, -"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{ -begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},I,{ -beginKeywords:"while if switch catch for"},{ -begin:"\\b(?!function)"+b.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", -returnBegin:!0,label:"func.def",contains:[w,b.inherit(b.TITLE_MODE,{begin:g, -className:"title.function"})]},{match:/\.\.\./,relevance:0},M,{match:"\\$"+g, -relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"}, -contains:[w]},T,{relevance:0,match:/\b[A-Z][A-Z_]+\b/, -className:"variable.constant"},R,k,{match:/\$[(.]/}]}}})());hljs.registerLanguage("json",(()=>{"use strict";return e=>({name:"JSON", -contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01 -},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,{ -beginKeywords:"true false null" -},e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}) -})()); \ No newline at end of file diff --git a/docs/theme/index.hbs b/docs/theme/index.hbs deleted file mode 100644 index 966eedb..0000000 --- a/docs/theme/index.hbs +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - {{ title }} - {{#if is_print }} - - {{/if}} - {{#if base_url}} - - {{/if}} - - - - {{> head}} - - - - - - - {{#if favicon_svg}} - - {{/if}} - {{#if favicon_png}} - - {{/if}} - - - - {{#if print_enable}} - - {{/if}} - - - - {{#if copy_fonts}} - - {{/if}} - - - - - - - - {{#each additional_css}} - - {{/each}} - - {{#if mathjax_support}} - - - {{/if}} - - - - - - - - - - - - - - - - -
- -
- {{> header}} - - - - {{#if search_enabled}} - - {{/if}} - - - - -
-
- {{{ content }}} -
- - -
-
- - - -
- - {{#if livereload}} - - - {{/if}} - - {{#if google_analytics}} - - - {{/if}} - - {{#if playground_line_numbers}} - - {{/if}} - - {{#if playground_copyable}} - - {{/if}} - - {{#if playground_js}} - - - - - - {{/if}} - - {{#if search_js}} - - - - {{/if}} - - - - - - - {{#each additional_js}} - - {{/each}} - - {{#if is_print}} - {{#if mathjax_support}} - - {{else}} - - {{/if}} - {{/if}} - - -