Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/heyeshuang/hugo-theme-tokiwa.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHe Yeshuang <yeshuanghe@gmail.com>2020-07-05 13:46:37 +0300
committerHe Yeshuang <yeshuanghe@gmail.com>2020-07-05 13:46:37 +0300
commit2594206dab5f39324b47733abd1efb443cd74b89 (patch)
tree65486dbe6dafda98dedf1b7ff4b2927cf66ca678
parent6aad580c2e4d71fc3c142046fdfca94d222a74b0 (diff)
add fuse.js for search box
-rw-r--r--README.md1
-rw-r--r--exampleSite/config.toml4
-rw-r--r--layouts/_default/index.json5
-rw-r--r--layouts/partials/site-scripts.html4
-rw-r--r--layouts/partials/social-follow.html11
-rw-r--r--src/sass/style.scss93
-rw-r--r--static/dist/app.css2
-rw-r--r--static/lib/fastsearch.js111
-rw-r--r--static/lib/fuse.min.js9
9 files changed, 191 insertions, 49 deletions
diff --git a/README.md b/README.md
index 1b85333..6e3a882 100644
--- a/README.md
+++ b/README.md
@@ -95,6 +95,7 @@ npm run build
* Fonts. `杨任东竹石体` was used for the banner in the beginning. This font is okay for commercial usage. However, I wonder if it is compatible with ~~GPL~~ MIT, so I replaced it with an `exampleFont` in the `exampleSite`. See `config.toml`.
* And the open, warm-hearted [Noto Serif CN](https://www.google.com/get/noto/help/cjk/). Always a good choice for Chinese words. Under [OFL 1.1](https://github.com/googlefonts/noto-cjk/blob/master/LICENSE).
* Beautiful icons made by [Remix-Design](https://github.com/Remix-Design/remixicon). Under [Apache 2.0](https://raw.githubusercontent.com/Remix-Design/RemixIcon/master/License).
+* [fuse.js](https://fusejs.io/) for fuzzy search, and a [blog post](https://ttys3.net/post/hugo/hugo-fast-search/) (in Chinese) about how to use it.
Thanks.
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 97bcd46..7882c07 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -20,6 +20,7 @@ Tokiwa-iro is the theme color of this site.
"""
favicon = "img/favicon-32x32.png"
math = true # for introducing $KaTEX$
+fuse = true # for searchbox. "JSON" must added to output contents. See [outputs].
env = "production" # for Google Analytics and DISQUS.
useChineseFonts = true
bannerFont = "fonts/exampleFont"
@@ -63,3 +64,6 @@ mail="mailto:anon@example.com"
youtube="http://youtube.com/"
github="http://github.com/"
# any icon in layouts/partials/svg can be used by the name without the "-line.svg"
+
+[outputs]
+ home = ["HTML", "RSS", "JSON"]
diff --git a/layouts/_default/index.json b/layouts/_default/index.json
new file mode 100644
index 0000000..cafad40
--- /dev/null
+++ b/layouts/_default/index.json
@@ -0,0 +1,5 @@
+{{- $.Scratch.Add "index" slice -}}
+{{- range .Site.RegularPages -}}
+ {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink "date" .Date "section" .Section) -}}
+{{- end -}}
+{{- $.Scratch.Get "index" | jsonify -}}
diff --git a/layouts/partials/site-scripts.html b/layouts/partials/site-scripts.html
index 4e3b0ea..03c3d73 100644
--- a/layouts/partials/site-scripts.html
+++ b/layouts/partials/site-scripts.html
@@ -1,4 +1,8 @@
{{ $script := .Site.Data.webpack_assets.app }}
{{ with $script.js }}
<script src="{{ relURL (printf "%s%s" "dist/" .) }}"></script>
+{{ end }}
+{{ if .Site.Params.fuse }}
+<script src="/lib/fuse.min.js"></script> <!-- download and copy over fuse.min.js file from fusejs.io -->
+<script src="/lib/fastsearch.js"></script>
{{ end }} \ No newline at end of file
diff --git a/layouts/partials/social-follow.html b/layouts/partials/social-follow.html
index 17d3d1f..70c47b6 100644
--- a/layouts/partials/social-follow.html
+++ b/layouts/partials/social-follow.html
@@ -1,6 +1,6 @@
{{ $count := len .Site.Social}}
-<div class="flex flex-wrap-reverse md:justify-end content-end md:content-start justify-start items-start {{if gt $count 4}}md:flex-col{{end}} pb-2 max-h-16">
+<div class="flex flex-wrap-reverse md:justify-end content-end md:content-start justify-start items-start {{if gt $count 4}}md:flex-col{{end}} max-h-16">
{{ range $key,$value:=.Site.Social }}
<a href='{{$value}}' target="_blank" class="{{- $key}} icon pl-1 text-eucalyptus-400 hover:text-java-400" title="{{- $key}} link" rel="noopener"
aria-label="follow on {{$key}}——Opens in a new window">
@@ -11,4 +11,11 @@
</div>
</a>
{{ end }}
-</div> \ No newline at end of file
+</div>
+{{ if .Site.Params.fuse }}
+<div id="fastSearch" class="mb-2">
+ <ul id="searchResults" class="bg-gray-200 px-2 my-2">
+ </ul>
+ <input id="searchInput" class="bg-gray-100 border-b border-b-1 focus:border-eucalyptus-500 md:text-right px-2" tabindex="0" placeholder="search..." size="10">
+</div>
+{{ end }} \ No newline at end of file
diff --git a/src/sass/style.scss b/src/sass/style.scss
index a432957..7bfa967 100644
--- a/src/sass/style.scss
+++ b/src/sass/style.scss
@@ -296,10 +296,11 @@ a {
// }
@supports (-webkit-backdrop-filter:none) or (backdrop-filter:none) {
.bg-opacity-custom {
- -webkit-backdrop-filter: blur(3px);
- backdrop-filter: blur(3px);
+ -webkit-backdrop-filter: blur(3px);
+ backdrop-filter: blur(3px);
}
}
+
/******************Table of Contents' Style***********************/
details.toc {
@@ -318,62 +319,62 @@ details.toc {
list-style-position: inside;
margin-right: 1em;
}
- }
+ }
- nav ul>li {
- @apply font-light;
+ nav ul>li {
+ @apply font-light;
- @apply text-java-700;
+ @apply text-java-700;
- a {
- @apply text-java-700;
- }
+ a {
+ @apply text-java-700;
}
+ }
- nav ul ul>li {
- @apply leading-normal;
- @apply text-sm;
+ nav ul ul>li {
+ @apply leading-normal;
+ @apply text-sm;
- @apply text-java-600;
+ @apply text-java-600;
- a {
- @apply text-java-600;
- }
+ a {
+ @apply text-java-600;
}
+ }
- >summary {
- cursor: pointer;
- list-style: none;
- outline: none;
- }
+ >summary {
+ cursor: pointer;
+ list-style: none;
+ outline: none;
+ }
- >summary::-webkit-details-marker {
- display: none;
- }
+ >summary::-webkit-details-marker {
+ display: none;
+ }
- hr {
- border-top: 1px dotted theme("colors.java.400");
- border-bottom: 1px dotted #fff;
- margin-top: 0.8em;
- margin-bottom: 0.4em;
- text-align: center;
- }
+ hr {
+ border-top: 1px dotted theme("colors.java.400");
+ border-bottom: 1px dotted #fff;
+ margin-top: 0.8em;
+ margin-bottom: 0.4em;
+ text-align: center;
+ }
- hr:after {
- content: 'Table of Contents';
- display: inline-block;
- position: relative;
- top: -19px;
- padding: 0 5px;
- @apply bg-opacity-75;
- background: theme("colors.gray.100");
- color: theme("colors.java.700");
- font-size: 16px;
- font-family: theme("fontFamily.serif");
- }
+ hr:after {
+ content: 'Table of Contents';
+ display: inline-block;
+ position: relative;
+ top: -19px;
+ padding: 0 5px;
+ @apply bg-opacity-75;
+ background: theme("colors.gray.100");
+ color: theme("colors.java.700");
+ font-size: 16px;
+ font-family: theme("fontFamily.serif");
+ }
- }
+}
- /*! purgecss end ignore */
+/*! purgecss end ignore */
- @import "tailwindcss/utilities"; \ No newline at end of file
+@import "tailwindcss/utilities"; \ No newline at end of file
diff --git a/static/dist/app.css b/static/dist/app.css
index 3093ddf..e0dd7a6 100644
--- a/static/dist/app.css
+++ b/static/dist/app.css
@@ -1 +1 @@
-/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none;padding:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:Source Han Sans SC,Source Han Sans CN,Noto Sans CJK SC,Noto Sans,-apple-system,Helvetica Neue,Helvetica,Nimbus Sans L,Arial,Liberation Sans,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,WenQuanYi Zen Hei Sharp,sans-serif;line-height:1.5}*,:after,:before{box-sizing:border-box;border:0 solid #e2e8f0}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#a0aec0}input::-moz-placeholder,textarea::-moz-placeholder{color:#a0aec0}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#a0aec0}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:#a0aec0}input::placeholder,textarea::placeholder{color:#a0aec0}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:Fira Code,Cascadia Code,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Sarasa Mono SC,Noto Sans CJK SC,"monospace",monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}.heading,h1{font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif;font-weight:500;line-height:1.25;--text-opacity:1;color:#01513a;color:rgba(1,81,58,var(--text-opacity))}h1{font-size:1.875rem}@media (min-width:1024px){h1{font-size:2.25rem}}h2{font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif;font-weight:500;line-height:1.25;--text-opacity:1;color:#01513a;color:rgba(1,81,58,var(--text-opacity));font-size:1.5rem}@media (min-width:1024px){h2{font-size:1.875rem}}h3{font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif;font-weight:500;line-height:1.25;--text-opacity:1;color:#01513a;color:rgba(1,81,58,var(--text-opacity));font-size:1.25rem}h4,h5,h6{font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif;font-weight:500;line-height:1.25;--text-opacity:1;color:#01513a;color:rgba(1,81,58,var(--text-opacity));font-size:1.125rem}hr{border:none;border-bottom:1px solid #9acfbf;margin-bottom:.8em;height:5px}hr.double-line{border-top:3px double #4eab90;text-align:center;border-bottom:none}hr.double-line:after{content:"\2767";display:inline-block;position:relative;top:-27px;padding:0 10px;background:#f7fafc;color:#4eab90;font-size:30px}a:not(.icon){text-decoration:none;background-image:linear-gradient(currentColor,currentColor);background-position:0 100%;background-repeat:no-repeat;background-size:0 2px;transition:background-size .3s cubic-bezier(0,.5,0,1)}a:not(.icon):focus,a:not(.icon):hover{text-decoration:none;background-size:100% 2px}a{color:#028760}a:focus,a:hover{color:#49beb7}.a-gray a{--text-opacity:1;color:#718096;color:rgba(113,128,150,var(--text-opacity))}.a-gray a:focus,.a-gray a:hover{color:#cbd5e0}.c-rich-text{font-family:Source Han Sans SC,Source Han Sans CN,Noto Sans CJK SC,Noto Sans,-apple-system,Helvetica Neue,Helvetica,Nimbus Sans L,Arial,Liberation Sans,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,WenQuanYi Zen Hei Sharp,sans-serif;font-size:1rem;line-height:1.625}.c-rich-text ::-moz-selection{color:#edf9f8;background-color:#2c726e}.c-rich-text ::selection{color:#edf9f8;background-color:#2c726e}.c-rich-text a{color:#028760}.c-rich-text a:focus,.c-rich-text a:hover{color:#49beb7}.c-rich-text>*+*{margin-top:1.5rem}.c-rich-text li{margin-bottom:.25rem}.c-rich-text li p{display:inline}.c-rich-text ul{list-style-type:square;list-style-position:inside}.c-rich-text ol{list-style-type:lower-greek;list-style-position:inside}.c-rich-text li>ol,.c-rich-text li>ul{margin-left:1rem}.c-rich-text .footnotes ol{list-style-type:decimal}.c-rich-text mark{background-color:#b6e5e2;border-bottom-color:#42aba5;border-bottom-width:2px;padding:2px;margin:0 5px}.c-rich-text img{box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.c-rich-text table{overflow-x:auto;-webkit-overflow-scrolling:auto;table-layout:auto}.c-rich-text td,.c-rich-text th{border-bottom-color:#42aba5;border-bottom-width:1px;padding:.5rem 1rem}.c-rich-text th{border-top-width:1px;background-color:#edf9f8;border-top-color:#42aba5}.c-rich-text b,.c-rich-text strong{font-weight:700;color:#027a56}.c-rich-text em,.c-rich-text i{font-style:italic}.c-rich-text sub,.c-rich-text sup{font-size:.75rem;vertical-align:baseline}.c-rich-text abbr,.c-rich-text acronym{border-bottom:1px dotted;font-variant:normal;text-decoration:none}.c-rich-text abbr{cursor:help}.c-rich-text code,.c-rich-text pre,.c-rich-text pre tt{font-family:Fira Code,Cascadia Code,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Sarasa Mono SC,Noto Sans CJK SC,"monospace",monospace}.c-rich-text code,.c-rich-text kbd,.c-rich-text pre tt{padding-left:.25rem;padding-right:.25rem;border-width:1px;--border-opacity:1;border-color:#80d2cd;border-color:rgba(128,210,205,var(--border-opacity));background:repeating-linear-gradient(45deg,#b6e5e2,#b6e5e2 1px,#edf9f8 0,#edf9f8 5px)}.c-rich-text kbd kbd,.c-rich-text pre code{padding-left:0;padding-right:0;border-style:none;background:none}.c-rich-text pre{border-bottom-right-radius:.5rem;--border-opacity:1;border:1px solid #49beb7;border-color:rgba(73,190,183,var(--border-opacity));--bg-opacity:1;background-color:#edf9f8;background-color:rgba(237,249,248,var(--bg-opacity));padding:1em 1.5em;display:block}.c-rich-text .highlight,.c-rich-text pre{-webkit-overflow-scrolling:auto;overflow-x:auto}.c-rich-text blockquote{position:relative;margin-left:2rem;padding-right:1.5rem;padding-left:.75rem;--text-opacity:1;color:#718096;color:rgba(113,128,150,var(--text-opacity));border-left-width:2px;--border-opacity:1;border-color:#49beb7;border-color:rgba(73,190,183,var(--border-opacity))}.page-item{flex-grow:1}.page-item.disabled a{--text-opacity:1;color:#cbd5e0;color:rgba(203,213,224,var(--text-opacity))}.page-item.active a{--text-opacity:1;color:#80d2cd;color:rgba(128,210,205,var(--text-opacity))}@media (min-width:1024px){.waterfall{-moz-column-count:2;column-count:2;-moz-column-gap:1rem;column-gap:1rem}.pin{-moz-column-break-inside:avoid;break-inside:avoid;padding:5px}}@supports ((-webkit-backdrop-filter:none) or (backdrop-filter:none)){.bg-opacity-custom{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}}details.toc nav{overflow-x:hidden}details.toc nav ul{list-style:disc;list-style-position:inside;direction:rtl}details.toc nav ul ul{list-style:circle;list-style-position:inside;margin-right:1em}details.toc nav ul>li{font-weight:300}details.toc nav ul>li,details.toc nav ul>li a{--text-opacity:1;color:#2c726e;color:rgba(44,114,110,var(--text-opacity))}details.toc nav ul ul>li{line-height:1.5;font-size:.875rem}details.toc nav ul ul>li,details.toc nav ul ul>li a{--text-opacity:1;color:#42aba5;color:rgba(66,171,165,var(--text-opacity))}details.toc>summary{cursor:pointer;list-style:none;outline:none}details.toc>summary::-webkit-details-marker{display:none}details.toc hr{border-top:1px dotted #80d2cd;border-bottom:1px dotted #fff;margin-top:.8em;margin-bottom:.4em;text-align:center}details.toc hr:after{content:"Table of Contents";display:inline-block;position:relative;top:-19px;padding:0 5px;--bg-opacity:0.75;background:#f7fafc;color:#2c726e;font-size:16px;font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif}.bg-gray-100{--bg-opacity:1;background-color:#f7fafc;background-color:rgba(247,250,252,var(--bg-opacity))}.bg-opacity-75{--bg-opacity:0.75}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.items-start{align-items:flex-start}.items-baseline{align-items:baseline}.self-end{align-self:flex-end}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.content-end{align-content:flex-end}.flex-grow-0{flex-grow:0}.flex-grow-3{flex-grow:3}.flex-grow{flex-grow:1}.flex-shrink-0{flex-shrink:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.float-left{float:left}.clearfix:after{content:"";display:table;clear:both}.font-sans{font-family:Source Han Sans SC,Source Han Sans CN,Noto Sans CJK SC,Noto Sans,-apple-system,Helvetica Neue,Helvetica,Nimbus Sans L,Arial,Liberation Sans,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,WenQuanYi Zen Hei Sharp,sans-serif}.font-serif{font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif}.font-cursive{font-family:FancyTitleFont,"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif}.font-light{font-weight:300}.font-normal{font-weight:400}.font-medium{font-weight:500}.h-4{height:1rem}.h-8{height:2rem}.h-12{height:3rem}.text-sm{font-size:.875rem}.text-xl{font-size:1.25rem}.text-3xl{font-size:1.875rem}.leading-tight{line-height:1.25}.leading-relaxed{line-height:1.625}.leading-loose{line-height:2}.m-0{margin:0}.my-4{margin-top:1rem;margin-bottom:1rem}.mx-auto{margin-left:auto;margin-right:auto}.max-h-16{max-height:5rem}.max-w-xl{max-width:36rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.min-h-70vh{min-height:70vh}.p-0{padding:0}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pt-1{padding-top:.25rem}.pl-1{padding-left:.25rem}.pt-2{padding-top:.5rem}.pb-2{padding-bottom:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pr-4{padding-right:1rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pr-6{padding-right:1.5rem}.pb-8{padding-bottom:2rem}.relative{position:relative}.top-0{top:0}.-bottom-1{bottom:-.25rem}.fill-current{fill:currentColor}.text-gray-200{--text-opacity:1;color:#edf2f7;color:rgba(237,242,247,var(--text-opacity))}.text-gray-500{--text-opacity:1;color:#a0aec0;color:rgba(160,174,192,var(--text-opacity))}.text-gray-600{--text-opacity:1;color:#718096;color:rgba(113,128,150,var(--text-opacity))}.text-gray-700{--text-opacity:1;color:#4a5568;color:rgba(74,85,104,var(--text-opacity))}.text-eucalyptus-400{--text-opacity:1;color:#4eab90;color:rgba(78,171,144,var(--text-opacity))}.text-eucalyptus-500{--text-opacity:1;color:#028760;color:rgba(2,135,96,var(--text-opacity))}.text-eucalyptus-600{--text-opacity:1;color:#027a56;color:rgba(2,122,86,var(--text-opacity))}.text-java-700{--text-opacity:1;color:#2c726e;color:rgba(44,114,110,var(--text-opacity))}.text-medium-red-violet-400{--text-opacity:1;color:#d77ab2;color:rgba(215,122,178,var(--text-opacity))}.text-medium-red-violet-600{--text-opacity:1;color:#b23b83;color:rgba(178,59,131,var(--text-opacity))}.hover\:text-gray-700:hover{--text-opacity:1;color:#4a5568;color:rgba(74,85,104,var(--text-opacity))}.hover\:text-java-400:hover{--text-opacity:1;color:#80d2cd;color:rgba(128,210,205,var(--text-opacity))}.hover\:text-medium-red-violet-400:hover{--text-opacity:1;color:#d77ab2;color:rgba(215,122,178,var(--text-opacity))}.focus\:text-gray-700:focus{--text-opacity:1;color:#4a5568;color:rgba(74,85,104,var(--text-opacity))}.italic{font-style:italic}.tracking-tight{letter-spacing:-.025em}.w-4{width:1rem}.w-8{width:2rem}.w-12{width:3rem}.w-full{width:100%}.z-50{z-index:50}@media (min-width:640px){.sm\:p-10{padding:2.5rem}}@media (min-width:768px){.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:items-end{align-items:flex-end}.md\:justify-end{justify-content:flex-end}.md\:content-start{align-content:flex-start}.md\:flex-grow-0{flex-grow:0}.md\:flex-grow{flex-grow:1}.md\:order-1{order:1}.md\:order-2{order:2}.md\:order-3{order:3}.md\:order-4{order:4}.md\:float-right{float:right}.md\:mb-2{margin-bottom:.5rem}.md\:max-w-xs{max-width:20rem}.md\:p-16{padding:4rem}.md\:px-0{padding-left:0;padding-right:0}.md\:pl-4{padding-left:1rem}.md\:pr-12{padding-right:3rem}.md\:sticky{position:-webkit-sticky;position:sticky}.md\:top-0{top:0}.md\:bottom-0{bottom:0}.md\:text-right{text-align:right}.md\:w-2\/5{width:40%}.md\:w-3\/5{width:60%}}@media (min-width:1024px){.lg\:min-w-0{min-width:0}.lg\:pr-20{padding-right:5rem}}@media (min-width:1280px){.xl\:pr-24{padding-right:6rem}.xl\:w-1\/2{width:50%}} \ No newline at end of file
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none;padding:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:Source Han Sans SC,Source Han Sans CN,Noto Sans CJK SC,Noto Sans,-apple-system,Helvetica Neue,Helvetica,Nimbus Sans L,Arial,Liberation Sans,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,WenQuanYi Zen Hei Sharp,sans-serif;line-height:1.5}*,:after,:before{box-sizing:border-box;border:0 solid #e2e8f0}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#a0aec0}input::-moz-placeholder,textarea::-moz-placeholder{color:#a0aec0}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#a0aec0}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:#a0aec0}input::placeholder,textarea::placeholder{color:#a0aec0}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:Fira Code,Cascadia Code,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Sarasa Mono SC,Noto Sans CJK SC,"monospace",monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}.heading,h1{font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif;font-weight:500;line-height:1.25;--text-opacity:1;color:#01513a;color:rgba(1,81,58,var(--text-opacity))}h1{font-size:1.875rem}@media (min-width:1024px){h1{font-size:2.25rem}}h2{font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif;font-weight:500;line-height:1.25;--text-opacity:1;color:#01513a;color:rgba(1,81,58,var(--text-opacity));font-size:1.5rem}@media (min-width:1024px){h2{font-size:1.875rem}}h3{font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif;font-weight:500;line-height:1.25;--text-opacity:1;color:#01513a;color:rgba(1,81,58,var(--text-opacity));font-size:1.25rem}h4,h5,h6{font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif;font-weight:500;line-height:1.25;--text-opacity:1;color:#01513a;color:rgba(1,81,58,var(--text-opacity));font-size:1.125rem}hr{border:none;border-bottom:1px solid #9acfbf;margin-bottom:.8em;height:5px}hr.double-line{border-top:3px double #4eab90;text-align:center;border-bottom:none}hr.double-line:after{content:"\2767";display:inline-block;position:relative;top:-27px;padding:0 10px;background:#f7fafc;color:#4eab90;font-size:30px}a:not(.icon){text-decoration:none;background-image:linear-gradient(currentColor,currentColor);background-position:0 100%;background-repeat:no-repeat;background-size:0 2px;transition:background-size .3s cubic-bezier(0,.5,0,1)}a:not(.icon):focus,a:not(.icon):hover{text-decoration:none;background-size:100% 2px}a{color:#028760}a:focus,a:hover{color:#49beb7}.a-gray a{--text-opacity:1;color:#718096;color:rgba(113,128,150,var(--text-opacity))}.a-gray a:focus,.a-gray a:hover{color:#cbd5e0}.c-rich-text{font-family:Source Han Sans SC,Source Han Sans CN,Noto Sans CJK SC,Noto Sans,-apple-system,Helvetica Neue,Helvetica,Nimbus Sans L,Arial,Liberation Sans,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,WenQuanYi Zen Hei Sharp,sans-serif;font-size:1rem;line-height:1.625}.c-rich-text ::-moz-selection{color:#edf9f8;background-color:#2c726e}.c-rich-text ::selection{color:#edf9f8;background-color:#2c726e}.c-rich-text a{color:#028760}.c-rich-text a:focus,.c-rich-text a:hover{color:#49beb7}.c-rich-text>*+*{margin-top:1.5rem}.c-rich-text li{margin-bottom:.25rem}.c-rich-text li p{display:inline}.c-rich-text ul{list-style-type:square;list-style-position:inside}.c-rich-text ol{list-style-type:lower-greek;list-style-position:inside}.c-rich-text li>ol,.c-rich-text li>ul{margin-left:1rem}.c-rich-text .footnotes ol{list-style-type:decimal}.c-rich-text mark{background-color:#b6e5e2;border-bottom-color:#42aba5;border-bottom-width:2px;padding:2px;margin:0 5px}.c-rich-text img{box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.c-rich-text table{overflow-x:auto;-webkit-overflow-scrolling:auto;table-layout:auto}.c-rich-text td,.c-rich-text th{border-bottom-color:#42aba5;border-bottom-width:1px;padding:.5rem 1rem}.c-rich-text th{border-top-width:1px;background-color:#edf9f8;border-top-color:#42aba5}.c-rich-text b,.c-rich-text strong{font-weight:700;color:#027a56}.c-rich-text em,.c-rich-text i{font-style:italic}.c-rich-text sub,.c-rich-text sup{font-size:.75rem;vertical-align:baseline}.c-rich-text abbr,.c-rich-text acronym{border-bottom:1px dotted;font-variant:normal;text-decoration:none}.c-rich-text abbr{cursor:help}.c-rich-text code,.c-rich-text pre,.c-rich-text pre tt{font-family:Fira Code,Cascadia Code,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Sarasa Mono SC,Noto Sans CJK SC,"monospace",monospace}.c-rich-text code,.c-rich-text kbd,.c-rich-text pre tt{padding-left:.25rem;padding-right:.25rem;border-width:1px;--border-opacity:1;border-color:#80d2cd;border-color:rgba(128,210,205,var(--border-opacity));background:repeating-linear-gradient(45deg,#b6e5e2,#b6e5e2 1px,#edf9f8 0,#edf9f8 5px)}.c-rich-text kbd kbd,.c-rich-text pre code{padding-left:0;padding-right:0;border-style:none;background:none}.c-rich-text pre{border-bottom-right-radius:.5rem;--border-opacity:1;border:1px solid #49beb7;border-color:rgba(73,190,183,var(--border-opacity));--bg-opacity:1;background-color:#edf9f8;background-color:rgba(237,249,248,var(--bg-opacity));padding:1em 1.5em;display:block}.c-rich-text .highlight,.c-rich-text pre{-webkit-overflow-scrolling:auto;overflow-x:auto}.c-rich-text blockquote{position:relative;margin-left:2rem;padding-right:1.5rem;padding-left:.75rem;--text-opacity:1;color:#718096;color:rgba(113,128,150,var(--text-opacity));border-left-width:2px;--border-opacity:1;border-color:#49beb7;border-color:rgba(73,190,183,var(--border-opacity))}.page-item{flex-grow:1}.page-item.disabled a{--text-opacity:1;color:#cbd5e0;color:rgba(203,213,224,var(--text-opacity))}.page-item.active a{--text-opacity:1;color:#80d2cd;color:rgba(128,210,205,var(--text-opacity))}@media (min-width:1024px){.waterfall{-moz-column-count:2;column-count:2;-moz-column-gap:1rem;column-gap:1rem}.pin{-moz-column-break-inside:avoid;break-inside:avoid;padding:5px}}@supports ((-webkit-backdrop-filter:none) or (backdrop-filter:none)){.bg-opacity-custom{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}}details.toc nav{overflow-x:hidden}details.toc nav ul{list-style:disc;list-style-position:inside;direction:rtl}details.toc nav ul ul{list-style:circle;list-style-position:inside;margin-right:1em}details.toc nav ul>li{font-weight:300}details.toc nav ul>li,details.toc nav ul>li a{--text-opacity:1;color:#2c726e;color:rgba(44,114,110,var(--text-opacity))}details.toc nav ul ul>li{line-height:1.5;font-size:.875rem}details.toc nav ul ul>li,details.toc nav ul ul>li a{--text-opacity:1;color:#42aba5;color:rgba(66,171,165,var(--text-opacity))}details.toc>summary{cursor:pointer;list-style:none;outline:none}details.toc>summary::-webkit-details-marker{display:none}details.toc hr{border-top:1px dotted #80d2cd;border-bottom:1px dotted #fff;margin-top:.8em;margin-bottom:.4em;text-align:center}details.toc hr:after{content:"Table of Contents";display:inline-block;position:relative;top:-19px;padding:0 5px;--bg-opacity:0.75;background:#f7fafc;color:#2c726e;font-size:16px;font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif}.bg-gray-100{--bg-opacity:1;background-color:#f7fafc;background-color:rgba(247,250,252,var(--bg-opacity))}.bg-gray-200{--bg-opacity:1;background-color:#edf2f7;background-color:rgba(237,242,247,var(--bg-opacity))}.bg-opacity-75{--bg-opacity:0.75}.focus\:border-eucalyptus-500:focus{--border-opacity:1;border-color:#028760;border-color:rgba(2,135,96,var(--border-opacity))}.border-b{border-bottom-width:1px}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.items-start{align-items:flex-start}.items-baseline{align-items:baseline}.self-end{align-self:flex-end}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.content-end{align-content:flex-end}.flex-grow-0{flex-grow:0}.flex-grow-3{flex-grow:3}.flex-grow{flex-grow:1}.flex-shrink-0{flex-shrink:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.float-left{float:left}.clearfix:after{content:"";display:table;clear:both}.font-sans{font-family:Source Han Sans SC,Source Han Sans CN,Noto Sans CJK SC,Noto Sans,-apple-system,Helvetica Neue,Helvetica,Nimbus Sans L,Arial,Liberation Sans,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,WenQuanYi Zen Hei Sharp,sans-serif}.font-serif{font-family:"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif}.font-cursive{font-family:FancyTitleFont,"Source Han Serif SC","Source Han Serif CN","Noto Serif CJK SC",Songti SC,STSong,AR PL New Sung,AR PL SungtiL GB,NSimSun,SimSun,TW-Sung,WenQuanYi Bitmap Song,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR PL UMing TW MBE,PMingLiU,MingLiU,serif}.font-light{font-weight:300}.font-normal{font-weight:400}.font-medium{font-weight:500}.h-4{height:1rem}.h-8{height:2rem}.h-12{height:3rem}.text-sm{font-size:.875rem}.text-xl{font-size:1.25rem}.text-3xl{font-size:1.875rem}.leading-tight{line-height:1.25}.leading-relaxed{line-height:1.625}.leading-loose{line-height:2}.m-0{margin:0}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.max-h-16{max-height:5rem}.max-w-xl{max-width:36rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.min-h-70vh{min-height:70vh}.p-0{padding:0}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.pt-1{padding-top:.25rem}.pl-1{padding-left:.25rem}.pt-2{padding-top:.5rem}.pb-2{padding-bottom:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pr-4{padding-right:1rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pr-6{padding-right:1.5rem}.pb-8{padding-bottom:2rem}.relative{position:relative}.top-0{top:0}.-bottom-1{bottom:-.25rem}.fill-current{fill:currentColor}.text-gray-200{--text-opacity:1;color:#edf2f7;color:rgba(237,242,247,var(--text-opacity))}.text-gray-500{--text-opacity:1;color:#a0aec0;color:rgba(160,174,192,var(--text-opacity))}.text-gray-600{--text-opacity:1;color:#718096;color:rgba(113,128,150,var(--text-opacity))}.text-gray-700{--text-opacity:1;color:#4a5568;color:rgba(74,85,104,var(--text-opacity))}.text-eucalyptus-400{--text-opacity:1;color:#4eab90;color:rgba(78,171,144,var(--text-opacity))}.text-eucalyptus-500{--text-opacity:1;color:#028760;color:rgba(2,135,96,var(--text-opacity))}.text-eucalyptus-600{--text-opacity:1;color:#027a56;color:rgba(2,122,86,var(--text-opacity))}.text-java-700{--text-opacity:1;color:#2c726e;color:rgba(44,114,110,var(--text-opacity))}.text-medium-red-violet-400{--text-opacity:1;color:#d77ab2;color:rgba(215,122,178,var(--text-opacity))}.text-medium-red-violet-600{--text-opacity:1;color:#b23b83;color:rgba(178,59,131,var(--text-opacity))}.hover\:text-gray-700:hover{--text-opacity:1;color:#4a5568;color:rgba(74,85,104,var(--text-opacity))}.hover\:text-java-400:hover{--text-opacity:1;color:#80d2cd;color:rgba(128,210,205,var(--text-opacity))}.hover\:text-medium-red-violet-400:hover{--text-opacity:1;color:#d77ab2;color:rgba(215,122,178,var(--text-opacity))}.focus\:text-gray-700:focus{--text-opacity:1;color:#4a5568;color:rgba(74,85,104,var(--text-opacity))}.italic{font-style:italic}.tracking-tight{letter-spacing:-.025em}.w-4{width:1rem}.w-8{width:2rem}.w-12{width:3rem}.w-full{width:100%}.z-50{z-index:50}@media (min-width:640px){.sm\:p-10{padding:2.5rem}}@media (min-width:768px){.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:items-end{align-items:flex-end}.md\:justify-end{justify-content:flex-end}.md\:content-start{align-content:flex-start}.md\:flex-grow-0{flex-grow:0}.md\:flex-grow{flex-grow:1}.md\:order-1{order:1}.md\:order-2{order:2}.md\:order-3{order:3}.md\:order-4{order:4}.md\:float-right{float:right}.md\:mb-2{margin-bottom:.5rem}.md\:max-w-xs{max-width:20rem}.md\:p-16{padding:4rem}.md\:px-0{padding-left:0;padding-right:0}.md\:pl-4{padding-left:1rem}.md\:pr-12{padding-right:3rem}.md\:sticky{position:-webkit-sticky;position:sticky}.md\:top-0{top:0}.md\:bottom-0{bottom:0}.md\:text-right{text-align:right}.md\:w-2\/5{width:40%}.md\:w-3\/5{width:60%}}@media (min-width:1024px){.lg\:min-w-0{min-width:0}.lg\:pr-20{padding-right:5rem}}@media (min-width:1280px){.xl\:pr-24{padding-right:6rem}.xl\:w-1\/2{width:50%}} \ No newline at end of file
diff --git a/static/lib/fastsearch.js b/static/lib/fastsearch.js
new file mode 100644
index 0000000..52dfdc1
--- /dev/null
+++ b/static/lib/fastsearch.js
@@ -0,0 +1,111 @@
+var fuse; // holds our search engine
+var fuseIndex;
+var searchVisible = false;
+var firstRun = true; // allow us to delay loading json data unless search activated
+var list = document.getElementById('searchResults'); // targets the <ul>
+var first = list.firstChild; // first child of search list
+var last = list.lastChild; // last child of search list
+var maininput = document.getElementById('searchInput'); // input box for search
+var resultsAvailable = false; // Did we get any search results?
+
+
+// ==========================================
+// execute search as each character is typed
+//
+document.getElementById("searchInput").onfocus = function (e) {
+ if (firstRun) {
+ loadSearch()
+ firstRun = false
+ }
+}
+document.getElementById("searchInput").onkeyup = function (e) {
+ if (firstRun) {
+ loadSearch()
+ firstRun = false
+ }
+ executeSearch(this.value);
+}
+
+
+// ==========================================
+// fetch some json without jquery
+//
+function fetchJSONFile(path, callback) {
+ var httpRequest = new XMLHttpRequest();
+ httpRequest.onreadystatechange = function () {
+ if (httpRequest.readyState === 4) {
+ if (httpRequest.status === 200) {
+ var data = JSON.parse(httpRequest.responseText);
+ if (callback) callback(data);
+ }
+ }
+ };
+ httpRequest.open('GET', path);
+ httpRequest.send();
+}
+
+
+// ==========================================
+// load our search index, only executed once
+// on first call of search box (CMD-/)
+//
+function loadSearch() {
+ console.log('loadSearch()')
+ fetchJSONFile('/index.json', function (data) {
+
+ var options = { // fuse.js options; check fuse.js website for details
+ shouldSort: true,
+ location: 0,
+ distance: 100,
+ threshold: 0.4,
+ minMatchCharLength: 2,
+ keys: [
+ 'permalink',
+ 'title',
+ 'tags',
+ 'contents'
+ ]
+ };
+ // Create the Fuse index
+ fuseIndex = Fuse.createIndex(options.keys, data)
+ fuse = new Fuse(data, options, fuseIndex); // build the index from the json file
+ });
+}
+
+
+// ==========================================
+// using the index we loaded on CMD-/, run
+// a search query (for "term") every time a letter is typed
+// in the search box
+//
+function executeSearch(term) {
+ let results = fuse.search(term); // the actual query being run using fuse.js
+ let searchitems = ''; // our results bucket
+
+ if (results.length === 0) { // no results based on what was typed into the input box
+ resultsAvailable = false;
+ searchitems = '';
+ } else { // build our html
+ // console.log(results)
+ permalinks = [];
+ numLimit = 5;
+ for (let item in results) { // only show first 5 results
+ if (item > numLimit) {
+ break;
+ }
+ if (permalinks.includes(results[item].item.permalink)) {
+ continue;
+ }
+ // console.log('item: %d, title: %s', item, results[item].item.title)
+ searchitems = searchitems + '<li><a href="' + results[item].item.permalink + '" tabindex="0">' + '<span class="title">' + results[item].item.title + '</span></a></li>';
+ permalinks.push(results[item].item.permalink);
+ }
+ resultsAvailable = true;
+ }
+
+ document.getElementById("searchResults").innerHTML = searchitems;
+ if (results.length > 0) {
+ first = list.firstChild.firstElementChild; // first result container — used for checking against keyboard up/down location
+ last = list.lastChild.firstElementChild; // last result container — used for checking against keyboard up/down location
+ }
+}
diff --git a/static/lib/fuse.min.js b/static/lib/fuse.min.js
new file mode 100644
index 0000000..cf145db
--- /dev/null
+++ b/static/lib/fuse.min.js
@@ -0,0 +1,9 @@
+/**
+ * Fuse.js v6.4.0 - Lightweight fuzzy-search (http://fusejs.io)
+ *
+ * Copyright (c) 2020 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(t){return(e="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})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(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,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(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}}),t&&u(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function l(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))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){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function g(e){return"string"==typeof e}function y(e){return"number"==typeof e}function p(e){return null!=e}function m(e){return!e.trim().length}var k=function(e){return"Invalid value for key ".concat(e)},M=function(e){return"Pattern length exceeds max of ".concat(e,".")},x=Object.prototype.hasOwnProperty,b=function(){function e(n){var r=this;t(this,e),this._keys=[],this._keyMap={};var i=0;n.forEach((function(e){var t=S(e);i+=t.weight,r._keys.push(t),r._keyMap[t.id]=t,i+=t.weight})),this._keys.forEach((function(e){e.weight/=i}))}return r(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 S(e){var t=null,n=null,r=null,i=1;if(g(e)||v(e))r=e,t=_(e),n=w(e);else{if(!x.call(e,"name"))throw new Error(function(e){return"Missing ".concat(e," property in key")}("name"));var o=e.name;if(r=o,x.call(e,"weight")&&(i=e.weight)<=0)throw new Error(function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")}(o));t=_(o),n=w(o)}return{path:t,id:n,weight:i,src:r}}function _(e){return v(e)?e:e.split(".")}function w(e){return v(e)?e.join("."):e}var L=c({},{isCaseSensitive:!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:.6,distance:100},{},{useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,i,o){if(i[o]){var c=t[i[o]];if(!p(c))return;if(o===i.length-1&&(g(c)||y(c)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(c));else if(v(c)){r=!0;for(var a=0,s=c.length;a<s;a+=1)e(c[a],i,o+1)}else i.length&&e(c,i,o+1)}else n.push(t)}(e,g(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1}),O=/[^ ]+/g;function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=new Map;return{get:function(n){var r=n.match(O).length;if(t.has(r))return t.get(r);var i=parseFloat((1/Math.sqrt(r)).toFixed(e));return t.set(r,i),i},clear:function(){t.clear()}}}var I=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,i=void 0===r?L.getFn:r;t(this,e),this.norm=A(3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return r(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,g(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();g(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(p(e)&&!m(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 o=n.getFn(e,t.path);if(p(o))if(v(o))!function(){for(var e=[],t=[{nestedArrIndex:-1,value:o}];t.length;){var c=t.pop(),a=c.nestedArrIndex,s=c.value;if(p(s))if(g(s)&&!m(s)){var u={v:s,i:a,n:n.norm.get(s)};e.push(u)}else v(s)&&s.forEach((function(e,n){t.push({nestedArrIndex:n,value:e})}))}r.$[i]=e}();else if(!m(o)){var c={v:o,n:n.norm.get(o)};r.$[i]=c}})),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?L.getFn:r,o=new I({getFn:i});return o.setKeys(e.map(S)),o.setSources(t),o.create(),o}function j(e,t){var n=e.matches;t.matches=[],p(n)&&n.forEach((function(e){if(p(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 E(e,t){t.score=e.score}function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?L.distance:s,h=t.ignoreLocation,f=void 0===h?L.ignoreLocation:h,l=r/e.length;if(f)return l;var d=Math.abs(a-o);return u?l+d/u:d?1:l}function R(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o<c;o+=1){var a=e[o];a&&-1===r?r=o:a||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}function F(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 P=function(){function e(n){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,c=void 0===o?L.location:o,a=i.threshold,s=void 0===a?L.threshold:a,u=i.distance,h=void 0===u?L.distance:u,f=i.includeMatches,l=void 0===f?L.includeMatches:f,d=i.findAllMatches,v=void 0===d?L.findAllMatches:d,g=i.minMatchCharLength,y=void 0===g?L.minMatchCharLength:g,p=i.isCaseSensitive,m=void 0===p?L.isCaseSensitive:p,k=i.ignoreLocation,M=void 0===k?L.ignoreLocation:k;if(t(this,e),this.options={location:c,threshold:s,distance:h,includeMatches:l,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:m,ignoreLocation:M},this.pattern=m?n:n.toLowerCase(),this.chunks=[],this.pattern.length){var x=function(e,t){r.chunks.push({pattern:e,alphabet:F(e),startIndex:t})},b=this.pattern.length;if(b>32){for(var S=0,_=b%32,w=b-_;S<w;)x(this.pattern.substr(S,32),S),S+=32;if(_){var O=b-32;x(this.pattern.substr(O),O)}}else x(this.pattern,0)}}return r(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var o=this.options,c=o.location,a=o.distance,s=o.threshold,u=o.findAllMatches,h=o.minMatchCharLength,f=o.ignoreLocation,d=[],v=0,g=!1;this.chunks.forEach((function(t){var n=t.pattern,i=t.alphabet,o=t.startIndex,y=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?L.location:i,c=r.distance,a=void 0===c?L.distance:c,s=r.threshold,u=void 0===s?L.threshold:s,h=r.findAllMatches,f=void 0===h?L.findAllMatches:h,l=r.minMatchCharLength,d=void 0===l?L.minMatchCharLength:l,v=r.includeMatches,g=void 0===v?L.includeMatches:v,y=r.ignoreLocation,p=void 0===y?L.ignoreLocation:y;if(t.length>32)throw new Error(M(32));for(var m,k=t.length,x=e.length,b=Math.max(0,Math.min(o,x)),S=u,_=b,w=d>1||g,O=w?Array(x):[];(m=e.indexOf(t,_))>-1;){var A=$(t,{currentLocation:m,expectedLocation:b,distance:a,ignoreLocation:p});if(S=Math.min(A,S),_=m+k,w)for(var I=0;I<k;)O[m+I]=1,I+=1}_=-1;for(var C=[],j=1,E=k+x,F=1<<k-1,P=0;P<k;P+=1){for(var N=0,D=E;N<D;){var z=$(t,{errors:P,currentLocation:b+D,expectedLocation:b,distance:a,ignoreLocation:p});z<=S?N=D:E=D,D=Math.floor((E-N)/2+N)}E=D;var K=Math.max(1,b-D+1),q=f?x:Math.min(b+D,x)+k,W=Array(q+2);W[q+1]=(1<<P)-1;for(var J=q;J>=K;J-=1){var T=J-1,V=n[e.charAt(T)];if(w&&(O[T]=+!!V),W[J]=(W[J+1]<<1|1)&V,P&&(W[J]|=(C[J+1]|C[J])<<1|1|C[J+1]),W[J]&F&&(j=$(t,{errors:P,currentLocation:T,expectedLocation:b,distance:a,ignoreLocation:p}))<=S){if(S=j,(_=T)<=b)break;K=Math.max(1,2*b-_)}}var U=$(t,{errors:P+1,currentLocation:b,expectedLocation:b,distance:a,ignoreLocation:p});if(U>S)break;C=W}var B={isMatch:_>=0,score:Math.max(.001,j)};if(w){var G=R(O,d);G.length?g&&(B.indices=G):B.isMatch=!1}return B}(e,n,i,{location:c+o,distance:a,threshold:s,findAllMatches:u,minMatchCharLength:h,includeMatches:r,ignoreLocation:f}),p=y.isMatch,m=y.score,k=y.indices;p&&(g=!0),v+=m,p&&k&&(d=[].concat(l(d),l(k)))}));var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=d),y}}]),e}(),N=function(){function e(n){t(this,e),this.pattern=n}return r(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return D(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return D(e,this.singleRegex)}}]),e}();function D(e,t){var n=e.match(t);return n?n[1]:null}var z=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{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/^=(.*)$/}}]),i}(N),K=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{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/^!(.*)$/}}]),i}(N),q=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{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/^\^(.*)$/}}]),i}(N),W=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{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/^!\^(.*)$/}}]),i}(N),J=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{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/^(.*)\$$/}}]),i}(N),T=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{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/^!(.*)\$$/}}]),i}(N),V=function(e){a(i,e);var n=f(i);function i(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=o.location,a=void 0===c?L.location:c,s=o.threshold,u=void 0===s?L.threshold:s,h=o.distance,f=void 0===h?L.distance:h,l=o.includeMatches,d=void 0===l?L.includeMatches:l,v=o.findAllMatches,g=void 0===v?L.findAllMatches:v,y=o.minMatchCharLength,p=void 0===y?L.minMatchCharLength:y,m=o.isCaseSensitive,k=void 0===m?L.isCaseSensitive:m;return t(this,i),(r=n.call(this,e))._bitapSearch=new P(e,{location:a,threshold:u,distance:f,includeMatches:d,findAllMatches:g,minMatchCharLength:p,isCaseSensitive:k}),r}return r(i,[{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/^(.*)$/}}]),i}(N),U=function(e){a(i,e);var n=f(i);function i(e){return t(this,i),n.call(this,e)}return r(i,[{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 o=!!r.length;return{isMatch:o,score:o?1:0,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),i}(N),B=[z,U,q,W,T,J,K,V],G=B.length,H=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function Q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(H).filter((function(e){return e&&!!e.trim()})),r=[],i=0,o=n.length;i<o;i+=1){for(var c=n[i],a=!1,s=-1;!a&&++s<G;){var u=B[s],h=u.isMultiMatch(c);h&&(r.push(new u(h,t)),a=!0)}if(!a)for(s=-1;++s<G;){var f=B[s],l=f.isSingleMatch(c);if(l){r.push(new f(l,t));break}}}return r}))}var X=new Set([V.type,U.type]),Y=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.isCaseSensitive,o=void 0===i?L.isCaseSensitive:i,c=r.includeMatches,a=void 0===c?L.includeMatches:c,s=r.minMatchCharLength,u=void 0===s?L.minMatchCharLength:s,h=r.findAllMatches,f=void 0===h?L.findAllMatches:h,l=r.location,d=void 0===l?L.location:l,v=r.threshold,g=void 0===v?L.threshold:v,y=r.distance,p=void 0===y?L.distance:y;t(this,e),this.query=null,this.options={isCaseSensitive:o,includeMatches:a,minMatchCharLength:u,findAllMatches:f,location:d,threshold:g,distance:p},this.pattern=o?n:n.toLowerCase(),this.query=Q(this.pattern,this.options)}return r(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,a=0,s=t.length;a<s;a+=1){var u=t[a];o.length=0,i=0;for(var h=0,f=u.length;h<f;h+=1){var d=u[h],v=d.search(e),g=v.isMatch,y=v.indices,p=v.score;if(!g){c=0,i=0,o.length=0;break}if(i+=1,c+=p,r){var m=d.constructor.type;X.has(m)?o=[].concat(l(o),l(y)):o.push(y)}}if(i){var k={isMatch:!0,score:c/i};return r&&(k.indices=o),k}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}]),e}(),Z=[];function ee(e,t){for(var n=0,r=Z.length;n<r;n+=1){var i=Z[n];if(i.condition(e,t))return new i(e,t)}return new P(e,t)}var te="$and",ne="$or",re="$path",ie="$val",oe=function(e){return!(!e[te]&&!e[ne])},ce=function(e){return!!e[re]},ae=function(t){return!v(t)&&"object"===e(t)&&!oe(t)},se=function(e){return i({},te,Object.keys(e).map((function(t){return i({},t,e[t])})))},ue=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;t(this,e),this.options=c({},L,{},r),this.options.useExtendedSearch,this._keyStore=new b(this.options.keys),this.setCollection(n,i)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof I))throw new Error("Incorrect 'index' type");this._myIndex=t||C(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){p(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,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]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,c=i.includeScore,a=i.shouldSort,s=i.sortFn,u=i.ignoreFieldNorm,h=g(e)?g(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return he(h,{ignoreFieldNorm:u}),a&&h.sort(s),y(r)&&r>-1&&(h=h.slice(0,r)),fe(h,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(e){var t=ee(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(p(n)){var c=t.searchIn(n),a=c.isMatch,s=c.score,u=c.indices;a&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:u}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,i=void 0===r||r,o=function e(n){var r=Object.keys(n),o=ce(n);if(!o&&r.length>1&&!oe(n))return e(se(n));if(ae(n)){var c=o?n[re]:r[0],a=o?n[ie]:n[c];if(!g(a))throw new Error(k(c));var s={keyId:w(c),pattern:a};return i&&(s.searcher=ee(a,t)),s}var u={children:[],operator:r[0]};return r.forEach((function(t){var r=n[t];v(r)&&r.forEach((function(t){u.children.push(e(t))}))})),u};return oe(e)||(e=se(e)),o(e)}(e,this.options),r=this._myIndex.records,i={},o=[];return r.forEach((function(e){var r=e.$,c=e.i;if(p(r)){var a=function e(n,r,i){if(!n.children){var o=n.keyId,c=n.searcher,a=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(r,o),searcher:c});return a&&a.length?[{idx:i,item:r,matches:a}]:[]}switch(n.operator){case te:for(var s=[],u=0,h=n.children.length;u<h;u+=1){var f=e(n.children[u],r,i);if(!f.length)return[];s.push.apply(s,l(f))}return s;case ne:for(var d=[],v=0,g=n.children.length;v<g;v+=1){var y=e(n.children[v],r,i);if(y.length){d.push.apply(d,l(y));break}}return d}}(n,r,c);a.length&&(i[c]||(i[c]={idx:c,item:r,matches:[]},o.push(i[c])),a.forEach((function(e){var t,n=e.matches;(t=i[c].matches).push.apply(t,l(n))})))}})),o}},{key:"_searchObjectList",value:function(e){var t=this,n=ee(e,this.options),r=this._myIndex,i=r.keys,o=r.records,c=[];return o.forEach((function(e){var r=e.$,o=e.i;if(p(r)){var a=[];i.forEach((function(e,i){a.push.apply(a,l(t._findMatches({key:e,value:r[i],searcher:n})))})),a.length&&c.push({idx:o,item:r,matches:a})}})),c}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!p(n))return[];var i=[];if(v(n))n.forEach((function(e){var n=e.v,o=e.i,c=e.n;if(p(n)){var a=r.searchIn(n),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:n,idx:o,norm:c,indices:h})}}));else{var o=n.v,c=n.n,a=r.searchIn(o),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:o,norm:c,indices:h})}return i}}]),e}();function he(e,t){var n=t.ignoreFieldNorm,r=void 0===n?L.ignoreFieldNorm:n;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var n=e.key,i=e.norm,o=e.score,c=n?n.weight:null;t*=Math.pow(0===o&&c?Number.EPSILON:o,(c||1)*(r?1:i))})),e.score=t}))}function fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?L.includeMatches:r,o=n.includeScore,c=void 0===o?L.includeScore:o,a=[];return i&&a.push(j),c&&a.push(E),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach((function(t){t(e,r)})),r}))}return ue.version="6.4.0",ue.createIndex=C,ue.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?L.getFn:n,i=e.keys,o=e.records,c=new I({getFn:r});return c.setKeys(i),c.setIndexRecords(o),c},ue.config=L,function(){Z.push.apply(Z,arguments)}(Y),ue},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Fuse=t(); \ No newline at end of file