From 0d5e66d9a5a57c8d54065f00c9e4a884930f0720 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 2 Nov 2016 19:21:14 +0100 Subject: [PATCH] Refactored JavaScript into components --- .eslintrc | 1 - docs/extensions/codehilite.md | 4 +- docs/extensions/metadata.md | 3 + docs/extensions/permalinks.md | 14 +- .../extensions/pymdown/arithmatex.md | 0 .../extensions/pymdown/critic.md | 0 .../extensions/pymdown/inlinehilite.md | 0 docs/extensions/pymdown/markup.md | 0 docs/extensions/pymdown/overview.md | 37 + docs/extensions/pymdown/tasklist.md | 0 .../icons/bitbucket-black-850dc5f8b2.svg | 1 + .../assets/images/icons/bitbucket-black.svg | 20 - .../icons/bitbucket-white-42306ad0de.svg | 1 + .../assets/images/icons/bitbucket-white.svg | 20 - .../images/icons/github-black-da331b3ec4.svg | 1 + material/assets/images/icons/github-black.svg | 18 - .../images/icons/github-white-1cfc8ff99e.svg | 1 + material/assets/images/icons/github-white.svg | 18 - .../images/icons/gitlab-black-81ba4a278f.svg | 1 + material/assets/images/icons/gitlab-black.svg | 31 - .../images/icons/gitlab-white-d65054b8fe.svg | 1 + material/assets/images/icons/gitlab-white.svg | 32 - .../javascripts/application-d59af56763.js | 58 + material/assets/javascripts/application.js | 3902 ----------------- .../assets/javascripts/application.js.map | 1 - .../javascripts/modernizr-dede1352ed.js | 1 + material/assets/javascripts/modernizr.js | 1220 ------ .../stylesheets/application-9cd3c99a66.css | 1 + material/assets/stylesheets/application.css | 1629 ------- material/base.html | 4 +- material/partials/nav-item.html | 2 +- mkdocs.yml | 16 +- src/assets/javascripts/application.js | 350 +- ...ubSourceFacts.js => GithubSourceFacts.jsx} | 30 +- src/assets/javascripts/components/Material.js | 92 +- .../components/Material/Listener.js | 33 + .../{Sidebar => Listener}/Abstract.js | 53 +- .../components/Material/Listener/Toggle.js | 41 + .../components/Material/Listener/Viewport.js | 35 + .../Material/Listener/Viewport/Media.js | 57 + .../Material/Listener/Viewport/Offset.js | 40 + .../Material/Listener/Viewport/Resize.js | 40 + .../javascripts/components/Material/Nav.js | 33 + .../{Sidebar/Marker.js => Nav/Blur.js} | 17 +- .../{Sidebar/Position.js => Nav/Collapse.js} | 82 +- .../javascripts/components/Material/Search.js | 33 + .../components/Material/Search/Index.jsx | 152 + .../components/Material/Search/Lock.js | 122 + .../components/Material/Sidebar.js | 70 +- src/assets/stylesheets/_shame.scss | 177 +- src/assets/stylesheets/application.scss | 3 + .../stylesheets/extensions/_codehilite.scss | 2 +- .../stylesheets/extensions/_footnotes.scss | 2 +- .../stylesheets/extensions/_permalinks.scss | 2 +- .../extensions/pymdown/_critic.scss | 0 .../extensions/pymdown/_tasklist.scss | 0 src/assets/stylesheets/layout/_nav.scss | 8 +- src/assets/stylesheets/layout/_sidebar.scss | 6 - src/partials/nav-item.html | 2 +- tests/unit/{Marker.spec.jsx => Marker.jsx} | 13 +- 60 files changed, 1096 insertions(+), 7437 deletions(-) create mode 100644 docs/extensions/metadata.md rename src/assets/stylesheets/extensions/pymdownx/_critic.scss => docs/extensions/pymdown/arithmatex.md (100%) rename src/assets/stylesheets/extensions/pymdownx/_inlinehilite.scss => docs/extensions/pymdown/critic.md (100%) rename src/assets/stylesheets/extensions/pymdownx/_tasklist.scss => docs/extensions/pymdown/inlinehilite.md (100%) create mode 100644 docs/extensions/pymdown/markup.md create mode 100644 docs/extensions/pymdown/overview.md create mode 100644 docs/extensions/pymdown/tasklist.md create mode 100644 material/assets/images/icons/bitbucket-black-850dc5f8b2.svg delete mode 100644 material/assets/images/icons/bitbucket-black.svg create mode 100644 material/assets/images/icons/bitbucket-white-42306ad0de.svg delete mode 100644 material/assets/images/icons/bitbucket-white.svg create mode 100644 material/assets/images/icons/github-black-da331b3ec4.svg delete mode 100644 material/assets/images/icons/github-black.svg create mode 100644 material/assets/images/icons/github-white-1cfc8ff99e.svg delete mode 100644 material/assets/images/icons/github-white.svg create mode 100644 material/assets/images/icons/gitlab-black-81ba4a278f.svg delete mode 100644 material/assets/images/icons/gitlab-black.svg create mode 100644 material/assets/images/icons/gitlab-white-d65054b8fe.svg delete mode 100644 material/assets/images/icons/gitlab-white.svg create mode 100644 material/assets/javascripts/application-d59af56763.js delete mode 100644 material/assets/javascripts/application.js delete mode 100644 material/assets/javascripts/application.js.map create mode 100644 material/assets/javascripts/modernizr-dede1352ed.js delete mode 100644 material/assets/javascripts/modernizr.js create mode 100644 material/assets/stylesheets/application-9cd3c99a66.css delete mode 100644 material/assets/stylesheets/application.css rename src/assets/javascripts/components/{GithubSourceFacts.js => GithubSourceFacts.jsx} (87%) create mode 100644 src/assets/javascripts/components/Material/Listener.js rename src/assets/javascripts/components/Material/{Sidebar => Listener}/Abstract.js (65%) create mode 100644 src/assets/javascripts/components/Material/Listener/Toggle.js create mode 100644 src/assets/javascripts/components/Material/Listener/Viewport.js create mode 100644 src/assets/javascripts/components/Material/Listener/Viewport/Media.js create mode 100644 src/assets/javascripts/components/Material/Listener/Viewport/Offset.js create mode 100644 src/assets/javascripts/components/Material/Listener/Viewport/Resize.js create mode 100644 src/assets/javascripts/components/Material/Nav.js rename src/assets/javascripts/components/Material/{Sidebar/Marker.js => Nav/Blur.js} (87%) rename src/assets/javascripts/components/Material/{Sidebar/Position.js => Nav/Collapse.js} (51%) create mode 100644 src/assets/javascripts/components/Material/Search.js create mode 100644 src/assets/javascripts/components/Material/Search/Index.jsx create mode 100644 src/assets/javascripts/components/Material/Search/Lock.js create mode 100644 src/assets/stylesheets/extensions/pymdown/_critic.scss create mode 100644 src/assets/stylesheets/extensions/pymdown/_tasklist.scss rename tests/unit/{Marker.spec.jsx => Marker.jsx} (88%) diff --git a/.eslintrc b/.eslintrc index 6f081f879..7eb57fb00 100644 --- a/.eslintrc +++ b/.eslintrc @@ -42,7 +42,6 @@ "rules": { "array-callback-return": 2, "array-bracket-spacing": 2, - "arrow-body-style": [2, "always"], "arrow-parens": [2, "as-needed"], "arrow-spacing": 2, "block-scoped-var": 2, diff --git a/docs/extensions/codehilite.md b/docs/extensions/codehilite.md index 35a6ed0e7..d90d8ee5e 100644 --- a/docs/extensions/codehilite.md +++ b/docs/extensions/codehilite.md @@ -11,7 +11,7 @@ installed, which is a generic syntax highlighter with support for over [300 languages][], CodeHilite will also highlight the code block. Pygments can be installed with the following command: -``` bash +``` sh pip install pygments ``` @@ -158,7 +158,7 @@ over [300 languages][], so the following list of examples is just an excerpt. ### Bash ``` bash -#!/bin/sh +#!/bin/bash for OPT in "$@" do diff --git a/docs/extensions/metadata.md b/docs/extensions/metadata.md new file mode 100644 index 000000000..6828e5918 --- /dev/null +++ b/docs/extensions/metadata.md @@ -0,0 +1,3 @@ +# Metadata + +Foobar diff --git a/docs/extensions/permalinks.md b/docs/extensions/permalinks.md index d7772f1b2..784daf4bc 100644 --- a/docs/extensions/permalinks.md +++ b/docs/extensions/permalinks.md @@ -1,17 +1,17 @@ # Permalinks Permalinks are a feature of the [Table of Contents][] extension, which is part -of the standard Markdown library. The extension inserts a link at the end of +of the standard Markdown library. The extension inserts an anchor at the end of each headline, which makes it possible to directly link to a subpart of the document. ## Installation -To enable Permalinks, add the following to your `mkdocs.yml`: +To enable permalinks, add the following to your `mkdocs.yml`: -``` markdown -- toc: - permalink: true +``` yaml +markdown_extensions: + - toc(permalink=true) ``` This will add a link containing the paragraph symbol "¶" at the end of each @@ -20,8 +20,8 @@ Material theme will make appear on hover. In order to change the text of the permalink, a string can be passed, e.g.: ``` markdown -- toc: - permalink: "Permalink" +markdown_extensions: + - toc(permalink=Link) ``` ## Usage diff --git a/src/assets/stylesheets/extensions/pymdownx/_critic.scss b/docs/extensions/pymdown/arithmatex.md similarity index 100% rename from src/assets/stylesheets/extensions/pymdownx/_critic.scss rename to docs/extensions/pymdown/arithmatex.md diff --git a/src/assets/stylesheets/extensions/pymdownx/_inlinehilite.scss b/docs/extensions/pymdown/critic.md similarity index 100% rename from src/assets/stylesheets/extensions/pymdownx/_inlinehilite.scss rename to docs/extensions/pymdown/critic.md diff --git a/src/assets/stylesheets/extensions/pymdownx/_tasklist.scss b/docs/extensions/pymdown/inlinehilite.md similarity index 100% rename from src/assets/stylesheets/extensions/pymdownx/_tasklist.scss rename to docs/extensions/pymdown/inlinehilite.md diff --git a/docs/extensions/pymdown/markup.md b/docs/extensions/pymdown/markup.md new file mode 100644 index 000000000..e69de29bb diff --git a/docs/extensions/pymdown/overview.md b/docs/extensions/pymdown/overview.md new file mode 100644 index 000000000..cb48f7613 --- /dev/null +++ b/docs/extensions/pymdown/overview.md @@ -0,0 +1,37 @@ +# PyMdown Extensions + +[PyMdown Extensions][] is a collection of Markdown extensions that add some +great and missing features to the standard Markdown library. For this reason, +the **installation of this package is highly recommended** as it's +well-integrated with the Material theme. + +## Installation + +The Pymdown Extensions can be installed with the following command: + +``` sh +pip install pymdown-extensions +``` + +## Usage + +### Improvements on existing Markdown + +- BetterEm +- SuperFences +- MagicLink +- SmartSymbols + +### New Syntax for... + +- Caret +- Mark +- Tilde + +### New features + +- Arithmatex +- Inlinehilite +- Tasklist + +[PyMdown Extensions]: http://facelessuser.github.io/pymdown-extensions/ diff --git a/docs/extensions/pymdown/tasklist.md b/docs/extensions/pymdown/tasklist.md new file mode 100644 index 000000000..e69de29bb diff --git a/material/assets/images/icons/bitbucket-black-850dc5f8b2.svg b/material/assets/images/icons/bitbucket-black-850dc5f8b2.svg new file mode 100644 index 000000000..8f79a03b7 --- /dev/null +++ b/material/assets/images/icons/bitbucket-black-850dc5f8b2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/images/icons/bitbucket-black.svg b/material/assets/images/icons/bitbucket-black.svg deleted file mode 100644 index 0ab16772c..000000000 --- a/material/assets/images/icons/bitbucket-black.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/material/assets/images/icons/bitbucket-white-42306ad0de.svg b/material/assets/images/icons/bitbucket-white-42306ad0de.svg new file mode 100644 index 000000000..1ddc25338 --- /dev/null +++ b/material/assets/images/icons/bitbucket-white-42306ad0de.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/images/icons/bitbucket-white.svg b/material/assets/images/icons/bitbucket-white.svg deleted file mode 100644 index 1a8210a4a..000000000 --- a/material/assets/images/icons/bitbucket-white.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - diff --git a/material/assets/images/icons/github-black-da331b3ec4.svg b/material/assets/images/icons/github-black-da331b3ec4.svg new file mode 100644 index 000000000..169d723f9 --- /dev/null +++ b/material/assets/images/icons/github-black-da331b3ec4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/images/icons/github-black.svg b/material/assets/images/icons/github-black.svg deleted file mode 100644 index 843e3ac14..000000000 --- a/material/assets/images/icons/github-black.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/material/assets/images/icons/github-white-1cfc8ff99e.svg b/material/assets/images/icons/github-white-1cfc8ff99e.svg new file mode 100644 index 000000000..45fbc8291 --- /dev/null +++ b/material/assets/images/icons/github-white-1cfc8ff99e.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/images/icons/github-white.svg b/material/assets/images/icons/github-white.svg deleted file mode 100644 index b475cdf2c..000000000 --- a/material/assets/images/icons/github-white.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/material/assets/images/icons/gitlab-black-81ba4a278f.svg b/material/assets/images/icons/gitlab-black-81ba4a278f.svg new file mode 100644 index 000000000..fc533874e --- /dev/null +++ b/material/assets/images/icons/gitlab-black-81ba4a278f.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/images/icons/gitlab-black.svg b/material/assets/images/icons/gitlab-black.svg deleted file mode 100644 index 7f93abbf2..000000000 --- a/material/assets/images/icons/gitlab-black.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/material/assets/images/icons/gitlab-white-d65054b8fe.svg b/material/assets/images/icons/gitlab-white-d65054b8fe.svg new file mode 100644 index 000000000..1e922a9a4 --- /dev/null +++ b/material/assets/images/icons/gitlab-white-d65054b8fe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/material/assets/images/icons/gitlab-white.svg b/material/assets/images/icons/gitlab-white.svg deleted file mode 100644 index b3ede9bde..000000000 --- a/material/assets/images/icons/gitlab-white.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/material/assets/javascripts/application-d59af56763.js b/material/assets/javascripts/application-d59af56763.js new file mode 100644 index 000000000..b825e3092 --- /dev/null +++ b/material/assets/javascripts/application-d59af56763.js @@ -0,0 +1,58 @@ +var Application=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){n(1),e.exports=n(2)},function(e,t){"use strict";!function(e){function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return y.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function s(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),s(t)}function u(e){var t=new FileReader;return t.readAsText(e),s(t)}function l(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(y.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(y.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(y.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(e){if(!y.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):y.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},y.blob?(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=i(this);return e?e:Promise.resolve(this._bodyText)},y.formData&&(this.formData=function(){return this.text().then(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e){var t=e.toUpperCase();return m.indexOf(t)>-1?t:e}function f(e,t){t=t||{};var n=t.body;if(f.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=c(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function d(e){var t=new o,n=(e.getAllResponseHeaders()||"").trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),o=n.join(":").trim();t.append(r,o)}),t}function p(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var y={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];o||(o=[],this.map[e]=o),o.push(r)},o.prototype["delete"]=function(e){delete this.map[t(e)]},o.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},o.prototype.getAll=function(e){return this.map[t(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},y.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this)},l.call(f.prototype),l.call(p.prototype),p.prototype.clone=function(){return new p(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},p.error=function(){var e=new p(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];p.redirect=function(e,t){if(v.indexOf(t)===-1)throw new RangeError("Invalid status code");return new p(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=f,e.Response=p,e.fetch=function(e,t){return new Promise(function(n,r){function o(){return"responseURL"in s?s.responseURL:/^X-Request-URL:/m.test(s.getAllResponseHeaders())?s.getResponseHeader("X-Request-URL"):void 0}var i;i=f.prototype.isPrototypeOf(e)&&!t?e:new f(e,t);var s=new XMLHttpRequest;s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:d(s),url:o()},t="response"in s?s.response:s.responseText;n(new p(t,e))},s.onerror=function(){r(new TypeError("Network request failed"))},s.ontimeout=function(){r(new TypeError("Network request failed"))},s.open(i.method,i.url,!0),"include"===i.credentials&&(s.withCredentials=!0),"responseType"in s&&y.blob&&(s.responseType="blob"),i.headers.forEach(function(e,t){s.setRequestHeader(t,e)}),s.send("undefined"==typeof i._bodyInit?null:i._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:void 0)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,n=new f["default"].Sidebar(e),r=[new f["default"].Listener.Viewport.Offset(function(){return n.update()}),new f["default"].Listener.Viewport.Resize(function(){return n.update()})];if("string"==typeof t&&t.length)new f["default"].Listener.Viewport.Media(t,function(e){if(e.matches){n.update();var t=!0,o=!1,i=void 0;try{for(var s,a=r[Symbol.iterator]();!(t=(s=a.next()).done);t=!0){var u=s.value;u.listen()}}catch(l){o=!0,i=l}finally{try{!t&&a["return"]&&a["return"]()}finally{if(o)throw i}}}else{n.reset();var c=!0,f=!1,h=void 0;try{for(var d,p=r[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var y=d.value;y.unlisten()}}catch(l){f=!0,h=l}finally{try{!c&&p["return"]&&p["return"]()}finally{if(f)throw h}}}}).listen();else{n.update();var o=!0,i=!1,s=void 0;try{for(var a,u=r[Symbol.iterator]();!(o=(a=u.next()).done);o=!0){var l=a.value;l.listen()}}catch(c){i=!0,s=c}finally{try{!o&&u["return"]&&u["return"]()}finally{if(i)throw s}}}}},{key:"initializeNavBlur",value:function(e){var t=new f["default"].Nav.Blur(e),n=[new f["default"].Listener.Viewport.Offset(function(){return t.update()})];t.update();var r=!0,o=!1,i=void 0;try{for(var s,a=n[Symbol.iterator]();!(r=(s=a.next()).done);r=!0){var u=s.value;u.listen()}}catch(l){o=!0,i=l}finally{try{!r&&a["return"]&&a["return"]()}finally{if(o)throw i}}}},{key:"initializeNavCollapse",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=document.querySelectorAll(e),r=!0,o=!1,i=void 0;try{for(var s,a=function(){var e=s.value,n=new f["default"].Nav.Collapse(e),r=new f["default"].Listener.Toggle(e.previousElementSibling,function(){return n.update()});new f["default"].Listener.Viewport.Media(t,function(e){e.matches?r.listen():(n.reset(),r.unlisten())}).listen()},u=n[Symbol.iterator]();!(r=(s=u.next()).done);r=!0)a()}catch(l){o=!0,i=l}finally{try{!r&&u["return"]&&u["return"]()}finally{if(o)throw i}}}},{key:"hasGithubRepo",value:function(){return"github"===this.config_.repo.icon||this.config_.repo.url.includes("github")}}]),e}();t["default"]=h,document.addEventListener("DOMContentLoaded",function(){Modernizr.addTest("ios",function(){return!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)}),Modernizr.addTest("standalone",function(){return!!navigator.standalone}),a["default"].attach(document.body),document.getElementById("query").addEventListener("focus",function(){document.getElementById("search").checked=!0}),document.querySelector(".md-container").addEventListener("click",function(){document.getElementById("search").checked&&(document.getElementById("search").checked=!1)}),document.querySelector(".md-search").addEventListener("click",function(e){e.stopPropagation()}),fetch("https://api.github.com/repos/squidfunk/mkdocs-material/releases/latest").then(function(e){return e.json()})}),e.exports=t["default"]},function(e,t,n){var r,o="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};!function(){"use strict";/** + * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. + * + * @codingstandard ftlabs-jsv2 + * @copyright The Financial Times Limited [All Rights Reserved] + * @license MIT License (see LICENSE.txt) + */ +function i(e,t){function n(e,t){return function(){return e.apply(t,arguments)}}var r;if(t=t||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=t.touchBoundary||10,this.layer=e,this.tapDelay=t.tapDelay||200,this.tapTimeout=t.tapTimeout||700,!i.notNeeded(e)){for(var o=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],s=this,u=0,l=o.length;u=0,a=navigator.userAgent.indexOf("Android")>0&&!s,u=/iP(ad|hone|od)/.test(navigator.userAgent)&&!s,l=u&&/OS 4_\d(_\d)?/.test(navigator.userAgent),c=u&&/OS [6-7]_\d/.test(navigator.userAgent),f=navigator.userAgent.indexOf("BB10")>0;i.prototype.needsClick=function(e){switch(e.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(e.disabled)return!0;break;case"input":if(u&&"file"===e.type||e.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(e.className)},i.prototype.needsFocus=function(e){switch(e.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!a;case"input":switch(e.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!e.disabled&&!e.readOnly;default:return/\bneedsfocus\b/.test(e.className)}},i.prototype.sendClick=function(e,t){var n,r;document.activeElement&&document.activeElement!==e&&document.activeElement.blur(),r=t.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(e),!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,e.dispatchEvent(n)},i.prototype.determineEventType=function(e){return a&&"select"===e.tagName.toLowerCase()?"mousedown":"click"},i.prototype.focus=function(e){var t;u&&e.setSelectionRange&&0!==e.type.indexOf("date")&&"time"!==e.type&&"month"!==e.type?(t=e.value.length,e.setSelectionRange(t,t)):e.focus()},i.prototype.updateScrollParent=function(e){var t,n;if(t=e.fastClickScrollParent,!t||!t.contains(e)){n=e;do{if(n.scrollHeight>n.offsetHeight){t=n,e.fastClickScrollParent=n;break}n=n.parentElement}while(n)}t&&(t.fastClickLastScrollTop=t.scrollTop)},i.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},i.prototype.onTouchStart=function(e){var t,n,r;if(e.targetTouches.length>1)return!0;if(t=this.getTargetElementFromEventTarget(e.target),n=e.targetTouches[0],u){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!l){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return e.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(t)}}return this.trackingClick=!0,this.trackingClickStart=e.timeStamp,this.targetElement=t,this.touchStartX=n.pageX,this.touchStartY=n.pageY,e.timeStamp-this.lastClickTimen||Math.abs(t.pageY-this.touchStartY)>n},i.prototype.onTouchMove=function(e){return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(e.target)||this.touchHasMoved(e))&&(this.trackingClick=!1,this.targetElement=null),!0)},i.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},i.prototype.onTouchEnd=function(e){var t,n,r,o,i,s=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,n=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,c&&(i=e.changedTouches[0],s=document.elementFromPoint(i.pageX-window.pageXOffset,i.pageY-window.pageYOffset)||s,s.fastClickScrollParent=this.targetElement.fastClickScrollParent),r=s.tagName.toLowerCase(),"label"===r){if(t=this.findControl(s)){if(this.focus(s),a)return!1;s=t}}else if(this.needsFocus(s))return e.timeStamp-n>100||u&&window.top!==window&&"input"===r?(this.targetElement=null,!1):(this.focus(s),this.sendClick(s,e),u&&"select"===r||(this.targetElement=null,e.preventDefault()),!1);return!(!u||l||(o=s.fastClickScrollParent,!o||o.fastClickLastScrollTop===o.scrollTop))||(this.needsClick(s)||(e.preventDefault(),this.sendClick(s,e)),!1)},i.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},i.prototype.onMouse=function(e){return!this.targetElement||(!!e.forwardedTouchEvent||(!e.cancelable||(!(!this.needsClick(this.targetElement)||this.cancelNextClick)||(e.stopImmediatePropagation?e.stopImmediatePropagation():e.propagationStopped=!0,e.stopPropagation(),e.preventDefault(),!1))))},i.prototype.onClick=function(e){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===e.target.type&&0===e.detail||(t=this.onMouse(e),t||(this.targetElement=null),t)},i.prototype.destroy=function(){var e=this.layer;a&&(e.removeEventListener("mouseover",this.onMouse,!0),e.removeEventListener("mousedown",this.onMouse,!0),e.removeEventListener("mouseup",this.onMouse,!0)),e.removeEventListener("click",this.onClick,!0),e.removeEventListener("touchstart",this.onTouchStart,!1),e.removeEventListener("touchmove",this.onTouchMove,!1),e.removeEventListener("touchend",this.onTouchEnd,!1),e.removeEventListener("touchcancel",this.onTouchCancel,!1)},i.notNeeded=function(e){var t,n,r,o;if("undefined"==typeof window.ontouchstart)return!0;if(n=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!a)return!0;if(t=document.querySelector("meta[name=viewport]")){if(t.content.indexOf("user-scalable=no")!==-1)return!0;if(n>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(f&&(r=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),r[1]>=10&&r[2]>=3&&(t=document.querySelector("meta[name=viewport]")))){if(t.content.indexOf("user-scalable=no")!==-1)return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===e.style.msTouchAction||"manipulation"===e.style.touchAction||(o=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],!!(o>=27&&(t=document.querySelector("meta[name=viewport]"),t&&(t.content.indexOf("user-scalable=no")!==-1||document.documentElement.scrollWidth<=window.outerWidth)))||("none"===e.style.touchAction||"manipulation"===e.style.touchAction))},i.attach=function(e,t){return new i(e,t)},"object"===o(n(4))&&n(4)?(r=function(){return i}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))):"undefined"!=typeof e&&e.exports?(e.exports=i.attach,e.exports.FastClick=i):window.FastClick=i}()},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){(function(n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n2?f-2:0),d=2;d0&&(this.els_[t-1].dataset.mdBlurred=""),this.index_=t;else for(var n=this.index_;n>=0;n--){if(!(this.anchors_[n].offsetTop>e)){this.index_=n;break}n>0&&delete this.els_[n-1].dataset.mdBlurred}this.offset_=e}},{key:"reset",value:function(){[].forEach.call(this.els_,function(e){delete e.dataset.mdBlurred})}}]),e}();t["default"]=o,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nn){for(;" "!==e[n]&&--n>0;);return e.substring(0,n)+"…"}return e},s=document.getElementById("query");s.addEventListener("keyup",function(){for(var t=document.querySelector(".md-search-result__list");t.firstChild;)t.removeChild(t.firstChild);var s=n.search(e.value);s.forEach(function(e){var n=o[e.ref];t.appendChild(r.createElement("li",{"class":"md-search-result__item"},r.createElement("a",{href:n.location,title:n.title,"class":"md-search-result__link"},r.createElement("article",{"class":"md-search-result__article"},r.createElement("h1",{"class":"md-search-result__title"},n.title),r.createElement("p",{"class":"md-search-result__teaser"},i(n.text,140))))))});var a=document.querySelector(".md-search-result__meta");a.innerHTML=s.length+" search result"+(1!==s.length?"s":"")})})["catch"](function(){})};t["default"]=u,e.exports=t["default"]}).call(t,n(6))},function(e,t,n){var r,o;"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};!function(){var i=function s(e){var t=new s.Index;return t.pipeline.add(s.trimmer,s.stopWordFilter,s.stemmer),e&&e.call(t,t),t};i.version="0.7.1",/*! + * lunr.utils + * Copyright (C) 2016 Oliver Nightingale + */ +i.utils={},i.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),i.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},/*! + * lunr.EventEmitter + * Copyright (C) 2016 Oliver Nightingale + */ +i.EventEmitter=function(){this.events={}},i.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},i.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);this.events[e].splice(n,1),this.events[e].length||delete this.events[e]}},i.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)})}},i.EventEmitter.prototype.hasHandler=function(e){return e in this.events},/*! + * lunr.tokenizer + * Copyright (C) 2016 Oliver Nightingale + */ +i.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return i.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(i.tokenizer.seperator):[]},i.tokenizer.seperator=/[\s\-]+/,i.tokenizer.load=function(e){var t=this.registeredFunctions[e];if(!t)throw new Error("Cannot load un-registered function: "+e);return t},i.tokenizer.label="default",i.tokenizer.registeredFunctions={"default":i.tokenizer},i.tokenizer.registerFunction=function(e,t){t in this.registeredFunctions&&i.utils.warn("Overwriting existing tokenizer: "+t),e.label=t,this.registeredFunctions[t]=e},/*! + * lunr.Pipeline + * Copyright (C) 2016 Oliver Nightingale + */ +i.Pipeline=function(){this._stack=[]},i.Pipeline.registeredFunctions={},i.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&i.utils.warn("Overwriting existing registered function: "+t),e.label=t,i.Pipeline.registeredFunctions[e.label]=e},i.Pipeline.warnIfFunctionNotRegistered=function(e){var t=e.label&&e.label in this.registeredFunctions;t||i.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},i.Pipeline.load=function(e){var t=new i.Pipeline;return e.forEach(function(e){var n=i.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load un-registered function: "+e);t.add(n)}),t},i.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){i.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},i.Pipeline.prototype.after=function(e,t){i.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},i.Pipeline.prototype.before=function(e,t){i.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},i.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},i.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,r=this._stack.length,o=0;on.idx?n=n.next:(r+=t.val*n.val,t=t.next,n=n.next);return r},i.Vector.prototype.similarity=function(e){return this.dot(e)/(this.magnitude()*e.magnitude())},/*! + * lunr.SortedSet + * Copyright (C) 2016 Oliver Nightingale + */ +i.SortedSet=function(){this.length=0,this.elements=[]},i.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},i.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(i===e)return o;ie&&(n=o),r=n-t,o=t+Math.floor(r/2),i=this.elements[o]}return i===e?o:-1},i.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,r=n-t,o=t+Math.floor(r/2),i=this.elements[o];r>1;)ie&&(n=o),r=n-t,o=t+Math.floor(r/2),i=this.elements[o];return i>e?o:io-1||r>s-1)break;a[n]!==u[r]?a[n]u[r]&&r++:(t.add(a[n]),n++,r++)}return t},i.SortedSet.prototype.clone=function(){var e=new i.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},i.SortedSet.prototype.union=function(e){var t,n,r;this.length>=e.length?(t=this,n=e):(t=e,n=this),r=t.clone();for(var o=0,i=n.toArray();o0&&(r=1+Math.log(this.documentStore.length/n)),this._idfCache[t]=r},i.Index.prototype.search=function(e){var t=this.pipeline.run(this.tokenizerFn(e)),n=new i.Vector,r=[],o=this._fields.reduce(function(e,t){return e+t.boost},0),s=t.some(function(e){return this.tokenStore.has(e)},this);if(!s)return[];t.forEach(function(e,t,s){var a=1/s.length*this._fields.length*o,u=this,l=this.tokenStore.expand(e).reduce(function(t,r){var o=u.corpusTokens.indexOf(r),s=u.idf(r),l=1,c=new i.SortedSet;if(r!==e){var f=Math.max(3,r.length-e.length);l=1/Math.log(f)}o>-1&&n.insert(o,a*s*l);for(var h=u.tokenStore.get(r),d=Object.keys(h),p=d.length,y=0;y - * - * 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 NON-INFRINGEMENT. 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. - */ - - /* ---------------------------------------------------------------------------- - * Imports - * ------------------------------------------------------------------------- */ - - // import Expander from "./components/expander" - - var _fastclick = __webpack_require__(1); - - var _fastclick2 = _interopRequireDefault(_fastclick); - - var _lunr = __webpack_require__(3); - - var _lunr2 = _interopRequireDefault(_lunr); - - var _GithubSourceFacts = __webpack_require__(4); - - var _GithubSourceFacts2 = _interopRequireDefault(_GithubSourceFacts); - - var _Material = __webpack_require__(5); - - var _Material2 = _interopRequireDefault(_Material); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - // import Search from './components/search'; - - /* ---------------------------------------------------------------------------- - * Application - * ------------------------------------------------------------------------- */ - - var Application = function () { - - /** - * Constructor. - * - * @constructor - * @param {object} config Configuration object - * @return {void} - */ - function Application(config) { - _classCallCheck(this, Application); - - this.config = config; - } - - /** - * @return {void} - */ - - - _createClass(Application, [{ - key: "initialize", - value: function initialize() { - var material = new _Material2.default(); - material.initialize(); - - if (this.hasGithubRepo()) { - var githubSource = new _GithubSourceFacts2.default(this.config.storage, this.config.repo.url); - githubSource.initialize(); - } - } - - /** - * Is this application about a Github repository? - * - * @return {bool} - true if `repo.icon` or `repo.url` contains 'github' - */ - - }, { - key: "hasGithubRepo", - value: function hasGithubRepo() { - return this.config.repo.icon === "github" || this.config.repo.url.includes("github"); - } - }]); - - return Application; - }(); - - exports.default = Application; - - // TODO: wrap in function call - // application module export - - /* Initialize application upon DOM ready */ - - document.addEventListener("DOMContentLoaded", function () { - - /* Test for iOS */ - Modernizr.addTest("ios", function () { - return !!navigator.userAgent.match(/(iPad|iPhone|iPod)/g); - }); - - /* Test for web application context */ - Modernizr.addTest("standalone", function () { - return !!navigator.standalone; - }); - - /* Attack FastClick to mitigate 300ms delay on touch devices */ - _fastclick2.default.attach(document.body); - - // const query = document.getElementById("query") - // query.addEventListener("focus", () => { - // document.querySelector(".md-search").dataset.mdLocked = "" - // }) - - /* Intercept click on search mode toggle */ - var offset = 0; - // const toggle = document.getElementById("search") - // toggle.addEventListener("click", () => { // TODO: click may be the wrong event... - // const list = document.body // classList md bla - // const lock = !matchMedia("only screen and (min-width: 960px)").matches - // - // /* Exiting search mode */ - // if (list.dataset.mdLocked) { - // delete list.dataset.mdLocked - // - // /* Scroll to former position, but wait for 100ms to prevent flashes - // on iOS. A short timeout seems to do the trick */ - // if (lock) - // setTimeout(() => { - // window.scrollTo(0, offset) - // }, 100) - // - // /* Entering search mode */ - // } else { - // offset = window.scrollY - // - // /* First timeout: scroll to top after transition, to omit flickering */ - // if (lock) - // setTimeout(() => { - // window.scrollTo(0, 0) - // }, 400) - // - // /* Second timeout: Lock body after finishing transition and scrolling to - // top and focus input field. Sadly, the focus event is not dispatched - // on iOS Safari and there's nothing we can do about it. */ - // setTimeout(() => { - // - // /* This additional check is necessary to handle fast subsequent clicks - // on the toggle and the timeout to lock the body must be cancelled */ - // // if (ev.target.checked) { - // if (lock) - // list.dataset.mdLocked = "" - // setTimeout(() => { - // document.getElementById("query").focus() - // }, 200) - // // } - // }, 450) - // } - // }) - - // TODO: only do this on MOBILE and TABLET - // const toggleSearchClose = document.querySelector(".md-search__icon") - // toggleSearchClose.setAttribute("for", "search") // TODO: override query with search, when on mobile!!! - document.getElementById("query").addEventListener("focus", function () { - document.getElementById("search").checked = true; - }); - - document.querySelector(".md-container").addEventListener("click", function () { - if (document.getElementById("search").checked) document.getElementById("search").checked = false; - }); - - // stop propagation, if search is active... - document.querySelector(".md-search").addEventListener("click", function (ev) { - ev.stopPropagation(); - }); - // toggleSearchClose.addEventListener("click", ev => { - // ev.preventDefault() - // // ev.target - // - // const search = document.getElementById("search") - // search.checked = false - // }) - - // var toc = new Sidebar('.md-sidebar--secondary'); - // toc.listen(); - - var toggles = document.querySelectorAll(".md-nav__item--nested > .md-nav__link"); - [].forEach.call(toggles, function (togglex) { - var nav = togglex.nextElementSibling; - - // 1. - - nav.style.maxHeight = nav.getBoundingClientRect().height + "px"; - - togglex.addEventListener("click", function () { - var first = nav.getBoundingClientRect().height; - if (first) { - // console.log('closing'); - nav.style.maxHeight = first + "px"; // reset! - requestAnimationFrame(function () { - - nav.classList.add("md-nav--transitioning"); - nav.style.maxHeight = "0px"; - }); - } else { - (function () { - // console.log('opening'); - - /* Toggle and read height */ - nav.style.maxHeight = ""; - - nav.classList.add("md-nav--toggled"); - var last = nav.getBoundingClientRect().height; - nav.classList.remove("md-nav--toggled"); - - // Initial state - nav.style.maxHeight = "0px"; - - /* Enable animations */ - requestAnimationFrame(function () { - nav.classList.add("md-nav--transitioning"); - nav.style.maxHeight = last + "px"; - }); - })(); - } - }); - - // Capture the end with transitionend - nav.addEventListener("transitionend", function (ev) { - ev.target.classList.remove("md-nav--transitioning"); - if (ev.target.getBoundingClientRect().height > 0) { - ev.target.style.maxHeight = "100%"; - } - }); - }); - - // setTimeout(function() { - fetch("/mkdocs/search_index.json") // TODO: prepend BASE URL!!! - .then(function (response) { - return response.json(); - }).then(function (data) { - // console.log(data) - - /* Create index */ - var index = (0, _lunr2.default)(function () { - /* eslint-disable no-invalid-this, lines-around-comment */ - this.field("title", { boost: 10 }); - this.field("text"); - this.ref("location"); - /* eslint-enable no-invalid-this, lines-around-comment */ - }); - - /* Index articles */ - var articles = {}; - data.docs.forEach(function (article) { - - // TODO: match for two whitespaces, then replace unnecessary whitespace after string - article.text = article.text.replace(/\s(\.,\:)\s/gi, function (string, g1) { - return g1 + " "; - }); - // TODO: window.baseUrl sucks... - article.location = window.baseUrl + article.location; - articles[article.location] = article; - index.add(article); - }); - - /* Register keyhandler to execute search on key up */ - var queryx = document.getElementById("query"); - queryx.addEventListener("keyup", function () { - var container = document.querySelector(".md-search-result__list"); - while (container.firstChild) { - container.removeChild(container.firstChild); - } // /* Abort, if the query is empty */ - // var bar = document.querySelector('.bar.search'); - // if (!query.value.length) { - // while (meta.firstChild) - // meta.removeChild(meta.firstChild); - // - // /* Restore state */ - // bar.classList.remove('non-empty'); - // return; - // } - - /* Show reset button */ - // bar.classList.add('non-empty'); - - /* Execute search */ - var results = index.search(query.value); - results.forEach(function (result) { - var article = articles[result.ref]; - - /* Create a link referring to the article */ - var link = document.createElement("a"); - link.classList.add("md-search-result__link"); - link.href = article.location; - - // /* Create article container */ - var li = document.createElement("li"); - li.classList.add("md-search-result__item"); - li.appendChild(link); - - /* Create title element */ - var title = document.createElement("div"); - title.classList.add("md-search-result__title"); - - // article.title.split(//) - - title.innerHTML = article.title; - link.appendChild(title); - - /* Truncate a string after the given number of characters */ - var truncate = function truncate(string, n) { - var i = n; - if (string.length > i) { - while (string[i] !== " " && --i > 0) {} - return string.substring(0, i) + "…"; - } - return string; - }; - - /* Create text element */ - var text = document.createElement("p"); - text.classList.add("md-search-result__description"); - text.innerHTML = truncate(article.text); // .truncate(140); - text.innerHTML = truncate(article.text, 140); // .truncate(140); - link.appendChild(text); - - container.appendChild(li); - }); - - /* Show number of search results */ - // var number = document.createElement('strong'); - - var meta = document.querySelector(".md-search-result__meta"); - meta.innerHTML = results.length + " search result" + (results.length !== 1 ? "s" : ""); - - /* Update number */ - // while (meta.firstChild) - // meta.removeChild(meta.firstChild); - // meta.appendChild(number); - }); - - // setTimeout(function() { - // li.classList.remove('md-source__fact--hidden'); - // }, 100); - }).catch(function () { - // console.log("parsing failed", ex) - }); - // }, 1000); - - fetch("https://api.github.com/repos/squidfunk/mkdocs-material/releases/latest").then(function (response) { - return response.json(); - }); - // .then(data => { - // // console.log(data) - // }) - }); - module.exports = exports["default"]; - -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_RESULT__;'use strict'; - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - - ;(function () { - 'use strict'; - - /** - * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs. - * - * @codingstandard ftlabs-jsv2 - * @copyright The Financial Times Limited [All Rights Reserved] - * @license MIT License (see LICENSE.txt) - */ - - /*jslint browser:true, node:true*/ - /*global define, Event, Node*/ - - /** - * Instantiate fast-clicking listeners on the specified layer. - * - * @constructor - * @param {Element} layer The layer to listen on - * @param {Object} [options={}] The options to override the defaults - */ - - function FastClick(layer, options) { - var oldOnClick; - - options = options || {}; - - /** - * Whether a click is currently being tracked. - * - * @type boolean - */ - this.trackingClick = false; - - /** - * Timestamp for when click tracking started. - * - * @type number - */ - this.trackingClickStart = 0; - - /** - * The element being tracked for a click. - * - * @type EventTarget - */ - this.targetElement = null; - - /** - * X-coordinate of touch start event. - * - * @type number - */ - this.touchStartX = 0; - - /** - * Y-coordinate of touch start event. - * - * @type number - */ - this.touchStartY = 0; - - /** - * ID of the last touch, retrieved from Touch.identifier. - * - * @type number - */ - this.lastTouchIdentifier = 0; - - /** - * Touchmove boundary, beyond which a click will be cancelled. - * - * @type number - */ - this.touchBoundary = options.touchBoundary || 10; - - /** - * The FastClick layer. - * - * @type Element - */ - this.layer = layer; - - /** - * The minimum time between tap(touchstart and touchend) events - * - * @type number - */ - this.tapDelay = options.tapDelay || 200; - - /** - * The maximum time for a tap - * - * @type number - */ - this.tapTimeout = options.tapTimeout || 700; - - if (FastClick.notNeeded(layer)) { - return; - } - - // Some old versions of Android don't have Function.prototype.bind - function bind(method, context) { - return function () { - return method.apply(context, arguments); - }; - } - - var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel']; - var context = this; - for (var i = 0, l = methods.length; i < l; i++) { - context[methods[i]] = bind(context[methods[i]], context); - } - - // Set up event handlers as required - if (deviceIsAndroid) { - layer.addEventListener('mouseover', this.onMouse, true); - layer.addEventListener('mousedown', this.onMouse, true); - layer.addEventListener('mouseup', this.onMouse, true); - } - - layer.addEventListener('click', this.onClick, true); - layer.addEventListener('touchstart', this.onTouchStart, false); - layer.addEventListener('touchmove', this.onTouchMove, false); - layer.addEventListener('touchend', this.onTouchEnd, false); - layer.addEventListener('touchcancel', this.onTouchCancel, false); - - // Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) - // which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick - // layer when they are cancelled. - if (!Event.prototype.stopImmediatePropagation) { - layer.removeEventListener = function (type, callback, capture) { - var rmv = Node.prototype.removeEventListener; - if (type === 'click') { - rmv.call(layer, type, callback.hijacked || callback, capture); - } else { - rmv.call(layer, type, callback, capture); - } - }; - - layer.addEventListener = function (type, callback, capture) { - var adv = Node.prototype.addEventListener; - if (type === 'click') { - adv.call(layer, type, callback.hijacked || (callback.hijacked = function (event) { - if (!event.propagationStopped) { - callback(event); - } - }), capture); - } else { - adv.call(layer, type, callback, capture); - } - }; - } - - // If a handler is already declared in the element's onclick attribute, it will be fired before - // FastClick's onClick handler. Fix this by pulling out the user-defined handler function and - // adding it as listener. - if (typeof layer.onclick === 'function') { - - // Android browser on at least 3.2 requires a new reference to the function in layer.onclick - // - the old one won't work if passed to addEventListener directly. - oldOnClick = layer.onclick; - layer.addEventListener('click', function (event) { - oldOnClick(event); - }, false); - layer.onclick = null; - } - } - - /** - * Windows Phone 8.1 fakes user agent string to look like Android and iPhone. - * - * @type boolean - */ - var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0; - - /** - * Android requires exceptions. - * - * @type boolean - */ - var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone; - - /** - * iOS requires exceptions. - * - * @type boolean - */ - var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone; - - /** - * iOS 4 requires an exception for select elements. - * - * @type boolean - */ - var deviceIsIOS4 = deviceIsIOS && /OS 4_\d(_\d)?/.test(navigator.userAgent); - - /** - * iOS 6.0-7.* requires the target element to be manually derived - * - * @type boolean - */ - var deviceIsIOSWithBadTarget = deviceIsIOS && /OS [6-7]_\d/.test(navigator.userAgent); - - /** - * BlackBerry requires exceptions. - * - * @type boolean - */ - var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0; - - /** - * Determine whether a given element requires a native click. - * - * @param {EventTarget|Element} target Target DOM element - * @returns {boolean} Returns true if the element needs a native click - */ - FastClick.prototype.needsClick = function (target) { - switch (target.nodeName.toLowerCase()) { - - // Don't send a synthetic click to disabled inputs (issue #62) - case 'button': - case 'select': - case 'textarea': - if (target.disabled) { - return true; - } - - break; - case 'input': - - // File inputs need real clicks on iOS 6 due to a browser bug (issue #68) - if (deviceIsIOS && target.type === 'file' || target.disabled) { - return true; - } - - break; - case 'label': - case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames - case 'video': - return true; - } - - return (/\bneedsclick\b/.test(target.className) - ); - }; - - /** - * Determine whether a given element requires a call to focus to simulate click into element. - * - * @param {EventTarget|Element} target Target DOM element - * @returns {boolean} Returns true if the element requires a call to focus to simulate native click. - */ - FastClick.prototype.needsFocus = function (target) { - switch (target.nodeName.toLowerCase()) { - case 'textarea': - return true; - case 'select': - return !deviceIsAndroid; - case 'input': - switch (target.type) { - case 'button': - case 'checkbox': - case 'file': - case 'image': - case 'radio': - case 'submit': - return false; - } - - // No point in attempting to focus disabled inputs - return !target.disabled && !target.readOnly; - default: - return (/\bneedsfocus\b/.test(target.className) - ); - } - }; - - /** - * Send a click event to the specified element. - * - * @param {EventTarget|Element} targetElement - * @param {Event} event - */ - FastClick.prototype.sendClick = function (targetElement, event) { - var clickEvent, touch; - - // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24) - if (document.activeElement && document.activeElement !== targetElement) { - document.activeElement.blur(); - } - - touch = event.changedTouches[0]; - - // Synthesise a click event, with an extra attribute so it can be tracked - clickEvent = document.createEvent('MouseEvents'); - clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); - clickEvent.forwardedTouchEvent = true; - targetElement.dispatchEvent(clickEvent); - }; - - FastClick.prototype.determineEventType = function (targetElement) { - - //Issue #159: Android Chrome Select Box does not open with a synthetic click event - if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') { - return 'mousedown'; - } - - return 'click'; - }; - - /** - * @param {EventTarget|Element} targetElement - */ - FastClick.prototype.focus = function (targetElement) { - var length; - - // Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724. - if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') { - length = targetElement.value.length; - targetElement.setSelectionRange(length, length); - } else { - targetElement.focus(); - } - }; - - /** - * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it. - * - * @param {EventTarget|Element} targetElement - */ - FastClick.prototype.updateScrollParent = function (targetElement) { - var scrollParent, parentElement; - - scrollParent = targetElement.fastClickScrollParent; - - // Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the - // target element was moved to another parent. - if (!scrollParent || !scrollParent.contains(targetElement)) { - parentElement = targetElement; - do { - if (parentElement.scrollHeight > parentElement.offsetHeight) { - scrollParent = parentElement; - targetElement.fastClickScrollParent = parentElement; - break; - } - - parentElement = parentElement.parentElement; - } while (parentElement); - } - - // Always update the scroll top tracker if possible. - if (scrollParent) { - scrollParent.fastClickLastScrollTop = scrollParent.scrollTop; - } - }; - - /** - * @param {EventTarget} targetElement - * @returns {Element|EventTarget} - */ - FastClick.prototype.getTargetElementFromEventTarget = function (eventTarget) { - - // On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node. - if (eventTarget.nodeType === Node.TEXT_NODE) { - return eventTarget.parentNode; - } - - return eventTarget; - }; - - /** - * On touch start, record the position and scroll offset. - * - * @param {Event} event - * @returns {boolean} - */ - FastClick.prototype.onTouchStart = function (event) { - var targetElement, touch, selection; - - // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111). - if (event.targetTouches.length > 1) { - return true; - } - - targetElement = this.getTargetElementFromEventTarget(event.target); - touch = event.targetTouches[0]; - - if (deviceIsIOS) { - - // Only trusted events will deselect text on iOS (issue #49) - selection = window.getSelection(); - if (selection.rangeCount && !selection.isCollapsed) { - return true; - } - - if (!deviceIsIOS4) { - - // Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23): - // when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched - // with the same identifier as the touch event that previously triggered the click that triggered the alert. - // Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an - // immediately preceeding touch event (issue #52), so this fix is unavailable on that platform. - // Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string, - // which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long, - // random integers, it's safe to to continue if the identifier is 0 here. - if (touch.identifier && touch.identifier === this.lastTouchIdentifier) { - event.preventDefault(); - return false; - } - - this.lastTouchIdentifier = touch.identifier; - - // If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and: - // 1) the user does a fling scroll on the scrollable layer - // 2) the user stops the fling scroll with another tap - // then the event.target of the last 'touchend' event will be the element that was under the user's finger - // when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check - // is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42). - this.updateScrollParent(targetElement); - } - } - - this.trackingClick = true; - this.trackingClickStart = event.timeStamp; - this.targetElement = targetElement; - - this.touchStartX = touch.pageX; - this.touchStartY = touch.pageY; - - // Prevent phantom clicks on fast double-tap (issue #36) - if (event.timeStamp - this.lastClickTime < this.tapDelay) { - event.preventDefault(); - } - - return true; - }; - - /** - * Based on a touchmove event object, check whether the touch has moved past a boundary since it started. - * - * @param {Event} event - * @returns {boolean} - */ - FastClick.prototype.touchHasMoved = function (event) { - var touch = event.changedTouches[0], - boundary = this.touchBoundary; - - if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) { - return true; - } - - return false; - }; - - /** - * Update the last position. - * - * @param {Event} event - * @returns {boolean} - */ - FastClick.prototype.onTouchMove = function (event) { - if (!this.trackingClick) { - return true; - } - - // If the touch has moved, cancel the click tracking - if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) { - this.trackingClick = false; - this.targetElement = null; - } - - return true; - }; - - /** - * Attempt to find the labelled control for the given label element. - * - * @param {EventTarget|HTMLLabelElement} labelElement - * @returns {Element|null} - */ - FastClick.prototype.findControl = function (labelElement) { - - // Fast path for newer browsers supporting the HTML5 control attribute - if (labelElement.control !== undefined) { - return labelElement.control; - } - - // All browsers under test that support touch events also support the HTML5 htmlFor attribute - if (labelElement.htmlFor) { - return document.getElementById(labelElement.htmlFor); - } - - // If no for attribute exists, attempt to retrieve the first labellable descendant element - // the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label - return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea'); - }; - - /** - * On touch end, determine whether to send a click event at once. - * - * @param {Event} event - * @returns {boolean} - */ - FastClick.prototype.onTouchEnd = function (event) { - var forElement, - trackingClickStart, - targetTagName, - scrollParent, - touch, - targetElement = this.targetElement; - - if (!this.trackingClick) { - return true; - } - - // Prevent phantom clicks on fast double-tap (issue #36) - if (event.timeStamp - this.lastClickTime < this.tapDelay) { - this.cancelNextClick = true; - return true; - } - - if (event.timeStamp - this.trackingClickStart > this.tapTimeout) { - return true; - } - - // Reset to prevent wrong click cancel on input (issue #156). - this.cancelNextClick = false; - - this.lastClickTime = event.timeStamp; - - trackingClickStart = this.trackingClickStart; - this.trackingClick = false; - this.trackingClickStart = 0; - - // On some iOS devices, the targetElement supplied with the event is invalid if the layer - // is performing a transition or scroll, and has to be re-detected manually. Note that - // for this to function correctly, it must be called *after* the event target is checked! - // See issue #57; also filed as rdar://13048589 . - if (deviceIsIOSWithBadTarget) { - touch = event.changedTouches[0]; - - // In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null - targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement; - targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent; - } - - targetTagName = targetElement.tagName.toLowerCase(); - if (targetTagName === 'label') { - forElement = this.findControl(targetElement); - if (forElement) { - this.focus(targetElement); - if (deviceIsAndroid) { - return false; - } - - targetElement = forElement; - } - } else if (this.needsFocus(targetElement)) { - - // Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through. - // Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37). - if (event.timeStamp - trackingClickStart > 100 || deviceIsIOS && window.top !== window && targetTagName === 'input') { - this.targetElement = null; - return false; - } - - this.focus(targetElement); - this.sendClick(targetElement, event); - - // Select elements need the event to go through on iOS 4, otherwise the selector menu won't open. - // Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others) - if (!deviceIsIOS || targetTagName !== 'select') { - this.targetElement = null; - event.preventDefault(); - } - - return false; - } - - if (deviceIsIOS && !deviceIsIOS4) { - - // Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled - // and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42). - scrollParent = targetElement.fastClickScrollParent; - if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) { - return true; - } - } - - // Prevent the actual click from going though - unless the target node is marked as requiring - // real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted. - if (!this.needsClick(targetElement)) { - event.preventDefault(); - this.sendClick(targetElement, event); - } - - return false; - }; - - /** - * On touch cancel, stop tracking the click. - * - * @returns {void} - */ - FastClick.prototype.onTouchCancel = function () { - this.trackingClick = false; - this.targetElement = null; - }; - - /** - * Determine mouse events which should be permitted. - * - * @param {Event} event - * @returns {boolean} - */ - FastClick.prototype.onMouse = function (event) { - - // If a target element was never set (because a touch event was never fired) allow the event - if (!this.targetElement) { - return true; - } - - if (event.forwardedTouchEvent) { - return true; - } - - // Programmatically generated events targeting a specific element should be permitted - if (!event.cancelable) { - return true; - } - - // Derive and check the target element to see whether the mouse event needs to be permitted; - // unless explicitly enabled, prevent non-touch click events from triggering actions, - // to prevent ghost/doubleclicks. - if (!this.needsClick(this.targetElement) || this.cancelNextClick) { - - // Prevent any user-added listeners declared on FastClick element from being fired. - if (event.stopImmediatePropagation) { - event.stopImmediatePropagation(); - } else { - - // Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2) - event.propagationStopped = true; - } - - // Cancel the event - event.stopPropagation(); - event.preventDefault(); - - return false; - } - - // If the mouse event is permitted, return true for the action to go through. - return true; - }; - - /** - * On actual clicks, determine whether this is a touch-generated click, a click action occurring - * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or - * an actual click which should be permitted. - * - * @param {Event} event - * @returns {boolean} - */ - FastClick.prototype.onClick = function (event) { - var permitted; - - // It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early. - if (this.trackingClick) { - this.targetElement = null; - this.trackingClick = false; - return true; - } - - // Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target. - if (event.target.type === 'submit' && event.detail === 0) { - return true; - } - - permitted = this.onMouse(event); - - // Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through. - if (!permitted) { - this.targetElement = null; - } - - // If clicks are permitted, return true for the action to go through. - return permitted; - }; - - /** - * Remove all FastClick's event listeners. - * - * @returns {void} - */ - FastClick.prototype.destroy = function () { - var layer = this.layer; - - if (deviceIsAndroid) { - layer.removeEventListener('mouseover', this.onMouse, true); - layer.removeEventListener('mousedown', this.onMouse, true); - layer.removeEventListener('mouseup', this.onMouse, true); - } - - layer.removeEventListener('click', this.onClick, true); - layer.removeEventListener('touchstart', this.onTouchStart, false); - layer.removeEventListener('touchmove', this.onTouchMove, false); - layer.removeEventListener('touchend', this.onTouchEnd, false); - layer.removeEventListener('touchcancel', this.onTouchCancel, false); - }; - - /** - * Check whether FastClick is needed. - * - * @param {Element} layer The layer to listen on - */ - FastClick.notNeeded = function (layer) { - var metaViewport; - var chromeVersion; - var blackberryVersion; - var firefoxVersion; - - // Devices that don't support touch don't need FastClick - if (typeof window.ontouchstart === 'undefined') { - return true; - } - - // Chrome version - zero for other browsers - chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1]; - - if (chromeVersion) { - - if (deviceIsAndroid) { - metaViewport = document.querySelector('meta[name=viewport]'); - - if (metaViewport) { - // Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89) - if (metaViewport.content.indexOf('user-scalable=no') !== -1) { - return true; - } - // Chrome 32 and above with width=device-width or less don't need FastClick - if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) { - return true; - } - } - - // Chrome desktop doesn't need FastClick (issue #15) - } else { - return true; - } - } - - if (deviceIsBlackBerry10) { - blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/); - - // BlackBerry 10.3+ does not require Fastclick library. - // https://github.com/ftlabs/fastclick/issues/251 - if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) { - metaViewport = document.querySelector('meta[name=viewport]'); - - if (metaViewport) { - // user-scalable=no eliminates click delay. - if (metaViewport.content.indexOf('user-scalable=no') !== -1) { - return true; - } - // width=device-width (or less than device-width) eliminates click delay. - if (document.documentElement.scrollWidth <= window.outerWidth) { - return true; - } - } - } - } - - // IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97) - if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') { - return true; - } - - // Firefox version - zero for other browsers - firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [, 0])[1]; - - if (firefoxVersion >= 27) { - // Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896 - - metaViewport = document.querySelector('meta[name=viewport]'); - if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) { - return true; - } - } - - // IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version - // http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx - if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') { - return true; - } - - return false; - }; - - /** - * Factory method for creating a FastClick object - * - * @param {Element} layer The layer to listen on - * @param {Object} [options={}] The options to override the defaults - */ - FastClick.attach = function (layer, options) { - return new FastClick(layer, options); - }; - - if ("function" === 'function' && _typeof(__webpack_require__(2)) === 'object' && __webpack_require__(2)) { - - // AMD. Register as an anonymous module. - !(__WEBPACK_AMD_DEFINE_RESULT__ = function () { - return FastClick; - }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof module !== 'undefined' && module.exports) { - module.exports = FastClick.attach; - module.exports.FastClick = FastClick; - } else { - window.FastClick = FastClick; - } - })(); - -/***/ }, -/* 2 */ -/***/ function(module, exports) { - - /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__; - - /* WEBPACK VAR INJECTION */}.call(exports, {})) - -/***/ }, -/* 3 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;"use strict"; - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - - /** - * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.7.1 - * Copyright (C) 2016 Oliver Nightingale - * @license MIT - */ - - ;(function () { - - /** - * Convenience function for instantiating a new lunr index and configuring it - * with the default pipeline functions and the passed config function. - * - * When using this convenience function a new index will be created with the - * following functions already in the pipeline: - * - * lunr.StopWordFilter - filters out any stop words before they enter the - * index - * - * lunr.stemmer - stems the tokens before entering the index. - * - * Example: - * - * var idx = lunr(function () { - * this.field('title', 10) - * this.field('tags', 100) - * this.field('body') - * - * this.ref('cid') - * - * this.pipeline.add(function () { - * // some custom pipeline function - * }) - * - * }) - * - * @param {Function} config A function that will be called with the new instance - * of the lunr.Index as both its context and first parameter. It can be used to - * customize the instance of new lunr.Index. - * @namespace - * @module - * @returns {lunr.Index} - * - */ - var lunr = function lunr(config) { - var idx = new lunr.Index(); - - idx.pipeline.add(lunr.trimmer, lunr.stopWordFilter, lunr.stemmer); - - if (config) config.call(idx, idx); - - return idx; - }; - - lunr.version = "0.7.1"; - /*! - * lunr.utils - * Copyright (C) 2016 Oliver Nightingale - */ - - /** - * A namespace containing utils for the rest of the lunr library - */ - lunr.utils = {}; - - /** - * Print a warning message to the console. - * - * @param {String} message The message to be printed. - * @memberOf Utils - */ - lunr.utils.warn = function (global) { - return function (message) { - if (global.console && console.warn) { - console.warn(message); - } - }; - }(this); - - /** - * Convert an object to a string. - * - * In the case of `null` and `undefined` the function returns - * the empty string, in all other cases the result of calling - * `toString` on the passed object is returned. - * - * @param {Any} obj The object to convert to a string. - * @return {String} string representation of the passed object. - * @memberOf Utils - */ - lunr.utils.asString = function (obj) { - if (obj === void 0 || obj === null) { - return ""; - } else { - return obj.toString(); - } - }; - /*! - * lunr.EventEmitter - * Copyright (C) 2016 Oliver Nightingale - */ - - /** - * lunr.EventEmitter is an event emitter for lunr. It manages adding and removing event handlers and triggering events and their handlers. - * - * @constructor - */ - lunr.EventEmitter = function () { - this.events = {}; - }; - - /** - * Binds a handler function to a specific event(s). - * - * Can bind a single function to many different events in one call. - * - * @param {String} [eventName] The name(s) of events to bind this function to. - * @param {Function} fn The function to call when an event is fired. - * @memberOf EventEmitter - */ - lunr.EventEmitter.prototype.addListener = function () { - var args = Array.prototype.slice.call(arguments), - fn = args.pop(), - names = args; - - if (typeof fn !== "function") throw new TypeError("last argument must be a function"); - - names.forEach(function (name) { - if (!this.hasHandler(name)) this.events[name] = []; - this.events[name].push(fn); - }, this); - }; - - /** - * Removes a handler function from a specific event. - * - * @param {String} eventName The name of the event to remove this function from. - * @param {Function} fn The function to remove from an event. - * @memberOf EventEmitter - */ - lunr.EventEmitter.prototype.removeListener = function (name, fn) { - if (!this.hasHandler(name)) return; - - var fnIndex = this.events[name].indexOf(fn); - this.events[name].splice(fnIndex, 1); - - if (!this.events[name].length) delete this.events[name]; - }; - - /** - * Calls all functions bound to the given event. - * - * Additional data can be passed to the event handler as arguments to `emit` - * after the event name. - * - * @param {String} eventName The name of the event to emit. - * @memberOf EventEmitter - */ - lunr.EventEmitter.prototype.emit = function (name) { - if (!this.hasHandler(name)) return; - - var args = Array.prototype.slice.call(arguments, 1); - - this.events[name].forEach(function (fn) { - fn.apply(undefined, args); - }); - }; - - /** - * Checks whether a handler has ever been stored against an event. - * - * @param {String} eventName The name of the event to check. - * @private - * @memberOf EventEmitter - */ - lunr.EventEmitter.prototype.hasHandler = function (name) { - return name in this.events; - }; - - /*! - * lunr.tokenizer - * Copyright (C) 2016 Oliver Nightingale - */ - - /** - * A function for splitting a string into tokens ready to be inserted into - * the search index. Uses `lunr.tokenizer.seperator` to split strings, change - * the value of this property to change how strings are split into tokens. - * - * @module - * @param {String} obj The string to convert into tokens - * @see lunr.tokenizer.seperator - * @returns {Array} - */ - lunr.tokenizer = function (obj) { - if (!arguments.length || obj == null || obj == undefined) return []; - if (Array.isArray(obj)) return obj.map(function (t) { - return lunr.utils.asString(t).toLowerCase(); - }); - - return obj.toString().trim().toLowerCase().split(lunr.tokenizer.seperator); - }; - - /** - * The sperator used to split a string into tokens. Override this property to change the behaviour of - * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens. - * - * @static - * @see lunr.tokenizer - */ - lunr.tokenizer.seperator = /[\s\-]+/; - - /** - * Loads a previously serialised tokenizer. - * - * A tokenizer function to be loaded must already be registered with lunr.tokenizer. - * If the serialised tokenizer has not been registered then an error will be thrown. - * - * @param {String} label The label of the serialised tokenizer. - * @returns {Function} - * @memberOf tokenizer - */ - lunr.tokenizer.load = function (label) { - var fn = this.registeredFunctions[label]; - - if (!fn) { - throw new Error('Cannot load un-registered function: ' + label); - } - - return fn; - }; - - lunr.tokenizer.label = 'default'; - - lunr.tokenizer.registeredFunctions = { - 'default': lunr.tokenizer - }; - - /** - * Register a tokenizer function. - * - * Functions that are used as tokenizers should be registered if they are to be used with a serialised index. - * - * Registering a function does not add it to an index, functions must still be associated with a specific index for them to be used when indexing and searching documents. - * - * @param {Function} fn The function to register. - * @param {String} label The label to register this function with - * @memberOf tokenizer - */ - lunr.tokenizer.registerFunction = function (fn, label) { - if (label in this.registeredFunctions) { - lunr.utils.warn('Overwriting existing tokenizer: ' + label); - } - - fn.label = label; - this.registeredFunctions[label] = fn; - }; - /*! - * lunr.Pipeline - * Copyright (C) 2016 Oliver Nightingale - */ - - /** - * lunr.Pipelines maintain an ordered list of functions to be applied to all - * tokens in documents entering the search index and queries being ran against - * the index. - * - * An instance of lunr.Index created with the lunr shortcut will contain a - * pipeline with a stop word filter and an English language stemmer. Extra - * functions can be added before or after either of these functions or these - * default functions can be removed. - * - * When run the pipeline will call each function in turn, passing a token, the - * index of that token in the original list of all tokens and finally a list of - * all the original tokens. - * - * The output of functions in the pipeline will be passed to the next function - * in the pipeline. To exclude a token from entering the index the function - * should return undefined, the rest of the pipeline will not be called with - * this token. - * - * For serialisation of pipelines to work, all functions used in an instance of - * a pipeline should be registered with lunr.Pipeline. Registered functions can - * then be loaded. If trying to load a serialised pipeline that uses functions - * that are not registered an error will be thrown. - * - * If not planning on serialising the pipeline then registering pipeline functions - * is not necessary. - * - * @constructor - */ - lunr.Pipeline = function () { - this._stack = []; - }; - - lunr.Pipeline.registeredFunctions = {}; - - /** - * Register a function with the pipeline. - * - * Functions that are used in the pipeline should be registered if the pipeline - * needs to be serialised, or a serialised pipeline needs to be loaded. - * - * Registering a function does not add it to a pipeline, functions must still be - * added to instances of the pipeline for them to be used when running a pipeline. - * - * @param {Function} fn The function to check for. - * @param {String} label The label to register this function with - * @memberOf Pipeline - */ - lunr.Pipeline.registerFunction = function (fn, label) { - if (label in this.registeredFunctions) { - lunr.utils.warn('Overwriting existing registered function: ' + label); - } - - fn.label = label; - lunr.Pipeline.registeredFunctions[fn.label] = fn; - }; - - /** - * Warns if the function is not registered as a Pipeline function. - * - * @param {Function} fn The function to check for. - * @private - * @memberOf Pipeline - */ - lunr.Pipeline.warnIfFunctionNotRegistered = function (fn) { - var isRegistered = fn.label && fn.label in this.registeredFunctions; - - if (!isRegistered) { - lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\n', fn); - } - }; - - /** - * Loads a previously serialised pipeline. - * - * All functions to be loaded must already be registered with lunr.Pipeline. - * If any function from the serialised data has not been registered then an - * error will be thrown. - * - * @param {Object} serialised The serialised pipeline to load. - * @returns {lunr.Pipeline} - * @memberOf Pipeline - */ - lunr.Pipeline.load = function (serialised) { - var pipeline = new lunr.Pipeline(); - - serialised.forEach(function (fnName) { - var fn = lunr.Pipeline.registeredFunctions[fnName]; - - if (fn) { - pipeline.add(fn); - } else { - throw new Error('Cannot load un-registered function: ' + fnName); - } - }); - - return pipeline; - }; - - /** - * Adds new functions to the end of the pipeline. - * - * Logs a warning if the function has not been registered. - * - * @param {Function} functions Any number of functions to add to the pipeline. - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.add = function () { - var fns = Array.prototype.slice.call(arguments); - - fns.forEach(function (fn) { - lunr.Pipeline.warnIfFunctionNotRegistered(fn); - this._stack.push(fn); - }, this); - }; - - /** - * Adds a single function after a function that already exists in the - * pipeline. - * - * Logs a warning if the function has not been registered. - * - * @param {Function} existingFn A function that already exists in the pipeline. - * @param {Function} newFn The new function to add to the pipeline. - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.after = function (existingFn, newFn) { - lunr.Pipeline.warnIfFunctionNotRegistered(newFn); - - var pos = this._stack.indexOf(existingFn); - if (pos == -1) { - throw new Error('Cannot find existingFn'); - } - - pos = pos + 1; - this._stack.splice(pos, 0, newFn); - }; - - /** - * Adds a single function before a function that already exists in the - * pipeline. - * - * Logs a warning if the function has not been registered. - * - * @param {Function} existingFn A function that already exists in the pipeline. - * @param {Function} newFn The new function to add to the pipeline. - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.before = function (existingFn, newFn) { - lunr.Pipeline.warnIfFunctionNotRegistered(newFn); - - var pos = this._stack.indexOf(existingFn); - if (pos == -1) { - throw new Error('Cannot find existingFn'); - } - - this._stack.splice(pos, 0, newFn); - }; - - /** - * Removes a function from the pipeline. - * - * @param {Function} fn The function to remove from the pipeline. - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.remove = function (fn) { - var pos = this._stack.indexOf(fn); - if (pos == -1) { - return; - } - - this._stack.splice(pos, 1); - }; - - /** - * Runs the current list of functions that make up the pipeline against the - * passed tokens. - * - * @param {Array} tokens The tokens to run through the pipeline. - * @returns {Array} - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.run = function (tokens) { - var out = [], - tokenLength = tokens.length, - stackLength = this._stack.length; - - for (var i = 0; i < tokenLength; i++) { - var token = tokens[i]; - - for (var j = 0; j < stackLength; j++) { - token = this._stack[j](token, i, tokens); - if (token === void 0 || token === '') break; - }; - - if (token !== void 0 && token !== '') out.push(token); - }; - - return out; - }; - - /** - * Resets the pipeline by removing any existing processors. - * - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.reset = function () { - this._stack = []; - }; - - /** - * Returns a representation of the pipeline ready for serialisation. - * - * Logs a warning if the function has not been registered. - * - * @returns {Array} - * @memberOf Pipeline - */ - lunr.Pipeline.prototype.toJSON = function () { - return this._stack.map(function (fn) { - lunr.Pipeline.warnIfFunctionNotRegistered(fn); - - return fn.label; - }); - }; - /*! - * lunr.Vector - * Copyright (C) 2016 Oliver Nightingale - */ - - /** - * lunr.Vectors implement vector related operations for - * a series of elements. - * - * @constructor - */ - lunr.Vector = function () { - this._magnitude = null; - this.list = undefined; - this.length = 0; - }; - - /** - * lunr.Vector.Node is a simple struct for each node - * in a lunr.Vector. - * - * @private - * @param {Number} The index of the node in the vector. - * @param {Object} The data at this node in the vector. - * @param {lunr.Vector.Node} The node directly after this node in the vector. - * @constructor - * @memberOf Vector - */ - lunr.Vector.Node = function (idx, val, next) { - this.idx = idx; - this.val = val; - this.next = next; - }; - - /** - * Inserts a new value at a position in a vector. - * - * @param {Number} The index at which to insert a value. - * @param {Object} The object to insert in the vector. - * @memberOf Vector. - */ - lunr.Vector.prototype.insert = function (idx, val) { - this._magnitude = undefined; - var list = this.list; - - if (!list) { - this.list = new lunr.Vector.Node(idx, val, list); - return this.length++; - } - - if (idx < list.idx) { - this.list = new lunr.Vector.Node(idx, val, list); - return this.length++; - } - - var prev = list, - next = list.next; - - while (next != undefined) { - if (idx < next.idx) { - prev.next = new lunr.Vector.Node(idx, val, next); - return this.length++; - } - - prev = next, next = next.next; - } - - prev.next = new lunr.Vector.Node(idx, val, next); - return this.length++; - }; - - /** - * Calculates the magnitude of this vector. - * - * @returns {Number} - * @memberOf Vector - */ - lunr.Vector.prototype.magnitude = function () { - if (this._magnitude) return this._magnitude; - var node = this.list, - sumOfSquares = 0, - val; - - while (node) { - val = node.val; - sumOfSquares += val * val; - node = node.next; - } - - return this._magnitude = Math.sqrt(sumOfSquares); - }; - - /** - * Calculates the dot product of this vector and another vector. - * - * @param {lunr.Vector} otherVector The vector to compute the dot product with. - * @returns {Number} - * @memberOf Vector - */ - lunr.Vector.prototype.dot = function (otherVector) { - var node = this.list, - otherNode = otherVector.list, - dotProduct = 0; - - while (node && otherNode) { - if (node.idx < otherNode.idx) { - node = node.next; - } else if (node.idx > otherNode.idx) { - otherNode = otherNode.next; - } else { - dotProduct += node.val * otherNode.val; - node = node.next; - otherNode = otherNode.next; - } - } - - return dotProduct; - }; - - /** - * Calculates the cosine similarity between this vector and another - * vector. - * - * @param {lunr.Vector} otherVector The other vector to calculate the - * similarity with. - * @returns {Number} - * @memberOf Vector - */ - lunr.Vector.prototype.similarity = function (otherVector) { - return this.dot(otherVector) / (this.magnitude() * otherVector.magnitude()); - }; - /*! - * lunr.SortedSet - * Copyright (C) 2016 Oliver Nightingale - */ - - /** - * lunr.SortedSets are used to maintain an array of uniq values in a sorted - * order. - * - * @constructor - */ - lunr.SortedSet = function () { - this.length = 0; - this.elements = []; - }; - - /** - * Loads a previously serialised sorted set. - * - * @param {Array} serialisedData The serialised set to load. - * @returns {lunr.SortedSet} - * @memberOf SortedSet - */ - lunr.SortedSet.load = function (serialisedData) { - var set = new this(); - - set.elements = serialisedData; - set.length = serialisedData.length; - - return set; - }; - - /** - * Inserts new items into the set in the correct position to maintain the - * order. - * - * @param {Object} The objects to add to this set. - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.add = function () { - var i, element; - - for (i = 0; i < arguments.length; i++) { - element = arguments[i]; - if (~this.indexOf(element)) continue; - this.elements.splice(this.locationFor(element), 0, element); - } - - this.length = this.elements.length; - }; - - /** - * Converts this sorted set into an array. - * - * @returns {Array} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.toArray = function () { - return this.elements.slice(); - }; - - /** - * Creates a new array with the results of calling a provided function on every - * element in this sorted set. - * - * Delegates to Array.prototype.map and has the same signature. - * - * @param {Function} fn The function that is called on each element of the - * set. - * @param {Object} ctx An optional object that can be used as the context - * for the function fn. - * @returns {Array} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.map = function (fn, ctx) { - return this.elements.map(fn, ctx); - }; - - /** - * Executes a provided function once per sorted set element. - * - * Delegates to Array.prototype.forEach and has the same signature. - * - * @param {Function} fn The function that is called on each element of the - * set. - * @param {Object} ctx An optional object that can be used as the context - * @memberOf SortedSet - * for the function fn. - */ - lunr.SortedSet.prototype.forEach = function (fn, ctx) { - return this.elements.forEach(fn, ctx); - }; - - /** - * Returns the index at which a given element can be found in the - * sorted set, or -1 if it is not present. - * - * @param {Object} elem The object to locate in the sorted set. - * @returns {Number} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.indexOf = function (elem) { - var start = 0, - end = this.elements.length, - sectionLength = end - start, - pivot = start + Math.floor(sectionLength / 2), - pivotElem = this.elements[pivot]; - - while (sectionLength > 1) { - if (pivotElem === elem) return pivot; - - if (pivotElem < elem) start = pivot; - if (pivotElem > elem) end = pivot; - - sectionLength = end - start; - pivot = start + Math.floor(sectionLength / 2); - pivotElem = this.elements[pivot]; - } - - if (pivotElem === elem) return pivot; - - return -1; - }; - - /** - * Returns the position within the sorted set that an element should be - * inserted at to maintain the current order of the set. - * - * This function assumes that the element to search for does not already exist - * in the sorted set. - * - * @param {Object} elem The elem to find the position for in the set - * @returns {Number} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.locationFor = function (elem) { - var start = 0, - end = this.elements.length, - sectionLength = end - start, - pivot = start + Math.floor(sectionLength / 2), - pivotElem = this.elements[pivot]; - - while (sectionLength > 1) { - if (pivotElem < elem) start = pivot; - if (pivotElem > elem) end = pivot; - - sectionLength = end - start; - pivot = start + Math.floor(sectionLength / 2); - pivotElem = this.elements[pivot]; - } - - if (pivotElem > elem) return pivot; - if (pivotElem < elem) return pivot + 1; - }; - - /** - * Creates a new lunr.SortedSet that contains the elements in the intersection - * of this set and the passed set. - * - * @param {lunr.SortedSet} otherSet The set to intersect with this set. - * @returns {lunr.SortedSet} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.intersect = function (otherSet) { - var intersectSet = new lunr.SortedSet(), - i = 0, - j = 0, - a_len = this.length, - b_len = otherSet.length, - a = this.elements, - b = otherSet.elements; - - while (true) { - if (i > a_len - 1 || j > b_len - 1) break; - - if (a[i] === b[j]) { - intersectSet.add(a[i]); - i++, j++; - continue; - } - - if (a[i] < b[j]) { - i++; - continue; - } - - if (a[i] > b[j]) { - j++; - continue; - } - }; - - return intersectSet; - }; - - /** - * Makes a copy of this set - * - * @returns {lunr.SortedSet} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.clone = function () { - var clone = new lunr.SortedSet(); - - clone.elements = this.toArray(); - clone.length = clone.elements.length; - - return clone; - }; - - /** - * Creates a new lunr.SortedSet that contains the elements in the union - * of this set and the passed set. - * - * @param {lunr.SortedSet} otherSet The set to union with this set. - * @returns {lunr.SortedSet} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.union = function (otherSet) { - var longSet, shortSet, unionSet; - - if (this.length >= otherSet.length) { - longSet = this, shortSet = otherSet; - } else { - longSet = otherSet, shortSet = this; - } - - unionSet = longSet.clone(); - - for (var i = 0, shortSetElements = shortSet.toArray(); i < shortSetElements.length; i++) { - unionSet.add(shortSetElements[i]); - } - - return unionSet; - }; - - /** - * Returns a representation of the sorted set ready for serialisation. - * - * @returns {Array} - * @memberOf SortedSet - */ - lunr.SortedSet.prototype.toJSON = function () { - return this.toArray(); - }; - /*! - * lunr.Index - * Copyright (C) 2016 Oliver Nightingale - */ - - /** - * lunr.Index is object that manages a search index. It contains the indexes - * and stores all the tokens and document lookups. It also provides the main - * user facing API for the library. - * - * @constructor - */ - lunr.Index = function () { - this._fields = []; - this._ref = 'id'; - this.pipeline = new lunr.Pipeline(); - this.documentStore = new lunr.Store(); - this.tokenStore = new lunr.TokenStore(); - this.corpusTokens = new lunr.SortedSet(); - this.eventEmitter = new lunr.EventEmitter(); - this.tokenizerFn = lunr.tokenizer; - - this._idfCache = {}; - - this.on('add', 'remove', 'update', function () { - this._idfCache = {}; - }.bind(this)); - }; - - /** - * Bind a handler to events being emitted by the index. - * - * The handler can be bound to many events at the same time. - * - * @param {String} [eventName] The name(s) of events to bind the function to. - * @param {Function} fn The serialised set to load. - * @memberOf Index - */ - lunr.Index.prototype.on = function () { - var args = Array.prototype.slice.call(arguments); - return this.eventEmitter.addListener.apply(this.eventEmitter, args); - }; - - /** - * Removes a handler from an event being emitted by the index. - * - * @param {String} eventName The name of events to remove the function from. - * @param {Function} fn The serialised set to load. - * @memberOf Index - */ - lunr.Index.prototype.off = function (name, fn) { - return this.eventEmitter.removeListener(name, fn); - }; - - /** - * Loads a previously serialised index. - * - * Issues a warning if the index being imported was serialised - * by a different version of lunr. - * - * @param {Object} serialisedData The serialised set to load. - * @returns {lunr.Index} - * @memberOf Index - */ - lunr.Index.load = function (serialisedData) { - if (serialisedData.version !== lunr.version) { - lunr.utils.warn('version mismatch: current ' + lunr.version + ' importing ' + serialisedData.version); - } - - var idx = new this(); - - idx._fields = serialisedData.fields; - idx._ref = serialisedData.ref; - - idx.tokenizer = lunr.tokenizer.load(serialisedData.tokenizer); - idx.documentStore = lunr.Store.load(serialisedData.documentStore); - idx.tokenStore = lunr.TokenStore.load(serialisedData.tokenStore); - idx.corpusTokens = lunr.SortedSet.load(serialisedData.corpusTokens); - idx.pipeline = lunr.Pipeline.load(serialisedData.pipeline); - - return idx; - }; - - /** - * Adds a field to the list of fields that will be searchable within documents - * in the index. - * - * An optional boost param can be passed to affect how much tokens in this field - * rank in search results, by default the boost value is 1. - * - * Fields should be added before any documents are added to the index, fields - * that are added after documents are added to the index will only apply to new - * documents added to the index. - * - * @param {String} fieldName The name of the field within the document that - * should be indexed - * @param {Number} boost An optional boost that can be applied to terms in this - * field. - * @returns {lunr.Index} - * @memberOf Index - */ - lunr.Index.prototype.field = function (fieldName, opts) { - var opts = opts || {}, - field = { name: fieldName, boost: opts.boost || 1 }; - - this._fields.push(field); - return this; - }; - - /** - * Sets the property used to uniquely identify documents added to the index, - * by default this property is 'id'. - * - * This should only be changed before adding documents to the index, changing - * the ref property without resetting the index can lead to unexpected results. - * - * The value of ref can be of any type but it _must_ be stably comparable and - * orderable. - * - * @param {String} refName The property to use to uniquely identify the - * documents in the index. - * @param {Boolean} emitEvent Whether to emit add events, defaults to true - * @returns {lunr.Index} - * @memberOf Index - */ - lunr.Index.prototype.ref = function (refName) { - this._ref = refName; - return this; - }; - - /** - * Sets the tokenizer used for this index. - * - * By default the index will use the default tokenizer, lunr.tokenizer. The tokenizer - * should only be changed before adding documents to the index. Changing the tokenizer - * without re-building the index can lead to unexpected results. - * - * @param {Function} fn The function to use as a tokenizer. - * @returns {lunr.Index} - * @memberOf Index - */ - lunr.Index.prototype.tokenizer = function (fn) { - var isRegistered = fn.label && fn.label in lunr.tokenizer.registeredFunctions; - - if (!isRegistered) { - lunr.utils.warn('Function is not a registered tokenizer. This may cause problems when serialising the index'); - } - - this.tokenizerFn = fn; - return this; - }; - - /** - * Add a document to the index. - * - * This is the way new documents enter the index, this function will run the - * fields from the document through the index's pipeline and then add it to - * the index, it will then show up in search results. - * - * An 'add' event is emitted with the document that has been added and the index - * the document has been added to. This event can be silenced by passing false - * as the second argument to add. - * - * @param {Object} doc The document to add to the index. - * @param {Boolean} emitEvent Whether or not to emit events, default true. - * @memberOf Index - */ - lunr.Index.prototype.add = function (doc, emitEvent) { - var docTokens = {}, - allDocumentTokens = new lunr.SortedSet(), - docRef = doc[this._ref], - emitEvent = emitEvent === undefined ? true : emitEvent; - - this._fields.forEach(function (field) { - var fieldTokens = this.pipeline.run(this.tokenizerFn(doc[field.name])); - - docTokens[field.name] = fieldTokens; - - for (var i = 0; i < fieldTokens.length; i++) { - var token = fieldTokens[i]; - allDocumentTokens.add(token); - this.corpusTokens.add(token); - } - }, this); - - this.documentStore.set(docRef, allDocumentTokens); - - for (var i = 0; i < allDocumentTokens.length; i++) { - var token = allDocumentTokens.elements[i]; - var tf = 0; - - for (var j = 0; j < this._fields.length; j++) { - var field = this._fields[j]; - var fieldTokens = docTokens[field.name]; - var fieldLength = fieldTokens.length; - - if (!fieldLength) continue; - - var tokenCount = 0; - for (var k = 0; k < fieldLength; k++) { - if (fieldTokens[k] === token) { - tokenCount++; - } - } - - tf += tokenCount / fieldLength * field.boost; - } - - this.tokenStore.add(token, { ref: docRef, tf: tf }); - }; - - if (emitEvent) this.eventEmitter.emit('add', doc, this); - }; - - /** - * Removes a document from the index. - * - * To make sure documents no longer show up in search results they can be - * removed from the index using this method. - * - * The document passed only needs to have the same ref property value as the - * document that was added to the index, they could be completely different - * objects. - * - * A 'remove' event is emitted with the document that has been removed and the index - * the document has been removed from. This event can be silenced by passing false - * as the second argument to remove. - * - * @param {Object} doc The document to remove from the index. - * @param {Boolean} emitEvent Whether to emit remove events, defaults to true - * @memberOf Index - */ - lunr.Index.prototype.remove = function (doc, emitEvent) { - var docRef = doc[this._ref], - emitEvent = emitEvent === undefined ? true : emitEvent; - - if (!this.documentStore.has(docRef)) return; - - var docTokens = this.documentStore.get(docRef); - - this.documentStore.remove(docRef); - - docTokens.forEach(function (token) { - this.tokenStore.remove(token, docRef); - }, this); - - if (emitEvent) this.eventEmitter.emit('remove', doc, this); - }; - - /** - * Updates a document in the index. - * - * When a document contained within the index gets updated, fields changed, - * added or removed, to make sure it correctly matched against search queries, - * it should be updated in the index. - * - * This method is just a wrapper around `remove` and `add` - * - * An 'update' event is emitted with the document that has been updated and the index. - * This event can be silenced by passing false as the second argument to update. Only - * an update event will be fired, the 'add' and 'remove' events of the underlying calls - * are silenced. - * - * @param {Object} doc The document to update in the index. - * @param {Boolean} emitEvent Whether to emit update events, defaults to true - * @see Index.prototype.remove - * @see Index.prototype.add - * @memberOf Index - */ - lunr.Index.prototype.update = function (doc, emitEvent) { - var emitEvent = emitEvent === undefined ? true : emitEvent; - - this.remove(doc, false); - this.add(doc, false); - - if (emitEvent) this.eventEmitter.emit('update', doc, this); - }; - - /** - * Calculates the inverse document frequency for a token within the index. - * - * @param {String} token The token to calculate the idf of. - * @see Index.prototype.idf - * @private - * @memberOf Index - */ - lunr.Index.prototype.idf = function (term) { - var cacheKey = "@" + term; - if (Object.prototype.hasOwnProperty.call(this._idfCache, cacheKey)) return this._idfCache[cacheKey]; - - var documentFrequency = this.tokenStore.count(term), - idf = 1; - - if (documentFrequency > 0) { - idf = 1 + Math.log(this.documentStore.length / documentFrequency); - } - - return this._idfCache[cacheKey] = idf; - }; - - /** - * Searches the index using the passed query. - * - * Queries should be a string, multiple words are allowed and will lead to an - * AND based query, e.g. `idx.search('foo bar')` will run a search for - * documents containing both 'foo' and 'bar'. - * - * All query tokens are passed through the same pipeline that document tokens - * are passed through, so any language processing involved will be run on every - * query term. - * - * Each query term is expanded, so that the term 'he' might be expanded to - * 'hello' and 'help' if those terms were already included in the index. - * - * Matching documents are returned as an array of objects, each object contains - * the matching document ref, as set for this index, and the similarity score - * for this document against the query. - * - * @param {String} query The query to search the index with. - * @returns {Object} - * @see Index.prototype.idf - * @see Index.prototype.documentVector - * @memberOf Index - */ - lunr.Index.prototype.search = function (query) { - var queryTokens = this.pipeline.run(this.tokenizerFn(query)), - queryVector = new lunr.Vector(), - documentSets = [], - fieldBoosts = this._fields.reduce(function (memo, f) { - return memo + f.boost; - }, 0); - - var hasSomeToken = queryTokens.some(function (token) { - return this.tokenStore.has(token); - }, this); - - if (!hasSomeToken) return []; - - queryTokens.forEach(function (token, i, tokens) { - var tf = 1 / tokens.length * this._fields.length * fieldBoosts, - self = this; - - var set = this.tokenStore.expand(token).reduce(function (memo, key) { - var pos = self.corpusTokens.indexOf(key), - idf = self.idf(key), - similarityBoost = 1, - set = new lunr.SortedSet(); - - // if the expanded key is not an exact match to the token then - // penalise the score for this key by how different the key is - // to the token. - if (key !== token) { - var diff = Math.max(3, key.length - token.length); - similarityBoost = 1 / Math.log(diff); - } - - // calculate the query tf-idf score for this token - // applying an similarityBoost to ensure exact matches - // these rank higher than expanded terms - if (pos > -1) queryVector.insert(pos, tf * idf * similarityBoost); - - // add all the documents that have this key into a set - // ensuring that the type of key is preserved - var matchingDocuments = self.tokenStore.get(key), - refs = Object.keys(matchingDocuments), - refsLen = refs.length; - - for (var i = 0; i < refsLen; i++) { - set.add(matchingDocuments[refs[i]].ref); - } - - return memo.union(set); - }, new lunr.SortedSet()); - - documentSets.push(set); - }, this); - - var documentSet = documentSets.reduce(function (memo, set) { - return memo.intersect(set); - }); - - return documentSet.map(function (ref) { - return { ref: ref, score: queryVector.similarity(this.documentVector(ref)) }; - }, this).sort(function (a, b) { - return b.score - a.score; - }); - }; - - /** - * Generates a vector containing all the tokens in the document matching the - * passed documentRef. - * - * The vector contains the tf-idf score for each token contained in the - * document with the passed documentRef. The vector will contain an element - * for every token in the indexes corpus, if the document does not contain that - * token the element will be 0. - * - * @param {Object} documentRef The ref to find the document with. - * @returns {lunr.Vector} - * @private - * @memberOf Index - */ - lunr.Index.prototype.documentVector = function (documentRef) { - var documentTokens = this.documentStore.get(documentRef), - documentTokensLength = documentTokens.length, - documentVector = new lunr.Vector(); - - for (var i = 0; i < documentTokensLength; i++) { - var token = documentTokens.elements[i], - tf = this.tokenStore.get(token)[documentRef].tf, - idf = this.idf(token); - - documentVector.insert(this.corpusTokens.indexOf(token), tf * idf); - }; - - return documentVector; - }; - - /** - * Returns a representation of the index ready for serialisation. - * - * @returns {Object} - * @memberOf Index - */ - lunr.Index.prototype.toJSON = function () { - return { - version: lunr.version, - fields: this._fields, - ref: this._ref, - tokenizer: this.tokenizerFn.label, - documentStore: this.documentStore.toJSON(), - tokenStore: this.tokenStore.toJSON(), - corpusTokens: this.corpusTokens.toJSON(), - pipeline: this.pipeline.toJSON() - }; - }; - - /** - * Applies a plugin to the current index. - * - * A plugin is a function that is called with the index as its context. - * Plugins can be used to customise or extend the behaviour the index - * in some way. A plugin is just a function, that encapsulated the custom - * behaviour that should be applied to the index. - * - * The plugin function will be called with the index as its argument, additional - * arguments can also be passed when calling use. The function will be called - * with the index as its context. - * - * Example: - * - * var myPlugin = function (idx, arg1, arg2) { - * // `this` is the index to be extended - * // apply any extensions etc here. - * } - * - * var idx = lunr(function () { - * this.use(myPlugin, 'arg1', 'arg2') - * }) - * - * @param {Function} plugin The plugin to apply. - * @memberOf Index - */ - lunr.Index.prototype.use = function (plugin) { - var args = Array.prototype.slice.call(arguments, 1); - args.unshift(this); - plugin.apply(this, args); - }; - /*! - * lunr.Store - * Copyright (C) 2016 Oliver Nightingale - */ - - /** - * lunr.Store is a simple key-value store used for storing sets of tokens for - * documents stored in index. - * - * @constructor - * @module - */ - lunr.Store = function () { - this.store = {}; - this.length = 0; - }; - - /** - * Loads a previously serialised store - * - * @param {Object} serialisedData The serialised store to load. - * @returns {lunr.Store} - * @memberOf Store - */ - lunr.Store.load = function (serialisedData) { - var store = new this(); - - store.length = serialisedData.length; - store.store = Object.keys(serialisedData.store).reduce(function (memo, key) { - memo[key] = lunr.SortedSet.load(serialisedData.store[key]); - return memo; - }, {}); - - return store; - }; - - /** - * Stores the given tokens in the store against the given id. - * - * @param {Object} id The key used to store the tokens against. - * @param {Object} tokens The tokens to store against the key. - * @memberOf Store - */ - lunr.Store.prototype.set = function (id, tokens) { - if (!this.has(id)) this.length++; - this.store[id] = tokens; - }; - - /** - * Retrieves the tokens from the store for a given key. - * - * @param {Object} id The key to lookup and retrieve from the store. - * @returns {Object} - * @memberOf Store - */ - lunr.Store.prototype.get = function (id) { - return this.store[id]; - }; - - /** - * Checks whether the store contains a key. - * - * @param {Object} id The id to look up in the store. - * @returns {Boolean} - * @memberOf Store - */ - lunr.Store.prototype.has = function (id) { - return id in this.store; - }; - - /** - * Removes the value for a key in the store. - * - * @param {Object} id The id to remove from the store. - * @memberOf Store - */ - lunr.Store.prototype.remove = function (id) { - if (!this.has(id)) return; - - delete this.store[id]; - this.length--; - }; - - /** - * Returns a representation of the store ready for serialisation. - * - * @returns {Object} - * @memberOf Store - */ - lunr.Store.prototype.toJSON = function () { - return { - store: this.store, - length: this.length - }; - }; - - /*! - * lunr.stemmer - * Copyright (C) 2016 Oliver Nightingale - * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt - */ - - /** - * lunr.stemmer is an english language stemmer, this is a JavaScript - * implementation of the PorterStemmer taken from http://tartarus.org/~martin - * - * @module - * @param {String} str The string to stem - * @returns {String} - * @see lunr.Pipeline - */ - lunr.stemmer = function () { - var step2list = { - "ational": "ate", - "tional": "tion", - "enci": "ence", - "anci": "ance", - "izer": "ize", - "bli": "ble", - "alli": "al", - "entli": "ent", - "eli": "e", - "ousli": "ous", - "ization": "ize", - "ation": "ate", - "ator": "ate", - "alism": "al", - "iveness": "ive", - "fulness": "ful", - "ousness": "ous", - "aliti": "al", - "iviti": "ive", - "biliti": "ble", - "logi": "log" - }, - step3list = { - "icate": "ic", - "ative": "", - "alize": "al", - "iciti": "ic", - "ical": "ic", - "ful": "", - "ness": "" - }, - c = "[^aeiou]", - // consonant - v = "[aeiouy]", - // vowel - C = c + "[^aeiouy]*", - // consonant sequence - V = v + "[aeiou]*", - // vowel sequence - - mgr0 = "^(" + C + ")?" + V + C, - // [C]VC... is m>0 - meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$", - // [C]VC[V] is m=1 - mgr1 = "^(" + C + ")?" + V + C + V + C, - // [C]VCVC... is m>1 - s_v = "^(" + C + ")?" + v; // vowel in stem - - var re_mgr0 = new RegExp(mgr0); - var re_mgr1 = new RegExp(mgr1); - var re_meq1 = new RegExp(meq1); - var re_s_v = new RegExp(s_v); - - var re_1a = /^(.+?)(ss|i)es$/; - var re2_1a = /^(.+?)([^s])s$/; - var re_1b = /^(.+?)eed$/; - var re2_1b = /^(.+?)(ed|ing)$/; - var re_1b_2 = /.$/; - var re2_1b_2 = /(at|bl|iz)$/; - var re3_1b_2 = new RegExp("([^aeiouylsz])\\1$"); - var re4_1b_2 = new RegExp("^" + C + v + "[^aeiouwxy]$"); - - var re_1c = /^(.+?[^aeiou])y$/; - var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; - - var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; - - var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; - var re2_4 = /^(.+?)(s|t)(ion)$/; - - var re_5 = /^(.+?)e$/; - var re_5_1 = /ll$/; - var re3_5 = new RegExp("^" + C + v + "[^aeiouwxy]$"); - - var porterStemmer = function porterStemmer(w) { - var stem, suffix, firstch, re, re2, re3, re4; - - if (w.length < 3) { - return w; - } - - firstch = w.substr(0, 1); - if (firstch == "y") { - w = firstch.toUpperCase() + w.substr(1); - } - - // Step 1a - re = re_1a; - re2 = re2_1a; - - if (re.test(w)) { - w = w.replace(re, "$1$2"); - } else if (re2.test(w)) { - w = w.replace(re2, "$1$2"); - } - - // Step 1b - re = re_1b; - re2 = re2_1b; - if (re.test(w)) { - var fp = re.exec(w); - re = re_mgr0; - if (re.test(fp[1])) { - re = re_1b_2; - w = w.replace(re, ""); - } - } else if (re2.test(w)) { - var fp = re2.exec(w); - stem = fp[1]; - re2 = re_s_v; - if (re2.test(stem)) { - w = stem; - re2 = re2_1b_2; - re3 = re3_1b_2; - re4 = re4_1b_2; - if (re2.test(w)) { - w = w + "e"; - } else if (re3.test(w)) { - re = re_1b_2;w = w.replace(re, ""); - } else if (re4.test(w)) { - w = w + "e"; - } - } - } - - // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say) - re = re_1c; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - w = stem + "i"; - } - - // Step 2 - re = re_2; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - suffix = fp[2]; - re = re_mgr0; - if (re.test(stem)) { - w = stem + step2list[suffix]; - } - } - - // Step 3 - re = re_3; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - suffix = fp[2]; - re = re_mgr0; - if (re.test(stem)) { - w = stem + step3list[suffix]; - } - } - - // Step 4 - re = re_4; - re2 = re2_4; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = re_mgr1; - if (re.test(stem)) { - w = stem; - } - } else if (re2.test(w)) { - var fp = re2.exec(w); - stem = fp[1] + fp[2]; - re2 = re_mgr1; - if (re2.test(stem)) { - w = stem; - } - } - - // Step 5 - re = re_5; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = re_mgr1; - re2 = re_meq1; - re3 = re3_5; - if (re.test(stem) || re2.test(stem) && !re3.test(stem)) { - w = stem; - } - } - - re = re_5_1; - re2 = re_mgr1; - if (re.test(w) && re2.test(w)) { - re = re_1b_2; - w = w.replace(re, ""); - } - - // and turn initial Y back to y - - if (firstch == "y") { - w = firstch.toLowerCase() + w.substr(1); - } - - return w; - }; - - return porterStemmer; - }(); - - lunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer'); - /*! - * lunr.stopWordFilter - * Copyright (C) 2016 Oliver Nightingale - */ - - /** - * lunr.generateStopWordFilter builds a stopWordFilter function from the provided - * list of stop words. - * - * The built in lunr.stopWordFilter is built using this generator and can be used - * to generate custom stopWordFilters for applications or non English languages. - * - * @module - * @param {Array} token The token to pass through the filter - * @returns {Function} - * @see lunr.Pipeline - * @see lunr.stopWordFilter - */ - lunr.generateStopWordFilter = function (stopWords) { - var words = stopWords.reduce(function (memo, stopWord) { - memo[stopWord] = stopWord; - return memo; - }, {}); - - return function (token) { - if (token && words[token] !== token) return token; - }; - }; - - /** - * lunr.stopWordFilter is an English language stop word list filter, any words - * contained in the list will not be passed through the filter. - * - * This is intended to be used in the Pipeline. If the token does not pass the - * filter then undefined will be returned. - * - * @module - * @param {String} token The token to pass through the filter - * @returns {String} - * @see lunr.Pipeline - */ - lunr.stopWordFilter = lunr.generateStopWordFilter(['a', 'able', 'about', 'across', 'after', 'all', 'almost', 'also', 'am', 'among', 'an', 'and', 'any', 'are', 'as', 'at', 'be', 'because', 'been', 'but', 'by', 'can', 'cannot', 'could', 'dear', 'did', 'do', 'does', 'either', 'else', 'ever', 'every', 'for', 'from', 'get', 'got', 'had', 'has', 'have', 'he', 'her', 'hers', 'him', 'his', 'how', 'however', 'i', 'if', 'in', 'into', 'is', 'it', 'its', 'just', 'least', 'let', 'like', 'likely', 'may', 'me', 'might', 'most', 'must', 'my', 'neither', 'no', 'nor', 'not', 'of', 'off', 'often', 'on', 'only', 'or', 'other', 'our', 'own', 'rather', 'said', 'say', 'says', 'she', 'should', 'since', 'so', 'some', 'than', 'that', 'the', 'their', 'them', 'then', 'there', 'these', 'they', 'this', 'tis', 'to', 'too', 'twas', 'us', 'wants', 'was', 'we', 'were', 'what', 'when', 'where', 'which', 'while', 'who', 'whom', 'why', 'will', 'with', 'would', 'yet', 'you', 'your']); - - lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter'); - /*! - * lunr.trimmer - * Copyright (C) 2016 Oliver Nightingale - */ - - /** - * lunr.trimmer is a pipeline function for trimming non word - * characters from the begining and end of tokens before they - * enter the index. - * - * This implementation may not work correctly for non latin - * characters and should either be removed or adapted for use - * with languages with non-latin characters. - * - * @module - * @param {String} token The token to pass through the filter - * @returns {String} - * @see lunr.Pipeline - */ - lunr.trimmer = function (token) { - return token.replace(/^\W+/, '').replace(/\W+$/, ''); - }; - - lunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer'); - /*! - * lunr.stemmer - * Copyright (C) 2016 Oliver Nightingale - * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt - */ - - /** - * lunr.TokenStore is used for efficient storing and lookup of the reverse - * index of token to document ref. - * - * @constructor - */ - lunr.TokenStore = function () { - this.root = { docs: {} }; - this.length = 0; - }; - - /** - * Loads a previously serialised token store - * - * @param {Object} serialisedData The serialised token store to load. - * @returns {lunr.TokenStore} - * @memberOf TokenStore - */ - lunr.TokenStore.load = function (serialisedData) { - var store = new this(); - - store.root = serialisedData.root; - store.length = serialisedData.length; - - return store; - }; - - /** - * Adds a new token doc pair to the store. - * - * By default this function starts at the root of the current store, however - * it can start at any node of any token store if required. - * - * @param {String} token The token to store the doc under - * @param {Object} doc The doc to store against the token - * @param {Object} root An optional node at which to start looking for the - * correct place to enter the doc, by default the root of this lunr.TokenStore - * is used. - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.add = function (token, doc, root) { - var root = root || this.root, - key = token.charAt(0), - rest = token.slice(1); - - if (!(key in root)) root[key] = { docs: {} }; - - if (rest.length === 0) { - root[key].docs[doc.ref] = doc; - this.length += 1; - return; - } else { - return this.add(rest, doc, root[key]); - } - }; - - /** - * Checks whether this key is contained within this lunr.TokenStore. - * - * By default this function starts at the root of the current store, however - * it can start at any node of any token store if required. - * - * @param {String} token The token to check for - * @param {Object} root An optional node at which to start - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.has = function (token) { - if (!token) return false; - - var node = this.root; - - for (var i = 0; i < token.length; i++) { - if (!node[token.charAt(i)]) return false; - - node = node[token.charAt(i)]; - } - - return true; - }; - - /** - * Retrieve a node from the token store for a given token. - * - * By default this function starts at the root of the current store, however - * it can start at any node of any token store if required. - * - * @param {String} token The token to get the node for. - * @param {Object} root An optional node at which to start. - * @returns {Object} - * @see TokenStore.prototype.get - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.getNode = function (token) { - if (!token) return {}; - - var node = this.root; - - for (var i = 0; i < token.length; i++) { - if (!node[token.charAt(i)]) return {}; - - node = node[token.charAt(i)]; - } - - return node; - }; - - /** - * Retrieve the documents for a node for the given token. - * - * By default this function starts at the root of the current store, however - * it can start at any node of any token store if required. - * - * @param {String} token The token to get the documents for. - * @param {Object} root An optional node at which to start. - * @returns {Object} - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.get = function (token, root) { - return this.getNode(token, root).docs || {}; - }; - - lunr.TokenStore.prototype.count = function (token, root) { - return Object.keys(this.get(token, root)).length; - }; - - /** - * Remove the document identified by ref from the token in the store. - * - * By default this function starts at the root of the current store, however - * it can start at any node of any token store if required. - * - * @param {String} token The token to get the documents for. - * @param {String} ref The ref of the document to remove from this token. - * @param {Object} root An optional node at which to start. - * @returns {Object} - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.remove = function (token, ref) { - if (!token) return; - var node = this.root; - - for (var i = 0; i < token.length; i++) { - if (!(token.charAt(i) in node)) return; - node = node[token.charAt(i)]; - } - - delete node.docs[ref]; - }; - - /** - * Find all the possible suffixes of the passed token using tokens - * currently in the store. - * - * @param {String} token The token to expand. - * @returns {Array} - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.expand = function (token, memo) { - var root = this.getNode(token), - docs = root.docs || {}, - memo = memo || []; - - if (Object.keys(docs).length) memo.push(token); - - Object.keys(root).forEach(function (key) { - if (key === 'docs') return; - - memo.concat(this.expand(token + key, memo)); - }, this); - - return memo; - }; - - /** - * Returns a representation of the token store ready for serialisation. - * - * @returns {Object} - * @memberOf TokenStore - */ - lunr.TokenStore.prototype.toJSON = function () { - return { - root: this.root, - length: this.length - }; - } - - /** - * export the module via AMD, CommonJS or as a browser global - * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js - */ - ;(function (root, factory) { - if (true) { - // AMD. Register as an anonymous module. - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === 'object') { - /** - * Node. Does not work with strict CommonJS, but - * only CommonJS-like enviroments that support module.exports, - * like Node. - */ - module.exports = factory(); - } else { - // Browser globals (root is window) - root.lunr = factory(); - } - })(this, function () { - /** - * Just return a value to define the module export. - * This example returns an object, but the module - * can return a function as the exported value. - */ - return lunr; - }); - })(); - -/***/ }, -/* 4 */ -/***/ function(module, exports) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - /* - * Copyright (c) 2016 Martin Donath - * - * 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 NON-INFRINGEMENT. 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. - */ - - /* ---------------------------------------------------------------------------- - * Github Source - * ------------------------------------------------------------------------- */ - - var GithubSourceFacts = function () { - - /** - * Constructor. - * - * @constructor - * @param {object} storage - Accessor to storage, eg. `window.sessionStorage` - * @param {string} repoUrl - URL to Github repository - */ - function GithubSourceFacts(storage, repoUrl) { - _classCallCheck(this, GithubSourceFacts); - - this.storage = storage; - this.storageKey = "github-source-facts"; - this.apiRepoUrl = repoUrl.replace("github.com/", "api.github.com/repos/"); - } - - /** - * Retrieve stars and fork counts for the repository before invoking - * `GithubSourceFacts.paint`. - * - * @return {void} - */ - - - _createClass(GithubSourceFacts, [{ - key: "initialize", - value: function initialize() { - var _this = this; - - var facts = this.storage.getItem(this.storageKey); - - // Retrieve the facts, then invoke paint - if (!facts) { - fetch(this.apiRepoUrl).then(function (response) { - return response.json(); - }).then(function (data) { - var repoFacts = { - stars: data.stargazers_count, - forks: data.forks_count - }; - - _this.storage.setItem(_this.storageKey, JSON.stringify(repoFacts)); - - GithubSourceFacts.paint(repoFacts); - }).catch(function () { - // console.log("parsing failed", ex) - }); - // Use the cached facts - } else { - GithubSourceFacts.paint(JSON.parse(facts)); - } - } - - /** - * Populates `.md-source__facts` with star and fork counts. - * - * @param {integer} options.stars - Stars count for the repo - * @param {integer} options.forks - Fork count for the repo - * @return {void} - */ - - }], [{ - key: "paint", - value: function paint(_ref) { - var stars = _ref.stars; - var forks = _ref.forks; - - var lists = document.querySelectorAll(".md-source__facts"); // TODO 2x list in drawer and header - - [].forEach.call(lists, function (list) { - - var li = document.createElement("li"); - li.className = "md-source__fact md-source__fact--hidden"; - li.innerText = stars + " Stars"; - list.appendChild(li); - - setTimeout(function (lix) { - lix.classList.remove("md-source__fact--hidden"); - }, 100, li); - - li = document.createElement("li"); - li.className = "md-source__fact md-source__fact--hidden"; - li.innerText = forks + " Forks"; - list.appendChild(li); - - setTimeout(function (lix) { - lix.classList.remove("md-source__fact--hidden"); - }, 500, li); - }); - } - }]); - - return GithubSourceFacts; - }(); - - exports.default = GithubSourceFacts; - module.exports = exports["default"]; - -/***/ }, -/* 5 */ -/***/ function(module, exports, __webpack_require__) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /* - * Copyright (c) 2016 Martin Donath - * - * 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 NON-INFRINGEMENT. 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. - */ - - var _Sidebar = __webpack_require__(6); - - var _Sidebar2 = _interopRequireDefault(_Sidebar); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - /* ---------------------------------------------------------------------------- - * Material application - * ------------------------------------------------------------------------- */ - - var Material = function () { - function Material() { - _classCallCheck(this, Material); - } - - _createClass(Material, [{ - key: "initialize", - - - /** - * Constructor - * - * @constructor - */ - // constructor() { - // - // } - - /** - * @return {void} - */ - value: function initialize() { - - // class AnchorMarker extends PageYOffsetListener - // class SidebarConstrainer extends PageYOffsetListener - - // MatchMedia!? - - var width = window.matchMedia("(min-width: 1200px)"); - - // separate function in application.js --> initSidebar() - var sidebar = new _Sidebar2.default.Position("[data-md-sidebar=primary]"); - var handler = function handler() { - if (width.matches) { - sidebar.listen(); - } else { - sidebar.unlisten(); - } - }; - handler(); // check listen! - - var toc = new _Sidebar2.default.Position("[data-md-sidebar=secondary]"); - toc.listen(); - - window.addEventListener("resize", handler); // TODO: orientation change etc... - - var marker = new _Sidebar2.default.Marker("[data-md-sidebar=secondary] .md-nav__link"); - marker.listen(); - } - }]); - - return Material; - }(); - - exports.default = Material; - module.exports = exports["default"]; - -/***/ }, -/* 6 */ -/***/ function(module, exports, __webpack_require__) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _Marker = __webpack_require__(7); - - var _Marker2 = _interopRequireDefault(_Marker); - - var _Position = __webpack_require__(9); - - var _Position2 = _interopRequireDefault(_Position); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - /* ---------------------------------------------------------------------------- - * Definition - * ------------------------------------------------------------------------- */ - - /* - * Copyright (c) 2016 Martin Donath - * - * 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 NON-INFRINGEMENT. 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. - */ - - exports.default = { - Marker: _Marker2.default, - Position: _Position2.default - }; - module.exports = exports["default"]; - -/***/ }, -/* 7 */ -/***/ function(module, exports, __webpack_require__) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _Abstract2 = __webpack_require__(8); - - var _Abstract3 = _interopRequireDefault(_Abstract2); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* - * Copyright (c) 2016 Martin Donath - * - * 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 NON-INFRINGEMENT. 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. - */ - - /* ---------------------------------------------------------------------------- - * Definition - * ------------------------------------------------------------------------- */ - - var Marker = function (_Abstract) { - _inherits(Marker, _Abstract); - - /** - * Mark anchors within the table of contents above current page y-offset - * - * @constructor - * @param {(string|NodeList)} els - Selector or HTML elements - */ - function Marker(els) { - _classCallCheck(this, Marker); - - /* Resolve elements */ - var _this = _possibleConstructorReturn(this, (Marker.__proto__ || Object.getPrototypeOf(Marker)).call(this)); - - _this.els_ = typeof els === "string" ? document.querySelectorAll(els) : els; - - /* Initialize index and page y-offset */ - _this.index_ = 0; - _this.offset_ = window.pageYOffset; - - /* Index anchor nodes for fast lookup */ - _this.anchors_ = [].map.call(_this.els_, function (el) { - return document.querySelector(el.hash); - }); - return _this; - } - - /** - * Update anchor states - * - * @param {Event} ev - Event (omitted) - */ - - - _createClass(Marker, [{ - key: "update", - value: function update() { - var offset = window.pageYOffset; - - /* Scroll direction is down */ - if (this.offset_ <= offset) { - for (var i = this.index_ + 1; i < this.els_.length; i++) { - if (this.anchors_[i].offsetTop <= offset) { - if (i > 0) this.els_[i - 1].dataset.mdMarked = ""; - this.index_ = i; - } else { - break; - } - } - - /* Scroll direction is up */ - } else { - for (var _i = this.index_; _i >= 0; _i--) { - if (this.anchors_[_i].offsetTop > offset) { - if (_i > 0) delete this.els_[_i - 1].dataset.mdMarked; - } else { - this.index_ = _i; - break; - } - } - } - - /* Remember current offset for next iteration */ - this.offset_ = offset; - } - - /** - * Reset anchor states - */ - - }, { - key: "reset", - value: function reset() { - [].forEach.call(this.els_, function (el) { - delete el.dataset.mdMarked; - }); - } - }]); - - return Marker; - }(_Abstract3.default); - - exports.default = Marker; - module.exports = exports["default"]; - -/***/ }, -/* 8 */ -/***/ function(module, exports) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - /* - * Copyright (c) 2016 Martin Donath - * - * 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 NON-INFRINGEMENT. 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. - */ - - /* ---------------------------------------------------------------------------- - * Definition - * ------------------------------------------------------------------------- */ - - var Abstract = function () { - - /** - * Dispatch update on next repaint - * - * @constructor - */ - function Abstract() { - var _this = this; - - _classCallCheck(this, Abstract); - - if (this === Abstract) throw new TypeError("Cannot construct abstract instance"); - - /* Dispatch update on next repaint */ - this.handler_ = function (ev) { - window.requestAnimationFrame(function () { - _this.update(ev); - }); - }; - } - - /** - * Update state - * - * @abstract - */ - - - _createClass(Abstract, [{ - key: "update", - value: function update() { - throw new Error("update(): not implemented"); - } - - /** - * Reset state - * - * @abstract - */ - - }, { - key: "reset", - value: function reset() { - throw new Error("reset(): not implemented"); - } - - /** - * Register listener for all relevant events - */ - - }, { - key: "listen", - value: function listen() { - var _this2 = this; - - ["scroll", "resize", "orientationchange"].forEach(function (name) { - window.addEventListener(name, _this2.handler_, false); - }); - - /* Initial update */ - this.update(); - } - - /** - * Unregister listener for all relevant events - */ - - }, { - key: "unlisten", - value: function unlisten() { - var _this3 = this; - - ["scroll", "resize", "orientationchange"].forEach(function (name) { - window.removeEventListener(name, _this3.handler_, false); - }); - - /* Final reset */ - this.reset(); - } - }]); - - return Abstract; - }(); - - exports.default = Abstract; - module.exports = exports["default"]; - -/***/ }, -/* 9 */ -/***/ function(module, exports, __webpack_require__) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _Abstract2 = __webpack_require__(8); - - var _Abstract3 = _interopRequireDefault(_Abstract2); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* - * Copyright (c) 2016 Martin Donath - * - * 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 NON-INFRINGEMENT. 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. - */ - - /* ---------------------------------------------------------------------------- - * Definition - * ------------------------------------------------------------------------- */ - - var Position = function (_Abstract) { - _inherits(Position, _Abstract); - - /** - * Set sidebars to locked state and limit height to parent node - * - * @constructor - * @param {(string|HTMLElement)} el - Selector or HTML element - */ - function Position(el) { - _classCallCheck(this, Position); - - /* Resolve elements */ - var _this = _possibleConstructorReturn(this, (Position.__proto__ || Object.getPrototypeOf(Position)).call(this)); - - _this.el_ = typeof el === "string" ? document.querySelector(el) : el; - - /* Index inner and outer container */ - var inner = _this.el_.parentNode; - var outer = _this.el_.parentNode.parentNode; - - /* Get top and bottom bounds */ - _this.offset_ = outer.offsetTop; - _this.bounds_ = { - top: inner.offsetTop, - bottom: inner.offsetTop + inner.offsetHeight - }; - - /* Initialize current height */ - _this.height_ = 0; - return _this; - } - - /** - * Update locked state and height - * - * @param {Event} ev - Event (omitted) - */ - - - _createClass(Position, [{ - key: "update", - value: function update() { - var scroll = window.pageYOffset; - var expand = window.innerHeight; - - /* Calculate new bounds */ - var offset = this.bounds_.top - scroll; - var height = expand - Math.max(0, scroll + expand - this.bounds_.bottom) - Math.max(offset, this.offset_); - - /* If height changed, update element */ - if (height !== this.height_) this.el_.style.height = (this.height_ = height) + "px"; - - /* Sidebar should be locked, as we're below parent offset */ - if (offset < this.offset_) { - if (!this.el_.dataset.mdLocked) this.el_.dataset.mdLocked = ""; - - /* Sidebar should be unlocked, if locked */ - } else if (typeof this.el_.dataset.mdLocked === "string") { - delete this.el_.dataset.mdLocked; - } - } - - /** - * Reset locked state and height - */ - - }, { - key: "reset", - value: function reset() { - delete this.el_.dataset.mdLocked; - this.el_.style.height = ""; - this.height_ = 0; - } - }]); - - return Position; - }(_Abstract3.default); - - exports.default = Position; - module.exports = exports["default"]; - -/***/ } -/******/ ]); \ No newline at end of file diff --git a/material/assets/javascripts/application.js.map b/material/assets/javascripts/application.js.map deleted file mode 100644 index 9f601a8f4..000000000 --- a/material/assets/javascripts/application.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 66a33cb106306134b98f","webpack:///./src/assets/javascripts/application.js","webpack:///./~/fastclick/lib/fastclick.js","webpack:///(webpack)/buildin/amd-options.js","webpack:///./~/lunr/lunr.js","webpack:///./src/assets/javascripts/components/GithubSourceFacts.js","webpack:///./src/assets/javascripts/components/Material.js","webpack:///./src/assets/javascripts/components/Material/Sidebar.js","webpack:///./src/assets/javascripts/components/Material/Sidebar/Marker.js","webpack:///./src/assets/javascripts/components/Material/Sidebar/Abstract.js","webpack:///./src/assets/javascripts/components/Material/Sidebar/Position.js"],"names":["Application","config","material","initialize","hasGithubRepo","githubSource","storage","repo","url","icon","includes","document","addEventListener","Modernizr","addTest","navigator","userAgent","match","standalone","attach","body","query","getElementById","querySelector","dataset","mdLocked","offset","toggle","list","lock","matchMedia","matches","setTimeout","window","scrollTo","scrollY","focus","toggleSearchClose","setAttribute","toggles","querySelectorAll","forEach","call","nav","togglex","nextElementSibling","style","maxHeight","getBoundingClientRect","height","first","requestAnimationFrame","classList","add","last","remove","ev","target","fetch","then","response","json","index","field","boost","ref","articles","data","docs","article","text","replace","string","g1","location","baseUrl","queryx","container","firstChild","removeChild","results","search","value","result","link","createElement","href","li","appendChild","title","innerHTML","truncate","n","i","length","substring","meta","catch","FastClick","layer","options","oldOnClick","trackingClick","trackingClickStart","targetElement","touchStartX","touchStartY","lastTouchIdentifier","touchBoundary","tapDelay","tapTimeout","notNeeded","bind","method","context","apply","arguments","methods","l","deviceIsAndroid","onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel","Event","prototype","stopImmediatePropagation","removeEventListener","type","callback","capture","rmv","Node","hijacked","adv","event","propagationStopped","onclick","deviceIsWindowsPhone","indexOf","deviceIsIOS","test","deviceIsIOS4","deviceIsIOSWithBadTarget","deviceIsBlackBerry10","needsClick","nodeName","toLowerCase","disabled","className","needsFocus","readOnly","sendClick","clickEvent","touch","activeElement","blur","changedTouches","createEvent","initMouseEvent","determineEventType","screenX","screenY","clientX","clientY","forwardedTouchEvent","dispatchEvent","tagName","setSelectionRange","updateScrollParent","scrollParent","parentElement","fastClickScrollParent","contains","scrollHeight","offsetHeight","fastClickLastScrollTop","scrollTop","getTargetElementFromEventTarget","eventTarget","nodeType","TEXT_NODE","parentNode","selection","targetTouches","getSelection","rangeCount","isCollapsed","identifier","preventDefault","timeStamp","pageX","pageY","lastClickTime","touchHasMoved","boundary","Math","abs","findControl","labelElement","control","undefined","htmlFor","forElement","targetTagName","cancelNextClick","elementFromPoint","pageXOffset","pageYOffset","top","cancelable","stopPropagation","permitted","detail","destroy","metaViewport","chromeVersion","blackberryVersion","firefoxVersion","ontouchstart","exec","content","documentElement","scrollWidth","outerWidth","msTouchAction","touchAction","define","module","exports","lunr","idx","Index","pipeline","trimmer","stopWordFilter","stemmer","version","utils","warn","global","message","console","asString","obj","toString","EventEmitter","events","addListener","args","Array","slice","fn","pop","names","TypeError","name","hasHandler","push","removeListener","fnIndex","splice","emit","tokenizer","isArray","map","t","separator","seperator","trim","split","load","label","registeredFunctions","Error","registerFunction","Pipeline","_stack","warnIfFunctionNotRegistered","isRegistered","serialised","fnName","fns","after","existingFn","newFn","pos","before","run","tokens","out","tokenLength","stackLength","token","j","reset","toJSON","Vector","_magnitude","val","next","insert","prev","magnitude","node","sumOfSquares","sqrt","dot","otherVector","otherNode","dotProduct","similarity","SortedSet","elements","serialisedData","set","element","locationFor","toArray","ctx","elem","start","end","sectionLength","pivot","floor","pivotElem","intersect","otherSet","intersectSet","a_len","b_len","a","b","clone","union","longSet","shortSet","unionSet","shortSetElements","_fields","_ref","documentStore","Store","tokenStore","TokenStore","corpusTokens","eventEmitter","tokenizerFn","_idfCache","on","off","fields","fieldName","opts","refName","doc","emitEvent","docTokens","allDocumentTokens","docRef","fieldTokens","tf","fieldLength","tokenCount","k","has","get","update","idf","term","cacheKey","Object","hasOwnProperty","documentFrequency","count","log","queryTokens","queryVector","documentSets","fieldBoosts","reduce","memo","f","hasSomeToken","some","self","expand","key","similarityBoost","diff","max","matchingDocuments","refs","keys","refsLen","documentSet","score","documentVector","sort","documentRef","documentTokens","documentTokensLength","use","plugin","unshift","store","id","step2list","step3list","c","v","C","V","mgr0","meq1","mgr1","s_v","re_mgr0","RegExp","re_mgr1","re_meq1","re_s_v","re_1a","re2_1a","re_1b","re2_1b","re_1b_2","re2_1b_2","re3_1b_2","re4_1b_2","re_1c","re_2","re_3","re_4","re2_4","re_5","re_5_1","re3_5","porterStemmer","w","stem","suffix","firstch","re","re2","re3","re4","substr","toUpperCase","fp","generateStopWordFilter","stopWords","words","stopWord","root","charAt","rest","getNode","concat","factory","GithubSourceFacts","repoUrl","storageKey","apiRepoUrl","facts","getItem","repoFacts","stars","stargazers_count","forks","forks_count","setItem","JSON","stringify","paint","parse","lists","innerText","lix","Material","width","sidebar","Position","handler","listen","unlisten","toc","marker","Marker","els","els_","index_","offset_","anchors_","el","hash","offsetTop","mdMarked","Abstract","handler_","el_","inner","outer","bounds_","bottom","height_","scroll","innerHeight"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;sjBCtCA;;;;;;;;;;;;;;;;;;;;;;AAsBA;;;;AAOA;;AAHA;;;;AACA;;;;AAIA;;;;AACA;;;;;;;;AAEA;;AAEA;;;;KAIMA,W;;AAEJ;;;;;;;AAOA,wBAAYC,MAAZ,EAAoB;AAAA;;AAClB,UAAKA,MAAL,GAAcA,MAAd;AACD;;AAED;;;;;;;kCAGa;AACX,WAAMC,WAAW,wBAAjB;AACAA,gBAASC,UAAT;;AAEA,WAAI,KAAKC,aAAL,EAAJ,EAA0B;AACxB,aAAMC,eAAe,gCACnB,KAAKJ,MAAL,CAAYK,OADO,EAEnB,KAAKL,MAAL,CAAYM,IAAZ,CAAiBC,GAFE,CAArB;AAIAH,sBAAaF,UAAb;AACD;AACF;;AAED;;;;;;;;qCAKgB;AACd,cAAO,KAAKF,MAAL,CAAYM,IAAZ,CAAiBE,IAAjB,KAA0B,QAA1B,IACF,KAAKR,MAAL,CA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Q","file":"application.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 66a33cb106306134b98f\n **/","/*\n * Copyright (c) 2016 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Imports\n * ------------------------------------------------------------------------- */\n\nimport FastClick from \"fastclick\"\nimport lunr from \"lunr\"\n\n// import Expander from \"./components/expander\"\n\nimport GithubSourceFacts from \"./components/GithubSourceFacts\"\nimport Material from \"./components/Material\"\n\n// import Search from './components/search';\n\n/* ----------------------------------------------------------------------------\n * Application\n * ------------------------------------------------------------------------- */\n\nclass Application {\n\n /**\n * Constructor.\n *\n * @constructor\n * @param {object} config Configuration object\n * @return {void}\n */\n constructor(config) {\n this.config = config\n }\n\n /**\n * @return {void}\n */\n initialize() {\n const material = new Material()\n material.initialize()\n\n if (this.hasGithubRepo()) {\n const githubSource = new GithubSourceFacts(\n this.config.storage,\n this.config.repo.url\n )\n githubSource.initialize()\n }\n }\n\n /**\n * Is this application about a Github repository?\n *\n * @return {bool} - true if `repo.icon` or `repo.url` contains 'github'\n */\n hasGithubRepo() {\n return this.config.repo.icon === \"github\"\n || this.config.repo.url.includes(\"github\")\n }\n}\n\nexport default Application\n\n// TODO: wrap in function call\n// application module export\n\n/* Initialize application upon DOM ready */\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n\n /* Test for iOS */\n Modernizr.addTest(\"ios\", () => {\n return !!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)\n })\n\n /* Test for web application context */\n Modernizr.addTest(\"standalone\", () => {\n return !!navigator.standalone\n })\n\n /* Attack FastClick to mitigate 300ms delay on touch devices */\n FastClick.attach(document.body)\n\n const query = document.getElementById(\"query\")\n query.addEventListener(\"focus\", () => {\n document.querySelector(\".md-search\").dataset.mdLocked = \"\"\n })\n\n /* Intercept click on search mode toggle */\n let offset = 0\n const toggle = document.getElementById(\"search\")\n toggle.addEventListener(\"click\", () => { // TODO: click may be the wrong event...\n const list = document.body // classList md bla\n const lock = !matchMedia(\"only screen and (min-width: 960px)\").matches\n\n /* Exiting search mode */\n if (list.dataset.mdLocked) {\n delete list.dataset.mdLocked\n\n /* Scroll to former position, but wait for 100ms to prevent flashes\n on iOS. A short timeout seems to do the trick */\n if (lock)\n setTimeout(() => {\n window.scrollTo(0, offset)\n }, 100)\n\n /* Entering search mode */\n } else {\n offset = window.scrollY\n\n /* First timeout: scroll to top after transition, to omit flickering */\n if (lock)\n setTimeout(() => {\n window.scrollTo(0, 0)\n }, 400)\n\n /* Second timeout: Lock body after finishing transition and scrolling to\n top and focus input field. Sadly, the focus event is not dispatched\n on iOS Safari and there's nothing we can do about it. */\n setTimeout(() => {\n\n /* This additional check is necessary to handle fast subsequent clicks\n on the toggle and the timeout to lock the body must be cancelled */\n // if (ev.target.checked) {\n if (lock)\n list.dataset.mdLocked = \"\"\n setTimeout(() => {\n document.getElementById(\"query\").focus()\n }, 200)\n // }\n }, 450)\n }\n })\n\n // TODO: only do this on MOBILE and TABLET\n const toggleSearchClose = document.querySelector(\".md-search__icon\")\n toggleSearchClose.setAttribute(\"for\", \"search\") // TODO: override query with search, when on mobile!!!\n // toggleSearchClose.addEventListener(\"click\", ev => {\n // ev.preventDefault()\n // // ev.target\n //\n // const search = document.getElementById(\"search\")\n // search.checked = false\n // })\n\n // var toc = new Sidebar('.md-sidebar--secondary');\n // toc.listen();\n\n const toggles =\n document.querySelectorAll(\".md-nav__item--nested > .md-nav__link\");\n [].forEach.call(toggles, togglex => {\n const nav = togglex.nextElementSibling\n\n // 1.\n\n nav.style.maxHeight = `${nav.getBoundingClientRect().height}px`\n\n togglex.addEventListener(\"click\", () => {\n const first = nav.getBoundingClientRect().height\n if (first) {\n // console.log('closing');\n nav.style.maxHeight = `${first}px` // reset!\n requestAnimationFrame(() => {\n\n nav.classList.add(\"md-nav--transitioning\")\n nav.style.maxHeight = \"0px\"\n })\n } else {\n // console.log('opening');\n\n /* Toggle and read height */\n nav.style.maxHeight = \"\"\n\n nav.classList.add(\"md-nav--toggled\")\n const last = nav.getBoundingClientRect().height\n nav.classList.remove(\"md-nav--toggled\")\n\n // Initial state\n nav.style.maxHeight = \"0px\"\n\n /* Enable animations */\n requestAnimationFrame(() => {\n nav.classList.add(\"md-nav--transitioning\")\n nav.style.maxHeight = `${last}px`\n })\n }\n\n })\n\n // Capture the end with transitionend\n nav.addEventListener(\"transitionend\", ev => {\n ev.target.classList.remove(\"md-nav--transitioning\")\n if (ev.target.getBoundingClientRect().height > 0) {\n ev.target.style.maxHeight = \"100%\"\n }\n })\n })\n\n// setTimeout(function() {\n fetch(\"/mkdocs/search_index.json\") // TODO: prepend BASE URL!!!\n .then(response => {\n return response.json()\n })\n .then(data => {\n // console.log(data)\n\n /* Create index */\n const index = lunr(function() {\n /* eslint-disable no-invalid-this, lines-around-comment */\n this.field(\"title\", { boost: 10 })\n this.field(\"text\")\n this.ref(\"location\")\n /* eslint-enable no-invalid-this, lines-around-comment */\n })\n\n /* Index articles */\n const articles = {}\n data.docs.forEach(article => {\n\n // TODO: match for two whitespaces, then replace unnecessary whitespace after string\n article.text = article.text.replace(/\\s(\\.,\\:)\\s/gi, (string, g1) => {\n return `${g1} `\n })\n // TODO: window.baseUrl sucks...\n article.location = window.baseUrl + article.location\n articles[article.location] = article\n index.add(article)\n })\n\n /* Register keyhandler to execute search on key up */\n const queryx = document.getElementById(\"query\")\n queryx.addEventListener(\"keyup\", () => {\n const container = document.querySelector(\".md-search-result__list\")\n while (container.firstChild)\n container.removeChild(container.firstChild)\n\n // /* Abort, if the query is empty */\n // var bar = document.querySelector('.bar.search');\n // if (!query.value.length) {\n // while (meta.firstChild)\n // meta.removeChild(meta.firstChild);\n //\n // /* Restore state */\n // bar.classList.remove('non-empty');\n // return;\n // }\n\n /* Show reset button */\n // bar.classList.add('non-empty');\n\n /* Execute search */\n const results = index.search(query.value)\n results.forEach(result => {\n const article = articles[result.ref]\n\n /* Create a link referring to the article */\n const link = document.createElement(\"a\")\n link.classList.add(\"md-search-result__link\")\n link.href = article.location\n\n // /* Create article container */\n const li = document.createElement(\"li\")\n li.classList.add(\"md-search-result__item\")\n li.appendChild(link)\n\n /* Create title element */\n const title = document.createElement(\"div\")\n title.classList.add(\"md-search-result__title\")\n\n // article.title.split(//)\n\n title.innerHTML = article.title\n link.appendChild(title)\n\n /* Truncate a string after the given number of characters */\n const truncate = function(string, n) {\n let i = n\n if (string.length > i) {\n while (string[i] !== \" \" && --i > 0);\n return `${string.substring(0, i)}…`\n }\n return string\n }\n\n /* Create text element */\n const text = document.createElement(\"p\")\n text.classList.add(\"md-search-result__description\")\n text.innerHTML = truncate(article.text) // .truncate(140);\n text.innerHTML = truncate(article.text, 140) // .truncate(140);\n link.appendChild(text)\n\n container.appendChild(li)\n })\n\n /* Show number of search results */\n // var number = document.createElement('strong');\n\n const meta = document.querySelector(\".md-search-result__meta\")\n meta.innerHTML = `${results.length} search result${\n results.length !== 1\n ? \"s\"\n : \"\"}`\n\n /* Update number */\n // while (meta.firstChild)\n // meta.removeChild(meta.firstChild);\n // meta.appendChild(number);\n })\n\n // setTimeout(function() {\n // li.classList.remove('md-source__fact--hidden');\n // }, 100);\n\n })\n .catch(() => {\n // console.log(\"parsing failed\", ex)\n })\n// }, 1000);\n\n fetch(\n \"https://api.github.com/repos/squidfunk/mkdocs-material/releases/latest\")\n .then(response => {\n return response.json()\n })\n // .then(data => {\n // // console.log(data)\n // })\n\n})\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/application.js\n **/",";(function () {\n\t'use strict';\n\n\t/**\n\t * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.\n\t *\n\t * @codingstandard ftlabs-jsv2\n\t * @copyright The Financial Times Limited [All Rights Reserved]\n\t * @license MIT License (see LICENSE.txt)\n\t */\n\n\t/*jslint browser:true, node:true*/\n\t/*global define, Event, Node*/\n\n\n\t/**\n\t * Instantiate fast-clicking listeners on the specified layer.\n\t *\n\t * @constructor\n\t * @param {Element} layer The layer to listen on\n\t * @param {Object} [options={}] The options to override the defaults\n\t */\n\tfunction FastClick(layer, options) {\n\t\tvar oldOnClick;\n\n\t\toptions = options || {};\n\n\t\t/**\n\t\t * Whether a click is currently being tracked.\n\t\t *\n\t\t * @type boolean\n\t\t */\n\t\tthis.trackingClick = false;\n\n\n\t\t/**\n\t\t * Timestamp for when click tracking started.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.trackingClickStart = 0;\n\n\n\t\t/**\n\t\t * The element being tracked for a click.\n\t\t *\n\t\t * @type EventTarget\n\t\t */\n\t\tthis.targetElement = null;\n\n\n\t\t/**\n\t\t * X-coordinate of touch start event.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.touchStartX = 0;\n\n\n\t\t/**\n\t\t * Y-coordinate of touch start event.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.touchStartY = 0;\n\n\n\t\t/**\n\t\t * ID of the last touch, retrieved from Touch.identifier.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.lastTouchIdentifier = 0;\n\n\n\t\t/**\n\t\t * Touchmove boundary, beyond which a click will be cancelled.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.touchBoundary = options.touchBoundary || 10;\n\n\n\t\t/**\n\t\t * The FastClick layer.\n\t\t *\n\t\t * @type Element\n\t\t */\n\t\tthis.layer = layer;\n\n\t\t/**\n\t\t * The minimum time between tap(touchstart and touchend) events\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.tapDelay = options.tapDelay || 200;\n\n\t\t/**\n\t\t * The maximum time for a tap\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.tapTimeout = options.tapTimeout || 700;\n\n\t\tif (FastClick.notNeeded(layer)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Some old versions of Android don't have Function.prototype.bind\n\t\tfunction bind(method, context) {\n\t\t\treturn function() { return method.apply(context, arguments); };\n\t\t}\n\n\n\t\tvar methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];\n\t\tvar context = this;\n\t\tfor (var i = 0, l = methods.length; i < l; i++) {\n\t\t\tcontext[methods[i]] = bind(context[methods[i]], context);\n\t\t}\n\n\t\t// Set up event handlers as required\n\t\tif (deviceIsAndroid) {\n\t\t\tlayer.addEventListener('mouseover', this.onMouse, true);\n\t\t\tlayer.addEventListener('mousedown', this.onMouse, true);\n\t\t\tlayer.addEventListener('mouseup', this.onMouse, true);\n\t\t}\n\n\t\tlayer.addEventListener('click', this.onClick, true);\n\t\tlayer.addEventListener('touchstart', this.onTouchStart, false);\n\t\tlayer.addEventListener('touchmove', this.onTouchMove, false);\n\t\tlayer.addEventListener('touchend', this.onTouchEnd, false);\n\t\tlayer.addEventListener('touchcancel', this.onTouchCancel, false);\n\n\t\t// Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)\n\t\t// which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick\n\t\t// layer when they are cancelled.\n\t\tif (!Event.prototype.stopImmediatePropagation) {\n\t\t\tlayer.removeEventListener = function(type, callback, capture) {\n\t\t\t\tvar rmv = Node.prototype.removeEventListener;\n\t\t\t\tif (type === 'click') {\n\t\t\t\t\trmv.call(layer, type, callback.hijacked || callback, capture);\n\t\t\t\t} else {\n\t\t\t\t\trmv.call(layer, type, callback, capture);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tlayer.addEventListener = function(type, callback, capture) {\n\t\t\t\tvar adv = Node.prototype.addEventListener;\n\t\t\t\tif (type === 'click') {\n\t\t\t\t\tadv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {\n\t\t\t\t\t\tif (!event.propagationStopped) {\n\t\t\t\t\t\t\tcallback(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}), capture);\n\t\t\t\t} else {\n\t\t\t\t\tadv.call(layer, type, callback, capture);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t// If a handler is already declared in the element's onclick attribute, it will be fired before\n\t\t// FastClick's onClick handler. Fix this by pulling out the user-defined handler function and\n\t\t// adding it as listener.\n\t\tif (typeof layer.onclick === 'function') {\n\n\t\t\t// Android browser on at least 3.2 requires a new reference to the function in layer.onclick\n\t\t\t// - the old one won't work if passed to addEventListener directly.\n\t\t\toldOnClick = layer.onclick;\n\t\t\tlayer.addEventListener('click', function(event) {\n\t\t\t\toldOnClick(event);\n\t\t\t}, false);\n\t\t\tlayer.onclick = null;\n\t\t}\n\t}\n\n\t/**\n\t* Windows Phone 8.1 fakes user agent string to look like Android and iPhone.\n\t*\n\t* @type boolean\n\t*/\n\tvar deviceIsWindowsPhone = navigator.userAgent.indexOf(\"Windows Phone\") >= 0;\n\n\t/**\n\t * Android requires exceptions.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;\n\n\n\t/**\n\t * iOS requires exceptions.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;\n\n\n\t/**\n\t * iOS 4 requires an exception for select elements.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsIOS4 = deviceIsIOS && (/OS 4_\\d(_\\d)?/).test(navigator.userAgent);\n\n\n\t/**\n\t * iOS 6.0-7.* requires the target element to be manually derived\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\\d/).test(navigator.userAgent);\n\n\t/**\n\t * BlackBerry requires exceptions.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;\n\n\t/**\n\t * Determine whether a given element requires a native click.\n\t *\n\t * @param {EventTarget|Element} target Target DOM element\n\t * @returns {boolean} Returns true if the element needs a native click\n\t */\n\tFastClick.prototype.needsClick = function(target) {\n\t\tswitch (target.nodeName.toLowerCase()) {\n\n\t\t// Don't send a synthetic click to disabled inputs (issue #62)\n\t\tcase 'button':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\tif (target.disabled) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase 'input':\n\n\t\t\t// File inputs need real clicks on iOS 6 due to a browser bug (issue #68)\n\t\t\tif ((deviceIsIOS && target.type === 'file') || target.disabled) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase 'label':\n\t\tcase 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames\n\t\tcase 'video':\n\t\t\treturn true;\n\t\t}\n\n\t\treturn (/\\bneedsclick\\b/).test(target.className);\n\t};\n\n\n\t/**\n\t * Determine whether a given element requires a call to focus to simulate click into element.\n\t *\n\t * @param {EventTarget|Element} target Target DOM element\n\t * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.\n\t */\n\tFastClick.prototype.needsFocus = function(target) {\n\t\tswitch (target.nodeName.toLowerCase()) {\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tcase 'select':\n\t\t\treturn !deviceIsAndroid;\n\t\tcase 'input':\n\t\t\tswitch (target.type) {\n\t\t\tcase 'button':\n\t\t\tcase 'checkbox':\n\t\t\tcase 'file':\n\t\t\tcase 'image':\n\t\t\tcase 'radio':\n\t\t\tcase 'submit':\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// No point in attempting to focus disabled inputs\n\t\t\treturn !target.disabled && !target.readOnly;\n\t\tdefault:\n\t\t\treturn (/\\bneedsfocus\\b/).test(target.className);\n\t\t}\n\t};\n\n\n\t/**\n\t * Send a click event to the specified element.\n\t *\n\t * @param {EventTarget|Element} targetElement\n\t * @param {Event} event\n\t */\n\tFastClick.prototype.sendClick = function(targetElement, event) {\n\t\tvar clickEvent, touch;\n\n\t\t// On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)\n\t\tif (document.activeElement && document.activeElement !== targetElement) {\n\t\t\tdocument.activeElement.blur();\n\t\t}\n\n\t\ttouch = event.changedTouches[0];\n\n\t\t// Synthesise a click event, with an extra attribute so it can be tracked\n\t\tclickEvent = document.createEvent('MouseEvents');\n\t\tclickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);\n\t\tclickEvent.forwardedTouchEvent = true;\n\t\ttargetElement.dispatchEvent(clickEvent);\n\t};\n\n\tFastClick.prototype.determineEventType = function(targetElement) {\n\n\t\t//Issue #159: Android Chrome Select Box does not open with a synthetic click event\n\t\tif (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {\n\t\t\treturn 'mousedown';\n\t\t}\n\n\t\treturn 'click';\n\t};\n\n\n\t/**\n\t * @param {EventTarget|Element} targetElement\n\t */\n\tFastClick.prototype.focus = function(targetElement) {\n\t\tvar length;\n\n\t\t// Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.\n\t\tif (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {\n\t\t\tlength = targetElement.value.length;\n\t\t\ttargetElement.setSelectionRange(length, length);\n\t\t} else {\n\t\t\ttargetElement.focus();\n\t\t}\n\t};\n\n\n\t/**\n\t * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.\n\t *\n\t * @param {EventTarget|Element} targetElement\n\t */\n\tFastClick.prototype.updateScrollParent = function(targetElement) {\n\t\tvar scrollParent, parentElement;\n\n\t\tscrollParent = targetElement.fastClickScrollParent;\n\n\t\t// Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the\n\t\t// target element was moved to another parent.\n\t\tif (!scrollParent || !scrollParent.contains(targetElement)) {\n\t\t\tparentElement = targetElement;\n\t\t\tdo {\n\t\t\t\tif (parentElement.scrollHeight > parentElement.offsetHeight) {\n\t\t\t\t\tscrollParent = parentElement;\n\t\t\t\t\ttargetElement.fastClickScrollParent = parentElement;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tparentElement = parentElement.parentElement;\n\t\t\t} while (parentElement);\n\t\t}\n\n\t\t// Always update the scroll top tracker if possible.\n\t\tif (scrollParent) {\n\t\t\tscrollParent.fastClickLastScrollTop = scrollParent.scrollTop;\n\t\t}\n\t};\n\n\n\t/**\n\t * @param {EventTarget} targetElement\n\t * @returns {Element|EventTarget}\n\t */\n\tFastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {\n\n\t\t// On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.\n\t\tif (eventTarget.nodeType === Node.TEXT_NODE) {\n\t\t\treturn eventTarget.parentNode;\n\t\t}\n\n\t\treturn eventTarget;\n\t};\n\n\n\t/**\n\t * On touch start, record the position and scroll offset.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onTouchStart = function(event) {\n\t\tvar targetElement, touch, selection;\n\n\t\t// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).\n\t\tif (event.targetTouches.length > 1) {\n\t\t\treturn true;\n\t\t}\n\n\t\ttargetElement = this.getTargetElementFromEventTarget(event.target);\n\t\ttouch = event.targetTouches[0];\n\n\t\tif (deviceIsIOS) {\n\n\t\t\t// Only trusted events will deselect text on iOS (issue #49)\n\t\t\tselection = window.getSelection();\n\t\t\tif (selection.rangeCount && !selection.isCollapsed) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (!deviceIsIOS4) {\n\n\t\t\t\t// Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):\n\t\t\t\t// when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched\n\t\t\t\t// with the same identifier as the touch event that previously triggered the click that triggered the alert.\n\t\t\t\t// Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an\n\t\t\t\t// immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.\n\t\t\t\t// Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,\n\t\t\t\t// which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,\n\t\t\t\t// random integers, it's safe to to continue if the identifier is 0 here.\n\t\t\t\tif (touch.identifier && touch.identifier === this.lastTouchIdentifier) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tthis.lastTouchIdentifier = touch.identifier;\n\n\t\t\t\t// If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:\n\t\t\t\t// 1) the user does a fling scroll on the scrollable layer\n\t\t\t\t// 2) the user stops the fling scroll with another tap\n\t\t\t\t// then the event.target of the last 'touchend' event will be the element that was under the user's finger\n\t\t\t\t// when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check\n\t\t\t\t// is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).\n\t\t\t\tthis.updateScrollParent(targetElement);\n\t\t\t}\n\t\t}\n\n\t\tthis.trackingClick = true;\n\t\tthis.trackingClickStart = event.timeStamp;\n\t\tthis.targetElement = targetElement;\n\n\t\tthis.touchStartX = touch.pageX;\n\t\tthis.touchStartY = touch.pageY;\n\n\t\t// Prevent phantom clicks on fast double-tap (issue #36)\n\t\tif ((event.timeStamp - this.lastClickTime) < this.tapDelay) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\treturn true;\n\t};\n\n\n\t/**\n\t * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.touchHasMoved = function(event) {\n\t\tvar touch = event.changedTouches[0], boundary = this.touchBoundary;\n\n\t\tif (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\n\t/**\n\t * Update the last position.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onTouchMove = function(event) {\n\t\tif (!this.trackingClick) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If the touch has moved, cancel the click tracking\n\t\tif (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {\n\t\t\tthis.trackingClick = false;\n\t\t\tthis.targetElement = null;\n\t\t}\n\n\t\treturn true;\n\t};\n\n\n\t/**\n\t * Attempt to find the labelled control for the given label element.\n\t *\n\t * @param {EventTarget|HTMLLabelElement} labelElement\n\t * @returns {Element|null}\n\t */\n\tFastClick.prototype.findControl = function(labelElement) {\n\n\t\t// Fast path for newer browsers supporting the HTML5 control attribute\n\t\tif (labelElement.control !== undefined) {\n\t\t\treturn labelElement.control;\n\t\t}\n\n\t\t// All browsers under test that support touch events also support the HTML5 htmlFor attribute\n\t\tif (labelElement.htmlFor) {\n\t\t\treturn document.getElementById(labelElement.htmlFor);\n\t\t}\n\n\t\t// If no for attribute exists, attempt to retrieve the first labellable descendant element\n\t\t// the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label\n\t\treturn labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');\n\t};\n\n\n\t/**\n\t * On touch end, determine whether to send a click event at once.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onTouchEnd = function(event) {\n\t\tvar forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;\n\n\t\tif (!this.trackingClick) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Prevent phantom clicks on fast double-tap (issue #36)\n\t\tif ((event.timeStamp - this.lastClickTime) < this.tapDelay) {\n\t\t\tthis.cancelNextClick = true;\n\t\t\treturn true;\n\t\t}\n\n\t\tif ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Reset to prevent wrong click cancel on input (issue #156).\n\t\tthis.cancelNextClick = false;\n\n\t\tthis.lastClickTime = event.timeStamp;\n\n\t\ttrackingClickStart = this.trackingClickStart;\n\t\tthis.trackingClick = false;\n\t\tthis.trackingClickStart = 0;\n\n\t\t// On some iOS devices, the targetElement supplied with the event is invalid if the layer\n\t\t// is performing a transition or scroll, and has to be re-detected manually. Note that\n\t\t// for this to function correctly, it must be called *after* the event target is checked!\n\t\t// See issue #57; also filed as rdar://13048589 .\n\t\tif (deviceIsIOSWithBadTarget) {\n\t\t\ttouch = event.changedTouches[0];\n\n\t\t\t// In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null\n\t\t\ttargetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;\n\t\t\ttargetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;\n\t\t}\n\n\t\ttargetTagName = targetElement.tagName.toLowerCase();\n\t\tif (targetTagName === 'label') {\n\t\t\tforElement = this.findControl(targetElement);\n\t\t\tif (forElement) {\n\t\t\t\tthis.focus(targetElement);\n\t\t\t\tif (deviceIsAndroid) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\ttargetElement = forElement;\n\t\t\t}\n\t\t} else if (this.needsFocus(targetElement)) {\n\n\t\t\t// Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.\n\t\t\t// Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).\n\t\t\tif ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {\n\t\t\t\tthis.targetElement = null;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.focus(targetElement);\n\t\t\tthis.sendClick(targetElement, event);\n\n\t\t\t// Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.\n\t\t\t// Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)\n\t\t\tif (!deviceIsIOS || targetTagName !== 'select') {\n\t\t\t\tthis.targetElement = null;\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif (deviceIsIOS && !deviceIsIOS4) {\n\n\t\t\t// Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled\n\t\t\t// and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).\n\t\t\tscrollParent = targetElement.fastClickScrollParent;\n\t\t\tif (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Prevent the actual click from going though - unless the target node is marked as requiring\n\t\t// real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.\n\t\tif (!this.needsClick(targetElement)) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.sendClick(targetElement, event);\n\t\t}\n\n\t\treturn false;\n\t};\n\n\n\t/**\n\t * On touch cancel, stop tracking the click.\n\t *\n\t * @returns {void}\n\t */\n\tFastClick.prototype.onTouchCancel = function() {\n\t\tthis.trackingClick = false;\n\t\tthis.targetElement = null;\n\t};\n\n\n\t/**\n\t * Determine mouse events which should be permitted.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onMouse = function(event) {\n\n\t\t// If a target element was never set (because a touch event was never fired) allow the event\n\t\tif (!this.targetElement) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (event.forwardedTouchEvent) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Programmatically generated events targeting a specific element should be permitted\n\t\tif (!event.cancelable) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Derive and check the target element to see whether the mouse event needs to be permitted;\n\t\t// unless explicitly enabled, prevent non-touch click events from triggering actions,\n\t\t// to prevent ghost/doubleclicks.\n\t\tif (!this.needsClick(this.targetElement) || this.cancelNextClick) {\n\n\t\t\t// Prevent any user-added listeners declared on FastClick element from being fired.\n\t\t\tif (event.stopImmediatePropagation) {\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t} else {\n\n\t\t\t\t// Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)\n\t\t\t\tevent.propagationStopped = true;\n\t\t\t}\n\n\t\t\t// Cancel the event\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the mouse event is permitted, return true for the action to go through.\n\t\treturn true;\n\t};\n\n\n\t/**\n\t * On actual clicks, determine whether this is a touch-generated click, a click action occurring\n\t * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or\n\t * an actual click which should be permitted.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onClick = function(event) {\n\t\tvar permitted;\n\n\t\t// It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.\n\t\tif (this.trackingClick) {\n\t\t\tthis.targetElement = null;\n\t\t\tthis.trackingClick = false;\n\t\t\treturn true;\n\t\t}\n\n\t\t// Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.\n\t\tif (event.target.type === 'submit' && event.detail === 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\tpermitted = this.onMouse(event);\n\n\t\t// Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.\n\t\tif (!permitted) {\n\t\t\tthis.targetElement = null;\n\t\t}\n\n\t\t// If clicks are permitted, return true for the action to go through.\n\t\treturn permitted;\n\t};\n\n\n\t/**\n\t * Remove all FastClick's event listeners.\n\t *\n\t * @returns {void}\n\t */\n\tFastClick.prototype.destroy = function() {\n\t\tvar layer = this.layer;\n\n\t\tif (deviceIsAndroid) {\n\t\t\tlayer.removeEventListener('mouseover', this.onMouse, true);\n\t\t\tlayer.removeEventListener('mousedown', this.onMouse, true);\n\t\t\tlayer.removeEventListener('mouseup', this.onMouse, true);\n\t\t}\n\n\t\tlayer.removeEventListener('click', this.onClick, true);\n\t\tlayer.removeEventListener('touchstart', this.onTouchStart, false);\n\t\tlayer.removeEventListener('touchmove', this.onTouchMove, false);\n\t\tlayer.removeEventListener('touchend', this.onTouchEnd, false);\n\t\tlayer.removeEventListener('touchcancel', this.onTouchCancel, false);\n\t};\n\n\n\t/**\n\t * Check whether FastClick is needed.\n\t *\n\t * @param {Element} layer The layer to listen on\n\t */\n\tFastClick.notNeeded = function(layer) {\n\t\tvar metaViewport;\n\t\tvar chromeVersion;\n\t\tvar blackberryVersion;\n\t\tvar firefoxVersion;\n\n\t\t// Devices that don't support touch don't need FastClick\n\t\tif (typeof window.ontouchstart === 'undefined') {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Chrome version - zero for other browsers\n\t\tchromeVersion = +(/Chrome\\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];\n\n\t\tif (chromeVersion) {\n\n\t\t\tif (deviceIsAndroid) {\n\t\t\t\tmetaViewport = document.querySelector('meta[name=viewport]');\n\n\t\t\t\tif (metaViewport) {\n\t\t\t\t\t// Chrome on Android with user-scalable=\"no\" doesn't need FastClick (issue #89)\n\t\t\t\t\tif (metaViewport.content.indexOf('user-scalable=no') !== -1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t// Chrome 32 and above with width=device-width or less don't need FastClick\n\t\t\t\t\tif (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Chrome desktop doesn't need FastClick (issue #15)\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif (deviceIsBlackBerry10) {\n\t\t\tblackberryVersion = navigator.userAgent.match(/Version\\/([0-9]*)\\.([0-9]*)/);\n\n\t\t\t// BlackBerry 10.3+ does not require Fastclick library.\n\t\t\t// https://github.com/ftlabs/fastclick/issues/251\n\t\t\tif (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {\n\t\t\t\tmetaViewport = document.querySelector('meta[name=viewport]');\n\n\t\t\t\tif (metaViewport) {\n\t\t\t\t\t// user-scalable=no eliminates click delay.\n\t\t\t\t\tif (metaViewport.content.indexOf('user-scalable=no') !== -1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t// width=device-width (or less than device-width) eliminates click delay.\n\t\t\t\t\tif (document.documentElement.scrollWidth <= window.outerWidth) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)\n\t\tif (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Firefox version - zero for other browsers\n\t\tfirefoxVersion = +(/Firefox\\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];\n\n\t\tif (firefoxVersion >= 27) {\n\t\t\t// Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896\n\n\t\t\tmetaViewport = document.querySelector('meta[name=viewport]');\n\t\t\tif (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version\n\t\t// http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx\n\t\tif (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\n\t/**\n\t * Factory method for creating a FastClick object\n\t *\n\t * @param {Element} layer The layer to listen on\n\t * @param {Object} [options={}] The options to override the defaults\n\t */\n\tFastClick.attach = function(layer, options) {\n\t\treturn new FastClick(layer, options);\n\t};\n\n\n\tif (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine(function() {\n\t\t\treturn FastClick;\n\t\t});\n\t} else if (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = FastClick.attach;\n\t\tmodule.exports.FastClick = FastClick;\n\t} else {\n\t\twindow.FastClick = FastClick;\n\t}\n}());\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/fastclick/lib/fastclick.js\n **/","module.exports = __webpack_amd_options__;\r\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/buildin/amd-options.js\n ** module id = 2\n ** module chunks = 0\n **/","/**\n * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.7.2\n * Copyright (C) 2016 Oliver Nightingale\n * @license MIT\n */\n\n;(function(){\n\n/**\n * Convenience function for instantiating a new lunr index and configuring it\n * with the default pipeline functions and the passed config function.\n *\n * When using this convenience function a new index will be created with the\n * following functions already in the pipeline:\n *\n * lunr.StopWordFilter - filters out any stop words before they enter the\n * index\n *\n * lunr.stemmer - stems the tokens before entering the index.\n *\n * Example:\n *\n * var idx = lunr(function () {\n * this.field('title', 10)\n * this.field('tags', 100)\n * this.field('body')\n * \n * this.ref('cid')\n * \n * this.pipeline.add(function () {\n * // some custom pipeline function\n * })\n * \n * })\n *\n * @param {Function} config A function that will be called with the new instance\n * of the lunr.Index as both its context and first parameter. It can be used to\n * customize the instance of new lunr.Index.\n * @namespace\n * @module\n * @returns {lunr.Index}\n *\n */\nvar lunr = function (config) {\n var idx = new lunr.Index\n\n idx.pipeline.add(\n lunr.trimmer,\n lunr.stopWordFilter,\n lunr.stemmer\n )\n\n if (config) config.call(idx, idx)\n\n return idx\n}\n\nlunr.version = \"0.7.2\"\n/*!\n * lunr.utils\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * A namespace containing utils for the rest of the lunr library\n */\nlunr.utils = {}\n\n/**\n * Print a warning message to the console.\n *\n * @param {String} message The message to be printed.\n * @memberOf Utils\n */\nlunr.utils.warn = (function (global) {\n return function (message) {\n if (global.console && console.warn) {\n console.warn(message)\n }\n }\n})(this)\n\n/**\n * Convert an object to a string.\n *\n * In the case of `null` and `undefined` the function returns\n * the empty string, in all other cases the result of calling\n * `toString` on the passed object is returned.\n *\n * @param {Any} obj The object to convert to a string.\n * @return {String} string representation of the passed object.\n * @memberOf Utils\n */\nlunr.utils.asString = function (obj) {\n if (obj === void 0 || obj === null) {\n return \"\"\n } else {\n return obj.toString()\n }\n}\n/*!\n * lunr.EventEmitter\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.EventEmitter is an event emitter for lunr. It manages adding and removing event handlers and triggering events and their handlers.\n *\n * @constructor\n */\nlunr.EventEmitter = function () {\n this.events = {}\n}\n\n/**\n * Binds a handler function to a specific event(s).\n *\n * Can bind a single function to many different events in one call.\n *\n * @param {String} [eventName] The name(s) of events to bind this function to.\n * @param {Function} fn The function to call when an event is fired.\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.addListener = function () {\n var args = Array.prototype.slice.call(arguments),\n fn = args.pop(),\n names = args\n\n if (typeof fn !== \"function\") throw new TypeError (\"last argument must be a function\")\n\n names.forEach(function (name) {\n if (!this.hasHandler(name)) this.events[name] = []\n this.events[name].push(fn)\n }, this)\n}\n\n/**\n * Removes a handler function from a specific event.\n *\n * @param {String} eventName The name of the event to remove this function from.\n * @param {Function} fn The function to remove from an event.\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.removeListener = function (name, fn) {\n if (!this.hasHandler(name)) return\n\n var fnIndex = this.events[name].indexOf(fn)\n this.events[name].splice(fnIndex, 1)\n\n if (!this.events[name].length) delete this.events[name]\n}\n\n/**\n * Calls all functions bound to the given event.\n *\n * Additional data can be passed to the event handler as arguments to `emit`\n * after the event name.\n *\n * @param {String} eventName The name of the event to emit.\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.emit = function (name) {\n if (!this.hasHandler(name)) return\n\n var args = Array.prototype.slice.call(arguments, 1)\n\n this.events[name].forEach(function (fn) {\n fn.apply(undefined, args)\n })\n}\n\n/**\n * Checks whether a handler has ever been stored against an event.\n *\n * @param {String} eventName The name of the event to check.\n * @private\n * @memberOf EventEmitter\n */\nlunr.EventEmitter.prototype.hasHandler = function (name) {\n return name in this.events\n}\n\n/*!\n * lunr.tokenizer\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * A function for splitting a string into tokens ready to be inserted into\n * the search index. Uses `lunr.tokenizer.separator` to split strings, change\n * the value of this property to change how strings are split into tokens.\n *\n * @module\n * @param {String} obj The string to convert into tokens\n * @see lunr.tokenizer.separator\n * @returns {Array}\n */\nlunr.tokenizer = function (obj) {\n if (!arguments.length || obj == null || obj == undefined) return []\n if (Array.isArray(obj)) return obj.map(function (t) { return lunr.utils.asString(t).toLowerCase() })\n\n // TODO: This exists so that the deprecated property lunr.tokenizer.seperator can still be used. By\n // default it is set to false and so the correctly spelt lunr.tokenizer.separator is used unless\n // the user is using the old property to customise the tokenizer.\n //\n // This should be removed when version 1.0.0 is released.\n var separator = lunr.tokenizer.seperator || lunr.tokenizer.separator\n\n return obj.toString().trim().toLowerCase().split(separator)\n}\n\n/**\n * This property is legacy alias for lunr.tokenizer.separator to maintain backwards compatability.\n * When introduced the token was spelt incorrectly. It will remain until 1.0.0 when it will be removed,\n * all code should use the correctly spelt lunr.tokenizer.separator property instead.\n *\n * @static\n * @see lunr.tokenizer.separator\n * @deprecated since 0.7.2 will be removed in 1.0.0\n * @private\n * @see lunr.tokenizer\n */\nlunr.tokenizer.seperator = false\n\n/**\n * The sperator used to split a string into tokens. Override this property to change the behaviour of\n * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens.\n *\n * @static\n * @see lunr.tokenizer\n */\nlunr.tokenizer.separator = /[\\s\\-]+/\n\n/**\n * Loads a previously serialised tokenizer.\n *\n * A tokenizer function to be loaded must already be registered with lunr.tokenizer.\n * If the serialised tokenizer has not been registered then an error will be thrown.\n *\n * @param {String} label The label of the serialised tokenizer.\n * @returns {Function}\n * @memberOf tokenizer\n */\nlunr.tokenizer.load = function (label) {\n var fn = this.registeredFunctions[label]\n\n if (!fn) {\n throw new Error('Cannot load un-registered function: ' + label)\n }\n\n return fn\n}\n\nlunr.tokenizer.label = 'default'\n\nlunr.tokenizer.registeredFunctions = {\n 'default': lunr.tokenizer\n}\n\n/**\n * Register a tokenizer function.\n *\n * Functions that are used as tokenizers should be registered if they are to be used with a serialised index.\n *\n * Registering a function does not add it to an index, functions must still be associated with a specific index for them to be used when indexing and searching documents.\n *\n * @param {Function} fn The function to register.\n * @param {String} label The label to register this function with\n * @memberOf tokenizer\n */\nlunr.tokenizer.registerFunction = function (fn, label) {\n if (label in this.registeredFunctions) {\n lunr.utils.warn('Overwriting existing tokenizer: ' + label)\n }\n\n fn.label = label\n this.registeredFunctions[label] = fn\n}\n/*!\n * lunr.Pipeline\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Pipelines maintain an ordered list of functions to be applied to all\n * tokens in documents entering the search index and queries being ran against\n * the index.\n *\n * An instance of lunr.Index created with the lunr shortcut will contain a\n * pipeline with a stop word filter and an English language stemmer. Extra\n * functions can be added before or after either of these functions or these\n * default functions can be removed.\n *\n * When run the pipeline will call each function in turn, passing a token, the\n * index of that token in the original list of all tokens and finally a list of\n * all the original tokens.\n *\n * The output of functions in the pipeline will be passed to the next function\n * in the pipeline. To exclude a token from entering the index the function\n * should return undefined, the rest of the pipeline will not be called with\n * this token.\n *\n * For serialisation of pipelines to work, all functions used in an instance of\n * a pipeline should be registered with lunr.Pipeline. Registered functions can\n * then be loaded. If trying to load a serialised pipeline that uses functions\n * that are not registered an error will be thrown.\n *\n * If not planning on serialising the pipeline then registering pipeline functions\n * is not necessary.\n *\n * @constructor\n */\nlunr.Pipeline = function () {\n this._stack = []\n}\n\nlunr.Pipeline.registeredFunctions = {}\n\n/**\n * Register a function with the pipeline.\n *\n * Functions that are used in the pipeline should be registered if the pipeline\n * needs to be serialised, or a serialised pipeline needs to be loaded.\n *\n * Registering a function does not add it to a pipeline, functions must still be\n * added to instances of the pipeline for them to be used when running a pipeline.\n *\n * @param {Function} fn The function to check for.\n * @param {String} label The label to register this function with\n * @memberOf Pipeline\n */\nlunr.Pipeline.registerFunction = function (fn, label) {\n if (label in this.registeredFunctions) {\n lunr.utils.warn('Overwriting existing registered function: ' + label)\n }\n\n fn.label = label\n lunr.Pipeline.registeredFunctions[fn.label] = fn\n}\n\n/**\n * Warns if the function is not registered as a Pipeline function.\n *\n * @param {Function} fn The function to check for.\n * @private\n * @memberOf Pipeline\n */\nlunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {\n var isRegistered = fn.label && (fn.label in this.registeredFunctions)\n\n if (!isRegistered) {\n lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\\n', fn)\n }\n}\n\n/**\n * Loads a previously serialised pipeline.\n *\n * All functions to be loaded must already be registered with lunr.Pipeline.\n * If any function from the serialised data has not been registered then an\n * error will be thrown.\n *\n * @param {Object} serialised The serialised pipeline to load.\n * @returns {lunr.Pipeline}\n * @memberOf Pipeline\n */\nlunr.Pipeline.load = function (serialised) {\n var pipeline = new lunr.Pipeline\n\n serialised.forEach(function (fnName) {\n var fn = lunr.Pipeline.registeredFunctions[fnName]\n\n if (fn) {\n pipeline.add(fn)\n } else {\n throw new Error('Cannot load un-registered function: ' + fnName)\n }\n })\n\n return pipeline\n}\n\n/**\n * Adds new functions to the end of the pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {Function} functions Any number of functions to add to the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.add = function () {\n var fns = Array.prototype.slice.call(arguments)\n\n fns.forEach(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n this._stack.push(fn)\n }, this)\n}\n\n/**\n * Adds a single function after a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {Function} existingFn A function that already exists in the pipeline.\n * @param {Function} newFn The new function to add to the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.after = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n pos = pos + 1\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Adds a single function before a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {Function} existingFn A function that already exists in the pipeline.\n * @param {Function} newFn The new function to add to the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.before = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Removes a function from the pipeline.\n *\n * @param {Function} fn The function to remove from the pipeline.\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.remove = function (fn) {\n var pos = this._stack.indexOf(fn)\n if (pos == -1) {\n return\n }\n\n this._stack.splice(pos, 1)\n}\n\n/**\n * Runs the current list of functions that make up the pipeline against the\n * passed tokens.\n *\n * @param {Array} tokens The tokens to run through the pipeline.\n * @returns {Array}\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.run = function (tokens) {\n var out = [],\n tokenLength = tokens.length,\n stackLength = this._stack.length\n\n for (var i = 0; i < tokenLength; i++) {\n var token = tokens[i]\n\n for (var j = 0; j < stackLength; j++) {\n token = this._stack[j](token, i, tokens)\n if (token === void 0 || token === '') break\n };\n\n if (token !== void 0 && token !== '') out.push(token)\n };\n\n return out\n}\n\n/**\n * Resets the pipeline by removing any existing processors.\n *\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.reset = function () {\n this._stack = []\n}\n\n/**\n * Returns a representation of the pipeline ready for serialisation.\n *\n * Logs a warning if the function has not been registered.\n *\n * @returns {Array}\n * @memberOf Pipeline\n */\nlunr.Pipeline.prototype.toJSON = function () {\n return this._stack.map(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n\n return fn.label\n })\n}\n/*!\n * lunr.Vector\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Vectors implement vector related operations for\n * a series of elements.\n *\n * @constructor\n */\nlunr.Vector = function () {\n this._magnitude = null\n this.list = undefined\n this.length = 0\n}\n\n/**\n * lunr.Vector.Node is a simple struct for each node\n * in a lunr.Vector.\n *\n * @private\n * @param {Number} The index of the node in the vector.\n * @param {Object} The data at this node in the vector.\n * @param {lunr.Vector.Node} The node directly after this node in the vector.\n * @constructor\n * @memberOf Vector\n */\nlunr.Vector.Node = function (idx, val, next) {\n this.idx = idx\n this.val = val\n this.next = next\n}\n\n/**\n * Inserts a new value at a position in a vector.\n *\n * @param {Number} The index at which to insert a value.\n * @param {Object} The object to insert in the vector.\n * @memberOf Vector.\n */\nlunr.Vector.prototype.insert = function (idx, val) {\n this._magnitude = undefined;\n var list = this.list\n\n if (!list) {\n this.list = new lunr.Vector.Node (idx, val, list)\n return this.length++\n }\n\n if (idx < list.idx) {\n this.list = new lunr.Vector.Node (idx, val, list)\n return this.length++\n }\n\n var prev = list,\n next = list.next\n\n while (next != undefined) {\n if (idx < next.idx) {\n prev.next = new lunr.Vector.Node (idx, val, next)\n return this.length++\n }\n\n prev = next, next = next.next\n }\n\n prev.next = new lunr.Vector.Node (idx, val, next)\n return this.length++\n}\n\n/**\n * Calculates the magnitude of this vector.\n *\n * @returns {Number}\n * @memberOf Vector\n */\nlunr.Vector.prototype.magnitude = function () {\n if (this._magnitude) return this._magnitude\n var node = this.list,\n sumOfSquares = 0,\n val\n\n while (node) {\n val = node.val\n sumOfSquares += val * val\n node = node.next\n }\n\n return this._magnitude = Math.sqrt(sumOfSquares)\n}\n\n/**\n * Calculates the dot product of this vector and another vector.\n *\n * @param {lunr.Vector} otherVector The vector to compute the dot product with.\n * @returns {Number}\n * @memberOf Vector\n */\nlunr.Vector.prototype.dot = function (otherVector) {\n var node = this.list,\n otherNode = otherVector.list,\n dotProduct = 0\n\n while (node && otherNode) {\n if (node.idx < otherNode.idx) {\n node = node.next\n } else if (node.idx > otherNode.idx) {\n otherNode = otherNode.next\n } else {\n dotProduct += node.val * otherNode.val\n node = node.next\n otherNode = otherNode.next\n }\n }\n\n return dotProduct\n}\n\n/**\n * Calculates the cosine similarity between this vector and another\n * vector.\n *\n * @param {lunr.Vector} otherVector The other vector to calculate the\n * similarity with.\n * @returns {Number}\n * @memberOf Vector\n */\nlunr.Vector.prototype.similarity = function (otherVector) {\n return this.dot(otherVector) / (this.magnitude() * otherVector.magnitude())\n}\n/*!\n * lunr.SortedSet\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.SortedSets are used to maintain an array of uniq values in a sorted\n * order.\n *\n * @constructor\n */\nlunr.SortedSet = function () {\n this.length = 0\n this.elements = []\n}\n\n/**\n * Loads a previously serialised sorted set.\n *\n * @param {Array} serialisedData The serialised set to load.\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.load = function (serialisedData) {\n var set = new this\n\n set.elements = serialisedData\n set.length = serialisedData.length\n\n return set\n}\n\n/**\n * Inserts new items into the set in the correct position to maintain the\n * order.\n *\n * @param {Object} The objects to add to this set.\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.add = function () {\n var i, element\n\n for (i = 0; i < arguments.length; i++) {\n element = arguments[i]\n if (~this.indexOf(element)) continue\n this.elements.splice(this.locationFor(element), 0, element)\n }\n\n this.length = this.elements.length\n}\n\n/**\n * Converts this sorted set into an array.\n *\n * @returns {Array}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.toArray = function () {\n return this.elements.slice()\n}\n\n/**\n * Creates a new array with the results of calling a provided function on every\n * element in this sorted set.\n *\n * Delegates to Array.prototype.map and has the same signature.\n *\n * @param {Function} fn The function that is called on each element of the\n * set.\n * @param {Object} ctx An optional object that can be used as the context\n * for the function fn.\n * @returns {Array}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.map = function (fn, ctx) {\n return this.elements.map(fn, ctx)\n}\n\n/**\n * Executes a provided function once per sorted set element.\n *\n * Delegates to Array.prototype.forEach and has the same signature.\n *\n * @param {Function} fn The function that is called on each element of the\n * set.\n * @param {Object} ctx An optional object that can be used as the context\n * @memberOf SortedSet\n * for the function fn.\n */\nlunr.SortedSet.prototype.forEach = function (fn, ctx) {\n return this.elements.forEach(fn, ctx)\n}\n\n/**\n * Returns the index at which a given element can be found in the\n * sorted set, or -1 if it is not present.\n *\n * @param {Object} elem The object to locate in the sorted set.\n * @returns {Number}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.indexOf = function (elem) {\n var start = 0,\n end = this.elements.length,\n sectionLength = end - start,\n pivot = start + Math.floor(sectionLength / 2),\n pivotElem = this.elements[pivot]\n\n while (sectionLength > 1) {\n if (pivotElem === elem) return pivot\n\n if (pivotElem < elem) start = pivot\n if (pivotElem > elem) end = pivot\n\n sectionLength = end - start\n pivot = start + Math.floor(sectionLength / 2)\n pivotElem = this.elements[pivot]\n }\n\n if (pivotElem === elem) return pivot\n\n return -1\n}\n\n/**\n * Returns the position within the sorted set that an element should be\n * inserted at to maintain the current order of the set.\n *\n * This function assumes that the element to search for does not already exist\n * in the sorted set.\n *\n * @param {Object} elem The elem to find the position for in the set\n * @returns {Number}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.locationFor = function (elem) {\n var start = 0,\n end = this.elements.length,\n sectionLength = end - start,\n pivot = start + Math.floor(sectionLength / 2),\n pivotElem = this.elements[pivot]\n\n while (sectionLength > 1) {\n if (pivotElem < elem) start = pivot\n if (pivotElem > elem) end = pivot\n\n sectionLength = end - start\n pivot = start + Math.floor(sectionLength / 2)\n pivotElem = this.elements[pivot]\n }\n\n if (pivotElem > elem) return pivot\n if (pivotElem < elem) return pivot + 1\n}\n\n/**\n * Creates a new lunr.SortedSet that contains the elements in the intersection\n * of this set and the passed set.\n *\n * @param {lunr.SortedSet} otherSet The set to intersect with this set.\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.intersect = function (otherSet) {\n var intersectSet = new lunr.SortedSet,\n i = 0, j = 0,\n a_len = this.length, b_len = otherSet.length,\n a = this.elements, b = otherSet.elements\n\n while (true) {\n if (i > a_len - 1 || j > b_len - 1) break\n\n if (a[i] === b[j]) {\n intersectSet.add(a[i])\n i++, j++\n continue\n }\n\n if (a[i] < b[j]) {\n i++\n continue\n }\n\n if (a[i] > b[j]) {\n j++\n continue\n }\n };\n\n return intersectSet\n}\n\n/**\n * Makes a copy of this set\n *\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.clone = function () {\n var clone = new lunr.SortedSet\n\n clone.elements = this.toArray()\n clone.length = clone.elements.length\n\n return clone\n}\n\n/**\n * Creates a new lunr.SortedSet that contains the elements in the union\n * of this set and the passed set.\n *\n * @param {lunr.SortedSet} otherSet The set to union with this set.\n * @returns {lunr.SortedSet}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.union = function (otherSet) {\n var longSet, shortSet, unionSet\n\n if (this.length >= otherSet.length) {\n longSet = this, shortSet = otherSet\n } else {\n longSet = otherSet, shortSet = this\n }\n\n unionSet = longSet.clone()\n\n for(var i = 0, shortSetElements = shortSet.toArray(); i < shortSetElements.length; i++){\n unionSet.add(shortSetElements[i])\n }\n\n return unionSet\n}\n\n/**\n * Returns a representation of the sorted set ready for serialisation.\n *\n * @returns {Array}\n * @memberOf SortedSet\n */\nlunr.SortedSet.prototype.toJSON = function () {\n return this.toArray()\n}\n/*!\n * lunr.Index\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Index is object that manages a search index. It contains the indexes\n * and stores all the tokens and document lookups. It also provides the main\n * user facing API for the library.\n *\n * @constructor\n */\nlunr.Index = function () {\n this._fields = []\n this._ref = 'id'\n this.pipeline = new lunr.Pipeline\n this.documentStore = new lunr.Store\n this.tokenStore = new lunr.TokenStore\n this.corpusTokens = new lunr.SortedSet\n this.eventEmitter = new lunr.EventEmitter\n this.tokenizerFn = lunr.tokenizer\n\n this._idfCache = {}\n\n this.on('add', 'remove', 'update', (function () {\n this._idfCache = {}\n }).bind(this))\n}\n\n/**\n * Bind a handler to events being emitted by the index.\n *\n * The handler can be bound to many events at the same time.\n *\n * @param {String} [eventName] The name(s) of events to bind the function to.\n * @param {Function} fn The serialised set to load.\n * @memberOf Index\n */\nlunr.Index.prototype.on = function () {\n var args = Array.prototype.slice.call(arguments)\n return this.eventEmitter.addListener.apply(this.eventEmitter, args)\n}\n\n/**\n * Removes a handler from an event being emitted by the index.\n *\n * @param {String} eventName The name of events to remove the function from.\n * @param {Function} fn The serialised set to load.\n * @memberOf Index\n */\nlunr.Index.prototype.off = function (name, fn) {\n return this.eventEmitter.removeListener(name, fn)\n}\n\n/**\n * Loads a previously serialised index.\n *\n * Issues a warning if the index being imported was serialised\n * by a different version of lunr.\n *\n * @param {Object} serialisedData The serialised set to load.\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.load = function (serialisedData) {\n if (serialisedData.version !== lunr.version) {\n lunr.utils.warn('version mismatch: current ' + lunr.version + ' importing ' + serialisedData.version)\n }\n\n var idx = new this\n\n idx._fields = serialisedData.fields\n idx._ref = serialisedData.ref\n\n idx.tokenizer(lunr.tokenizer.load(serialisedData.tokenizer))\n idx.documentStore = lunr.Store.load(serialisedData.documentStore)\n idx.tokenStore = lunr.TokenStore.load(serialisedData.tokenStore)\n idx.corpusTokens = lunr.SortedSet.load(serialisedData.corpusTokens)\n idx.pipeline = lunr.Pipeline.load(serialisedData.pipeline)\n\n return idx\n}\n\n/**\n * Adds a field to the list of fields that will be searchable within documents\n * in the index.\n *\n * An optional boost param can be passed to affect how much tokens in this field\n * rank in search results, by default the boost value is 1.\n *\n * Fields should be added before any documents are added to the index, fields\n * that are added after documents are added to the index will only apply to new\n * documents added to the index.\n *\n * @param {String} fieldName The name of the field within the document that\n * should be indexed\n * @param {Number} boost An optional boost that can be applied to terms in this\n * field.\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.prototype.field = function (fieldName, opts) {\n var opts = opts || {},\n field = { name: fieldName, boost: opts.boost || 1 }\n\n this._fields.push(field)\n return this\n}\n\n/**\n * Sets the property used to uniquely identify documents added to the index,\n * by default this property is 'id'.\n *\n * This should only be changed before adding documents to the index, changing\n * the ref property without resetting the index can lead to unexpected results.\n *\n * The value of ref can be of any type but it _must_ be stably comparable and\n * orderable.\n *\n * @param {String} refName The property to use to uniquely identify the\n * documents in the index.\n * @param {Boolean} emitEvent Whether to emit add events, defaults to true\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.prototype.ref = function (refName) {\n this._ref = refName\n return this\n}\n\n/**\n * Sets the tokenizer used for this index.\n *\n * By default the index will use the default tokenizer, lunr.tokenizer. The tokenizer\n * should only be changed before adding documents to the index. Changing the tokenizer\n * without re-building the index can lead to unexpected results.\n *\n * @param {Function} fn The function to use as a tokenizer.\n * @returns {lunr.Index}\n * @memberOf Index\n */\nlunr.Index.prototype.tokenizer = function (fn) {\n var isRegistered = fn.label && (fn.label in lunr.tokenizer.registeredFunctions)\n\n if (!isRegistered) {\n lunr.utils.warn('Function is not a registered tokenizer. This may cause problems when serialising the index')\n }\n\n this.tokenizerFn = fn\n return this\n}\n\n/**\n * Add a document to the index.\n *\n * This is the way new documents enter the index, this function will run the\n * fields from the document through the index's pipeline and then add it to\n * the index, it will then show up in search results.\n *\n * An 'add' event is emitted with the document that has been added and the index\n * the document has been added to. This event can be silenced by passing false\n * as the second argument to add.\n *\n * @param {Object} doc The document to add to the index.\n * @param {Boolean} emitEvent Whether or not to emit events, default true.\n * @memberOf Index\n */\nlunr.Index.prototype.add = function (doc, emitEvent) {\n var docTokens = {},\n allDocumentTokens = new lunr.SortedSet,\n docRef = doc[this._ref],\n emitEvent = emitEvent === undefined ? true : emitEvent\n\n this._fields.forEach(function (field) {\n var fieldTokens = this.pipeline.run(this.tokenizerFn(doc[field.name]))\n\n docTokens[field.name] = fieldTokens\n\n for (var i = 0; i < fieldTokens.length; i++) {\n var token = fieldTokens[i]\n allDocumentTokens.add(token)\n this.corpusTokens.add(token)\n }\n }, this)\n\n this.documentStore.set(docRef, allDocumentTokens)\n\n for (var i = 0; i < allDocumentTokens.length; i++) {\n var token = allDocumentTokens.elements[i]\n var tf = 0;\n\n for (var j = 0; j < this._fields.length; j++){\n var field = this._fields[j]\n var fieldTokens = docTokens[field.name]\n var fieldLength = fieldTokens.length\n\n if (!fieldLength) continue\n\n var tokenCount = 0\n for (var k = 0; k < fieldLength; k++){\n if (fieldTokens[k] === token){\n tokenCount++\n }\n }\n\n tf += (tokenCount / fieldLength * field.boost)\n }\n\n this.tokenStore.add(token, { ref: docRef, tf: tf })\n };\n\n if (emitEvent) this.eventEmitter.emit('add', doc, this)\n}\n\n/**\n * Removes a document from the index.\n *\n * To make sure documents no longer show up in search results they can be\n * removed from the index using this method.\n *\n * The document passed only needs to have the same ref property value as the\n * document that was added to the index, they could be completely different\n * objects.\n *\n * A 'remove' event is emitted with the document that has been removed and the index\n * the document has been removed from. This event can be silenced by passing false\n * as the second argument to remove.\n *\n * @param {Object} doc The document to remove from the index.\n * @param {Boolean} emitEvent Whether to emit remove events, defaults to true\n * @memberOf Index\n */\nlunr.Index.prototype.remove = function (doc, emitEvent) {\n var docRef = doc[this._ref],\n emitEvent = emitEvent === undefined ? true : emitEvent\n\n if (!this.documentStore.has(docRef)) return\n\n var docTokens = this.documentStore.get(docRef)\n\n this.documentStore.remove(docRef)\n\n docTokens.forEach(function (token) {\n this.tokenStore.remove(token, docRef)\n }, this)\n\n if (emitEvent) this.eventEmitter.emit('remove', doc, this)\n}\n\n/**\n * Updates a document in the index.\n *\n * When a document contained within the index gets updated, fields changed,\n * added or removed, to make sure it correctly matched against search queries,\n * it should be updated in the index.\n *\n * This method is just a wrapper around `remove` and `add`\n *\n * An 'update' event is emitted with the document that has been updated and the index.\n * This event can be silenced by passing false as the second argument to update. Only\n * an update event will be fired, the 'add' and 'remove' events of the underlying calls\n * are silenced.\n *\n * @param {Object} doc The document to update in the index.\n * @param {Boolean} emitEvent Whether to emit update events, defaults to true\n * @see Index.prototype.remove\n * @see Index.prototype.add\n * @memberOf Index\n */\nlunr.Index.prototype.update = function (doc, emitEvent) {\n var emitEvent = emitEvent === undefined ? true : emitEvent\n\n this.remove(doc, false)\n this.add(doc, false)\n\n if (emitEvent) this.eventEmitter.emit('update', doc, this)\n}\n\n/**\n * Calculates the inverse document frequency for a token within the index.\n *\n * @param {String} token The token to calculate the idf of.\n * @see Index.prototype.idf\n * @private\n * @memberOf Index\n */\nlunr.Index.prototype.idf = function (term) {\n var cacheKey = \"@\" + term\n if (Object.prototype.hasOwnProperty.call(this._idfCache, cacheKey)) return this._idfCache[cacheKey]\n\n var documentFrequency = this.tokenStore.count(term),\n idf = 1\n\n if (documentFrequency > 0) {\n idf = 1 + Math.log(this.documentStore.length / documentFrequency)\n }\n\n return this._idfCache[cacheKey] = idf\n}\n\n/**\n * Searches the index using the passed query.\n *\n * Queries should be a string, multiple words are allowed and will lead to an\n * AND based query, e.g. `idx.search('foo bar')` will run a search for\n * documents containing both 'foo' and 'bar'.\n *\n * All query tokens are passed through the same pipeline that document tokens\n * are passed through, so any language processing involved will be run on every\n * query term.\n *\n * Each query term is expanded, so that the term 'he' might be expanded to\n * 'hello' and 'help' if those terms were already included in the index.\n *\n * Matching documents are returned as an array of objects, each object contains\n * the matching document ref, as set for this index, and the similarity score\n * for this document against the query.\n *\n * @param {String} query The query to search the index with.\n * @returns {Object}\n * @see Index.prototype.idf\n * @see Index.prototype.documentVector\n * @memberOf Index\n */\nlunr.Index.prototype.search = function (query) {\n var queryTokens = this.pipeline.run(this.tokenizerFn(query)),\n queryVector = new lunr.Vector,\n documentSets = [],\n fieldBoosts = this._fields.reduce(function (memo, f) { return memo + f.boost }, 0)\n\n var hasSomeToken = queryTokens.some(function (token) {\n return this.tokenStore.has(token)\n }, this)\n\n if (!hasSomeToken) return []\n\n queryTokens\n .forEach(function (token, i, tokens) {\n var tf = 1 / tokens.length * this._fields.length * fieldBoosts,\n self = this\n\n var set = this.tokenStore.expand(token).reduce(function (memo, key) {\n var pos = self.corpusTokens.indexOf(key),\n idf = self.idf(key),\n similarityBoost = 1,\n set = new lunr.SortedSet\n\n // if the expanded key is not an exact match to the token then\n // penalise the score for this key by how different the key is\n // to the token.\n if (key !== token) {\n var diff = Math.max(3, key.length - token.length)\n similarityBoost = 1 / Math.log(diff)\n }\n\n // calculate the query tf-idf score for this token\n // applying an similarityBoost to ensure exact matches\n // these rank higher than expanded terms\n if (pos > -1) queryVector.insert(pos, tf * idf * similarityBoost)\n\n // add all the documents that have this key into a set\n // ensuring that the type of key is preserved\n var matchingDocuments = self.tokenStore.get(key),\n refs = Object.keys(matchingDocuments),\n refsLen = refs.length\n\n for (var i = 0; i < refsLen; i++) {\n set.add(matchingDocuments[refs[i]].ref)\n }\n\n return memo.union(set)\n }, new lunr.SortedSet)\n\n documentSets.push(set)\n }, this)\n\n var documentSet = documentSets.reduce(function (memo, set) {\n return memo.intersect(set)\n })\n\n return documentSet\n .map(function (ref) {\n return { ref: ref, score: queryVector.similarity(this.documentVector(ref)) }\n }, this)\n .sort(function (a, b) {\n return b.score - a.score\n })\n}\n\n/**\n * Generates a vector containing all the tokens in the document matching the\n * passed documentRef.\n *\n * The vector contains the tf-idf score for each token contained in the\n * document with the passed documentRef. The vector will contain an element\n * for every token in the indexes corpus, if the document does not contain that\n * token the element will be 0.\n *\n * @param {Object} documentRef The ref to find the document with.\n * @returns {lunr.Vector}\n * @private\n * @memberOf Index\n */\nlunr.Index.prototype.documentVector = function (documentRef) {\n var documentTokens = this.documentStore.get(documentRef),\n documentTokensLength = documentTokens.length,\n documentVector = new lunr.Vector\n\n for (var i = 0; i < documentTokensLength; i++) {\n var token = documentTokens.elements[i],\n tf = this.tokenStore.get(token)[documentRef].tf,\n idf = this.idf(token)\n\n documentVector.insert(this.corpusTokens.indexOf(token), tf * idf)\n };\n\n return documentVector\n}\n\n/**\n * Returns a representation of the index ready for serialisation.\n *\n * @returns {Object}\n * @memberOf Index\n */\nlunr.Index.prototype.toJSON = function () {\n return {\n version: lunr.version,\n fields: this._fields,\n ref: this._ref,\n tokenizer: this.tokenizerFn.label,\n documentStore: this.documentStore.toJSON(),\n tokenStore: this.tokenStore.toJSON(),\n corpusTokens: this.corpusTokens.toJSON(),\n pipeline: this.pipeline.toJSON()\n }\n}\n\n/**\n * Applies a plugin to the current index.\n *\n * A plugin is a function that is called with the index as its context.\n * Plugins can be used to customise or extend the behaviour the index\n * in some way. A plugin is just a function, that encapsulated the custom\n * behaviour that should be applied to the index.\n *\n * The plugin function will be called with the index as its argument, additional\n * arguments can also be passed when calling use. The function will be called\n * with the index as its context.\n *\n * Example:\n *\n * var myPlugin = function (idx, arg1, arg2) {\n * // `this` is the index to be extended\n * // apply any extensions etc here.\n * }\n *\n * var idx = lunr(function () {\n * this.use(myPlugin, 'arg1', 'arg2')\n * })\n *\n * @param {Function} plugin The plugin to apply.\n * @memberOf Index\n */\nlunr.Index.prototype.use = function (plugin) {\n var args = Array.prototype.slice.call(arguments, 1)\n args.unshift(this)\n plugin.apply(this, args)\n}\n/*!\n * lunr.Store\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.Store is a simple key-value store used for storing sets of tokens for\n * documents stored in index.\n *\n * @constructor\n * @module\n */\nlunr.Store = function () {\n this.store = {}\n this.length = 0\n}\n\n/**\n * Loads a previously serialised store\n *\n * @param {Object} serialisedData The serialised store to load.\n * @returns {lunr.Store}\n * @memberOf Store\n */\nlunr.Store.load = function (serialisedData) {\n var store = new this\n\n store.length = serialisedData.length\n store.store = Object.keys(serialisedData.store).reduce(function (memo, key) {\n memo[key] = lunr.SortedSet.load(serialisedData.store[key])\n return memo\n }, {})\n\n return store\n}\n\n/**\n * Stores the given tokens in the store against the given id.\n *\n * @param {Object} id The key used to store the tokens against.\n * @param {Object} tokens The tokens to store against the key.\n * @memberOf Store\n */\nlunr.Store.prototype.set = function (id, tokens) {\n if (!this.has(id)) this.length++\n this.store[id] = tokens\n}\n\n/**\n * Retrieves the tokens from the store for a given key.\n *\n * @param {Object} id The key to lookup and retrieve from the store.\n * @returns {Object}\n * @memberOf Store\n */\nlunr.Store.prototype.get = function (id) {\n return this.store[id]\n}\n\n/**\n * Checks whether the store contains a key.\n *\n * @param {Object} id The id to look up in the store.\n * @returns {Boolean}\n * @memberOf Store\n */\nlunr.Store.prototype.has = function (id) {\n return id in this.store\n}\n\n/**\n * Removes the value for a key in the store.\n *\n * @param {Object} id The id to remove from the store.\n * @memberOf Store\n */\nlunr.Store.prototype.remove = function (id) {\n if (!this.has(id)) return\n\n delete this.store[id]\n this.length--\n}\n\n/**\n * Returns a representation of the store ready for serialisation.\n *\n * @returns {Object}\n * @memberOf Store\n */\nlunr.Store.prototype.toJSON = function () {\n return {\n store: this.store,\n length: this.length\n }\n}\n\n/*!\n * lunr.stemmer\n * Copyright (C) 2016 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n/**\n * lunr.stemmer is an english language stemmer, this is a JavaScript\n * implementation of the PorterStemmer taken from http://tartarus.org/~martin\n *\n * @module\n * @param {String} str The string to stem\n * @returns {String}\n * @see lunr.Pipeline\n */\nlunr.stemmer = (function(){\n var step2list = {\n \"ational\" : \"ate\",\n \"tional\" : \"tion\",\n \"enci\" : \"ence\",\n \"anci\" : \"ance\",\n \"izer\" : \"ize\",\n \"bli\" : \"ble\",\n \"alli\" : \"al\",\n \"entli\" : \"ent\",\n \"eli\" : \"e\",\n \"ousli\" : \"ous\",\n \"ization\" : \"ize\",\n \"ation\" : \"ate\",\n \"ator\" : \"ate\",\n \"alism\" : \"al\",\n \"iveness\" : \"ive\",\n \"fulness\" : \"ful\",\n \"ousness\" : \"ous\",\n \"aliti\" : \"al\",\n \"iviti\" : \"ive\",\n \"biliti\" : \"ble\",\n \"logi\" : \"log\"\n },\n\n step3list = {\n \"icate\" : \"ic\",\n \"ative\" : \"\",\n \"alize\" : \"al\",\n \"iciti\" : \"ic\",\n \"ical\" : \"ic\",\n \"ful\" : \"\",\n \"ness\" : \"\"\n },\n\n c = \"[^aeiou]\", // consonant\n v = \"[aeiouy]\", // vowel\n C = c + \"[^aeiouy]*\", // consonant sequence\n V = v + \"[aeiou]*\", // vowel sequence\n\n mgr0 = \"^(\" + C + \")?\" + V + C, // [C]VC... is m>0\n meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\", // [C]VC[V] is m=1\n mgr1 = \"^(\" + C + \")?\" + V + C + V + C, // [C]VCVC... is m>1\n s_v = \"^(\" + C + \")?\" + v; // vowel in stem\n\n var re_mgr0 = new RegExp(mgr0);\n var re_mgr1 = new RegExp(mgr1);\n var re_meq1 = new RegExp(meq1);\n var re_s_v = new RegExp(s_v);\n\n var re_1a = /^(.+?)(ss|i)es$/;\n var re2_1a = /^(.+?)([^s])s$/;\n var re_1b = /^(.+?)eed$/;\n var re2_1b = /^(.+?)(ed|ing)$/;\n var re_1b_2 = /.$/;\n var re2_1b_2 = /(at|bl|iz)$/;\n var re3_1b_2 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n var re4_1b_2 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var re_1c = /^(.+?[^aeiou])y$/;\n var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n\n var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n\n var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n var re2_4 = /^(.+?)(s|t)(ion)$/;\n\n var re_5 = /^(.+?)e$/;\n var re_5_1 = /ll$/;\n var re3_5 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var porterStemmer = function porterStemmer(w) {\n var stem,\n suffix,\n firstch,\n re,\n re2,\n re3,\n re4;\n\n if (w.length < 3) { return w; }\n\n firstch = w.substr(0,1);\n if (firstch == \"y\") {\n w = firstch.toUpperCase() + w.substr(1);\n }\n\n // Step 1a\n re = re_1a\n re2 = re2_1a;\n\n if (re.test(w)) { w = w.replace(re,\"$1$2\"); }\n else if (re2.test(w)) { w = w.replace(re2,\"$1$2\"); }\n\n // Step 1b\n re = re_1b;\n re2 = re2_1b;\n if (re.test(w)) {\n var fp = re.exec(w);\n re = re_mgr0;\n if (re.test(fp[1])) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1];\n re2 = re_s_v;\n if (re2.test(stem)) {\n w = stem;\n re2 = re2_1b_2;\n re3 = re3_1b_2;\n re4 = re4_1b_2;\n if (re2.test(w)) { w = w + \"e\"; }\n else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,\"\"); }\n else if (re4.test(w)) { w = w + \"e\"; }\n }\n }\n\n // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say)\n re = re_1c;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n w = stem + \"i\";\n }\n\n // Step 2\n re = re_2;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step2list[suffix];\n }\n }\n\n // Step 3\n re = re_3;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step3list[suffix];\n }\n }\n\n // Step 4\n re = re_4;\n re2 = re2_4;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n if (re.test(stem)) {\n w = stem;\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1] + fp[2];\n re2 = re_mgr1;\n if (re2.test(stem)) {\n w = stem;\n }\n }\n\n // Step 5\n re = re_5;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n re2 = re_meq1;\n re3 = re3_5;\n if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) {\n w = stem;\n }\n }\n\n re = re_5_1;\n re2 = re_mgr1;\n if (re.test(w) && re2.test(w)) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n\n // and turn initial Y back to y\n\n if (firstch == \"y\") {\n w = firstch.toLowerCase() + w.substr(1);\n }\n\n return w;\n };\n\n return porterStemmer;\n})();\n\nlunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')\n/*!\n * lunr.stopWordFilter\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.generateStopWordFilter builds a stopWordFilter function from the provided\n * list of stop words.\n *\n * The built in lunr.stopWordFilter is built using this generator and can be used\n * to generate custom stopWordFilters for applications or non English languages.\n *\n * @module\n * @param {Array} token The token to pass through the filter\n * @returns {Function}\n * @see lunr.Pipeline\n * @see lunr.stopWordFilter\n */\nlunr.generateStopWordFilter = function (stopWords) {\n var words = stopWords.reduce(function (memo, stopWord) {\n memo[stopWord] = stopWord\n return memo\n }, {})\n\n return function (token) {\n if (token && words[token] !== token) return token\n }\n}\n\n/**\n * lunr.stopWordFilter is an English language stop word list filter, any words\n * contained in the list will not be passed through the filter.\n *\n * This is intended to be used in the Pipeline. If the token does not pass the\n * filter then undefined will be returned.\n *\n * @module\n * @param {String} token The token to pass through the filter\n * @returns {String}\n * @see lunr.Pipeline\n */\nlunr.stopWordFilter = lunr.generateStopWordFilter([\n 'a',\n 'able',\n 'about',\n 'across',\n 'after',\n 'all',\n 'almost',\n 'also',\n 'am',\n 'among',\n 'an',\n 'and',\n 'any',\n 'are',\n 'as',\n 'at',\n 'be',\n 'because',\n 'been',\n 'but',\n 'by',\n 'can',\n 'cannot',\n 'could',\n 'dear',\n 'did',\n 'do',\n 'does',\n 'either',\n 'else',\n 'ever',\n 'every',\n 'for',\n 'from',\n 'get',\n 'got',\n 'had',\n 'has',\n 'have',\n 'he',\n 'her',\n 'hers',\n 'him',\n 'his',\n 'how',\n 'however',\n 'i',\n 'if',\n 'in',\n 'into',\n 'is',\n 'it',\n 'its',\n 'just',\n 'least',\n 'let',\n 'like',\n 'likely',\n 'may',\n 'me',\n 'might',\n 'most',\n 'must',\n 'my',\n 'neither',\n 'no',\n 'nor',\n 'not',\n 'of',\n 'off',\n 'often',\n 'on',\n 'only',\n 'or',\n 'other',\n 'our',\n 'own',\n 'rather',\n 'said',\n 'say',\n 'says',\n 'she',\n 'should',\n 'since',\n 'so',\n 'some',\n 'than',\n 'that',\n 'the',\n 'their',\n 'them',\n 'then',\n 'there',\n 'these',\n 'they',\n 'this',\n 'tis',\n 'to',\n 'too',\n 'twas',\n 'us',\n 'wants',\n 'was',\n 'we',\n 'were',\n 'what',\n 'when',\n 'where',\n 'which',\n 'while',\n 'who',\n 'whom',\n 'why',\n 'will',\n 'with',\n 'would',\n 'yet',\n 'you',\n 'your'\n])\n\nlunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')\n/*!\n * lunr.trimmer\n * Copyright (C) 2016 Oliver Nightingale\n */\n\n/**\n * lunr.trimmer is a pipeline function for trimming non word\n * characters from the begining and end of tokens before they\n * enter the index.\n *\n * This implementation may not work correctly for non latin\n * characters and should either be removed or adapted for use\n * with languages with non-latin characters.\n *\n * @module\n * @param {String} token The token to pass through the filter\n * @returns {String}\n * @see lunr.Pipeline\n */\nlunr.trimmer = function (token) {\n return token.replace(/^\\W+/, '').replace(/\\W+$/, '')\n}\n\nlunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')\n/*!\n * lunr.stemmer\n * Copyright (C) 2016 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n/**\n * lunr.TokenStore is used for efficient storing and lookup of the reverse\n * index of token to document ref.\n *\n * @constructor\n */\nlunr.TokenStore = function () {\n this.root = { docs: {} }\n this.length = 0\n}\n\n/**\n * Loads a previously serialised token store\n *\n * @param {Object} serialisedData The serialised token store to load.\n * @returns {lunr.TokenStore}\n * @memberOf TokenStore\n */\nlunr.TokenStore.load = function (serialisedData) {\n var store = new this\n\n store.root = serialisedData.root\n store.length = serialisedData.length\n\n return store\n}\n\n/**\n * Adds a new token doc pair to the store.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to store the doc under\n * @param {Object} doc The doc to store against the token\n * @param {Object} root An optional node at which to start looking for the\n * correct place to enter the doc, by default the root of this lunr.TokenStore\n * is used.\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.add = function (token, doc, root) {\n var root = root || this.root,\n key = token.charAt(0),\n rest = token.slice(1)\n\n if (!(key in root)) root[key] = {docs: {}}\n\n if (rest.length === 0) {\n root[key].docs[doc.ref] = doc\n this.length += 1\n return\n } else {\n return this.add(rest, doc, root[key])\n }\n}\n\n/**\n * Checks whether this key is contained within this lunr.TokenStore.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to check for\n * @param {Object} root An optional node at which to start\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.has = function (token) {\n if (!token) return false\n\n var node = this.root\n\n for (var i = 0; i < token.length; i++) {\n if (!node[token.charAt(i)]) return false\n\n node = node[token.charAt(i)]\n }\n\n return true\n}\n\n/**\n * Retrieve a node from the token store for a given token.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to get the node for.\n * @param {Object} root An optional node at which to start.\n * @returns {Object}\n * @see TokenStore.prototype.get\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.getNode = function (token) {\n if (!token) return {}\n\n var node = this.root\n\n for (var i = 0; i < token.length; i++) {\n if (!node[token.charAt(i)]) return {}\n\n node = node[token.charAt(i)]\n }\n\n return node\n}\n\n/**\n * Retrieve the documents for a node for the given token.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to get the documents for.\n * @param {Object} root An optional node at which to start.\n * @returns {Object}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.get = function (token, root) {\n return this.getNode(token, root).docs || {}\n}\n\nlunr.TokenStore.prototype.count = function (token, root) {\n return Object.keys(this.get(token, root)).length\n}\n\n/**\n * Remove the document identified by ref from the token in the store.\n *\n * By default this function starts at the root of the current store, however\n * it can start at any node of any token store if required.\n *\n * @param {String} token The token to get the documents for.\n * @param {String} ref The ref of the document to remove from this token.\n * @param {Object} root An optional node at which to start.\n * @returns {Object}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.remove = function (token, ref) {\n if (!token) return\n var node = this.root\n\n for (var i = 0; i < token.length; i++) {\n if (!(token.charAt(i) in node)) return\n node = node[token.charAt(i)]\n }\n\n delete node.docs[ref]\n}\n\n/**\n * Find all the possible suffixes of the passed token using tokens\n * currently in the store.\n *\n * @param {String} token The token to expand.\n * @returns {Array}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.expand = function (token, memo) {\n var root = this.getNode(token),\n docs = root.docs || {},\n memo = memo || []\n\n if (Object.keys(docs).length) memo.push(token)\n\n Object.keys(root)\n .forEach(function (key) {\n if (key === 'docs') return\n\n memo.concat(this.expand(token + key, memo))\n }, this)\n\n return memo\n}\n\n/**\n * Returns a representation of the token store ready for serialisation.\n *\n * @returns {Object}\n * @memberOf TokenStore\n */\nlunr.TokenStore.prototype.toJSON = function () {\n return {\n root: this.root,\n length: this.length\n }\n}\n\n /**\n * export the module via AMD, CommonJS or as a browser global\n * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js\n */\n ;(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(factory)\n } else if (typeof exports === 'object') {\n /**\n * Node. Does not work with strict CommonJS, but\n * only CommonJS-like enviroments that support module.exports,\n * like Node.\n */\n module.exports = factory()\n } else {\n // Browser globals (root is window)\n root.lunr = factory()\n }\n }(this, function () {\n /**\n * Just return a value to define the module export.\n * This example returns an object, but the module\n * can return a function as the exported value.\n */\n return lunr\n }))\n})();\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/lunr/lunr.js\n **/","/*\n * Copyright (c) 2016 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Github Source\n * ------------------------------------------------------------------------- */\n\nexport default\nclass GithubSourceFacts {\n\n /**\n * Constructor.\n *\n * @constructor\n * @param {object} storage - Accessor to storage, eg. `window.sessionStorage`\n * @param {string} repoUrl - URL to Github repository\n */\n constructor(storage, repoUrl) {\n this.storage = storage\n this.storageKey = \"github-source-facts\"\n this.apiRepoUrl = repoUrl.replace(\"github.com/\", \"api.github.com/repos/\")\n }\n\n /**\n * Retrieve stars and fork counts for the repository before invoking\n * `GithubSourceFacts.paint`.\n *\n * @return {void}\n */\n initialize() {\n const facts = this.storage.getItem(this.storageKey)\n\n // Retrieve the facts, then invoke paint\n if (!facts) {\n fetch(this.apiRepoUrl)\n .then(response => {\n return response.json()\n })\n .then(data => {\n const repoFacts = {\n stars: data.stargazers_count,\n forks: data.forks_count\n }\n\n this.storage.setItem(this.storageKey, JSON.stringify(repoFacts))\n\n GithubSourceFacts.paint(repoFacts)\n })\n .catch(() => {\n // console.log(\"parsing failed\", ex)\n })\n // Use the cached facts\n } else {\n GithubSourceFacts.paint(JSON.parse(facts))\n }\n }\n\n /**\n * Populates `.md-source__facts` with star and fork counts.\n *\n * @param {integer} options.stars - Stars count for the repo\n * @param {integer} options.forks - Fork count for the repo\n * @return {void}\n */\n static paint({ stars, forks }) {\n const lists = document.querySelectorAll(\".md-source__facts\"); // TODO 2x list in drawer and header\n\n [].forEach.call(lists, list => {\n\n let li = document.createElement(\"li\")\n li.className = \"md-source__fact md-source__fact--hidden\"\n li.innerText = `${stars} Stars`\n list.appendChild(li)\n\n setTimeout(lix => {\n lix.classList.remove(\"md-source__fact--hidden\")\n }, 100, li)\n\n li = document.createElement(\"li\")\n li.className = \"md-source__fact md-source__fact--hidden\"\n li.innerText = `${forks} Forks`\n list.appendChild(li)\n\n setTimeout(lix => {\n lix.classList.remove(\"md-source__fact--hidden\")\n }, 500, li)\n })\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/components/GithubSourceFacts.js\n **/","/*\n * Copyright (c) 2016 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport Sidebar from \"./Material/Sidebar\"\n\n/* ----------------------------------------------------------------------------\n * Material application\n * ------------------------------------------------------------------------- */\n\nexport default\nclass Material {\n\n /**\n * Constructor\n *\n * @constructor\n */\n // constructor() {\n //\n // }\n\n /**\n * @return {void}\n */\n initialize() {\n\n // class AnchorMarker extends PageYOffsetListener\n // class SidebarConstrainer extends PageYOffsetListener\n\n // MatchMedia!?\n\n const width = window.matchMedia(\"(min-width: 1200px)\")\n\n // separate function in application.js --> initSidebar()\n const sidebar = new Sidebar.Position(\"[data-md-sidebar=primary]\")\n const handler = function() {\n if (width.matches) {\n sidebar.listen()\n } else {\n sidebar.unlisten()\n }\n }\n handler() // check listen!\n\n const toc = new Sidebar.Position(\"[data-md-sidebar=secondary]\")\n toc.listen()\n\n window.addEventListener(\"resize\", handler) // TODO: orientation change etc...\n\n const marker =\n new Sidebar.Marker(\"[data-md-sidebar=secondary] .md-nav__link\")\n marker.listen()\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/components/Material.js\n **/","/*\n * Copyright (c) 2016 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport Marker from \"./Sidebar/Marker\"\nimport Position from \"./Sidebar/Position\"\n\n/* ----------------------------------------------------------------------------\n * Definition\n * ------------------------------------------------------------------------- */\n\nexport default {\n Marker,\n Position\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/components/Material/Sidebar.js\n **/","/*\n * Copyright (c) 2016 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport Abstract from \"./Abstract\"\n\n/* ----------------------------------------------------------------------------\n * Definition\n * ------------------------------------------------------------------------- */\n\nexport default class Marker extends Abstract {\n\n /**\n * Mark anchors within the table of contents above current page y-offset\n *\n * @constructor\n * @param {(string|NodeList)} els - Selector or HTML elements\n */\n constructor(els) {\n super()\n\n /* Resolve elements */\n this.els_ = (typeof els === \"string\")\n ? document.querySelectorAll(els)\n : els\n\n /* Initialize index and page y-offset */\n this.index_ = 0\n this.offset_ = window.pageYOffset\n\n /* Index anchor nodes for fast lookup */\n this.anchors_ = [].map.call(this.els_, el => {\n return document.querySelector(el.hash)\n })\n }\n\n /**\n * Update anchor states\n *\n * @param {Event} ev - Event (omitted)\n */\n update() {\n const offset = window.pageYOffset\n\n /* Scroll direction is down */\n if (this.offset_ <= offset) {\n for (let i = this.index_ + 1; i < this.els_.length; i++) {\n if (this.anchors_[i].offsetTop <= offset) {\n if (i > 0)\n this.els_[i - 1].dataset.mdMarked = \"\"\n this.index_ = i\n } else {\n break\n }\n }\n\n /* Scroll direction is up */\n } else {\n for (let i = this.index_; i >= 0; i--) {\n if (this.anchors_[i].offsetTop > offset) {\n if (i > 0)\n delete this.els_[i - 1].dataset.mdMarked\n } else {\n this.index_ = i\n break\n }\n }\n }\n\n /* Remember current offset for next iteration */\n this.offset_ = offset\n }\n\n /**\n * Reset anchor states\n */\n reset() {\n [].forEach.call(this.els_, el => {\n delete el.dataset.mdMarked\n })\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/components/Material/Sidebar/Marker.js\n **/","/*\n * Copyright (c) 2016 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Definition\n * ------------------------------------------------------------------------- */\n\nexport default class Abstract {\n\n /**\n * Dispatch update on next repaint\n *\n * @constructor\n */\n constructor() {\n if (this === Abstract)\n throw new TypeError(\"Cannot construct abstract instance\")\n\n /* Dispatch update on next repaint */\n this.handler_ = ev => {\n window.requestAnimationFrame(() => {\n this.update(ev)\n })\n }\n }\n\n /**\n * Update state\n *\n * @abstract\n */\n update() {\n throw new Error(\"update(): not implemented\")\n }\n\n /**\n * Reset state\n *\n * @abstract\n */\n reset() {\n throw new Error(\"reset(): not implemented\")\n }\n\n /**\n * Register listener for all relevant events\n */\n listen() {\n [\"scroll\", \"resize\", \"orientationchange\"].forEach(name => {\n window.addEventListener(name, this.handler_, false)\n })\n\n /* Initial update */\n this.update()\n }\n\n /**\n * Unregister listener for all relevant events\n */\n unlisten() {\n [\"scroll\", \"resize\", \"orientationchange\"].forEach(name => {\n window.removeEventListener(name, this.handler_, false)\n })\n\n /* Final reset */\n this.reset()\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/components/Material/Sidebar/Abstract.js\n **/","/*\n * Copyright (c) 2016 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport Abstract from \"./Abstract\"\n\n/* ----------------------------------------------------------------------------\n * Definition\n * ------------------------------------------------------------------------- */\n\nexport default class Position extends Abstract {\n\n /**\n * Set sidebars to locked state and limit height to parent node\n *\n * @constructor\n * @param {(string|HTMLElement)} el - Selector or HTML element\n */\n constructor(el) {\n super()\n\n /* Resolve elements */\n this.el_ = (typeof el === \"string\")\n ? document.querySelector(el)\n : el\n\n /* Index inner and outer container */\n const inner = this.el_.parentNode\n const outer = this.el_.parentNode.parentNode\n\n /* Get top and bottom bounds */\n this.offset_ = outer.offsetTop\n this.bounds_ = {\n top: inner.offsetTop,\n bottom: inner.offsetTop + inner.offsetHeight\n }\n\n /* Initialize current height */\n this.height_ = 0\n }\n\n /**\n * Update locked state and height\n *\n * @param {Event} ev - Event (omitted)\n */\n update() {\n const scroll = window.pageYOffset\n const expand = window.innerHeight\n\n /* Calculate new bounds */\n const offset = this.bounds_.top - scroll\n const height = expand\n - Math.max(0, scroll + expand - this.bounds_.bottom)\n - Math.max(offset, this.offset_)\n\n /* If height changed, update element */\n if (height !== this.height_)\n this.el_.style.height = `${this.height_ = height}px`\n\n /* Sidebar should be locked, as we're below parent offset */\n if (offset < this.offset_) {\n if (!this.el_.dataset.mdLocked)\n this.el_.dataset.mdLocked = \"\"\n\n /* Sidebar should be unlocked, if locked */\n } else if (typeof this.el_.dataset.mdLocked === \"string\") {\n delete this.el_.dataset.mdLocked\n }\n }\n\n /**\n * Reset locked state and height\n */\n reset() {\n delete this.el_.dataset.mdLocked\n this.el_.style.height = \"\"\n this.height_ = 0\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/assets/javascripts/components/Material/Sidebar/Position.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/material/assets/javascripts/modernizr-dede1352ed.js b/material/assets/javascripts/modernizr-dede1352ed.js new file mode 100644 index 000000000..fda45b632 --- /dev/null +++ b/material/assets/javascripts/modernizr-dede1352ed.js @@ -0,0 +1 @@ +!function(e,t,n){function r(e,t){return typeof e===t}function s(){var e,t,n,s,o,i,a;for(var f in w)if(w.hasOwnProperty(f)){if(e=[],t=w[f],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n=9,s=t<533&&e.match(/android/gi);return n||s||r}();P?S.addTest("fontface",!1):E('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),s=r.sheet||r.styleSheet,o=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"",i=/src/i.test(o)&&0===o.indexOf(n.split(" ")[0]);S.addTest("fontface",i)});var z="Moz O ms Webkit",N=C._config.usePrefixes?z.split(" "):[];C._cssomPrefixes=N;var j={elem:a("modernizr")};S._q.push(function(){delete j.elem});var k={style:j.elem.style};S._q.unshift(function(){delete k.style});var R=C._config.usePrefixes?z.toLowerCase().split(" "):[];C._domPrefixes=R,C.testAllProps=v,C.testAllProps=y;var A="CSS"in e&&"supports"in e.CSS,q="supportsCSS"in e;S.addTest("supports",A||q),S.addTest("csstransforms3d",function(){var e=!!y("perspective","1px",!0),t=S._config.usePrefixes;if(e&&(!t||"webkitPerspective"in b.style)){var n,r="#modernizr{width:0;height:0}";S.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",E(r+n,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),s(),o(x),delete C.addTest,delete C.addAsyncTest;for(var L=0;L` element. This - * information allows you to progressively enhance your pages with a granular level - * of control over the experience. -*/ - -;(function(window, document, undefined){ - var tests = []; - - - /** - * - * ModernizrProto is the constructor for Modernizr - * - * @class - * @access public - */ - - var ModernizrProto = { - // The current version, dummy - _version: '3.3.1', - - // Any settings that don't work as separate modules - // can go in here as configuration. - _config: { - 'classPrefix': '', - 'enableClasses': true, - 'enableJSClass': true, - 'usePrefixes': true - }, - - // Queue of tests - _q: [], - - // Stub these for people who are listening - on: function(test, cb) { - // I don't really think people should do this, but we can - // safe guard it a bit. - // -- NOTE:: this gets WAY overridden in src/addTest for actual async tests. - // This is in case people listen to synchronous tests. I would leave it out, - // but the code to *disallow* sync tests in the real version of this - // function is actually larger than this. - var self = this; - setTimeout(function() { - cb(self[test]); - }, 0); - }, - - addTest: function(name, fn, options) { - tests.push({name: name, fn: fn, options: options}); - }, - - addAsyncTest: function(fn) { - tests.push({name: null, fn: fn}); - } - }; - - - - // Fake some of Object.create so we can force non test results to be non "own" properties. - var Modernizr = function() {}; - Modernizr.prototype = ModernizrProto; - - // Leak modernizr globally when you `require` it rather than force it here. - // Overwrite name so constructor name is nicer :D - Modernizr = new Modernizr(); - - - - var classes = []; - - - /** - * is returns a boolean if the typeof an obj is exactly type. - * - * @access private - * @function is - * @param {*} obj - A thing we want to check the type of - * @param {string} type - A string to compare the typeof against - * @returns {boolean} - */ - - function is(obj, type) { - return typeof obj === type; - } - ; - - /** - * Run through all tests and detect their support in the current UA. - * - * @access private - */ - - function testRunner() { - var featureNames; - var feature; - var aliasIdx; - var result; - var nameIdx; - var featureName; - var featureNameSplit; - - for (var featureIdx in tests) { - if (tests.hasOwnProperty(featureIdx)) { - featureNames = []; - feature = tests[featureIdx]; - // run the test, throw the return value into the Modernizr, - // then based on that boolean, define an appropriate className - // and push it into an array of classes we'll join later. - // - // If there is no name, it's an 'async' test that is run, - // but not directly added to the object. That should - // be done with a post-run addTest call. - if (feature.name) { - featureNames.push(feature.name.toLowerCase()); - - if (feature.options && feature.options.aliases && feature.options.aliases.length) { - // Add all the aliases into the names list - for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) { - featureNames.push(feature.options.aliases[aliasIdx].toLowerCase()); - } - } - } - - // Run the test, or use the raw value if it's not a function - result = is(feature.fn, 'function') ? feature.fn() : feature.fn; - - - // Set each of the names on the Modernizr object - for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) { - featureName = featureNames[nameIdx]; - // Support dot properties as sub tests. We don't do checking to make sure - // that the implied parent tests have been added. You must call them in - // order (either in the test, or make the parent test a dependency). - // - // Cap it to TWO to make the logic simple and because who needs that kind of subtesting - // hashtag famous last words - featureNameSplit = featureName.split('.'); - - if (featureNameSplit.length === 1) { - Modernizr[featureNameSplit[0]] = result; - } else { - // cast to a Boolean, if not one already - /* jshint -W053 */ - if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) { - Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]); - } - - Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result; - } - - classes.push((result ? '' : 'no-') + featureNameSplit.join('-')); - } - } - } - } - ; - - /** - * docElement is a convenience wrapper to grab the root element of the document - * - * @access private - * @returns {HTMLElement|SVGElement} The root element of the document - */ - - var docElement = document.documentElement; - - - /** - * A convenience helper to check if the document we are running in is an SVG document - * - * @access private - * @returns {boolean} - */ - - var isSVG = docElement.nodeName.toLowerCase() === 'svg'; - - - /** - * setClasses takes an array of class names and adds them to the root element - * - * @access private - * @function setClasses - * @param {string[]} classes - Array of class names - */ - - // Pass in an and array of class names, e.g.: - // ['no-webp', 'borderradius', ...] - function setClasses(classes) { - var className = docElement.className; - var classPrefix = Modernizr._config.classPrefix || ''; - - if (isSVG) { - className = className.baseVal; - } - - // Change `no-js` to `js` (independently of the `enableClasses` option) - // Handle classPrefix on this too - if (Modernizr._config.enableJSClass) { - var reJS = new RegExp('(^|\\s)' + classPrefix + 'no-js(\\s|$)'); - className = className.replace(reJS, '$1' + classPrefix + 'js$2'); - } - - if (Modernizr._config.enableClasses) { - // Add the new classes - className += ' ' + classPrefix + classes.join(' ' + classPrefix); - isSVG ? docElement.className.baseVal = className : docElement.className = className; - } - - } - - ; - - /** - * hasOwnProp is a shim for hasOwnProperty that is needed for Safari 2.0 support - * - * @author kangax - * @access private - * @function hasOwnProp - * @param {object} object - The object to check for a property - * @param {string} property - The property to check for - * @returns {boolean} - */ - - // hasOwnProperty shim by kangax needed for Safari 2.0 support - var hasOwnProp; - - (function() { - var _hasOwnProperty = ({}).hasOwnProperty; - /* istanbul ignore else */ - /* we have no way of testing IE 5.5 or safari 2, - * so just assume the else gets hit */ - if (!is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined')) { - hasOwnProp = function(object, property) { - return _hasOwnProperty.call(object, property); - }; - } - else { - hasOwnProp = function(object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ - return ((property in object) && is(object.constructor.prototype[property], 'undefined')); - }; - } - })(); - - - - - // _l tracks listeners for async tests, as well as tests that execute after the initial run - ModernizrProto._l = {}; - - /** - * Modernizr.on is a way to listen for the completion of async tests. Being - * asynchronous, they may not finish before your scripts run. As a result you - * will get a possibly false negative `undefined` value. - * - * @memberof Modernizr - * @name Modernizr.on - * @access public - * @function on - * @param {string} feature - String name of the feature detect - * @param {function} cb - Callback function returning a Boolean - true if feature is supported, false if not - * @example - * - * ```js - * Modernizr.on('flash', function( result ) { - * if (result) { - * // the browser has flash - * } else { - * // the browser does not have flash - * } - * }); - * ``` - */ - - ModernizrProto.on = function(feature, cb) { - // Create the list of listeners if it doesn't exist - if (!this._l[feature]) { - this._l[feature] = []; - } - - // Push this test on to the listener list - this._l[feature].push(cb); - - // If it's already been resolved, trigger it on next tick - if (Modernizr.hasOwnProperty(feature)) { - // Next Tick - setTimeout(function() { - Modernizr._trigger(feature, Modernizr[feature]); - }, 0); - } - }; - - /** - * _trigger is the private function used to signal test completion and run any - * callbacks registered through [Modernizr.on](#modernizr-on) - * - * @memberof Modernizr - * @name Modernizr._trigger - * @access private - * @function _trigger - * @param {string} feature - string name of the feature detect - * @param {function|boolean} [res] - A feature detection function, or the boolean = - * result of a feature detection function - */ - - ModernizrProto._trigger = function(feature, res) { - if (!this._l[feature]) { - return; - } - - var cbs = this._l[feature]; - - // Force async - setTimeout(function() { - var i, cb; - for (i = 0; i < cbs.length; i++) { - cb = cbs[i]; - cb(res); - } - }, 0); - - // Don't trigger these again - delete this._l[feature]; - }; - - /** - * addTest allows you to define your own feature detects that are not currently - * included in Modernizr (under the covers it's the exact same code Modernizr - * uses for its own [feature detections](https://github.com/Modernizr/Modernizr/tree/master/feature-detects)). Just like the offical detects, the result - * will be added onto the Modernizr object, as well as an appropriate className set on - * the html element when configured to do so - * - * @memberof Modernizr - * @name Modernizr.addTest - * @optionName Modernizr.addTest() - * @optionProp addTest - * @access public - * @function addTest - * @param {string|object} feature - The string name of the feature detect, or an - * object of feature detect names and test - * @param {function|boolean} test - Function returning true if feature is supported, - * false if not. Otherwise a boolean representing the results of a feature detection - * @example - * - * The most common way of creating your own feature detects is by calling - * `Modernizr.addTest` with a string (preferably just lowercase, without any - * punctuation), and a function you want executed that will return a boolean result - * - * ```js - * Modernizr.addTest('itsTuesday', function() { - * var d = new Date(); - * return d.getDay() === 2; - * }); - * ``` - * - * When the above is run, it will set Modernizr.itstuesday to `true` when it is tuesday, - * and to `false` every other day of the week. One thing to notice is that the names of - * feature detect functions are always lowercased when added to the Modernizr object. That - * means that `Modernizr.itsTuesday` will not exist, but `Modernizr.itstuesday` will. - * - * - * Since we only look at the returned value from any feature detection function, - * you do not need to actually use a function. For simple detections, just passing - * in a statement that will return a boolean value works just fine. - * - * ```js - * Modernizr.addTest('hasJquery', 'jQuery' in window); - * ``` - * - * Just like before, when the above runs `Modernizr.hasjquery` will be true if - * jQuery has been included on the page. Not using a function saves a small amount - * of overhead for the browser, as well as making your code much more readable. - * - * Finally, you also have the ability to pass in an object of feature names and - * their tests. This is handy if you want to add multiple detections in one go. - * The keys should always be a string, and the value can be either a boolean or - * function that returns a boolean. - * - * ```js - * var detects = { - * 'hasjquery': 'jQuery' in window, - * 'itstuesday': function() { - * var d = new Date(); - * return d.getDay() === 2; - * } - * } - * - * Modernizr.addTest(detects); - * ``` - * - * There is really no difference between the first methods and this one, it is - * just a convenience to let you write more readable code. - */ - - function addTest(feature, test) { - - if (typeof feature == 'object') { - for (var key in feature) { - if (hasOwnProp(feature, key)) { - addTest(key, feature[ key ]); - } - } - } else { - - feature = feature.toLowerCase(); - var featureNameSplit = feature.split('.'); - var last = Modernizr[featureNameSplit[0]]; - - // Again, we don't check for parent test existence. Get that right, though. - if (featureNameSplit.length == 2) { - last = last[featureNameSplit[1]]; - } - - if (typeof last != 'undefined') { - // we're going to quit if you're trying to overwrite an existing test - // if we were to allow it, we'd do this: - // var re = new RegExp("\\b(no-)?" + feature + "\\b"); - // docElement.className = docElement.className.replace( re, '' ); - // but, no rly, stuff 'em. - return Modernizr; - } - - test = typeof test == 'function' ? test() : test; - - // Set the value (this is the magic, right here). - if (featureNameSplit.length == 1) { - Modernizr[featureNameSplit[0]] = test; - } else { - // cast to a Boolean, if not one already - /* jshint -W053 */ - if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) { - Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]); - } - - Modernizr[featureNameSplit[0]][featureNameSplit[1]] = test; - } - - // Set a single class (either `feature` or `no-feature`) - /* jshint -W041 */ - setClasses([(!!test && test != false ? '' : 'no-') + featureNameSplit.join('-')]); - /* jshint +W041 */ - - // Trigger the event - Modernizr._trigger(feature, test); - } - - return Modernizr; // allow chaining. - } - - // After all the tests are run, add self to the Modernizr prototype - Modernizr._q.push(function() { - ModernizrProto.addTest = addTest; - }); - - - -/*! -{ - "name": "SVG", - "property": "svg", - "caniuse": "svg", - "tags": ["svg"], - "authors": ["Erik Dahlstrom"], - "polyfills": [ - "svgweb", - "raphael", - "amplesdk", - "canvg", - "svg-boilerplate", - "sie", - "dojogfx", - "fabricjs" - ] -} -!*/ -/* DOC -Detects support for SVG in `` or `` elements. -*/ - - Modernizr.addTest('svg', !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect); - - - /** - * createElement is a convenience wrapper around document.createElement. Since we - * use createElement all over the place, this allows for (slightly) smaller code - * as well as abstracting away issues with creating elements in contexts other than - * HTML documents (e.g. SVG documents). - * - * @access private - * @function createElement - * @returns {HTMLElement|SVGElement} An HTML or SVG element - */ - - function createElement() { - if (typeof document.createElement !== 'function') { - // This is the case in IE7, where the type of createElement is "object". - // For this reason, we cannot call apply() as Object is not a Function. - return document.createElement(arguments[0]); - } else if (isSVG) { - return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]); - } else { - return document.createElement.apply(document, arguments); - } - } - - ; - - /** - * getBody returns the body of a document, or an element that can stand in for - * the body if a real body does not exist - * - * @access private - * @function getBody - * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an - * artificially created element that stands in for the body - */ - - function getBody() { - // After page load injecting a fake body doesn't work so check if body exists - var body = document.body; - - if (!body) { - // Can't use the real body create a fake one. - body = createElement(isSVG ? 'svg' : 'body'); - body.fake = true; - } - - return body; - } - - ; - - /** - * injectElementWithStyles injects an element with style element and some CSS rules - * - * @access private - * @function injectElementWithStyles - * @param {string} rule - String representing a css rule - * @param {function} callback - A function that is used to test the injected element - * @param {number} [nodes] - An integer representing the number of additional nodes you want injected - * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes - * @returns {boolean} - */ - - function injectElementWithStyles(rule, callback, nodes, testnames) { - var mod = 'modernizr'; - var style; - var ret; - var node; - var docOverflow; - var div = createElement('div'); - var body = getBody(); - - if (parseInt(nodes, 10)) { - // In order not to give false positives we create a node for each test - // This also allows the method to scale for unspecified uses - while (nodes--) { - node = createElement('div'); - node.id = testnames ? testnames[nodes] : mod + (nodes + 1); - div.appendChild(node); - } - } - - style = createElement('style'); - style.type = 'text/css'; - style.id = 's' + mod; - - // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody. - // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270 - (!body.fake ? div : body).appendChild(style); - body.appendChild(div); - - if (style.styleSheet) { - style.styleSheet.cssText = rule; - } else { - style.appendChild(document.createTextNode(rule)); - } - div.id = mod; - - if (body.fake) { - //avoid crashing IE8, if background image is used - body.style.background = ''; - //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible - body.style.overflow = 'hidden'; - docOverflow = docElement.style.overflow; - docElement.style.overflow = 'hidden'; - docElement.appendChild(body); - } - - ret = callback(div, rule); - // If this is done after page load we don't want to remove the body so check if body exists - if (body.fake) { - body.parentNode.removeChild(body); - docElement.style.overflow = docOverflow; - // Trigger layout so kinetic scrolling isn't disabled in iOS6+ - docElement.offsetHeight; - } else { - div.parentNode.removeChild(div); - } - - return !!ret; - - } - - ; - - /** - * testStyles injects an element with style element and some CSS rules - * - * @memberof Modernizr - * @name Modernizr.testStyles - * @optionName Modernizr.testStyles() - * @optionProp testStyles - * @access public - * @function testStyles - * @param {string} rule - String representing a css rule - * @param {function} callback - A function that is used to test the injected element - * @param {number} [nodes] - An integer representing the number of additional nodes you want injected - * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes - * @returns {boolean} - * @example - * - * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page - * along with (possibly multiple) DOM elements. This lets you check for features - * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules). - * - * ```js - * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) { - * // elem is the first DOM node in the page (by default #modernizr) - * // rule is the first argument you supplied - the CSS rule in string form - * - * addTest('widthworks', elem.style.width === '9px') - * }); - * ``` - * - * If your test requires multiple nodes, you can include a third argument - * indicating how many additional div elements to include on the page. The - * additional nodes are injected as children of the `elem` that is returned as - * the first argument to the callback. - * - * ```js - * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) { - * document.getElementById('modernizr').style.width === '1px'; // true - * document.getElementById('modernizr2').style.width === '2px'; // true - * elem.firstChild === document.getElementById('modernizr2'); // true - * }, 1); - * ``` - * - * By default, all of the additional elements have an ID of `modernizr[n]`, where - * `n` is its index (e.g. the first additional, second overall is `#modernizr2`, - * the second additional is `#modernizr3`, etc.). - * If you want to have more meaningful IDs for your function, you can provide - * them as the fourth argument, as an array of strings - * - * ```js - * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) { - * elem.firstChild === document.getElementById('foo'); // true - * elem.lastChild === document.getElementById('bar'); // true - * }, 2, ['foo', 'bar']); - * ``` - * - */ - - var testStyles = ModernizrProto.testStyles = injectElementWithStyles; - -/*! -{ - "name": "@font-face", - "property": "fontface", - "authors": ["Diego Perini", "Mat Marquis"], - "tags": ["css"], - "knownBugs": [ - "False Positive: WebOS https://github.com/Modernizr/Modernizr/issues/342", - "False Postive: WP7 https://github.com/Modernizr/Modernizr/issues/538" - ], - "notes": [{ - "name": "@font-face detection routine by Diego Perini", - "href": "http://javascript.nwbox.com/CSSSupport/" - },{ - "name": "Filament Group @font-face compatibility research", - "href": "https://docs.google.com/presentation/d/1n4NyG4uPRjAA8zn_pSQ_Ket0RhcWC6QlZ6LMjKeECo0/edit#slide=id.p" - },{ - "name": "Filament Grunticon/@font-face device testing results", - "href": "https://docs.google.com/spreadsheet/ccc?key=0Ag5_yGvxpINRdHFYeUJPNnZMWUZKR2ItMEpRTXZPdUE#gid=0" - },{ - "name": "CSS fonts on Android", - "href": "https://stackoverflow.com/questions/3200069/css-fonts-on-android" - },{ - "name": "@font-face and Android", - "href": "http://archivist.incutio.com/viewlist/css-discuss/115960" - }] -} -!*/ - - var blacklist = (function() { - var ua = navigator.userAgent; - var wkvers = ua.match(/applewebkit\/([0-9]+)/gi) && parseFloat(RegExp.$1); - var webos = ua.match(/w(eb)?osbrowser/gi); - var wppre8 = ua.match(/windows phone/gi) && ua.match(/iemobile\/([0-9])+/gi) && parseFloat(RegExp.$1) >= 9; - var oldandroid = wkvers < 533 && ua.match(/android/gi); - return webos || oldandroid || wppre8; - }()); - if (blacklist) { - Modernizr.addTest('fontface', false); - } else { - testStyles('@font-face {font-family:"font";src:url("https://")}', function(node, rule) { - var style = document.getElementById('smodernizr'); - var sheet = style.sheet || style.styleSheet; - var cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : ''; - var bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0; - Modernizr.addTest('fontface', bool); - }); - } -; - - /** - * If the browsers follow the spec, then they would expose vendor-specific style as: - * elem.style.WebkitBorderRadius - * instead of something like the following, which would be technically incorrect: - * elem.style.webkitBorderRadius - - * Webkit ghosts their properties in lowercase but Opera & Moz do not. - * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+ - * erik.eae.net/archives/2008/03/10/21.48.10/ - - * More here: github.com/Modernizr/Modernizr/issues/issue/21 - * - * @access private - * @returns {string} The string representing the vendor-specific style properties - */ - - var omPrefixes = 'Moz O ms Webkit'; - - - var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []); - ModernizrProto._cssomPrefixes = cssomPrefixes; - - - - /** - * contains checks to see if a string contains another string - * - * @access private - * @function contains - * @param {string} str - The string we want to check for substrings - * @param {string} substr - The substring we want to search the first string for - * @returns {boolean} - */ - - function contains(str, substr) { - return !!~('' + str).indexOf(substr); - } - - ; - - /** - * Create our "modernizr" element that we do most feature tests on. - * - * @access private - */ - - var modElem = { - elem: createElement('modernizr') - }; - - // Clean up this element - Modernizr._q.push(function() { - delete modElem.elem; - }); - - - - var mStyle = { - style: modElem.elem.style - }; - - // kill ref for gc, must happen before mod.elem is removed, so we unshift on to - // the front of the queue. - Modernizr._q.unshift(function() { - delete mStyle.style; - }); - - - - /** - * domToCSS takes a camelCase string and converts it to kebab-case - * e.g. boxSizing -> box-sizing - * - * @access private - * @function domToCSS - * @param {string} name - String name of camelCase prop we want to convert - * @returns {string} The kebab-case version of the supplied name - */ - - function domToCSS(name) { - return name.replace(/([A-Z])/g, function(str, m1) { - return '-' + m1.toLowerCase(); - }).replace(/^ms-/, '-ms-'); - } - ; - - /** - * nativeTestProps allows for us to use native feature detection functionality if available. - * some prefixed form, or false, in the case of an unsupported rule - * - * @access private - * @function nativeTestProps - * @param {array} props - An array of property names - * @param {string} value - A string representing the value we want to check via @supports - * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise - */ - - // Accepts a list of property names and a single value - // Returns `undefined` if native detection not available - function nativeTestProps(props, value) { - var i = props.length; - // Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface - if ('CSS' in window && 'supports' in window.CSS) { - // Try every prefixed variant of the property - while (i--) { - if (window.CSS.supports(domToCSS(props[i]), value)) { - return true; - } - } - return false; - } - // Otherwise fall back to at-rule (for Opera 12.x) - else if ('CSSSupportsRule' in window) { - // Build a condition string for every prefixed variant - var conditionText = []; - while (i--) { - conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')'); - } - conditionText = conditionText.join(' or '); - return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function(node) { - return getComputedStyle(node, null).position == 'absolute'; - }); - } - return undefined; - } - ; - - /** - * cssToDOM takes a kebab-case string and converts it to camelCase - * e.g. box-sizing -> boxSizing - * - * @access private - * @function cssToDOM - * @param {string} name - String name of kebab-case prop we want to convert - * @returns {string} The camelCase version of the supplied name - */ - - function cssToDOM(name) { - return name.replace(/([a-z])-([a-z])/g, function(str, m1, m2) { - return m1 + m2.toUpperCase(); - }).replace(/^-/, ''); - } - ; - - // testProps is a generic CSS / DOM property test. - - // In testing support for a given CSS property, it's legit to test: - // `elem.style[styleName] !== undefined` - // If the property is supported it will return an empty string, - // if unsupported it will return undefined. - - // We'll take advantage of this quick test and skip setting a style - // on our modernizr element, but instead just testing undefined vs - // empty string. - - // Property names can be provided in either camelCase or kebab-case. - - function testProps(props, prefixed, value, skipValueTest) { - skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest; - - // Try native detect first - if (!is(value, 'undefined')) { - var result = nativeTestProps(props, value); - if (!is(result, 'undefined')) { - return result; - } - } - - // Otherwise do it properly - var afterInit, i, propsLength, prop, before; - - // If we don't have a style element, that means we're running async or after - // the core tests, so we'll need to create our own elements to use - - // inside of an SVG element, in certain browsers, the `style` element is only - // defined for valid tags. Therefore, if `modernizr` does not have one, we - // fall back to a less used element and hope for the best. - var elems = ['modernizr', 'tspan']; - while (!mStyle.style) { - afterInit = true; - mStyle.modElem = createElement(elems.shift()); - mStyle.style = mStyle.modElem.style; - } - - // Delete the objects if we created them. - function cleanElems() { - if (afterInit) { - delete mStyle.style; - delete mStyle.modElem; - } - } - - propsLength = props.length; - for (i = 0; i < propsLength; i++) { - prop = props[i]; - before = mStyle.style[prop]; - - if (contains(prop, '-')) { - prop = cssToDOM(prop); - } - - if (mStyle.style[prop] !== undefined) { - - // If value to test has been passed in, do a set-and-check test. - // 0 (integer) is a valid property value, so check that `value` isn't - // undefined, rather than just checking it's truthy. - if (!skipValueTest && !is(value, 'undefined')) { - - // Needs a try catch block because of old IE. This is slow, but will - // be avoided in most cases because `skipValueTest` will be used. - try { - mStyle.style[prop] = value; - } catch (e) {} - - // If the property value has changed, we assume the value used is - // supported. If `value` is empty string, it'll fail here (because - // it hasn't changed), which matches how browsers have implemented - // CSS.supports() - if (mStyle.style[prop] != before) { - cleanElems(); - return prefixed == 'pfx' ? prop : true; - } - } - // Otherwise just return true, or the property name if this is a - // `prefixed()` call - else { - cleanElems(); - return prefixed == 'pfx' ? prop : true; - } - } - } - cleanElems(); - return false; - } - - ; - - /** - * List of JavaScript DOM values used for tests - * - * @memberof Modernizr - * @name Modernizr._domPrefixes - * @optionName Modernizr._domPrefixes - * @optionProp domPrefixes - * @access public - * @example - * - * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather - * than kebab-case properties, all properties are their Capitalized variant - * - * ```js - * Modernizr._domPrefixes === [ "Moz", "O", "ms", "Webkit" ]; - * ``` - */ - - var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []); - ModernizrProto._domPrefixes = domPrefixes; - - - /** - * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill. - * - * @access private - * @function fnBind - * @param {function} fn - a function you want to change `this` reference to - * @param {object} that - the `this` you want to call the function with - * @returns {function} The wrapped version of the supplied function - */ - - function fnBind(fn, that) { - return function() { - return fn.apply(that, arguments); - }; - } - - ; - - /** - * testDOMProps is a generic DOM property test; if a browser supports - * a certain property, it won't return undefined for it. - * - * @access private - * @function testDOMProps - * @param {array.} props - An array of properties to test for - * @param {object} obj - An object or Element you want to use to test the parameters again - * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check - */ - function testDOMProps(props, obj, elem) { - var item; - - for (var i in props) { - if (props[i] in obj) { - - // return the property name as a string - if (elem === false) { - return props[i]; - } - - item = obj[props[i]]; - - // let's bind a function - if (is(item, 'function')) { - // bind to obj unless overriden - return fnBind(item, elem || obj); - } - - // return the unbound function or obj or value - return item; - } - } - return false; - } - - ; - - /** - * testPropsAll tests a list of DOM properties we want to check against. - * We specify literally ALL possible (known and/or likely) properties on - * the element including the non-vendor prefixed one, for forward- - * compatibility. - * - * @access private - * @function testPropsAll - * @param {string} prop - A string of the property to test for - * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip - * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against - * @param {string} [value] - A string of a css value - * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set - */ - function testPropsAll(prop, prefixed, elem, value, skipValueTest) { - - var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1), - props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' '); - - // did they call .prefixed('boxSizing') or are we just testing a prop? - if (is(prefixed, 'string') || is(prefixed, 'undefined')) { - return testProps(props, prefixed, value, skipValueTest); - - // otherwise, they called .prefixed('requestAnimationFrame', window[, elem]) - } else { - props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' '); - return testDOMProps(props, prefixed, elem); - } - } - - // Modernizr.testAllProps() investigates whether a given style property, - // or any of its vendor-prefixed variants, is recognized - // - // Note that the property names must be provided in the camelCase variant. - // Modernizr.testAllProps('boxSizing') - ModernizrProto.testAllProps = testPropsAll; - - - - /** - * testAllProps determines whether a given CSS property is supported in the browser - * - * @memberof Modernizr - * @name Modernizr.testAllProps - * @optionName Modernizr.testAllProps() - * @optionProp testAllProps - * @access public - * @function testAllProps - * @param {string} prop - String naming the property to test (either camelCase or kebab-case) - * @param {string} [value] - String of the value to test - * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection - * @example - * - * testAllProps determines whether a given CSS property, in some prefixed form, - * is supported by the browser. - * - * ```js - * testAllProps('boxSizing') // true - * ``` - * - * It can optionally be given a CSS value in string form to test if a property - * value is valid - * - * ```js - * testAllProps('display', 'block') // true - * testAllProps('display', 'penguin') // false - * ``` - * - * A boolean can be passed as a third parameter to skip the value check when - * native detection (@supports) isn't available. - * - * ```js - * testAllProps('shapeOutside', 'content-box', true); - * ``` - */ - - function testAllProps(prop, value, skipValueTest) { - return testPropsAll(prop, undefined, undefined, value, skipValueTest); - } - ModernizrProto.testAllProps = testAllProps; - -/*! -{ - "name": "CSS Supports", - "property": "supports", - "caniuse": "css-featurequeries", - "tags": ["css"], - "builderAliases": ["css_supports"], - "notes": [{ - "name": "W3 Spec", - "href": "http://dev.w3.org/csswg/css3-conditional/#at-supports" - },{ - "name": "Related Github Issue", - "href": "github.com/Modernizr/Modernizr/issues/648" - },{ - "name": "W3 Info", - "href": "http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface" - }] -} -!*/ - - var newSyntax = 'CSS' in window && 'supports' in window.CSS; - var oldSyntax = 'supportsCSS' in window; - Modernizr.addTest('supports', newSyntax || oldSyntax); - -/*! -{ - "name": "CSS Transforms 3D", - "property": "csstransforms3d", - "caniuse": "transforms3d", - "tags": ["css"], - "warnings": [ - "Chrome may occassionally fail this test on some systems; more info: https://code.google.com/p/chromium/issues/detail?id=129004" - ] -} -!*/ - - Modernizr.addTest('csstransforms3d', function() { - var ret = !!testAllProps('perspective', '1px', true); - var usePrefix = Modernizr._config.usePrefixes; - - // Webkit's 3D transforms are passed off to the browser's own graphics renderer. - // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in - // some conditions. As a result, Webkit typically recognizes the syntax but - // will sometimes throw a false positive, thus we must do a more thorough check: - if (ret && (!usePrefix || 'webkitPerspective' in docElement.style)) { - var mq; - var defaultStyle = '#modernizr{width:0;height:0}'; - // Use CSS Conditional Rules if available - if (Modernizr.supports) { - mq = '@supports (perspective: 1px)'; - } else { - // Otherwise, Webkit allows this media query to succeed only if the feature is enabled. - // `@media (transform-3d),(-webkit-transform-3d){ ... }` - mq = '@media (transform-3d)'; - if (usePrefix) { - mq += ',(-webkit-transform-3d)'; - } - } - - mq += '{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}'; - - testStyles(defaultStyle + mq, function(elem) { - ret = elem.offsetWidth === 7 && elem.offsetHeight === 18; - }); - } - - return ret; - }); - - - // Run each test - testRunner(); - - // Remove the "no-js" class if it exists - setClasses(classes); - - delete ModernizrProto.addTest; - delete ModernizrProto.addAsyncTest; - - // Run the things that are supposed to run after the tests - for (var i = 0; i < Modernizr._q.length; i++) { - Modernizr._q[i](); - } - - // Leak Modernizr namespace - window.Modernizr = Modernizr; - - -; - -})(window, document); \ No newline at end of file diff --git a/material/assets/stylesheets/application-9cd3c99a66.css b/material/assets/stylesheets/application-9cd3c99a66.css new file mode 100644 index 000000000..18373ab4a --- /dev/null +++ b/material/assets/stylesheets/application-9cd3c99a66.css @@ -0,0 +1 @@ +@charset "UTF-8";html{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}*,:after,:before{box-sizing:inherit;-moz-box-sizing:inherit;-webkit-box-sizing:inherit}html{-webkit-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none}body{margin:0}article,aside,figcaption,figure,footer,header,main,nav,section{display:block}hr{overflow:visible;box-sizing:content-box}a{color:inherit;text-decoration:none}a:active,a:hover{outline-width:0}a{-webkit-text-decoration-skip:objects}a,button,input,label{-webkit-tap-highlight-color:transparent}small,sub,sup{font-size:80%}sub,sup{position:relative;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}table{border-collapse:collapse;border-spacing:0}td,th{font-weight:400;text-align:left;vertical-align:top}button{padding:0;background:transparent;font-size:inherit}button,input{border:0;outline:0}.admonition:before,.critic.comment:before,.md-icon,.md-nav__link:after,.md-nav__title:before,.md-typeset .footnote-backref{font-family:Material Icons;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none;white-space:nowrap;speak:none;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.md-footer-nav__icon,.md-header-nav__icon,.md-nav__title:before{display:inline-block;margin:.4rem;padding:.8rem;font-size:2.4rem;cursor:pointer}.md-icon--back:before{content:"arrow_back"}.md-icon--forward:before{content:"arrow_forward"}body,input{color:rgba(0,0,0,.87);font-family:Roboto,Helvetica,Arial,sans-serif;font-weight:400;-webkit-font-feature-settings:"kern","onum","liga";font-feature-settings:"kern","onum","liga";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.no-fontface body,.no-fontface input{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}code,kbd,pre{color:rgba(0,0,0,.87);font-family:Roboto Mono,Courier New,Courier,monospace;font-weight:400;-webkit-font-feature-settings:"kern","onum","liga";font-feature-settings:"kern","onum","liga"}.no-fontface code,.no-fontface kbd,.no-fontface pre{font-family:Courier New,Courier,monospace}.md-typeset{font-size:1.6rem;line-height:1.6}.md-typeset blockquote,.md-typeset ol,.md-typeset p,.md-typeset ul{margin:1em 0}.md-typeset h1{margin:0 0 4rem;color:rgba(0,0,0,.54);font-size:3.125rem;line-height:1.3}.md-typeset h1,.md-typeset h2{font-weight:300;letter-spacing:-.01em}.md-typeset h2{margin:4rem 0 1.6rem;font-size:2.5rem;line-height:1.4}.md-typeset h3{margin:3.2rem 0 1.6rem;font-size:2rem;font-weight:400;letter-spacing:-.01em;line-height:1.5}.md-typeset h2+h3{margin-top:1.6rem}.md-typeset h4{font-size:1.6rem}.md-typeset h4,.md-typeset h5,.md-typeset h6{margin:1.6rem 0;font-weight:700;letter-spacing:-.01em}.md-typeset h5,.md-typeset h6{color:rgba(0,0,0,.54);font-size:1.28rem}.md-typeset h5{text-transform:uppercase}.md-typeset hr{margin:2.4rem 0;border-bottom:.1rem dotted rgba(0,0,0,.26)}.md-typeset a{color:#3f51b5}.md-typeset a,.md-typeset a:before{-webkit-transition:color .125s;transition:color .125s}.md-typeset a:active,.md-typeset a:hover{color:#536dfe}.md-typeset code,.md-typeset pre{background:rgba(0,0,0,.035);color:#37474f;font-size:85%}.md-typeset code{margin:0 .4rem;padding:.1rem 0;border-radius:.2rem;box-shadow:.4rem 0 0 rgba(0,0,0,.035),-.4rem 0 0 rgba(0,0,0,.035);word-break:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone}.md-typeset h1 code,.md-typeset h2 code,.md-typeset h3 code,.md-typeset h4 code,.md-typeset h5 code,.md-typeset h6 code{margin:0;background:transparent;box-shadow:none}.md-typeset pre{margin:1em 0;padding:1rem 1.2rem;border-radius:.2rem;line-height:1.4;overflow:auto;-webkit-overflow-scrolling:touch}.md-typeset pre::-webkit-scrollbar{width:.4rem;height:.4rem}.md-typeset pre::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.26)}.md-typeset pre::-webkit-scrollbar-thumb:hover{background-color:#536dfe}.md-typeset pre>code{margin:0;background:none;font-size:inherit;box-shadow:none;-webkit-box-decoration-break:none;box-decoration-break:none}.md-typeset kbd{display:inline-block;padding:.4rem .5rem .5rem;border:.1rem solid #c9c9c9;border-radius:.2rem;border-bottom-color:#bcbcbc;background-color:#fcfcfc;color:#555;font-size:85%;line-height:1rem;box-shadow:inset 0 -.1rem 0 #b0b0b0;vertical-align:.1rem;word-break:break-word}.md-typeset small{opacity:.75}.md-typeset sub,.md-typeset sup{margin-left:.1rem}.md-typeset blockquote{padding-left:1.2rem;border-left:.4rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}.md-typeset ul{list-style-type:disc}.md-typeset ol ol{list-style-type:lower-alpha}.md-typeset ol ol ol{list-style-type:lower-roman}.md-typeset ol,.md-typeset ul{margin-left:1rem;padding:0}.md-typeset ol li,.md-typeset ul li{margin-bottom:.5em;margin-left:2rem}.md-typeset ol li blockquote,.md-typeset ol li p,.md-typeset ul li blockquote,.md-typeset ul li p{margin:.5em 0}.md-typeset ol li:last-child,.md-typeset ul li:last-child{margin-bottom:0}.md-typeset ol li ol,.md-typeset ol li ul,.md-typeset ul li ol,.md-typeset ul li ul{margin-bottom:1rem;margin-left:1rem;padding-top:1rem}.md-typeset table{margin:1.5em 0;font-size:1.28rem;overflow:hidden}.no-js .md-typeset table{display:inline-block;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}.md-typeset table th{min-width:10rem;padding:1.2rem 1.6rem;border-bottom:.1rem solid rgba(0,0,0,.54);color:rgba(0,0,0,.87);font-weight:700;text-align:left;vertical-align:top}.md-typeset table td{padding:1.2rem 1.6rem;border-top:.1rem solid rgba(0,0,0,.07);vertical-align:top}.md-typeset table tr:first-child td{border-top:0}html{height:100%;font-size:62.5%}body{position:relative;min-height:100%}hr{display:block;height:.1rem;padding:0;border:0}.md-grid{max-width:120rem;margin-right:auto;margin-left:auto}.md-container,.md-main{overflow:auto}.md-main{margin-top:5.6rem}.md-main__inner{margin-top:3rem;margin-bottom:9.2rem;overflow:auto}.md-toggle{display:none}.md-overlay{position:fixed;top:0;width:0;height:0;-webkit-transition:width 0s .25s,height 0s .25s,opacity .25s;transition:width 0s .25s,height 0s .25s,opacity .25s;background:rgba(0,0,0,.54);opacity:0;z-index:2}.md-flex{display:table}.md-flex__cell{display:table-cell;position:relative;vertical-align:top}.md-flex__cell--shrink{width:0}.md-flex__cell--stretch{display:table;width:100%;table-layout:fixed}.md-flex__ellipsis{display:table-cell;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}@page{margin:25mm}.md-content__inner{margin:2.4rem 1.6rem}.md-content__copyright{display:block}.md-header{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);position:fixed;top:0;right:0;left:0;height:5.6rem;background:#3f51b5;color:#fff;z-index:1}.md-header-nav{padding:.4rem}.md-header-nav__icon{position:relative;-webkit-transition:opacity .25s;transition:opacity .25s;z-index:1}.md-header-nav__icon:hover{opacity:.7}.no-js .md-header-nav__icon--search{display:none}.md-header-nav__title{padding:0 2rem;font-size:1.8rem;line-height:4.8rem}.md-header-nav__source{display:none}.md-footer{position:absolute;bottom:0;width:100%}.md-footer__inner{background:rgba(0,0,0,.87);color:#fff}.md-footer-nav{padding:.4rem;overflow:auto}.md-footer-nav__link{padding-top:2.8rem;padding-bottom:.8rem;-webkit-transition:opacity .25s;transition:opacity .25s}.md-footer-nav__link:hover{opacity:.7}.md-footer-nav__link--prev{width:25%;float:left}.md-footer-nav__link--next{width:75%;float:right;text-align:right}.md-footer-nav__icon{-webkit-transition:background .25s;transition:background .25s}.md-footer-nav__title{position:relative;padding:0 .4rem;font-size:1.8rem;line-height:4.8rem}.md-footer-nav__direction{position:absolute;right:0;left:0;margin-top:-2rem;padding:0 .4rem;color:hsla(0,0%,100%,.7);font-size:1.5rem}.md-nav{font-size:1.28rem;line-height:1.3}.md-nav--secondary{border-left:.4rem solid #3f51b5}.md-nav__title{display:block;padding:1.2rem 1.2rem 0;font-weight:700;text-overflow:ellipsis;overflow:hidden}.md-nav__title:before{display:none;content:"arrow_back"}.md-nav__list{margin:0;padding:0;list-style:none}.md-nav__item{padding:.625em 1.2rem 0}.md-nav__item:last-child{padding-bottom:1.2rem}.md-nav__item .md-nav__item{padding-right:0}.md-nav__item .md-nav__item:last-child{padding-bottom:0}.md-nav__link{display:block;-webkit-transition:color .125s;transition:color .125s;text-overflow:ellipsis;cursor:pointer;overflow:hidden}.md-nav__item--nested>.md-nav__link:after{content:"expand_more"}html .md-nav__link[for=toc],html .md-nav__link[for=toc]+.md-nav__link:after,html .md-nav__link[for=toc]~.md-nav{display:none}.md-nav__link[data-md-blurred]{color:rgba(0,0,0,.54)}.md-nav__link--active,.md-nav__link:active,.md-nav__link:hover{color:#536dfe}.md-nav__source,.no-js .md-search{display:none}.md-search__overlay{display:none;pointer-events:none}.md-search__inner{width:100%}.md-search__form{position:relative}.md-search__input{position:relative;padding:0 1.6rem 0 7.2rem;text-overflow:ellipsis;z-index:1}.md-search__input+.md-search__icon,.md-search__input::-webkit-input-placeholder{color:rgba(0,0,0,.54)}.md-search__input+.md-search__icon,.md-search__input::-moz-placeholder{color:rgba(0,0,0,.54)}.md-search__input+.md-search__icon,.md-search__input:-ms-input-placeholder{color:rgba(0,0,0,.54)}.md-search__input+.md-search__icon,.md-search__input::placeholder{color:rgba(0,0,0,.54)}.md-search__icon{position:absolute;top:.8rem;left:1.2rem;-webkit-transition:color .25s;transition:color .25s;font-size:2.4rem;cursor:pointer;z-index:1}.md-search__icon:before{content:"search"}.md-search__output{position:absolute;width:100%;border-radius:0 0 .2rem .2rem;overflow:hidden}.md-search__scrollwrap{height:100%;background:-webkit-linear-gradient(top,#fff 10%,hsla(0,0%,100%,0)),-webkit-linear-gradient(top,rgba(0,0,0,.26),rgba(0,0,0,.07) 35%,transparent 60%);background:linear-gradient(180deg,#fff 10%,hsla(0,0%,100%,0)),linear-gradient(180deg,rgba(0,0,0,.26),rgba(0,0,0,.07) 35%,transparent 60%);background-attachment:local,scroll;background-color:#fff;background-repeat:no-repeat;background-size:100% 2rem,100% 1rem;box-shadow:inset 0 .1rem 0 rgba(0,0,0,.07);overflow-y:auto}.md-sidebar{position:relative;width:24.2rem;float:left;overflow:visible}.md-sidebar[data-md-locked]{position:fixed;top:5.6rem}.md-sidebar--secondary{display:none}.md-sidebar__scrollwrap{margin:2.4rem .4rem;overflow-y:scroll}.js .md-sidebar__scrollwrap{position:absolute;top:0;right:0;bottom:0;left:0}.md-sidebar__scrollwrap::-webkit-scrollbar{width:.4rem;height:.4rem}.md-sidebar__scrollwrap::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.26)}.md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover{background-color:#536dfe}.md-source{display:block;-webkit-transition:opacity .25s;transition:opacity .25s;font-size:1.3rem;line-height:1.2;white-space:nowrap}.md-source:hover{opacity:.7}.md-source:before{display:inline-block;height:4.8rem;content:"";vertical-align:middle}.md-source--bitbucket:before,.md-source--github:before,.md-source--gitlab:before{width:4.8rem;background-repeat:no-repeat;background-position:50%;background-size:2.4rem 2.4rem}.md-source--bitbucket .md-source__repository,.md-source--github .md-source__repository,.md-source--gitlab .md-source__repository{margin-left:-4.4rem;padding-left:4rem}.md-source--bitbucket:before{background-image:url(../images/icons/bitbucket-white-42306ad0de.svg)}.md-source--github:before{background-image:url(../images/icons/github-white-1cfc8ff99e.svg)}.md-source--gitlab:before{background-image:url(../images/icons/gitlab-white-d65054b8fe.svg)}.md-source__repository{display:inline-block;max-width:100%;margin-left:.8rem;font-weight:700;text-overflow:ellipsis;overflow:hidden;vertical-align:middle}.md-source__facts{margin:0;padding:0;font-size:1.1rem;font-weight:700;opacity:.75;list-style-type:none}.md-source__fact{float:left;-webkit-transform:translateY(0);transform:translateY(0);-webkit-transition:opacity .25s,-webkit-transform .25s cubic-bezier(.1,.7,.1,1);transition:opacity .25s,-webkit-transform .25s cubic-bezier(.1,.7,.1,1);transition:transform .25s cubic-bezier(.1,.7,.1,1),opacity .25s;transition:transform .25s cubic-bezier(.1,.7,.1,1),opacity .25s,-webkit-transform .25s cubic-bezier(.1,.7,.1,1);opacity:1}.md-source__fact--hidden{-webkit-transform:translateY(100%);transform:translateY(100%);opacity:0}.md-source__fact:before{margin:0 .2rem;content:"\00B7"}.md-source__fact:first-child:before{display:none}.admonition{position:relative;margin:2rem 0;padding:.8rem 1.2rem;border-left:3.2rem solid rgba(68,138,255,.4);border-radius:.2rem;background:rgba(68,138,255,.15);font-size:1.28rem}.admonition:before{position:absolute;left:-2.6rem;color:#fff;font-size:2rem;content:"edit";vertical-align:-.25em}.admonition-title{font-weight:700}html .admonition-title{margin-bottom:0}.admonition :first-child,html .admonition-title+*{margin-top:0}.admonition :last-child{margin-bottom:0}.admonition.summary,.admonition.tldr{border-color:rgba(0,176,255,.4);background:rgba(0,176,255,.15)}.admonition.summary:before,.admonition.tldr:before{content:"subject"}.admonition.idea,.admonition.tip{border-color:rgba(0,191,165,.4);background:rgba(0,191,165,.15)}.admonition.idea:before,.admonition.tip:before{content:"whatshot"}.admonition.check,.admonition.done,.admonition.success{border-color:rgba(0,230,118,.4);background:rgba(0,230,118,.15)}.admonition.check:before,.admonition.done:before,.admonition.success:before{content:"done"}.admonition.attention,.admonition.important,.admonition.warning{border-color:rgba(255,145,0,.4);background:rgba(255,145,0,.15)}.admonition.attention:before,.admonition.important:before,.admonition.warning:before{content:"warning"}.admonition.fail,.admonition.failure,.admonition.missing{border-color:rgba(255,82,82,.4);background:rgba(255,82,82,.15)}.admonition.fail:before,.admonition.failure:before,.admonition.missing:before{content:"clear"}.admonition.caution,.admonition.danger{border-color:rgba(255,23,68,.4);background:rgba(255,23,68,.15)}.admonition.caution:before,.admonition.danger:before{content:"flash_on"}.admonition.bug,.admonition.error{border-color:rgba(245,0,87,.4);background:rgba(245,0,87,.15)}.admonition.bug:before,.admonition.error:before{content:"bug_report"}.codehilite .o,.codehilite .ow{color:inherit}.codehilite .ge{color:#000}.codehilite .gr{color:#a00}.codehilite .gh{color:#999}.codehilite .go{color:#888}.codehilite .gp{color:#555}.codehilite .gs{color:inherit}.codehilite .gu{color:#aaa}.codehilite .gt{color:#a00}.codehilite .gd{background-color:#fdd}.codehilite .gi{background-color:#dfd}.codehilite .k{color:#3b78e7}.codehilite .kc{color:#a71d5d}.codehilite .kd,.codehilite .kn{color:#3b78e7}.codehilite .kp{color:#a71d5d}.codehilite .kr,.codehilite .kt{color:#3e61a2}.codehilite .c,.codehilite .cm{color:#999}.codehilite .cp{color:#666}.codehilite .c1,.codehilite .ch,.codehilite .cs{color:#999}.codehilite .na,.codehilite .nb{color:#c2185b}.codehilite .bp{color:#3e61a2}.codehilite .nc{color:#c2185b}.codehilite .no{color:#3e61a2}.codehilite .nd,.codehilite .ni{color:#666}.codehilite .ne,.codehilite .nf{color:#c2185b}.codehilite .nl{color:#3b5179}.codehilite .nn{color:#ec407a}.codehilite .nt{color:#3b78e7}.codehilite .nv,.codehilite .vc,.codehilite .vg,.codehilite .vi{color:#3e61a2}.codehilite .nx{color:#ec407a}.codehilite .il,.codehilite .m,.codehilite .mf,.codehilite .mh,.codehilite .mi,.codehilite .mo{color:#e74c3c}.codehilite .s,.codehilite .sb,.codehilite .sc{color:#0d904f}.codehilite .sd{color:#999}.codehilite .s2{color:#0d904f}.codehilite .se,.codehilite .sh,.codehilite .si,.codehilite .sx{color:#183691}.codehilite .sr{color:#009926}.codehilite .s1,.codehilite .ss{color:#0d904f}.codehilite .err{color:#a61717}.codehilite .w{color:transparent}.codehilite .hll{display:block;margin:0 -1.2rem;padding:0 1.2rem;background:rgba(255,235,59,.5)}.md-typeset .codehilite{margin:1em 0;padding:1rem 1.2rem .8rem;border-radius:.2rem;background:rgba(0,0,0,.035);color:#37474f;line-height:1.4;overflow:auto;-webkit-overflow-scrolling:touch}.md-typeset .codehilite::-webkit-scrollbar{width:.4rem;height:.4rem}.md-typeset .codehilite::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.26)}.md-typeset .codehilite::-webkit-scrollbar-thumb:hover{background-color:#536dfe}.md-typeset .codehilite pre{display:inline-block;min-width:100%;margin:0;padding:0;background:transparent;overflow:visible;vertical-align:top}.md-typeset .codehilitetable{display:block;border-radius:.2em;font-size:1.6rem;overflow:hidden}.md-typeset .codehilitetable tbody,.md-typeset .codehilitetable td{display:block;padding:0}.md-typeset .codehilitetable tr{display:-webkit-box;display:-ms-flexbox;display:flex}.md-typeset .codehilitetable .codehilite,.md-typeset .codehilitetable .linenodiv{margin:0;border-radius:0}.md-typeset .codehilitetable .linenodiv{padding:1rem 1.2rem .8rem}.md-typeset .codehilitetable .linenodiv,.md-typeset .codehilitetable .linenodiv>pre{height:100%}.md-typeset .codehilitetable .linenos{background:rgba(0,0,0,.07);color:rgba(0,0,0,.26);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.md-typeset .codehilitetable .linenos pre{margin:0;padding:0;background:transparent;color:inherit;text-align:right}.md-typeset .codehilitetable .code{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden}.md-typeset .footnote{color:rgba(0,0,0,.54);font-size:80%}.md-typeset .footnote ol{margin-left:0}.md-typeset .footnote li:hover .footnote-backref,.md-typeset .footnote li:target .footnote-backref{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}.md-typeset .footnote li:hover .footnote-backref:hover,.md-typeset .footnote li:target .footnote-backref{color:#536dfe}.md-typeset .footnote-ref:before{position:absolute;margin-top:-8rem;padding-top:8rem;content:"";pointer-events:none}.md-typeset .footnote-backref{position:absolute;-webkit-transform:translateX(.5rem);transform:translateX(.5rem);-webkit-transition:color .25s,opacity .125s .125s,-webkit-transform .25s .125s;transition:color .25s,opacity .125s .125s,-webkit-transform .25s .125s;transition:transform .25s .125s,color .25s,opacity .125s .125s;transition:transform .25s .125s,color .25s,opacity .125s .125s,-webkit-transform .25s .125s;color:rgba(0,0,0,.26);font-size:2rem;opacity:0;vertical-align:middle}.md-typeset .footnote-backref:first-letter{font-size:0}.md-typeset .footnote-backref:after{content:"keyboard_return"}.md-typeset .headerlink{display:inline-block;margin-left:1rem;-webkit-transform:translateY(.5rem);transform:translateY(.5rem);-webkit-transition:color .25s,opacity .125s .25s,-webkit-transform .25s .25s;transition:color .25s,opacity .125s .25s,-webkit-transform .25s .25s;transition:transform .25s .25s,color .25s,opacity .125s .25s;transition:transform .25s .25s,color .25s,opacity .125s .25s,-webkit-transform .25s .25s;color:rgba(0,0,0,.26);opacity:0}.md-typeset [id] .headerlink:focus,.md-typeset [id]:hover .headerlink,.md-typeset [id]:target .headerlink{-webkit-transform:translate(0);transform:translate(0);opacity:1}.md-typeset [id] .headerlink:focus,.md-typeset [id]:hover .headerlink:hover,.md-typeset [id]:target .headerlink{color:#536dfe}.md-typeset h1[id]:before{display:block;margin-top:-11rem;padding-top:11rem;content:""}.md-typeset h2[id]:before{display:block;margin-top:-8.2rem;padding-top:8.2rem;content:""}.md-typeset h3[id]:before{display:block;margin-top:-8.4rem;padding-top:8.4rem;content:""}.md-typeset h4[id]:before{display:block;margin-top:-8.6rem;padding-top:8.6rem;content:""}.md-typeset h5[id]:before,.md-typeset h6[id]:before{display:block;margin-top:-9rem;padding-top:9rem;content:""}.md-search-result__meta{background:rgba(0,0,0,.07);color:rgba(0,0,0,.54);padding-left:4.8rem;padding-right:1.6rem;line-height:4rem;font-size:1.28rem}.md-search-result__item{box-shadow:0 -.1rem 0 rgba(0,0,0,.07)}.md-search-result__list{margin:0;padding:0;list-style-type:none;border-top:.1rem solid rgba(0,0,0,.07)}.md-search-result__link{overflow:auto;display:block;padding-left:4.8rem;padding-right:1.6rem;-webkit-transition:background .25s;transition:background .25s}.md-search-result__link:hover{background:rgba(83,109,254,.1)}.md-search-result__article{margin:1em 0}.md-search-result__title{color:rgba(0,0,0,.87);font-size:1.6rem;font-weight:400;line-height:1.4;margin-top:.5em;margin-bottom:0}.md-search-result__teaser{color:rgba(0,0,0,.54);font-size:1.28rem;line-height:1.4;margin:.5em 0;word-break:break-word}del.critic,ins.critic,mark{margin:0 .4rem;padding:.1rem 0;word-break:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:.2rem}ins.critic{background:#dfd;box-shadow:.4rem 0 0 #dfd,-.4rem 0 0 #dfd;text-decoration:none}del.critic{background:#fdd;box-shadow:.4rem 0 0 #fdd,-.4rem 0 0 #fdd}mark{background:#ff0;box-shadow:.4rem 0 0 #ff0,-.4rem 0 0 #ff0}.critic.comment{margin:0 .4rem;padding:.1rem 0;border-radius:.2rem;background:#f0f0f0;color:#37474f;box-shadow:.4rem 0 0 #f0f0f0,-.4rem 0 0 #f0f0f0;-webkit-box-decoration-break:clone;box-decoration-break:clone}.critic.comment:before{color:rgba(0,0,0,.26);content:"chat";font-size:1.6rem;padding-right:.2rem;vertical-align:-.2rem}.md-button{float:right;margin-top:9px;font-size:13px;padding-left:2.6rem;font-weight:700;text-transform:uppercase}.task-list-item{list-style-type:none!important}.task-list-item input[type=checkbox]{margin:0 4px .25em -20px;vertical-align:middle}.task-list-control{display:inline;position:relative;display:inline-block;color:#555;cursor:pointer}.task-list-control input[type=checkbox]{position:absolute;opacity:0;z-index:-1}.task-list-indicator{position:absolute;top:-8px;left:-18px;display:block;width:14px;height:14px;color:#eee;background-color:#eee;border-radius:.25rem}.task-list-control input[type=checkbox]:checked+.task-list-indicator:before{display:block;margin-top:-4px;margin-left:2px;font-size:16px;line-height:1;content:"✔";color:#1ebb52}@media print{.md-typeset a:after{color:rgba(0,0,0,.54);content:" [" attr(href) "]"}.md-typeset code{box-shadow:none;-webkit-box-decoration-break:initial;box-decoration-break:slice}.md-footer,.md-header,.md-sidebar,.md-typeset .headerlink{display:none}}@media only screen and (max-width:44.9375em){.md-typeset pre{margin:1em -1.6rem;padding:1rem 1.6rem;border-radius:0}.codehilite .hll{margin:0 -1.6rem;padding:0 1.6rem}.md-typeset .codehilite{margin:1em -1.6rem;padding:1rem 1.6rem .8rem;border-radius:0}.md-typeset>.codehilitetable{margin:0 -1.6rem;border-radius:0}.md-typeset>.codehilitetable .codehilite,.md-typeset>.codehilitetable .linenodiv{padding:1rem 1.6rem}}@media only screen and (min-width:100em){html{font-size:68.75%}}@media only screen and (min-width:125em){html{font-size:75%}}@media only screen and (max-width:59.9375em){body[data-md-locked]{height:100%;overflow:hidden}.md-nav--secondary{border-left:0}html .md-nav__link[for=toc]{display:block}html .md-nav__link[for=toc]:after{-webkit-transform:translateY(-50%);transform:translateY(-50%);color:#536dfe;content:"toc"}html .md-nav__link[for=toc]+.md-nav__link{display:none}html .md-nav__link[for=toc]~.md-nav{display:-webkit-box;display:-ms-flexbox;display:flex}.md-nav__source{display:block;padding:.4rem;background:rgba(0,0,0,.87);color:#fff}.md-search__overlay{display:block;position:absolute;top:.4rem;left:.4rem;width:4rem;height:4rem;-webkit-transform-origin:center;transform-origin:center;-webkit-transition:opacity .2s .2s,-webkit-transform .3s .1s;transition:opacity .2s .2s,-webkit-transform .3s .1s;transition:transform .3s .1s,opacity .2s .2s;transition:transform .3s .1s,opacity .2s .2s,-webkit-transform .3s .1s;border-radius:2rem;background:#fff;opacity:0;overflow:hidden;z-index:1}.md-toggle--search:checked~.md-header .md-search__overlay{-webkit-transition:opacity .1s,-webkit-transform .4s;transition:opacity .1s,-webkit-transform .4s;transition:transform .4s,opacity .1s;transition:transform .4s,opacity .1s,-webkit-transform .4s;opacity:1}.md-search__inner{position:fixed;top:0;left:100%;height:100%;-webkit-transform:translateX(5%);transform:translateX(5%);-webkit-transition:left 0s .3s,opacity .15s .15s,-webkit-transform .15s cubic-bezier(.4,0,.2,1) .15s;transition:left 0s .3s,opacity .15s .15s,-webkit-transform .15s cubic-bezier(.4,0,.2,1) .15s;transition:left 0s .3s,transform .15s cubic-bezier(.4,0,.2,1) .15s,opacity .15s .15s;transition:left 0s .3s,transform .15s cubic-bezier(.4,0,.2,1) .15s,opacity .15s .15s,-webkit-transform .15s cubic-bezier(.4,0,.2,1) .15s;opacity:0;z-index:2}.md-toggle--search:checked~.md-header .md-search__inner{left:0;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition:left 0s 0s,opacity .15s .15s,-webkit-transform .15s cubic-bezier(.1,.7,.1,1) .15s;transition:left 0s 0s,opacity .15s .15s,-webkit-transform .15s cubic-bezier(.1,.7,.1,1) .15s;transition:left 0s 0s,transform .15s cubic-bezier(.1,.7,.1,1) .15s,opacity .15s .15s;transition:left 0s 0s,transform .15s cubic-bezier(.1,.7,.1,1) .15s,opacity .15s .15s,-webkit-transform .15s cubic-bezier(.1,.7,.1,1) .15s;opacity:1}.md-search__input{width:100%;height:5.6rem;font-size:1.8rem}.md-search__icon{top:1.6rem;left:1.6rem}.md-search__icon:before{content:"arrow_back"}.md-search__output{top:5.6rem;bottom:0}.md-search-result__link{padding:0 1.6rem}.md-search-result__meta{padding-left:1.6rem}}@media only screen and (max-width:74.9375em){.md-toggle--drawer:checked~.md-overlay{width:100%;height:100%;-webkit-transition:width 0s,height 0s,opacity .25s;transition:width 0s,height 0s,opacity .25s;opacity:1}.md-header-nav__icon--home{display:none}.md-nav--primary,.md-nav--primary .md-nav{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;top:0;right:0;left:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;z-index:1}.md-nav--primary{background:#fff}.md-nav--primary .md-nav__toggle~.md-nav{box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4);left:.4rem;background:#fff}html .md-nav--primary .md-nav__title{position:relative;padding:.4rem 1.6rem .4rem 5.6rem;background:rgba(0,0,0,.07);color:rgba(0,0,0,.54);font-size:1.8rem;font-weight:400;line-height:4.8rem;white-space:nowrap;cursor:pointer}html .md-nav--primary .md-nav__title:before{display:block;position:absolute;left:.4rem;width:4rem;height:4rem;color:rgba(0,0,0,.54)}html .md-nav--primary .md-nav__title~.md-nav__list>.md-nav__item:first-child{border-top:0}.md-nav--primary .md-nav__list{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:scroll}.md-nav--primary .md-nav__item{padding:0;border-top:.1rem solid rgba(0,0,0,.07)}.md-nav--primary .md-nav__item--nested>.md-nav__link{padding-right:4.8rem}.md-nav--primary .md-nav__link{position:relative;padding:1.6rem}.md-nav--primary .md-nav__link:after{position:absolute;top:50%;right:1.2rem;-webkit-transform:translateY(-50%) rotate(-90deg);transform:translateY(-50%) rotate(-90deg);-webkit-transition:inherit;transition:inherit;color:rgba(0,0,0,.54);font-size:2.4rem}.md-nav--primary .md-nav__link:hover:after{color:#536dfe}.md-nav--primary .md-nav--secondary .md-nav{position:static}.md-nav--primary .md-nav--secondary .md-nav .md-nav__link{padding-left:2.8rem}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav__link{padding-left:4rem}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav__link{padding-left:5.2rem}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav .md-nav__link{padding-left:6.4rem}.md-nav__toggle~.md-nav{display:none}.csstransforms3d .md-nav__toggle~.md-nav{display:block;-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transition:opacity .125s .05s,-webkit-transform .25s cubic-bezier(.8,0,.6,1);transition:opacity .125s .05s,-webkit-transform .25s cubic-bezier(.8,0,.6,1);transition:transform .25s cubic-bezier(.8,0,.6,1),opacity .125s .05s;transition:transform .25s cubic-bezier(.8,0,.6,1),opacity .125s .05s,-webkit-transform .25s cubic-bezier(.8,0,.6,1);opacity:0}.md-nav__toggle:checked~.md-nav{display:block}.csstransforms3d .md-nav__toggle:checked~.md-nav{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition:opacity .125s .125s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:opacity .125s .125s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .125s .125s;transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .125s .125s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);opacity:1}.md-nav .md-nav__item,.md-nav .md-nav__title{font-size:1.6rem;line-height:1.4}.md-sidebar--primary{position:fixed;top:0;left:-24.2rem;width:24.2rem;height:100%;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition:box-shadow .25s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:box-shadow .25s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),box-shadow .25s;transition:transform .25s cubic-bezier(.4,0,.2,1),box-shadow .25s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);background:#fff;z-index:2}.no-csstransforms3d .md-sidebar--primary{display:none}.md-toggle--drawer:checked~.md-container .md-sidebar--primary{box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.4);-webkit-transform:translateX(24.2rem);transform:translateX(24.2rem)}.no-csstransforms3d .md-toggle--drawer:checked~.md-container .md-sidebar--primary{display:block}.md-sidebar--primary .md-sidebar__scrollwrap{overflow:hidden;margin:0}}@media only screen and (min-width:60em){.md-content{margin-right:24.2rem}.md-header-nav__icon--search{display:none}.md-header-nav__source{display:block;width:23rem;max-width:23rem;padding-right:1.2rem}.md-search{padding:.4rem;padding-right:3.2rem}.md-search__inner{display:table;position:relative;clear:both}.md-search__form{width:23rem;float:right;-webkit-transition:width .25s cubic-bezier(.1,.7,.1,1);transition:width .25s cubic-bezier(.1,.7,.1,1);border-radius:.2rem}.md-search__input{width:100%;height:4rem;padding-left:4.8rem;-webkit-transition:background-color .25s,color .25s;transition:background-color .25s,color .25s;border-radius:.2rem;background:rgba(0,0,0,.26);color:#fff;font-size:1.6rem}.md-search__input+.md-search__icon,.md-search__input::-webkit-input-placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input+.md-search__icon,.md-search__input::-moz-placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input+.md-search__icon,.md-search__input:-ms-input-placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input+.md-search__icon,.md-search__input::placeholder{-webkit-transition:color .25s;transition:color .25s;color:#fff}.md-search__input:hover{background:hsla(0,0%,100%,.12)}.md-toggle--search:checked~.md-header .md-search__input{border-radius:.2rem .2rem 0 0;background:#fff;color:rgba(0,0,0,.87);text-overflow:none}.md-toggle--search:checked~.md-header .md-search__input+.md-search__icon,.md-toggle--search:checked~.md-header .md-search__input::-webkit-input-placeholder{color:rgba(0,0,0,.54)}.md-toggle--search:checked~.md-header .md-search__input+.md-search__icon,.md-toggle--search:checked~.md-header .md-search__input::-moz-placeholder{color:rgba(0,0,0,.54)}.md-toggle--search:checked~.md-header .md-search__input+.md-search__icon,.md-toggle--search:checked~.md-header .md-search__input:-ms-input-placeholder{color:rgba(0,0,0,.54)}.md-toggle--search:checked~.md-header .md-search__input+.md-search__icon,.md-toggle--search:checked~.md-header .md-search__input::placeholder{color:rgba(0,0,0,.54)}.md-search__output{box-shadow:0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12),0 3px 5px -1px rgba(0,0,0,.4);top:4rem;-webkit-transition:opacity .4s;transition:opacity .4s;opacity:0}.md-toggle--search:checked~.md-header .md-search__output{opacity:1}.md-search__scrollwrap{max-height:0}.md-toggle--search:checked~.md-header .md-search__scrollwrap{max-height:75vh}.md-search__scrollwrap::-webkit-scrollbar{width:.4rem;height:.4rem}.md-search__scrollwrap::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.26)}.md-search__scrollwrap::-webkit-scrollbar-thumb:hover{background-color:#536dfe}.md-sidebar--secondary{display:block;float:right}.md-sidebar--secondary[data-md-locked]{margin-left:100%;-webkit-transform:translate(-100%);transform:translate(-100%)}}@media only screen and (min-width:75em){.md-content{margin-left:24.2rem}.md-content__inner{margin:2.4rem}.md-header-nav__icon--menu{display:none}.md-nav[data-md-animated]{-webkit-transition:max-height .25s cubic-bezier(.86,0,.07,1);transition:max-height .25s cubic-bezier(.86,0,.07,1)}.md-nav__toggle~.md-nav{max-height:0;overflow:hidden}.md-nav[data-md-expanded],.md-nav__toggle:checked~.md-nav{max-height:100%}.md-nav__title+.md-nav__list .md-nav__title{display:none}.md-nav__item--nested>.md-nav__link:after{display:inline-block;-webkit-transform-origin:.45em .45em;transform-origin:.45em .45em;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;vertical-align:-.125em}.js .md-nav__item--nested>.md-nav__link:after{-webkit-transition:-webkit-transform .4s;transition:-webkit-transform .4s;transition:transform .4s;transition:transform .4s,-webkit-transform .4s}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotateX(180deg);transform:rotateX(180deg)}.md-toggle--search:checked~.md-header .md-search__form{width:66.8rem}.md-sidebar__inner{border-right:.1rem solid rgba(0,0,0,.07)}}@media only screen and (min-width:30em){.md-footer-nav__link{width:50%}}@media only screen and (max-width:29.9375em){.md-footer-nav__link--prev .md-footer-nav__title{display:none}.md-toggle--search:checked~.md-header .md-search__overlay{-webkit-transform:scale(45);transform:scale(45)}}@media only screen and (min-width:30em) and (max-width:44.9375em){.md-toggle--search:checked~.md-header .md-search__overlay{-webkit-transform:scale(60);transform:scale(60)}}@media only screen and (min-width:45em) and (max-width:59.9375em){.md-toggle--search:checked~.md-header .md-search__overlay{-webkit-transform:scale(75);transform:scale(75)}}@media only screen and (min-width:60em) and (max-width:74.9375em){.md-toggle--search:checked~.md-header .md-search__form{width:46.8rem}}@media only screen and (min-width:60em) and (min-width:75em){.md-sidebar--secondary[data-md-locked]{margin-left:120rem}} \ No newline at end of file diff --git a/material/assets/stylesheets/application.css b/material/assets/stylesheets/application.css deleted file mode 100644 index 9fb75fb16..000000000 --- a/material/assets/stylesheets/application.css +++ /dev/null @@ -1,1629 +0,0 @@ -@charset "UTF-8"; -html { - box-sizing: border-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; } - -*, -*::before, -*::after { - box-sizing: inherit; - -moz-box-sizing: inherit; - -webkit-box-sizing: inherit; } - -html { - -webkit-text-size-adjust: none; - -ms-text-size-adjust: none; - text-size-adjust: none; } - -body { - margin: 0; } - -article, -aside, -figcaption, -figure, -footer, -header, -main, -nav, -section { - display: block; } - -hr { - overflow: visible; - box-sizing: content-box; } - -a { - color: inherit; - text-decoration: none; } - a:active, a:hover { - outline-width: 0; } - -a { - -webkit-text-decoration-skip: objects; } - -a, -button, -label, -input { - -webkit-tap-highlight-color: transparent; } - -small { - font-size: 80%; } - -sub, -sup { - position: relative; - font-size: 80%; - line-height: 0; - vertical-align: baseline; } - -sub { - bottom: -0.25em; } - -sup { - top: -0.5em; } - -img { - border-style: none; } - -table { - border-collapse: collapse; - border-spacing: 0; } - -td, -th { - font-weight: normal; - text-align: left; - vertical-align: top; } - -button { - padding: 0; - border: 0; - outline: 0; - background: transparent; - font-size: inherit; } - -input { - border: 0; - outline: 0; } - -.md-icon, .md-nav__title::before, .md-nav__link::after, .admonition::before, .md-typeset .footnote-backref, .checklist li::before, .critic.comment::before { - font-family: "Material Icons"; - font-style: normal; - font-variant: normal; - font-weight: normal; - line-height: 1; - text-transform: none; - white-space: nowrap; - speak: none; - word-wrap: normal; - direction: ltr; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; } - .md-header-nav__icon, .md-footer-nav__icon, .md-nav__title::before { - display: inline-block; - margin: 0.4rem; - padding: 0.8rem; - font-size: 2.4rem; - cursor: pointer; } - -.md-icon--back::before { - content: "arrow_back"; } - -.md-icon--forward::before { - content: "arrow_forward"; } - -body, -input { - color: rgba(0, 0, 0, 0.87); - font-family: "Roboto", Helvetica, Arial, sans-serif; - font-weight: 400; - -webkit-font-feature-settings: "kern", "onum", "liga"; - font-feature-settings: "kern", "onum", "liga"; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; } - .no-fontface body, .no-fontface - input { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } - -pre, -code, -kbd { - color: rgba(0, 0, 0, 0.87); - font-family: "Roboto Mono", "Courier New", Courier, monospace; - font-weight: 400; - -webkit-font-feature-settings: "kern", "onum", "liga"; - font-feature-settings: "kern", "onum", "liga"; } - .no-fontface pre, .no-fontface - code, .no-fontface - kbd { - font-family: "Courier New", Courier, monospace; } - -.md-typeset { - font-size: 1.6rem; - line-height: 1.6; } - .md-typeset p, - .md-typeset ul, - .md-typeset ol, - .md-typeset blockquote { - margin: 1.0em 0; } - .md-typeset h1 { - margin: 0 0 4.0rem; - color: rgba(0, 0, 0, 0.54); - font-size: 3.125rem; - font-weight: 300; - letter-spacing: -0.01em; - line-height: 1.3; } - .md-typeset h2 { - margin: 4.0rem 0 1.6rem; - font-size: 2.5rem; - font-weight: 300; - letter-spacing: -0.01em; - line-height: 1.4; } - .md-typeset h3 { - margin: 3.2rem 0 1.6rem; - font-size: 2rem; - font-weight: 400; - letter-spacing: -0.01em; - line-height: 1.5; } - .md-typeset h2 + h3 { - margin-top: 1.6rem; } - .md-typeset h4 { - margin: 1.6rem 0; - font-size: 1.6rem; - font-weight: 700; - letter-spacing: -0.01em; } - .md-typeset h5, - .md-typeset h6 { - margin: 1.6rem 0; - color: rgba(0, 0, 0, 0.54); - font-size: 1.28rem; - font-weight: 700; - letter-spacing: -0.01em; } - .md-typeset h5 { - text-transform: uppercase; } - .md-typeset hr { - margin: 2.4rem 0; - border-bottom: 0.1rem dotted rgba(0, 0, 0, 0.26); } - .md-typeset a { - color: #3f51b5; } - .md-typeset a, .md-typeset a::before { - -webkit-transition: color 0.125s; - transition: color 0.125s; } - .md-typeset a:hover, .md-typeset a:active { - color: #536dfe; } - .md-typeset code, - .md-typeset pre { - background: rgba(0, 0, 0, 0.035); - color: #37474F; - font-size: 85%; } - .md-typeset code { - margin: 0 0.4rem; - padding: 0.1rem 0; - border-radius: 0.2rem; - box-shadow: 0.4rem 0 0 rgba(0, 0, 0, 0.035), -0.4rem 0 0 rgba(0, 0, 0, 0.035); - word-break: break-word; - -webkit-box-decoration-break: clone; - box-decoration-break: clone; } - .md-typeset h1 code, - .md-typeset h2 code, - .md-typeset h3 code, - .md-typeset h4 code, - .md-typeset h5 code, - .md-typeset h6 code { - margin: 0; - background: transparent; - box-shadow: none; } - .md-typeset pre { - margin: 1.0em 0; - padding: 1.0rem 1.2rem; - border-radius: 0.2rem; - line-height: 1.4; - overflow: auto; - -webkit-overflow-scrolling: touch; } - .md-typeset pre::-webkit-scrollbar { - width: 0.4rem; - height: 0.4rem; } - .md-typeset pre::-webkit-scrollbar-thumb { - background-color: rgba(0, 0, 0, 0.26); } - .md-typeset pre::-webkit-scrollbar-thumb:hover { - background-color: #536dfe; } - .md-typeset pre > code { - margin: 0; - background: none; - font-size: inherit; - box-shadow: none; - -webkit-box-decoration-break: none; - box-decoration-break: none; } - .md-typeset kbd { - display: inline-block; - padding: 0.4rem 0.5rem 0.5rem; - border: 0.1rem solid #c9c9c9; - border-radius: 0.2rem; - border-bottom-color: #bcbcbc; - background-color: #FCFCFC; - color: #555555; - font-size: 85%; - line-height: 1.0rem; - box-shadow: 0 -0.1rem 0 #b0b0b0 inset; - vertical-align: 0.1rem; - word-break: break-word; } - .md-typeset small { - opacity: 0.75; } - .md-typeset sup, - .md-typeset sub { - margin-left: 0.1rem; } - .md-typeset blockquote { - padding-left: 1.2rem; - border-left: 0.4rem solid rgba(0, 0, 0, 0.26); - color: rgba(0, 0, 0, 0.54); } - .md-typeset ul { - list-style-type: disc; } - .md-typeset ol ol { - list-style-type: lower-alpha; } - .md-typeset ol ol ol { - list-style-type: lower-roman; } - .md-typeset ul, - .md-typeset ol { - margin-left: 1.0rem; - padding: 0; } - .md-typeset ul li, - .md-typeset ol li { - margin-bottom: 0.5em; - margin-left: 2.0rem; } - .md-typeset ul li p, - .md-typeset ul li blockquote, - .md-typeset ol li p, - .md-typeset ol li blockquote { - margin: 0.5em 0; } - .md-typeset ul li:last-child, - .md-typeset ol li:last-child { - margin-bottom: 0; } - .md-typeset ul li ul, - .md-typeset ul li ol, - .md-typeset ol li ul, - .md-typeset ol li ol { - margin-bottom: 1.0rem; - margin-left: 1.0rem; - padding-top: 1.0rem; } - .md-typeset table { - margin: 1.5em 0; - font-size: 1.28rem; - overflow: hidden; } - .no-js .md-typeset table { - display: inline-block; - max-width: 100%; - overflow: auto; - -webkit-overflow-scrolling: touch; } - .md-typeset table th { - min-width: 10.0rem; - padding: 1.2rem 1.6rem; - border-bottom: 0.1rem solid rgba(0, 0, 0, 0.54); - color: rgba(0, 0, 0, 0.87); - font-weight: 700; - text-align: left; - vertical-align: top; } - .md-typeset table td { - padding: 1.2rem 1.6rem; - border-top: 0.1rem solid rgba(0, 0, 0, 0.07); - vertical-align: top; } - .md-typeset table tr:first-child td { - border-top: 0; } - -html { - height: 100%; - font-size: 62.5%; } - -body { - position: relative; - min-height: 100%; } - -hr { - display: block; - height: 0.1rem; - padding: 0; - border: 0; } - -.md-grid { - max-width: 120.0rem; - margin-right: auto; - margin-left: auto; } - -.md-container, -.md-main { - overflow: auto; } - -.md-main { - margin-top: 5.6rem; } - .md-main__inner { - margin-top: 3rem; - margin-bottom: 9.2rem; - overflow: auto; } - -.md-toggle { - display: none; } - -.md-overlay { - position: fixed; - top: 0; - width: 0; - height: 0; - -webkit-transition: width 0s 0.25s, height 0s 0.25s, opacity 0.25s; - transition: width 0s 0.25s, height 0s 0.25s, opacity 0.25s; - background: rgba(0, 0, 0, 0.54); - opacity: 0; - z-index: 2; } - -.md-flex { - display: table; } - .md-flex__cell { - display: table-cell; - position: relative; - vertical-align: top; } - .md-flex__cell--shrink { - width: 0%; } - .md-flex__cell--stretch { - display: table; - width: 100%; - table-layout: fixed; } - .md-flex__ellipsis { - display: table-cell; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; } - -@page { - margin: 25mm; } - -.md-content__inner { - margin: 2.4rem 1.6rem; } - -.md-content__copyright { - display: block; } - -.md-header { - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); - position: fixed; - top: 0; - right: 0; - left: 0; - height: 5.6rem; - background: #3f51b5; - color: white; - z-index: 1; } - -.md-header-nav { - padding: 0.4rem; } - .md-header-nav__icon { - position: relative; - -webkit-transition: opacity 0.25s; - transition: opacity 0.25s; - z-index: 1; } - .md-header-nav__icon:hover { - opacity: 0.7; } - .no-js .md-header-nav__icon--search { - display: none; } - .md-header-nav__title { - padding: 0 2.0rem; - font-size: 1.8rem; - line-height: 4.8rem; } - .md-header-nav__source { - display: none; } - -.md-footer { - position: absolute; - bottom: 0; - width: 100%; } - .md-footer__inner { - background: rgba(0, 0, 0, 0.87); - color: white; } - -.md-footer-nav { - padding: 0.4rem; - overflow: auto; } - .md-footer-nav__link { - padding-top: 2.8rem; - padding-bottom: 0.8rem; - -webkit-transition: opacity 0.25s; - transition: opacity 0.25s; } - .md-footer-nav__link:hover { - opacity: 0.7; } - .md-footer-nav__link--prev { - width: 25%; - float: left; } - .md-footer-nav__link--next { - width: 75%; - float: right; - text-align: right; } - .md-footer-nav__icon { - -webkit-transition: background 0.25s; - transition: background 0.25s; } - .md-footer-nav__title { - position: relative; - padding: 0 0.4rem; - font-size: 1.8rem; - line-height: 4.8rem; } - .md-footer-nav__direction { - position: absolute; - right: 0; - left: 0; - margin-top: -2.0rem; - padding: 0 0.4rem; - color: rgba(255, 255, 255, 0.7); - font-size: 1.5rem; } - -.md-nav { - font-size: 1.28rem; - line-height: 1.3; } - .md-nav--secondary { - border-left: 0.4rem solid #3f51b5; } - .md-nav__title { - display: block; - padding: 1.2rem 1.2rem 0; - font-weight: 700; - text-overflow: ellipsis; - overflow: hidden; } - .md-nav__title::before { - display: none; - content: "arrow_back"; } - .md-nav__list { - margin: 0; - padding: 0; - list-style: none; } - .md-nav__item { - padding: 0.625em 1.2rem 0; } - .md-nav__item:last-child { - padding-bottom: 1.2rem; } - .md-nav__item .md-nav__item { - padding-right: 0; } - .md-nav__item .md-nav__item:last-child { - padding-bottom: 0; } - .md-nav__link { - display: block; - -webkit-transition: color 0.125s; - transition: color 0.125s; - text-overflow: ellipsis; - cursor: pointer; - overflow: hidden; } - .md-nav__item--nested > .md-nav__link::after { - content: "expand_more"; } - html .md-nav__link[for="toc"] { - display: none; } - html .md-nav__link[for="toc"] ~ .md-nav { - display: none; } - html .md-nav__link[for="toc"] + .md-nav__link::after { - display: none; } - .md-nav__link[data-md-blurred] { - color: rgba(0, 0, 0, 0.54); } - .md-nav__link:hover, .md-nav__link:active, .md-nav__link--active { - color: #536dfe; } - .md-nav__source { - display: none; } - -.no-js .md-search { - display: none; } - -.md-search__overlay { - display: none; - pointer-events: none; } - -.md-search__inner { - width: 100%; } - -.md-search__form { - position: relative; } - -.md-search__input { - position: relative; - padding: 0 1.6rem 0 7.2rem; - text-overflow: ellipsis; - z-index: 1; } - .md-search__input + .md-search__icon, .md-search__input::-webkit-input-placeholder { - color: rgba(0, 0, 0, 0.54); } - .md-search__input + .md-search__icon, .md-search__input::-moz-placeholder { - color: rgba(0, 0, 0, 0.54); } - .md-search__input + .md-search__icon, .md-search__input:-ms-input-placeholder { - color: rgba(0, 0, 0, 0.54); } - .md-search__input + .md-search__icon, .md-search__input::placeholder { - color: rgba(0, 0, 0, 0.54); } - -.md-search__icon { - position: absolute; - top: 0.8rem; - left: 1.2rem; - -webkit-transition: color 0.25s; - transition: color 0.25s; - font-size: 2.4rem; - cursor: pointer; - z-index: 1; } - .md-search__icon::before { - content: "search"; } - -.md-search__output { - position: absolute; - width: 100%; - border-radius: 0 0 0.2rem 0.2rem; - overflow: hidden; } - -.md-search__scrollwrap { - height: 100%; - background: -webkit-linear-gradient(top, white 10%, rgba(255, 255, 255, 0)), -webkit-linear-gradient(top, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.07) 35%, transparent 60%); - background: linear-gradient(to bottom, white 10%, rgba(255, 255, 255, 0)), linear-gradient(to bottom, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.07) 35%, transparent 60%); - background-attachment: local, scroll; - background-color: white; - background-repeat: no-repeat; - background-size: 100% 2.0rem, 100% 1.0rem; - box-shadow: 0 0.1rem 0 rgba(0, 0, 0, 0.07) inset; - overflow-y: auto; } - -.md-sidebar { - position: relative; - width: 24.2rem; - float: left; - overflow: visible; } - .md-sidebar[data-md-locked] { - position: fixed; - top: 5.6rem; } - .md-sidebar--primary { - -webkit-backface-visibility: hidden; - backface-visibility: hidden; } - .md-sidebar--secondary { - display: none; } - .md-sidebar__scrollwrap { - margin: 2.4rem 0.4rem; - overflow-y: scroll; } - .js .md-sidebar__scrollwrap { - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; } - .md-sidebar__scrollwrap::-webkit-scrollbar { - width: 0.4rem; - height: 0.4rem; } - .md-sidebar__scrollwrap::-webkit-scrollbar-thumb { - background-color: rgba(0, 0, 0, 0.26); } - .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover { - background-color: #536dfe; } - -.md-source { - display: block; - -webkit-transition: opacity 0.25s; - transition: opacity 0.25s; - font-size: 1.3rem; - line-height: 1.2; - white-space: nowrap; } - .md-source:hover { - opacity: 0.7; } - .md-source::before { - display: inline-block; - height: 4.8rem; - content: ""; - vertical-align: middle; } - .md-source--bitbucket::before, .md-source--github::before, .md-source--gitlab::before { - width: 4.8rem; - background-repeat: no-repeat; - background-position: center; - background-size: 2.4rem 2.4rem; } - .md-source--bitbucket .md-source__repository, .md-source--github .md-source__repository, .md-source--gitlab .md-source__repository { - margin-left: -4.4rem; - padding-left: 4.0rem; } - .md-source--bitbucket::before { - background-image: url("../images/icons/bitbucket-white.svg"); } - .md-source--github::before { - background-image: url("../images/icons/github-white.svg"); } - .md-source--gitlab::before { - background-image: url("../images/icons/gitlab-white.svg"); } - .md-source__repository { - display: inline-block; - max-width: 100%; - margin-left: 0.8rem; - font-weight: 700; - text-overflow: ellipsis; - overflow: hidden; - vertical-align: middle; } - .md-source__facts { - margin: 0; - padding: 0; - font-size: 1.1rem; - font-weight: 700; - opacity: 0.75; - list-style-type: none; } - .md-source__fact { - float: left; - -webkit-transform: translateY(0%); - transform: translateY(0%); - -webkit-transition: opacity 0.25s, -webkit-transform 0.25s cubic-bezier(0.1, 0.7, 0.1, 1); - transition: opacity 0.25s, -webkit-transform 0.25s cubic-bezier(0.1, 0.7, 0.1, 1); - transition: transform 0.25s cubic-bezier(0.1, 0.7, 0.1, 1), opacity 0.25s; - transition: transform 0.25s cubic-bezier(0.1, 0.7, 0.1, 1), opacity 0.25s, -webkit-transform 0.25s cubic-bezier(0.1, 0.7, 0.1, 1); - opacity: 1; } - .md-source__fact--hidden { - -webkit-transform: translateY(100%); - transform: translateY(100%); - opacity: 0; } - .md-source__fact::before { - margin: 0 0.2rem; - content: "\00B7"; } - .md-source__fact:first-child::before { - display: none; } - -.admonition { - position: relative; - margin: 2.0rem 0; - padding: 0.8rem 1.2rem; - border-left: 3.2rem solid rgba(68, 138, 255, 0.4); - border-radius: 0.2rem; - background: rgba(68, 138, 255, 0.15); - font-size: 1.28rem; } - .admonition::before { - position: absolute; - left: -2.6rem; - color: white; - font-size: 2.0rem; - content: "edit"; - vertical-align: -0.25em; } - .admonition-title { - font-weight: 700; } - html .admonition-title { - margin-bottom: 0; } - html .admonition-title + * { - margin-top: 0; } - .admonition :first-child { - margin-top: 0; } - .admonition :last-child { - margin-bottom: 0; } - .admonition.tldr, .admonition.summary { - border-color: rgba(0, 176, 255, 0.4); - background: rgba(0, 176, 255, 0.15); } - .admonition.tldr::before, .admonition.summary::before { - content: "subject"; } - .admonition.idea, .admonition.tip { - border-color: rgba(0, 191, 165, 0.4); - background: rgba(0, 191, 165, 0.15); } - .admonition.idea::before, .admonition.tip::before { - content: "whatshot"; } - .admonition.check, .admonition.done, .admonition.success { - border-color: rgba(0, 230, 118, 0.4); - background: rgba(0, 230, 118, 0.15); } - .admonition.check::before, .admonition.done::before, .admonition.success::before { - content: "done"; } - .admonition.attention, .admonition.important, .admonition.warning { - border-color: rgba(255, 145, 0, 0.4); - background: rgba(255, 145, 0, 0.15); } - .admonition.attention::before, .admonition.important::before, .admonition.warning::before { - content: "warning"; } - .admonition.fail, .admonition.missing, .admonition.failure { - border-color: rgba(255, 82, 82, 0.4); - background: rgba(255, 82, 82, 0.15); } - .admonition.fail::before, .admonition.missing::before, .admonition.failure::before { - content: "clear"; } - .admonition.caution, .admonition.danger { - border-color: rgba(255, 23, 68, 0.4); - background: rgba(255, 23, 68, 0.15); } - .admonition.caution::before, .admonition.danger::before { - content: "flash_on"; } - .admonition.bug, .admonition.error { - border-color: rgba(245, 0, 87, 0.4); - background: rgba(245, 0, 87, 0.15); } - .admonition.bug::before, .admonition.error::before { - content: "bug_report"; } - -.codehilite .o { - color: inherit; } - -.codehilite .ow { - color: inherit; } - -.codehilite .ge { - color: #000000; } - -.codehilite .gr { - color: #AA0000; } - -.codehilite .gh { - color: #999999; } - -.codehilite .go { - color: #888888; } - -.codehilite .gp { - color: #555555; } - -.codehilite .gs { - color: inherit; } - -.codehilite .gu { - color: #AAAAAA; } - -.codehilite .gt { - color: #AA0000; } - -.codehilite .gd { - background-color: #FFDDDD; } - -.codehilite .gi { - background-color: #DDFFDD; } - -.codehilite .k { - color: #3B78E7; } - -.codehilite .kc { - color: #A71D5D; } - -.codehilite .kd { - color: #3B78E7; } - -.codehilite .kn { - color: #3B78E7; } - -.codehilite .kp { - color: #A71D5D; } - -.codehilite .kr { - color: #3E61A2; } - -.codehilite .kt { - color: #3E61A2; } - -.codehilite .c { - color: #999999; } - -.codehilite .cm { - color: #999999; } - -.codehilite .cp { - color: #666666; } - -.codehilite .c1 { - color: #999999; } - -.codehilite .ch { - color: #999999; } - -.codehilite .cs { - color: #999999; } - -.codehilite .na { - color: #C2185B; } - -.codehilite .nb { - color: #C2185B; } - -.codehilite .bp { - color: #3E61A2; } - -.codehilite .nc { - color: #C2185B; } - -.codehilite .no { - color: #3E61A2; } - -.codehilite .nd { - color: #666666; } - -.codehilite .ni { - color: #666666; } - -.codehilite .ne { - color: #C2185B; } - -.codehilite .nf { - color: #C2185B; } - -.codehilite .nl { - color: #3B5179; } - -.codehilite .nn { - color: #EC407A; } - -.codehilite .nt { - color: #3B78E7; } - -.codehilite .nv { - color: #3E61A2; } - -.codehilite .vc { - color: #3E61A2; } - -.codehilite .vg { - color: #3E61A2; } - -.codehilite .vi { - color: #3E61A2; } - -.codehilite .nx { - color: #EC407A; } - -.codehilite .m { - color: #E74C3C; } - -.codehilite .mf { - color: #E74C3C; } - -.codehilite .mh { - color: #E74C3C; } - -.codehilite .mi { - color: #E74C3C; } - -.codehilite .il { - color: #E74C3C; } - -.codehilite .mo { - color: #E74C3C; } - -.codehilite .s { - color: #0D904F; } - -.codehilite .sb { - color: #0D904F; } - -.codehilite .sc { - color: #0D904F; } - -.codehilite .sd { - color: #999999; } - -.codehilite .s2 { - color: #0D904F; } - -.codehilite .se { - color: #183691; } - -.codehilite .sh { - color: #183691; } - -.codehilite .si { - color: #183691; } - -.codehilite .sx { - color: #183691; } - -.codehilite .sr { - color: #009926; } - -.codehilite .s1 { - color: #0D904F; } - -.codehilite .ss { - color: #0D904F; } - -.codehilite .err { - color: #A61717; } - -.codehilite .w { - color: transparent; } - -.codehilite .hll { - display: block; - margin: 0 -1.2rem; - padding: 0 1.2rem; - background: rgba(255, 235, 59, 0.5); } - -.md-typeset .codehilite { - margin: 1.0em 0; - padding: 1.0rem 1.2rem 0.8rem; - border-radius: 0.2rem; - background: rgba(0, 0, 0, 0.035); - color: #37474F; - line-height: 1.4; - overflow: auto; - -webkit-overflow-scrolling: touch; } - .md-typeset .codehilite::-webkit-scrollbar { - width: 0.4rem; - height: 0.4rem; } - .md-typeset .codehilite::-webkit-scrollbar-thumb { - background-color: rgba(0, 0, 0, 0.26); } - .md-typeset .codehilite::-webkit-scrollbar-thumb:hover { - background-color: #536dfe; } - .md-typeset .codehilite pre { - display: inline-block; - min-width: 100%; - margin: 0; - padding: 0; - background: transparent; - overflow: visible; - vertical-align: top; } - -.md-typeset .codehilitetable { - display: block; - border-radius: 0.2em; - font-size: 1.6rem; - overflow: hidden; } - .md-typeset .codehilitetable tbody, - .md-typeset .codehilitetable td { - display: block; - padding: 0; } - .md-typeset .codehilitetable tr { - display: -webkit-box; - display: -ms-flexbox; - display: flex; } - .md-typeset .codehilitetable .codehilite, - .md-typeset .codehilitetable .linenodiv { - margin: 0; - border-radius: 0; } - .md-typeset .codehilitetable .linenodiv { - padding: 1.0rem 1.2rem 0.8rem; } - .md-typeset .codehilitetable .linenodiv, - .md-typeset .codehilitetable .linenodiv > pre { - height: 100%; } - .md-typeset .codehilitetable .linenos { - background: rgba(0, 0, 0, 0.07); - color: rgba(0, 0, 0, 0.26); - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; } - .md-typeset .codehilitetable .linenos pre { - margin: 0; - padding: 0; - background: transparent; - color: inherit; - text-align: right; } - .md-typeset .codehilitetable .code { - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1; - overflow: hidden; } - -.md-typeset .footnote { - color: rgba(0, 0, 0, 0.54); - font-size: 80%; } - .md-typeset .footnote ol { - margin-left: 0; } - .md-typeset .footnote li:hover .footnote-backref, - .md-typeset .footnote li:target .footnote-backref { - -webkit-transform: translateX(0); - transform: translateX(0); - opacity: 1; } - .md-typeset .footnote li:hover .footnote-backref:hover, - .md-typeset .footnote li:target .footnote-backref { - color: #536dfe; } - .md-typeset .footnote-ref::before { - position: absolute; - margin-top: -8rem; - padding-top: 8rem; - content: ""; - pointer-events: none; } - .md-typeset .footnote-backref { - position: absolute; - -webkit-transform: translateX(0.5rem); - transform: translateX(0.5rem); - -webkit-transition: color 0.25s, opacity 0.125s 0.125s, -webkit-transform 0.25s 0.125s; - transition: color 0.25s, opacity 0.125s 0.125s, -webkit-transform 0.25s 0.125s; - transition: transform 0.25s 0.125s, color 0.25s, opacity 0.125s 0.125s; - transition: transform 0.25s 0.125s, color 0.25s, opacity 0.125s 0.125s, -webkit-transform 0.25s 0.125s; - color: rgba(0, 0, 0, 0.26); - font-size: 2.0rem; - opacity: 0; - vertical-align: middle; } - .md-typeset .footnote-backref::first-letter { - font-size: 0; } - .md-typeset .footnote-backref::after { - content: "keyboard_return"; } - -.md-typeset .headerlink { - display: inline-block; - margin-left: 1.0rem; - -webkit-transform: translate(0, 0.5rem); - transform: translate(0, 0.5rem); - -webkit-transition: color 0.25s, opacity 0.125s 0.25s, -webkit-transform 0.25s 0.25s; - transition: color 0.25s, opacity 0.125s 0.25s, -webkit-transform 0.25s 0.25s; - transition: transform 0.25s 0.25s, color 0.25s, opacity 0.125s 0.25s; - transition: transform 0.25s 0.25s, color 0.25s, opacity 0.125s 0.25s, -webkit-transform 0.25s 0.25s; - color: rgba(0, 0, 0, 0.26); - opacity: 0; } - -.md-typeset [id]:hover .headerlink, -.md-typeset [id]:target .headerlink, -.md-typeset [id] .headerlink:focus { - -webkit-transform: translate(0, 0); - transform: translate(0, 0); - opacity: 1; } - -.md-typeset [id]:hover .headerlink:hover, -.md-typeset [id]:target .headerlink, -.md-typeset [id] .headerlink:focus { - color: #536dfe; } - -.md-typeset h1[id]::before { - display: block; - margin-top: -11rem; - padding-top: 11rem; - content: ""; } - -.md-typeset h2[id]::before { - display: block; - margin-top: -8.2rem; - padding-top: 8.2rem; - content: ""; } - -.md-typeset h3[id]::before { - display: block; - margin-top: -8.4rem; - padding-top: 8.4rem; - content: ""; } - -.md-typeset h4[id]::before { - display: block; - margin-top: -8.6rem; - padding-top: 8.6rem; - content: ""; } - -.md-typeset h5[id]::before { - display: block; - margin-top: -9rem; - padding-top: 9rem; - content: ""; } - -.md-typeset h6[id]::before { - display: block; - margin-top: -9rem; - padding-top: 9rem; - content: ""; } - -.md-search-result__meta { - background: rgba(0, 0, 0, 0.07); - color: rgba(0, 0, 0, 0.54); - padding-left: 4.8rem; - padding-right: 1.6rem; - line-height: 4.0rem; - font-size: 1.28rem; } - -.md-search-result__item { - box-shadow: 0 -0.1rem 0 rgba(0, 0, 0, 0.07); } - -.md-search-result__list { - margin: 0; - padding: 0; - list-style-type: none; - border-top: 0.1rem solid rgba(0, 0, 0, 0.07); } - -.md-search-result__link { - overflow: auto; - display: block; - padding-left: 4.8rem; - padding-right: 1.6rem; - -webkit-transition: background 0.25s; - transition: background 0.25s; } - .md-search-result__link:hover { - background: rgba(83, 109, 254, 0.1); } - -.md-search-result__article { - margin: 1.0em 0; } - -.md-search-result__title { - color: rgba(0, 0, 0, 0.87); - font-size: 1.6rem; - font-weight: 400; - line-height: 1.4; - margin-top: 0.5em; - margin-bottom: 0; } - -.md-search-result__teaser { - color: rgba(0, 0, 0, 0.54); - font-size: 1.28rem; - line-height: 1.4; - margin: 0.5em 0; - word-break: break-word; } - -.checklist li { - position: relative; - list-style-type: none; } - .checklist li::before { - position: absolute; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - color: blue; - content: "check_box"; - font-size: 2.4rem; } - -.checklist input[type="checkbox"]:checked { - width: 20px; } - -ins.critic, del.critic, mark { - margin: 0 0.4rem; - padding: 0.1rem 0; - word-break: break-word; - -webkit-box-decoration-break: clone; - box-decoration-break: clone; - border-radius: 0.2rem; } - -ins.critic { - background: #DDFFDD; - box-shadow: 0.4rem 0 0 #DDFFDD, -0.4rem 0 0 #DDFFDD; - text-decoration: none; } - -del.critic { - background: #FFDDDD; - box-shadow: 0.4rem 0 0 #FFDDDD, -0.4rem 0 0 #FFDDDD; } - -mark { - background: #FFFF00; - box-shadow: 0.4rem 0 0 #FFFF00, -0.4rem 0 0 #FFFF00; } - -.critic.comment { - margin: 0 0.4rem; - padding: 0.1rem 0; - border-radius: 0.2rem; - background: #F0F0F0; - color: #37474F; - box-shadow: 0.4rem 0 0 #F0F0F0, -0.4rem 0 0 #F0F0F0; - -webkit-box-decoration-break: clone; - box-decoration-break: clone; } - .critic.comment::before { - color: rgba(0, 0, 0, 0.26); - content: "chat"; - font-size: 1.6rem; - padding-right: 0.2rem; - vertical-align: -0.2rem; } - -.md-button { - float: right; - margin-top: 9px; - font-size: 13px; - padding-left: 2.6rem; - font-weight: 700; - text-transform: uppercase; } - -.task-list-item { - list-style-type: none; } - -.task-list-item input { - margin: 0 4px 0.25em -20px; - vertical-align: middle; } - -.task-list-item { - position: relative; } - -.task-list-item input[type="checkbox"] { - opacity: 0; } - -.task-list-item input[type="checkbox"] + label { - display: block; - position: absolute; - top: 50%; - left: -24px; - width: 16px; - margin-top: -8px; - height: 16px; - border-radius: 2px; - background: #CCC; } - -.task-list-item input[type="checkbox"]:checked + label::before { - display: block; - margin-top: -4px; - margin-left: 2px; - font-size: 1.2em; - line-height: 1; - border-radius: 2px; - content: "✔"; - color: #1EBB52; } - -@media print{ - .md-typeset a::after{ - color: rgba(0, 0, 0, 0.54); - content: " [" attr(href) "]"; } - .md-typeset code{ - box-shadow: none; - -webkit-box-decoration-break: initial; - box-decoration-break: initial; } - .md-header{ - display: none; } - .md-footer{ - display: none; } - .md-sidebar{ - display: none; } - .md-typeset .headerlink{ - display: none; } } - -@media only screen and (max-width: 44.9375em){ - .md-typeset pre{ - margin: 1.0em -1.6rem; - padding: 1.0rem 1.6rem; - border-radius: 0; } - .codehilite .hll{ - margin: 0 -1.6rem; - padding: 0 1.6rem; } - .md-typeset .codehilite{ - margin: 1.0em -1.6rem; - padding: 1.0rem 1.6rem 0.8rem; - border-radius: 0; } - .md-typeset > .codehilitetable{ - margin: 0 -1.6rem; - border-radius: 0; } - .md-typeset > .codehilitetable .codehilite, - .md-typeset > .codehilitetable .linenodiv{ - padding: 1.0rem 1.6rem; } } - -@media only screen and (min-width: 100em){ - html{ - font-size: 68.75%; } } - -@media only screen and (min-width: 125em){ - html{ - font-size: 75%; } } - -@media only screen and (max-width: 59.9375em){ - body[data-md-locked]{ - height: 100%; - overflow: hidden; } - .md-nav--secondary{ - border-left: 0; } - html .md-nav__link[for="toc"]{ - display: block; } - html .md-nav__link[for="toc"]::after{ - -webkit-transform: translateY(-50%); - transform: translateY(-50%); - color: #536dfe; - content: "toc"; } - html .md-nav__link[for="toc"] + .md-nav__link{ - display: none; } - html .md-nav__link[for="toc"] ~ .md-nav{ - display: -webkit-box; - display: -ms-flexbox; - display: flex; } - .md-nav__source{ - display: block; - padding: 0.4rem; - background: rgba(0, 0, 0, 0.87); - color: white; } - .md-search__overlay{ - display: block; - position: absolute; - top: 0.4rem; - left: 0.4rem; - width: 4.0rem; - height: 4.0rem; - -webkit-transform-origin: center; - transform-origin: center; - -webkit-transition: opacity 0.2s 0.2s, -webkit-transform 0.3s 0.1s; - transition: opacity 0.2s 0.2s, -webkit-transform 0.3s 0.1s; - transition: transform 0.3s 0.1s, opacity 0.2s 0.2s; - transition: transform 0.3s 0.1s, opacity 0.2s 0.2s, -webkit-transform 0.3s 0.1s; - border-radius: 2.0rem; - background: white; - opacity: 0; - overflow: hidden; - z-index: 1; } - .md-toggle--search:checked ~ .md-header .md-search__overlay{ - -webkit-transition: opacity 0.1s, -webkit-transform 0.4s; - transition: opacity 0.1s, -webkit-transform 0.4s; - transition: transform 0.4s, opacity 0.1s; - transition: transform 0.4s, opacity 0.1s, -webkit-transform 0.4s; - opacity: 1; } - .md-search__inner{ - position: fixed; - top: 0; - left: 100%; - height: 100%; - -webkit-transform: translateX(5%); - transform: translateX(5%); - -webkit-transition: left 0s 0.3s, opacity 0.15s 0.15s, -webkit-transform 0.15s 0.15s cubic-bezier(0.4, 0, 0.2, 1); - transition: left 0s 0.3s, opacity 0.15s 0.15s, -webkit-transform 0.15s 0.15s cubic-bezier(0.4, 0, 0.2, 1); - transition: left 0s 0.3s, transform 0.15s 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s 0.15s; - transition: left 0s 0.3s, transform 0.15s 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s 0.15s, -webkit-transform 0.15s 0.15s cubic-bezier(0.4, 0, 0.2, 1); - opacity: 0; - z-index: 2; } - .md-toggle--search:checked ~ .md-header .md-search__inner{ - left: 0; - -webkit-transform: translateX(0); - transform: translateX(0); - -webkit-transition: left 0s 0s, opacity 0.15s 0.15s, -webkit-transform 0.15s 0.15s cubic-bezier(0.1, 0.7, 0.1, 1); - transition: left 0s 0s, opacity 0.15s 0.15s, -webkit-transform 0.15s 0.15s cubic-bezier(0.1, 0.7, 0.1, 1); - transition: left 0s 0s, transform 0.15s 0.15s cubic-bezier(0.1, 0.7, 0.1, 1), opacity 0.15s 0.15s; - transition: left 0s 0s, transform 0.15s 0.15s cubic-bezier(0.1, 0.7, 0.1, 1), opacity 0.15s 0.15s, -webkit-transform 0.15s 0.15s cubic-bezier(0.1, 0.7, 0.1, 1); - opacity: 1; } - .md-search__input{ - width: 100%; - height: 5.6rem; - font-size: 1.8rem; } - .md-search__icon{ - top: 1.6rem; - left: 1.6rem; } - .md-search__icon::before{ - content: "arrow_back"; } - .md-search__output{ - top: 5.6rem; - bottom: 0; } - .md-search-result__link{ - padding: 0 1.6rem; } - .md-search-result__meta{ - padding-left: 1.6rem; } } - -@media only screen and (max-width: 74.9375em){ - .md-toggle--drawer:checked ~ .md-overlay{ - width: 100%; - height: 100%; - -webkit-transition: width 0s, height 0s, opacity 0.25s; - transition: width 0s, height 0s, opacity 0.25s; - opacity: 1; } - .md-header-nav__icon--home{ - display: none; } - .md-nav--primary, - .md-nav--primary .md-nav{ - display: -webkit-box; - display: -ms-flexbox; - display: flex; - position: absolute; - top: 0; - right: 0; - left: 0; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - height: 100%; - z-index: 1; } - .md-nav--primary{ - background: white; } - .md-nav--primary .md-nav__toggle ~ .md-nav{ - box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4); - left: 0.4rem; - background: white; } - html .md-nav--primary .md-nav__title{ - position: relative; - padding: 0.4rem 1.6rem 0.4rem 5.6rem; - background: rgba(0, 0, 0, 0.07); - color: rgba(0, 0, 0, 0.54); - font-size: 1.8rem; - font-weight: 400; - line-height: 4.8rem; - white-space: nowrap; - cursor: pointer; } - html .md-nav--primary .md-nav__title::before{ - display: block; - position: absolute; - left: 0.4rem; - width: 4.0rem; - height: 4.0rem; - color: rgba(0, 0, 0, 0.54); } - html .md-nav--primary .md-nav__title ~ .md-nav__list > .md-nav__item:first-child{ - border-top: 0; } - .md-nav--primary .md-nav__list{ - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1; - overflow-y: scroll; } - .md-nav--primary .md-nav__item{ - padding: 0; - border-top: 0.1rem solid rgba(0, 0, 0, 0.07); } - .md-nav--primary .md-nav__item--nested > .md-nav__link{ - padding-right: 4.8rem; } - .md-nav--primary .md-nav__link{ - position: relative; - padding: 1.6rem; } - .md-nav--primary .md-nav__link::after{ - position: absolute; - top: 50%; - right: 1.2rem; - -webkit-transform: translateY(-50%) rotate(-90deg); - transform: translateY(-50%) rotate(-90deg); - -webkit-transition: inherit; - transition: inherit; - color: rgba(0, 0, 0, 0.54); - font-size: 2.4rem; } - .md-nav--primary .md-nav__link:hover::after{ - color: #536dfe; } - .md-nav--primary .md-nav--secondary .md-nav{ - position: static; } - .md-nav--primary .md-nav--secondary .md-nav .md-nav__link{ - padding-left: 2.8rem; } - .md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav__link{ - padding-left: 4.0rem; } - .md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav__link{ - padding-left: 5.2rem; } - .md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav .md-nav__link{ - padding-left: 6.4rem; } - .md-nav__toggle ~ .md-nav{ - display: none; } - .csstransforms3d .md-nav__toggle ~ .md-nav{ - display: block; - -webkit-transform: translateX(100%); - transform: translateX(100%); - -webkit-transition: opacity 0.125s 0.05s, -webkit-transform 0.25s cubic-bezier(0.8, 0, 0.6, 1); - transition: opacity 0.125s 0.05s, -webkit-transform 0.25s cubic-bezier(0.8, 0, 0.6, 1); - transition: transform 0.25s cubic-bezier(0.8, 0, 0.6, 1), opacity 0.125s 0.05s; - transition: transform 0.25s cubic-bezier(0.8, 0, 0.6, 1), opacity 0.125s 0.05s, -webkit-transform 0.25s cubic-bezier(0.8, 0, 0.6, 1); - opacity: 0; } - .md-nav__toggle:checked ~ .md-nav{ - display: block; } - .csstransforms3d .md-nav__toggle:checked ~ .md-nav{ - -webkit-transform: translateX(0); - transform: translateX(0); - -webkit-transition: opacity 0.125s 0.125s, -webkit-transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); - transition: opacity 0.125s 0.125s, -webkit-transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); - transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.125s 0.125s; - transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.125s 0.125s, -webkit-transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); - opacity: 1; } - .md-nav .md-nav__title, - .md-nav .md-nav__item{ - font-size: 1.6rem; - line-height: 1.4; } - .md-sidebar--primary{ - position: fixed; - top: 0; - left: -24.2rem; - width: 24.2rem; - height: 100%; - -webkit-transform: translateX(0); - transform: translateX(0); - -webkit-transition: box-shadow 0.25s, -webkit-transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); - transition: box-shadow 0.25s, -webkit-transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); - transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s; - transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s, -webkit-transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); - background: white; - z-index: 2; } - .no-csstransforms3d .md-sidebar--primary{ - display: none; } - .md-toggle--drawer:checked ~ .md-container .md-sidebar--primary{ - box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.4); - -webkit-transform: translateX(24.2rem); - transform: translateX(24.2rem); } - .no-csstransforms3d .md-toggle--drawer:checked ~ .md-container .md-sidebar--primary{ - display: block; } - .md-sidebar--primary .md-sidebar__scrollwrap{ - overflow: hidden; } - .md-sidebar--primary .md-sidebar__scrollwrap{ - margin: 0; } } - -@media only screen and (min-width: 60em){ - .md-content{ - margin-right: 24.2rem; } - .md-header-nav__icon--search{ - display: none; } - .md-header-nav__source{ - display: block; - width: 23.0rem; - max-width: 23.0rem; - padding-right: 1.2rem; } - .md-search{ - padding: 0.4rem; - padding-right: 3.2rem; } - .md-search__inner{ - display: table; - position: relative; - clear: both; } - .md-search__form{ - width: 23.0rem; - float: right; - -webkit-transition: width 0.25s cubic-bezier(0.1, 0.7, 0.1, 1); - transition: width 0.25s cubic-bezier(0.1, 0.7, 0.1, 1); - border-radius: 0.2rem; } - .md-search__input{ - width: 100%; - height: 4.0rem; - padding-left: 4.8rem; - -webkit-transition: background-color 0.25s, color 0.25s; - transition: background-color 0.25s, color 0.25s; - border-radius: 0.2rem; - background: rgba(0, 0, 0, 0.26); - color: white; - font-size: 1.6rem; } - .md-search__input + .md-search__icon, .md-search__input::-webkit-input-placeholder{ - -webkit-transition: color 0.25s; - transition: color 0.25s; - color: white; } - .md-search__input + .md-search__icon, .md-search__input::-moz-placeholder{ - -webkit-transition: color 0.25s; - transition: color 0.25s; - color: white; } - .md-search__input + .md-search__icon, .md-search__input:-ms-input-placeholder{ - -webkit-transition: color 0.25s; - transition: color 0.25s; - color: white; } - .md-search__input + .md-search__icon, .md-search__input::placeholder{ - -webkit-transition: color 0.25s; - transition: color 0.25s; - color: white; } - .md-search__input:hover{ - background: rgba(255, 255, 255, 0.12); } - .md-toggle--search:checked ~ .md-header .md-search__input{ - border-radius: 0.2rem 0.2rem 0 0; - background: white; - color: rgba(0, 0, 0, 0.87); - text-overflow: none; } - .md-toggle--search:checked ~ .md-header .md-search__input + .md-search__icon, .md-toggle--search:checked ~ .md-header .md-search__input::-webkit-input-placeholder{ - color: rgba(0, 0, 0, 0.54); } - .md-toggle--search:checked ~ .md-header .md-search__input + .md-search__icon, .md-toggle--search:checked ~ .md-header .md-search__input::-moz-placeholder{ - color: rgba(0, 0, 0, 0.54); } - .md-toggle--search:checked ~ .md-header .md-search__input + .md-search__icon, .md-toggle--search:checked ~ .md-header .md-search__input:-ms-input-placeholder{ - color: rgba(0, 0, 0, 0.54); } - .md-toggle--search:checked ~ .md-header .md-search__input + .md-search__icon, .md-toggle--search:checked ~ .md-header .md-search__input::placeholder{ - color: rgba(0, 0, 0, 0.54); } - .md-search__output{ - box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.4); - top: 4.0rem; - -webkit-transition: opacity 0.4s; - transition: opacity 0.4s; - opacity: 0; } - .md-toggle--search:checked ~ .md-header .md-search__output{ - opacity: 1; } - .md-search__scrollwrap{ - max-height: 0; } - .md-toggle--search:checked ~ .md-header .md-search__scrollwrap{ - max-height: 75vh; } - .md-search__scrollwrap::-webkit-scrollbar{ - width: 0.4rem; - height: 0.4rem; } - .md-search__scrollwrap::-webkit-scrollbar-thumb{ - background-color: rgba(0, 0, 0, 0.26); } - .md-search__scrollwrap::-webkit-scrollbar-thumb:hover{ - background-color: #536dfe; } - .md-sidebar--secondary{ - display: block; - float: right; } - .md-sidebar--secondary[data-md-locked]{ - margin-left: 100%; - -webkit-transform: translate(-100%, 0); - transform: translate(-100%, 0); } } - -@media only screen and (min-width: 75em){ - .md-content{ - margin-left: 24.2rem; } - .md-content__inner{ - margin: 2.4rem; } - .md-header-nav__icon--menu{ - display: none; } - .md-nav.md-nav--transitioning{ - -webkit-transition: max-height 0.25s cubic-bezier(0.86, 0, 0.07, 1); - transition: max-height 0.25s cubic-bezier(0.86, 0, 0.07, 1); } - .md-nav__toggle ~ .md-nav{ - max-height: 0; - overflow: hidden; } - .md-nav__toggle:checked ~ .md-nav, .md-nav.md-nav--toggled{ - max-height: 100%; } - .md-nav__title + .md-nav__list .md-nav__title{ - display: none; } - .md-nav__item--nested > .md-nav__link::after{ - display: inline-block; - -webkit-transform-origin: 0.45em 0.45em; - transform-origin: 0.45em 0.45em; - -webkit-transform-style: preserve-3d; - transform-style: preserve-3d; - vertical-align: -0.125em; } - .js .md-nav__item--nested > .md-nav__link::after{ - -webkit-transition: -webkit-transform 0.4s; - transition: -webkit-transform 0.4s; - transition: transform 0.4s; - transition: transform 0.4s, -webkit-transform 0.4s; } - .md-nav__item--nested .md-nav__toggle:checked ~ .md-nav__link::after{ - -webkit-transform: rotateX(180deg); - transform: rotateX(180deg); } - .md-toggle--search:checked ~ .md-header .md-search__form{ - width: 66.8rem; } - .md-sidebar__inner{ - border-right: 0.1rem solid rgba(0, 0, 0, 0.07); } } - -@media only screen and (min-width: 30em){ - .md-footer-nav__link{ - width: 50%; } } - -@media only screen and (max-width: 29.9375em){ - .md-footer-nav__link--prev .md-footer-nav__title{ - display: none; } - .md-toggle--search:checked ~ .md-header .md-search__overlay{ - -webkit-transform: scale(45); - transform: scale(45); } } - -@media only screen and (min-width: 30em) and (max-width: 44.9375em){ - .md-toggle--search:checked ~ .md-header .md-search__overlay{ - -webkit-transform: scale(60); - transform: scale(60); } } - -@media only screen and (min-width: 45em) and (max-width: 59.9375em){ - .md-toggle--search:checked ~ .md-header .md-search__overlay{ - -webkit-transform: scale(75); - transform: scale(75); } } - -@media only screen and (min-width: 60em) and (max-width: 74.9375em){ - .md-toggle--search:checked ~ .md-header .md-search__form{ - width: 46.8rem; } } - -@media only screen and (min-width: 60em) and (min-width: 75em){ - .md-sidebar--secondary[data-md-locked]{ - margin-left: 120.0rem; } } diff --git a/material/base.html b/material/base.html index 979442e3a..3a8e6563d 100644 --- a/material/base.html +++ b/material/base.html @@ -20,11 +20,11 @@ {% endif %} - + - + {% for path in extra_css %} {% endfor %} diff --git a/material/partials/nav-item.html b/material/partials/nav-item.html index 02649573c..721978a78 100644 --- a/material/partials/nav-item.html +++ b/material/partials/nav-item.html @@ -8,7 +8,7 @@ -