commit b3cbc07316cfe3a24e09fdc0b1c146f8b770a662
parent f6109e865a8c1393c5c55da33fc4d0ec0411ae21
Author: maydayv7 <maydayv7@gmail.com>
Date: Sat, 6 Jun 2026 18:30:49 +0530
feat(site): Updates
- Update to Zola 22
- Fix search and anchor links
- Update syntax highlighting and lazy-load images
- Support GitHub alerts
- Update icon
Diffstat:
28 files changed, 2252 insertions(+), 523 deletions(-)
diff --git a/site/.gitignore b/site/.gitignore
@@ -2,3 +2,4 @@ public
.wrangler
node_modules
static/processed_images
+static/giallo.css
diff --git a/site/config.toml b/site/config.toml
@@ -1,98 +0,0 @@
-# Site URL
-base_url = "/"
-title = "maydayv7"
-description = "My Personal Website"
-
-# Default Language used in Feeds
-default_language = "en"
-
-# Compile all '.scss' files in './sass'
-compile_sass = true
-
-# Build search index to be used later by JS Library
-build_search_index = true
-
-# RSS Feed
-generate_feeds = true
-feed_filenames = ["rss.xml"]
-
-# Taxonomies
-# See <https://www.getzola.org/documentation/content/taxonomies/>
-taxonomies = [
- { name = "series", feed = true, paginate_by = 10 },
- { name = "tags", feed = true, paginate_by = 10 },
-]
-
-[markdown]
-# Syntax Highlighting
-highlight_code = true
-highlight_theme = "css"
-
-# Parser Settings
-render_emoji = true
-smart_punctuation = false
-
-# External Link Settings
-external_links_target_blank = true
-external_links_no_follow = true
-external_links_no_referrer = true
-
-[search]
-# Site Search Settings
-include_title = true
-include_description = false
-include_path = false
-include_content = true
-
-[extra]
-# Site Theme
-theme_color = "red"
-color_schemes = ["black", "blue", "red"]
-
-# Enable Math Typesetting with KaTeX
-# Use 'math=true' in [extra] on individual pages
-math_katex = true
-
-# Generate Table of Contents for all articles
-# Use 'ToC = true' in [extra] on individual pages
-table_of_contents = false
-
-# Logo
-favicon = "desktop.ico"
-logo_text = "maydayv7"
-center = true
-
-# Allow Editing Articles
-# Use 'edit = true' in [extra] on individual pages
-edit_page = true
-repo_url = "https://github.com/maydayv7/dotfiles/blob/stable/site"
-
-# License
-author = "maydayv7"
-copyright = "V7"
-google_analytics_tracking_id = "G-26PNXDYZNZ"
-
-# Page Comments
-# Use 'comments = true' in [extra] on individual pages
-disqus = { enabled = false, short_name = "maydayv7" }
-giscus = { enabled = true, repo = "maydayv7/dotfiles", repo_id = "R_kgDOHEEEUA", category = "Site", category_id = "DIC_kwDOHEEEUM4C0c1O" }
-
-# Main Menu
-main_menu_items = [
- { url = "/blog/", name="Blog" },
- { url = "/projects/", name="Projects" },
- { url = "/about/", name="About" },
- { url = "https://git.maydayv7.cc", name="Git", external = true },
-]
-
-# Socials Bar
-email = "mailto:mail@maydayv7.cc"
-feed_path = "/rss.xml"
-reddit_profile = "https://reddit.com/u/maydayv7"
-github_profile = "https://github.com/maydayv7"
-discord_profile = "https://discord.com/users/519513852648357929"
-
-# Webring
-webring = true
-webring_name = "❄️"
-webring_url = "https://nixwebr.ing"
diff --git a/site/content/blog/nixos/prelude.md b/site/content/blog/nixos/prelude.md
@@ -32,10 +32,8 @@ But you also know the **fear**.
The fear that if you delete the wrong file, mess with the wrong package, or even upgrade to a new release, your computer might implode, and you'll have no idea how to get back to the way things were.
-> That's \*\*\*\*\*\*\* it I'm switching back to Windows forever
->
-> --> **Me**
-> ~~(right after the 69420th distro-hop that caused my system to crash and burn)~~
+> That's \*\*\*\*\*\*\* it I'm switching back to Windows forever
+> --> **Me** ~~(right after the 69420th distro-hop that caused my system to crash and burn)~~
**NixOS is different.**
diff --git a/site/content/test.md b/site/content/test.md
@@ -57,15 +57,19 @@ fn foo(arg: String) -> Result<u32, Io::Error> {
| 3 | C | # |
| 4 | D | $ |
-## Block Quote
+## Alerts
-> Do not fall in love with people like me. I will take you to museums, and parks, and monuments, and kiss you in every beautiful place, so that you can never go back to them without tasting me like blood in your mouth. I will destroy you in the most beautiful way possible. And when I leave you will finally understand, why storms are named after people.
->
+> [!WARNING]
+> Do not fall in love with people like me.
+> I will take you to museums, and parks, and monuments, and kiss you in every beautiful place, so that you can never go back to them without tasting me like blood in your mouth.
+> I will destroy you in the most beautiful way possible.
+> And when I leave you will finally understand, why storms are named after people.
> --> **Caitlyn Siehl**
->
-> > Heroes get remembered, but legends never die
-> >
-> > --> **Babe Ruth**
+
+## Block Quote
+
+> Heroes get remembered, but legends never die.
+> --> **Babe Ruth**
## Math
diff --git a/site/flake.lock b/site/flake.lock
@@ -7,11 +7,11 @@
]
},
"locked": {
- "lastModified": 1773297127,
- "narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=",
+ "lastModified": 1780220602,
+ "narHash": "sha256-eynAfOmbmxJnkp7YewvCEbShNnnYJ9gLLqkzsYtBPeM=",
"owner": "numtide",
"repo": "treefmt-nix",
- "rev": "71b125cd05fbfd78cab3e070b73544abe24c5016",
+ "rev": "db947814a175b7ca6ded66e21383d938df01c227",
"type": "github"
},
"original": {
@@ -27,11 +27,11 @@
]
},
"locked": {
- "lastModified": 1772408722,
- "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
+ "lastModified": 1778716662,
+ "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
+ "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb",
"type": "github"
},
"original": {
@@ -42,16 +42,16 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1773375660,
- "narHash": "sha256-SEzUWw2Rf5Ki3bcM26nSKgbeoqi2uYy8IHVBqOKjX3w=",
+ "lastModified": 1780243769,
+ "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "3e20095fe3c6cbb1ddcef89b26969a69a1570776",
+ "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c",
"type": "github"
},
"original": {
"owner": "NixOS",
- "ref": "nixos-25.11",
+ "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
diff --git a/site/flake.nix b/site/flake.nix
@@ -2,7 +2,7 @@
description = "My Personal Website";
inputs = {
- nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-25.11";
+ nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
systems = {
url = "github:maydayv7/dotfiles?ref=systems";
flake = false;
diff --git a/site/git/default.nix b/site/git/default.nix
@@ -36,13 +36,14 @@ recursiveUpdate
];
text = ''
+
set -e
echo "Building Site..."
BASE_URL=${site}
OUTPUT_DIR="./public"
FONTS_SRC="./site/static/fonts"
- FAVICON_SRC="./site/static/desktop.ico"
+ FAVICON_SRC="./site/static/website.ico"
mkdir -p "$OUTPUT_DIR"
mkdir -p "$OUTPUT_DIR/fonts"
diff --git a/site/git/theme.nix b/site/git/theme.nix
@@ -5,26 +5,27 @@ let
name: colors:
with colors;
pkgs.writeText "style-${name}.css" ''
- ${style}
- :root {
- --bg: ${bg};
- --fg: ${fg};
- --fg-dim: ${fgDim};
- --border: ${border};
- --border-subtle: rgba(255, 255, 255, 0.05);
-
- /* Theme Colors */
- --accent: ${accent};
- --accent-alpha-70: ${accentAlpha70};
- --secondary: ${secondary};
- --secondary-alpha-20: ${secondaryAlpha20};
- --secondary-alpha-70: ${secondaryAlpha70};
- --bg-hover: rgba(255, 255, 255, 0.03);
- --bg-code: rgba(0, 0, 0, 0.2);
- --diff-add: ${diffAdd};
- --diff-del: ${diffDel};
- --diff-mod: ${diffMod};
- }
+
+ ${style}
+ :root {
+ --bg: ${bg};
+ --fg: ${fg};
+ --fg-dim: ${fgDim};
+ --border: ${border};
+ --border-subtle: rgba(255, 255, 255, 0.05);
+
+ /* Theme Colors */
+ --accent: ${accent};
+ --accent-alpha-70: ${accentAlpha70};
+ --secondary: ${secondary};
+ --secondary-alpha-20: ${secondaryAlpha20};
+ --secondary-alpha-70: ${secondaryAlpha70};
+ --bg-hover: rgba(255, 255, 255, 0.03);
+ --bg-code: rgba(0, 0, 0, 0.2);
+ --diff-add: ${diffAdd};
+ --diff-del: ${diffDel};
+ --diff-mod: ${diffMod};
+ }
'';
in
{
diff --git a/site/sass/_header.scss b/site/sass/_header.scss
@@ -77,7 +77,6 @@
}
@media (max-width: $phone-max-width) {
- dislay: block;
@include menu;
position: absolute;
padding-top: 15px;
diff --git a/site/sass/_main.scss b/site/sass/_main.scss
@@ -95,7 +95,7 @@ h5,
h6 {
line-height: 1.2;
- &:not(first-child) {
+ &:not(:first-child) {
margin-top: 40px;
}
diff --git a/site/sass/_post.scss b/site/sass/_post.scss
@@ -1,23 +1,87 @@
@import "variables";
blockquote {
- border-left: 4px solid var(--accent-alpha-70);
color: var(--color);
font-style: italic;
- padding: 1em 10px 1px 50px;
+ margin-left: 0.5em;
+ padding: 1em 10px 1px 20px;
position: relative;
- &:after {
- content: "";
- }
-
&:before {
color: var(--accent-alpha-70);
content: "\201C";
font-size: 3em;
- left: 10px;
position: absolute;
top: -10px;
+ left: 0;
+ }
+
+ &:after {
+ content: "";
+ }
+
+ // GitHub Alerts
+ &[class*="markdown-alert"] {
+ border-left: 4px solid;
+ font-style: normal;
+ padding: 0.25em 1em 0.25em 2em;
+ position: relative;
+
+ &:before {
+ position: absolute;
+ left: 0.4em;
+ font-size: 1.5em;
+ }
+
+ p {
+ margin: 0.25em 0;
+ }
+ }
+
+ &.markdown-alert-note {
+ border-left-color: var(--accent-secondary);
+
+ &:before {
+ content: "ℹ";
+ color: var(--accent-secondary);
+ }
+ }
+
+ &.markdown-alert-tip {
+ border-left-color: var(--accent-secondary-alpha-70);
+
+ &:before {
+ content: "✦";
+ color: var(--accent-secondary-alpha-70);
+ }
+ }
+
+ &.markdown-alert-important {
+ border-left-color: var(--accent);
+
+ &:before {
+ content: "‼";
+ color: var(--accent);
+ }
+ }
+
+ &.markdown-alert-warning {
+ border-left-color: var(--accent-alpha-70);
+
+ &:before {
+ content: "⚠";
+ color: var(--accent-alpha-70);
+ }
+ }
+
+ &.markdown-alert-caution {
+ border-left-color: var(--accent);
+ background-color: var(--accent-alpha-20);
+
+ &:before {
+ content: "◆";
+ color: var(--accent);
+ }
}
}
diff --git a/site/sass/_search.scss b/site/sass/_search.scss
@@ -65,6 +65,7 @@
margin-bottom: 1rem;
.title {
+ margin-top: -3px;
margin-bottom: -3px;
}
@@ -73,6 +74,10 @@
font-size: $font-size;
margin-bottom: 0.5rem;
}
+
+ b {
+ color: var(--accent);
+ }
}
&__items {
diff --git a/site/sass/_syntax.scss b/site/sass/_syntax.scss
@@ -1,419 +1,292 @@
@import "variables";
-.z-code {
- color: var(--color);
- background-color: var(--accent-alpha-20);
-}
-
-.z-comment {
- color: var(--color);
+// Giallo structural classes
+.giallo-l {
+ display: inline-block;
+ min-height: 1lh;
+ width: 100%;
}
-.z-string {
- color: var(--color);
+.giallo-ln {
+ display: inline-block;
+ user-select: none;
+ margin-right: 0.4em;
+ padding: 0.4em;
+ min-width: 3ch;
+ text-align: right;
+ opacity: 0.8;
}
-.z-string.z-quoted.z-double,
-.z-string.z-quoted.z-single {
+// Base code block
+.z-code {
color: var(--color);
+ background-color: var(--accent-alpha-20);
}
-.z-meta.z-structure.z-dictionary.z-value.z-json {
- color: var(--accent);
- font-weight: bold;
-}
-
-.z-punctuation.z-separator.z-dictionary.z-key-value.z-json {
- color: var(--accent-alpha-70);
- font-weight: bold;
+// Highlighted lines
+.z-hl {
+ background-color: var(--accent-alpha-20);
}
-.z-string.z-quoted.z-double.z-json {
+// Comments
+.z-comment {
color: var(--color);
+ opacity: 0.6;
+ font-style: italic;
}
-.z-meta.z-structure.z-dictionary.z-json .z-string.z-quoted.z-double.z-json {
- color: var(--accent-secondary-alpha-70);
- font-weight: bold;
-}
-
-.z-meta.z-structure.z-dictionary.z-value.z-json
- .z-string.z-quoted.z-double.z-json {
- color: var(--color);
+// Keywords
+.z-keyword {
+ color: var(--accent-alpha-70);
}
-.z-punctuation.z-definition.z-string,
-.z-punctuation.z-definition.z-variable,
-.z-punctuation.z-definition.z-string,
-.z-punctuation.z-definition.z-parameters,
-.z-punctuation.z-definition.z-string,
-.z-punctuation.z-definition.z-array {
+// Storage
+.z-storage {
color: var(--accent);
- font-weight: bold;
}
-.z-punctuation.z-definition.z-tag.z-html {
- color: var(--background);
- font-weight: bold;
-}
-
-.z-punctuation.z-section.z-block.z-js {
- color: var(--background);
- font-weight: bold;
+.z-storage.z-type {
+ color: var(--accent-secondary);
}
-.z-punctuation.z-section.z-group.z-js {
+.z-storage.z-modifier {
color: var(--accent);
font-weight: bold;
}
-.z-punctuation.z-section.z-block.z-begin.z-php,
-.z-punctuation.z-section.z-block.z-end.z-php {
- color: var(--background);
- font-weight: bold;
-}
-
-.z-punctuation.z-section.z-dictionary.z-begin.z-json,
-.z-punctuation.z-section.z-dictionary.z-end.z-json {
- color: var(--background);
- font-weight: bold;
+// Constants
+.z-constant {
+ color: var(--accent-alpha-70);
}
-.z-source.z-scss {
- color: var(--background);
+.z-constant.z-character {
+ color: var(--accent-secondary-alpha-70);
font-weight: bold;
}
-.z-constant.z-numeric {
- color: var(--accent-alpha-70);
-}
-
-.z-constant.z-language {
+// Strings
+.z-string {
color: var(--color);
}
-.z-constant.z-language.z-json {
- color: var(--accent);
- font-weight: bold;
+.z-string.z-comment {
+ color: var(--color);
+ opacity: 0.6;
}
-.z-constant.z-character,
-.z-constant.z-other {
+.z-string.z-regexp {
color: var(--accent-secondary-alpha-70);
- font-weight: bold;
-}
-
-.z-constant.z-other.z-color.z-rgb-value.z-css {
- color: var(--color);
}
+// Variables
.z-variable {
color: var(--accent-secondary);
font-weight: bold;
}
-.z-variable.z-sass {
- color: var(--accent-secondary);
-}
-
-.z-variable.z-other.z-member.z-php {
- color: var(--accent-secondary);
-}
-
-.z-variable.z-other.z-readwrite.z-instance.z-ruby {
+.z-variable.z-language {
color: var(--accent);
}
-.z-variable.z-other.z-less {
- color: var(--accent-secondary-alpha-70);
-}
-
-.z-variable.z-language.z-this.z-js {
- color: var(--accent);
-}
-
-.z-variable.z-function.z-js {
- color: var(--accent-secondary-alpha-70);
-}
-
-.z-variable.z-function.z-php {
- color: var(--accent-secondary);
+.z-variable.z-other {
+ color: var(--color);
}
-.z-variable.z-other.z-property.z-php {
+.z-variable.z-other.z-constant,
+.z-variable.z-other.z-enummember {
color: var(--accent-secondary-alpha-70);
+ font-weight: bold;
}
-.z-variable.z-language.z-php {
+.z-variable.z-parameter {
color: var(--color);
}
-.z-variable.z-other.z-php {
+.z-variable.z-parameter.z-function {
color: var(--color);
}
-.z-punctuation.z-definition.z-variable.z-php {
+// Entities
+.z-entity {
color: var(--accent-secondary-alpha-70);
}
-.z-punctuation.z-definition.z-tag.z-begin.z-html,
-.z-punctuation.z-definition.z-tag.z-end.z-html {
- color: var(--accent);
+.z-entity.z-name {
+ color: var(--accent-secondary-alpha-70);
font-weight: bold;
}
-.z-keyword {
+.z-entity.z-name.z-tag {
color: var(--accent-alpha-70);
+ font-weight: normal;
}
-.z-keyword.z-operator.z-arithmetic.z-js {
- color: var(--color);
-}
-
-.z-keyword.z-other.z-unit.z-css {
- color: var(--color);
-}
-
-.z-keyword.z-control.z-at-rule.z-css {
- color: var(--accent);
- font-weight: bold;
-}
-
-.z-punctuation.z-definition.z-keyword.z-css {
- color: var(--color);
-}
-
-.z-keyword.z-operator.z-new.z-js {
- color: var(--accent-alpha-70);
+.z-entity.z-name.z-constant {
+ color: var(--accent-secondary-alpha-70);
font-weight: bold;
}
-.z-keyword.z-control.z-import-export.z-js {
- color: var(--accent-alpha-70);
+.z-entity.z-other.z-attribute-name {
+ color: var(--accent-secondary);
font-style: italic;
}
-.z-keyword.z-control.z-php {
- color: var(--accent);
-}
-
-.z-keyword.z-other.z-use.z-php {
+// Support
+.z-support {
color: var(--accent-alpha-70);
- font-weight: bold;
-}
-
-.z-keyword.z-other.z-namespace.z-php {
- color: var(--accent);
-}
-
-.z-keyword.z-other.z-phpdoc.z-php {
- color: #9fa1b5;
}
-.z-storage {
- color: var(--accent);
+.z-support.z-constant {
+ color: var(--accent-alpha-70);
}
-.z-storage.z-modifier.z-php {
- color: var(--accent);
- font-weight: bold;
+.z-support.z-variable {
+ color: var(--accent-secondary);
}
-.z-storage.z-modifier.z-extends.z-php {
+.z-support.z-type,
+.z-support.z-class {
color: var(--color);
- font-style: italic;
}
-.z-storage.z-modifier.z-implements.z-php {
+// Punctuation
+.z-punctuation.z-definition.z-string {
color: var(--color);
- font-style: italic;
}
-.z-storage.z-type {
- color: var(--accent-secondary);
-}
-
-.z-storage.z-type.z-js {
- color: var(--accent);
- font-weight: bold;
-}
-
-.z-storage.z-type.z-function.z-js {
- color: var(--accent);
- font-weight: bold;
-}
-
-.z-storage.z-type.z-function.z-arrow.z-js {
- color: var(--accent);
-}
-
-.z-storage.z-type.z-class.z-php {
+.z-punctuation.z-definition.z-comment {
color: var(--color);
+ opacity: 0.6;
}
-.z-entity.z-name.z-class {
+.z-punctuation.z-definition.z-tag {
color: var(--accent);
font-weight: bold;
}
-.z-entity.z-other.z-inherited-class {
- color: var(--accent-secondary);
-}
-
-.z-entity.z-other.z-inherited-class.z-php {
+.z-punctuation.z-definition.z-variable {
color: var(--accent-secondary-alpha-70);
- font-weight: bold;
}
-.z-entity.z-name.z-function {
- color: var(--accent-secondary-alpha-70);
-}
-
-.z-entity.z-name.z-function.z-php {
- color: var(--accent-secondary-alpha-70);
- font-weight: bold;
-}
-
-.z-meta.z-block.z-php {
- color: var(--accent);
+.z-punctuation.z-separator.z-key-value {
+ color: var(--accent-alpha-70);
font-weight: bold;
}
-.z-meta.z-block.z-js {
+.z-punctuation.z-definition.z-deleted {
color: var(--accent);
}
-.z-meta.z-object-literal.z-key.z-js {
- color: var(--accent);
+.z-punctuation.z-definition.z-inserted {
+ color: var(--accent-secondary);
}
-.z-meta.z-property.z-object.z-js {
+// Meta
+.z-meta.z-property-name {
color: var(--accent-secondary);
}
-.z-meta.z-use.z-php {
+.z-meta.z-module-reference {
color: var(--accent-secondary-alpha-70);
font-weight: bold;
}
-.z-entity.z-name.z-namespace.z-php {
- color: var(--accent);
+.z-meta.z-separator {
+ color: var(--accent-alpha-70);
font-weight: bold;
}
-.z-support.z-other.z-namespace.z-php {
+// Source
+.z-source {
color: var(--color);
}
-.z-variable.z-parameter {
- color: var(--color);
+.z-source.z-regexp {
+ color: var(--accent-secondary-alpha-70);
}
-.z-entity.z-name.z-tag {
- color: var(--accent-alpha-70);
+// Invalid
+.z-invalid {
+ color: var(--color);
+ background-color: var(--accent-secondary);
}
-.z-punctuation.z-section.z-embedded.z-begin.z-blade,
-.z-punctuation.z-section.z-embedded.z-end.z-blade {
- color: var(--accent-alpha-70);
- font-weight: bold;
+.z-invalid.z-broken,
+.z-invalid.z-deprecated,
+.z-invalid.z-illegal,
+.z-invalid.z-unimplemented {
+ color: var(--accent);
+ font-style: italic;
}
-.z-punctuation.z-section.z-embedded.z-ignore.z-begin.z-blade,
-.z-punctuation.z-section.z-embedded.z-ignore.z-end.z-blade {
+// Markup
+.z-markup.z-heading {
color: var(--accent-secondary);
font-weight: bold;
}
-.z-entity.z-name.z-tag.z-localname.z-xml {
- color: var(--accent-secondary);
-}
-
-.z-entity.z-name.z-tag.z-inline.z-a.z-html,
-.z-entity.z-name.z-tag.z-inline.z-any.z-html,
-.z-entity.z-name.z-tag.z-block.z-any.z-html {
- color: var(--color);
-}
-
-.z-entity.z-other.z-attribute-name {
- color: var(--accent-secondary);
-}
-
-.z-text.z-html.z-basic .z-meta.z-tag.z-inline.z-a.z-html {
- color: var(--accent-secondary);
+.z-markup.z-quote {
+ color: var(--accent-secondary-alpha-70);
}
-.z-support.z-function {
- color: var(--accent-alpha-70);
+.z-markup.z-italic {
+ font-style: italic;
}
-.z-support.z-constant {
- color: var(--accent-alpha-70);
+.z-markup.z-bold {
+ font-weight: bold;
}
-.z-support.z-constant.z-property-value.z-css {
- color: var(--accent-secondary-alpha-70);
+.z-markup.z-underline {
+ text-decoration: underline;
}
-.z-support.z-type,
-.z-support.z-class {
- color: var(--color);
+.z-markup.z-strikethrough {
+ text-decoration: line-through;
}
-.z-support.z-class.z-php {
+.z-markup.z-deleted {
color: var(--accent);
- font-weight: bold;
}
-.z-support.z-other.z-variable {
+.z-markup.z-inserted {
color: var(--accent-secondary);
}
-.z-invalid {
- color: var(--color);
- background-color: var(--accent-secondary);
-}
-
-.z-invalid.z-deprecated {
- color: var(--color);
- background-color: var(--accent-secondary);
-}
-
-.z-keyword.z-control.z-pseudo-method.z-ruby {
+.z-markup.z-changed {
color: var(--accent-alpha-70);
}
-.z-punctuation.z-definition.z-variable.z-ruby {
- color: var(--accent-secondary);
-}
-
-.z-punctuation.z-separator.z-key-value {
- color: var(--accent-alpha-70);
- font-weight: bold;
+.z-markup.z-inline.z-raw {
+ color: var(--accent-secondary-alpha-70);
}
-.z-support.z-class.z-ruby {
- color: var(--accent);
+// Diff
+.z-meta.z-diff.z-range {
+ color: var(--accent-secondary);
font-weight: bold;
}
-.z-constant.z-other.z-symbol.z-ruby {
- color: var(--accent-secondary);
+.z-meta.z-diff.z-header {
+ color: var(--accent-secondary-alpha-70);
}
-.z-entity.z-name.z-type.z-class.z-ruby {
+.z-meta.z-diff.z-header.z-from-file {
color: var(--accent);
- font-weight: bold;
}
-.z-sublimelinter.z-gutter-mark {
- color: var(--color);
+.z-meta.z-diff.z-header.z-to-file {
+ color: var(--accent-secondary);
}
-.z-sublimelinter.z-mark.z-warning {
- color: var(--accent-secondary);
+// Misc
+.z-carriage-return {
+ color: var(--background);
+ background-color: var(--accent);
+ font-style: italic;
+ text-decoration: underline;
}
-.z-sublimelinter.z-mark.z-error {
- color: var(--accent-secondary);
+.z-message.z-error {
+ color: var(--accent);
}
diff --git a/site/static/desktop.ico b/site/static/desktop.ico
Binary files differ.
diff --git a/site/static/fuse.min.js b/site/static/fuse.min.js
@@ -0,0 +1,1821 @@
+/**
+ * Fuse.js v7.1.0 - Lightweight fuzzy-search (http://fusejs.io)
+ *
+ * Copyright (c) 2025 Kiro Risk (http://kiro.me)
+ * All Rights Reserved. Apache Software License 2.0
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ */
+var e, t;
+((e = this),
+ (t = function () {
+ "use strict";
+ function e(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ (t &&
+ (r = r.filter(function (t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ })),
+ n.push.apply(n, r));
+ }
+ return n;
+ }
+ function t(t) {
+ for (var n = 1; n < arguments.length; n++) {
+ var r = null != arguments[n] ? arguments[n] : {};
+ n % 2
+ ? e(Object(r), !0).forEach(function (e) {
+ o(t, e, r[e]);
+ })
+ : Object.getOwnPropertyDescriptors
+ ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r))
+ : e(Object(r)).forEach(function (e) {
+ Object.defineProperty(
+ t,
+ e,
+ Object.getOwnPropertyDescriptor(r, e),
+ );
+ });
+ }
+ return t;
+ }
+ function n(e) {
+ return (
+ (n =
+ "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
+ ? function (e) {
+ return typeof e;
+ }
+ : function (e) {
+ return e &&
+ "function" == typeof Symbol &&
+ e.constructor === Symbol &&
+ e !== Symbol.prototype
+ ? "symbol"
+ : typeof e;
+ }),
+ n(e)
+ );
+ }
+ function r(e, t) {
+ if (!(e instanceof t))
+ throw new TypeError("Cannot call a class as a function");
+ }
+ function i(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ ((r.enumerable = r.enumerable || !1),
+ (r.configurable = !0),
+ "value" in r && (r.writable = !0),
+ Object.defineProperty(e, v(r.key), r));
+ }
+ }
+ function u(e, t, n) {
+ return (
+ t && i(e.prototype, t),
+ n && i(e, n),
+ Object.defineProperty(e, "prototype", { writable: !1 }),
+ e
+ );
+ }
+ function o(e, t, n) {
+ return (
+ (t = v(t)) in e
+ ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ })
+ : (e[t] = n),
+ e
+ );
+ }
+ function c(e, t) {
+ if ("function" != typeof t && null !== t)
+ throw new TypeError(
+ "Super expression must either be null or a function",
+ );
+ ((e.prototype = Object.create(t && t.prototype, {
+ constructor: { value: e, writable: !0, configurable: !0 },
+ })),
+ Object.defineProperty(e, "prototype", { writable: !1 }),
+ t && s(e, t));
+ }
+ function a(e) {
+ return (
+ (a = Object.setPrototypeOf
+ ? Object.getPrototypeOf.bind()
+ : function (e) {
+ return e.__proto__ || Object.getPrototypeOf(e);
+ }),
+ a(e)
+ );
+ }
+ function s(e, t) {
+ return (
+ (s = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (e, t) {
+ return ((e.__proto__ = t), e);
+ }),
+ s(e, t)
+ );
+ }
+ function h(e, t) {
+ if (t && ("object" == typeof t || "function" == typeof t)) return t;
+ if (void 0 !== t)
+ throw new TypeError(
+ "Derived constructors may only return object or undefined",
+ );
+ return (function (e) {
+ if (void 0 === e)
+ throw new ReferenceError(
+ "this hasn't been initialised - super() hasn't been called",
+ );
+ return e;
+ })(e);
+ }
+ function l(e) {
+ var t = (function () {
+ if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
+ if (Reflect.construct.sham) return !1;
+ if ("function" == typeof Proxy) return !0;
+ try {
+ return (
+ Boolean.prototype.valueOf.call(
+ Reflect.construct(Boolean, [], function () {}),
+ ),
+ !0
+ );
+ } catch (e) {
+ return !1;
+ }
+ })();
+ return function () {
+ var n,
+ r = a(e);
+ if (t) {
+ var i = a(this).constructor;
+ n = Reflect.construct(r, arguments, i);
+ } else n = r.apply(this, arguments);
+ return h(this, n);
+ };
+ }
+ function f(e) {
+ return (
+ (function (e) {
+ if (Array.isArray(e)) return d(e);
+ })(e) ||
+ (function (e) {
+ if (
+ ("undefined" != typeof Symbol && null != e[Symbol.iterator]) ||
+ null != e["@@iterator"]
+ )
+ return Array.from(e);
+ })(e) ||
+ (function (e, t) {
+ if (e) {
+ if ("string" == typeof e) return d(e, t);
+ var n = Object.prototype.toString.call(e).slice(8, -1);
+ return (
+ "Object" === n && e.constructor && (n = e.constructor.name),
+ "Map" === n || "Set" === n
+ ? Array.from(e)
+ : "Arguments" === n ||
+ /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
+ ? d(e, t)
+ : void 0
+ );
+ }
+ })(e) ||
+ (function () {
+ throw new TypeError(
+ "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
+ );
+ })()
+ );
+ }
+ function d(e, t) {
+ (null == t || t > e.length) && (t = e.length);
+ for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
+ return r;
+ }
+ function v(e) {
+ var t = (function (e, t) {
+ if ("object" != typeof e || null === e) return e;
+ var n = e[Symbol.toPrimitive];
+ if (void 0 !== n) {
+ var r = n.call(e, t || "default");
+ if ("object" != typeof r) return r;
+ throw new TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return ("string" === t ? String : Number)(e);
+ })(e, "string");
+ return "symbol" == typeof t ? t : String(t);
+ }
+ function g(e) {
+ return Array.isArray ? Array.isArray(e) : "[object Array]" === M(e);
+ }
+ var y = 1 / 0;
+ function p(e) {
+ return null == e
+ ? ""
+ : (function (e) {
+ if ("string" == typeof e) return e;
+ var t = e + "";
+ return "0" == t && 1 / e == -y ? "-0" : t;
+ })(e);
+ }
+ function A(e) {
+ return "string" == typeof e;
+ }
+ function m(e) {
+ return "number" == typeof e;
+ }
+ function C(e) {
+ return (
+ !0 === e ||
+ !1 === e ||
+ ((function (e) {
+ return k(e) && null !== e;
+ })(e) &&
+ "[object Boolean]" == M(e))
+ );
+ }
+ function k(e) {
+ return "object" === n(e);
+ }
+ function E(e) {
+ return null != e;
+ }
+ function F(e) {
+ return !e.trim().length;
+ }
+ function M(e) {
+ return null == e
+ ? void 0 === e
+ ? "[object Undefined]"
+ : "[object Null]"
+ : Object.prototype.toString.call(e);
+ }
+ var b = function (e) {
+ return "Missing ".concat(e, " property in key");
+ },
+ D = function (e) {
+ return "Property 'weight' in key '".concat(
+ e,
+ "' must be a positive integer",
+ );
+ },
+ B = Object.prototype.hasOwnProperty,
+ x = (function () {
+ function e(t) {
+ var n = this;
+ (r(this, e), (this._keys = []), (this._keyMap = {}));
+ var i = 0;
+ (t.forEach(function (e) {
+ var t = w(e);
+ (n._keys.push(t), (n._keyMap[t.id] = t), (i += t.weight));
+ }),
+ this._keys.forEach(function (e) {
+ e.weight /= i;
+ }));
+ }
+ return (
+ u(e, [
+ {
+ key: "get",
+ value: function (e) {
+ return this._keyMap[e];
+ },
+ },
+ {
+ key: "keys",
+ value: function () {
+ return this._keys;
+ },
+ },
+ {
+ key: "toJSON",
+ value: function () {
+ return JSON.stringify(this._keys);
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ function w(e) {
+ var t = null,
+ n = null,
+ r = null,
+ i = 1,
+ u = null;
+ if (A(e) || g(e)) ((r = e), (t = S(e)), (n = L(e)));
+ else {
+ if (!B.call(e, "name")) throw new Error(b("name"));
+ var o = e.name;
+ if (((r = o), B.call(e, "weight") && (i = e.weight) <= 0))
+ throw new Error(D(o));
+ ((t = S(o)), (n = L(o)), (u = e.getFn));
+ }
+ return { path: t, id: n, weight: i, src: r, getFn: u };
+ }
+ function S(e) {
+ return g(e) ? e : e.split(".");
+ }
+ function L(e) {
+ return g(e) ? e.join(".") : e;
+ }
+ var _ = {
+ useExtendedSearch: !1,
+ getFn: function (e, t) {
+ var n = [],
+ r = !1;
+ return (
+ (function e(t, i, u) {
+ if (E(t))
+ if (i[u]) {
+ var o = t[i[u]];
+ if (!E(o)) return;
+ if (u === i.length - 1 && (A(o) || m(o) || C(o)))
+ n.push(p(o));
+ else if (g(o)) {
+ r = !0;
+ for (var c = 0, a = o.length; c < a; c += 1)
+ e(o[c], i, u + 1);
+ } else i.length && e(o, i, u + 1);
+ } else n.push(t);
+ })(e, A(t) ? t.split(".") : t, 0),
+ r ? n : n[0]
+ );
+ },
+ ignoreLocation: !1,
+ ignoreFieldNorm: !1,
+ fieldNormWeight: 1,
+ },
+ O = t(
+ t(
+ t(
+ t(
+ {},
+ {
+ isCaseSensitive: !1,
+ ignoreDiacritics: !1,
+ includeScore: !1,
+ keys: [],
+ shouldSort: !0,
+ sortFn: function (e, t) {
+ return e.score === t.score
+ ? e.idx < t.idx
+ ? -1
+ : 1
+ : e.score < t.score
+ ? -1
+ : 1;
+ },
+ },
+ ),
+ { includeMatches: !1, findAllMatches: !1, minMatchCharLength: 1 },
+ ),
+ { location: 0, threshold: 0.6, distance: 100 },
+ ),
+ _,
+ ),
+ j = /[^ ]+/g,
+ I = (function () {
+ function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : {},
+ n = t.getFn,
+ i = void 0 === n ? O.getFn : n,
+ u = t.fieldNormWeight,
+ o = void 0 === u ? O.fieldNormWeight : u;
+ (r(this, e),
+ (this.norm = (function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 1,
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 3,
+ n = new Map(),
+ r = Math.pow(10, t);
+ return {
+ get: function (t) {
+ var i = t.match(j).length;
+ if (n.has(i)) return n.get(i);
+ var u = 1 / Math.pow(i, 0.5 * e),
+ o = parseFloat(Math.round(u * r) / r);
+ return (n.set(i, o), o);
+ },
+ clear: function () {
+ n.clear();
+ },
+ };
+ })(o, 3)),
+ (this.getFn = i),
+ (this.isCreated = !1),
+ this.setIndexRecords());
+ }
+ return (
+ u(e, [
+ {
+ key: "setSources",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [];
+ this.docs = e;
+ },
+ },
+ {
+ key: "setIndexRecords",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [];
+ this.records = e;
+ },
+ },
+ {
+ key: "setKeys",
+ value: function () {
+ var e = this,
+ t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [];
+ ((this.keys = t),
+ (this._keysMap = {}),
+ t.forEach(function (t, n) {
+ e._keysMap[t.id] = n;
+ }));
+ },
+ },
+ {
+ key: "create",
+ value: function () {
+ var e = this;
+ !this.isCreated &&
+ this.docs.length &&
+ ((this.isCreated = !0),
+ A(this.docs[0])
+ ? this.docs.forEach(function (t, n) {
+ e._addString(t, n);
+ })
+ : this.docs.forEach(function (t, n) {
+ e._addObject(t, n);
+ }),
+ this.norm.clear());
+ },
+ },
+ {
+ key: "add",
+ value: function (e) {
+ var t = this.size();
+ A(e) ? this._addString(e, t) : this._addObject(e, t);
+ },
+ },
+ {
+ key: "removeAt",
+ value: function (e) {
+ this.records.splice(e, 1);
+ for (var t = e, n = this.size(); t < n; t += 1)
+ this.records[t].i -= 1;
+ },
+ },
+ {
+ key: "getValueForItemAtKeyId",
+ value: function (e, t) {
+ return e[this._keysMap[t]];
+ },
+ },
+ {
+ key: "size",
+ value: function () {
+ return this.records.length;
+ },
+ },
+ {
+ key: "_addString",
+ value: function (e, t) {
+ if (E(e) && !F(e)) {
+ var n = { v: e, i: t, n: this.norm.get(e) };
+ this.records.push(n);
+ }
+ },
+ },
+ {
+ key: "_addObject",
+ value: function (e, t) {
+ var n = this,
+ r = { i: t, $: {} };
+ (this.keys.forEach(function (t, i) {
+ var u = t.getFn ? t.getFn(e) : n.getFn(e, t.path);
+ if (E(u))
+ if (g(u)) {
+ for (
+ var o = [], c = [{ nestedArrIndex: -1, value: u }];
+ c.length;
+ ) {
+ var a = c.pop(),
+ s = a.nestedArrIndex,
+ h = a.value;
+ if (E(h))
+ if (A(h) && !F(h)) {
+ var l = { v: h, i: s, n: n.norm.get(h) };
+ o.push(l);
+ } else
+ g(h) &&
+ h.forEach(function (e, t) {
+ c.push({ nestedArrIndex: t, value: e });
+ });
+ }
+ r.$[i] = o;
+ } else if (A(u) && !F(u)) {
+ var f = { v: u, n: n.norm.get(u) };
+ r.$[i] = f;
+ }
+ }),
+ this.records.push(r));
+ },
+ },
+ {
+ key: "toJSON",
+ value: function () {
+ return { keys: this.keys, records: this.records };
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ function $(e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {},
+ r = n.getFn,
+ i = void 0 === r ? O.getFn : r,
+ u = n.fieldNormWeight,
+ o = void 0 === u ? O.fieldNormWeight : u,
+ c = new I({ getFn: i, fieldNormWeight: o });
+ return (c.setKeys(e.map(w)), c.setSources(t), c.create(), c);
+ }
+ function R(e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
+ n = t.errors,
+ r = void 0 === n ? 0 : n,
+ i = t.currentLocation,
+ u = void 0 === i ? 0 : i,
+ o = t.expectedLocation,
+ c = void 0 === o ? 0 : o,
+ a = t.distance,
+ s = void 0 === a ? O.distance : a,
+ h = t.ignoreLocation,
+ l = void 0 === h ? O.ignoreLocation : h,
+ f = r / e.length;
+ if (l) return f;
+ var d = Math.abs(c - u);
+ return s ? f + d / s : d ? 1 : f;
+ }
+ var N = 32;
+ function P(e, t, n) {
+ var r =
+ arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {},
+ i = r.location,
+ u = void 0 === i ? O.location : i,
+ o = r.distance,
+ c = void 0 === o ? O.distance : o,
+ a = r.threshold,
+ s = void 0 === a ? O.threshold : a,
+ h = r.findAllMatches,
+ l = void 0 === h ? O.findAllMatches : h,
+ f = r.minMatchCharLength,
+ d = void 0 === f ? O.minMatchCharLength : f,
+ v = r.includeMatches,
+ g = void 0 === v ? O.includeMatches : v,
+ y = r.ignoreLocation,
+ p = void 0 === y ? O.ignoreLocation : y;
+ if (t.length > N)
+ throw new Error("Pattern length exceeds max of ".concat(N, "."));
+ for (
+ var A,
+ m = t.length,
+ C = e.length,
+ k = Math.max(0, Math.min(u, C)),
+ E = s,
+ F = k,
+ M = d > 1 || g,
+ b = M ? Array(C) : [];
+ (A = e.indexOf(t, F)) > -1;
+ ) {
+ var D = R(t, {
+ currentLocation: A,
+ expectedLocation: k,
+ distance: c,
+ ignoreLocation: p,
+ });
+ if (((E = Math.min(D, E)), (F = A + m), M))
+ for (var B = 0; B < m; ) ((b[A + B] = 1), (B += 1));
+ }
+ F = -1;
+ for (
+ var x = [], w = 1, S = m + C, L = 1 << (m - 1), _ = 0;
+ _ < m;
+ _ += 1
+ ) {
+ for (var j = 0, I = S; j < I; )
+ (R(t, {
+ errors: _,
+ currentLocation: k + I,
+ expectedLocation: k,
+ distance: c,
+ ignoreLocation: p,
+ }) <= E
+ ? (j = I)
+ : (S = I),
+ (I = Math.floor((S - j) / 2 + j)));
+ S = I;
+ var $ = Math.max(1, k - I + 1),
+ P = l ? C : Math.min(k + I, C) + m,
+ W = Array(P + 2);
+ W[P + 1] = (1 << _) - 1;
+ for (var z = P; z >= $; z -= 1) {
+ var T = z - 1,
+ K = n[e.charAt(T)];
+ if (
+ (M && (b[T] = +!!K),
+ (W[z] = ((W[z + 1] << 1) | 1) & K),
+ _ && (W[z] |= ((x[z + 1] | x[z]) << 1) | 1 | x[z + 1]),
+ W[z] & L &&
+ (w = R(t, {
+ errors: _,
+ currentLocation: T,
+ expectedLocation: k,
+ distance: c,
+ ignoreLocation: p,
+ })) <= E)
+ ) {
+ if (((E = w), (F = T) <= k)) break;
+ $ = Math.max(1, 2 * k - F);
+ }
+ }
+ if (
+ R(t, {
+ errors: _ + 1,
+ currentLocation: k,
+ expectedLocation: k,
+ distance: c,
+ ignoreLocation: p,
+ }) > E
+ )
+ break;
+ x = W;
+ }
+ var q = { isMatch: F >= 0, score: Math.max(0.001, w) };
+ if (M) {
+ var J = (function () {
+ for (
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [],
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : O.minMatchCharLength,
+ n = [],
+ r = -1,
+ i = -1,
+ u = 0,
+ o = e.length;
+ u < o;
+ u += 1
+ ) {
+ var c = e[u];
+ c && -1 === r
+ ? (r = u)
+ : c ||
+ -1 === r ||
+ ((i = u - 1) - r + 1 >= t && n.push([r, i]), (r = -1));
+ }
+ return (e[u - 1] && u - r >= t && n.push([r, u - 1]), n);
+ })(b, d);
+ J.length ? g && (q.indices = J) : (q.isMatch = !1);
+ }
+ return q;
+ }
+ function W(e) {
+ for (var t = {}, n = 0, r = e.length; n < r; n += 1) {
+ var i = e.charAt(n);
+ t[i] = (t[i] || 0) | (1 << (r - n - 1));
+ }
+ return t;
+ }
+ var z = String.prototype.normalize
+ ? function (e) {
+ return e
+ .normalize("NFD")
+ .replace(
+ /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,
+ "",
+ );
+ }
+ : function (e) {
+ return e;
+ },
+ T = (function () {
+ function e(t) {
+ var n = this,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {},
+ u = i.location,
+ o = void 0 === u ? O.location : u,
+ c = i.threshold,
+ a = void 0 === c ? O.threshold : c,
+ s = i.distance,
+ h = void 0 === s ? O.distance : s,
+ l = i.includeMatches,
+ f = void 0 === l ? O.includeMatches : l,
+ d = i.findAllMatches,
+ v = void 0 === d ? O.findAllMatches : d,
+ g = i.minMatchCharLength,
+ y = void 0 === g ? O.minMatchCharLength : g,
+ p = i.isCaseSensitive,
+ A = void 0 === p ? O.isCaseSensitive : p,
+ m = i.ignoreDiacritics,
+ C = void 0 === m ? O.ignoreDiacritics : m,
+ k = i.ignoreLocation,
+ E = void 0 === k ? O.ignoreLocation : k;
+ if (
+ (r(this, e),
+ (this.options = {
+ location: o,
+ threshold: a,
+ distance: h,
+ includeMatches: f,
+ findAllMatches: v,
+ minMatchCharLength: y,
+ isCaseSensitive: A,
+ ignoreDiacritics: C,
+ ignoreLocation: E,
+ }),
+ (t = A ? t : t.toLowerCase()),
+ (t = C ? z(t) : t),
+ (this.pattern = t),
+ (this.chunks = []),
+ this.pattern.length)
+ ) {
+ var F = function (e, t) {
+ n.chunks.push({ pattern: e, alphabet: W(e), startIndex: t });
+ },
+ M = this.pattern.length;
+ if (M > N) {
+ for (var b = 0, D = M % N, B = M - D; b < B; )
+ (F(this.pattern.substr(b, N), b), (b += N));
+ if (D) {
+ var x = M - N;
+ F(this.pattern.substr(x), x);
+ }
+ } else F(this.pattern, 0);
+ }
+ }
+ return (
+ u(e, [
+ {
+ key: "searchIn",
+ value: function (e) {
+ var t = this.options,
+ n = t.isCaseSensitive,
+ r = t.ignoreDiacritics,
+ i = t.includeMatches;
+ if (
+ ((e = n ? e : e.toLowerCase()),
+ (e = r ? z(e) : e),
+ this.pattern === e)
+ ) {
+ var u = { isMatch: !0, score: 0 };
+ return (i && (u.indices = [[0, e.length - 1]]), u);
+ }
+ var o = this.options,
+ c = o.location,
+ a = o.distance,
+ s = o.threshold,
+ h = o.findAllMatches,
+ l = o.minMatchCharLength,
+ d = o.ignoreLocation,
+ v = [],
+ g = 0,
+ y = !1;
+ this.chunks.forEach(function (t) {
+ var n = t.pattern,
+ r = t.alphabet,
+ u = t.startIndex,
+ o = P(e, n, r, {
+ location: c + u,
+ distance: a,
+ threshold: s,
+ findAllMatches: h,
+ minMatchCharLength: l,
+ includeMatches: i,
+ ignoreLocation: d,
+ }),
+ p = o.isMatch,
+ A = o.score,
+ m = o.indices;
+ (p && (y = !0),
+ (g += A),
+ p && m && (v = [].concat(f(v), f(m))));
+ });
+ var p = { isMatch: y, score: y ? g / this.chunks.length : 1 };
+ return (y && i && (p.indices = v), p);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ K = (function () {
+ function e(t) {
+ (r(this, e), (this.pattern = t));
+ }
+ return (
+ u(
+ e,
+ [{ key: "search", value: function () {} }],
+ [
+ {
+ key: "isMultiMatch",
+ value: function (e) {
+ return q(e, this.multiRegex);
+ },
+ },
+ {
+ key: "isSingleMatch",
+ value: function (e) {
+ return q(e, this.singleRegex);
+ },
+ },
+ ],
+ ),
+ e
+ );
+ })();
+ function q(e, t) {
+ var n = e.match(t);
+ return n ? n[1] : null;
+ }
+ var J = (function (e) {
+ c(n, e);
+ var t = l(n);
+ function n(e) {
+ return (r(this, n), t.call(this, e));
+ }
+ return (
+ u(
+ n,
+ [
+ {
+ key: "search",
+ value: function (e) {
+ var t = e === this.pattern;
+ return {
+ isMatch: t,
+ score: t ? 0 : 1,
+ indices: [0, this.pattern.length - 1],
+ };
+ },
+ },
+ ],
+ [
+ {
+ key: "type",
+ get: function () {
+ return "exact";
+ },
+ },
+ {
+ key: "multiRegex",
+ get: function () {
+ return /^="(.*)"$/;
+ },
+ },
+ {
+ key: "singleRegex",
+ get: function () {
+ return /^=(.*)$/;
+ },
+ },
+ ],
+ ),
+ n
+ );
+ })(K),
+ U = (function (e) {
+ c(n, e);
+ var t = l(n);
+ function n(e) {
+ return (r(this, n), t.call(this, e));
+ }
+ return (
+ u(
+ n,
+ [
+ {
+ key: "search",
+ value: function (e) {
+ var t = -1 === e.indexOf(this.pattern);
+ return {
+ isMatch: t,
+ score: t ? 0 : 1,
+ indices: [0, e.length - 1],
+ };
+ },
+ },
+ ],
+ [
+ {
+ key: "type",
+ get: function () {
+ return "inverse-exact";
+ },
+ },
+ {
+ key: "multiRegex",
+ get: function () {
+ return /^!"(.*)"$/;
+ },
+ },
+ {
+ key: "singleRegex",
+ get: function () {
+ return /^!(.*)$/;
+ },
+ },
+ ],
+ ),
+ n
+ );
+ })(K),
+ V = (function (e) {
+ c(n, e);
+ var t = l(n);
+ function n(e) {
+ return (r(this, n), t.call(this, e));
+ }
+ return (
+ u(
+ n,
+ [
+ {
+ key: "search",
+ value: function (e) {
+ var t = e.startsWith(this.pattern);
+ return {
+ isMatch: t,
+ score: t ? 0 : 1,
+ indices: [0, this.pattern.length - 1],
+ };
+ },
+ },
+ ],
+ [
+ {
+ key: "type",
+ get: function () {
+ return "prefix-exact";
+ },
+ },
+ {
+ key: "multiRegex",
+ get: function () {
+ return /^\^"(.*)"$/;
+ },
+ },
+ {
+ key: "singleRegex",
+ get: function () {
+ return /^\^(.*)$/;
+ },
+ },
+ ],
+ ),
+ n
+ );
+ })(K),
+ G = (function (e) {
+ c(n, e);
+ var t = l(n);
+ function n(e) {
+ return (r(this, n), t.call(this, e));
+ }
+ return (
+ u(
+ n,
+ [
+ {
+ key: "search",
+ value: function (e) {
+ var t = !e.startsWith(this.pattern);
+ return {
+ isMatch: t,
+ score: t ? 0 : 1,
+ indices: [0, e.length - 1],
+ };
+ },
+ },
+ ],
+ [
+ {
+ key: "type",
+ get: function () {
+ return "inverse-prefix-exact";
+ },
+ },
+ {
+ key: "multiRegex",
+ get: function () {
+ return /^!\^"(.*)"$/;
+ },
+ },
+ {
+ key: "singleRegex",
+ get: function () {
+ return /^!\^(.*)$/;
+ },
+ },
+ ],
+ ),
+ n
+ );
+ })(K),
+ H = (function (e) {
+ c(n, e);
+ var t = l(n);
+ function n(e) {
+ return (r(this, n), t.call(this, e));
+ }
+ return (
+ u(
+ n,
+ [
+ {
+ key: "search",
+ value: function (e) {
+ var t = e.endsWith(this.pattern);
+ return {
+ isMatch: t,
+ score: t ? 0 : 1,
+ indices: [e.length - this.pattern.length, e.length - 1],
+ };
+ },
+ },
+ ],
+ [
+ {
+ key: "type",
+ get: function () {
+ return "suffix-exact";
+ },
+ },
+ {
+ key: "multiRegex",
+ get: function () {
+ return /^"(.*)"\$$/;
+ },
+ },
+ {
+ key: "singleRegex",
+ get: function () {
+ return /^(.*)\$$/;
+ },
+ },
+ ],
+ ),
+ n
+ );
+ })(K),
+ Q = (function (e) {
+ c(n, e);
+ var t = l(n);
+ function n(e) {
+ return (r(this, n), t.call(this, e));
+ }
+ return (
+ u(
+ n,
+ [
+ {
+ key: "search",
+ value: function (e) {
+ var t = !e.endsWith(this.pattern);
+ return {
+ isMatch: t,
+ score: t ? 0 : 1,
+ indices: [0, e.length - 1],
+ };
+ },
+ },
+ ],
+ [
+ {
+ key: "type",
+ get: function () {
+ return "inverse-suffix-exact";
+ },
+ },
+ {
+ key: "multiRegex",
+ get: function () {
+ return /^!"(.*)"\$$/;
+ },
+ },
+ {
+ key: "singleRegex",
+ get: function () {
+ return /^!(.*)\$$/;
+ },
+ },
+ ],
+ ),
+ n
+ );
+ })(K),
+ X = (function (e) {
+ c(n, e);
+ var t = l(n);
+ function n(e) {
+ var i,
+ u =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {},
+ o = u.location,
+ c = void 0 === o ? O.location : o,
+ a = u.threshold,
+ s = void 0 === a ? O.threshold : a,
+ h = u.distance,
+ l = void 0 === h ? O.distance : h,
+ f = u.includeMatches,
+ d = void 0 === f ? O.includeMatches : f,
+ v = u.findAllMatches,
+ g = void 0 === v ? O.findAllMatches : v,
+ y = u.minMatchCharLength,
+ p = void 0 === y ? O.minMatchCharLength : y,
+ A = u.isCaseSensitive,
+ m = void 0 === A ? O.isCaseSensitive : A,
+ C = u.ignoreDiacritics,
+ k = void 0 === C ? O.ignoreDiacritics : C,
+ E = u.ignoreLocation,
+ F = void 0 === E ? O.ignoreLocation : E;
+ return (
+ r(this, n),
+ ((i = t.call(this, e))._bitapSearch = new T(e, {
+ location: c,
+ threshold: s,
+ distance: l,
+ includeMatches: d,
+ findAllMatches: g,
+ minMatchCharLength: p,
+ isCaseSensitive: m,
+ ignoreDiacritics: k,
+ ignoreLocation: F,
+ })),
+ i
+ );
+ }
+ return (
+ u(
+ n,
+ [
+ {
+ key: "search",
+ value: function (e) {
+ return this._bitapSearch.searchIn(e);
+ },
+ },
+ ],
+ [
+ {
+ key: "type",
+ get: function () {
+ return "fuzzy";
+ },
+ },
+ {
+ key: "multiRegex",
+ get: function () {
+ return /^"(.*)"$/;
+ },
+ },
+ {
+ key: "singleRegex",
+ get: function () {
+ return /^(.*)$/;
+ },
+ },
+ ],
+ ),
+ n
+ );
+ })(K),
+ Y = (function (e) {
+ c(n, e);
+ var t = l(n);
+ function n(e) {
+ return (r(this, n), t.call(this, e));
+ }
+ return (
+ u(
+ n,
+ [
+ {
+ key: "search",
+ value: function (e) {
+ for (
+ var t, n = 0, r = [], i = this.pattern.length;
+ (t = e.indexOf(this.pattern, n)) > -1;
+ )
+ ((n = t + i), r.push([t, n - 1]));
+ var u = !!r.length;
+ return { isMatch: u, score: u ? 0 : 1, indices: r };
+ },
+ },
+ ],
+ [
+ {
+ key: "type",
+ get: function () {
+ return "include";
+ },
+ },
+ {
+ key: "multiRegex",
+ get: function () {
+ return /^'"(.*)"$/;
+ },
+ },
+ {
+ key: "singleRegex",
+ get: function () {
+ return /^'(.*)$/;
+ },
+ },
+ ],
+ ),
+ n
+ );
+ })(K),
+ Z = [J, Y, V, G, Q, H, U, X],
+ ee = Z.length,
+ te = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,
+ ne = new Set([X.type, Y.type]),
+ re = (function () {
+ function e(t) {
+ var n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {},
+ i = n.isCaseSensitive,
+ u = void 0 === i ? O.isCaseSensitive : i,
+ o = n.ignoreDiacritics,
+ c = void 0 === o ? O.ignoreDiacritics : o,
+ a = n.includeMatches,
+ s = void 0 === a ? O.includeMatches : a,
+ h = n.minMatchCharLength,
+ l = void 0 === h ? O.minMatchCharLength : h,
+ f = n.ignoreLocation,
+ d = void 0 === f ? O.ignoreLocation : f,
+ v = n.findAllMatches,
+ g = void 0 === v ? O.findAllMatches : v,
+ y = n.location,
+ p = void 0 === y ? O.location : y,
+ A = n.threshold,
+ m = void 0 === A ? O.threshold : A,
+ C = n.distance,
+ k = void 0 === C ? O.distance : C;
+ (r(this, e),
+ (this.query = null),
+ (this.options = {
+ isCaseSensitive: u,
+ ignoreDiacritics: c,
+ includeMatches: s,
+ minMatchCharLength: l,
+ findAllMatches: g,
+ ignoreLocation: d,
+ location: p,
+ threshold: m,
+ distance: k,
+ }),
+ (t = u ? t : t.toLowerCase()),
+ (t = c ? z(t) : t),
+ (this.pattern = t),
+ (this.query = (function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {};
+ return e.split("|").map(function (e) {
+ for (
+ var n = e
+ .trim()
+ .split(te)
+ .filter(function (e) {
+ return e && !!e.trim();
+ }),
+ r = [],
+ i = 0,
+ u = n.length;
+ i < u;
+ i += 1
+ ) {
+ for (var o = n[i], c = !1, a = -1; !c && ++a < ee; ) {
+ var s = Z[a],
+ h = s.isMultiMatch(o);
+ h && (r.push(new s(h, t)), (c = !0));
+ }
+ if (!c)
+ for (a = -1; ++a < ee; ) {
+ var l = Z[a],
+ f = l.isSingleMatch(o);
+ if (f) {
+ r.push(new l(f, t));
+ break;
+ }
+ }
+ }
+ return r;
+ });
+ })(this.pattern, this.options)));
+ }
+ return (
+ u(
+ e,
+ [
+ {
+ key: "searchIn",
+ value: function (e) {
+ var t = this.query;
+ if (!t) return { isMatch: !1, score: 1 };
+ var n = this.options,
+ r = n.includeMatches,
+ i = n.isCaseSensitive,
+ u = n.ignoreDiacritics;
+ ((e = i ? e : e.toLowerCase()), (e = u ? z(e) : e));
+ for (
+ var o = 0, c = [], a = 0, s = 0, h = t.length;
+ s < h;
+ s += 1
+ ) {
+ var l = t[s];
+ ((c.length = 0), (o = 0));
+ for (var d = 0, v = l.length; d < v; d += 1) {
+ var g = l[d],
+ y = g.search(e),
+ p = y.isMatch,
+ A = y.indices,
+ m = y.score;
+ if (!p) {
+ ((a = 0), (o = 0), (c.length = 0));
+ break;
+ }
+ if (((o += 1), (a += m), r)) {
+ var C = g.constructor.type;
+ ne.has(C) ? (c = [].concat(f(c), f(A))) : c.push(A);
+ }
+ }
+ if (o) {
+ var k = { isMatch: !0, score: a / o };
+ return (r && (k.indices = c), k);
+ }
+ }
+ return { isMatch: !1, score: 1 };
+ },
+ },
+ ],
+ [
+ {
+ key: "condition",
+ value: function (e, t) {
+ return t.useExtendedSearch;
+ },
+ },
+ ],
+ ),
+ e
+ );
+ })(),
+ ie = [];
+ function ue(e, t) {
+ for (var n = 0, r = ie.length; n < r; n += 1) {
+ var i = ie[n];
+ if (i.condition(e, t)) return new i(e, t);
+ }
+ return new T(e, t);
+ }
+ var oe = "$and",
+ ce = "$or",
+ ae = "$path",
+ se = "$val",
+ he = function (e) {
+ return !(!e[oe] && !e[ce]);
+ },
+ le = function (e) {
+ return o(
+ {},
+ oe,
+ Object.keys(e).map(function (t) {
+ return o({}, t, e[t]);
+ }),
+ );
+ };
+ function fe(e, t) {
+ var n = (
+ arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}
+ ).auto,
+ r = void 0 === n || n;
+ return (
+ he(e) || (e = le(e)),
+ (function e(n) {
+ var i = Object.keys(n),
+ u = (function (e) {
+ return !!e[ae];
+ })(n);
+ if (!u && i.length > 1 && !he(n)) return e(le(n));
+ if (
+ (function (e) {
+ return !g(e) && k(e) && !he(e);
+ })(n)
+ ) {
+ var o = u ? n[ae] : i[0],
+ c = u ? n[se] : n[o];
+ if (!A(c))
+ throw new Error(
+ (function (e) {
+ return "Invalid value for key ".concat(e);
+ })(o),
+ );
+ var a = { keyId: L(o), pattern: c };
+ return (r && (a.searcher = ue(c, t)), a);
+ }
+ var s = { children: [], operator: i[0] };
+ return (
+ i.forEach(function (t) {
+ var r = n[t];
+ g(r) &&
+ r.forEach(function (t) {
+ s.children.push(e(t));
+ });
+ }),
+ s
+ );
+ })(e)
+ );
+ }
+ function de(e, t) {
+ var n = e.matches;
+ ((t.matches = []),
+ E(n) &&
+ n.forEach(function (e) {
+ if (E(e.indices) && e.indices.length) {
+ var n = { indices: e.indices, value: e.value };
+ (e.key && (n.key = e.key.src),
+ e.idx > -1 && (n.refIndex = e.idx),
+ t.matches.push(n));
+ }
+ }));
+ }
+ function ve(e, t) {
+ t.score = e.score;
+ }
+ var ge = (function () {
+ function e(n) {
+ var i =
+ arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
+ u = arguments.length > 2 ? arguments[2] : void 0;
+ (r(this, e),
+ (this.options = t(t({}, O), i)),
+ this.options.useExtendedSearch,
+ (this._keyStore = new x(this.options.keys)),
+ this.setCollection(n, u));
+ }
+ return (
+ u(e, [
+ {
+ key: "setCollection",
+ value: function (e, t) {
+ if (((this._docs = e), t && !(t instanceof I)))
+ throw new Error("Incorrect 'index' type");
+ this._myIndex =
+ t ||
+ $(this.options.keys, this._docs, {
+ getFn: this.options.getFn,
+ fieldNormWeight: this.options.fieldNormWeight,
+ });
+ },
+ },
+ {
+ key: "add",
+ value: function (e) {
+ E(e) && (this._docs.push(e), this._myIndex.add(e));
+ },
+ },
+ {
+ key: "remove",
+ value: function () {
+ for (
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : function () {
+ return !1;
+ },
+ t = [],
+ n = 0,
+ r = this._docs.length;
+ n < r;
+ n += 1
+ ) {
+ var i = this._docs[n];
+ e(i, n) && (this.removeAt(n), (n -= 1), (r -= 1), t.push(i));
+ }
+ return t;
+ },
+ },
+ {
+ key: "removeAt",
+ value: function (e) {
+ (this._docs.splice(e, 1), this._myIndex.removeAt(e));
+ },
+ },
+ {
+ key: "getIndex",
+ value: function () {
+ return this._myIndex;
+ },
+ },
+ {
+ key: "search",
+ value: function (e) {
+ var t = (
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {}
+ ).limit,
+ n = void 0 === t ? -1 : t,
+ r = this.options,
+ i = r.includeMatches,
+ u = r.includeScore,
+ o = r.shouldSort,
+ c = r.sortFn,
+ a = r.ignoreFieldNorm,
+ s = A(e)
+ ? A(this._docs[0])
+ ? this._searchStringList(e)
+ : this._searchObjectList(e)
+ : this._searchLogical(e);
+ return (
+ (function (e, t) {
+ var n = t.ignoreFieldNorm,
+ r = void 0 === n ? O.ignoreFieldNorm : n;
+ e.forEach(function (e) {
+ var t = 1;
+ (e.matches.forEach(function (e) {
+ var n = e.key,
+ i = e.norm,
+ u = e.score,
+ o = n ? n.weight : null;
+ t *= Math.pow(
+ 0 === u && o ? Number.EPSILON : u,
+ (o || 1) * (r ? 1 : i),
+ );
+ }),
+ (e.score = t));
+ });
+ })(s, { ignoreFieldNorm: a }),
+ o && s.sort(c),
+ m(n) && n > -1 && (s = s.slice(0, n)),
+ (function (e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : {},
+ r = n.includeMatches,
+ i = void 0 === r ? O.includeMatches : r,
+ u = n.includeScore,
+ o = void 0 === u ? O.includeScore : u,
+ c = [];
+ return (
+ i && c.push(de),
+ o && c.push(ve),
+ e.map(function (e) {
+ var n = e.idx,
+ r = { item: t[n], refIndex: n };
+ return (
+ c.length &&
+ c.forEach(function (t) {
+ t(e, r);
+ }),
+ r
+ );
+ })
+ );
+ })(s, this._docs, { includeMatches: i, includeScore: u })
+ );
+ },
+ },
+ {
+ key: "_searchStringList",
+ value: function (e) {
+ var t = ue(e, this.options),
+ n = this._myIndex.records,
+ r = [];
+ return (
+ n.forEach(function (e) {
+ var n = e.v,
+ i = e.i,
+ u = e.n;
+ if (E(n)) {
+ var o = t.searchIn(n),
+ c = o.isMatch,
+ a = o.score,
+ s = o.indices;
+ c &&
+ r.push({
+ item: n,
+ idx: i,
+ matches: [{ score: a, value: n, norm: u, indices: s }],
+ });
+ }
+ }),
+ r
+ );
+ },
+ },
+ {
+ key: "_searchLogical",
+ value: function (e) {
+ var t = this,
+ n = fe(e, this.options),
+ r = function e(n, r, i) {
+ if (!n.children) {
+ var u = n.keyId,
+ o = n.searcher,
+ c = t._findMatches({
+ key: t._keyStore.get(u),
+ value: t._myIndex.getValueForItemAtKeyId(r, u),
+ searcher: o,
+ });
+ return c && c.length
+ ? [{ idx: i, item: r, matches: c }]
+ : [];
+ }
+ for (
+ var a = [], s = 0, h = n.children.length;
+ s < h;
+ s += 1
+ ) {
+ var l = e(n.children[s], r, i);
+ if (l.length) a.push.apply(a, f(l));
+ else if (n.operator === oe) return [];
+ }
+ return a;
+ },
+ i = this._myIndex.records,
+ u = {},
+ o = [];
+ return (
+ i.forEach(function (e) {
+ var t = e.$,
+ i = e.i;
+ if (E(t)) {
+ var c = r(n, t, i);
+ c.length &&
+ (u[i] ||
+ ((u[i] = { idx: i, item: t, matches: [] }),
+ o.push(u[i])),
+ c.forEach(function (e) {
+ var t,
+ n = e.matches;
+ (t = u[i].matches).push.apply(t, f(n));
+ }));
+ }
+ }),
+ o
+ );
+ },
+ },
+ {
+ key: "_searchObjectList",
+ value: function (e) {
+ var t = this,
+ n = ue(e, this.options),
+ r = this._myIndex,
+ i = r.keys,
+ u = r.records,
+ o = [];
+ return (
+ u.forEach(function (e) {
+ var r = e.$,
+ u = e.i;
+ if (E(r)) {
+ var c = [];
+ (i.forEach(function (e, i) {
+ c.push.apply(
+ c,
+ f(t._findMatches({ key: e, value: r[i], searcher: n })),
+ );
+ }),
+ c.length && o.push({ idx: u, item: r, matches: c }));
+ }
+ }),
+ o
+ );
+ },
+ },
+ {
+ key: "_findMatches",
+ value: function (e) {
+ var t = e.key,
+ n = e.value,
+ r = e.searcher;
+ if (!E(n)) return [];
+ var i = [];
+ if (g(n))
+ n.forEach(function (e) {
+ var n = e.v,
+ u = e.i,
+ o = e.n;
+ if (E(n)) {
+ var c = r.searchIn(n),
+ a = c.isMatch,
+ s = c.score,
+ h = c.indices;
+ a &&
+ i.push({
+ score: s,
+ key: t,
+ value: n,
+ idx: u,
+ norm: o,
+ indices: h,
+ });
+ }
+ });
+ else {
+ var u = n.v,
+ o = n.n,
+ c = r.searchIn(u),
+ a = c.isMatch,
+ s = c.score,
+ h = c.indices;
+ a &&
+ i.push({ score: s, key: t, value: u, norm: o, indices: h });
+ }
+ return i;
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ return (
+ (ge.version = "7.1.0"),
+ (ge.createIndex = $),
+ (ge.parseIndex = function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
+ n = t.getFn,
+ r = void 0 === n ? O.getFn : n,
+ i = t.fieldNormWeight,
+ u = void 0 === i ? O.fieldNormWeight : i,
+ o = e.keys,
+ c = e.records,
+ a = new I({ getFn: r, fieldNormWeight: u });
+ return (a.setKeys(o), a.setIndexRecords(c), a);
+ }),
+ (ge.config = O),
+ (function () {
+ ie.push.apply(ie, arguments);
+ })(re),
+ ge
+ );
+ }),
+ "object" == typeof exports && "undefined" != typeof module
+ ? (module.exports = t())
+ : "function" == typeof define && define.amd
+ ? define(t)
+ : ((e = "undefined" != typeof globalThis ? globalThis : e || self).Fuse =
+ t()));
diff --git a/site/static/js/katex.js b/site/static/js/katex.js
@@ -4607,7 +4607,6 @@
s < n.length - 1 &&
n[s + 1].hasClass("mspace") &&
!n[s + 1].hasClass("newline");
-
)
(s++, o.push(n[s]), n[s].hasClass("nobreak") && (l = !0));
l || (i.push(se(o, e)), (o = []));
@@ -5700,7 +5699,6 @@
for (
a = e.gullet.consumeArgs(1)[0];
1 === a.length && "#" === a[0].text;
-
) {
if (1 !== (a = e.gullet.consumeArgs(1)[0]).length)
throw new o(
@@ -6934,7 +6932,6 @@
Y = Dt.makeLineSpan("hdashline", e, m),
W = [{ type: "elem", elem: l, shift: 0 }];
h.length > 0;
-
) {
var X = h.pop(),
_ = X.pos - N;
@@ -9794,7 +9791,6 @@
for (
var l = "", h = t.expandNextToken();
"]" !== h.text && "EOF" !== h.text;
-
)
((l += h.text), (h = t.expandNextToken()));
if (!l.match(/^\s*[0-9]+\s*$/))
@@ -10548,13 +10544,11 @@
for (
var n = r.replace(/##/g, "");
-1 !== n.indexOf("#" + (a + 1));
-
)
++a;
for (
var i = new ha(r, this.settings), o = [], s = i.lex();
"EOF" !== s.text;
-
)
(o.push(s), (s = i.lex()));
return (o.reverse(), { tokens: o, numArgs: a });
@@ -11195,7 +11189,6 @@
for (
var l, h = "", m = this.fetch(), c = 0, u = m;
(l = this.fetch()).text !== n || (r && c > 0);
-
) {
switch (l.text) {
case "EOF":
@@ -11219,7 +11212,6 @@
for (
var a, n = this.fetch(), i = n, s = "";
"EOF" !== (a = this.fetch()).text && t.test(s + a.text);
-
)
((s += (i = a).text), this.consume());
if ("" === s)
diff --git a/site/static/js/mobile.js b/site/static/js/mobile.js
@@ -23,7 +23,7 @@
toggle_menu_more = function () {
menu_more && menu_more.classList.toggle("hidden");
},
- toggle_menu_more = function () {
+ hide_menu_more = function () {
menu_more && menu_more.classList.add("hidden");
},
toggle_vis = function () {
@@ -34,6 +34,7 @@
(toggle_vis(),
page_form &&
(page_form.onsubmit = function (event) {
+ var loc;
if (this.page.value == 1) {
loc = this.action.slice(0, -5);
} else {
diff --git a/site/static/js/search.js b/site/static/js/search.js
@@ -14,102 +14,52 @@ function debounce(func, wait) {
}
function makeTeaser(body, terms) {
- var TERM_WEIGHT = 40;
- var NORMAL_WORD_WEIGHT = 2;
- var FIRST_WORD_WEIGHT = 8;
- var TEASER_MAX_WORDS = 20;
-
- var stemmedTerms = terms.map(function (w) {
- return elasticlunr.stemmer(w.toLowerCase());
+ var TEASER_MAX_CHARS = 200;
+ var lowerBody = body.toLowerCase();
+ var lowerTerms = terms.map(function (t) {
+ return t.toLowerCase();
});
- var termFound = false;
- var index = 0;
- var weighted = [];
-
- var sentences = body.toLowerCase().split(". ");
- for (var i in sentences) {
- var words = sentences[i].split(" ");
- var value = FIRST_WORD_WEIGHT;
-
- for (var j in words) {
- var word = words[j];
- if (word.length > 0) {
- for (var k in stemmedTerms) {
- if (elasticlunr.stemmer(word).startsWith(stemmedTerms[k])) {
- value = TERM_WEIGHT;
- termFound = true;
- }
- }
- weighted.push([word, value, index]);
- value = NORMAL_WORD_WEIGHT;
- }
- index += word.length;
- index += 1;
- }
- index += 1;
- }
-
- if (weighted.length === 0) {
- return body;
- }
-
- var windowWeights = [];
- var windowSize = Math.min(weighted.length, TEASER_MAX_WORDS);
-
- var curSum = 0;
- for (var i = 0; i < windowSize; i++) {
- curSum += weighted[i][1];
- }
- windowWeights.push(curSum);
-
- for (var i = 0; i < weighted.length - windowSize; i++) {
- curSum -= weighted[i][1];
- curSum += weighted[i + windowSize][1];
- windowWeights.push(curSum);
- }
- var maxSumIndex = 0;
- if (termFound) {
- var maxFound = 0;
- for (var i = windowWeights.length - 1; i >= 0; i--) {
- if (windowWeights[i] > maxFound) {
- maxFound = windowWeights[i];
- maxSumIndex = i;
- }
+ // Find the first occurrence of any term
+ var firstIndex = -1;
+ for (var i = 0; i < lowerTerms.length; i++) {
+ var idx = lowerBody.indexOf(lowerTerms[i]);
+ if (idx !== -1 && (firstIndex === -1 || idx < firstIndex)) {
+ firstIndex = idx;
}
}
- var teaser = [];
- var startIndex = weighted[maxSumIndex][2];
- for (var i = maxSumIndex; i < maxSumIndex + windowSize; i++) {
- var word = weighted[i];
- if (startIndex < word[2]) {
- teaser.push(body.substring(startIndex, word[2]));
- startIndex = word[2];
- }
-
- if (word[1] === TERM_WEIGHT) {
- teaser.push("<b>");
- }
- startIndex = word[2] + word[0].length;
- teaser.push(body.substring(word[2], startIndex));
-
- if (word[1] === TERM_WEIGHT) {
- teaser.push("</b>");
+ // Start a bit before the first match
+ var start = Math.max(0, firstIndex - 40);
+ var end = Math.min(body.length, start + TEASER_MAX_CHARS);
+ var teaser =
+ (start > 0 ? "…" : "") +
+ body.substring(start, end) +
+ (end < body.length ? "…" : "");
+
+ // Bold the matching terms
+ for (var i = 0; i < lowerTerms.length; i++) {
+ if (lowerTerms[i].length > 0) {
+ var regex = new RegExp(
+ "(" + lowerTerms[i].replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + ")",
+ "gi",
+ );
+ teaser = teaser.replace(regex, "<b>$1</b>");
}
}
- teaser.push("…");
- return teaser.join("");
+
+ return teaser;
}
function formatSearchResultItem(item, terms) {
+ var body = (item.item.body || "").replace(/§/g, "");
return (
'<div class="search-results__item">' +
`<h1 class='title'>` +
- `<a href="${item.ref}">${item.doc.title}</a>` +
+ `<a href="${item.item.url}">${item.item.title}</a>` +
`</h1>` +
- `<div>${makeTeaser(item.doc.body, terms)}</div>` +
- `<a href='${item.ref}'>` +
+ `<div>${makeTeaser(body, terms)}</div>` +
+ `<a href='${item.item.url}'>` +
`<i>Read More <span class="icon is-small">→</span></i>` +
`</a>` +
"</div>"
@@ -121,33 +71,38 @@ function initSearch() {
var $searchResults = document.querySelector(".search-results");
var $searchResultsItems = document.querySelector(".search-results__items");
var MAX_ITEMS = 10;
- var options = {
- bool: "AND",
- fields: {
- title: { boost: 2 },
- body: { boost: 1 },
- },
- };
var currentTerm = "";
- var index = elasticlunr.Index.load(window.searchIndex);
+
+ var fuse = new Fuse(window.searchIndex, {
+ keys: [
+ { name: "title", weight: 2 },
+ { name: "body", weight: 1 },
+ ],
+ includeMatches: true,
+ minMatchCharLength: 2,
+ threshold: 0.3,
+ ignoreLocation: true,
+ });
$searchInput.addEventListener(
"keyup",
debounce(function () {
var term = $searchInput.value.trim();
- if (term === currentTerm || !index) {
+ if (term === currentTerm) {
return;
}
$searchResults.style.display = term === "" ? "none" : "block";
$searchResultsItems.innerHTML = "";
if (term === "") {
+ currentTerm = "";
return;
}
- var results = index.search(term, options);
+ var results = fuse.search(term);
if (results.length === 0) {
$searchResults.style.display = "none";
+ currentTerm = term;
return;
}
diff --git a/site/static/math/auto-render.js b/site/static/math/auto-render.js
@@ -92,7 +92,6 @@
o.push({ type: "text", data: l.slice(0, s) }),
(d = !1));
;
-
) {
if (d) {
if (-1 === (f = l.indexOf(t, s))) break;
diff --git a/site/static/website.ico b/site/static/website.ico
Binary files differ.
diff --git a/site/templates/anchor-link.html b/site/templates/anchor-link.html
@@ -1,3 +1,7 @@
-<a class="zola-anchor" href="#{{ id }}" aria-label="Anchor link for: {{ id }}"
+<a
+ class="zola-anchor"
+ href="#{{ id }}"
+ aria-label="Anchor link for: {{ id }}"
+ onclick="navigator.clipboard.writeText(window.location.origin + window.location.pathname + '#{{ id }}'); this.style.color='var(--accent-secondary)'; setTimeout(() => this.style.color='', 1000); return false;"
>§</a
>
diff --git a/site/templates/base.html b/site/templates/base.html
@@ -11,6 +11,8 @@ squiggle -%} {% import "macros/edit.html" as edit -%} {% import
<!doctype html>
<html lang="en">
<head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
{%- block title -%}
<title>{{ config.title }}</title>
{%- endblock title -%} {%- block general_meta -%} {{ head::general_meta() }}
@@ -19,10 +21,6 @@ squiggle -%} {% import "macros/edit.html" as edit -%} {% import
head::font(config=config) }} {%- endblock font -%} {%- block rss -%} {%-
endblock rss -%} {%- block favicon -%} {{ head::favicon(config=config) }}
{%- endblock favicon -%} {%- block math -%} {%- endblock math -%}
-
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <meta charset="utf-8" />
- <title>My Blog</title>
</head>
{% block analytics -%} {{ analytics::google_analytics(config=config) }} {%-
diff --git a/site/templates/macros/head.html b/site/templates/macros/head.html
@@ -1,6 +1,7 @@
{%- macro font(config) %} <link rel="stylesheet" href="{{
get_url(path="fonts.css", trailing_slash=false) }}"> {% endmacro font -%} {%
-macro styling(config) %} <link rel="stylesheet" href="{{
+macro styling(config) %}
+<link rel="stylesheet" href="{{
get_url(path="style.css", trailing_slash=false) }}"> {% if
config.extra.theme_color -%} {% set color = "color/" ~config.extra.theme_color ~
".css" -%}
diff --git a/site/templates/macros/javascript.html b/site/templates/macros/javascript.html
@@ -6,7 +6,7 @@
<script src="{{ get_url(path="js/clipboard.js") }}"></script>
<script src="{{ get_url(path="js/footnote.js") }}"></script>
{% if config.build_search_index %}
- <script src="{{ get_url(path="elasticlunr.min.js") }}"></script>
+ <script src="{{ get_url(path="fuse.min.js") }}"></script>
<script src="{{ get_url(path="search_index.en.js") }}"></script>
<script src="{{ get_url(path="js/search.js") }}"></script>
{% endif %}
diff --git a/site/templates/macros/pagination.html b/site/templates/macros/pagination.html
@@ -22,7 +22,7 @@
value="{{ paginator.current_index }}"
min="1"
max="{{ paginator.number_pagers }}"
- oninput="this.style.width = (this.value.length + 3) + 'ch';"
+ oninput="this.style.width = this.value.length + 3 + 'ch'"
required />/ {{ paginator.number_pagers }}
<button>Go</button>
</form>
diff --git a/site/templates/macros/toc.html b/site/templates/macros/toc.html
@@ -32,7 +32,7 @@
<ul>
{% for h6 in h5.children %}
<li>
- <a href="{{ h5.permalink | safe }}">{{ h6.title }}</a>
+ <a href="{{ h6.permalink | safe }}">{{ h6.title }}</a>
</li>
{% endfor %}
</ul>
diff --git a/site/templates/shortcodes/youtube.html b/site/templates/shortcodes/youtube.html
@@ -1,11 +1,18 @@
<div class="youtube is-flex is-justify-content-center is-align-items-center">
<iframe
width="100%"
- height="600px"
src="https://www.youtube.com/embed/{{ id }}"
frameborder="0"
- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
+ loading="lazy"
+ allow="
+ accelerometer;
+ autoplay;
+ clipboard-write;
+ encrypted-media;
+ gyroscope;
+ picture-in-picture;
+ "
allowfullscreen
- style="border: inset; border-radius: 5px">
+ style="border: inset; border-radius: 5px; aspect-ratio: 16/9">
</iframe>
</div>
diff --git a/site/zola.toml b/site/zola.toml
@@ -0,0 +1,103 @@
+# Site URL
+base_url = "/"
+title = "maydayv7"
+description = "My Personal Website"
+
+# Default Language used in Feeds
+default_language = "en"
+
+# Compile all '.scss' files in './sass'
+compile_sass = true
+
+# Build search index to be used later by JS Library
+build_search_index = true
+
+# RSS Feed
+generate_feeds = true
+feed_filenames = ["rss.xml"]
+
+# Taxonomies
+# See <https://www.getzola.org/documentation/content/taxonomies/>
+taxonomies = [
+ { name = "series", feed = true, paginate_by = 10 },
+ { name = "tags", feed = true, paginate_by = 10 },
+]
+
+[markdown]
+# Parser Settings
+render_emoji = true
+smart_punctuation = false
+lazy_async_image = true
+github_alerts = true
+insert_anchor_links = "right"
+
+# External Link Settings
+external_links_target_blank = true
+external_links_no_follow = true
+external_links_no_referrer = true
+
+[markdown.highlighting]
+# Syntax Highlighting
+style = "class"
+theme = "github-dark"
+
+[search]
+# Site Search Settings
+include_title = true
+include_description = false
+include_path = false
+include_content = true
+index_format = "fuse_javascript"
+
+[extra]
+# Site Theme
+theme_color = "red"
+color_schemes = ["black", "blue", "red"]
+
+# Enable Math Typesetting with KaTeX
+# Use 'math=true' in [extra] on individual pages
+math_katex = true
+
+# Generate Table of Contents for all articles
+# Use 'ToC = true' in [extra] on individual pages
+table_of_contents = false
+
+# Logo
+favicon = "website.ico"
+logo_text = "maydayv7"
+center = true
+
+# Allow Editing Articles
+# Use 'edit = true' in [extra] on individual pages
+edit_page = true
+repo_url = "https://github.com/maydayv7/dotfiles/blob/stable/site"
+
+# License
+author = "maydayv7"
+copyright = "V7"
+google_analytics_tracking_id = "G-26PNXDYZNZ"
+
+# Page Comments
+# Use 'comments = true' in [extra] on individual pages
+disqus = { enabled = false, short_name = "maydayv7" }
+giscus = { enabled = true, repo = "maydayv7/dotfiles", repo_id = "R_kgDOHEEEUA", category = "Site", category_id = "DIC_kwDOHEEEUM4C0c1O" }
+
+# Main Menu
+main_menu_items = [
+ { url = "/blog/", name="Blog" },
+ { url = "/projects/", name="Projects" },
+ { url = "/about/", name="About" },
+ { url = "https://git.maydayv7.cc", name="Git", external = true },
+]
+
+# Socials Bar
+email = "mailto:mail@maydayv7.cc"
+feed_path = "/rss.xml"
+reddit_profile = "https://reddit.com/u/maydayv7"
+github_profile = "https://github.com/maydayv7"
+discord_profile = "https://discord.com/users/519513852648357929"
+
+# Webring
+webring = true
+webring_name = "❄️"
+webring_url = "https://nixwebr.ing"