diff --git a/.vs/alphazero-official.github.io/v16/.suo b/.vs/alphazero-official.github.io/v16/.suo index eca9849..9906aae 100644 Binary files a/.vs/alphazero-official.github.io/v16/.suo and b/.vs/alphazero-official.github.io/v16/.suo differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index 40bccf7..2e9285e 100644 Binary files a/.vs/slnx.sqlite and b/.vs/slnx.sqlite differ diff --git a/assets/js/sjs.js b/assets/js/sjs.js new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/fuzzysearch/.editorconfig b/node_modules/fuzzysearch/.editorconfig new file mode 100644 index 0000000..5d12634 --- /dev/null +++ b/node_modules/fuzzysearch/.editorconfig @@ -0,0 +1,13 @@ +# editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/node_modules/fuzzysearch/.jshintignore b/node_modules/fuzzysearch/.jshintignore new file mode 100644 index 0000000..f06235c --- /dev/null +++ b/node_modules/fuzzysearch/.jshintignore @@ -0,0 +1,2 @@ +node_modules +dist diff --git a/node_modules/fuzzysearch/.jshintrc b/node_modules/fuzzysearch/.jshintrc new file mode 100644 index 0000000..63bccb7 --- /dev/null +++ b/node_modules/fuzzysearch/.jshintrc @@ -0,0 +1,21 @@ +{ + "curly": true, + "eqeqeq": true, + "newcap": true, + "noarg": true, + "noempty": true, + "nonew": true, + "sub": true, + "validthis": true, + "undef": true, + "trailing": true, + "boss": true, + "eqnull": true, + "strict": true, + "immed": true, + "expr": true, + "latedef": "nofunc", + "quotmark": "single", + "indent": 2, + "node": true +} diff --git a/node_modules/fuzzysearch/.npmignore b/node_modules/fuzzysearch/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/node_modules/fuzzysearch/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/fuzzysearch/CHANGELOG.md b/node_modules/fuzzysearch/CHANGELOG.md new file mode 100644 index 0000000..711183d --- /dev/null +++ b/node_modules/fuzzysearch/CHANGELOG.md @@ -0,0 +1,18 @@ +# v1.0.3 Short Fuse + +- Improved circuit-breaker when `needle` and `haystack` length are equal + +# v1.0.2 Vodka Tonic + +- Slightly updated circuit-breaker that tests for equal length first +- Doubled method performance ([see jsperf tests](http://jsperf.com/fuzzysearch-regex/3)) + +# v1.0.1 Circuit Breaker + +- Introduced a circuit-breaker where queries longer than the searched string will return `false` +- Introduced a circuit-breaker where queries identical to the searched string will return `true` +- Introduced a circuit-breaker where text containing the entire query will return `true` + +# v1.0.0 IPO + +- Initial Public Release diff --git a/node_modules/fuzzysearch/LICENSE b/node_modules/fuzzysearch/LICENSE new file mode 100644 index 0000000..b980cef --- /dev/null +++ b/node_modules/fuzzysearch/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright © 2015 Nicolas Bevacqua + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/fuzzysearch/README.md b/node_modules/fuzzysearch/README.md new file mode 100644 index 0000000..15b38aa --- /dev/null +++ b/node_modules/fuzzysearch/README.md @@ -0,0 +1,45 @@ +# fuzzysearch + +> Tiny and blazing-fast fuzzy search in JavaScript + +Fuzzy searching allows for flexibly matching a string with partial input, useful for filtering data very quickly based on lightweight user input. + +# Demo + +To see `fuzzysearch` in action, head over to [bevacqua.github.io/horsey][3], which is a demo of an autocomplete component that uses `fuzzysearch` to filter out results based on user input. + +# Install + +From `npm` + +```shell +npm install --save fuzzysearch +``` + +# `fuzzysearch(needle, haystack)` + +Returns `true` if `needle` matches `haystack` using a fuzzy-searching algorithm. Note that this program doesn't implement _[levenshtein distance][2]_, but rather a simplified version where **there's no approximation**. The method will return `true` only if each character in the `needle` can be found in the `haystack` and occurs after the preceding character. + +```js +fuzzysearch('twl', 'cartwheel') // <- true +fuzzysearch('cart', 'cartwheel') // <- true +fuzzysearch('cw', 'cartwheel') // <- true +fuzzysearch('ee', 'cartwheel') // <- true +fuzzysearch('art', 'cartwheel') // <- true +fuzzysearch('eeel', 'cartwheel') // <- false +fuzzysearch('dog', 'cartwheel') // <- false +``` + +An exciting application for this kind of algorithm is to filter options from an autocomplete menu, check out [horsey][3] for an example on how that might look like. + +# But! _`RegExp`s...!_ + +![chart showing abysmal performance for regexp-based implementation][1] + +# License + +MIT + +[1]: https://cloud.githubusercontent.com/assets/934293/6495796/106a61a6-c2ac-11e4-945d-3d1bb066a76e.png +[2]: http://en.wikipedia.org/wiki/Levenshtein_distance +[3]: http://bevacqua.github.io/horsey diff --git a/node_modules/fuzzysearch/index.js b/node_modules/fuzzysearch/index.js new file mode 100644 index 0000000..047762f --- /dev/null +++ b/node_modules/fuzzysearch/index.js @@ -0,0 +1,24 @@ +'use strict'; + +function fuzzysearch (needle, haystack) { + var tlen = haystack.length; + var qlen = needle.length; + if (qlen > tlen) { + return false; + } + if (qlen === tlen) { + return needle === haystack; + } + outer: for (var i = 0, j = 0; i < qlen; i++) { + var nch = needle.charCodeAt(i); + while (j < tlen) { + if (haystack.charCodeAt(j++) === nch) { + continue outer; + } + } + return false; + } + return true; +} + +module.exports = fuzzysearch; diff --git a/node_modules/fuzzysearch/package.json b/node_modules/fuzzysearch/package.json new file mode 100644 index 0000000..690aba7 --- /dev/null +++ b/node_modules/fuzzysearch/package.json @@ -0,0 +1,51 @@ +{ + "_from": "fuzzysearch@^1.0.3", + "_id": "fuzzysearch@1.0.3", + "_inBundle": false, + "_integrity": "sha512-s+kNWQuI3mo9OALw0HJ6YGmMbLqEufCh2nX/zzV5CrICQ/y4AwPxM+6TIiF9ItFCHXFCyM/BfCCmN57NTIJuPg==", + "_location": "/fuzzysearch", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "fuzzysearch@^1.0.3", + "name": "fuzzysearch", + "escapedName": "fuzzysearch", + "rawSpec": "^1.0.3", + "saveSpec": null, + "fetchSpec": "^1.0.3" + }, + "_requiredBy": [ + "/simple-jekyll-search" + ], + "_resolved": "https://registry.npmjs.org/fuzzysearch/-/fuzzysearch-1.0.3.tgz", + "_shasum": "dffc80f6d6b04223f2226aa79dd194231096d008", + "_spec": "fuzzysearch@^1.0.3", + "_where": "C:\\alphazero-official.github.io\\node_modules\\simple-jekyll-search", + "author": { + "name": "Nicolas Bevacqua", + "email": "ng@bevacqua.io", + "url": "http://bevacqua.io" + }, + "bugs": { + "url": "https://github.com/bevacqua/fuzzysearch/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Tiny and blazing-fast fuzzy search in JavaScript", + "devDependencies": { + "jshint": "^2.6.0", + "tape": "^3.5.0" + }, + "homepage": "https://github.com/bevacqua/fuzzysearch", + "license": "MIT", + "name": "fuzzysearch", + "repository": { + "type": "git", + "url": "git://github.com/bevacqua/fuzzysearch.git" + }, + "scripts": { + "test": "jshint . && tape test/*.js" + }, + "version": "1.0.3" +} diff --git a/node_modules/fuzzysearch/test/fuzzysearch.js b/node_modules/fuzzysearch/test/fuzzysearch.js new file mode 100644 index 0000000..b178185 --- /dev/null +++ b/node_modules/fuzzysearch/test/fuzzysearch.js @@ -0,0 +1,14 @@ +'use strict'; + +var test = require('tape'); +var fuzzysearch = require('..'); + +test('fuzzysearch should match expectations', function (t) { + t.equal(fuzzysearch('car', 'cartwheel'), true); + t.equal(fuzzysearch('cwhl', 'cartwheel'), true); + t.equal(fuzzysearch('cwheel', 'cartwheel'), true); + t.equal(fuzzysearch('cartwheel', 'cartwheel'), true); + t.equal(fuzzysearch('cwheeel', 'cartwheel'), false); + t.equal(fuzzysearch('lw', 'cartwheel'), false); + t.end(); +}); diff --git a/node_modules/simple-jekyll-search/LICENSE.md b/node_modules/simple-jekyll-search/LICENSE.md new file mode 100644 index 0000000..7ea5087 --- /dev/null +++ b/node_modules/simple-jekyll-search/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Christian Fei + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/simple-jekyll-search/README.md b/node_modules/simple-jekyll-search/README.md new file mode 100644 index 0000000..c5925d7 --- /dev/null +++ b/node_modules/simple-jekyll-search/README.md @@ -0,0 +1,334 @@ +# [Simple-Jekyll-Search](https://www.npmjs.com/package/simple-jekyll-search) + +[![Build Status](https://img.shields.io/travis/christian-fei/Simple-Jekyll-Search/master.svg?)](https://travis-ci.org/christian-fei/Simple-Jekyll-Search) +[![dependencies Status](https://img.shields.io/david/christian-fei/Simple-Jekyll-Search.svg)](https://david-dm.org/christian-fei/Simple-Jekyll-Search) +[![devDependencies Status](https://img.shields.io/david/dev/christian-fei/Simple-Jekyll-Search.svg)](https://david-dm.org/christian-fei/Simple-Jekyll-Search?type=dev) + +A JavaScript library to add search functionality to any Jekyll blog. + +## Use case + +You have a blog, built with Jekyll, and want a **lightweight search functionality** on your blog, purely client-side? + +*No server configurations or databases to maintain*. + +Just **5 minutes** to have a **fully working searchable blog**. + +--- + +## Installation + +### npm + +```sh +npm install simple-jekyll-search +``` + +## Getting started + +### Create `search.json` + +Place the following code in a file called `search.json` in the **root** of your Jekyll blog. (You can also get a copy [from here](/example/search.json)) + +This file will be used as a small data source to perform the searches on the client side: + +```yaml +--- +layout: none +--- +[ + {% for post in site.posts %} + { + "title" : "{{ post.title | escape }}", + "category" : "{{ post.category }}", + "tags" : "{{ post.tags | join: ', ' }}", + "url" : "{{ site.baseurl }}{{ post.url }}", + "date" : "{{ post.date }}" + } {% unless forloop.last %},{% endunless %} + {% endfor %} +] +``` + + +## Preparing the plugin + +### Add DOM elements + +SimpleJekyllSearch needs two `DOM` elements to work: + +- a search input field +- a result container to display the results + +#### Give me the code + +Here is the code you can use with the default configuration: + +You need to place the following code within the layout where you want the search to appear. (See the configuration section below to customize it) + +For example in **_layouts/default.html**: + +```html + + + + + + +``` + + +## Usage + +Customize SimpleJekyllSearch by passing in your configuration options: + +```js +var sjs = SimpleJekyllSearch({ + searchInput: document.getElementById('search-input'), + resultsContainer: document.getElementById('results-container'), + json: '/search.json' +}) +``` + +### returns { search } + +A new instance of SimpleJekyllSearch returns an object, with the only property `search`. + +`search` is a function used to simulate a user input and display the matching results.  + +E.g.: + +```js +var sjs = SimpleJekyllSearch({ ...options }) +sjs.search('Hello') +``` + +💡 it can be used to filter posts by tags or categories! + +## Options + +Here is a list of the available options, usage questions, troubleshooting & guides. + +### searchInput (Element) [required] + +The input element on which the plugin should listen for keyboard event and trigger the searching and rendering for articles. + + +### resultsContainer (Element) [required] + +The container element in which the search results should be rendered in. Typically a `