diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/about/index.html b/about/index.html new file mode 100644 index 0000000..77ba4fd --- /dev/null +++ b/about/index.html @@ -0,0 +1,278 @@ + + + + + + + + + +About - GEGELATI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+ + +
+ + + + +
+ + + +
+ + + + + +
+ +
+

+ +

+ + + +
+ + +
+ +

These Github Pages contain a hands-on tutorial providing a gentle introduction to GEGEGELATI usage.

+ +

Tutorial authors:

+
    +
  • Karol Desnos
  • +
+ + +
+ + + + + + +
+ + +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + diff --git a/assets/css/main.css b/assets/css/main.css new file mode 100644 index 0000000..21fa742 --- /dev/null +++ b/assets/css/main.css @@ -0,0 +1,5 @@ +.author__urls.social-icons i,.author__urls.social-icons .svg-inline--fa,.page__footer-follow .social-icons i,.page__footer-follow .social-icons .svg-inline--fa{color:inherit}.ais-search-box .ais-search-box--input{background-color:#1f242c}/*! + * Minimal Mistakes Jekyll Theme 4.24.0 by Michael Rose + * Copyright 2013-2020 Michael Rose - mademistakes.com | @mmistakes + * Licensed under MIT (https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE) +*/.mfp-counter{font-family:Georgia,Times,serif}.mfp-bg{top:0;left:0;width:100%;height:100%;z-index:1042;overflow:hidden;position:fixed;background:#000;opacity:.8;filter:alpha(opacity=80)}.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:1043;position:fixed;outline:none !important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;width:100%;height:100%;left:0;top:0;padding:0 8px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mfp-container:before{content:"";display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-inline-holder .mfp-content,.mfp-ajax-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-close,.mfp-arrow,.mfp-preloader,.mfp-counter{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none !important}.mfp-preloader{color:#ccc;position:absolute;top:50%;width:auto;text-align:center;margin-top:-0.8em;left:8px;right:8px;z-index:1044}.mfp-preloader a{color:#ccc}.mfp-preloader a:hover{color:#fff}.mfp-s-ready .mfp-preloader{display:none}.mfp-s-error .mfp-content{display:none}button.mfp-close,button.mfp-arrow{overflow:visible;cursor:pointer;background:rgba(0,0,0,0);border:0;-webkit-appearance:none;display:block;outline:none;padding:0;z-index:1046;-webkit-box-shadow:none;box-shadow:none}button::-moz-focus-inner{padding:0;border:0}.mfp-close{width:44px;height:44px;line-height:44px;position:absolute;right:0;top:0;text-decoration:none;text-align:center;opacity:1;filter:alpha(opacity=100);padding:0 0 18px 10px;color:#fff;font-style:normal;font-size:28px;font-family:Georgia,Times,serif}.mfp-close:hover,.mfp-close:focus{opacity:1;filter:alpha(opacity=100)}.mfp-close:active{top:1px}.mfp-close-btn-in .mfp-close{color:#fff}.mfp-image-holder .mfp-close,.mfp-iframe-holder .mfp-close{color:#fff;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#ccc;font-size:12px;line-height:18px}.mfp-arrow{position:absolute;opacity:1;filter:alpha(opacity=100);margin:0;top:50%;margin-top:-55px;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:hover,.mfp-arrow:focus{opacity:1;filter:alpha(opacity=100)}.mfp-arrow:before,.mfp-arrow:after,.mfp-arrow .mfp-b,.mfp-arrow .mfp-a{content:"";display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:medium inset rgba(0,0,0,0)}.mfp-arrow:after,.mfp-arrow .mfp-a{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before,.mfp-arrow .mfp-b{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after,.mfp-arrow-left .mfp-a{border-right:17px solid #fff;margin-left:31px}.mfp-arrow-left:before,.mfp-arrow-left .mfp-b{margin-left:25px;border-right:27px solid #fff}.mfp-arrow-right{right:0}.mfp-arrow-right:after,.mfp-arrow-right .mfp-a{border-left:17px solid #fff;margin-left:39px}.mfp-arrow-right:before,.mfp-arrow-right .mfp-b{border-left:27px solid #fff}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:40px 0 40px;margin:0 auto}.mfp-figure{line-height:0}.mfp-figure:after{content:"";position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,.6);background:#444}.mfp-figure small{color:#bdbdbd;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-figure figcaption{margin-top:0;margin-bottom:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#f3f3f3;word-wrap:break-word;padding-right:36px}.mfp-image-holder .mfp-content{max-width:100%}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width: 800px)and (orientation: landscape),screen and (max-height: 300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,.6);position:fixed;text-align:center;padding:0}}@media all and (max-width: 900px){.mfp-arrow{-webkit-transform:scale(0.75);transform:scale(0.75)}.mfp-arrow-left{-webkit-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}.mfp-ie7 .mfp-img{padding:0}.mfp-ie7 .mfp-bottom-bar{width:600px;left:50%;margin-left:-300px;margin-top:5px;padding-bottom:5px}.mfp-ie7 .mfp-container{padding:0}.mfp-ie7 .mfp-content{padding-top:44px}.mfp-ie7 .mfp-close{top:0;right:0;padding-top:0}button:focus,a:focus{outline:thin dotted #00adb5;outline:5px auto #00adb5;outline-offset:-2px}*{box-sizing:border-box}html{box-sizing:border-box;background-color:#252a34;font-size:16px;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}@media(min-width: 48em){html{font-size:18px}}@media(min-width: 64em){html{font-size:20px}}@media(min-width: 80em){html{font-size:22px}}body{margin:0}::-moz-selection{color:#fff;background:#000}::selection{color:#fff;background:#000}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}a{color:#8cd2d5}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{max-width:100%;width:auto\9 ;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}label,select,button,input[type=button],input[type=reset],input[type=submit],input[type=radio],input[type=checkbox]{cursor:pointer}input[type=search]{box-sizing:border-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}html{position:relative;min-height:100%}body{margin:0;padding:0;color:#eaeaea;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;line-height:1.5}body.overflow--hidden{overflow:hidden}h1,h2,h3,h4,h5,h6{margin:2em 0 .5em;line-height:1.2;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-weight:bold}h1{margin-top:0;font-size:1.25em}h2{font-size:1.125em}h3{font-size:1em}h4{font-size:.875em}h5{font-size:.75em}h6{font-size:.6875em}small,.small{font-size:.625em}p{margin-bottom:1.3em}u,ins{text-decoration:none;border-bottom:1px solid #eaeaea}u a,ins a{color:inherit}del a{color:inherit}p,pre,blockquote,ul,ol,dl,figure,table,fieldset{orphans:3;widows:3}abbr[title],abbr[data-original-title]{text-decoration:none;cursor:help;border-bottom:1px dotted #eaeaea}blockquote{margin:2em 1em 2em 0;padding-left:1em;padding-right:1em;font-style:italic;border-left:.25em solid #00adb5}blockquote cite{font-style:italic}blockquote cite:before{content:"—";padding-right:5px}a:visited{color:#699ea0}a:hover{color:#a9dde0;outline:0}tt,code,kbd,samp,pre{font-family:Monaco,Consolas,"Lucida Console",monospace}pre{overflow-x:auto}p>code,a>code,li>code,figcaption>code,td>code{padding-top:.1rem;padding-bottom:.1rem;font-size:.8em;background:#1f242c;border-radius:4px}p>code:before,p>code:after,a>code:before,a>code:after,li>code:before,li>code:after,figcaption>code:before,figcaption>code:after,td>code:before,td>code:after{letter-spacing:-0.2em;content:" "}hr{display:block;margin:1em 0;border:0;border-top:1px solid #51555d}ul li,ol li{margin-bottom:.5em}li ul,li ol{margin-top:.5em}figure{display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:start;align-items:flex-start;flex-wrap:wrap;margin:2em 0}figure img,figure iframe,figure .fluid-width-video-wrapper{margin-bottom:1em}figure img{width:100%;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}figure>a{display:block}@media(min-width: 37.5em){figure.half>a,figure.half>img{width:calc(50% - .5em)}}figure.half figcaption{width:100%}@media(min-width: 37.5em){figure.third>a,figure.third>img{width:calc(33.3333% - .5em)}}figure.third figcaption{width:100%}figcaption{margin-bottom:.5em;color:#eee;font-family:Georgia,Times,serif;font-size:.625em}figcaption a{-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}figcaption a:hover{color:#a9dde0}svg:not(:root){overflow:hidden}nav ul{margin:0;padding:0}nav li{list-style:none}nav a{text-decoration:none}nav ul li,nav ol li{margin-bottom:0}nav li ul,nav li ol{margin-top:0}b,i,strong,em,blockquote,p,q,span,figure,img,h1,h2,header,input,a,tr,td,form button,input[type=submit],.btn,.highlight,.archive__item-teaser{-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}form{margin:0 0 5px 0;padding:1em;background-color:#1f242c}form fieldset{margin-bottom:5px;padding:0;border-width:0}form legend{display:block;width:100%;margin-bottom:10px;*margin-left:-7px;padding:0;color:#eaeaea;border:0;white-space:normal}form p{margin-bottom:2.5px}form ul{list-style-type:none;margin:0 0 5px 0;padding:0}form br{display:none}label,input,button,select,textarea{vertical-align:baseline;*vertical-align:middle}input,button,select,textarea{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif}label{display:block;margin-bottom:.25em;color:#eaeaea;cursor:pointer}label small{font-size:.625em}label input,label textarea,label select{display:block}input,textarea,select{display:inline-block;width:100%;padding:.25em;margin-bottom:.5em;color:#eaeaea;background-color:#252a34;border:#51555d;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.125)}.input-mini{width:60px}.input-small{width:90px}input[type=image],input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer;border-radius:0;border:0 \9 ;box-shadow:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*width:13px;*height:13px}input[type=image]{border:0}input[type=file]{width:auto;padding:initial;line-height:initial;border:initial;background-color:rgba(0,0,0,0);background-color:initial;box-shadow:none}input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;cursor:pointer;*overflow:visible}select,input[type=file]{*margin-top:4px}select{width:auto;background-color:#fff}select[multiple],select[size]{height:auto}textarea{resize:vertical;height:auto;overflow:auto;vertical-align:top}input[type=hidden]{display:none}.form{position:relative}.radio,.checkbox{padding-left:18px;font-weight:normal}.radio input[type=radio],.checkbox input[type=checkbox]{float:left;margin-left:-18px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{opacity:.5;cursor:not-allowed}input:focus,textarea:focus{border-color:#00adb5;outline:0;outline:thin dotted \9 ;box-shadow:inset 0 1px 3px rgba(234,234,234,.06),0 0 5px rgba(0,173,181,.7)}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus,select:focus{box-shadow:none}.help-block,.help-inline{color:#eee}.help-block{display:block;margin-bottom:1em;line-height:1em}.help-inline{display:inline-block;vertical-align:middle;padding-left:5px}.form-group{margin-bottom:5px;padding:0;border-width:0}.form-inline input,.form-inline textarea,.form-inline select{display:inline-block;margin-bottom:0}.form-inline label{display:inline-block}.form-inline .radio,.form-inline .checkbox,.form-inline .radio{padding-left:0;margin-bottom:0;vertical-align:middle}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{float:left;margin-left:0;margin-right:3px}.form-search input,.form-search textarea,.form-search select{display:inline-block;margin-bottom:0}.form-search .search-query{padding-left:14px;padding-right:14px;margin-bottom:0;border-radius:14px}.form-search label{display:inline-block}.form-search .radio,.form-search .checkbox,.form-inline .radio{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type=radio],.form-search .checkbox input[type=checkbox]{float:left;margin-left:0;margin-right:3px}.form--loading:before{content:""}.form--loading .form__spinner{display:block}.form:before{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(255,255,255,.7);z-index:10}.form__spinner{display:none;position:absolute;top:50%;left:50%;z-index:11}table{display:block;margin-bottom:1em;width:100%;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em;border-collapse:collapse;overflow-x:auto}table+table{margin-top:1em}thead{background-color:#51555d;border-bottom:2px solid #3d4046}th{padding:.5em;font-weight:bold;text-align:left}td{padding:.5em;border-bottom:1px solid #3d4046}tr,td,th{vertical-align:middle}@-webkit-keyframes intro{0%{opacity:0}100%{opacity:1}}@keyframes intro{0%{opacity:0}100%{opacity:1}}.btn{display:inline-block;margin-bottom:.25em;padding:.5em 1em;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em;font-weight:bold;text-align:center;text-decoration:none;border-width:0;border-radius:4px;cursor:pointer}.btn .icon{margin-right:.5em}.btn .icon+.hidden{margin-left:-0.5em}.btn--primary{background-color:#00adb5;color:#fff}.btn--primary:visited{background-color:#00adb5;color:#fff}.btn--primary:hover{background-color:#008a91;color:#fff}.btn--inverse{background-color:#fff;color:#3d4144;border:1px solid #51555d}.btn--inverse:visited{background-color:#fff;color:#3d4144}.btn--inverse:hover{background-color:#ccc;color:#3d4144}.btn--light-outline{background-color:rgba(0,0,0,0);color:#fff;border:1px solid #fff}.btn--light-outline:visited{background-color:rgba(0,0,0,0);color:#fff}.btn--light-outline:hover{background-color:rgba(0,0,0,.2);color:#fff}.btn--success{background-color:#3fa63f;color:#fff}.btn--success:visited{background-color:#3fa63f;color:#fff}.btn--success:hover{background-color:#328532;color:#fff}.btn--warning{background-color:#d67f05;color:#fff}.btn--warning:visited{background-color:#d67f05;color:#fff}.btn--warning:hover{background-color:#ab6604;color:#fff}.btn--danger{background-color:#ee5f5b;color:#fff}.btn--danger:visited{background-color:#ee5f5b;color:#fff}.btn--danger:hover{background-color:#be4c49;color:#fff}.btn--info{background-color:#3b9cba;color:#fff}.btn--info:visited{background-color:#3b9cba;color:#fff}.btn--info:hover{background-color:#2f7d95;color:#fff}.btn--facebook{background-color:#3b5998;color:#fff}.btn--facebook:visited{background-color:#3b5998;color:#fff}.btn--facebook:hover{background-color:#2f477a;color:#fff}.btn--twitter{background-color:#55acee;color:#fff}.btn--twitter:visited{background-color:#55acee;color:#fff}.btn--twitter:hover{background-color:#448abe;color:#fff}.btn--linkedin{background-color:#007bb6;color:#fff}.btn--linkedin:visited{background-color:#007bb6;color:#fff}.btn--linkedin:hover{background-color:#006292;color:#fff}.btn--block{display:block;width:100%}.btn--block+.btn--block{margin-top:.25em}.btn--disabled{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}.btn--x-large{font-size:1em}.btn--large{font-size:.75em}.btn--small{font-size:.563em}.notice{margin:2em 0 !important;padding:1em;color:#eaeaea;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em !important;text-indent:initial;background-color:#434851;border-radius:4px;box-shadow:0 1px 1px rgba(189,193,196,.25)}.notice h4{margin-top:0 !important;margin-bottom:.75em;line-height:inherit}.page__content .notice h4{margin-bottom:0;font-size:1em}.notice p:last-child{margin-bottom:0 !important}.notice h4+p{margin-top:0;padding-top:0}.notice a{color:#aaaeb0}.notice a:hover{color:#5f6162}.notice code{background-color:#343942}.notice pre code{background-color:inherit}.notice ul:last-child{margin-bottom:0}.notice--primary{margin:2em 0 !important;padding:1em;color:#eaeaea;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em !important;text-indent:initial;background-color:#1e444e;border-radius:4px;box-shadow:0 1px 1px rgba(0,173,181,.25)}.notice--primary h4{margin-top:0 !important;margin-bottom:.75em;line-height:inherit}.page__content .notice--primary h4{margin-bottom:0;font-size:1em}.notice--primary p:last-child{margin-bottom:0 !important}.notice--primary h4+p{margin-top:0;padding-top:0}.notice--primary a{color:#009ca3}.notice--primary a:hover{color:#00575b}.notice--primary code{background-color:#213741}.notice--primary pre code{background-color:inherit}.notice--primary ul:last-child{margin-bottom:0}.notice--info{margin:2em 0 !important;padding:1em;color:#eaeaea;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em !important;text-indent:initial;background-color:#29414f;border-radius:4px;box-shadow:0 1px 1px rgba(59,156,186,.25)}.notice--info h4{margin-top:0 !important;margin-bottom:.75em;line-height:inherit}.page__content .notice--info h4{margin-bottom:0;font-size:1em}.notice--info p:last-child{margin-bottom:0 !important}.notice--info h4+p{margin-top:0;padding-top:0}.notice--info a{color:#358ca7}.notice--info a:hover{color:#1e4e5d}.notice--info code{background-color:#273541}.notice--info pre code{background-color:inherit}.notice--info ul:last-child{margin-bottom:0}.notice--warning{margin:2em 0 !important;padding:1em;color:#eaeaea;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em !important;text-indent:initial;background-color:#483b2b;border-radius:4px;box-shadow:0 1px 1px rgba(214,127,5,.25)}.notice--warning h4{margin-top:0 !important;margin-bottom:.75em;line-height:inherit}.page__content .notice--warning h4{margin-bottom:0;font-size:1em}.notice--warning p:last-child{margin-bottom:0 !important}.notice--warning h4+p{margin-top:0;padding-top:0}.notice--warning a{color:#c17205}.notice--warning a:hover{color:#6b4003}.notice--warning code{background-color:#37332f}.notice--warning pre code{background-color:inherit}.notice--warning ul:last-child{margin-bottom:0}.notice--success{margin:2em 0 !important;padding:1em;color:#eaeaea;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em !important;text-indent:initial;background-color:#2a4336;border-radius:4px;box-shadow:0 1px 1px rgba(63,166,63,.25)}.notice--success h4{margin-top:0 !important;margin-bottom:.75em;line-height:inherit}.page__content .notice--success h4{margin-bottom:0;font-size:1em}.notice--success p:last-child{margin-bottom:0 !important}.notice--success h4+p{margin-top:0;padding-top:0}.notice--success a{color:#399539}.notice--success a:hover{color:#205320}.notice--success code{background-color:#283635}.notice--success pre code{background-color:inherit}.notice--success ul:last-child{margin-bottom:0}.notice--danger{margin:2em 0 !important;padding:1em;color:#eaeaea;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em !important;text-indent:initial;background-color:#4d353c;border-radius:4px;box-shadow:0 1px 1px rgba(238,95,91,.25)}.notice--danger h4{margin-top:0 !important;margin-bottom:.75em;line-height:inherit}.page__content .notice--danger h4{margin-bottom:0;font-size:1em}.notice--danger p:last-child{margin-bottom:0 !important}.notice--danger h4+p{margin-top:0;padding-top:0}.notice--danger a{color:#d65652}.notice--danger a:hover{color:#77302e}.notice--danger code{background-color:#392f38}.notice--danger pre code{background-color:inherit}.notice--danger ul:last-child{margin-bottom:0}.masthead{position:relative;border-bottom:1px solid #51555d;-webkit-animation:intro .3s both;animation:intro .3s both;-webkit-animation-delay:.15s;animation-delay:.15s;z-index:20}.masthead__inner-wrap{clear:both;margin-left:auto;margin-right:auto;padding:1em;max-width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif}.masthead__inner-wrap::after{clear:both;content:"";display:table}@media(min-width: 80em){.masthead__inner-wrap{max-width:1280px}}.masthead__inner-wrap nav{z-index:10}.masthead__inner-wrap a{text-decoration:none}.site-logo img{max-height:2rem}.site-title{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;font-weight:bold}.site-subtitle{display:block;font-size:.5em}.masthead__menu{float:left;margin-left:0;margin-right:0;width:100%;clear:both}.masthead__menu .site-nav{margin-left:0}@media(min-width: 37.5em){.masthead__menu .site-nav{float:right}}.masthead__menu ul{margin:0;padding:0;clear:both;list-style-type:none}.masthead__menu-item{display:block;list-style-type:none;white-space:nowrap}.masthead__menu-item--lg{padding-right:2em;font-weight:700}.breadcrumbs{clear:both;margin:0 auto;max-width:100%;padding-left:1em;padding-right:1em;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;-webkit-animation:intro .3s both;animation:intro .3s both;-webkit-animation-delay:.3s;animation-delay:.3s}.breadcrumbs::after{clear:both;content:"";display:table}@media(min-width: 80em){.breadcrumbs{max-width:1280px}}.breadcrumbs ol{padding:0;list-style:none;font-size:.625em}@media(min-width: 64em){.breadcrumbs ol{float:right;width:calc(100% - 200px)}}@media(min-width: 80em){.breadcrumbs ol{width:calc(100% - 300px)}}.breadcrumbs li{display:inline}.breadcrumbs .current{font-weight:bold}.pagination{clear:both;float:left;margin-top:1em;padding-top:1em;width:100%}.pagination::after{clear:both;content:"";display:table}.pagination ul{margin:0;padding:0;list-style-type:none;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif}.pagination li{display:block;float:left;margin-left:-1px}.pagination li a{display:block;margin-bottom:.25em;padding:.5em 1em;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:14px;font-weight:bold;line-height:1.5;text-align:center;text-decoration:none;color:#eee;border:1px solid #3d4046;border-radius:0}.pagination li a:hover{color:#a9dde0}.pagination li a.current,.pagination li a.current.disabled{color:#fff;background:#00adb5}.pagination li a.disabled{color:rgba(238,238,238,.5);pointer-events:none;cursor:not-allowed}.pagination li:first-child{margin-left:0}.pagination li:first-child a{border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination li:last-child a{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination--pager{display:block;padding:1em 2em;float:left;width:50%;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.75em;font-weight:bold;text-align:center;text-decoration:none;color:#eee;border:1px solid #3d4046;border-radius:4px}.pagination--pager:hover{background-color:#eee;color:#3d4144}.pagination--pager:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.pagination--pager:last-child{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}.pagination--pager.disabled{color:rgba(238,238,238,.5);pointer-events:none;cursor:not-allowed}.page__content+.pagination,.page__meta+.pagination,.comment__date+.pagination,.page__share+.pagination,.page__comments+.pagination{margin-top:2em;padding-top:2em;border-top:1px solid #51555d}.greedy-nav{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-height:2em;background:#252a34}.greedy-nav a{display:block;margin:0 1rem;color:#eaeaea;text-decoration:none;-webkit-transition:none;transition:none}.greedy-nav a:hover{color:#bbb}.greedy-nav a.site-logo{margin-left:0;margin-right:.5rem}.greedy-nav a.site-title{margin-left:0}.greedy-nav img{-webkit-transition:none;transition:none}.greedy-nav__toggle{-ms-flex-item-align:center;align-self:center;height:2rem;border:0;outline:none;background-color:rgba(0,0,0,0);cursor:pointer}.greedy-nav .visible-links{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden}.greedy-nav .visible-links li{-webkit-box-flex:0;-ms-flex:none;flex:none}.greedy-nav .visible-links a{position:relative}.greedy-nav .visible-links a:before{content:"";position:absolute;left:0;bottom:0;height:4px;background:#00adb5;width:100%;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-transform:scaleX(0) translate3d(0, 0, 0);transform:scaleX(0) translate3d(0, 0, 0)}.greedy-nav .visible-links a:hover:before{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1)}.greedy-nav .hidden-links{position:absolute;top:100%;right:0;margin-top:15px;padding:5px;border:1px solid #51555d;border-radius:4px;background:#252a34;-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12)}.greedy-nav .hidden-links.hidden{display:none}.greedy-nav .hidden-links a{margin:0;padding:10px 20px;font-size:.75em}.greedy-nav .hidden-links a:hover{color:#bbb;background:#1a1d24}.greedy-nav .hidden-links:before{content:"";position:absolute;top:-11px;right:10px;width:0;border-style:solid;border-width:0 10px 10px;border-color:#51555d rgba(0,0,0,0);display:block;z-index:0}.greedy-nav .hidden-links:after{content:"";position:absolute;top:-10px;right:10px;width:0;border-style:solid;border-width:0 10px 10px;border-color:#252a34 rgba(0,0,0,0);display:block;z-index:1}.greedy-nav .hidden-links li{display:block;border-bottom:1px solid #51555d}.greedy-nav .hidden-links li:last-child{border-bottom:none}.no-js .greedy-nav .visible-links{-ms-flex-wrap:wrap;flex-wrap:wrap;overflow:visible}.nav__list{margin-bottom:1.5em}.nav__list input[type=checkbox],.nav__list label{display:none}@media(max-width: 63.9375em){.nav__list label{position:relative;display:inline-block;padding:.5em 2.5em .5em 1em;color:#7a8288;font-size:.625em;font-weight:bold;border:1px solid #bdc1c4;border-radius:4px;z-index:20;-webkit-transition:.2s ease-out;transition:.2s ease-out;cursor:pointer}.nav__list label:before,.nav__list label:after{content:"";position:absolute;right:1em;top:1.25em;width:.75em;height:.125em;line-height:1;background-color:#7a8288;-webkit-transition:.2s ease-out;transition:.2s ease-out}.nav__list label:after{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.nav__list label:hover{color:#fff;border-color:#7a8288;background-color:#333}.nav__list label:hover:before,.nav__list label:hover:after{background-color:#fff}.nav__list input:checked+label{color:#fff;background-color:#333}.nav__list input:checked+label:before,.nav__list input:checked+label:after{background-color:#fff}.nav__list label:hover:after{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.nav__list input:checked+label:hover:after{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)}.nav__list ul{margin-bottom:1em}.nav__list a{display:block;padding:.25em 0}}@media(max-width: 63.9375em)and (min-width: 64em){.nav__list a{padding-top:.125em;padding-bottom:.125em}}@media(max-width: 63.9375em){.nav__list a:hover{text-decoration:underline}}.nav__list .nav__items{margin:0;font-size:1.25rem}.nav__list .nav__items a{color:inherit}.nav__list .nav__items .active{margin-left:-0.5em;padding-left:.5em;padding-right:.5em;font-weight:bold}@media(max-width: 63.9375em){.nav__list .nav__items{position:relative;max-height:0;opacity:0%;overflow:hidden;z-index:10;-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out;-webkit-transform:translate(0, 10%);-ms-transform:translate(0, 10%);transform:translate(0, 10%)}}@media(max-width: 63.9375em){.nav__list input:checked~.nav__items{-webkit-transition:.5s ease-in-out;transition:.5s ease-in-out;max-height:9999px;overflow:visible;opacity:1;margin-top:1em;-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);transform:translate(0, 0)}}.nav__title{margin:0;padding:.5rem .75rem;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.75em;font-weight:bold}.nav__sub-title{display:block;margin:.5rem 0;padding:.25rem 0;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em;font-weight:bold;text-transform:uppercase;border-bottom:1px solid #51555d}.toc{font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;color:#7a8288;background-color:#252a34;border:1px solid #51555d;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.125);box-shadow:0 1px 1px rgba(0,0,0,.125)}.toc .nav__title{color:#fff;font-size:.625em;background:#00adb5;border-top-left-radius:4px;border-top-right-radius:4px}.toc .active a{background-color:#cceff0;color:#3d4144}.toc__menu{margin:0;padding:0;width:100%;list-style:none;font-size:.625em}@media(min-width: 64em){.toc__menu{font-size:.563em}}.toc__menu a{display:block;padding:.25rem .75rem;color:#eee;font-weight:bold;line-height:1.5;border-bottom:1px solid #51555d}.toc__menu a:hover{color:#eaeaea}.toc__menu li ul>li a{padding-left:1.25rem;font-weight:normal}.toc__menu li ul li ul>li a{padding-left:1.75rem}.toc__menu li ul li ul li ul>li a{padding-left:2.25rem}.toc__menu li ul li ul li ul li ul>li a{padding-left:2.75rem}.toc__menu li ul li ul li ul li ul li ul>li a{padding-left:3.25rem}.page__footer{clear:both;float:left;margin-left:0;margin-right:0;width:100%;margin-top:3em;color:#eee;-webkit-animation:intro .3s both;animation:intro .3s both;-webkit-animation-delay:.45s;animation-delay:.45s;background-color:#1a1d24}.page__footer::after{clear:both;content:"";display:table}.page__footer footer{clear:both;margin-left:auto;margin-right:auto;margin-top:2em;max-width:100%;padding:0 1em 2em}.page__footer footer::after{clear:both;content:"";display:table}@media(min-width: 80em){.page__footer footer{max-width:1280px}}.page__footer a{color:inherit;text-decoration:none}.page__footer a:hover{text-decoration:underline}.page__footer .fas,.page__footer .fab,.page__footer .far,.page__footer .fal{color:#eee}.page__footer-copyright{font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.563em}.page__footer-follow ul{margin:0;padding:0;list-style-type:none}.page__footer-follow li{display:inline-block;padding-top:5px;padding-bottom:5px;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em;text-transform:uppercase}.page__footer-follow li+li:before{content:"";padding-right:5px}.page__footer-follow a{padding-right:10px;font-weight:bold}.page__footer-follow .social-icons a{white-space:nowrap}.layout--search .archive__item-teaser{margin-bottom:.25em}.search__toggle{margin-left:1rem;margin-right:1rem;height:2rem;border:0;outline:none;color:#00adb5;background-color:rgba(0,0,0,0);cursor:pointer;-webkit-transition:.2s;transition:.2s}.search__toggle:hover{color:#008288}.search-icon{width:100%;height:100%}.search-content{display:none;visibility:hidden;padding-top:1em;padding-bottom:1em}.search-content__inner-wrap{width:100%;margin-left:auto;margin-right:auto;padding-left:1em;padding-right:1em;-webkit-animation:intro .3s both;animation:intro .3s both;-webkit-animation-delay:.15s;animation-delay:.15s}@media(min-width: 80em){.search-content__inner-wrap{max-width:1280px}}.search-content__form{background-color:rgba(0,0,0,0)}.search-content .search-input{display:block;margin-bottom:0;padding:0;border:none;outline:none;box-shadow:none;background-color:rgba(0,0,0,0);font-size:1.25em}@media(min-width: 64em){.search-content .search-input{font-size:1.563em}}@media(min-width: 80em){.search-content .search-input{font-size:1.953em}}.search-content.is--visible{display:block;visibility:visible}.search-content.is--visible::after{content:"";display:block}.search-content .results__found{margin-top:.5em;font-size:.625em}.search-content .archive__item{margin-bottom:2em}@media(min-width: 64em){.search-content .archive__item{width:75%}}@media(min-width: 80em){.search-content .archive__item{width:50%}}.search-content .archive__item-title{margin-top:0}.search-content .archive__item-excerpt{margin-bottom:0}.ais-search-box{max-width:100% !important;margin-bottom:2em}.archive__item-title .ais-Highlight{color:#00adb5;font-style:normal;text-decoration:underline}.archive__item-excerpt .ais-Highlight{color:#00adb5;font-style:normal;font-weight:bold}div.highlighter-rouge,figure.highlight{position:relative;margin-bottom:1em;background:#263238;color:#eff;font-family:Monaco,Consolas,"Lucida Console",monospace;font-size:.625em;line-height:1.8;border-radius:4px}div.highlighter-rouge>pre,div.highlighter-rouge pre.highlight,figure.highlight>pre,figure.highlight pre.highlight{margin:0;padding:1em}.highlight table{margin-bottom:0;font-size:1em;border:0}.highlight table td{padding:0;width:calc(100% - 1em);border:0}.highlight table td.gutter,.highlight table td.rouge-gutter{padding-right:1em;width:1em;color:#b2ccd6;border-right:1px solid #b2ccd6;text-align:right}.highlight table td.code,.highlight table td.rouge-code{padding-left:1em}.highlight table pre{margin:0}.highlight pre{width:100%}.highlight .hll{background-color:#eff}.highlight .c{color:#b2ccd6}.highlight .err{color:#f07178}.highlight .k{color:#c792ea}.highlight .l{color:#f78c6c}.highlight .n{color:#eff}.highlight .o{color:#89ddff}.highlight .p{color:#eff}.highlight .cm{color:#b2ccd6}.highlight .cp{color:#b2ccd6}.highlight .c1{color:#b2ccd6}.highlight .cs{color:#b2ccd6}.highlight .gd{color:#f07178}.highlight .ge{font-style:italic}.highlight .gh{color:#eff;font-weight:bold}.highlight .gi{color:#c3e88d}.highlight .gp{color:#b2ccd6;font-weight:bold}.highlight .gs{font-weight:bold}.highlight .gu{color:#89ddff;font-weight:bold}.highlight .kc{color:#c792ea}.highlight .kd{color:#c792ea}.highlight .kn{color:#89ddff}.highlight .kp{color:#c792ea}.highlight .kr{color:#c792ea}.highlight .kt{color:#ffcb6b}.highlight .ld{color:#c3e88d}.highlight .m{color:#f78c6c}.highlight .s{color:#c3e88d}.highlight .na{color:#82aaff}.highlight .nb{color:#eff}.highlight .nc{color:#ffcb6b}.highlight .no{color:#f07178}.highlight .nd{color:#89ddff}.highlight .ni{color:#eff}.highlight .ne{color:#f07178}.highlight .nf{color:#82aaff}.highlight .nl{color:#eff}.highlight .nn{color:#ffcb6b}.highlight .nx{color:#82aaff}.highlight .py{color:#eff}.highlight .nt{color:#89ddff}.highlight .nv{color:#f07178}.highlight .ow{color:#89ddff}.highlight .w{color:#eff}.highlight .mf{color:#f78c6c}.highlight .mh{color:#f78c6c}.highlight .mi{color:#f78c6c}.highlight .mo{color:#f78c6c}.highlight .sb{color:#c3e88d}.highlight .sc{color:#eff}.highlight .sd{color:#b2ccd6}.highlight .s2{color:#c3e88d}.highlight .se{color:#f78c6c}.highlight .sh{color:#c3e88d}.highlight .si{color:#f78c6c}.highlight .sx{color:#c3e88d}.highlight .sr{color:#c3e88d}.highlight .s1{color:#c3e88d}.highlight .ss{color:#c3e88d}.highlight .bp{color:#eff}.highlight .vc{color:#f07178}.highlight .vg{color:#f07178}.highlight .vi{color:#f07178}.highlight .il{color:#f78c6c}.gist th,.gist td{border-bottom:0}.hidden,.is--hidden{display:none;visibility:hidden}.load{display:none}.transparent{opacity:0}.visually-hidden,.screen-reader-text,.screen-reader-text span,.screen-reader-shortcut{position:absolute !important;clip:rect(1px, 1px, 1px, 1px);height:1px !important;width:1px !important;border:0 !important;overflow:hidden}body:hover .visually-hidden a,body:hover .visually-hidden input,body:hover .visually-hidden button{display:none !important}.screen-reader-text:focus,.screen-reader-shortcut:focus{clip:auto !important;height:auto !important;width:auto !important;display:block;font-size:1em;font-weight:bold;padding:15px 23px 14px;background:#fff;z-index:100000;text-decoration:none;box-shadow:0 0 2px 2px rgba(0,0,0,.6)}.skip-link{position:fixed;z-index:20;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;white-space:nowrap}.skip-link li{height:0;width:0;list-style:none}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.task-list{padding:0}.task-list li{list-style-type:none}.task-list .task-list-item-checkbox{margin-right:.5em;opacity:1}.task-list .task-list{margin-left:1em}.cf{clear:both}.wrapper{margin-left:auto;margin-right:auto;width:100%}.align-left{display:block;margin-left:auto;margin-right:auto}@media(min-width: 37.5em){.align-left{float:left;margin-right:1em}}.align-right{display:block;margin-left:auto;margin-right:auto}@media(min-width: 37.5em){.align-right{float:right;margin-left:1em}}.align-center{display:block;margin-left:auto;margin-right:auto}@media(min-width: 64em){.full{margin-right:-20.3389830508% !important}}.icon{display:inline-block;fill:currentColor;width:1em;height:1.1em;line-height:1;position:relative;top:-0.1em;vertical-align:middle}.social-icons .fas,.social-icons .fab,.social-icons .far,.social-icons .fal{color:#eaeaea}.social-icons .fa-behance,.social-icons .fa-behance-square{color:#1769ff}.social-icons .fa-bitbucket{color:#205081}.social-icons .fa-dribbble,.social-icons .fa-dribble-square{color:#ea4c89}.social-icons .fa-facebook,.social-icons .fa-facebook-square,.social-icons .fa-facebook-f{color:#3b5998}.social-icons .fa-flickr{color:#ff0084}.social-icons .fa-foursquare{color:#0072b1}.social-icons .fa-github,.social-icons .fa-github-alt,.social-icons .fa-github-square{color:#171516}.social-icons .fa-gitlab{color:#e24329}.social-icons .fa-instagram{color:#517fa4}.social-icons .fa-keybase{color:#ef7639}.social-icons .fa-lastfm,.social-icons .fa-lastfm-square{color:#d51007}.social-icons .fa-linkedin,.social-icons .fa-linkedin-in{color:#007bb6}.social-icons .fa-mastodon,.social-icons .fa-mastodon-square{color:#2b90d9}.social-icons .fa-pinterest,.social-icons .fa-pinterest-p,.social-icons .fa-pinterest-square{color:#cb2027}.social-icons .fa-reddit{color:#ff4500}.social-icons .fa-rss,.social-icons .fa-rss-square{color:#fa9b39}.social-icons .fa-soundcloud{color:#f30}.social-icons .fa-stack-exchange,.social-icons .fa-stack-overflow{color:#fe7a15}.social-icons .fa-tumblr,.social-icons .fa-tumblr-square{color:#32506d}.social-icons .fa-twitter,.social-icons .fa-twitter-square{color:#55acee}.social-icons .fa-vimeo,.social-icons .fa-vimeo-square,.social-icons .fa-vimeo-v{color:#1ab7ea}.social-icons .fa-vine{color:#00bf8f}.social-icons .fa-youtube{color:#b00}.social-icons .fa-xing,.social-icons .fa-xing-square{color:#006567}.navicon{position:relative;width:1.5rem;height:.25rem;background:#00adb5;margin:auto;-webkit-transition:.3s;transition:.3s}.navicon:before,.navicon:after{content:"";position:absolute;left:0;width:1.5rem;height:.25rem;background:#00adb5;-webkit-transition:.3s;transition:.3s}.navicon:before{top:-0.5rem}.navicon:after{bottom:-0.5rem}.close .navicon{background:rgba(0,0,0,0)}.close .navicon:before,.close .navicon:after{-webkit-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%;top:0;width:1.5rem}.close .navicon:before{-webkit-transform:rotate3d(0, 0, 1, 45deg);transform:rotate3d(0, 0, 1, 45deg)}.close .navicon:after{-webkit-transform:rotate3d(0, 0, 1, -45deg);transform:rotate3d(0, 0, 1, -45deg)}@supports(pointer-events: none){.greedy-nav__toggle:before{content:"";position:fixed;top:0;left:0;width:100%;height:100%;opacity:0;background-color:#252a34;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;pointer-events:none}}.greedy-nav__toggle.close:before{opacity:.9;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;pointer-events:auto}.greedy-nav__toggle:hover .navicon,.greedy-nav__toggle:hover .navicon:before,.greedy-nav__toggle:hover .navicon:after{background:#008288}.greedy-nav__toggle:hover.close .navicon{background:rgba(0,0,0,0)}@media(min-width: 64em){.sticky{clear:both;position:-webkit-sticky;position:sticky;top:2em}.sticky::after{clear:both;content:"";display:table}.sticky>*{display:block}}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.show-modal{overflow:hidden;position:relative}.show-modal:before{position:absolute;content:"";top:0;left:0;width:100%;height:100%;z-index:999;background-color:rgba(255,255,255,.85)}.show-modal .modal{display:block}.modal{display:none;position:fixed;width:300px;top:50%;left:50%;margin-left:-150px;margin-top:-150px;min-height:0;z-index:9999;background:#fff;border:1px solid #51555d;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.125)}.modal__title{margin:0;padding:.5em 1em}.modal__supporting-text{padding:0 1em .5em 1em}.modal__actions{padding:.5em 1em;border-top:1px solid #51555d}.footnote{color:#9ba1a6;text-decoration:none}.footnotes{color:#9ba1a6}.footnotes ol,.footnotes li,.footnotes p{margin-bottom:0;font-size:.625em}a.reversefootnote{color:#7a8288;text-decoration:none}a.reversefootnote:hover{text-decoration:underline}.required{color:#ee5f5b;font-weight:bold}.gsc-control-cse table,.gsc-control-cse tr,.gsc-control-cse td{border:0}.responsive-video-container{position:relative;margin-bottom:1em;padding-bottom:56.25%;height:0;overflow:hidden;max-width:100%}.responsive-video-container iframe,.responsive-video-container object,.responsive-video-container embed{position:absolute;top:0;left:0;width:100%;height:100%}:-webkit-full-screen-ancestor .masthead,:-webkit-full-screen-ancestor .page__footer{position:static}#main{clear:both;margin-left:auto;margin-right:auto;padding-left:1em;padding-right:1em;-webkit-animation:intro .3s both;animation:intro .3s both;max-width:100%;-webkit-animation-delay:.15s;animation-delay:.15s}#main::after{clear:both;content:"";display:table}@media(min-width: 80em){#main{max-width:1280px}}body{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:100vh;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.initial-content,.search-content{flex:1 0 auto}@media(min-width: 64em){.page{float:right;width:calc(100% - 200px);padding-right:200px}}@media(min-width: 80em){.page{width:calc(100% - 300px);padding-right:300px}}.page .page__inner-wrap{float:left;margin-top:1em;margin-left:0;margin-right:0;width:100%;clear:both}.page .page__inner-wrap .page__content,.page .page__inner-wrap .page__meta,.page .page__inner-wrap .comment__date,.page .page__inner-wrap .page__share{position:relative;float:left;margin-left:0;margin-right:0;width:100%;clear:both}.page__title{margin-top:0;line-height:1}.page__title a{color:#eaeaea;text-decoration:none}.page__title+.page__meta,.page__title+.comment__date{margin-top:-0.5em}.page__lead{font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:1em}.page__content h2{padding-bottom:.5em;border-bottom:1px solid #51555d}.page__content h1 .header-link,.page__content h2 .header-link,.page__content h3 .header-link,.page__content h4 .header-link,.page__content h5 .header-link,.page__content h6 .header-link{position:relative;left:.5em;opacity:0;font-size:.625em;-webkit-transition:opacity .2s ease-in-out .1s;-moz-transition:opacity .2s ease-in-out .1s;-o-transition:opacity .2s ease-in-out .1s;transition:opacity .2s ease-in-out .1s}.page__content h1:hover .header-link,.page__content h2:hover .header-link,.page__content h3:hover .header-link,.page__content h4:hover .header-link,.page__content h5:hover .header-link,.page__content h6:hover .header-link{opacity:1}.page__content p,.page__content li,.page__content dl{font-size:.75em}.page__content p{margin:0 0 1.3em}.page__content a:not(.btn):hover{text-decoration:underline}.page__content a:not(.btn):hover img{box-shadow:0 0 10px rgba(0,0,0,.25)}.page__content dt{margin-top:1em;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-weight:bold}.page__content dd{margin-left:1em;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em}.page__content .small{font-size:.625em}.page__content blockquote+.small{margin-top:-1.5em;padding-left:1.25rem}.page__hero{position:relative;margin-bottom:2em;clear:both;-webkit-animation:intro .3s both;animation:intro .3s both;-webkit-animation-delay:.25s;animation-delay:.25s}.page__hero::after{clear:both;content:"";display:table}.page__hero--overlay{position:relative;margin-bottom:2em;padding:3em 0;clear:both;background-size:cover;background-repeat:no-repeat;background-position:center;-webkit-animation:intro .3s both;animation:intro .3s both;-webkit-animation-delay:.25s;animation-delay:.25s}.page__hero--overlay::after{clear:both;content:"";display:table}.page__hero--overlay a{color:#fff}.page__hero--overlay .wrapper{padding-left:1em;padding-right:1em}@media(min-width: 80em){.page__hero--overlay .wrapper{max-width:1280px}}.page__hero--overlay .page__title,.page__hero--overlay .page__meta,.page__hero--overlay .comment__date,.page__hero--overlay .page__lead,.page__hero--overlay .btn{color:#fff;text-shadow:1px 1px 4px rgba(0,0,0,.5)}.page__hero--overlay .page__lead{max-width:768px}.page__hero--overlay .page__title{font-size:1.563em}@media(min-width: 37.5em){.page__hero--overlay .page__title{font-size:1.953em}}.page__hero-image{width:100%;height:auto;-ms-interpolation-mode:bicubic}.page__hero-caption{position:absolute;bottom:0;right:0;margin:0 auto;padding:2px 5px;color:#fff;font-family:Georgia,Times,serif;font-size:.563em;background:#000;text-align:right;z-index:5;opacity:.5;border-radius:4px 0 0 0}@media(min-width: 64em){.page__hero-caption{padding:5px 10px}}.page__hero-caption a{color:#fff;text-decoration:none}.page__share{margin-top:2em;padding-top:1em;border-top:1px solid #51555d}@media(max-width: 37.5em){.page__share .btn span{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}}.page__share-title{margin-bottom:10px;font-size:.625em;text-transform:uppercase}.page__meta,.comment__date{margin-top:2em;color:#eee;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em}.page__meta p,.comment__date p{margin:0}.page__meta a,.comment__date a{color:inherit}.page__meta-title{margin-bottom:10px;font-size:.625em;text-transform:uppercase}.page__meta-sep::before{content:"•";padding-left:.5em;padding-right:.5em}.page__taxonomy .sep{display:none}.page__taxonomy strong{margin-right:10px}.page__taxonomy-item{display:inline-block;margin-right:5px;margin-bottom:8px;padding:5px 10px;text-decoration:none;border:1px solid #3d4046;border-radius:4px}.page__taxonomy-item:hover{text-decoration:none;color:#a9dde0}.taxonomy__section{margin-bottom:2em;padding-bottom:1em}.taxonomy__section:not(:last-child){border-bottom:solid 1px #51555d}.taxonomy__section .archive__item-title{margin-top:0}.taxonomy__section .archive__subtitle{clear:both;border:0}.taxonomy__section+.taxonomy__section{margin-top:2em}.taxonomy__title{margin-bottom:.5em;color:#eee}.taxonomy__count{color:#eee}.taxonomy__index{display:grid;grid-column-gap:2em;grid-template-columns:repeat(2, 1fr);margin:1.414em 0;padding:0;font-size:.625em;list-style:none}@media(min-width: 64em){.taxonomy__index{grid-template-columns:repeat(3, 1fr)}}.taxonomy__index a{display:-webkit-box;display:-ms-flexbox;display:flex;padding:.25em 0;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;color:inherit;text-decoration:none;border-bottom:1px solid #51555d}.back-to-top{display:block;clear:both;color:#eee;font-size:.5em;text-transform:uppercase;text-align:right;text-decoration:none}.page__comments{float:left;margin-left:0;margin-right:0;width:100%;clear:both}.page__comments-title{margin-top:2rem;margin-bottom:10px;padding-top:2rem;font-size:.625em;border-top:1px solid #51555d;text-transform:uppercase}.page__comments-form{-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.page__comments-form.disabled input,.page__comments-form.disabled button,.page__comments-form.disabled textarea,.page__comments-form.disabled label{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}.comment{clear:both;margin:1em 0}.comment::after{clear:both;content:"";display:table}.comment:not(:last-child){border-bottom:1px solid #51555d}.comment__avatar-wrapper{float:left;width:60px;height:60px}@media(min-width: 64em){.comment__avatar-wrapper{width:100px;height:100px}}.comment__avatar{width:40px;height:40px;border-radius:50%}@media(min-width: 64em){.comment__avatar{width:80px;height:80px;padding:5px;border:1px solid #51555d}}.comment__content-wrapper{float:right;width:calc(100% - 60px)}@media(min-width: 64em){.comment__content-wrapper{width:calc(100% - 100px)}}.comment__author{margin:0}.comment__author a{text-decoration:none}.comment__date{margin:0}.comment__date a{text-decoration:none}.page__related{clear:both;float:left;margin-top:2em;padding-top:1em;border-top:1px solid #51555d}.page__related::after{clear:both;content:"";display:table}@media(min-width: 64em){.page__related{float:right;width:calc(100% - 200px)}}@media(min-width: 80em){.page__related{width:calc(100% - 300px)}}.page__related a{color:inherit;text-decoration:none}.page__related-title{margin-bottom:10px;font-size:.625em;text-transform:uppercase}@media(min-width: 64em){.wide .page{padding-right:0}}@media(min-width: 80em){.wide .page{padding-right:0}}@media(min-width: 64em){.wide .page__related{padding-right:0}}@media(min-width: 80em){.wide .page__related{padding-right:0}}.archive{margin-top:1em;margin-bottom:2em}@media(min-width: 64em){.archive{float:right;width:calc(100% - 200px);padding-right:200px}}@media(min-width: 80em){.archive{width:calc(100% - 300px);padding-right:300px}}.archive__item{position:relative}.archive__item a{position:relative;z-index:10}.archive__item a[rel=permalink]{position:static}.archive__subtitle{margin:1.414em 0 .5em;padding-bottom:.5em;font-size:.75em;color:#eee;border-bottom:1px solid #51555d}.archive__subtitle+.list__item .archive__item-title{margin-top:.5em}.archive__item-title{margin-bottom:.25em;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;line-height:initial;overflow:hidden;text-overflow:ellipsis}.archive__item-title a[rel=permalink]::before{content:"";position:absolute;left:0;top:0;right:0;bottom:0}.archive__item-title a+a{opacity:.5}.page__content .archive__item-title{margin-top:1em;border-bottom:none}.archive__item-excerpt{margin-top:0;font-size:.625em}.archive__item-excerpt+p{text-indent:0}.archive__item-excerpt a{position:relative}.archive__item-teaser{position:relative;border-radius:4px;overflow:hidden}.archive__item-teaser img{width:100%}.archive__item-caption{position:absolute;bottom:0;right:0;margin:0 auto;padding:2px 5px;color:#fff;font-family:Georgia,Times,serif;font-size:.5em;background:#000;text-align:right;z-index:5;opacity:.5;border-radius:4px 0 0 0}@media(min-width: 64em){.archive__item-caption{padding:5px 10px}}.archive__item-caption a{color:#fff;text-decoration:none}.list__item .page__meta,.list__item .comment__date{margin:0 0 4px;font-size:.6em}@media(min-width: 64em){.archive .grid__wrapper{margin-right:-200px}}@media(min-width: 80em){.archive .grid__wrapper{margin-right:-300px}}.grid__item{margin-bottom:2em}@media(min-width: 37.5em){.grid__item{float:left;width:48.9795918367%}.grid__item:nth-child(2n+1){clear:both;margin-left:0}.grid__item:nth-child(2n+2){clear:none;margin-left:2.0408163265%}}@media(min-width: 48em){.grid__item{margin-left:0;margin-right:0;width:23.7288135593%}.grid__item:nth-child(2n+1){clear:none}.grid__item:nth-child(4n+1){clear:both}.grid__item:nth-child(4n+2){clear:none;margin-left:1.6949152542%}.grid__item:nth-child(4n+3){clear:none;margin-left:1.6949152542%}.grid__item:nth-child(4n+4){clear:none;margin-left:1.6949152542%}}.grid__item .page__meta,.grid__item .comment__date{margin:0 0 4px;font-size:.6em}.grid__item .page__meta-sep{display:block}.grid__item .page__meta-sep::before{display:none}.grid__item .archive__item-title{margin-top:.5em;font-size:.75em}.grid__item .archive__item-excerpt{display:none}@media(min-width: 48em){.grid__item .archive__item-excerpt{display:block;font-size:.625em}}@media(min-width: 37.5em){.grid__item .archive__item-teaser{max-height:200px}}@media(min-width: 48em){.grid__item .archive__item-teaser{max-height:120px}}.feature__wrapper{clear:both;margin-bottom:2em;border-bottom:1px solid #51555d}.feature__wrapper::after{clear:both;content:"";display:table}.feature__wrapper .archive__item-title{margin-bottom:0}.feature__item{position:relative;margin-bottom:2em;font-size:1.125em}@media(min-width: 37.5em){.feature__item{float:left;margin-bottom:0;width:32.2033898305%}.feature__item:nth-child(3n+1){clear:both;margin-left:0}.feature__item:nth-child(3n+2){clear:none;margin-left:1.6949152542%}.feature__item:nth-child(3n+3){clear:none;margin-left:1.6949152542%}.feature__item .feature__item-teaser{max-height:200px;overflow:hidden}}.feature__item .archive__item-body{padding-left:1.6949152542%;padding-right:1.6949152542%}.feature__item a.btn::before{content:"";position:absolute;left:0;top:0;right:0;bottom:0}.feature__item--left{position:relative;float:left;margin-left:0;margin-right:0;width:100%;clear:both;font-size:1.125em}.feature__item--left .archive__item{float:left}.feature__item--left .archive__item-teaser{margin-bottom:2em}.feature__item--left a.btn::before{content:"";position:absolute;left:0;top:0;right:0;bottom:0}@media(min-width: 37.5em){.feature__item--left .archive__item-teaser{float:left;width:40.6779661017%}.feature__item--left .archive__item-body{float:right;padding-left:1.6949152542%;padding-right:1.6949152542%;width:57.6271186441%}}.feature__item--right{position:relative;float:left;margin-left:0;margin-right:0;width:100%;clear:both;font-size:1.125em}.feature__item--right .archive__item{float:left}.feature__item--right .archive__item-teaser{margin-bottom:2em}.feature__item--right a.btn::before{content:"";position:absolute;left:0;top:0;right:0;bottom:0}@media(min-width: 37.5em){.feature__item--right{text-align:right}.feature__item--right .archive__item-teaser{float:right;width:40.6779661017%}.feature__item--right .archive__item-body{float:left;width:57.6271186441%;padding-left:1.6949152542%;padding-right:1.6949152542%}}.feature__item--center{position:relative;float:left;margin-left:0;margin-right:0;width:100%;clear:both;font-size:1.125em}.feature__item--center .archive__item{float:left;width:100%}.feature__item--center .archive__item-teaser{margin-bottom:2em}.feature__item--center a.btn::before{content:"";position:absolute;left:0;top:0;right:0;bottom:0}@media(min-width: 37.5em){.feature__item--center{text-align:center}.feature__item--center .archive__item-teaser{margin:0 auto;width:40.6779661017%}.feature__item--center .archive__item-body{margin:0 auto;width:57.6271186441%}}.archive .feature__wrapper .archive__item-title{margin-top:.25em;font-size:1em}.archive .feature__item,.archive .feature__item--left,.archive .feature__item--center,.archive .feature__item--right{font-size:1em}@media(min-width: 64em){.wide .archive{padding-right:0}}@media(min-width: 80em){.wide .archive{padding-right:0}}.layout--single .feature__wrapper{display:inline-block}.sidebar{clear:both}.sidebar::after{clear:both;content:"";display:table}@media(min-width: 64em){.sidebar{float:left;width:calc(200px - 1em);opacity:.75;-webkit-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}.sidebar:hover{opacity:1}.sidebar.sticky{overflow-y:auto;max-height:calc(100vh - 2em - 2em)}}@media(min-width: 80em){.sidebar{width:calc(300px - 1em)}}.sidebar>*{margin-top:1em;margin-bottom:1em}.sidebar h2,.sidebar h3,.sidebar h4,.sidebar h5,.sidebar h6{margin-bottom:0;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif}.sidebar p,.sidebar li{font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.625em;line-height:1.5}.sidebar img{width:100%}.sidebar img.emoji{width:20px;height:20px}.sidebar__right{margin-bottom:1em}@media(min-width: 64em){.sidebar__right{position:absolute;top:0;right:0;width:200px;margin-right:-200px;padding-left:1em;z-index:10}.sidebar__right.sticky{clear:both;position:-webkit-sticky;position:sticky;top:2em;float:right}.sidebar__right.sticky::after{clear:both;content:"";display:table}.sidebar__right.sticky .toc .toc__menu{overflow-y:auto;max-height:calc(100vh - 7em)}}@media(min-width: 80em){.sidebar__right{width:300px;margin-right:-300px}}@media(min-width: 64em){.splash .sidebar__right{position:relative;float:right;margin-right:0}}@media(min-width: 80em){.splash .sidebar__right{margin-right:0}}.author__avatar{display:table-cell;vertical-align:top;width:36px;height:36px}@media(min-width: 64em){.author__avatar{display:block;width:auto;height:auto}}.author__avatar img{max-width:110px;border-radius:50%}@media(min-width: 64em){.author__avatar img{padding:5px;border:1px solid #51555d}}.author__content{display:table-cell;vertical-align:top;padding-left:15px;padding-right:25px;line-height:1}@media(min-width: 64em){.author__content{display:block;width:100%;padding-left:0;padding-right:0}}.author__content a{color:inherit;text-decoration:none}.author__name{margin:0}@media(min-width: 64em){.author__name{margin-top:10px;margin-bottom:10px}}.sidebar .author__name{font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;font-size:.75em}.author__bio{margin:0}@media(min-width: 64em){.author__bio{margin-top:10px;margin-bottom:20px}}.author__urls-wrapper{position:relative;display:table-cell;vertical-align:middle;font-family:-apple-system,BlinkMacSystemFont,"Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;z-index:20;cursor:pointer}.author__urls-wrapper li:last-child a{margin-bottom:0}.author__urls-wrapper .author__urls span.label{padding-left:5px}@media(min-width: 64em){.author__urls-wrapper{display:block}}.author__urls-wrapper button{position:relative;margin-bottom:0}@supports(pointer-events: none){.author__urls-wrapper button:before{content:"";position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none}}.author__urls-wrapper button.open:before{pointer-events:auto}@media(min-width: 64em){.author__urls-wrapper button{display:none}}.author__urls{display:none;position:absolute;right:0;margin-top:15px;padding:10px;list-style-type:none;border:1px solid #51555d;border-radius:4px;background:#252a34;box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 2px 10px 0 rgba(0,0,0,.12);cursor:default}.author__urls.is--visible{display:block}@media(min-width: 64em){.author__urls{display:block;position:relative;margin:0;padding:0;border:0;background:rgba(0,0,0,0);box-shadow:none}}.author__urls:before{display:block;content:"";position:absolute;top:-11px;left:calc(50% - 10px);width:0;border-style:solid;border-width:0 10px 10px;border-color:#51555d rgba(0,0,0,0);z-index:0}@media(min-width: 64em){.author__urls:before{display:none}}.author__urls:after{display:block;content:"";position:absolute;top:-10px;left:calc(50% - 10px);width:0;border-style:solid;border-width:0 10px 10px;border-color:#252a34 rgba(0,0,0,0);z-index:1}@media(min-width: 64em){.author__urls:after{display:none}}.author__urls ul{padding:10px;list-style-type:none}.author__urls li{white-space:nowrap}.author__urls a{display:block;margin-bottom:5px;padding-right:5px;padding-top:2px;padding-bottom:2px;color:inherit;font-size:.75em;text-decoration:none}.author__urls a:hover{text-decoration:underline}.wide .sidebar__right{margin-bottom:1em}@media(min-width: 64em){.wide .sidebar__right{position:initial;top:initial;right:initial;width:initial;margin-right:initial;padding-left:initial;z-index:initial}.wide .sidebar__right.sticky{float:none}}@media(min-width: 80em){.wide .sidebar__right{width:initial;margin-right:initial}}@media print{[hidden]{display:none}*{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}html{margin:0;padding:0;min-height:auto !important;font-size:16px}body{margin:0 auto;background:#fff !important;color:#000 !important;font-size:1rem;line-height:1.5;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}h1,h2,h3,h4,h5,h6{color:#000;line-height:1.2;margin-bottom:.75rem;margin-top:0}h1{font-size:2.5rem}h2{font-size:2rem}h3{font-size:1.75rem}h4{font-size:1.5rem}h5{font-size:1.25rem}h6{font-size:1rem}a,a:visited{color:#000;text-decoration:underline;word-wrap:break-word}table{border-collapse:collapse}thead{display:table-header-group}table,th,td{border-bottom:1px solid #000}td,th{padding:8px 16px}img{border:0;display:block;max-width:100% !important;vertical-align:middle}hr{border:0;border-bottom:2px solid #bbb;height:0;margin:2.25rem 0;padding:0}dt{font-weight:bold}dd{margin:0;margin-bottom:.75rem}abbr[title],acronym[title]{border:0;text-decoration:none}table,blockquote,pre,code,figure,li,hr,ul,ol,a,tr{page-break-inside:avoid}h2,h3,h4,p,a{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid;page-break-inside:avoid}h1+p,h2+p,h3+p{page-break-before:avoid}img{page-break-after:auto;page-break-before:auto;page-break-inside:avoid}pre{white-space:pre-wrap !important;word-wrap:break-word}a[href^="http://"]:after,a[href^="https://"]:after,a[href^="ftp://"]:after{content:" (" attr(href) ")";font-size:80%}abbr[title]:after,acronym[title]:after{content:" (" attr(title) ")"}#main{max-width:100%}.page{margin:0;padding:0;width:100%}.page-break,.page-break-before{page-break-before:always}.page-break-after{page-break-after:always}.no-print{display:none}a.no-reformat:after{content:""}abbr[title].no-reformat:after,acronym[title].no-reformat:after{content:""}.page__hero-caption{color:#000 !important;background:#fff !important;opacity:1}.page__hero-caption a{color:#000 !important}.masthead,.toc,.page__share,.page__related,.pagination,.ads,.page__footer,.page__comments-form,.author__avatar,.author__content,.author__urls-wrapper,.nav__list,.sidebar,.adsbygoogle{display:none !important;height:1px !important}}.page__content{text-align:justify}h2,h3{margin-bottom:0px;font-weight:bold}h4{font-size:.75em;margin-bottom:0px;font-style:italic}summary{font-size:.75em}.MathJax_Display{font-size:.75em}.toc__menu a{font-size:1.25em}/*# sourceMappingURL=main.css.map */ \ No newline at end of file diff --git a/assets/css/main.css.map b/assets/css/main.css.map new file mode 100644 index 0000000..2bc09b8 --- /dev/null +++ b/assets/css/main.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["../../_sass/minimal-mistakes/skins/_dark.scss","../../_sass/minimal-mistakes.scss","../../_sass/minimal-mistakes/vendor/magnific-popup/_settings.scss","../../_sass/minimal-mistakes/_variables.scss","../../_sass/minimal-mistakes/vendor/magnific-popup/_magnific-popup.scss","../../_sass/minimal-mistakes/_mixins.scss","../../_sass/minimal-mistakes/_reset.scss","../../_sass/minimal-mistakes/vendor/breakpoint/_breakpoint.scss","../../_sass/minimal-mistakes/_base.scss","../../_sass/minimal-mistakes/_forms.scss","../../_sass/minimal-mistakes/_tables.scss","../../_sass/minimal-mistakes/_animations.scss","../../_sass/minimal-mistakes/_buttons.scss","../../_sass/minimal-mistakes/_notices.scss","../../_sass/minimal-mistakes/_masthead.scss","../../_sass/minimal-mistakes/_navigation.scss","../../_sass/minimal-mistakes/_footer.scss","../../_sass/minimal-mistakes/_search.scss","../../_sass/minimal-mistakes/_syntax.scss","../../_sass/minimal-mistakes/_utilities.scss","../../_sass/minimal-mistakes/_page.scss","../../_sass/minimal-mistakes/_archive.scss","../../_sass/minimal-mistakes/_sidebar.scss","../../_sass/minimal-mistakes/_print.scss","main.scss"],"names":[],"mappings":"CAoBA,gKAIE,cAGF,uCACE,iBAjBsB,QCXxB;AAAA;AAAA;AAAA;AAAA,EC0CA,yBC3BQ,oBC8DR,QACE,MACA,OACA,WACA,YACA,aACA,gBACA,eAEA,WFjFoC,KEkFpC,QFjFoC,GEmFlC,yBAKJ,UACE,MACA,OACA,WACA,YACA,aACA,eACA,wBACA,mCAIF,eACE,kBACA,kBACA,WACA,YACA,OACA,MACA,cACA,8BACA,2BACA,sBAKA,sBACE,WACA,qBACA,YACA,sBAOA,qCACE,aAMN,aACE,kBACA,qBACA,sBACA,cACA,gBACA,aAIA,8DACE,WACA,YAKJ,cACE,gBAGA,iEACE,qBACA,wBACA,gBAGJ,UACE,eACA,uBACA,oBACA,eAGA,8BACE,YAIJ,kDAIE,yBACA,sBACA,iBAKA,wBACE,aAkBF,UACE,wBAUJ,eACE,MFvMoC,KEwMpC,kBACA,QACA,WACA,kBACA,kBACA,SACA,UACA,aACA,iBACE,MFjNkC,KEkNlC,uBACE,MFlNgC,KEyNpC,4BACE,aAMF,0BACE,aAMF,kCAEE,iBACA,eACA,yBACA,SACA,wBACA,cACA,aACA,UACA,aACA,wBACA,gBAEF,yBACI,UACA,SAMN,WACE,WACA,YACA,iBAEA,kBACA,QACA,MACA,qBACA,kBACA,QF5QoC,EE8QlC,0BAEF,sBACA,MFhRoC,KEkRpC,kBACA,eACA,YDvRM,oBCyRN,kCAEE,UAEE,0BAIJ,kBACE,QAIF,6BACE,MFlSkC,KEuSpC,2DACE,MF1SkC,KE2SlC,WACA,iBACA,kBACA,WAKJ,aACE,kBACA,MACA,QACA,MFpToC,KEqTpC,eACA,iBAKA,WACE,kBACA,QFjUkC,EEmUhC,0BAEF,SACA,QACA,iBACA,UACA,WACA,aACA,0CACA,kBACE,iBAEF,kCAEE,UAEE,0BAGJ,uEAIE,WACA,cACA,QACA,SACA,kBACA,OACA,MACA,gBACA,iBACA,kCAGF,mCAGE,sBACA,yBACA,QAGF,oCAEE,sBACA,yBACA,WAKJ,gBACE,OAEA,6CAEE,6BACA,iBAEF,8CAEE,iBACA,6BAIJ,iBACE,QACA,+CAEE,4BACA,iBAEF,gDAEE,4BASJ,mBACE,YF/YkC,KEgZlC,eFhZkC,KEiZlC,gCACE,cACA,WACA,UFlZgC,MEoZlC,8BACE,UAGJ,mBACE,WACA,SACA,gBACA,mBACA,0BACE,kBACA,cACA,MACA,OACA,WACA,YACA,WF1bgC,uBE2bhC,WFtagC,KEkblC,YACE,WACA,eACA,YACA,cACA,cACA,8BACA,2BACA,sBACA,oBACA,cAKJ,YACE,cACA,kBACE,WACA,kBACA,OACA,IFhcgC,KEichC,OFhcgC,KEichC,cACA,QACA,WACA,YACA,WACA,WFnegC,uBEoehC,WFzcgC,KE2clC,kBACE,MFrcgC,QEschC,cACA,eACA,iBAEF,mBACE,SAEF,uBACE,aACA,gBAGJ,gBACE,iBACA,kBACA,SACA,OACA,WACA,YAEF,WACE,gBACA,iBACA,MF9dkC,QE+dlC,qBACA,mBAIA,+BACE,eAMA,2CACE,eAOJ,gGAKI,kCACE,eACA,gBAGA,4BACE,UAKF,kCACE,MACA,SAEF,kCACE,eACA,gBAGJ,gCACE,0BACA,SACA,SACA,SACA,gBACA,eACA,8BACA,2BACA,sBACA,sCACE,UAGJ,6BACE,UACA,QAEF,2BACE,MACA,QACA,WACA,YACA,iBACA,0BACA,eACA,kBACA,WAUV,kCACE,WACE,8BACA,sBAEF,gBACE,2BACA,mBAEF,iBACE,8BACA,sBAEF,eACE,aF5lBkC,IE6lBlC,cF7lBkC,KEumBlC,kBACE,UAEF,yBACE,YACA,SACA,mBACA,eACA,mBAEF,wBACE,UAEF,sBACE,iBAEF,oBACE,MACA,QACA,cCjoBN,qBAEE,4BAEA,yBACA,oBCLF,wBAEA,KAEE,sBACA,iBNJiB,QMKjB,eAcA,8BACA,0BCuCE,wBD1DJ,KAOI,gBCmDA,wBD1DJ,KAWI,gBC+CA,wBD1DJ,KAeI,gBASJ,cAIA,iBACE,WACA,gBAGF,YACE,WACA,gBAKF,8EAWE,cAKF,mBAGE,qBACA,gBACA,QAKF,sBACE,aAGF,EACE,MNhEW,QM2Eb,iBAEE,UAKF,QAEE,kBACA,cACA,cACA,wBAGF,IACE,WAGF,IACE,eAKF,IAEE,eACA,cACA,YAEA,sBACA,SACA,+BAKF,iCAEE,eAKF,6BAIE,SACA,eACA,sBAGF,aAEE,kBACA,mBAGF,iDAEE,UACA,SAGF,oEAII,0BACA,eAGJ,mHAQI,eAGJ,mBACE,sBACA,6BAGF,+FAEE,wBAGF,SACE,cACA,mBErLF,KAEE,kBACA,gBAGF,KACE,SACA,UACA,MRPW,QQQX,YLEW,uGKDX,gBAEA,sBAEE,gBAIJ,kBAME,kBACA,gBACA,YLfW,uGKgBX,iBAGF,GACE,aACA,UL0BS,OKvBX,GACE,ULuBS,QKpBX,GACE,ULoBS,IKjBX,GACE,ULiBS,OKdX,GACE,ULcS,MKXX,GACE,ULWS,QKRX,aAEE,ULZY,OKed,EACE,oBAGF,MAEE,qBACA,gCACA,UACE,cAIJ,MACE,cAKF,gDASE,UACA,SAKF,sCAEE,qBACA,YACA,iCAKF,WACE,qBACA,iBACA,kBACA,kBACA,gCAEA,gBACE,kBAEA,uBACE,YACA,kBAYJ,UACE,MRtHiB,QQyHnB,QACE,MR3He,QQ4Hf,UAYJ,qBAKE,YLzIU,2CK4IZ,IACE,gBAGF,8CAKE,kBACA,qBACA,eACA,WRjKsB,QQkKtB,cLWc,IKTd,6JAEE,sBACA,YAMJ,GACE,cACA,aACA,SACA,6BAKF,YAEE,mBAGF,YAEE,gBASF,OACE,oBACA,aACA,yBACA,8BACA,wBACA,uBACA,eACA,aAEA,2DAGE,kBAGF,WACE,WACA,cL3CY,IK4CZ,mBLtCgB,oBKuChB,WLvCgB,oBK0ClB,SACE,cDvKA,0BC2KA,8BAGI,wBAIJ,uBACE,WDnLF,0BCwLA,gCAGI,6BAIJ,wBACE,WAON,WACE,mBACA,MLrLiB,KKsLjB,YL3PM,oBK4PN,ULzNY,OK2NZ,aACE,mBLlFgB,oBKmFhB,WLnFgB,oBKqFhB,mBACE,MRpQa,QQ2QnB,eACE,gBAqBA,OACE,SACA,UAGF,OACE,gBAGF,MACE,qBAIF,oBAEE,gBAGF,oBAEE,aAQJ,6IAsBE,mBLtKkB,oBKuKlB,WLvKkB,oBMxLpB,KACE,iBACA,YACA,iBTIsB,QSFtB,cACE,kBACA,UACA,eAGF,YACE,cACA,WACA,mBACA,kBACA,UACA,MTfS,QSgBT,SACA,mBAGF,OACE,oBAGF,QACE,qBACA,iBACA,UAGF,QACE,aAIJ,mCAKE,wBACA,uBAGF,6BAIE,sBACA,YNvCW,uGM0Cb,MACE,cACA,oBACA,MTvDW,QSwDX,eAEA,YACE,UNfU,OMkBZ,wCAGE,cAIJ,sBAGE,qBACA,WACA,cACA,mBACA,MT5EW,QS6EX,iBT9EiB,QS+EjB,OT5Ea,QS6Eb,cNiGc,IMhGd,WNiGW,2BM9Fb,YACE,WAGF,aACE,WAGF,yDAGE,WACA,YACA,UACA,aACA,cACA,mBACA,eACA,gBACA,aACA,gBAGF,uCAEE,sBACA,UACA,YACA,aAGF,kBACE,SAGF,iBACE,WACA,gBACA,oBACA,eACA,+BACA,yBACA,gBAGF,wDAGE,WACA,YACA,eACA,kBAGF,wBAEE,gBAGF,OACE,WACA,sBAGF,8BAEE,YAGF,SACE,gBACA,YACA,cACA,mBAGF,mBACE,aAGF,MACE,kBAGF,iBAEE,kBACA,mBAGF,wDAEE,WACA,kBAGF,+BAEE,qBACA,gBACA,gBACA,sBAGF,8DAEE,iBAOF,wGAME,WACA,mBAOF,2BAEE,aTnNc,QSoNd,UACA,wBACA,4EAIF,uFAIE,gBAOF,yBAEE,MN1JiB,KM6JnB,YACE,cACA,kBACA,gBAGF,aACE,qBACA,sBACA,iBAOF,YACE,kBACA,UACA,eAOF,6DAGE,qBACA,gBAGF,mBACE,qBAGF,+DAGE,eACA,gBACA,sBAGF,kFAEE,WACA,cACA,iBAOF,6DAGE,qBACA,gBAGF,2BACE,kBACA,mBACA,gBACA,mBAGF,mBACE,qBAGF,+DAGE,eACA,gBACA,sBAGF,kFAEE,WACA,cACA,iBAOF,sBACE,WAGF,8BACE,cAGF,aACE,kBACA,MACA,OACA,WACA,YACA,sCACA,WAGF,eACE,aACA,kBACA,QACA,SACA,WCjWF,MACE,cACA,kBACA,WACA,YPQW,uGOPX,UPyCY,OOxCZ,yBACA,gBAEA,YACE,eAIJ,MACE,iBVXa,QUYb,gCAGF,GACE,aACA,iBACA,gBAGF,GACE,aACA,gCAGF,SAGE,sBCjCF,yBACE,GACE,UAEF,KACE,WAIJ,iBACE,GACE,UAEF,KACE,WCVJ,KAEE,qBACA,oBACA,iBACA,YTGW,uGSFX,UToCY,OSnCZ,iBACA,kBACA,qBACA,eACA,cTmKc,ISlKd,eAEA,WACE,kBAGF,mBACE,mBAiBA,cP6CF,iBOzDA,QP0DA,WOrCI,sBPoCJ,iBOzDA,QP0DA,WOjCI,oBPgCJ,iBO/B8B,QPgC9B,WO9CE,cP6CF,iBOzDA,KP0DA,cO3CM,yBAMF,sBPoCJ,iBOzDA,KP0DA,cOjCI,oBPgCJ,iBO/B8B,KPgC9B,cO9CE,oBP6CF,iBOzDA,cP0DA,WOxCM,sBAGF,4BPoCJ,iBOzDA,cP0DA,WOjCI,0BPgCJ,iBO/B8B,ePgC9B,WO9CE,cP6CF,iBOzDA,QP0DA,WOrCI,sBPoCJ,iBOzDA,QP0DA,WOjCI,oBPgCJ,iBO/B8B,QPgC9B,WO9CE,cP6CF,iBOzDA,QP0DA,WOrCI,sBPoCJ,iBOzDA,QP0DA,WOjCI,oBPgCJ,iBO/B8B,QPgC9B,WO9CE,aP6CF,iBOzDA,QP0DA,WOrCI,qBPoCJ,iBOzDA,QP0DA,WOjCI,mBPgCJ,iBO/B8B,QPgC9B,WO9CE,WP6CF,iBOzDA,QP0DA,WOrCI,mBPoCJ,iBOzDA,QP0DA,WOjCI,iBPgCJ,iBO/B8B,QPgC9B,WO9CE,eP6CF,iBOzDA,QP0DA,WOrCI,uBPoCJ,iBOzDA,QP0DA,WOjCI,qBPgCJ,iBO/B8B,QPgC9B,WO9CE,cP6CF,iBOzDA,QP0DA,WOrCI,sBPoCJ,iBOzDA,QP0DA,WOjCI,oBPgCJ,iBO/B8B,QPgC9B,WO9CE,eP6CF,iBOzDA,QP0DA,WOrCI,uBPoCJ,iBOzDA,QP0DA,WOjCI,qBPgCJ,iBO/B8B,QPgC9B,WO1BA,YACE,cACA,WAEA,wBACE,iBAKJ,eACE,oBACA,mBACA,yBACA,gBACA,YAIF,cACE,UTpCU,ISwCZ,YACE,UTxCU,MS4CZ,YACE,UT3CU,OUqBd,QA3DE,wBACA,YACA,MbTW,QaUX,mHACA,4BACA,oBACA,yBACA,cVkKc,IUjKd,2CAEA,WACE,wBACA,oBACA,oBAGO,0BAEP,gBACA,cAIA,qBACE,2BAIJ,aAEE,aACA,cAGF,UACE,cAEA,gBACE,cAIJ,aACE,yBAGH,iBACC,yBAIE,sBACE,gBAaN,iBAjEE,wBACA,YACA,MbTW,QaUX,mHACA,4BACA,oBACA,yBACA,cVkKc,IUjKd,yCAEA,oBACE,wBACA,oBACA,oBAGO,mCAEP,gBACA,cAIA,8BACE,2BAIJ,sBAEE,aACA,cAGF,mBACE,cAEA,yBACE,cAIJ,sBACE,yBAGH,0BACC,yBAIE,+BACE,gBAmBN,cAvEE,wBACA,YACA,MbTW,QaUX,mHACA,4BACA,oBACA,yBACA,cVkKc,IUjKd,0CAEA,iBACE,wBACA,oBACA,oBAGO,gCAEP,gBACA,cAIA,2BACE,2BAIJ,mBAEE,aACA,cAGF,gBACE,cAEA,sBACE,cAIJ,mBACE,yBAGH,uBACC,yBAIE,4BACE,gBAyBN,iBA7EE,wBACA,YACA,MbTW,QaUX,mHACA,4BACA,oBACA,yBACA,cVkKc,IUjKd,yCAEA,oBACE,wBACA,oBACA,oBAGO,mCAEP,gBACA,cAIA,8BACE,2BAIJ,sBAEE,aACA,cAGF,mBACE,cAEA,yBACE,cAIJ,sBACE,yBAGH,0BACC,yBAIE,+BACE,gBA+BN,iBAnFE,wBACA,YACA,MbTW,QaUX,mHACA,4BACA,oBACA,yBACA,cVkKc,IUjKd,yCAEA,oBACE,wBACA,oBACA,oBAGO,mCAEP,gBACA,cAIA,8BACE,2BAIJ,sBAEE,aACA,cAGF,mBACE,cAEA,yBACE,cAIJ,sBACE,yBAGH,0BACC,yBAIE,+BACE,gBAqCN,gBAzFE,wBACA,YACA,MbTW,QaUX,mHACA,4BACA,oBACA,yBACA,cVkKc,IUjKd,yCAEA,mBACE,wBACA,oBACA,oBAGO,kCAEP,gBACA,cAIA,6BACE,2BAIJ,qBAEE,aACA,cAGF,kBACE,cAEA,wBACE,cAIJ,qBACE,yBAGH,yBACC,yBAIE,8BACE,gBC7DN,UACE,kBACA,gCACA,kBXsLiB,eWrLjB,UXqLiB,eWpLjB,6BACA,qBACA,WAEA,sBTgCA,WS9BE,iBACA,kBACA,YACA,eACA,oBACA,oBACA,aACA,yBACA,sBACA,8BACA,YXTS,uGE+BX,6BACE,WACA,WACA,cEcA,wBOnDF,sBAeI,UX2II,QWxIN,0BACE,WAGF,wBACE,qBAKN,eACE,gBAGF,YACE,oBACA,oBACA,aACA,2BACA,kBACA,iBAIF,eACE,cACA,UXLY,KWQd,gBACE,WACA,cACA,eACA,WACA,WAEA,0BACE,cPJA,0BOGF,0BAII,aAIJ,mBACE,SACA,UACA,WACA,qBAIJ,qBACE,cACA,qBACA,mBAEA,yBACE,kBACA,gBClFJ,aVqCE,WUnCA,cACA,eACA,iBACA,kBACA,YZEW,uGYDX,kBZ8KiB,eY7KjB,UZ6KiB,eY5KjB,4BACA,oBV6BA,oBACE,WACA,WACA,cEcA,wBQxDJ,aAaI,UZkJM,QY/IR,gBACE,UACA,gBACA,UZuBU,OIcV,wBQxCF,gBAMI,YACA,0BRiCF,wBQxCF,gBAWI,0BAIJ,gBACE,eAGF,sBACE,iBAQJ,YVPE,WUSA,WACA,eACA,gBACA,WVVA,mBACE,WACA,WACA,cUSF,eACE,SACA,UACA,qBACA,YZ/CS,uGYkDX,eACE,cACA,WACA,iBAEA,iBACE,cACA,oBACA,iBACA,YZ3DO,uGY4DP,eACA,iBACA,gBACA,kBACA,qBACA,MZGa,KYFb,yBACA,gBAEA,uBACE,MfxEW,Qe2Eb,2DAEE,WACA,WfrFQ,QewFV,0BACE,2BACA,oBACA,mBAIJ,2BACE,cAEA,6BACE,uBZ4EQ,IY3ER,0BZ2EQ,IYtEV,4BACE,wBZqEQ,IYpER,2BZoEQ,IY9Dd,mBACE,cACA,gBACA,WACA,UACA,YZ7GS,uGY8GT,UZ7EU,MY8EV,iBACA,kBACA,qBACA,MZ9Ce,KY+Cf,yBACA,cZkDY,IYhDZ,yBV7CF,iBFLiB,KEMjB,cUgDE,+BACE,0BACA,6BAGF,8BACE,iBACA,yBACA,4BAGF,4BACE,2BACA,oBACA,mBAKN,mIAIE,eACA,gBACA,6BAOF,YACE,kBACA,oBACA,oBACA,aACA,yBACA,sBACA,mBACA,WZMW,IYLX,Wf9KiB,QegLjB,cACE,cACA,cACA,MflLS,QemLT,qBACA,wBACA,gBAEA,oBACE,Mf7KsB,KegLxB,wBACE,cACA,mBAGF,yBACE,cAIJ,gBACE,wBACA,gBAGF,oBACE,2BACA,kBACA,OZ1BgB,KY2BhB,SACA,aACA,+BACA,eAGF,2BACE,oBACA,oBACA,aACA,qBACA,kBACA,yBACA,mBACA,WACA,OACA,gBAEA,8BACE,mBACA,cACA,UAGF,6BACE,kBAEA,oCACE,WACA,kBACA,OACA,SACA,WACA,Wf9OQ,Qe+OR,WACA,mBZ3DY,oBY4DZ,WZ5DY,oBY6DZ,iDACA,yCAGF,0CACE,4BACA,wBACA,oBAKN,0BACE,kBACA,SACA,QACA,gBACA,YACA,yBACA,cZtFY,IYuFZ,WfxQe,QeyQf,4EAEA,oEAEA,iCACE,aAGF,4BACE,SACA,kBACA,UZxOQ,MY0OR,kCACE,Mf3QoB,Ke4QpB,Wf3QmB,Qe+QvB,iCACE,WACA,kBACA,UACA,WACA,QACA,mBACA,yBACA,mCACA,cACA,UAGF,gCACE,WACA,kBACA,UACA,WACA,QACA,mBACA,yBACA,mCACA,cACA,UAGF,6BACE,cACA,gCAEA,wCACE,mBAQJ,kCACE,mBACA,eACA,iBASN,WACE,oBAEA,iDAEE,aRzRA,6BQ6RA,iBACE,kBACA,qBACA,4BACA,MZvRC,QYwRD,UZhTQ,OYiTR,iBACA,yBACA,cZ/KU,IYgLV,WACA,gCACA,wBACA,eAEA,+CAEE,WACA,kBACA,UACA,WACA,YACA,cACA,cACA,iBZ1SD,QY2SC,gCACA,wBAGF,uBACE,gCACA,4BACA,wBAGF,uBACE,WACA,aZvTD,QYwTC,sBAEA,2DAEE,sBAMN,+BACE,WACA,sBAEA,2EAEE,sBAKJ,6BACE,gCACA,4BACA,wBAGF,2CACE,4BACA,wBACA,oBAGF,cACE,kBAGF,aACE,cACA,iBRzWF,kDQuWA,aAKI,mBACA,uBR7WJ,6BQgXE,mBACE,2BAMR,uBACE,SACA,kBAEA,yBACE,cAGF,+BACE,mBACA,kBACA,mBACA,iBRnYA,6BQuXJ,uBAgBI,kBACA,aACA,WACA,gBACA,WACA,mCACA,2BACA,oCACA,gCACA,6BRhZA,6BQqZF,qCACE,mCACA,2BACA,kBACA,iBACA,UACA,eACA,kCACA,8BACA,2BAIJ,YACE,SACA,qBACA,YZrdW,uGYsdX,UZrbY,MYsbZ,iBAGF,gBACE,cACA,eACA,iBACA,YZ9dW,uGY+dX,UZ7bY,OY8bZ,iBACA,yBACA,gCAOF,KACE,YZ1eW,uGY2eX,MZjbK,QYkbL,iBfvfiB,QewfjB,yBACA,cZxUc,IYyUd,mBZxUW,2BYyUX,WZzUW,2BY2UX,iBACE,WACA,UZldU,OYmdV,Wf9fY,Qe+fZ,uBZhVY,IYiVZ,wBZjVY,IYqVd,eVlbA,iBFMa,QELb,cUsbF,WACE,SACA,UACA,WACA,gBACA,UZneY,OIcV,wBQgdJ,WAQI,UZreU,QYweZ,aACE,cACA,sBACA,MZ1ce,KY2cf,iBACA,gBACA,gCAEA,mBACE,Mf9hBO,QekiBX,sBACE,qBACA,mBAGF,4BACE,qBAGF,kCACE,qBAGF,wCACE,qBAGF,8CACE,qBCtjBJ,cXyCE,WWvCA,WACA,cACA,eACA,WACA,eACA,MbyEiB,KaxEjB,kBbiLiB,eahLjB,UbgLiB,ea/KjB,6BACA,qBACA,iBhBJwB,QKmCxB,qBACE,WACA,WACA,cWhCF,qBX2BA,WWzBE,iBACA,kBACA,eACA,eACA,kBXuBF,4BACE,WACA,WACA,cEcA,wBS9CF,qBASI,Ub4II,QaxIR,gBACE,cACA,qBAEA,sBACE,0BAIJ,4EAIE,MbwCe,KapCnB,wBACE,YbjCW,uGakCX,UbCY,OaGZ,wBACE,SACA,UACA,qBAGF,wBACE,qBACA,gBACA,mBACA,YbhDS,uGaiDT,UbfU,OagBV,yBAGF,kCACE,WACA,kBAGF,uBACE,mBACA,iBAIA,qCACE,mBC5EJ,sCACE,oBAIJ,gBACE,iBACA,kBACA,Od4KkB,Kc3KlB,SACA,aACA,MjBTc,QiBUd,+BACA,eACA,uBACA,eAEA,sBACE,cAIJ,aACE,WACA,YAGF,gBACE,aACA,kBACA,gBACA,mBAEA,4BACE,WACA,iBACA,kBACA,iBACA,kBACA,kBdiJe,echJf,UdgJe,ec/If,6BACA,qBViBA,wBU1BF,4BAYI,UdqHI,QchHR,sBACE,+BAGF,8BACE,cACA,gBACA,UACA,YACA,aACA,gBACA,+BACA,UdpBU,OIiBV,wBULF,8BAWI,UdxBQ,SIkBV,wBULF,8BAeI,Ud7BQ,SciCZ,4BACE,cACA,mBAEA,mCACE,WACA,cAIJ,gCACE,gBACA,UdxCU,Oc2CZ,+BACE,kBV9BA,wBU6BF,+BAII,WVjCF,wBU6BF,+BAQI,WAIJ,qCACE,aAGF,uCACE,gBAMJ,gBACE,0BACA,kBAGF,oCACE,MjBnHc,QiBoHd,kBACA,0BAGF,sCACE,MjBzHc,QiB0Hd,kBACA,iBC9HF,uCAEE,kBACA,kBACA,WfsIO,QerIP,Mf0IO,KezIP,YfQU,2CePV,UfuCY,OetCZ,gBACA,cfyKc,IevKd,kHAEE,SACA,YAIJ,iBACE,gBACA,cACA,SAEA,oBACE,UACA,uBACA,SAGA,4DAEE,kBACA,UACA,Mf6GG,Qe5GH,+BACA,iBAIF,wDAEE,iBAIJ,qBACE,SAIJ,eACE,WAGF,gBACE,iBfyFO,KetFP,cAEE,MfkFK,QehFP,gBAEE,MfkFK,QehFP,cAEE,MfoFK,QelFP,cAEE,Mf2EK,QezEP,cAEE,MfmEK,KejEP,cAEE,MfsEK,QepEP,cAEE,Mf2DK,KezDP,eAEE,MfsDK,QepDP,eAEE,MfkDK,QehDP,eAEE,Mf8CK,Qe5CP,eAEE,Mf0CK,QexCP,eAEE,Mf0CK,QexCP,eAEE,kBAEF,eAEE,Mf+BK,Ke9BL,iBAEF,eAEE,MfgCK,Qe9BP,eAEE,MfqBK,QepBL,iBAEF,eAEE,iBAEF,eAEE,MfoBK,QenBL,iBAEF,eAEE,MfiBK,QefP,eAEE,MfaK,QeXP,eAEE,MfOK,QeLP,eAEE,MfKK,QeHP,eAEE,MfCK,QeCP,eAEE,MfPK,QeSP,eAEE,MfVK,QeYP,cAEE,MfhBK,QekBP,cAEE,MflBK,QeoBP,eAEE,MfpBK,QesBP,eAEE,MfhCK,KekCP,eAEE,Mf/BK,QeiCP,eAEE,MfrCK,QeuCP,eAEE,MfrCK,QeuCP,eAEE,MfhDK,KekDP,eAEE,MfjDK,QemDP,eAEE,MfhDK,QekDP,eAEE,Mf5DK,Ke8DP,eAEE,Mf3DK,Qe6DP,eAEE,Mf5DK,Qe8DP,eAEE,MfxEK,Ke0EP,eAEE,MfrEK,QeuEP,eAEE,Mf7EK,Qe+EP,eAEE,Mf7EK,Qe+EP,cAEE,MfxFK,Ke0FP,eAEE,MfxFK,Qe0FP,eAEE,Mf5FK,Qe8FP,eAEE,MfhGK,QekGP,eAEE,MfpGK,QesGP,eAEE,MftGK,QewGP,eAEE,MfhHK,KekHP,eAEE,MfrHK,QeuHP,eAEE,MflHK,QeoHP,eAEE,MfxHK,Qe0HP,eAEE,Mf1HK,Qe4HP,eAEE,MfhIK,QekIP,eAEE,MflIK,QeoIP,eAEE,MftIK,QewIP,eAEE,Mf1IK,Qe4IP,eAEE,Mf9IK,QegJP,eAEE,MfxJK,Ke0JP,eAEE,MfzJK,Qe2JP,eAEE,Mf7JK,Qe+JP,eAEE,MfjKK,QemKP,eAEE,MfpKK,QeyKP,kBACE,gBCvTJ,oBAEE,aACA,kBAKF,MACE,aAGF,aACE,UAKF,sFAIE,6BACA,8BACA,sBACA,qBACA,oBACA,gBAGF,mGAGE,wBAKF,wDAEE,qBACA,uBACA,sBACA,cACA,cACA,iBACA,uBACA,gBACA,eACA,qBACA,sCAOF,WACE,eACA,WACA,SACA,YhBvDW,uGgBwDX,mBAGF,cACE,SACA,QACA,gBAOF,WACE,gBAGF,aACE,kBAGF,YACE,iBAGF,cACE,mBAGF,aACE,mBAOF,WACE,UAEA,cACE,qBAGF,oCACE,kBACA,UAIJ,sBACE,gBASF,IACE,WAGF,SACE,iBACA,kBACA,WASF,YACE,cACA,iBACA,kBZvFE,0BYoFJ,YAMI,WACA,kBAMJ,aACE,cACA,iBACA,kBZpGE,0BYiGJ,aAMI,YACA,iBAMJ,cACE,cACA,iBACA,kBZjHE,wBYsHJ,MAEI,yCAQJ,MACE,qBACA,kBACA,UACA,aACA,cACA,kBACA,WACA,sBAMA,4EAIE,MnB5MS,QmB+MX,2DAEE,MhB/GY,QgBkHd,4BACE,MhBlHc,QgBqHhB,4DAEE,MhBtHa,QgByHf,0FAGE,MhB3Ha,QgB8Hf,yBACE,MhB9HW,QgBiIb,6BACE,MhBjIe,QgBoIjB,sFAGE,MhBtIW,QgByIb,yBACE,MhBzIW,QgB4Ib,4BACE,MhB5Ic,QgB+IhB,0BACE,MhB/IY,QgBkJd,yDAEE,MhBnJW,QgBsJb,yDAEE,MhBvJa,QgB0Jf,6DAEE,MhB3Ja,QgB8Jf,6FAGE,MhBhKc,QgBmKhB,yBACE,MhBnKW,QgBsKb,mDAEE,MhBvKQ,QgB0KV,6BACE,MhB1Ke,KgB6KjB,kEAEE,MhB9KkB,QgBiLpB,yDAEE,MhBlLW,QgBqLb,2DAEE,MhBtLY,QgByLd,iFAGE,MhB3LU,QgB8LZ,uBACE,MhB9LS,QgBiMX,0BACE,MhBjMY,KgBoMd,qDAEE,MhBrMS,QgB6Mb,SACE,kBACA,MhBpJc,OgBqJd,OhBpJe,OgBqJf,WnBzUc,QmB0Ud,YACA,uBACA,eAEA,+BAEE,WACA,kBACA,OACA,MhBhKY,OgBiKZ,OhBhKa,OgBiKb,WnBrVY,QmBsVZ,uBACA,eAGF,gBACE,YAGF,eACE,eAIJ,gBAEE,yBAGA,6CAEE,iCACA,6BACA,yBACA,MACA,MhB3LY,OgB+Ld,uBACE,2CACA,mCAEF,sBACE,4CACA,oCAMA,gCADF,2BAEI,WACA,eACA,MACA,OACA,WACA,YACA,UACA,iBnBxYa,QmByYb,mBhBlNc,oBgBmNd,WhBnNc,oBgBoNd,qBAKF,iCACE,WACA,mBhB3Nc,oBgB4Nd,WhB5Nc,oBgB6Nd,oBAMJ,sHAGE,mBAIA,yCACE,yBZvWF,wBYgXJ,QdnYE,WcsYE,wBACA,gBACA,QdtYF,eACE,WACA,WACA,ccqYA,UACE,eASN,MACE,gBACA,aACA,mBACA,yBACA,yBACA,chBjRc,IgBkRd,2CAOF,YACE,gBACA,kBAEA,mBACE,kBACA,WACA,MACA,OACA,WACA,YACA,YACA,uCAGF,mBACE,cAIJ,OACE,aACA,eACA,YACA,QACA,SACA,mBACA,kBACA,aACA,aACA,gBACA,yBACA,chBzTc,IgB0Td,WhBzTW,2BgB2TX,cACE,SACA,iBAGF,wBACE,uBAGF,gBACE,iBACA,6BAQJ,UACE,cACA,qBAGF,WACE,cAEA,yCAGE,gBACA,UhB/dU,OgBmed,kBACE,MhB5cK,QgB6cL,qBAEA,wBACE,0BAQJ,UACE,MhBvca,QgBwcb,iBAQA,+DAGE,SAQJ,4BACE,kBACA,kBACA,sBACA,SACA,gBACA,eAEA,wGAGE,kBACA,MACA,OACA,WACA,YAMF,oFAEE,gBC1kBJ,MfyCE,WevCA,iBACA,kBACA,iBACA,kBACA,kBjBmLiB,eiBlLjB,UjBkLiB,eiBjLjB,eACA,6BACA,qBfiCA,aACE,WACA,WACA,cEcA,wBa5DJ,MAaI,UjBsJM,QiBlJV,KACE,oBACA,oBACA,aACA,iBACA,4BACA,6BACA,0BACQ,sBAGV,iCAEE,cb8BE,wBa3BJ,MAEI,YACA,yBACA,cjBqIyB,OI9GzB,wBa3BJ,MAQI,yBACA,cjBiIkB,OiB9HpB,wBACE,WACA,eACA,cACA,eACA,WACA,WAEA,uJAGE,kBACA,WACA,cACA,eACA,WACA,WAKN,aACE,aACA,cAEA,eACE,MpBrES,QoBsET,qBAGF,qDACE,kBAIJ,YACE,YjBrEW,uGiBsEX,UjBtCY,IiB0CZ,kBACE,oBACA,gCAIF,0LACC,kBACA,UACA,UACA,UjBlDW,OiBmDX,+CACA,4CACA,0CACA,uCAGD,8NACC,UAID,qDAGE,UjBlEU,MiBsEZ,iBACE,iBAYA,iCACE,0BAEA,qCACE,oCAKN,kBACE,eACA,YjB/HS,uGiBgIT,iBAGF,kBACE,gBACA,YjBrIS,uGiBsIT,UjBpGU,OiBuGZ,sBACE,UjBxGU,OiB4GZ,iCACE,kBACA,qBAIJ,YACE,kBACA,kBfzHA,We2HA,kBjBqBiB,eiBpBjB,UjBoBiB,eiBnBjB,6BACA,qBf5HA,mBACE,WACA,WACA,ce2HF,qBACE,kBACA,kBACA,cfnIF,WeqIE,sBACA,4BACA,2BACA,kBjBQe,eiBPf,UjBOe,eiBNf,6BACA,qBfzIF,4BACE,WACA,WACA,cewIA,uBACE,WAGF,8BACE,iBACA,kBbhIF,wBa8HA,8BAKI,UjB5BE,QiBgCN,kKAIE,WACA,uCAGF,iCACE,UjB5CG,MiB+CL,kCACE,UjBtKQ,QIkBV,0BamJA,kCAII,UjB1KM,SiBgLd,kBACE,WACA,YACA,+BAGF,oBACE,kBACA,SACA,QACA,cACA,gBACA,WACA,YjB3NM,oBiB4NN,UjBxLY,OiByLZ,gBACA,iBACA,UACA,WACA,wBbhLE,wBamKJ,oBAgBI,kBAGF,sBACE,WACA,qBAQJ,aACE,eACA,gBACA,6BbnME,0BasMA,uBACE,SACA,mBACA,WACA,YACA,gBACA,UACA,kBACA,WAKN,mBACE,mBACA,UjBnOY,OiBoOZ,yBAOF,2BACE,eACA,MjB3MiB,KiB4MjB,YjBhRW,uGiBiRX,UjB/OY,OiBiPZ,+BACE,SAGF,+BACE,cAIJ,kBACE,mBACA,UjB5PY,OiB6PZ,yBAGF,wBACE,YACA,kBACA,mBAQA,qBACE,aAGF,uBACE,kBAIJ,qBACE,qBACA,iBACA,kBACA,iBACA,qBACA,yBACA,cjBvJc,IiByJd,2BACE,qBACA,MpBnUe,QoBuUnB,mBACE,kBACA,mBAEA,oCACE,gCAGF,wCACE,aAGF,sCACE,WACA,SAGF,sCACE,eAIJ,iBACE,mBACA,MjBzRiB,KiB4RnB,iBACE,MjB7RiB,KiBgSnB,iBACE,aACA,oBACA,qCACA,iBACA,UACA,UjBxUY,OiByUZ,gBb3TE,wBaoTJ,iBAUI,sCAGF,mBACE,oBACA,oBACA,aACA,gBACA,yBACA,sBACA,8BACA,cACA,qBACA,gCAIJ,aACE,cACA,WACA,MjB9TiB,KiB+TjB,UjB/VY,KiBgWZ,yBACA,iBACA,qBAOF,gBACE,WACA,cACA,eACA,WACA,WAGF,sBACE,gBACA,mBACA,iBACA,UjBvXY,OiBwXZ,6BACA,yBAGF,qBACE,mBjBnPkB,oBiBoPlB,WjBpPkB,oBiBuPhB,oJAIE,oBACA,mBACA,yBACA,gBACA,YAKN,SfnZE,WeqZA,afnZA,gBACE,WACA,WACA,cekZF,0BACE,gCAIJ,yBACE,WACA,WACA,Yb5YE,wBayYJ,yBAMI,YACA,cAIJ,iBACE,WACA,YACA,kBbvZE,wBaoZJ,iBAMI,WACA,YACA,YACA,0BAIJ,0BACE,YACA,wBbnaE,wBaiaJ,0BAKI,0BAIJ,iBACE,SAEA,mBACE,qBAIJ,eAEE,SAEA,iBACE,qBAQJ,efldE,WeodA,WACA,eACA,gBACA,6BfrdA,sBACE,WACA,WACA,cEcA,wBa+bJ,eAQI,YACA,0BbxcA,wBa+bJ,eAaI,0BAGF,iBACE,cACA,qBAIJ,qBACE,mBACA,UjBreY,OiBseZ,yBbxdE,wBageF,YAEI,iBbleF,wBageF,YAMI,iBbteF,wBa0eF,qBAEI,iBb5eF,wBa0eF,qBAMI,iBC5iBN,SACE,eACA,kBd0DE,wBc5DJ,SAKI,YACA,yBACA,clBmKyB,OI9GzB,wBc5DJ,SAWI,yBACA,clB+JkB,OkB3JtB,eACE,kBAEA,iBACE,kBACA,WAGF,gCACE,gBAIJ,mBACE,sBACA,oBACA,UlBaY,MkBZZ,MlB+CiB,KkB9CjB,gCAEA,oDACE,gBAIJ,qBACE,oBACA,YlB/BW,uGkBgCX,oBACA,gBACA,uBAEA,8CACE,WACA,kBACA,OACA,MACA,QACA,SAGF,yBACE,WAMF,oCACE,eACA,mBAIJ,uBACE,aACA,UlB1BY,OkB4BZ,yBACE,cAGF,yBACE,kBAIJ,sBACE,kBACA,clB6Fc,IkB5Fd,gBAEA,0BACE,WAIJ,uBACE,kBACA,SACA,QACA,cACA,gBACA,WACA,YlBzFM,oBkB0FN,UlBrDY,KkBsDZ,gBACA,iBACA,UACA,WACA,wBd9CE,wBciCJ,uBAgBI,kBAGF,yBACE,WACA,qBASF,mDACE,eACA,edjEA,wBc0EF,wBAII,qBd9EF,wBc0EF,wBAQI,qBAKN,YACE,kBdxFE,0BcuFJ,YAII,WACA,qBAEA,4BACE,WACA,cAGF,4BACE,WACA,2BdrGF,wBcuFJ,YAmBI,cACA,eACA,qBAEA,4BACE,WAGF,4BACE,WAGF,4BACE,WACA,0BAGF,4BACE,WACA,0BAGF,4BACE,WACA,2BAIJ,mDACE,eACA,eAGF,4BACE,cAEA,oCACE,aAIJ,iCACE,gBACA,UlBpKU,MkBuKZ,mCACE,adzJA,wBcwJF,mCAII,cACA,UlB3KQ,QIcV,0BciKF,kCAEI,kBdnKF,wBciKF,kCAMI,kBASN,kBhBnME,WgBqMA,kBACA,gChBpMA,yBACE,WACA,WACA,cgBmMF,uCACE,gBAIJ,eACE,kBACA,kBACA,kBd7LE,0Bc0LJ,eAMI,WACA,gBACA,qBAEA,+BACE,WACA,cAGF,+BACE,WACA,0BAGF,+BACE,WACA,0BAGF,qCACE,iBACA,iBAIJ,mCACE,2BACA,4BAGF,6BACE,WACA,kBACA,OACA,MACA,QACA,SAGF,qBACE,kBACA,WACA,cACA,eACA,WACA,WACA,kBAEA,oCACE,WAGF,2CACE,kBAGF,mCACE,WACA,kBACA,OACA,MACA,QACA,Sd9PF,0BckQE,2CACE,WACA,qBAGF,yCACE,YACA,2BACA,4BACA,sBAKN,sBACE,kBACA,WACA,cACA,eACA,WACA,WACA,kBAEA,qCACE,WAGF,4CACE,kBAGF,oCACE,WACA,kBACA,OACA,MACA,QACA,SdvSF,0BcgRF,sBA2BI,iBAEA,4CACE,YACA,qBAGF,0CACE,WACA,qBACA,2BACA,6BAKN,uBACE,kBACA,WACA,cACA,eACA,WACA,WACA,kBAEA,sCACE,WACA,WAGF,6CACE,kBAGF,qCACE,WACA,kBACA,OACA,MACA,QACA,SdnVF,0Bc2TF,uBA4BI,kBAEA,6CACE,cACA,qBAGF,2CACE,cACA,sBAUJ,gDACE,iBACA,cAIJ,qHAIE,cdpXA,wBc6XF,eAEI,iBd/XF,wBc6XF,eAMI,iBAQL,kCACC,qBCpcF,SjBqCE,WAEA,gBACE,WACA,WACA,cEcA,wBexDJ,SAWI,WACA,wBACA,YACA,2CACA,mCAEA,eACE,UAGF,gBACE,gBAIA,oCf8BF,wBexDJ,SA+BI,yBAGF,WACE,eACA,kBAGF,4DAKE,gBACA,YnBrCS,uGmBwCX,uBAEE,YnB1CS,uGmB2CT,UnBTU,OmBUV,gBAGF,aACE,WAEA,mBACE,WACA,YAKN,gBACE,kBfVE,wBeSJ,gBAII,kBACA,MACA,QACA,MnB8FyB,MmB7FzB,oBACA,iBACA,WAEA,uBjBxCF,WiB0CI,wBACA,gBACA,QACA,YjB3CJ,8BACE,WACA,WACA,ciB2CI,uCACE,gBACA,8Bf/BN,wBeSJ,gBA6BI,MnByEkB,MmBxElB,qBfvCA,wBe2CJ,wBAEI,kBACA,YACA,gBf/CA,wBe2CJ,wBAQI,gBAQJ,gBACE,mBACA,mBACA,WACA,Yf/DE,wBe2DJ,gBAOI,cACA,WACA,aAGF,oBACE,gBACA,kBfzEA,wBeuEF,oBAKI,YACA,0BAKN,iBACE,mBACA,mBACA,kBACA,mBACA,cfvFE,wBekFJ,iBAQI,cACA,WACA,eACA,iBAGF,mBACE,cACA,qBAIJ,cACE,SfvGE,wBesGJ,cAII,gBACA,oBAGJ,uBACE,YnB/JW,uGmBgKX,UnB/HY,MmBkId,aACE,SfpHE,wBemHJ,aAII,gBACA,oBAIJ,sBACE,kBACA,mBACA,sBACA,YnBhLW,uGmBiLX,WACA,eAGE,sCACE,gBAKF,+CACE,iBf5IF,wBe4HJ,sBAqBI,eAGF,6BACE,kBACA,gBAGE,gCADF,oCAEI,WACA,eACA,MACA,OACA,WACA,YACA,qBAKF,yCACE,oBftKJ,wBeoJF,6BAuBI,cAKN,cACE,aACA,kBACA,QACA,gBACA,aACA,qBACA,yBACA,cnBlEc,ImBmEd,WtBpPiB,QsBqPjB,oEACA,eAEA,0BACE,cf9LA,wBegLJ,cAkBI,cACA,kBACA,SACA,UACA,SACA,yBACA,iBAGF,qBACE,cACA,WACA,kBACA,UACA,sBACA,QACA,mBACA,yBACA,mCACA,UfrNA,wBe2MF,qBAaI,cAIJ,oBACE,cACA,WACA,kBACA,UACA,sBACA,QACA,mBACA,yBACA,mCACA,UftOA,wBe4NF,oBAaI,cAIJ,iBACE,aACA,qBAGF,iBACE,mBAGF,gBACE,cACA,kBACA,kBACA,gBACA,mBACA,cACA,UnB5QU,MmB6QV,qBAEA,sBACE,0BASN,sBACE,kBf3QE,wBe0QJ,sBAII,iBACA,YACA,cACA,cACA,qBACA,qBACA,gBAEA,6BACE,YfvRF,wBe0QJ,sBAkBI,cACA,sBCzVJ,aAEE,SACE,aAGF,EACE,2BACA,8BACA,sBAGF,KACE,SACA,UACA,2BACA,eAGF,KACE,cACA,2BACA,sBACA,eACA,gBACA,kCACA,mCACA,kCAGF,kBAME,WACA,gBACA,qBACA,aAGF,GACE,iBAGF,GACE,eAGF,GACE,kBAGF,GACE,iBAGF,GACE,kBAGF,GACE,eAGF,YAEE,WACA,0BACA,qBAGF,MACE,yBAGF,MACE,2BAGF,YAGE,6BAGF,MAEE,iBAGF,IACE,SACA,cACA,0BACA,sBAGF,GACE,SACA,6BACA,SACA,iBACA,UAGF,GACE,iBAGF,GACE,SACA,qBAGF,2BAEE,SACA,qBAGF,kDAWE,wBAGF,aAKE,UACA,SAGF,kBAME,uBACA,wBAGF,eAGE,wBAGF,IACE,sBACA,uBACA,wBAGF,IACE,gCACA,qBAGF,2EAGE,4BACA,cAGF,uCAEE,6BAGF,MACE,eAGF,MACE,SACA,UACA,WAGF,+BAEE,yBAGF,kBACE,wBAGF,UACE,aAGF,oBACE,WAGF,+DAEE,WAGF,oBACE,sBACA,2BACA,UAEA,sBACE,sBAQJ,uLAcE,wBACA,uBCpPJ,eACC,mBAGD,MACC,kBACA,iBAGD,GACC,UrBoDU,MqBnDV,kBACA,kBAGD,QACC,UrB4Ba,MqBzBd,iBACC,UrBwBa,MqBrBd,aACC,UrBkBa","sourcesContent":["/* ==========================================================================\n Dark skin\n ========================================================================== */\n\n/* Colors */\n$background-color: #252a34 !default;\n$text-color: #eaeaea !default;\n$primary-color: #00adb5 !default;\n$border-color: mix(#fff, $background-color, 20%) !default;\n$code-background-color: mix(#000, $background-color, 15%) !default;\n$code-background-color-dark: mix(#000, $background-color, 20%) !default;\n$form-background-color: mix(#000, $background-color, 15%) !default;\n$footer-background-color: mix(#000, $background-color, 30%) !default;\n$link-color: mix($primary-color, $text-color, 40%) !default;\n$link-color-hover: mix(#fff, $link-color, 25%) !default;\n$link-color-visited: mix(#000, $link-color, 25%) !default;\n$masthead-link-color: $text-color !default;\n$masthead-link-color-hover: mix(#000, $text-color, 20%) !default;\n$navicon-link-color-hover: mix(#000, $background-color, 30%) !default;\n\n.author__urls.social-icons i,\n.author__urls.social-icons .svg-inline--fa,\n.page__footer-follow .social-icons i,\n.page__footer-follow .social-icons .svg-inline--fa {\n color: inherit;\n}\n\n.ais-search-box .ais-search-box--input {\n background-color: $form-background-color;\n}\n","/*!\n * Minimal Mistakes Jekyll Theme 4.24.0 by Michael Rose\n * Copyright 2013-2020 Michael Rose - mademistakes.com | @mmistakes\n * Licensed under MIT (https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE)\n*/\n\n/* Variables */\n@import \"minimal-mistakes/variables\";\n\n/* Mixins and functions */\n@import \"minimal-mistakes/vendor/breakpoint/breakpoint\";\n@include breakpoint-set(\"to ems\", true);\n@import \"minimal-mistakes/vendor/magnific-popup/magnific-popup\"; // Magnific Popup\n@import \"minimal-mistakes/vendor/susy/susy\";\n@import \"minimal-mistakes/mixins\";\n\n/* Core CSS */\n@import \"minimal-mistakes/reset\";\n@import \"minimal-mistakes/base\";\n@import \"minimal-mistakes/forms\";\n@import \"minimal-mistakes/tables\";\n@import \"minimal-mistakes/animations\";\n\n/* Components */\n@import \"minimal-mistakes/buttons\";\n@import \"minimal-mistakes/notices\";\n@import \"minimal-mistakes/masthead\";\n@import \"minimal-mistakes/navigation\";\n@import \"minimal-mistakes/footer\";\n@import \"minimal-mistakes/search\";\n@import \"minimal-mistakes/syntax\";\n\n/* Utility classes */\n@import \"minimal-mistakes/utilities\";\n\n/* Layout specific */\n@import \"minimal-mistakes/page\";\n@import \"minimal-mistakes/archive\";\n@import \"minimal-mistakes/sidebar\";\n@import \"minimal-mistakes/print\";\n","////////////////////////\n// Settings //\n////////////////////////\n\n// overlay\n$mfp-overlay-color: #000; // Color of overlay screen\n$mfp-overlay-opacity: 0.8; // Opacity of overlay screen\n$mfp-shadow: 0 0 8px rgba(0, 0, 0, 0.6); // Shadow on image or iframe\n\n// spacing\n$mfp-popup-padding-left: 8px; // Padding from left and from right side\n$mfp-popup-padding-left-mobile: 6px; // Same as above, but is applied when width of window is less than 800px\n\n$mfp-z-index-base: 1040; // Base z-index of popup\n\n// controls\n$mfp-include-arrows: true; // Include styles for nav arrows\n$mfp-controls-opacity: 1; // Opacity of controls\n$mfp-controls-color: #fff; // Color of controls\n$mfp-controls-border-color: #fff; // Border color of controls\n$mfp-inner-close-icon-color: #fff; // Color of close button when inside\n$mfp-controls-text-color: #ccc; // Color of preloader and \"1 of X\" indicator\n$mfp-controls-text-color-hover: #fff; // Hover color of preloader and \"1 of X\" indicator\n$mfp-IE7support: true; // Very basic IE7 support\n\n// Iframe-type options\n$mfp-include-iframe-type: true; // Enable Iframe-type popups\n$mfp-iframe-padding-top: 40px; // Iframe padding top\n$mfp-iframe-background: #000; // Background color of iframes\n$mfp-iframe-max-width: 900px; // Maximum width of iframes\n$mfp-iframe-ratio: 9/16; // Ratio of iframe (9/16 = widescreen, 3/4 = standard, etc.)\n\n// Image-type options\n$mfp-include-image-type: true; // Enable Image-type popups\n$mfp-image-background: #444 !default;\n$mfp-image-padding-top: 40px; // Image padding top\n$mfp-image-padding-bottom: 40px; // Image padding bottom\n$mfp-include-mobile-layout-for-image: true; // Removes paddings from top and bottom\n\n// Image caption options\n$mfp-caption-title-color: #f3f3f3; // Caption title color\n$mfp-caption-subtitle-color: #bdbdbd; // Caption subtitle color\n.mfp-counter { font-family: $serif; } // Caption font family\n\n// A11y\n$mfp-use-visuallyhidden: false;","/* ==========================================================================\n Variables\n ========================================================================== */\n\n/*\n Typography\n ========================================================================== */\n\n$doc-font-size: 16 !default;\n\n/* paragraph indention */\n$paragraph-indent: false !default; // true, false (default)\n$indent-var: 1.3em !default;\n\n/* system typefaces */\n$serif: Georgia, Times, serif !default;\n$sans-serif: -apple-system, BlinkMacSystemFont, \"Roboto\", \"Segoe UI\",\n \"Helvetica Neue\", \"Lucida Grande\", Arial, sans-serif !default;\n$monospace: Monaco, Consolas, \"Lucida Console\", monospace !default;\n\n/* sans serif typefaces */\n$sans-serif-narrow: $sans-serif !default;\n$helvetica: Helvetica, \"Helvetica Neue\", Arial, sans-serif !default;\n\n/* serif typefaces */\n$georgia: Georgia, serif !default;\n$times: Times, serif !default;\n$bodoni: \"Bodoni MT\", serif !default;\n$calisto: \"Calisto MT\", serif !default;\n$garamond: Garamond, serif !default;\n\n$global-font-family: $sans-serif !default;\n$header-font-family: $sans-serif !default;\n$caption-font-family: $serif !default;\n\n/* type scale */\n// $type-size-1: 2.441em !default; // ~39.056px\n// $type-size-2: 1.953em !default; // ~31.248px\n// $type-size-3: 1.563em !default; // ~25.008px\n// $type-size-4: 1.25em !default; // ~20px\n// $type-size-5: 1em !default; // ~16px\n// $type-size-6: 0.75em !default; // ~12px\n// $type-size-7: 0.6875em !default; // ~11px\n// $type-size-8: 0.625em !default; // ~10px\n\n$type-size-1: 1.953em !default; // ~39.056px\n$type-size-2: 1.563em !default; // ~31.248px\n$type-size-3: 1.250em !default; // ~25.008px\n$type-size-4: 1.000em !default; // ~20px\n$type-size-5: 0.750em !default; // ~16px\n$type-size-6: 0.625em !default; // ~12px\n$type-size-7: 0.563em !default; // ~11px\n$type-size-8: 0.500em !default; // ~10px\n\n/* headline scale */\n// $h-size-1: 1.563em !default; // ~25.008px\n// $h-size-2: 1.25em !default; // ~20px\n// $h-size-3: 1.125em !default; // ~18px\n// $h-size-4: 1.0625em !default; // ~17px\n// $h-size-5: 1.03125em !default; // ~16.5px\n// $h-size-6: 1em !default; // ~16px\n\n/* headline scale */\n$h-size-1: 1.250em !default;\n$h-size-2: 1.125em !default;\n$h-size-3: 1.00em !default; \n$h-size-4: 0.875em !default;\n$h-size-5: 0.75em !default; \n$h-size-6: 0.6875em !default;\n\n/*\n Colors\n ========================================================================== */\n\n$gray: #7a8288 !default;\n$dark-gray: mix(#000, $gray, 50%) !default;\n$darker-gray: mix(#000, $gray, 60%) !default;\n$light-gray: mix(#fff, $gray, 50%) !default;\n$lighter-gray: mix(#fff, $gray, 90%) !default;\n\n$background-color: #fff !default;\n$code-background-color: #fafafa !default;\n$code-background-color-dark: $light-gray !default;\n$text-color: $dark-gray !default;\n$muted-text-color: mix(#fff, $text-color, 20%) !default;\n$border-color: $lighter-gray !default;\n$form-background-color: $lighter-gray !default;\n$footer-background-color: $lighter-gray !default;\n\n$primary-color: #6f777d !default;\n$success-color: #3fa63f !default;\n$warning-color: #d67f05 !default;\n$danger-color: #ee5f5b !default;\n$info-color: #3b9cba !default;\n$focus-color: $primary-color !default;\n$active-color: mix(#fff, $primary-color, 80%) !default;\n\n/* YIQ color contrast */\n$yiq-contrasted-dark-default: $dark-gray !default;\n$yiq-contrasted-light-default: #fff !default;\n$yiq-contrasted-threshold: 175 !default;\n$yiq-debug: false !default;\n\n/* brands */\n$behance-color: #1769ff !default;\n$bitbucket-color: #205081 !default;\n$dribbble-color: #ea4c89 !default;\n$facebook-color: #3b5998 !default;\n$flickr-color: #ff0084 !default;\n$foursquare-color: #0072b1 !default;\n$github-color: #171516 !default;\n$gitlab-color: #e24329 !default;\n$instagram-color: #517fa4 !default;\n$keybase-color: #ef7639 !default;\n$lastfm-color: #d51007 !default;\n$linkedin-color: #007bb6 !default;\n$mastodon-color: #2b90d9 !default;\n$pinterest-color: #cb2027 !default;\n$reddit-color: #ff4500 !default;\n$rss-color: #fa9b39 !default;\n$soundcloud-color: #ff3300 !default;\n$stackoverflow-color: #fe7a15 !default;\n$tumblr-color: #32506d !default;\n$twitter-color: #55acee !default;\n$vimeo-color: #1ab7ea !default;\n$vine-color: #00bf8f !default;\n$youtube-color: #bb0000 !default;\n$xing-color: #006567 !default;\n\n/* links */\n$link-color: mix(#000, $info-color, 20%) !default;\n$link-color-hover: mix(#000, $link-color, 25%) !default;\n$link-color-visited: mix(#fff, $link-color, 15%) !default;\n$masthead-link-color: $primary-color !default;\n$masthead-link-color-hover: mix(#000, $primary-color, 25%) !default;\n$navicon-link-color-hover: mix(#fff, $primary-color, 75%) !default;\n\n/* notices */\n$notice-background-mix: 80% !default;\n$code-notice-background-mix: 90% !default;\n\n/* syntax highlighting (base16) */\n$base00: #263238 !default;\n$base01: #2e3c43 !default;\n$base02: #314549 !default;\n$base03: #546e7a !default;\n$base04: #b2ccd6 !default;\n$base05: #eeffff !default;\n$base06: #eeffff !default;\n$base07: #ffffff !default;\n$base08: #f07178 !default;\n$base09: #f78c6c !default;\n$base0a: #ffcb6b !default;\n$base0b: #c3e88d !default;\n$base0c: #89ddff !default;\n$base0d: #82aaff !default;\n$base0e: #c792ea !default;\n$base0f: #ff5370 !default;\n\n/*\n Breakpoints\n ========================================================================== */\n\n$small: 600px !default;\n$medium: 768px !default;\n$medium-wide: 900px !default;\n$large: 1024px !default;\n$x-large: 1280px !default;\n$max-width: $x-large !default;\n\n/*\n Grid\n ========================================================================== */\n\n$right-sidebar-width-narrow: 200px !default;\n$right-sidebar-width: 300px !default;\n$right-sidebar-width-wide: 400px !default;\n\n/*\n Other\n ========================================================================== */\n\n$border-radius: 4px !default;\n$box-shadow: 0 1px 1px rgba(0, 0, 0, 0.125) !default;\n$nav-height: 2em !default;\n$nav-toggle-height: 2rem !default;\n$navicon-width: 1.5rem !default;\n$navicon-height: 0.25rem !default;\n$global-transition: all 0.2s ease-in-out !default;\n$intro-transition: intro 0.3s both !default;\n","/* Magnific Popup CSS */\n\n@import \"settings\";\n\n////////////////////////\n//\n// Contents:\n//\n// 1. Default Settings\n// 2. General styles\n// - Transluscent overlay\n// - Containers, wrappers\n// - Cursors\n// - Helper classes\n// 3. Appearance\n// - Preloader & text that displays error messages\n// - CSS reset for buttons\n// - Close icon\n// - \"1 of X\" counter\n// - Navigation (left/right) arrows\n// - Iframe content type styles\n// - Image content type styles\n// - Media query where size of arrows is reduced\n// - IE7 support\n//\n////////////////////////\n\n\n\n////////////////////////\n// 1. Default Settings\n////////////////////////\n\n$mfp-overlay-color: #0b0b0b !default;\n$mfp-overlay-opacity: 0.8 !default;\n$mfp-shadow: 0 0 8px rgba(0, 0, 0, 0.6) !default; // shadow on image or iframe\n$mfp-popup-padding-left: 8px !default; // Padding from left and from right side\n$mfp-popup-padding-left-mobile: 6px !default; // Same as above, but is applied when width of window is less than 800px\n\n$mfp-z-index-base: 1040 !default; // Base z-index of popup\n$mfp-include-arrows: true !default; // include styles for nav arrows\n$mfp-controls-opacity: 0.65 !default;\n$mfp-controls-color: #FFF !default;\n$mfp-controls-border-color: #3F3F3F !default;\n$mfp-inner-close-icon-color: #333 !default;\n$mfp-controls-text-color: #CCC !default; // Color of preloader and \"1 of X\" indicator\n$mfp-controls-text-color-hover: #FFF !default;\n$mfp-IE7support: true !default; // Very basic IE7 support\n\n// Iframe-type options\n$mfp-include-iframe-type: true !default;\n$mfp-iframe-padding-top: 40px !default;\n$mfp-iframe-background: #000 !default;\n$mfp-iframe-max-width: 900px !default;\n$mfp-iframe-ratio: 9/16 !default;\n\n// Image-type options\n$mfp-include-image-type: true !default;\n$mfp-image-background: #444 !default;\n$mfp-image-padding-top: 40px !default;\n$mfp-image-padding-bottom: 40px !default;\n$mfp-include-mobile-layout-for-image: true !default; // Removes paddings from top and bottom\n\n// Image caption options\n$mfp-caption-title-color: #F3F3F3 !default;\n$mfp-caption-subtitle-color: #BDBDBD !default;\n\n// A11y\n$mfp-use-visuallyhidden: false !default; // Hide content from browsers, but make it available for screen readers\n\n\n\n////////////////////////\n// 2. General styles\n////////////////////////\n\n// Transluscent overlay\n.mfp-bg {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: $mfp-z-index-base + 2;\n overflow: hidden;\n position: fixed;\n\n background: $mfp-overlay-color;\n opacity: $mfp-overlay-opacity;\n @if $mfp-IE7support {\n filter: unquote(\"alpha(opacity=#{$mfp-overlay-opacity*100})\");\n }\n}\n\n// Wrapper for popup\n.mfp-wrap {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: $mfp-z-index-base + 3;\n position: fixed;\n outline: none !important;\n -webkit-backface-visibility: hidden; // fixes webkit bug that can cause \"false\" scrollbar\n}\n\n// Root container\n.mfp-container {\n text-align: center;\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n padding: 0 $mfp-popup-padding-left;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n// Vertical centerer helper\n.mfp-container {\n &:before {\n content: '';\n display: inline-block;\n height: 100%;\n vertical-align: middle;\n }\n}\n\n// Remove vertical centering when popup has class `mfp-align-top`\n.mfp-align-top {\n .mfp-container {\n &:before {\n display: none;\n }\n }\n}\n\n// Popup content holder\n.mfp-content {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n margin: 0 auto;\n text-align: left;\n z-index: $mfp-z-index-base + 5;\n}\n.mfp-inline-holder,\n.mfp-ajax-holder {\n .mfp-content {\n width: 100%;\n cursor: auto;\n }\n}\n\n// Cursors\n.mfp-ajax-cur {\n cursor: progress;\n}\n.mfp-zoom-out-cur {\n &, .mfp-image-holder .mfp-close {\n cursor: -moz-zoom-out;\n cursor: -webkit-zoom-out;\n cursor: zoom-out;\n }\n}\n.mfp-zoom {\n cursor: pointer;\n cursor: -webkit-zoom-in;\n cursor: -moz-zoom-in;\n cursor: zoom-in;\n}\n.mfp-auto-cursor {\n .mfp-content {\n cursor: auto;\n }\n}\n\n.mfp-close,\n.mfp-arrow,\n.mfp-preloader,\n.mfp-counter {\n -webkit-user-select:none;\n -moz-user-select: none;\n user-select: none;\n}\n\n// Hide the image during the loading\n.mfp-loading {\n &.mfp-figure {\n display: none;\n }\n}\n\n// Helper class that hides stuff\n@if $mfp-use-visuallyhidden {\n // From HTML5 Boilerplate https://github.com/h5bp/html5-boilerplate/blob/v4.2.0/doc/css.md#visuallyhidden\n .mfp-hide {\n border: 0 !important;\n clip: rect(0 0 0 0) !important;\n height: 1px !important;\n margin: -1px !important;\n overflow: hidden !important;\n padding: 0 !important;\n position: absolute !important;\n width: 1px !important;\n }\n} @else {\n .mfp-hide {\n display: none !important;\n }\n}\n\n\n////////////////////////\n// 3. Appearance\n////////////////////////\n\n// Preloader and text that displays error messages\n.mfp-preloader {\n color: $mfp-controls-text-color;\n position: absolute;\n top: 50%;\n width: auto;\n text-align: center;\n margin-top: -0.8em;\n left: 8px;\n right: 8px;\n z-index: $mfp-z-index-base + 4;\n a {\n color: $mfp-controls-text-color;\n &:hover {\n color: $mfp-controls-text-color-hover;\n }\n }\n}\n\n// Hide preloader when content successfully loaded\n.mfp-s-ready {\n .mfp-preloader {\n display: none;\n }\n}\n\n// Hide content when it was not loaded\n.mfp-s-error {\n .mfp-content {\n display: none;\n }\n}\n\n// CSS-reset for buttons\nbutton {\n &.mfp-close,\n &.mfp-arrow {\n overflow: visible;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n display: block;\n outline: none;\n padding: 0;\n z-index: $mfp-z-index-base + 6;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n &::-moz-focus-inner {\n padding: 0;\n border: 0\n }\n}\n\n\n// Close icon\n.mfp-close {\n width: 44px;\n height: 44px;\n line-height: 44px;\n\n position: absolute;\n right: 0;\n top: 0;\n text-decoration: none;\n text-align: center;\n opacity: $mfp-controls-opacity;\n @if $mfp-IE7support {\n filter: unquote(\"alpha(opacity=#{$mfp-controls-opacity*100})\");\n }\n padding: 0 0 18px 10px;\n color: $mfp-controls-color;\n\n font-style: normal;\n font-size: 28px;\n font-family: $serif;\n\n &:hover,\n &:focus {\n opacity: 1;\n @if $mfp-IE7support {\n filter: unquote(\"alpha(opacity=#{1*100})\");\n }\n }\n\n &:active {\n top: 1px;\n }\n}\n.mfp-close-btn-in {\n .mfp-close {\n color: $mfp-inner-close-icon-color;\n }\n}\n.mfp-image-holder,\n.mfp-iframe-holder {\n .mfp-close {\n color: $mfp-controls-color;\n right: -6px;\n text-align: right;\n padding-right: 6px;\n width: 100%;\n }\n}\n\n// \"1 of X\" counter\n.mfp-counter {\n position: absolute;\n top: 0;\n right: 0;\n color: $mfp-controls-text-color;\n font-size: 12px;\n line-height: 18px;\n}\n\n// Navigation arrows\n@if $mfp-include-arrows {\n .mfp-arrow {\n position: absolute;\n opacity: $mfp-controls-opacity;\n @if $mfp-IE7support {\n filter: unquote(\"alpha(opacity=#{$mfp-controls-opacity*100})\");\n }\n margin: 0;\n top: 50%;\n margin-top: -55px;\n padding: 0;\n width: 90px;\n height: 110px;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n &:active {\n margin-top: -54px;\n }\n &:hover,\n &:focus {\n opacity: 1;\n @if $mfp-IE7support {\n filter: unquote(\"alpha(opacity=#{1*100})\");\n }\n }\n &:before,\n &:after,\n .mfp-b,\n .mfp-a {\n content: '';\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 0;\n margin-top: 35px;\n margin-left: 35px;\n border: medium inset transparent;\n }\n\n &:after,\n .mfp-a {\n\n border-top-width: 13px;\n border-bottom-width: 13px;\n top:8px;\n }\n\n &:before,\n .mfp-b {\n border-top-width: 21px;\n border-bottom-width: 21px;\n opacity: 0.7;\n }\n\n }\n\n .mfp-arrow-left {\n left: 0;\n\n &:after,\n .mfp-a {\n border-right: 17px solid $mfp-controls-color;\n margin-left: 31px;\n }\n &:before,\n .mfp-b {\n margin-left: 25px;\n border-right: 27px solid $mfp-controls-border-color;\n }\n }\n\n .mfp-arrow-right {\n right: 0;\n &:after,\n .mfp-a {\n border-left: 17px solid $mfp-controls-color;\n margin-left: 39px\n }\n &:before,\n .mfp-b {\n border-left: 27px solid $mfp-controls-border-color;\n }\n }\n}\n\n\n\n// Iframe content type\n@if $mfp-include-iframe-type {\n .mfp-iframe-holder {\n padding-top: $mfp-iframe-padding-top;\n padding-bottom: $mfp-iframe-padding-top;\n .mfp-content {\n line-height: 0;\n width: 100%;\n max-width: $mfp-iframe-max-width;\n }\n .mfp-close {\n top: -40px;\n }\n }\n .mfp-iframe-scaler {\n width: 100%;\n height: 0;\n overflow: hidden;\n padding-top: $mfp-iframe-ratio * 100%;\n iframe {\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n box-shadow: $mfp-shadow;\n background: $mfp-iframe-background;\n }\n }\n}\n\n\n\n// Image content type\n@if $mfp-include-image-type {\n\n /* Main image in popup */\n img {\n &.mfp-img {\n width: auto;\n max-width: 100%;\n height: auto;\n display: block;\n line-height: 0;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n padding: $mfp-image-padding-top 0 $mfp-image-padding-bottom;\n margin: 0 auto;\n }\n }\n\n /* The shadow behind the image */\n .mfp-figure {\n line-height: 0;\n &:after {\n content: '';\n position: absolute;\n left: 0;\n top: $mfp-image-padding-top;\n bottom: $mfp-image-padding-bottom;\n display: block;\n right: 0;\n width: auto;\n height: auto;\n z-index: -1;\n box-shadow: $mfp-shadow;\n background: $mfp-image-background;\n }\n small {\n color: $mfp-caption-subtitle-color;\n display: block;\n font-size: 12px;\n line-height: 14px;\n }\n figure {\n margin: 0;\n }\n figcaption {\n margin-top: 0;\n margin-bottom: 0; // reset for bottom spacing\n }\n }\n .mfp-bottom-bar {\n margin-top: -$mfp-image-padding-bottom + 4;\n position: absolute;\n top: 100%;\n left: 0;\n width: 100%;\n cursor: auto;\n }\n .mfp-title {\n text-align: left;\n line-height: 18px;\n color: $mfp-caption-title-color;\n word-wrap: break-word;\n padding-right: 36px; // leave some space for counter at right side\n }\n\n .mfp-image-holder {\n .mfp-content {\n max-width: 100%;\n }\n }\n\n .mfp-gallery {\n .mfp-image-holder {\n .mfp-figure {\n cursor: pointer;\n }\n }\n }\n\n\n @if $mfp-include-mobile-layout-for-image {\n @media screen and (max-width: 800px) and (orientation:landscape), screen and (max-height: 300px) {\n /**\n * Remove all paddings around the image on small screen\n */\n .mfp-img-mobile {\n .mfp-image-holder {\n padding-left: 0;\n padding-right: 0;\n }\n img {\n &.mfp-img {\n padding: 0;\n }\n }\n .mfp-figure {\n // The shadow behind the image\n &:after {\n top: 0;\n bottom: 0;\n }\n small {\n display: inline;\n margin-left: 5px;\n }\n }\n .mfp-bottom-bar {\n background: rgba(0,0,0,0.6);\n bottom: 0;\n margin: 0;\n top: auto;\n padding: 3px 5px;\n position: fixed;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n &:empty {\n padding: 0;\n }\n }\n .mfp-counter {\n right: 5px;\n top: 3px;\n }\n .mfp-close {\n top: 0;\n right: 0;\n width: 35px;\n height: 35px;\n line-height: 35px;\n background: rgba(0, 0, 0, 0.6);\n position: fixed;\n text-align: center;\n padding: 0;\n }\n }\n }\n }\n}\n\n\n\n// Scale navigation arrows and reduce padding from sides\n@media all and (max-width: 900px) {\n .mfp-arrow {\n -webkit-transform: scale(0.75);\n transform: scale(0.75);\n }\n .mfp-arrow-left {\n -webkit-transform-origin: 0;\n transform-origin: 0;\n }\n .mfp-arrow-right {\n -webkit-transform-origin: 100%;\n transform-origin: 100%;\n }\n .mfp-container {\n padding-left: $mfp-popup-padding-left-mobile;\n padding-right: $mfp-popup-padding-left-mobile;\n }\n}\n\n\n\n// IE7 support\n// Styles that make popup look nicier in old IE\n@if $mfp-IE7support {\n .mfp-ie7 {\n .mfp-img {\n padding: 0;\n }\n .mfp-bottom-bar {\n width: 600px;\n left: 50%;\n margin-left: -300px;\n margin-top: 5px;\n padding-bottom: 5px;\n }\n .mfp-container {\n padding: 0;\n }\n .mfp-content {\n padding-top: 44px;\n }\n .mfp-close {\n top: 0;\n right: 0;\n padding-top: 0;\n }\n }\n}\n","/* ==========================================================================\n MIXINS\n ========================================================================== */\n\n%tab-focus {\n /* Default*/\n outline: thin dotted $focus-color;\n /* Webkit*/\n outline: 5px auto $focus-color;\n outline-offset: -2px;\n}\n\n/*\n em function\n ========================================================================== */\n\n@function em($target, $context: $doc-font-size) {\n @return ($target / $context) * 1em;\n}\n\n\n/*\n Bourbon clearfix\n ========================================================================== */\n\n/*\n * Provides an easy way to include a clearfix for containing floats.\n * link http://cssmojo.com/latest_new_clearfix_so_far/\n *\n * example scss - Usage\n *\n * .element {\n * @include clearfix;\n * }\n *\n * example css - CSS Output\n *\n * .element::after {\n * clear: both;\n * content: \"\";\n * display: table;\n * }\n*/\n\n@mixin clearfix {\n clear: both;\n\n &::after {\n clear: both;\n content: \"\";\n display: table;\n }\n}\n\n/*\n Compass YIQ Color Contrast\n https://github.com/easy-designs/yiq-color-contrast\n ========================================================================== */\n\n@function yiq-is-light(\n $color,\n $threshold: $yiq-contrasted-threshold\n) {\n $red: red($color);\n $green: green($color);\n $blue: blue($color);\n\n $yiq: (($red*299)+($green*587)+($blue*114))/1000;\n\n @if $yiq-debug { @debug $yiq, $threshold; }\n\n @return if($yiq >= $threshold, true, false);\n}\n\n@function yiq-contrast-color(\n $color,\n $dark: $yiq-contrasted-dark-default,\n $light: $yiq-contrasted-light-default,\n $threshold: $yiq-contrasted-threshold\n) {\n @return if(yiq-is-light($color, $threshold), $yiq-contrasted-dark-default, $yiq-contrasted-light-default);\n}\n\n@mixin yiq-contrasted(\n $background-color,\n $dark: $yiq-contrasted-dark-default,\n $light: $yiq-contrasted-light-default,\n $threshold: $yiq-contrasted-threshold\n) {\n background-color: $background-color;\n color: yiq-contrast-color($background-color, $dark, $light, $threshold);\n}","/* ==========================================================================\n STYLE RESETS\n ========================================================================== */\n\n* { box-sizing: border-box; }\n\nhtml {\n /* apply a natural box layout model to all elements */\n box-sizing: border-box;\n background-color: $background-color;\n font-size: 16px;\n\n @include breakpoint($medium) {\n font-size: 18px;\n }\n\n @include breakpoint($large) {\n font-size: 20px;\n }\n\n @include breakpoint($x-large) {\n font-size: 22px;\n }\n\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n}\n\n/* Remove margin */\n\nbody { margin: 0; }\n\n/* Selected elements */\n\n::-moz-selection {\n color: #fff;\n background: #000;\n}\n\n::selection {\n color: #fff;\n background: #000;\n}\n\n/* Display HTML5 elements in IE6-9 and FF3 */\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection {\n display: block;\n}\n\n/* Display block in IE6-9 and FF3 */\n\naudio,\ncanvas,\nvideo {\n display: inline-block;\n *display: inline;\n *zoom: 1;\n}\n\n/* Prevents modern browsers from displaying 'audio' without controls */\n\naudio:not([controls]) {\n display: none;\n}\n\na {\n color: $link-color;\n}\n\n/* Apply focus state */\n\na:focus {\n @extend %tab-focus;\n}\n\n/* Remove outline from links */\n\na:hover,\na:active {\n outline: 0;\n}\n\n/* Prevent sub and sup affecting line-height in all browsers */\n\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n/* img border in anchor's and image quality */\n\nimg {\n /* Responsive images (ensure images don't scale beyond their parents) */\n max-width: 100%; /* part 1: Set a maximum relative to the parent*/\n width: auto\\9; /* IE7-8 need help adjusting responsive images*/\n height: auto; /* part 2: Scale the height according to the width, otherwise you get stretching*/\n\n vertical-align: middle;\n border: 0;\n -ms-interpolation-mode: bicubic;\n}\n\n/* Prevent max-width from affecting Google Maps */\n\n#map_canvas img,\n.google-maps img {\n max-width: none;\n}\n\n/* Consistent form font size in all browsers, margin changes, misc */\n\nbutton,\ninput,\nselect,\ntextarea {\n margin: 0;\n font-size: 100%;\n vertical-align: middle;\n}\n\nbutton,\ninput {\n *overflow: visible; /* inner spacing ie IE6/7*/\n line-height: normal; /* FF3/4 have !important on line-height in UA stylesheet*/\n}\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner { /* inner padding and border oddities in FF3/4*/\n padding: 0;\n border: 0;\n}\n\nbutton,\nhtml input[type=\"button\"], // avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; /* corrects inability to style clickable `input` types in iOS*/\n cursor: pointer; /* improves usability and consistency of cursor style between image-type `input` and others*/\n}\n\nlabel,\nselect,\nbutton,\ninput[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"],\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n cursor: pointer; /* improves usability and consistency of cursor style between image-type `input` and others*/\n}\n\ninput[type=\"search\"] { /* Appearance in Safari/Chrome*/\n box-sizing: border-box;\n -webkit-appearance: textfield;\n}\n\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-cancel-button {\n -webkit-appearance: none; /* inner-padding issues in Chrome OSX, Safari 5*/\n}\n\ntextarea {\n overflow: auto; /* remove vertical scrollbar in IE6-9*/\n vertical-align: top; /* readability and alignment cross-browser*/\n}","//////////////////////////////\n// Default Variables\n//////////////////////////////\n$Breakpoint-Settings: (\n 'default media': all,\n 'default feature': min-width,\n 'default pair': width,\n\n 'force all media type': false,\n 'to ems': false,\n 'transform resolutions': true,\n\n 'no queries': false,\n 'no query fallbacks': false,\n\n 'base font size': 16px,\n\n 'legacy syntax': false\n);\n\n$breakpoint: () !default;\n\n//////////////////////////////\n// Imports\n//////////////////////////////\n@import \"settings\";\n@import \"context\";\n@import \"helpers\";\n@import \"parsers\";\n@import \"no-query\";\n\n@import \"respond-to\";\n\n@import \"legacy-settings\";\n\n//////////////////////////////\n// Breakpoint Mixin\n//////////////////////////////\n\n@mixin breakpoint($query, $no-query: false) {\n @include legacy-settings-warning;\n\n // Reset contexts\n @include private-breakpoint-reset-contexts();\n\n $breakpoint: breakpoint($query, false);\n\n $query-string: map-get($breakpoint, 'query');\n $query-fallback: map-get($breakpoint, 'fallback');\n\n $private-breakpoint-context-holder: map-get($breakpoint, 'context holder') !global;\n $private-breakpoint-query-count: map-get($breakpoint, 'query count') !global;\n\n // Allow for an as-needed override or usage of no query fallback.\n @if $no-query != false {\n $query-fallback: $no-query;\n }\n\n @if $query-fallback != false {\n $context-setter: private-breakpoint-set-context('no-query', $query-fallback);\n }\n\n // Print Out Query String\n @if not breakpoint-get('no queries') {\n @media #{$query-string} {\n @content;\n }\n }\n\n @if breakpoint-get('no query fallbacks') != false or breakpoint-get('no queries') == true {\n\n $type: type-of(breakpoint-get('no query fallbacks'));\n $print: false;\n\n @if ($type == 'bool') {\n $print: true;\n }\n @else if ($type == 'string') {\n @if $query-fallback == breakpoint-get('no query fallbacks') {\n $print: true;\n }\n }\n @else if ($type == 'list') {\n @each $wrapper in breakpoint-get('no query fallbacks') {\n @if $query-fallback == $wrapper {\n $print: true;\n }\n }\n }\n\n // Write Fallback\n @if ($query-fallback != false) and ($print == true) {\n $type-fallback: type-of($query-fallback);\n\n @if ($type-fallback != 'bool') {\n #{$query-fallback} & {\n @content;\n }\n }\n @else {\n @content;\n }\n }\n }\n\n @include private-breakpoint-reset-contexts();\n}\n\n\n@mixin mq($query, $no-query: false) {\n @include breakpoint($query, $no-query) {\n @content;\n }\n}\n","/* ==========================================================================\n BASE ELEMENTS\n ========================================================================== */\n\nhtml {\n /* sticky footer fix */\n position: relative;\n min-height: 100%;\n}\n\nbody {\n margin: 0;\n padding: 0;\n color: $text-color;\n font-family: $global-font-family;\n line-height: 1.5;\n\n &.overflow--hidden {\n /* when primary navigation is visible, the content in the background won't scroll */\n overflow: hidden;\n }\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n margin: 2em 0 0.5em;\n line-height: 1.2;\n font-family: $header-font-family;\n font-weight: bold;\n}\n\nh1 {\n margin-top: 0;\n font-size: $h-size-1;\n}\n\nh2 {\n font-size: $h-size-2;\n}\n\nh3 {\n font-size: $h-size-3;\n}\n\nh4 {\n font-size: $h-size-4;\n}\n\nh5 {\n font-size: $h-size-5;\n}\n\nh6 {\n font-size: $h-size-6;\n}\n\nsmall,\n.small {\n font-size: $type-size-6;\n}\n\np {\n margin-bottom: 1.3em;\n}\n\nu,\nins {\n text-decoration: none;\n border-bottom: 1px solid $text-color;\n a {\n color: inherit;\n }\n}\n\ndel a {\n color: inherit;\n}\n\n/* reduce orphans and widows when printing */\n\np,\npre,\nblockquote,\nul,\nol,\ndl,\nfigure,\ntable,\nfieldset {\n orphans: 3;\n widows: 3;\n}\n\n/* abbreviations */\n\nabbr[title],\nabbr[data-original-title] {\n text-decoration: none;\n cursor: help;\n border-bottom: 1px dotted $text-color;\n}\n\n/* blockquotes */\n\nblockquote {\n margin: 2em 1em 2em 0;\n padding-left: 1em;\n padding-right: 1em;\n font-style: italic;\n border-left: 0.25em solid $primary-color;\n\n cite {\n font-style: italic;\n\n &:before {\n content: \"\\2014\";\n padding-right: 5px;\n }\n }\n}\n\n/* links */\n\na {\n &:focus {\n @extend %tab-focus;\n }\n\n &:visited {\n color: $link-color-visited;\n }\n\n &:hover {\n color: $link-color-hover;\n outline: 0;\n }\n}\n\n/* buttons */\n\nbutton:focus {\n @extend %tab-focus;\n}\n\n/* code */\n\ntt,\ncode,\nkbd,\nsamp,\npre {\n font-family: $monospace;\n}\n\npre {\n overflow-x: auto; /* add scrollbars to wide code blocks*/\n}\n\np > code,\na > code,\nli > code,\nfigcaption > code,\ntd > code {\n padding-top: 0.1rem;\n padding-bottom: 0.1rem;\n font-size: 0.8em;\n background: $code-background-color;\n border-radius: $border-radius;\n\n &:before,\n &:after {\n letter-spacing: -0.2em;\n content: \"\\00a0\"; /* non-breaking space*/\n }\n}\n\n/* horizontal rule */\n\nhr {\n display: block;\n margin: 1em 0;\n border: 0;\n border-top: 1px solid $border-color;\n}\n\n/* lists */\n\nul li,\nol li {\n margin-bottom: 0.5em;\n}\n\nli ul,\nli ol {\n margin-top: 0.5em;\n}\n\n/*\n Media and embeds\n ========================================================================== */\n\n/* Figures and images */\n\nfigure {\n display: -webkit-box;\n display: flex;\n -webkit-box-pack: justify;\n justify-content: space-between;\n -webkit-box-align: start;\n align-items: flex-start;\n flex-wrap: wrap;\n margin: 2em 0;\n\n img,\n iframe,\n .fluid-width-video-wrapper {\n margin-bottom: 1em;\n }\n\n img {\n width: 100%;\n border-radius: $border-radius;\n -webkit-transition: $global-transition;\n transition: $global-transition;\n }\n\n > a {\n display: block;\n }\n\n &.half {\n > a,\n > img {\n @include breakpoint($small) {\n width: calc(50% - 0.5em);\n }\n }\n\n figcaption {\n width: 100%;\n }\n }\n\n &.third {\n > a,\n > img {\n @include breakpoint($small) {\n width: calc(33.3333% - 0.5em);\n }\n }\n\n figcaption {\n width: 100%;\n }\n }\n}\n\n/* Figure captions */\n\nfigcaption {\n margin-bottom: 0.5em;\n color: $muted-text-color;\n font-family: $caption-font-family;\n font-size: $type-size-6;\n\n a {\n -webkit-transition: $global-transition;\n transition: $global-transition;\n\n &:hover {\n color: $link-color-hover;\n }\n }\n}\n\n/* Fix IE9 SVG bug */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/*\n Navigation lists\n ========================================================================== */\n\n/**\n * Removes margins, padding, and bullet points from navigation lists\n *\n * Example usage:\n * \n */\n\nnav {\n ul {\n margin: 0;\n padding: 0;\n }\n\n li {\n list-style: none;\n }\n\n a {\n text-decoration: none;\n }\n\n /* override white-space for nested lists */\n ul li,\n ol li {\n margin-bottom: 0;\n }\n\n li ul,\n li ol {\n margin-top: 0;\n }\n}\n\n/*\n Global animation transition\n ========================================================================== */\n\nb,\ni,\nstrong,\nem,\nblockquote,\np,\nq,\nspan,\nfigure,\nimg,\nh1,\nh2,\nheader,\ninput,\na,\ntr,\ntd,\nform button,\ninput[type=\"submit\"],\n.btn,\n.highlight,\n.archive__item-teaser {\n -webkit-transition: $global-transition;\n transition: $global-transition;\n}\n","/* ==========================================================================\n Forms\n ========================================================================== */\n\nform {\n margin: 0 0 5px 0;\n padding: 1em;\n background-color: $form-background-color;\n\n fieldset {\n margin-bottom: 5px;\n padding: 0;\n border-width: 0;\n }\n\n legend {\n display: block;\n width: 100%;\n margin-bottom: 5px * 2;\n *margin-left: -7px;\n padding: 0;\n color: $text-color;\n border: 0;\n white-space: normal;\n }\n\n p {\n margin-bottom: (5px / 2);\n }\n\n ul {\n list-style-type: none;\n margin: 0 0 5px 0;\n padding: 0;\n }\n\n br {\n display: none;\n }\n}\n\nlabel,\ninput,\nbutton,\nselect,\ntextarea {\n vertical-align: baseline;\n *vertical-align: middle;\n}\n\ninput,\nbutton,\nselect,\ntextarea {\n box-sizing: border-box;\n font-family: $sans-serif;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.25em;\n color: $text-color;\n cursor: pointer;\n\n small {\n font-size: $type-size-6;\n }\n\n input,\n textarea,\n select {\n display: block;\n }\n}\n\ninput,\ntextarea,\nselect {\n display: inline-block;\n width: 100%;\n padding: 0.25em;\n margin-bottom: 0.5em;\n color: $text-color;\n background-color: $background-color;\n border: $border-color;\n border-radius: $border-radius;\n box-shadow: $box-shadow;\n}\n\n.input-mini {\n width: 60px;\n}\n\n.input-small {\n width: 90px;\n}\n\ninput[type=\"image\"],\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n width: auto;\n height: auto;\n padding: 0;\n margin: 3px 0;\n *margin-top: 0;\n line-height: normal;\n cursor: pointer;\n border-radius: 0;\n border: 0 \\9;\n box-shadow: none;\n}\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n *width: 13px;\n *height: 13px;\n}\n\ninput[type=\"image\"] {\n border: 0;\n}\n\ninput[type=\"file\"] {\n width: auto;\n padding: initial;\n line-height: initial;\n border: initial;\n background-color: transparent;\n background-color: initial;\n box-shadow: none;\n}\n\ninput[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n width: auto;\n height: auto;\n cursor: pointer;\n *overflow: visible;\n}\n\nselect,\ninput[type=\"file\"] {\n *margin-top: 4px;\n}\n\nselect {\n width: auto;\n background-color: #fff;\n}\n\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\ntextarea {\n resize: vertical;\n height: auto;\n overflow: auto;\n vertical-align: top;\n}\n\ninput[type=\"hidden\"] {\n display: none;\n}\n\n.form {\n position: relative;\n}\n\n.radio,\n.checkbox {\n padding-left: 18px;\n font-weight: normal;\n}\n\n.radio input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"] {\n float: left;\n margin-left: -18px;\n}\n\n.radio.inline,\n.checkbox.inline {\n display: inline-block;\n padding-top: 5px;\n margin-bottom: 0;\n vertical-align: middle;\n}\n\n.radio.inline + .radio.inline,\n.checkbox.inline + .checkbox.inline {\n margin-left: 10px;\n}\n\n/*\n Disabled state\n ========================================================================== */\n\ninput[disabled],\nselect[disabled],\ntextarea[disabled],\ninput[readonly],\nselect[readonly],\ntextarea[readonly] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/*\n Focus & active state\n ========================================================================== */\n\ninput:focus,\ntextarea:focus {\n border-color: $primary-color;\n outline: 0;\n outline: thin dotted \\9;\n box-shadow: inset 0 1px 3px rgba($text-color, 0.06),\n 0 0 5px rgba($primary-color, 0.7);\n}\n\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus,\nselect:focus {\n box-shadow: none;\n}\n\n/*\n Help text\n ========================================================================== */\n\n.help-block,\n.help-inline {\n color: $muted-text-color;\n}\n\n.help-block {\n display: block;\n margin-bottom: 1em;\n line-height: 1em;\n}\n\n.help-inline {\n display: inline-block;\n vertical-align: middle;\n padding-left: 5px;\n}\n\n/*\n .form-group\n ========================================================================== */\n\n.form-group {\n margin-bottom: 5px;\n padding: 0;\n border-width: 0;\n}\n\n/*\n .form-inline\n ========================================================================== */\n\n.form-inline input,\n.form-inline textarea,\n.form-inline select {\n display: inline-block;\n margin-bottom: 0;\n}\n\n.form-inline label {\n display: inline-block;\n}\n\n.form-inline .radio,\n.form-inline .checkbox,\n.form-inline .radio {\n padding-left: 0;\n margin-bottom: 0;\n vertical-align: middle;\n}\n\n.form-inline .radio input[type=\"radio\"],\n.form-inline .checkbox input[type=\"checkbox\"] {\n float: left;\n margin-left: 0;\n margin-right: 3px;\n}\n\n/*\n .form-search\n ========================================================================== */\n\n.form-search input,\n.form-search textarea,\n.form-search select {\n display: inline-block;\n margin-bottom: 0;\n}\n\n.form-search .search-query {\n padding-left: 14px;\n padding-right: 14px;\n margin-bottom: 0;\n border-radius: 14px;\n}\n\n.form-search label {\n display: inline-block;\n}\n\n.form-search .radio,\n.form-search .checkbox,\n.form-inline .radio {\n padding-left: 0;\n margin-bottom: 0;\n vertical-align: middle;\n}\n\n.form-search .radio input[type=\"radio\"],\n.form-search .checkbox input[type=\"checkbox\"] {\n float: left;\n margin-left: 0;\n margin-right: 3px;\n}\n\n/*\n .form--loading\n ========================================================================== */\n\n.form--loading:before {\n content: \"\";\n}\n\n.form--loading .form__spinner {\n display: block;\n}\n\n.form:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0.7);\n z-index: 10;\n}\n\n.form__spinner {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 11;\n}\n","/* ==========================================================================\n TABLES\n ========================================================================== */\n\ntable {\n display: block;\n margin-bottom: 1em;\n width: 100%;\n font-family: $global-font-family;\n font-size: $type-size-6;\n border-collapse: collapse;\n overflow-x: auto;\n\n & + table {\n margin-top: 1em;\n }\n}\n\nthead {\n background-color: $border-color;\n border-bottom: 2px solid mix(#000, $border-color, 25%);\n}\n\nth {\n padding: 0.5em;\n font-weight: bold;\n text-align: left;\n}\n\ntd {\n padding: 0.5em;\n border-bottom: 1px solid mix(#000, $border-color, 25%);\n}\n\ntr,\ntd,\nth {\n vertical-align: middle;\n}","/* ==========================================================================\n ANIMATIONS\n ========================================================================== */\n\n@-webkit-keyframes intro {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes intro {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}","/* ==========================================================================\n BUTTONS\n ========================================================================== */\n\n/*\n Default button\n ========================================================================== */\n\n.btn {\n /* default */\n display: inline-block;\n margin-bottom: 0.25em;\n padding: 0.5em 1em;\n font-family: $sans-serif;\n font-size: $type-size-6;\n font-weight: bold;\n text-align: center;\n text-decoration: none;\n border-width: 0;\n border-radius: $border-radius;\n cursor: pointer;\n\n .icon {\n margin-right: 0.5em;\n }\n\n .icon + .hidden {\n margin-left: -0.5em; /* override for hidden text*/\n }\n\n /* button colors */\n $buttoncolors:\n (primary, $primary-color),\n (inverse, #fff),\n (light-outline, transparent),\n (success, $success-color),\n (warning, $warning-color),\n (danger, $danger-color),\n (info, $info-color),\n (facebook, $facebook-color),\n (twitter, $twitter-color),\n (linkedin, $linkedin-color);\n\n @each $buttoncolor, $color in $buttoncolors {\n &--#{$buttoncolor} {\n @include yiq-contrasted($color);\n @if ($buttoncolor == inverse) {\n border: 1px solid $border-color;\n }\n @if ($buttoncolor == light-outline) {\n border: 1px solid #fff;\n }\n\n &:visited {\n @include yiq-contrasted($color);\n }\n\n &:hover {\n @include yiq-contrasted(mix(#000, $color, 20%));\n }\n }\n }\n\n /* fills width of parent container */\n &--block {\n display: block;\n width: 100%;\n\n + .btn--block {\n margin-top: 0.25em;\n }\n }\n\n /* disabled */\n &--disabled {\n pointer-events: none;\n cursor: not-allowed;\n filter: alpha(opacity=65);\n box-shadow: none;\n opacity: 0.65;\n }\n\n /* extra large button */\n &--x-large {\n font-size: $type-size-4;\n }\n\n /* large button */\n &--large {\n font-size: $type-size-5;\n }\n\n /* small button */\n &--small {\n font-size: $type-size-7;\n }\n}","/* ==========================================================================\n NOTICE TEXT BLOCKS\n ========================================================================== */\n\n/**\n * Default Kramdown usage (no indents!):\n *
\n * #### Headline for the Notice\n * Text for the notice\n *
\n */\n\n@mixin notice($notice-color) {\n margin: 2em 0 !important; /* override*/\n padding: 1em;\n color: $text-color;\n font-family: $global-font-family;\n font-size: $type-size-6 !important;\n text-indent: initial; /* override*/\n background-color: mix($background-color, $notice-color, $notice-background-mix);\n border-radius: $border-radius;\n box-shadow: 0 1px 1px rgba($notice-color, 0.25);\n\n h4 {\n margin-top: 0 !important; /* override*/\n margin-bottom: 0.75em;\n line-height: inherit;\n }\n\n @at-root .page__content #{&} h4 {\n /* using at-root to override .page-content h4 font size*/\n margin-bottom: 0;\n font-size: 1em;\n }\n\n p {\n &:last-child {\n margin-bottom: 0 !important; /* override*/\n }\n }\n\n h4 + p {\n /* remove space above paragraphs that appear directly after notice headline*/\n margin-top: 0;\n padding-top: 0;\n }\n\n a {\n color: mix(#000, $notice-color, 10%);\n\n &:hover {\n color: mix(#000, $notice-color, 50%);\n }\n }\n\n code {\n background-color: mix($background-color, $notice-color, $code-notice-background-mix)\n }\n\n\tpre code {\n\t\tbackground-color: inherit;\n\t}\n\n ul {\n &:last-child {\n margin-bottom: 0; /* override*/\n }\n }\n}\n\n/* Default notice */\n\n.notice {\n @include notice($light-gray);\n}\n\n/* Primary notice */\n\n.notice--primary {\n @include notice($primary-color);\n}\n\n/* Info notice */\n\n.notice--info {\n @include notice($info-color);\n}\n\n/* Warning notice */\n\n.notice--warning {\n @include notice($warning-color);\n}\n\n/* Success notice */\n\n.notice--success {\n @include notice($success-color);\n}\n\n/* Danger notice */\n\n.notice--danger {\n @include notice($danger-color);\n}\n","/* ==========================================================================\n MASTHEAD\n ========================================================================== */\n\n.masthead {\n position: relative;\n border-bottom: 1px solid $border-color;\n -webkit-animation: $intro-transition;\n animation: $intro-transition;\n -webkit-animation-delay: 0.15s;\n animation-delay: 0.15s;\n z-index: 20;\n\n &__inner-wrap {\n @include clearfix;\n margin-left: auto;\n margin-right: auto;\n padding: 1em;\n max-width: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n font-family: $sans-serif-narrow;\n\n @include breakpoint($x-large) {\n max-width: $max-width;\n }\n\n nav {\n z-index: 10;\n }\n\n a {\n text-decoration: none;\n }\n }\n}\n\n.site-logo img {\n max-height: 2rem;\n}\n\n.site-title {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-item-align: center;\n align-self: center;\n font-weight: bold;\n // z-index: 20;\n}\n\n.site-subtitle {\n display: block;\n font-size: $type-size-8;\n}\n\n.masthead__menu {\n float: left;\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n clear: both;\n\n .site-nav {\n margin-left: 0;\n\n @include breakpoint($small) {\n float: right;\n }\n }\n\n ul {\n margin: 0;\n padding: 0;\n clear: both;\n list-style-type: none;\n }\n}\n\n.masthead__menu-item {\n display: block;\n list-style-type: none;\n white-space: nowrap;\n\n &--lg {\n padding-right: 2em;\n font-weight: 700;\n }\n}\n","/* ==========================================================================\n NAVIGATION\n ========================================================================== */\n\n/*\n Breadcrumb navigation links\n ========================================================================== */\n\n.breadcrumbs {\n @include clearfix;\n margin: 0 auto;\n max-width: 100%;\n padding-left: 1em;\n padding-right: 1em;\n font-family: $sans-serif;\n -webkit-animation: $intro-transition;\n animation: $intro-transition;\n -webkit-animation-delay: 0.3s;\n animation-delay: 0.3s;\n\n @include breakpoint($x-large) {\n max-width: $x-large;\n }\n\n ol {\n padding: 0;\n list-style: none;\n font-size: $type-size-6;\n\n @include breakpoint($large) {\n float: right;\n width: calc(100% - #{$right-sidebar-width-narrow});\n }\n\n @include breakpoint($x-large) {\n width: calc(100% - #{$right-sidebar-width});\n }\n }\n\n li {\n display: inline;\n }\n\n .current {\n font-weight: bold;\n }\n}\n\n/*\n Post pagination navigation links\n ========================================================================== */\n\n.pagination {\n @include clearfix();\n float: left;\n margin-top: 1em;\n padding-top: 1em;\n width: 100%;\n\n ul {\n margin: 0;\n padding: 0;\n list-style-type: none;\n font-family: $sans-serif;\n }\n\n li {\n display: block;\n float: left;\n margin-left: -1px;\n\n a {\n display: block;\n margin-bottom: 0.25em;\n padding: 0.5em 1em;\n font-family: $sans-serif;\n font-size: 14px;\n font-weight: bold;\n line-height: 1.5;\n text-align: center;\n text-decoration: none;\n color: $muted-text-color;\n border: 1px solid mix(#000, $border-color, 25%);\n border-radius: 0;\n\n &:hover {\n color: $link-color-hover;\n }\n\n &.current,\n &.current.disabled {\n color: #fff;\n background: $primary-color;\n }\n\n &.disabled {\n color: rgba($muted-text-color, 0.5);\n pointer-events: none;\n cursor: not-allowed;\n }\n }\n\n &:first-child {\n margin-left: 0;\n\n a {\n border-top-left-radius: $border-radius;\n border-bottom-left-radius: $border-radius;\n }\n }\n\n &:last-child {\n a {\n border-top-right-radius: $border-radius;\n border-bottom-right-radius: $border-radius;\n }\n }\n }\n\n /* next/previous buttons */\n &--pager {\n display: block;\n padding: 1em 2em;\n float: left;\n width: 50%;\n font-family: $sans-serif;\n font-size: $type-size-5;\n font-weight: bold;\n text-align: center;\n text-decoration: none;\n color: $muted-text-color;\n border: 1px solid mix(#000, $border-color, 25%);\n border-radius: $border-radius;\n\n &:hover {\n @include yiq-contrasted($muted-text-color);\n }\n\n &:first-child {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &:last-child {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n &.disabled {\n color: rgba($muted-text-color, 0.5);\n pointer-events: none;\n cursor: not-allowed;\n }\n }\n}\n\n.page__content + .pagination,\n.page__meta + .pagination,\n.page__share + .pagination,\n.page__comments + .pagination {\n margin-top: 2em;\n padding-top: 2em;\n border-top: 1px solid $border-color;\n}\n\n/*\n Priority plus navigation\n ========================================================================== */\n\n.greedy-nav {\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n min-height: $nav-height;\n background: $background-color;\n\n a {\n display: block;\n margin: 0 1rem;\n color: $masthead-link-color;\n text-decoration: none;\n -webkit-transition: none;\n transition: none;\n\n &:hover {\n color: $masthead-link-color-hover;\n }\n\n &.site-logo {\n margin-left: 0;\n margin-right: 0.5rem;\n }\n\n &.site-title {\n margin-left: 0;\n }\n }\n\n img {\n -webkit-transition: none;\n transition: none;\n }\n\n &__toggle {\n -ms-flex-item-align: center;\n align-self: center;\n height: $nav-toggle-height;\n border: 0;\n outline: none;\n background-color: transparent;\n cursor: pointer;\n }\n\n .visible-links {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n overflow: hidden;\n\n li {\n -webkit-box-flex: 0;\n -ms-flex: none;\n flex: none;\n }\n\n a {\n position: relative;\n\n &:before {\n content: \"\";\n position: absolute;\n left: 0;\n bottom: 0;\n height: 4px;\n background: $primary-color;\n width: 100%;\n -webkit-transition: $global-transition;\n transition: $global-transition;\n -webkit-transform: scaleX(0) translate3d(0, 0, 0);\n transform: scaleX(0) translate3d(0, 0, 0); // hide\n }\n\n &:hover:before {\n -webkit-transform: scaleX(1);\n -ms-transform: scaleX(1);\n transform: scaleX(1); // reveal\n }\n }\n }\n\n .hidden-links {\n position: absolute;\n top: 100%;\n right: 0;\n margin-top: 15px;\n padding: 5px;\n border: 1px solid $border-color;\n border-radius: $border-radius;\n background: $background-color;\n -webkit-box-shadow: 0 2px 4px 0 rgba(#000, 0.16),\n 0 2px 10px 0 rgba(#000, 0.12);\n box-shadow: 0 2px 4px 0 rgba(#000, 0.16), 0 2px 10px 0 rgba(#000, 0.12);\n\n &.hidden {\n display: none;\n }\n\n a {\n margin: 0;\n padding: 10px 20px;\n font-size: $type-size-5;\n\n &:hover {\n color: $masthead-link-color-hover;\n background: $navicon-link-color-hover;\n }\n }\n\n &:before {\n content: \"\";\n position: absolute;\n top: -11px;\n right: 10px;\n width: 0;\n border-style: solid;\n border-width: 0 10px 10px;\n border-color: $border-color transparent;\n display: block;\n z-index: 0;\n }\n\n &:after {\n content: \"\";\n position: absolute;\n top: -10px;\n right: 10px;\n width: 0;\n border-style: solid;\n border-width: 0 10px 10px;\n border-color: $background-color transparent;\n display: block;\n z-index: 1;\n }\n\n li {\n display: block;\n border-bottom: 1px solid $border-color;\n\n &:last-child {\n border-bottom: none;\n }\n }\n }\n}\n\n.no-js {\n .greedy-nav {\n .visible-links {\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n overflow: visible;\n }\n }\n}\n\n/*\n Navigation list\n ========================================================================== */\n\n.nav__list {\n margin-bottom: 1.5em;\n\n input[type=\"checkbox\"],\n label {\n display: none;\n }\n\n @include breakpoint(max-width $large - 1px) {\n label {\n position: relative;\n display: inline-block;\n padding: 0.5em 2.5em 0.5em 1em;\n color: $gray;\n font-size: $type-size-6;\n font-weight: bold;\n border: 1px solid $light-gray;\n border-radius: $border-radius;\n z-index: 20;\n -webkit-transition: 0.2s ease-out;\n transition: 0.2s ease-out;\n cursor: pointer;\n\n &:before,\n &:after {\n content: \"\";\n position: absolute;\n right: 1em;\n top: 1.25em;\n width: 0.75em;\n height: 0.125em;\n line-height: 1;\n background-color: $gray;\n -webkit-transition: 0.2s ease-out;\n transition: 0.2s ease-out;\n }\n\n &:after {\n -webkit-transform: rotate(90deg);\n -ms-transform: rotate(90deg);\n transform: rotate(90deg);\n }\n\n &:hover {\n color: #fff;\n border-color: $gray;\n background-color: mix(white, #000, 20%);\n\n &:before,\n &:after {\n background-color: #fff;\n }\n }\n }\n\n /* selected*/\n input:checked + label {\n color: white;\n background-color: mix(white, #000, 20%);\n\n &:before,\n &:after {\n background-color: #fff;\n }\n }\n\n /* on hover show expand*/\n label:hover:after {\n -webkit-transform: rotate(90deg);\n -ms-transform: rotate(90deg);\n transform: rotate(90deg);\n }\n\n input:checked + label:hover:after {\n -webkit-transform: rotate(0);\n -ms-transform: rotate(0);\n transform: rotate(0);\n }\n\n ul {\n margin-bottom: 1em;\n }\n\n a {\n display: block;\n padding: 0.25em 0;\n\n @include breakpoint($large) {\n padding-top: 0.125em;\n padding-bottom: 0.125em;\n }\n\n &:hover {\n text-decoration: underline;\n }\n }\n }\n}\n\n.nav__list .nav__items {\n margin: 0;\n font-size: 1.25rem;\n\n a {\n color: inherit;\n }\n\n .active {\n margin-left: -0.5em;\n padding-left: 0.5em;\n padding-right: 0.5em;\n font-weight: bold;\n }\n\n @include breakpoint(max-width $large - 1px) {\n position: relative;\n max-height: 0;\n opacity: 0%;\n overflow: hidden;\n z-index: 10;\n -webkit-transition: 0.3s ease-in-out;\n transition: 0.3s ease-in-out;\n -webkit-transform: translate(0, 10%);\n -ms-transform: translate(0, 10%);\n transform: translate(0, 10%);\n }\n}\n\n@include breakpoint(max-width $large - 1px) {\n .nav__list input:checked ~ .nav__items {\n -webkit-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n max-height: 9999px; /* exaggerate max-height to accommodate tall lists*/\n overflow: visible;\n opacity: 1;\n margin-top: 1em;\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n transform: translate(0, 0);\n }\n}\n\n.nav__title {\n margin: 0;\n padding: 0.5rem 0.75rem;\n font-family: $sans-serif-narrow;\n font-size: $type-size-5;\n font-weight: bold;\n}\n\n.nav__sub-title {\n display: block;\n margin: 0.5rem 0;\n padding: 0.25rem 0;\n font-family: $sans-serif-narrow;\n font-size: $type-size-6;\n font-weight: bold;\n text-transform: uppercase;\n border-bottom: 1px solid $border-color;\n}\n\n/*\n Table of contents navigation\n ========================================================================== */\n\n.toc {\n font-family: $sans-serif-narrow;\n color: $gray;\n background-color: $background-color;\n border: 1px solid $border-color;\n border-radius: $border-radius;\n -webkit-box-shadow: $box-shadow;\n box-shadow: $box-shadow;\n\n .nav__title {\n color: #fff;\n font-size: $type-size-6;\n background: $primary-color;\n border-top-left-radius: $border-radius;\n border-top-right-radius: $border-radius;\n }\n\n // Scrollspy marks toc items as .active when they are in focus\n .active a {\n @include yiq-contrasted($active-color);\n }\n}\n\n.toc__menu {\n margin: 0;\n padding: 0;\n width: 100%;\n list-style: none;\n font-size: $type-size-6;\n\n @include breakpoint($large) {\n font-size: $type-size-7;\n }\n\n a {\n display: block;\n padding: 0.25rem 0.75rem;\n color: $muted-text-color;\n font-weight: bold;\n line-height: 1.5;\n border-bottom: 1px solid $border-color;\n\n &:hover {\n color: $text-color;\n }\n }\n\n li ul > li a {\n padding-left: 1.25rem;\n font-weight: normal;\n }\n\n li ul li ul > li a {\n padding-left: 1.75rem;\n }\n\n li ul li ul li ul > li a {\n padding-left: 2.25rem;\n }\n\n li ul li ul li ul li ul > li a {\n padding-left: 2.75rem;\n }\n\n li ul li ul li ul li ul li ul > li a {\n padding-left: 3.25rem\n }\n}\n","/* ==========================================================================\n FOOTER\n ========================================================================== */\n\n.page__footer {\n @include clearfix;\n float: left;\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n margin-top: 3em;\n color: $muted-text-color;\n -webkit-animation: $intro-transition;\n animation: $intro-transition;\n -webkit-animation-delay: 0.45s;\n animation-delay: 0.45s;\n background-color: $footer-background-color;\n\n footer {\n @include clearfix;\n margin-left: auto;\n margin-right: auto;\n margin-top: 2em;\n max-width: 100%;\n padding: 0 1em 2em;\n\n @include breakpoint($x-large) {\n max-width: $x-large;\n }\n }\n\n a {\n color: inherit;\n text-decoration: none;\n\n &:hover {\n text-decoration: underline;\n }\n }\n\n .fas,\n .fab,\n .far,\n .fal {\n color: $muted-text-color;\n }\n}\n\n.page__footer-copyright {\n font-family: $global-font-family;\n font-size: $type-size-7;\n}\n\n.page__footer-follow {\n ul {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n\n li {\n display: inline-block;\n padding-top: 5px;\n padding-bottom: 5px;\n font-family: $sans-serif-narrow;\n font-size: $type-size-6;\n text-transform: uppercase;\n }\n\n li + li:before {\n content: \"\";\n padding-right: 5px;\n }\n\n a {\n padding-right: 10px;\n font-weight: bold;\n }\n\n .social-icons {\n a {\n white-space: nowrap;\n }\n }\n}\n","/* ==========================================================================\n SEARCH\n ========================================================================== */\n\n.layout--search {\n .archive__item-teaser {\n margin-bottom: 0.25em;\n }\n}\n\n.search__toggle {\n margin-left: 1rem;\n margin-right: 1rem;\n height: $nav-toggle-height;\n border: 0;\n outline: none;\n color: $primary-color;\n background-color: transparent;\n cursor: pointer;\n -webkit-transition: 0.2s;\n transition: 0.2s;\n\n &:hover {\n color: mix(#000, $primary-color, 25%);\n }\n}\n\n.search-icon {\n width: 100%;\n height: 100%;\n}\n\n.search-content {\n display: none;\n visibility: hidden;\n padding-top: 1em;\n padding-bottom: 1em;\n\n &__inner-wrap {\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding-left: 1em;\n padding-right: 1em;\n -webkit-animation: $intro-transition;\n animation: $intro-transition;\n -webkit-animation-delay: 0.15s;\n animation-delay: 0.15s;\n\n @include breakpoint($x-large) {\n max-width: $max-width;\n }\n\n }\n\n &__form {\n background-color: transparent;\n }\n\n .search-input {\n display: block;\n margin-bottom: 0;\n padding: 0;\n border: none;\n outline: none;\n box-shadow: none;\n background-color: transparent;\n font-size: $type-size-3;\n\n @include breakpoint($large) {\n font-size: $type-size-2;\n }\n\n @include breakpoint($x-large) {\n font-size: $type-size-1;\n }\n }\n\n &.is--visible {\n display: block;\n visibility: visible;\n\n &::after {\n content: \"\";\n display: block;\n }\n }\n\n .results__found {\n margin-top: 0.5em;\n font-size: $type-size-6;\n }\n\n .archive__item {\n margin-bottom: 2em;\n\n @include breakpoint($large) {\n width: 75%;\n }\n\n @include breakpoint($x-large) {\n width: 50%;\n }\n }\n\n .archive__item-title {\n margin-top: 0;\n }\n\n .archive__item-excerpt {\n margin-bottom: 0;\n }\n}\n\n/* Algolia search */\n\n.ais-search-box {\n max-width: 100% !important;\n margin-bottom: 2em;\n}\n\n.archive__item-title .ais-Highlight {\n color: $primary-color;\n font-style: normal;\n text-decoration: underline;\n}\n\n.archive__item-excerpt .ais-Highlight {\n color: $primary-color;\n font-style: normal;\n font-weight: bold;\n}\n","/* ==========================================================================\n Syntax highlighting\n ========================================================================== */\n\ndiv.highlighter-rouge,\nfigure.highlight {\n position: relative;\n margin-bottom: 1em;\n background: $base00;\n color: $base05;\n font-family: $monospace;\n font-size: $type-size-6;\n line-height: 1.8;\n border-radius: $border-radius;\n\n > pre,\n pre.highlight {\n margin: 0;\n padding: 1em;\n }\n}\n\n.highlight table {\n margin-bottom: 0;\n font-size: 1em;\n border: 0;\n\n td {\n padding: 0;\n width: calc(100% - 1em);\n border: 0;\n\n /* line numbers*/\n &.gutter,\n &.rouge-gutter {\n padding-right: 1em;\n width: 1em;\n color: $base04;\n border-right: 1px solid $base04;\n text-align: right;\n }\n\n /* code */\n &.code,\n &.rouge-code {\n padding-left: 1em;\n }\n }\n\n pre {\n margin: 0;\n }\n}\n\n.highlight pre {\n width: 100%;\n}\n\n.highlight .hll {\n background-color: $base06;\n}\n.highlight {\n .c {\n /* Comment */\n color: $base04;\n }\n .err {\n /* Error */\n color: $base08;\n }\n .k {\n /* Keyword */\n color: $base0e;\n }\n .l {\n /* Literal */\n color: $base09;\n }\n .n {\n /* Name */\n color: $base05;\n }\n .o {\n /* Operator */\n color: $base0c;\n }\n .p {\n /* Punctuation */\n color: $base05;\n }\n .cm {\n /* Comment.Multiline */\n color: $base04;\n }\n .cp {\n /* Comment.Preproc */\n color: $base04;\n }\n .c1 {\n /* Comment.Single */\n color: $base04;\n }\n .cs {\n /* Comment.Special */\n color: $base04;\n }\n .gd {\n /* Generic.Deleted */\n color: $base08;\n }\n .ge {\n /* Generic.Emph */\n font-style: italic;\n }\n .gh {\n /* Generic.Heading */\n color: $base05;\n font-weight: bold;\n }\n .gi {\n /* Generic.Inserted */\n color: $base0b;\n }\n .gp {\n /* Generic.Prompt */\n color: $base04;\n font-weight: bold;\n }\n .gs {\n /* Generic.Strong */\n font-weight: bold;\n }\n .gu {\n /* Generic.Subheading */\n color: $base0c;\n font-weight: bold;\n }\n .kc {\n /* Keyword.Constant */\n color: $base0e;\n }\n .kd {\n /* Keyword.Declaration */\n color: $base0e;\n }\n .kn {\n /* Keyword.Namespace */\n color: $base0c;\n }\n .kp {\n /* Keyword.Pseudo */\n color: $base0e;\n }\n .kr {\n /* Keyword.Reserved */\n color: $base0e;\n }\n .kt {\n /* Keyword.Type */\n color: $base0a;\n }\n .ld {\n /* Literal.Date */\n color: $base0b;\n }\n .m {\n /* Literal.Number */\n color: $base09;\n }\n .s {\n /* Literal.String */\n color: $base0b;\n }\n .na {\n /* Name.Attribute */\n color: $base0d;\n }\n .nb {\n /* Name.Builtin */\n color: $base05;\n }\n .nc {\n /* Name.Class */\n color: $base0a;\n }\n .no {\n /* Name.Constant */\n color: $base08;\n }\n .nd {\n /* Name.Decorator */\n color: $base0c;\n }\n .ni {\n /* Name.Entity */\n color: $base05;\n }\n .ne {\n /* Name.Exception */\n color: $base08;\n }\n .nf {\n /* Name.Function */\n color: $base0d;\n }\n .nl {\n /* Name.Label */\n color: $base05;\n }\n .nn {\n /* Name.Namespace */\n color: $base0a;\n }\n .nx {\n /* Name.Other */\n color: $base0d;\n }\n .py {\n /* Name.Property */\n color: $base05;\n }\n .nt {\n /* Name.Tag */\n color: $base0c;\n }\n .nv {\n /* Name.Variable */\n color: $base08;\n }\n .ow {\n /* Operator.Word */\n color: $base0c;\n }\n .w {\n /* Text.Whitespace */\n color: $base05;\n }\n .mf {\n /* Literal.Number.Float */\n color: $base09;\n }\n .mh {\n /* Literal.Number.Hex */\n color: $base09;\n }\n .mi {\n /* Literal.Number.Integer */\n color: $base09;\n }\n .mo {\n /* Literal.Number.Oct */\n color: $base09;\n }\n .sb {\n /* Literal.String.Backtick */\n color: $base0b;\n }\n .sc {\n /* Literal.String.Char */\n color: $base05;\n }\n .sd {\n /* Literal.String.Doc */\n color: $base04;\n }\n .s2 {\n /* Literal.String.Double */\n color: $base0b;\n }\n .se {\n /* Literal.String.Escape */\n color: $base09;\n }\n .sh {\n /* Literal.String.Heredoc */\n color: $base0b;\n }\n .si {\n /* Literal.String.Interpol */\n color: $base09;\n }\n .sx {\n /* Literal.String.Other */\n color: $base0b;\n }\n .sr {\n /* Literal.String.Regex */\n color: $base0b;\n }\n .s1 {\n /* Literal.String.Single */\n color: $base0b;\n }\n .ss {\n /* Literal.String.Symbol */\n color: $base0b;\n }\n .bp {\n /* Name.Builtin.Pseudo */\n color: $base05;\n }\n .vc {\n /* Name.Variable.Class */\n color: $base08;\n }\n .vg {\n /* Name.Variable.Global */\n color: $base08;\n }\n .vi {\n /* Name.Variable.Instance */\n color: $base08;\n }\n .il {\n /* Literal.Number.Integer.Long */\n color: $base09;\n }\n}\n\n.gist {\n th, td {\n border-bottom: 0;\n }\n}","/* ==========================================================================\n UTILITY CLASSES\n ========================================================================== */\n\n/*\n Visibility\n ========================================================================== */\n\n/* http://www.456bereastreet.com/archive/200711/screen_readers_sometimes_ignore_displaynone/ */\n\n.hidden,\n.is--hidden {\n display: none;\n visibility: hidden;\n}\n\n/* for preloading images */\n\n.load {\n display: none;\n}\n\n.transparent {\n opacity: 0;\n}\n\n/* https://developer.yahoo.com/blogs/ydn/clip-hidden-content-better-accessibility-53456.html */\n\n.visually-hidden,\n.screen-reader-text,\n.screen-reader-text span,\n.screen-reader-shortcut {\n position: absolute !important;\n clip: rect(1px, 1px, 1px, 1px);\n height: 1px !important;\n width: 1px !important;\n border: 0 !important;\n overflow: hidden;\n}\n\nbody:hover .visually-hidden a,\nbody:hover .visually-hidden input,\nbody:hover .visually-hidden button {\n display: none !important;\n}\n\n/* screen readers */\n\n.screen-reader-text:focus,\n.screen-reader-shortcut:focus {\n clip: auto !important;\n height: auto !important;\n width: auto !important;\n display: block;\n font-size: 1em;\n font-weight: bold;\n padding: 15px 23px 14px;\n background: #fff;\n z-index: 100000;\n text-decoration: none;\n box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);\n}\n\n/*\n Skip links\n ========================================================================== */\n\n.skip-link {\n position: fixed;\n z-index: 20;\n margin: 0;\n font-family: $sans-serif;\n white-space: nowrap;\n}\n\n.skip-link li {\n height: 0;\n width: 0;\n list-style: none;\n}\n\n/*\n Type\n ========================================================================== */\n\n.text-left {\n text-align: left;\n}\n\n.text-center {\n text-align: center;\n}\n\n.text-right {\n text-align: right;\n}\n\n.text-justify {\n text-align: justify;\n}\n\n.text-nowrap {\n white-space: nowrap;\n}\n\n/*\n Task lists\n ========================================================================== */\n\n.task-list {\n padding:0;\n\n li {\n list-style-type: none;\n }\n\n .task-list-item-checkbox {\n margin-right: 0.5em;\n opacity: 1;\n }\n}\n\n.task-list .task-list {\n margin-left: 1em;\n}\n\n/*\n Alignment\n ========================================================================== */\n\n/* clearfix */\n\n.cf {\n clear: both;\n}\n\n.wrapper {\n margin-left: auto;\n margin-right: auto;\n width: 100%;\n}\n\n/*\n Images\n ========================================================================== */\n\n/* image align left */\n\n.align-left {\n display: block;\n margin-left: auto;\n margin-right: auto;\n\n @include breakpoint($small) {\n float: left;\n margin-right: 1em;\n }\n}\n\n/* image align right */\n\n.align-right {\n display: block;\n margin-left: auto;\n margin-right: auto;\n\n @include breakpoint($small) {\n float: right;\n margin-left: 1em;\n }\n}\n\n/* image align center */\n\n.align-center {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n\n/* file page content container */\n\n.full {\n @include breakpoint($large) {\n margin-right: -1 * span(2.5 of 12) !important;\n }\n}\n\n/*\n Icons\n ========================================================================== */\n\n.icon {\n display: inline-block;\n fill: currentColor;\n width: 1em;\n height: 1.1em;\n line-height: 1;\n position: relative;\n top: -0.1em;\n vertical-align: middle;\n}\n\n/* social icons*/\n\n.social-icons {\n .fas,\n .fab,\n .far,\n .fal {\n color: $text-color;\n }\n\n .fa-behance,\n .fa-behance-square {\n color: $behance-color;\n }\n\n .fa-bitbucket {\n color: $bitbucket-color;\n }\n\n .fa-dribbble,\n .fa-dribble-square {\n color: $dribbble-color;\n }\n\n .fa-facebook,\n .fa-facebook-square,\n .fa-facebook-f {\n color: $facebook-color;\n }\n\n .fa-flickr {\n color: $flickr-color;\n }\n\n .fa-foursquare {\n color: $foursquare-color;\n }\n\n .fa-github,\n .fa-github-alt,\n .fa-github-square {\n color: $github-color;\n }\n\n .fa-gitlab {\n color: $gitlab-color;\n }\n\n .fa-instagram {\n color: $instagram-color;\n }\n\n .fa-keybase {\n color: $keybase-color;\n }\n\n .fa-lastfm,\n .fa-lastfm-square {\n color: $lastfm-color;\n }\n\n .fa-linkedin,\n .fa-linkedin-in {\n color: $linkedin-color;\n }\n\n .fa-mastodon,\n .fa-mastodon-square {\n color: $mastodon-color;\n }\n\n .fa-pinterest,\n .fa-pinterest-p,\n .fa-pinterest-square {\n color: $pinterest-color;\n }\n\n .fa-reddit {\n color: $reddit-color;\n }\n\n .fa-rss,\n .fa-rss-square {\n color: $rss-color;\n }\n\n .fa-soundcloud {\n color: $soundcloud-color;\n }\n\n .fa-stack-exchange,\n .fa-stack-overflow {\n color: $stackoverflow-color;\n }\n\n .fa-tumblr,\n .fa-tumblr-square {\n color: $tumblr-color;\n }\n\n .fa-twitter,\n .fa-twitter-square {\n color: $twitter-color;\n }\n\n .fa-vimeo,\n .fa-vimeo-square,\n .fa-vimeo-v {\n color: $vimeo-color;\n }\n\n .fa-vine {\n color: $vine-color;\n }\n\n .fa-youtube {\n color: $youtube-color;\n }\n\n .fa-xing,\n .fa-xing-square {\n color: $xing-color;\n }\n}\n\n/*\n Navicons\n ========================================================================== */\n\n.navicon {\n position: relative;\n width: $navicon-width;\n height: $navicon-height;\n background: $primary-color;\n margin: auto;\n -webkit-transition: 0.3s;\n transition: 0.3s;\n\n &:before,\n &:after {\n content: \"\";\n position: absolute;\n left: 0;\n width: $navicon-width;\n height: $navicon-height;\n background: $primary-color;\n -webkit-transition: 0.3s;\n transition: 0.3s;\n }\n\n &:before {\n top: (-2 * $navicon-height);\n }\n\n &:after {\n bottom: (-2 * $navicon-height);\n }\n}\n\n.close .navicon {\n /* hide the middle line*/\n background: transparent;\n\n /* overlay the lines by setting both their top values to 0*/\n &:before,\n &:after {\n -webkit-transform-origin: 50% 50%;\n -ms-transform-origin: 50% 50%;\n transform-origin: 50% 50%;\n top: 0;\n width: $navicon-width;\n }\n\n /* rotate the lines to form the x shape*/\n &:before {\n -webkit-transform: rotate3d(0, 0, 1, 45deg);\n transform: rotate3d(0, 0, 1, 45deg);\n }\n &:after {\n -webkit-transform: rotate3d(0, 0, 1, -45deg);\n transform: rotate3d(0, 0, 1, -45deg);\n }\n}\n\n.greedy-nav__toggle {\n &:before {\n @supports (pointer-events: none) {\n content: '';\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n background-color: $background-color;\n -webkit-transition: $global-transition;\n transition: $global-transition;\n pointer-events: none;\n }\n }\n\n &.close {\n &:before {\n opacity: 0.9;\n -webkit-transition: $global-transition;\n transition: $global-transition;\n pointer-events: auto;\n }\n }\n}\n\n.greedy-nav__toggle:hover {\n .navicon,\n .navicon:before,\n .navicon:after {\n background: mix(#000, $primary-color, 25%);\n }\n\n &.close {\n .navicon {\n background: transparent;\n }\n }\n}\n\n/*\n Sticky, fixed to top content\n ========================================================================== */\n\n.sticky {\n @include breakpoint($large) {\n @include clearfix();\n position: -webkit-sticky;\n position: sticky;\n top: 2em;\n\n > * {\n display: block;\n }\n }\n}\n\n/*\n Wells\n ========================================================================== */\n\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: $border-radius;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n\n/*\n Modals\n ========================================================================== */\n\n.show-modal {\n overflow: hidden;\n position: relative;\n\n &:before {\n position: absolute;\n content: \"\";\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 999;\n background-color: rgba(255, 255, 255, 0.85);\n }\n\n .modal {\n display: block;\n }\n}\n\n.modal {\n display: none;\n position: fixed;\n width: 300px;\n top: 50%;\n left: 50%;\n margin-left: -150px;\n margin-top: -150px;\n min-height: 0;\n z-index: 9999;\n background: #fff;\n border: 1px solid $border-color;\n border-radius: $border-radius;\n box-shadow: $box-shadow;\n\n &__title {\n margin: 0;\n padding: 0.5em 1em;\n }\n\n &__supporting-text {\n padding: 0 1em 0.5em 1em;\n }\n\n &__actions {\n padding: 0.5em 1em;\n border-top: 1px solid $border-color;\n }\n}\n\n/*\n Footnotes\n ========================================================================== */\n\n.footnote {\n color: mix(#fff, $gray, 25%);\n text-decoration: none;\n}\n\n.footnotes {\n color: mix(#fff, $gray, 25%);\n\n ol,\n li,\n p {\n margin-bottom: 0;\n font-size: $type-size-6;\n }\n}\n\na.reversefootnote {\n color: $gray;\n text-decoration: none;\n\n &:hover {\n text-decoration: underline;\n }\n}\n\n/*\n Required\n ========================================================================== */\n\n.required {\n color: $danger-color;\n font-weight: bold;\n}\n\n/*\n Google Custom Search Engine\n ========================================================================== */\n\n.gsc-control-cse {\n table,\n tr,\n td {\n border: 0; /* remove table borders widget */\n }\n}\n\n/*\n Responsive Video Embed\n ========================================================================== */\n\n.responsive-video-container {\n position: relative;\n margin-bottom: 1em;\n padding-bottom: 56.25%;\n height: 0;\n overflow: hidden;\n max-width: 100%;\n\n iframe,\n object,\n embed {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n}\n\n// full screen video fixes\n:-webkit-full-screen-ancestor {\n .masthead,\n .page__footer {\n position: static;\n }\n}\n","/* ==========================================================================\n SINGLE PAGE/POST\n ========================================================================== */\n\n#main {\n @include clearfix;\n margin-left: auto;\n margin-right: auto;\n padding-left: 1em;\n padding-right: 1em;\n -webkit-animation: $intro-transition;\n animation: $intro-transition;\n max-width: 100%;\n -webkit-animation-delay: 0.15s;\n animation-delay: 0.15s;\n\n @include breakpoint($x-large) {\n max-width: $max-width;\n }\n}\n\nbody {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n min-height: 100vh;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n.initial-content,\n.search-content {\n flex: 1 0 auto;\n}\n\n.page {\n @include breakpoint($large) {\n float: right;\n width: calc(100% - #{$right-sidebar-width-narrow});\n padding-right: $right-sidebar-width-narrow;\n }\n\n @include breakpoint($x-large) {\n width: calc(100% - #{$right-sidebar-width});\n padding-right: $right-sidebar-width;\n }\n\n .page__inner-wrap {\n float: left;\n margin-top: 1em;\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n clear: both;\n\n .page__content,\n .page__meta,\n .page__share {\n position: relative;\n float: left;\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n clear: both;\n }\n }\n}\n\n.page__title {\n margin-top: 0;\n line-height: 1;\n\n a {\n color: $text-color;\n text-decoration: none;\n }\n\n & + .page__meta {\n margin-top: -0.5em;\n }\n}\n\n.page__lead {\n font-family: $global-font-family;\n font-size: $type-size-4;\n}\n\n.page__content {\n h2 {\n padding-bottom: 0.5em;\n border-bottom: 1px solid $border-color;\n }\n\n\th1, h2, h3, h4, h5, h6 {\n\t\t.header-link {\n\t\t\tposition: relative;\n\t\t\tleft: 0.5em;\n\t\t\topacity: 0;\n\t\t\tfont-size: $type-size-6;\n\t\t\t-webkit-transition: opacity 0.2s ease-in-out 0.1s;\n\t\t\t-moz-transition: opacity 0.2s ease-in-out 0.1s;\n\t\t\t-o-transition: opacity 0.2s ease-in-out 0.1s;\n\t\t\ttransition: opacity 0.2s ease-in-out 0.1s;\n\t\t}\n\n\t\t&:hover .header-link {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n p,\n li,\n dl {\n font-size: $type-size-5;\n }\n\n /* paragraph indents */\n p {\n margin: 0 0 $indent-var;\n\n /* sibling indentation*/\n @if $paragraph-indent == true {\n & + p {\n text-indent: $indent-var;\n margin-top: -($indent-var);\n }\n }\n }\n\n a:not(.btn) {\n &:hover {\n text-decoration: underline;\n\n img {\n box-shadow: 0 0 10px rgba(#000, 0.25);\n }\n }\n }\n\n dt {\n margin-top: 1em;\n font-family: $sans-serif;\n font-weight: bold;\n }\n\n dd {\n margin-left: 1em;\n font-family: $sans-serif;\n font-size: $type-size-6;\n }\n\n .small {\n font-size: $type-size-6;\n }\n\n /* blockquote citations */\n blockquote + .small {\n margin-top: -1.5em;\n padding-left: 1.25rem;\n }\n}\n\n.page__hero {\n position: relative;\n margin-bottom: 2em;\n @include clearfix;\n -webkit-animation: $intro-transition;\n animation: $intro-transition;\n -webkit-animation-delay: 0.25s;\n animation-delay: 0.25s;\n\n &--overlay {\n position: relative;\n margin-bottom: 2em;\n padding: 3em 0;\n @include clearfix;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n -webkit-animation: $intro-transition;\n animation: $intro-transition;\n -webkit-animation-delay: 0.25s;\n animation-delay: 0.25s;\n\n a {\n color: #fff;\n }\n\n .wrapper {\n padding-left: 1em;\n padding-right: 1em;\n\n @include breakpoint($x-large) {\n max-width: $x-large;\n }\n }\n\n .page__title,\n .page__meta,\n .page__lead,\n .btn {\n color: #fff;\n text-shadow: 1px 1px 4px rgba(#000, 0.5);\n }\n\n .page__lead {\n max-width: $medium;\n }\n\n .page__title {\n font-size: $type-size-2;\n\n @include breakpoint($small) {\n font-size: $type-size-1;\n }\n }\n }\n}\n\n.page__hero-image {\n width: 100%;\n height: auto;\n -ms-interpolation-mode: bicubic;\n}\n\n.page__hero-caption {\n position: absolute;\n bottom: 0;\n right: 0;\n margin: 0 auto;\n padding: 2px 5px;\n color: #fff;\n font-family: $caption-font-family;\n font-size: $type-size-7;\n background: #000;\n text-align: right;\n z-index: 5;\n opacity: 0.5;\n border-radius: $border-radius 0 0 0;\n\n @include breakpoint($large) {\n padding: 5px 10px;\n }\n\n a {\n color: #fff;\n text-decoration: none;\n }\n}\n\n/*\n Social sharing\n ========================================================================== */\n\n.page__share {\n margin-top: 2em;\n padding-top: 1em;\n border-top: 1px solid $border-color;\n\n @include breakpoint(max-width $small) {\n .btn span {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n }\n }\n}\n\n.page__share-title {\n margin-bottom: 10px;\n font-size: $type-size-6;\n text-transform: uppercase;\n}\n\n/*\n Page meta\n ========================================================================== */\n\n.page__meta {\n margin-top: 2em;\n color: $muted-text-color;\n font-family: $sans-serif;\n font-size: $type-size-6;\n\n p {\n margin: 0;\n }\n\n a {\n color: inherit;\n }\n}\n\n.page__meta-title {\n margin-bottom: 10px;\n font-size: $type-size-6;\n text-transform: uppercase;\n}\n\n.page__meta-sep::before {\n content: \"\\2022\";\n padding-left: 0.5em;\n padding-right: 0.5em;\n}\n\n/*\n Page taxonomy\n ========================================================================== */\n\n.page__taxonomy {\n .sep {\n display: none;\n }\n\n strong {\n margin-right: 10px;\n }\n}\n\n.page__taxonomy-item {\n display: inline-block;\n margin-right: 5px;\n margin-bottom: 8px;\n padding: 5px 10px;\n text-decoration: none;\n border: 1px solid mix(#000, $border-color, 25%);\n border-radius: $border-radius;\n\n &:hover {\n text-decoration: none;\n color: $link-color-hover;\n }\n}\n\n.taxonomy__section {\n margin-bottom: 2em;\n padding-bottom: 1em;\n\n &:not(:last-child) {\n border-bottom: solid 1px $border-color;\n }\n\n .archive__item-title {\n margin-top: 0;\n }\n\n .archive__subtitle {\n clear: both;\n border: 0;\n }\n\n + .taxonomy__section {\n margin-top: 2em;\n }\n}\n\n.taxonomy__title {\n margin-bottom: 0.5em;\n color: $muted-text-color;\n}\n\n.taxonomy__count {\n color: $muted-text-color;\n}\n\n.taxonomy__index {\n display: grid;\n grid-column-gap: 2em;\n grid-template-columns: repeat(2, 1fr);\n margin: 1.414em 0;\n padding: 0;\n font-size: $type-size-6;\n list-style: none;\n\n @include breakpoint($large) {\n grid-template-columns: repeat(3, 1fr);\n }\n\n a {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n padding: 0.25em 0;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n color: inherit;\n text-decoration: none;\n border-bottom: 1px solid $border-color;\n }\n}\n\n.back-to-top {\n display: block;\n clear: both;\n color: $muted-text-color;\n font-size: $type-size-8;\n text-transform: uppercase;\n text-align: right;\n text-decoration: none;\n}\n\n/*\n Comments\n ========================================================================== */\n\n.page__comments {\n float: left;\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n clear: both;\n}\n\n.page__comments-title {\n margin-top: 2rem;\n margin-bottom: 10px;\n padding-top: 2rem;\n font-size: $type-size-6;\n border-top: 1px solid $border-color;\n text-transform: uppercase;\n}\n\n.page__comments-form {\n -webkit-transition: $global-transition;\n transition: $global-transition;\n\n &.disabled {\n input,\n button,\n textarea,\n label {\n pointer-events: none;\n cursor: not-allowed;\n filter: alpha(opacity=65);\n box-shadow: none;\n opacity: 0.65;\n }\n }\n}\n\n.comment {\n @include clearfix();\n margin: 1em 0;\n\n &:not(:last-child) {\n border-bottom: 1px solid $border-color;\n }\n}\n\n.comment__avatar-wrapper {\n float: left;\n width: 60px;\n height: 60px;\n\n @include breakpoint($large) {\n width: 100px;\n height: 100px;\n }\n}\n\n.comment__avatar {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n\n @include breakpoint($large) {\n width: 80px;\n height: 80px;\n padding: 5px;\n border: 1px solid $border-color;\n }\n}\n\n.comment__content-wrapper {\n float: right;\n width: calc(100% - 60px);\n\n @include breakpoint($large) {\n width: calc(100% - 100px);\n }\n}\n\n.comment__author {\n margin: 0;\n\n a {\n text-decoration: none;\n }\n}\n\n.comment__date {\n @extend .page__meta;\n margin: 0;\n\n a {\n text-decoration: none;\n }\n}\n\n/*\n Related\n ========================================================================== */\n\n.page__related {\n @include clearfix();\n float: left;\n margin-top: 2em;\n padding-top: 1em;\n border-top: 1px solid $border-color;\n\n @include breakpoint($large) {\n float: right;\n width: calc(100% - #{$right-sidebar-width-narrow});\n }\n\n @include breakpoint($x-large) {\n width: calc(100% - #{$right-sidebar-width});\n }\n\n a {\n color: inherit;\n text-decoration: none;\n }\n}\n\n.page__related-title {\n margin-bottom: 10px;\n font-size: $type-size-6;\n text-transform: uppercase;\n}\n\n/*\n Wide Pages\n ========================================================================== */\n\n.wide {\n .page {\n @include breakpoint($large) {\n padding-right: 0;\n }\n\n @include breakpoint($x-large) {\n padding-right: 0;\n }\n }\n\n .page__related {\n @include breakpoint($large) {\n padding-right: 0;\n }\n\n @include breakpoint($x-large) {\n padding-right: 0;\n }\n }\n}","/* ==========================================================================\n ARCHIVE\n ========================================================================== */\n\n.archive {\n margin-top: 1em;\n margin-bottom: 2em;\n\n @include breakpoint($large) {\n float: right;\n width: calc(100% - #{$right-sidebar-width-narrow});\n padding-right: $right-sidebar-width-narrow;\n }\n\n @include breakpoint($x-large) {\n width: calc(100% - #{$right-sidebar-width});\n padding-right: $right-sidebar-width;\n }\n}\n\n.archive__item {\n position: relative;\n\n a {\n position: relative;\n z-index: 10;\n }\n\n a[rel=\"permalink\"] {\n position: static;\n }\n}\n\n.archive__subtitle {\n margin: 1.414em 0 0.5em;\n padding-bottom: 0.5em;\n font-size: $type-size-5;\n color: $muted-text-color;\n border-bottom: 1px solid $border-color;\n\n + .list__item .archive__item-title {\n margin-top: 0.5em;\n }\n}\n\n.archive__item-title {\n margin-bottom: 0.25em;\n font-family: $sans-serif-narrow;\n line-height: initial;\n overflow: hidden;\n text-overflow: ellipsis;\n\n a[rel=\"permalink\"]::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n }\n\n a + a {\n opacity: 0.5;\n }\n}\n\n/* remove border*/\n.page__content {\n .archive__item-title {\n margin-top: 1em;\n border-bottom: none;\n }\n}\n\n.archive__item-excerpt {\n margin-top: 0;\n font-size: $type-size-6;\n\n & + p {\n text-indent: 0;\n }\n\n a {\n position: relative;\n }\n}\n\n.archive__item-teaser {\n position: relative;\n border-radius: $border-radius;\n overflow: hidden;\n\n img {\n width: 100%;\n }\n}\n\n.archive__item-caption {\n position: absolute;\n bottom: 0;\n right: 0;\n margin: 0 auto;\n padding: 2px 5px;\n color: #fff;\n font-family: $caption-font-family;\n font-size: $type-size-8;\n background: #000;\n text-align: right;\n z-index: 5;\n opacity: 0.5;\n border-radius: $border-radius 0 0 0;\n\n @include breakpoint($large) {\n padding: 5px 10px;\n }\n\n a {\n color: #fff;\n text-decoration: none;\n }\n}\n\n/*\n List view\n ========================================================================== */\n\n.list__item {\n .page__meta {\n margin: 0 0 4px;\n font-size: 0.6em;\n }\n}\n\n/*\n Grid view\n ========================================================================== */\n\n.archive {\n .grid__wrapper {\n /* extend grid elements to the right */\n\n @include breakpoint($large) {\n margin-right: -1 * $right-sidebar-width-narrow;\n }\n\n @include breakpoint($x-large) {\n margin-right: -1 * $right-sidebar-width;\n }\n }\n}\n\n.grid__item {\n margin-bottom: 2em;\n\n @include breakpoint($small) {\n float: left;\n width: span(5 of 10);\n\n &:nth-child(2n + 1) {\n clear: both;\n margin-left: 0;\n }\n\n &:nth-child(2n + 2) {\n clear: none;\n margin-left: gutter(of 10);\n }\n }\n\n @include breakpoint($medium) {\n margin-left: 0; /* override margin*/\n margin-right: 0; /* override margin*/\n width: span(3 of 12);\n\n &:nth-child(2n + 1) {\n clear: none;\n }\n\n &:nth-child(4n + 1) {\n clear: both;\n }\n\n &:nth-child(4n + 2) {\n clear: none;\n margin-left: gutter(1 of 12);\n }\n\n &:nth-child(4n + 3) {\n clear: none;\n margin-left: gutter(1 of 12);\n }\n\n &:nth-child(4n + 4) {\n clear: none;\n margin-left: gutter(1 of 12);\n }\n }\n\n .page__meta {\n margin: 0 0 4px;\n font-size: 0.6em;\n }\n\n .page__meta-sep {\n display: block;\n\n &::before {\n display: none;\n }\n }\n\n .archive__item-title {\n margin-top: 0.5em;\n font-size: $type-size-5;\n }\n\n .archive__item-excerpt {\n display: none;\n\n @include breakpoint($medium) {\n display: block;\n font-size: $type-size-6;\n }\n }\n\n .archive__item-teaser {\n @include breakpoint($small) {\n max-height: 200px;\n }\n\n @include breakpoint($medium) {\n max-height: 120px;\n }\n }\n}\n\n/*\n Features\n ========================================================================== */\n\n.feature__wrapper {\n @include clearfix();\n margin-bottom: 2em;\n border-bottom: 1px solid $border-color;\n\n .archive__item-title {\n margin-bottom: 0;\n }\n}\n\n.feature__item {\n position: relative;\n margin-bottom: 2em;\n font-size: 1.125em;\n\n @include breakpoint($small) {\n float: left;\n margin-bottom: 0;\n width: span(4 of 12);\n\n &:nth-child(3n + 1) {\n clear: both;\n margin-left: 0;\n }\n\n &:nth-child(3n + 2) {\n clear: none;\n margin-left: gutter(of 12);\n }\n\n &:nth-child(3n + 3) {\n clear: none;\n margin-left: gutter(of 12);\n }\n\n .feature__item-teaser {\n max-height: 200px;\n overflow: hidden;\n }\n }\n\n .archive__item-body {\n padding-left: gutter(1 of 12);\n padding-right: gutter(1 of 12);\n }\n\n a.btn::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n }\n\n &--left {\n position: relative;\n float: left;\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n clear: both;\n font-size: 1.125em;\n\n .archive__item {\n float: left;\n }\n\n .archive__item-teaser {\n margin-bottom: 2em;\n }\n\n a.btn::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n }\n\n @include breakpoint($small) {\n .archive__item-teaser {\n float: left;\n width: span(5 of 12);\n }\n\n .archive__item-body {\n float: right;\n padding-left: gutter(0.5 of 12);\n padding-right: gutter(1 of 12);\n width: span(7 of 12);\n }\n }\n }\n\n &--right {\n position: relative;\n float: left;\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n clear: both;\n font-size: 1.125em;\n\n .archive__item {\n float: left;\n }\n\n .archive__item-teaser {\n margin-bottom: 2em;\n }\n\n a.btn::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n }\n\n @include breakpoint($small) {\n text-align: right;\n\n .archive__item-teaser {\n float: right;\n width: span(5 of 12);\n }\n\n .archive__item-body {\n float: left;\n width: span(7 of 12);\n padding-left: gutter(0.5 of 12);\n padding-right: gutter(1 of 12);\n }\n }\n }\n\n &--center {\n position: relative;\n float: left;\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n clear: both;\n font-size: 1.125em;\n\n .archive__item {\n float: left;\n width: 100%;\n }\n\n .archive__item-teaser {\n margin-bottom: 2em;\n }\n\n a.btn::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n }\n\n @include breakpoint($small) {\n text-align: center;\n\n .archive__item-teaser {\n margin: 0 auto;\n width: span(5 of 12);\n }\n\n .archive__item-body {\n margin: 0 auto;\n width: span(7 of 12);\n }\n }\n }\n}\n\n/* Place inside an archive layout */\n\n.archive {\n .feature__wrapper {\n .archive__item-title {\n margin-top: 0.25em;\n font-size: 1em;\n }\n }\n\n .feature__item,\n .feature__item--left,\n .feature__item--center,\n .feature__item--right {\n font-size: 1em;\n }\n}\n\n/*\n Wide Pages\n ========================================================================== */\n\n .wide {\n .archive {\n @include breakpoint($large) {\n padding-right: 0;\n }\n\n @include breakpoint($x-large) {\n padding-right: 0;\n }\n }\n}\n\n/* Place inside a single layout */\n\n.layout--single {\n\t.feature__wrapper {\n\t\tdisplay: inline-block;\n\t}\n}\n","/* ==========================================================================\n SIDEBAR\n ========================================================================== */\n\n/*\n Default\n ========================================================================== */\n\n.sidebar {\n @include clearfix();\n // @include breakpoint(max-width $large) {\n // /* fix z-index order of follow links */\n // position: relative;\n // z-index: 10;\n // -webkit-transform: translate3d(0, 0, 0);\n // transform: translate3d(0, 0, 0);\n // }\n\n @include breakpoint($large) {\n float: left;\n width: calc(#{$right-sidebar-width-narrow} - 1em);\n opacity: 0.75;\n -webkit-transition: opacity 0.2s ease-in-out;\n transition: opacity 0.2s ease-in-out;\n\n &:hover {\n opacity: 1;\n }\n\n &.sticky {\n overflow-y: auto;\n /* calculate height of nav list\n viewport height - nav height - masthead x-padding\n */\n max-height: calc(100vh - #{$nav-height} - 2em);\n }\n }\n\n @include breakpoint($x-large) {\n width: calc(#{$right-sidebar-width} - 1em);\n }\n\n > * {\n margin-top: 1em;\n margin-bottom: 1em;\n }\n\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-bottom: 0;\n font-family: $sans-serif-narrow;\n }\n\n p,\n li {\n font-family: $sans-serif;\n font-size: $type-size-6;\n line-height: 1.5;\n }\n\n img {\n width: 100%;\n\n &.emoji {\n width: 20px;\n height: 20px;\n }\n }\n}\n\n.sidebar__right {\n margin-bottom: 1em;\n\n @include breakpoint($large) {\n position: absolute;\n top: 0;\n right: 0;\n width: $right-sidebar-width-narrow;\n margin-right: -1 * $right-sidebar-width-narrow;\n padding-left: 1em;\n z-index: 10;\n\n &.sticky {\n @include clearfix();\n position: -webkit-sticky;\n position: sticky;\n top: 2em;\n float: right;\n\n .toc {\n .toc__menu {\n overflow-y: auto;\n max-height: calc(100vh - 7em);\n }\n }\n }\n }\n\n @include breakpoint($x-large) {\n width: $right-sidebar-width;\n margin-right: -1 * $right-sidebar-width;\n }\n}\n\n.splash .sidebar__right {\n @include breakpoint($large) {\n position: relative;\n float: right;\n margin-right: 0;\n }\n\n @include breakpoint($x-large) {\n margin-right: 0;\n }\n}\n\n/*\n Author profile and links\n ========================================================================== */\n\n.author__avatar {\n display: table-cell;\n vertical-align: top;\n width: 36px;\n height: 36px;\n\n @include breakpoint($large) {\n display: block;\n width: auto;\n height: auto;\n }\n\n img {\n max-width: 110px;\n border-radius: 50%;\n\n @include breakpoint($large) {\n padding: 5px;\n border: 1px solid $border-color;\n }\n }\n}\n\n.author__content {\n display: table-cell;\n vertical-align: top;\n padding-left: 15px;\n padding-right: 25px;\n line-height: 1;\n\n @include breakpoint($large) {\n display: block;\n width: 100%;\n padding-left: 0;\n padding-right: 0;\n }\n\n a {\n color: inherit;\n text-decoration: none;\n }\n}\n\n.author__name {\n margin: 0;\n\n @include breakpoint($large) {\n margin-top: 10px;\n margin-bottom: 10px;\n }\n}\n.sidebar .author__name {\n font-family: $sans-serif;\n font-size: $type-size-5;\n}\n\n.author__bio {\n margin: 0;\n\n @include breakpoint($large) {\n margin-top: 10px;\n margin-bottom: 20px;\n }\n}\n\n.author__urls-wrapper {\n position: relative;\n display: table-cell;\n vertical-align: middle;\n font-family: $sans-serif;\n z-index: 20;\n cursor: pointer;\n\n li:last-child {\n a {\n margin-bottom: 0;\n }\n }\n\n .author__urls {\n span.label {\n padding-left: 5px;\n }\n }\n\n @include breakpoint($large) {\n display: block;\n }\n\n button {\n position: relative;\n margin-bottom: 0;\n\n &:before {\n @supports (pointer-events: none) {\n content: '';\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n }\n }\n\n &.open {\n &:before {\n pointer-events: auto;\n }\n }\n\n @include breakpoint($large) {\n display: none;\n }\n }\n}\n\n.author__urls {\n display: none;\n position: absolute;\n right: 0;\n margin-top: 15px;\n padding: 10px;\n list-style-type: none;\n border: 1px solid $border-color;\n border-radius: $border-radius;\n background: $background-color;\n box-shadow: 0 2px 4px 0 rgba(#000, 0.16), 0 2px 10px 0 rgba(#000, 0.12);\n cursor: default;\n\n &.is--visible {\n display: block;\n }\n\n @include breakpoint($large) {\n display: block;\n position: relative;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n box-shadow: none;\n }\n\n &:before {\n display: block;\n content: \"\";\n position: absolute;\n top: -11px;\n left: calc(50% - 10px);\n width: 0;\n border-style: solid;\n border-width: 0 10px 10px;\n border-color: $border-color transparent;\n z-index: 0;\n\n @include breakpoint($large) {\n display: none;\n }\n }\n\n &:after {\n display: block;\n content: \"\";\n position: absolute;\n top: -10px;\n left: calc(50% - 10px);\n width: 0;\n border-style: solid;\n border-width: 0 10px 10px;\n border-color: $background-color transparent;\n z-index: 1;\n\n @include breakpoint($large) {\n display: none;\n }\n }\n\n ul {\n padding: 10px;\n list-style-type: none;\n }\n\n li {\n white-space: nowrap;\n }\n\n a {\n display: block;\n margin-bottom: 5px;\n padding-right: 5px;\n padding-top: 2px;\n padding-bottom: 2px;\n color: inherit;\n font-size: $type-size-5;\n text-decoration: none;\n\n &:hover {\n text-decoration: underline;\n }\n }\n}\n\n/*\n Wide Pages\n ========================================================================== */\n\n.wide .sidebar__right {\n margin-bottom: 1em;\n\n @include breakpoint($large) {\n position: initial;\n top: initial;\n right: initial;\n width: initial;\n margin-right: initial;\n padding-left: initial;\n z-index: initial;\n\n &.sticky {\n float: none;\n }\n }\n\n @include breakpoint($x-large) {\n width: initial;\n margin-right: initial;\n }\n}\n\n","/* ==========================================================================\n PRINT STYLES\n ========================================================================== */\n\n@media print {\n\n [hidden] {\n display: none;\n }\n\n * {\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n html {\n margin: 0;\n padding: 0;\n min-height: auto !important;\n font-size: 16px;\n }\n\n body {\n margin: 0 auto;\n background: #fff !important;\n color: #000 !important;\n font-size: 1rem;\n line-height: 1.5;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: #000;\n line-height: 1.2;\n margin-bottom: 0.75rem;\n margin-top: 0;\n }\n\n h1 {\n font-size: 2.5rem;\n }\n\n h2 {\n font-size: 2rem;\n }\n\n h3 {\n font-size: 1.75rem;\n }\n\n h4 {\n font-size: 1.5rem;\n }\n\n h5 {\n font-size: 1.25rem;\n }\n\n h6 {\n font-size: 1rem;\n }\n\n a,\n a:visited {\n color: #000;\n text-decoration: underline;\n word-wrap: break-word;\n }\n\n table {\n border-collapse: collapse;\n }\n\n thead {\n display: table-header-group;\n }\n\n table,\n th,\n td {\n border-bottom: 1px solid #000;\n }\n\n td,\n th {\n padding: 8px 16px;\n }\n\n img {\n border: 0;\n display: block;\n max-width: 100% !important;\n vertical-align: middle;\n }\n\n hr {\n border: 0;\n border-bottom: 2px solid #bbb;\n height: 0;\n margin: 2.25rem 0;\n padding: 0;\n }\n\n dt {\n font-weight: bold;\n }\n\n dd {\n margin: 0;\n margin-bottom: 0.75rem;\n }\n\n abbr[title],\n acronym[title] {\n border: 0;\n text-decoration: none;\n }\n\n table,\n blockquote,\n pre,\n code,\n figure,\n li,\n hr,\n ul,\n ol,\n a,\n tr {\n page-break-inside: avoid;\n }\n\n h2,\n h3,\n h4,\n p,\n a {\n orphans: 3;\n widows: 3;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n page-break-after: avoid;\n page-break-inside: avoid;\n }\n\n h1 + p,\n h2 + p,\n h3 + p {\n page-break-before: avoid;\n }\n\n img {\n page-break-after: auto;\n page-break-before: auto;\n page-break-inside: avoid;\n }\n\n pre {\n white-space: pre-wrap !important;\n word-wrap: break-word;\n }\n\n a[href^='http://']:after,\n a[href^='https://']:after,\n a[href^='ftp://']:after {\n content: \" (\" attr(href) \")\";\n font-size: 80%;\n }\n\n abbr[title]:after,\n acronym[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n #main {\n max-width: 100%;\n }\n\n .page {\n margin: 0;\n padding: 0;\n width: 100%;\n }\n\n .page-break,\n .page-break-before {\n page-break-before: always;\n }\n\n .page-break-after {\n page-break-after: always;\n }\n\n .no-print {\n display: none;\n }\n\n a.no-reformat:after {\n content: '';\n }\n\n abbr[title].no-reformat:after,\n acronym[title].no-reformat:after {\n content: '';\n }\n\n .page__hero-caption {\n color: #000 !important;\n background: #fff !important;\n opacity: 1;\n\n a {\n color: #000 !important;\n }\n }\n\n/*\n Hide the following elements on print\n ========================================================================== */\n\n .masthead,\n .toc,\n .page__share,\n .page__related,\n .pagination,\n .ads,\n .page__footer,\n .page__comments-form,\n .author__avatar,\n .author__content,\n .author__urls-wrapper,\n .nav__list,\n .sidebar,\n .adsbygoogle {\n display: none !important;\n height: 1px !important;\n }\n}","@charset \"utf-8\";\n\n@import \"minimal-mistakes/skins/dark\"; // skin\n@import \"minimal-mistakes\"; // main partials\n\n.page__content {\n\ttext-align: justify;\n}\n\nh2, h3 {\n\tmargin-bottom: 0px;\n\tfont-weight: bold;\n}\n\nh4 {\n\tfont-size: $h-size-5;\n\tmargin-bottom: 0px;\n\tfont-style: italic;\n}\n\nsummary {\n\tfont-size: $type-size-5;\n}\n\n.MathJax_Display {\n\tfont-size: $type-size-5;\n}\n\n.toc__menu a {\n\tfont-size: $type-size-3;\n}\n\n"],"file":"main.css"} \ No newline at end of file diff --git a/assets/images/android-chrome-192x192.png b/assets/images/android-chrome-192x192.png new file mode 100644 index 0000000..aa0295c Binary files /dev/null and b/assets/images/android-chrome-192x192.png differ diff --git a/assets/images/android-chrome-512x512.png b/assets/images/android-chrome-512x512.png new file mode 100644 index 0000000..aaa3cc5 Binary files /dev/null and b/assets/images/android-chrome-512x512.png differ diff --git a/assets/images/apple-touch-icon.png b/assets/images/apple-touch-icon.png new file mode 100644 index 0000000..b325251 Binary files /dev/null and b/assets/images/apple-touch-icon.png differ diff --git a/assets/images/browserconfig.xml b/assets/images/browserconfig.xml new file mode 100644 index 0000000..b3930d0 --- /dev/null +++ b/assets/images/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #da532c + + + diff --git a/assets/images/dotgraph.svg b/assets/images/dotgraph.svg new file mode 100644 index 0000000..0da91c5 --- /dev/null +++ b/assets/images/dotgraph.svg @@ -0,0 +1,67 @@ + + + + + + +mygraph + + + +root + +root + + + +A + +A + + + +root->A + + + + + +B + +B + + + +root->B + + + + + +A->A + + + + + +B->A + + + + + +C + +C + + + +B->C + + + + + \ No newline at end of file diff --git a/assets/images/favicon-16x16.png b/assets/images/favicon-16x16.png new file mode 100644 index 0000000..db77da7 Binary files /dev/null and b/assets/images/favicon-16x16.png differ diff --git a/assets/images/favicon-32x32.png b/assets/images/favicon-32x32.png new file mode 100644 index 0000000..97578ad Binary files /dev/null and b/assets/images/favicon-32x32.png differ diff --git a/assets/images/favicon.ico b/assets/images/favicon.ico new file mode 100644 index 0000000..e925654 Binary files /dev/null and b/assets/images/favicon.ico differ diff --git a/assets/images/mstile-150x150.png b/assets/images/mstile-150x150.png new file mode 100644 index 0000000..173dd34 Binary files /dev/null and b/assets/images/mstile-150x150.png differ diff --git a/assets/images/safari-pinned-tab.svg b/assets/images/safari-pinned-tab.svg new file mode 100644 index 0000000..14b7ffb --- /dev/null +++ b/assets/images/safari-pinned-tab.svg @@ -0,0 +1,82 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + diff --git a/assets/images/site.webmanifest b/assets/images/site.webmanifest new file mode 100644 index 0000000..b20abb7 --- /dev/null +++ b/assets/images/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "", + "short_name": "", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/assets/images/tpg00.png b/assets/images/tpg00.png new file mode 100644 index 0000000..947cbe2 Binary files /dev/null and b/assets/images/tpg00.png differ diff --git a/assets/js/lunr/lunr-en.js b/assets/js/lunr/lunr-en.js new file mode 100644 index 0000000..d1400a7 --- /dev/null +++ b/assets/js/lunr/lunr-en.js @@ -0,0 +1,69 @@ +var idx = lunr(function () { + this.field('title') + this.field('excerpt') + this.field('categories') + this.field('tags') + this.ref('id') + + this.pipeline.remove(lunr.trimmer) + + for (var item in store) { + this.add({ + title: store[item].title, + excerpt: store[item].excerpt, + categories: store[item].categories, + tags: store[item].tags, + id: item + }) + } +}); + +$(document).ready(function() { + $('input#search').on('keyup', function () { + var resultdiv = $('#results'); + var query = $(this).val().toLowerCase(); + var result = + idx.query(function (q) { + query.split(lunr.tokenizer.separator).forEach(function (term) { + q.term(term, { boost: 100 }) + if(query.lastIndexOf(" ") != query.length-1){ + q.term(term, { usePipeline: false, wildcard: lunr.Query.wildcard.TRAILING, boost: 10 }) + } + if (term != ""){ + q.term(term, { usePipeline: false, editDistance: 1, boost: 1 }) + } + }) + }); + resultdiv.empty(); + resultdiv.prepend('

'+result.length+' Result(s) found

'); + for (var item in result) { + var ref = result[item].ref; + if(store[ref].teaser){ + var searchitem = + '
'+ + '
'+ + '

'+ + ''+store[ref].title+''+ + '

'+ + '
'+ + ''+ + '
'+ + '

'+store[ref].excerpt.split(" ").splice(0,20).join(" ")+'...

'+ + '
'+ + '
'; + } + else{ + var searchitem = + '
'+ + '
'+ + '

'+ + ''+store[ref].title+''+ + '

'+ + '

'+store[ref].excerpt.split(" ").splice(0,20).join(" ")+'...

'+ + '
'+ + '
'; + } + resultdiv.append(searchitem); + } + }); +}); diff --git a/assets/js/lunr/lunr-gr.js b/assets/js/lunr/lunr-gr.js new file mode 100644 index 0000000..e829362 --- /dev/null +++ b/assets/js/lunr/lunr-gr.js @@ -0,0 +1,522 @@ +step1list = new Array(); +step1list["ΦΑΓΙΑ"] = "ΦΑ"; +step1list["ΦΑΓΙΟΥ"] = "ΦΑ"; +step1list["ΦΑΓΙΩΝ"] = "ΦΑ"; +step1list["ΣΚΑΓΙΑ"] = "ΣΚΑ"; +step1list["ΣΚΑΓΙΟΥ"] = "ΣΚΑ"; +step1list["ΣΚΑΓΙΩΝ"] = "ΣΚΑ"; +step1list["ΟΛΟΓΙΟΥ"] = "ΟΛΟ"; +step1list["ΟΛΟΓΙΑ"] = "ΟΛΟ"; +step1list["ΟΛΟΓΙΩΝ"] = "ΟΛΟ"; +step1list["ΣΟΓΙΟΥ"] = "ΣΟ"; +step1list["ΣΟΓΙΑ"] = "ΣΟ"; +step1list["ΣΟΓΙΩΝ"] = "ΣΟ"; +step1list["ΤΑΤΟΓΙΑ"] = "ΤΑΤΟ"; +step1list["ΤΑΤΟΓΙΟΥ"] = "ΤΑΤΟ"; +step1list["ΤΑΤΟΓΙΩΝ"] = "ΤΑΤΟ"; +step1list["ΚΡΕΑΣ"] = "ΚΡΕ"; +step1list["ΚΡΕΑΤΟΣ"] = "ΚΡΕ"; +step1list["ΚΡΕΑΤΑ"] = "ΚΡΕ"; +step1list["ΚΡΕΑΤΩΝ"] = "ΚΡΕ"; +step1list["ΠΕΡΑΣ"] = "ΠΕΡ"; +step1list["ΠΕΡΑΤΟΣ"] = "ΠΕΡ"; +step1list["ΠΕΡΑΤΑ"] = "ΠΕΡ"; +step1list["ΠΕΡΑΤΩΝ"] = "ΠΕΡ"; +step1list["ΤΕΡΑΣ"] = "ΤΕΡ"; +step1list["ΤΕΡΑΤΟΣ"] = "ΤΕΡ"; +step1list["ΤΕΡΑΤΑ"] = "ΤΕΡ"; +step1list["ΤΕΡΑΤΩΝ"] = "ΤΕΡ"; +step1list["ΦΩΣ"] = "ΦΩ"; +step1list["ΦΩΤΟΣ"] = "ΦΩ"; +step1list["ΦΩΤΑ"] = "ΦΩ"; +step1list["ΦΩΤΩΝ"] = "ΦΩ"; +step1list["ΚΑΘΕΣΤΩΣ"] = "ΚΑΘΕΣΤ"; +step1list["ΚΑΘΕΣΤΩΤΟΣ"] = "ΚΑΘΕΣΤ"; +step1list["ΚΑΘΕΣΤΩΤΑ"] = "ΚΑΘΕΣΤ"; +step1list["ΚΑΘΕΣΤΩΤΩΝ"] = "ΚΑΘΕΣΤ"; +step1list["ΓΕΓΟΝΟΣ"] = "ΓΕΓΟΝ"; +step1list["ΓΕΓΟΝΟΤΟΣ"] = "ΓΕΓΟΝ"; +step1list["ΓΕΓΟΝΟΤΑ"] = "ΓΕΓΟΝ"; +step1list["ΓΕΓΟΝΟΤΩΝ"] = "ΓΕΓΟΝ"; + +v = "[ΑΕΗΙΟΥΩ]"; +v2 = "[ΑΕΗΙΟΩ]" + +function stemWord(w) { + var stem; + var suffix; + var firstch; + var origword = w; + test1 = new Boolean(true); + + if(w.length < 4) { + return w; + } + + var re; + var re2; + var re3; + var re4; + + re = /(.*)(ΦΑΓΙΑ|ΦΑΓΙΟΥ|ΦΑΓΙΩΝ|ΣΚΑΓΙΑ|ΣΚΑΓΙΟΥ|ΣΚΑΓΙΩΝ|ΟΛΟΓΙΟΥ|ΟΛΟΓΙΑ|ΟΛΟΓΙΩΝ|ΣΟΓΙΟΥ|ΣΟΓΙΑ|ΣΟΓΙΩΝ|ΤΑΤΟΓΙΑ|ΤΑΤΟΓΙΟΥ|ΤΑΤΟΓΙΩΝ|ΚΡΕΑΣ|ΚΡΕΑΤΟΣ|ΚΡΕΑΤΑ|ΚΡΕΑΤΩΝ|ΠΕΡΑΣ|ΠΕΡΑΤΟΣ|ΠΕΡΑΤΑ|ΠΕΡΑΤΩΝ|ΤΕΡΑΣ|ΤΕΡΑΤΟΣ|ΤΕΡΑΤΑ|ΤΕΡΑΤΩΝ|ΦΩΣ|ΦΩΤΟΣ|ΦΩΤΑ|ΦΩΤΩΝ|ΚΑΘΕΣΤΩΣ|ΚΑΘΕΣΤΩΤΟΣ|ΚΑΘΕΣΤΩΤΑ|ΚΑΘΕΣΤΩΤΩΝ|ΓΕΓΟΝΟΣ|ΓΕΓΟΝΟΤΟΣ|ΓΕΓΟΝΟΤΑ|ΓΕΓΟΝΟΤΩΝ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + w = stem + step1list[suffix]; + test1 = false; + } + + re = /^(.+?)(ΑΔΕΣ|ΑΔΩΝ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + + reg1 = /(ΟΚ|ΜΑΜ|ΜΑΝ|ΜΠΑΜΠ|ΠΑΤΕΡ|ΓΙΑΓΙ|ΝΤΑΝΤ|ΚΥΡ|ΘΕΙ|ΠΕΘΕΡ)$/; + + if(!(reg1.test(w))) { + w = w + "ΑΔ"; + } + } + + re2 = /^(.+?)(ΕΔΕΣ|ΕΔΩΝ)$/; + + if(re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + + exept2 = /(ΟΠ|ΙΠ|ΕΜΠ|ΥΠ|ΓΗΠ|ΔΑΠ|ΚΡΑΣΠ|ΜΙΛ)$/; + + if(exept2.test(w)) { + w = w + "ΕΔ"; + } + } + + re3 = /^(.+?)(ΟΥΔΕΣ|ΟΥΔΩΝ)$/; + + if(re3.test(w)) { + var fp = re3.exec(w); + stem = fp[1]; + w = stem; + + exept3 = /(ΑΡΚ|ΚΑΛΙΑΚ|ΠΕΤΑΛ|ΛΙΧ|ΠΛΕΞ|ΣΚ|Σ|ΦΛ|ΦΡ|ΒΕΛ|ΛΟΥΛ|ΧΝ|ΣΠ|ΤΡΑΓ|ΦΕ)$/; + + if(exept3.test(w)) { + w = w + "ΟΥΔ"; + } + } + + re4 = /^(.+?)(ΕΩΣ|ΕΩΝ)$/; + + if(re4.test(w)) { + var fp = re4.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept4 = /^(Θ|Δ|ΕΛ|ΓΑΛ|Ν|Π|ΙΔ|ΠΑΡ)$/; + + if(exept4.test(w)) { + w = w + "Ε"; + } + } + + re = /^(.+?)(ΙΑ|ΙΟΥ|ΙΩΝ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + re2 = new RegExp(v + "$"); + test1 = false; + + if(re2.test(w)) { + w = stem + "Ι"; + } + } + + re = /^(.+?)(ΙΚΑ|ΙΚΟ|ΙΚΟΥ|ΙΚΩΝ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + re2 = new RegExp(v + "$"); + exept5 = /^(ΑΛ|ΑΔ|ΕΝΔ|ΑΜΑΝ|ΑΜΜΟΧΑΛ|ΗΘ|ΑΝΗΘ|ΑΝΤΙΔ|ΦΥΣ|ΒΡΩΜ|ΓΕΡ|ΕΞΩΔ|ΚΑΛΠ|ΚΑΛΛΙΝ|ΚΑΤΑΔ|ΜΟΥΛ|ΜΠΑΝ|ΜΠΑΓΙΑΤ|ΜΠΟΛ|ΜΠΟΣ|ΝΙΤ|ΞΙΚ|ΣΥΝΟΜΗΛ|ΠΕΤΣ|ΠΙΤΣ|ΠΙΚΑΝΤ|ΠΛΙΑΤΣ|ΠΟΣΤΕΛΝ|ΠΡΩΤΟΔ|ΣΕΡΤ|ΣΥΝΑΔ|ΤΣΑΜ|ΥΠΟΔ|ΦΙΛΟΝ|ΦΥΛΟΔ|ΧΑΣ)$/; + + if((exept5.test(w)) || (re2.test(w))) { + w = w + "ΙΚ"; + } + } + + re = /^(.+?)(ΑΜΕ)$/; + re2 = /^(.+?)(ΑΓΑΜΕ|ΗΣΑΜΕ|ΟΥΣΑΜΕ|ΗΚΑΜΕ|ΗΘΗΚΑΜΕ)$/; + if(w == "ΑΓΑΜΕ") { + w = "ΑΓΑΜ"; + } + + if(re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + } + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept6 = /^(ΑΝΑΠ|ΑΠΟΘ|ΑΠΟΚ|ΑΠΟΣΤ|ΒΟΥΒ|ΞΕΘ|ΟΥΛ|ΠΕΘ|ΠΙΚΡ|ΠΟΤ|ΣΙΧ|Χ)$/; + + if(exept6.test(w)) { + w = w + "ΑΜ"; + } + } + + re2 = /^(.+?)(ΑΝΕ)$/; + re3 = /^(.+?)(ΑΓΑΝΕ|ΗΣΑΝΕ|ΟΥΣΑΝΕ|ΙΟΝΤΑΝΕ|ΙΟΤΑΝΕ|ΙΟΥΝΤΑΝΕ|ΟΝΤΑΝΕ|ΟΤΑΝΕ|ΟΥΝΤΑΝΕ|ΗΚΑΝΕ|ΗΘΗΚΑΝΕ)$/; + + if(re3.test(w)) { + var fp = re3.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + re3 = /^(ΤΡ|ΤΣ)$/; + + if(re3.test(w)) { + w = w + "ΑΓΑΝ"; + } + } + + if(re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + re2 = new RegExp(v2 + "$"); + exept7 = /^(ΒΕΤΕΡ|ΒΟΥΛΚ|ΒΡΑΧΜ|Γ|ΔΡΑΔΟΥΜ|Θ|ΚΑΛΠΟΥΖ|ΚΑΣΤΕΛ|ΚΟΡΜΟΡ|ΛΑΟΠΛ|ΜΩΑΜΕΘ|Μ|ΜΟΥΣΟΥΛΜ|Ν|ΟΥΛ|Π|ΠΕΛΕΚ|ΠΛ|ΠΟΛΙΣ|ΠΟΡΤΟΛ|ΣΑΡΑΚΑΤΣ|ΣΟΥΛΤ|ΤΣΑΡΛΑΤ|ΟΡΦ|ΤΣΙΓΓ|ΤΣΟΠ|ΦΩΤΟΣΤΕΦ|Χ|ΨΥΧΟΠΛ|ΑΓ|ΟΡΦ|ΓΑΛ|ΓΕΡ|ΔΕΚ|ΔΙΠΛ|ΑΜΕΡΙΚΑΝ|ΟΥΡ|ΠΙΘ|ΠΟΥΡΙΤ|Σ|ΖΩΝΤ|ΙΚ|ΚΑΣΤ|ΚΟΠ|ΛΙΧ|ΛΟΥΘΗΡ|ΜΑΙΝΤ|ΜΕΛ|ΣΙΓ|ΣΠ|ΣΤΕΓ|ΤΡΑΓ|ΤΣΑΓ|Φ|ΕΡ|ΑΔΑΠ|ΑΘΙΓΓ|ΑΜΗΧ|ΑΝΙΚ|ΑΝΟΡΓ|ΑΠΗΓ|ΑΠΙΘ|ΑΤΣΙΓΓ|ΒΑΣ|ΒΑΣΚ|ΒΑΘΥΓΑΛ|ΒΙΟΜΗΧ|ΒΡΑΧΥΚ|ΔΙΑΤ|ΔΙΑΦ|ΕΝΟΡΓ|ΘΥΣ|ΚΑΠΝΟΒΙΟΜΗΧ|ΚΑΤΑΓΑΛ|ΚΛΙΒ|ΚΟΙΛΑΡΦ|ΛΙΒ|ΜΕΓΛΟΒΙΟΜΗΧ|ΜΙΚΡΟΒΙΟΜΗΧ|ΝΤΑΒ|ΞΗΡΟΚΛΙΒ|ΟΛΙΓΟΔΑΜ|ΟΛΟΓΑΛ|ΠΕΝΤΑΡΦ|ΠΕΡΗΦ|ΠΕΡΙΤΡ|ΠΛΑΤ|ΠΟΛΥΔΑΠ|ΠΟΛΥΜΗΧ|ΣΤΕΦ|ΤΑΒ|ΤΕΤ|ΥΠΕΡΗΦ|ΥΠΟΚΟΠ|ΧΑΜΗΛΟΔΑΠ|ΨΗΛΟΤΑΒ)$/; + + if((re2.test(w)) || (exept7.test(w))) { + w = w + "ΑΝ"; + } + } + + re3 = /^(.+?)(ΕΤΕ)$/; + re4 = /^(.+?)(ΗΣΕΤΕ)$/; + + if(re4.test(w)) { + var fp = re4.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + } + + if(re3.test(w)) { + var fp = re3.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + re3 = new RegExp(v2 + "$"); + exept8 = /(ΟΔ|ΑΙΡ|ΦΟΡ|ΤΑΘ|ΔΙΑΘ|ΣΧ|ΕΝΔ|ΕΥΡ|ΤΙΘ|ΥΠΕΡΘ|ΡΑΘ|ΕΝΘ|ΡΟΘ|ΣΘ|ΠΥΡ|ΑΙΝ|ΣΥΝΔ|ΣΥΝ|ΣΥΝΘ|ΧΩΡ|ΠΟΝ|ΒΡ|ΚΑΘ|ΕΥΘ|ΕΚΘ|ΝΕΤ|ΡΟΝ|ΑΡΚ|ΒΑΡ|ΒΟΛ|ΩΦΕΛ)$/; + exept9 = /^(ΑΒΑΡ|ΒΕΝ|ΕΝΑΡ|ΑΒΡ|ΑΔ|ΑΘ|ΑΝ|ΑΠΛ|ΒΑΡΟΝ|ΝΤΡ|ΣΚ|ΚΟΠ|ΜΠΟΡ|ΝΙΦ|ΠΑΓ|ΠΑΡΑΚΑΛ|ΣΕΡΠ|ΣΚΕΛ|ΣΥΡΦ|ΤΟΚ|Υ|Δ|ΕΜ|ΘΑΡΡ|Θ)$/; + + if((re3.test(w)) || (exept8.test(w)) || (exept9.test(w))) { + w = w + "ΕΤ"; + } + } + + re = /^(.+?)(ΟΝΤΑΣ|ΩΝΤΑΣ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept10 = /^(ΑΡΧ)$/; + exept11 = /(ΚΡΕ)$/; + if(exept10.test(w)) { + w = w + "ΟΝΤ"; + } + if(exept11.test(w)) { + w = w + "ΩΝΤ"; + } + } + + re = /^(.+?)(ΟΜΑΣΤΕ|ΙΟΜΑΣΤΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept11 = /^(ΟΝ)$/; + + if(exept11.test(w)) { + w = w + "ΟΜΑΣΤ"; + } + } + + re = /^(.+?)(ΕΣΤΕ)$/; + re2 = /^(.+?)(ΙΕΣΤΕ)$/; + + if(re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + re2 = /^(Π|ΑΠ|ΣΥΜΠ|ΑΣΥΜΠ|ΑΚΑΤΑΠ|ΑΜΕΤΑΜΦ)$/; + + if(re2.test(w)) { + w = w + "ΙΕΣΤ"; + } + } + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept12 = /^(ΑΛ|ΑΡ|ΕΚΤΕΛ|Ζ|Μ|Ξ|ΠΑΡΑΚΑΛ|ΑΡ|ΠΡΟ|ΝΙΣ)$/; + + if(exept12.test(w)) { + w = w + "ΕΣΤ"; + } + } + + re = /^(.+?)(ΗΚΑ|ΗΚΕΣ|ΗΚΕ)$/; + re2 = /^(.+?)(ΗΘΗΚΑ|ΗΘΗΚΕΣ|ΗΘΗΚΕ)$/; + + if(re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + } + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept13 = /(ΣΚΩΛ|ΣΚΟΥΛ|ΝΑΡΘ|ΣΦ|ΟΘ|ΠΙΘ)$/; + exept14 = /^(ΔΙΑΘ|Θ|ΠΑΡΑΚΑΤΑΘ|ΠΡΟΣΘ|ΣΥΝΘ|)$/; + + if((exept13.test(w)) || (exept14.test(w))) { + w = w + "ΗΚ"; + } + } + + re = /^(.+?)(ΟΥΣΑ|ΟΥΣΕΣ|ΟΥΣΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept15 = /^(ΦΑΡΜΑΚ|ΧΑΔ|ΑΓΚ|ΑΝΑΡΡ|ΒΡΟΜ|ΕΚΛΙΠ|ΛΑΜΠΙΔ|ΛΕΧ|Μ|ΠΑΤ|Ρ|Λ|ΜΕΔ|ΜΕΣΑΖ|ΥΠΟΤΕΙΝ|ΑΜ|ΑΙΘ|ΑΝΗΚ|ΔΕΣΠΟΖ|ΕΝΔΙΑΦΕΡ|ΔΕ|ΔΕΥΤΕΡΕΥ|ΚΑΘΑΡΕΥ|ΠΛΕ|ΤΣΑ)$/; + exept16 = /(ΠΟΔΑΡ|ΒΛΕΠ|ΠΑΝΤΑΧ|ΦΡΥΔ|ΜΑΝΤΙΛ|ΜΑΛΛ|ΚΥΜΑΤ|ΛΑΧ|ΛΗΓ|ΦΑΓ|ΟΜ|ΠΡΩΤ)$/; + + if((exept15.test(w)) || (exept16.test(w))) { + w = w + "ΟΥΣ"; + } + } + + re = /^(.+?)(ΑΓΑ|ΑΓΕΣ|ΑΓΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept17 = /^(ΨΟΦ|ΝΑΥΛΟΧ)$/; + exept20 = /(ΚΟΛΛ)$/; + exept18 = /^(ΑΒΑΣΤ|ΠΟΛΥΦ|ΑΔΗΦ|ΠΑΜΦ|Ρ|ΑΣΠ|ΑΦ|ΑΜΑΛ|ΑΜΑΛΛΙ|ΑΝΥΣΤ|ΑΠΕΡ|ΑΣΠΑΡ|ΑΧΑΡ|ΔΕΡΒΕΝ|ΔΡΟΣΟΠ|ΞΕΦ|ΝΕΟΠ|ΝΟΜΟΤ|ΟΛΟΠ|ΟΜΟΤ|ΠΡΟΣΤ|ΠΡΟΣΩΠΟΠ|ΣΥΜΠ|ΣΥΝΤ|Τ|ΥΠΟΤ|ΧΑΡ|ΑΕΙΠ|ΑΙΜΟΣΤ|ΑΝΥΠ|ΑΠΟΤ|ΑΡΤΙΠ|ΔΙΑΤ|ΕΝ|ΕΠΙΤ|ΚΡΟΚΑΛΟΠ|ΣΙΔΗΡΟΠ|Λ|ΝΑΥ|ΟΥΛΑΜ|ΟΥΡ|Π|ΤΡ|Μ)$/; + exept19 = /(ΟΦ|ΠΕΛ|ΧΟΡΤ|ΛΛ|ΣΦ|ΡΠ|ΦΡ|ΠΡ|ΛΟΧ|ΣΜΗΝ)$/; + + if(((exept18.test(w)) || (exept19.test(w))) && !((exept17.test(w)) || (exept20.test(w)))) { + w = w + "ΑΓ"; + } + } + + re = /^(.+?)(ΗΣΕ|ΗΣΟΥ|ΗΣΑ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept21 = /^(Ν|ΧΕΡΣΟΝ|ΔΩΔΕΚΑΝ|ΕΡΗΜΟΝ|ΜΕΓΑΛΟΝ|ΕΠΤΑΝ)$/; + + if(exept21.test(w)) { + w = w + "ΗΣ"; + } + } + + re = /^(.+?)(ΗΣΤΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept22 = /^(ΑΣΒ|ΣΒ|ΑΧΡ|ΧΡ|ΑΠΛ|ΑΕΙΜΝ|ΔΥΣΧΡ|ΕΥΧΡ|ΚΟΙΝΟΧΡ|ΠΑΛΙΜΨ)$/; + + if(exept22.test(w)) { + w = w + "ΗΣΤ"; + } + } + + re = /^(.+?)(ΟΥΝΕ|ΗΣΟΥΝΕ|ΗΘΟΥΝΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept23 = /^(Ν|Ρ|ΣΠΙ|ΣΤΡΑΒΟΜΟΥΤΣ|ΚΑΚΟΜΟΥΤΣ|ΕΞΩΝ)$/; + + if(exept23.test(w)) { + w = w + "ΟΥΝ"; + } + } + + re = /^(.+?)(ΟΥΜΕ|ΗΣΟΥΜΕ|ΗΘΟΥΜΕ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + test1 = false; + + exept24 = /^(ΠΑΡΑΣΟΥΣ|Φ|Χ|ΩΡΙΟΠΛ|ΑΖ|ΑΛΛΟΣΟΥΣ|ΑΣΟΥΣ)$/; + + if(exept24.test(w)) { + w = w + "ΟΥΜ"; + } + } + + re = /^(.+?)(ΜΑΤΑ|ΜΑΤΩΝ|ΜΑΤΟΣ)$/; + re2 = /^(.+?)(Α|ΑΓΑΤΕ|ΑΓΑΝ|ΑΕΙ|ΑΜΑΙ|ΑΝ|ΑΣ|ΑΣΑΙ|ΑΤΑΙ|ΑΩ|Ε|ΕΙ|ΕΙΣ|ΕΙΤΕ|ΕΣΑΙ|ΕΣ|ΕΤΑΙ|Ι|ΙΕΜΑΙ|ΙΕΜΑΣΤΕ|ΙΕΤΑΙ|ΙΕΣΑΙ|ΙΕΣΑΣΤΕ|ΙΟΜΑΣΤΑΝ|ΙΟΜΟΥΝ|ΙΟΜΟΥΝΑ|ΙΟΝΤΑΝ|ΙΟΝΤΟΥΣΑΝ|ΙΟΣΑΣΤΑΝ|ΙΟΣΑΣΤΕ|ΙΟΣΟΥΝ|ΙΟΣΟΥΝΑ|ΙΟΤΑΝ|ΙΟΥΜΑ|ΙΟΥΜΑΣΤΕ|ΙΟΥΝΤΑΙ|ΙΟΥΝΤΑΝ|Η|ΗΔΕΣ|ΗΔΩΝ|ΗΘΕΙ|ΗΘΕΙΣ|ΗΘΕΙΤΕ|ΗΘΗΚΑΤΕ|ΗΘΗΚΑΝ|ΗΘΟΥΝ|ΗΘΩ|ΗΚΑΤΕ|ΗΚΑΝ|ΗΣ|ΗΣΑΝ|ΗΣΑΤΕ|ΗΣΕΙ|ΗΣΕΣ|ΗΣΟΥΝ|ΗΣΩ|Ο|ΟΙ|ΟΜΑΙ|ΟΜΑΣΤΑΝ|ΟΜΟΥΝ|ΟΜΟΥΝΑ|ΟΝΤΑΙ|ΟΝΤΑΝ|ΟΝΤΟΥΣΑΝ|ΟΣ|ΟΣΑΣΤΑΝ|ΟΣΑΣΤΕ|ΟΣΟΥΝ|ΟΣΟΥΝΑ|ΟΤΑΝ|ΟΥ|ΟΥΜΑΙ|ΟΥΜΑΣΤΕ|ΟΥΝ|ΟΥΝΤΑΙ|ΟΥΝΤΑΝ|ΟΥΣ|ΟΥΣΑΝ|ΟΥΣΑΤΕ|Υ|ΥΣ|Ω|ΩΝ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem + "ΜΑ"; + } + + if((re2.test(w)) && (test1)) { + var fp = re2.exec(w); + stem = fp[1]; + w = stem; + + } + + re = /^(.+?)(ΕΣΤΕΡ|ΕΣΤΑΤ|ΟΤΕΡ|ΟΤΑΤ|ΥΤΕΡ|ΥΤΑΤ|ΩΤΕΡ|ΩΤΑΤ)$/; + + if(re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + w = stem; + } + + return w; +}; + +var greekStemmer = function (token) { + return token.update(function (word) { + return stemWord(word); + }) +} + +var idx = lunr(function () { + this.field('title') + this.field('excerpt') + this.field('categories') + this.field('tags') + this.ref('id') + + this.pipeline.remove(lunr.trimmer) + this.pipeline.add(greekStemmer) + this.pipeline.remove(lunr.stemmer) + + for (var item in store) { + this.add({ + title: store[item].title, + excerpt: store[item].excerpt, + categories: store[item].categories, + tags: store[item].tags, + id: item + }) + } +}); + +$(document).ready(function() { + $('input#search').on('keyup', function () { + var resultdiv = $('#results'); + var query = $(this).val().toLowerCase(); + var result = + idx.query(function (q) { + query.split(lunr.tokenizer.separator).forEach(function (term) { + q.term(term, { boost: 100 }) + if(query.lastIndexOf(" ") != query.length-1){ + q.term(term, { usePipeline: false, wildcard: lunr.Query.wildcard.TRAILING, boost: 10 }) + } + if (term != ""){ + q.term(term, { usePipeline: false, editDistance: 1, boost: 1 }) + } + }) + }); + resultdiv.empty(); + resultdiv.prepend('

'+result.length+' Result(s) found

'); + for (var item in result) { + var ref = result[item].ref; + if(store[ref].teaser){ + var searchitem = + '
'+ + '
'+ + '

'+ + ''+store[ref].title+''+ + '

'+ + '
'+ + ''+ + '
'+ + '

'+store[ref].excerpt.split(" ").splice(0,20).join(" ")+'...

'+ + '
'+ + '
'; + } + else{ + var searchitem = + '
'+ + '
'+ + '

'+ + ''+store[ref].title+''+ + '

'+ + '

'+store[ref].excerpt.split(" ").splice(0,20).join(" ")+'...

'+ + '
'+ + '
'; + } + resultdiv.append(searchitem); + } + }); +}); diff --git a/assets/js/lunr/lunr-store.js b/assets/js/lunr/lunr-store.js new file mode 100644 index 0000000..c8b8129 --- /dev/null +++ b/assets/js/lunr/lunr-store.js @@ -0,0 +1 @@ +var store = [] diff --git a/assets/js/lunr/lunr.js b/assets/js/lunr/lunr.js new file mode 100644 index 0000000..6aa370f --- /dev/null +++ b/assets/js/lunr/lunr.js @@ -0,0 +1,3475 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + */ + +;(function(){ + +/** + * A convenience function for configuring and constructing + * a new lunr Index. + * + * A lunr.Builder instance is created and the pipeline setup + * with a trimmer, stop word filter and stemmer. + * + * This builder object is yielded to the configuration function + * that is passed as a parameter, allowing the list of fields + * and other builder parameters to be customised. + * + * All documents _must_ be added within the passed config function. + * + * @example + * var idx = lunr(function () { + * this.field('title') + * this.field('body') + * this.ref('id') + * + * documents.forEach(function (doc) { + * this.add(doc) + * }, this) + * }) + * + * @see {@link lunr.Builder} + * @see {@link lunr.Pipeline} + * @see {@link lunr.trimmer} + * @see {@link lunr.stopWordFilter} + * @see {@link lunr.stemmer} + * @namespace {function} lunr + */ +var lunr = function (config) { + var builder = new lunr.Builder + + builder.pipeline.add( + lunr.trimmer, + lunr.stopWordFilter, + lunr.stemmer + ) + + builder.searchPipeline.add( + lunr.stemmer + ) + + config.call(builder, builder) + return builder.build() +} + +lunr.version = "2.3.9" +/*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + */ + +/** + * A namespace containing utils for the rest of the lunr library + * @namespace lunr.utils + */ +lunr.utils = {} + +/** + * Print a warning message to the console. + * + * @param {String} message The message to be printed. + * @memberOf lunr.utils + * @function + */ +lunr.utils.warn = (function (global) { + /* eslint-disable no-console */ + return function (message) { + if (global.console && console.warn) { + console.warn(message) + } + } + /* eslint-enable no-console */ +})(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 lunr.utils + */ +lunr.utils.asString = function (obj) { + if (obj === void 0 || obj === null) { + return "" + } else { + return obj.toString() + } +} + +/** + * Clones an object. + * + * Will create a copy of an existing object such that any mutations + * on the copy cannot affect the original. + * + * Only shallow objects are supported, passing a nested object to this + * function will cause a TypeError. + * + * Objects with primitives, and arrays of primitives are supported. + * + * @param {Object} obj The object to clone. + * @return {Object} a clone of the passed object. + * @throws {TypeError} when a nested object is passed. + * @memberOf Utils + */ +lunr.utils.clone = function (obj) { + if (obj === null || obj === undefined) { + return obj + } + + var clone = Object.create(null), + keys = Object.keys(obj) + + for (var i = 0; i < keys.length; i++) { + var key = keys[i], + val = obj[key] + + if (Array.isArray(val)) { + clone[key] = val.slice() + continue + } + + if (typeof val === 'string' || + typeof val === 'number' || + typeof val === 'boolean') { + clone[key] = val + continue + } + + throw new TypeError("clone is not deep and does not support nested objects") + } + + return clone +} +lunr.FieldRef = function (docRef, fieldName, stringValue) { + this.docRef = docRef + this.fieldName = fieldName + this._stringValue = stringValue +} + +lunr.FieldRef.joiner = "/" + +lunr.FieldRef.fromString = function (s) { + var n = s.indexOf(lunr.FieldRef.joiner) + + if (n === -1) { + throw "malformed field ref string" + } + + var fieldRef = s.slice(0, n), + docRef = s.slice(n + 1) + + return new lunr.FieldRef (docRef, fieldRef, s) +} + +lunr.FieldRef.prototype.toString = function () { + if (this._stringValue == undefined) { + this._stringValue = this.fieldName + lunr.FieldRef.joiner + this.docRef + } + + return this._stringValue +} +/*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + */ + +/** + * A lunr set. + * + * @constructor + */ +lunr.Set = function (elements) { + this.elements = Object.create(null) + + if (elements) { + this.length = elements.length + + for (var i = 0; i < this.length; i++) { + this.elements[elements[i]] = true + } + } else { + this.length = 0 + } +} + +/** + * A complete set that contains all elements. + * + * @static + * @readonly + * @type {lunr.Set} + */ +lunr.Set.complete = { + intersect: function (other) { + return other + }, + + union: function () { + return this + }, + + contains: function () { + return true + } +} + +/** + * An empty set that contains no elements. + * + * @static + * @readonly + * @type {lunr.Set} + */ +lunr.Set.empty = { + intersect: function () { + return this + }, + + union: function (other) { + return other + }, + + contains: function () { + return false + } +} + +/** + * Returns true if this set contains the specified object. + * + * @param {object} object - Object whose presence in this set is to be tested. + * @returns {boolean} - True if this set contains the specified object. + */ +lunr.Set.prototype.contains = function (object) { + return !!this.elements[object] +} + +/** + * Returns a new set containing only the elements that are present in both + * this set and the specified set. + * + * @param {lunr.Set} other - set to intersect with this set. + * @returns {lunr.Set} a new set that is the intersection of this and the specified set. + */ + +lunr.Set.prototype.intersect = function (other) { + var a, b, elements, intersection = [] + + if (other === lunr.Set.complete) { + return this + } + + if (other === lunr.Set.empty) { + return other + } + + if (this.length < other.length) { + a = this + b = other + } else { + a = other + b = this + } + + elements = Object.keys(a.elements) + + for (var i = 0; i < elements.length; i++) { + var element = elements[i] + if (element in b.elements) { + intersection.push(element) + } + } + + return new lunr.Set (intersection) +} + +/** + * Returns a new set combining the elements of this and the specified set. + * + * @param {lunr.Set} other - set to union with this set. + * @return {lunr.Set} a new set that is the union of this and the specified set. + */ + +lunr.Set.prototype.union = function (other) { + if (other === lunr.Set.complete) { + return lunr.Set.complete + } + + if (other === lunr.Set.empty) { + return this + } + + return new lunr.Set(Object.keys(this.elements).concat(Object.keys(other.elements))) +} +/** + * A function to calculate the inverse document frequency for + * a posting. This is shared between the builder and the index + * + * @private + * @param {object} posting - The posting for a given term + * @param {number} documentCount - The total number of documents. + */ +lunr.idf = function (posting, documentCount) { + var documentsWithTerm = 0 + + for (var fieldName in posting) { + if (fieldName == '_index') continue // Ignore the term index, its not a field + documentsWithTerm += Object.keys(posting[fieldName]).length + } + + var x = (documentCount - documentsWithTerm + 0.5) / (documentsWithTerm + 0.5) + + return Math.log(1 + Math.abs(x)) +} + +/** + * A token wraps a string representation of a token + * as it is passed through the text processing pipeline. + * + * @constructor + * @param {string} [str=''] - The string token being wrapped. + * @param {object} [metadata={}] - Metadata associated with this token. + */ +lunr.Token = function (str, metadata) { + this.str = str || "" + this.metadata = metadata || {} +} + +/** + * Returns the token string that is being wrapped by this object. + * + * @returns {string} + */ +lunr.Token.prototype.toString = function () { + return this.str +} + +/** + * A token update function is used when updating or optionally + * when cloning a token. + * + * @callback lunr.Token~updateFunction + * @param {string} str - The string representation of the token. + * @param {Object} metadata - All metadata associated with this token. + */ + +/** + * Applies the given function to the wrapped string token. + * + * @example + * token.update(function (str, metadata) { + * return str.toUpperCase() + * }) + * + * @param {lunr.Token~updateFunction} fn - A function to apply to the token string. + * @returns {lunr.Token} + */ +lunr.Token.prototype.update = function (fn) { + this.str = fn(this.str, this.metadata) + return this +} + +/** + * Creates a clone of this token. Optionally a function can be + * applied to the cloned token. + * + * @param {lunr.Token~updateFunction} [fn] - An optional function to apply to the cloned token. + * @returns {lunr.Token} + */ +lunr.Token.prototype.clone = function (fn) { + fn = fn || function (s) { return s } + return new lunr.Token (fn(this.str, this.metadata), this.metadata) +} +/*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + */ + +/** + * A function for splitting a string into tokens ready to be inserted into + * the search index. Uses `lunr.tokenizer.separator` to split strings, change + * the value of this property to change how strings are split into tokens. + * + * This tokenizer will convert its parameter to a string by calling `toString` and + * then will split this string on the character in `lunr.tokenizer.separator`. + * Arrays will have their elements converted to strings and wrapped in a lunr.Token. + * + * Optional metadata can be passed to the tokenizer, this metadata will be cloned and + * added as metadata to every token that is created from the object to be tokenized. + * + * @static + * @param {?(string|object|object[])} obj - The object to convert into tokens + * @param {?object} metadata - Optional metadata to associate with every token + * @returns {lunr.Token[]} + * @see {@link lunr.Pipeline} + */ +lunr.tokenizer = function (obj, metadata) { + if (obj == null || obj == undefined) { + return [] + } + + if (Array.isArray(obj)) { + return obj.map(function (t) { + return new lunr.Token( + lunr.utils.asString(t).toLowerCase(), + lunr.utils.clone(metadata) + ) + }) + } + + var str = obj.toString().toLowerCase(), + len = str.length, + tokens = [] + + for (var sliceEnd = 0, sliceStart = 0; sliceEnd <= len; sliceEnd++) { + var char = str.charAt(sliceEnd), + sliceLength = sliceEnd - sliceStart + + if ((char.match(lunr.tokenizer.separator) || sliceEnd == len)) { + + if (sliceLength > 0) { + var tokenMetadata = lunr.utils.clone(metadata) || {} + tokenMetadata["position"] = [sliceStart, sliceLength] + tokenMetadata["index"] = tokens.length + + tokens.push( + new lunr.Token ( + str.slice(sliceStart, sliceEnd), + tokenMetadata + ) + ) + } + + sliceStart = sliceEnd + 1 + } + + } + + return tokens +} + +/** + * The separator 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.separator = /[\s\-]+/ +/*! + * lunr.Pipeline + * Copyright (C) 2020 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 = Object.create(null) + +/** + * A pipeline function maps lunr.Token to lunr.Token. A lunr.Token contains the token + * string as well as all known metadata. A pipeline function can mutate the token string + * or mutate (or add) metadata for a given token. + * + * A pipeline function can indicate that the passed token should be discarded by returning + * null, undefined or an empty string. This token will not be passed to any downstream pipeline + * functions and will not be added to the index. + * + * Multiple tokens can be returned by returning an array of tokens. Each token will be passed + * to any downstream pipeline functions and all will returned tokens will be added to the index. + * + * Any number of pipeline functions may be chained together using a lunr.Pipeline. + * + * @interface lunr.PipelineFunction + * @param {lunr.Token} token - A token from the document being processed. + * @param {number} i - The index of this token in the complete list of tokens for this document/field. + * @param {lunr.Token[]} tokens - All tokens for this document/field. + * @returns {(?lunr.Token|lunr.Token[])} + */ + +/** + * 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 {lunr.PipelineFunction} fn - The function to check for. + * @param {String} label - The label to register this function with + */ +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 {lunr.PipelineFunction} fn - The function to check for. + * @private + */ +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} + */ +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 unregistered function: ' + fnName) + } + }) + + return pipeline +} + +/** + * Adds new functions to the end of the pipeline. + * + * Logs a warning if the function has not been registered. + * + * @param {lunr.PipelineFunction[]} functions - Any number of functions to add to the 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 {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline. + * @param {lunr.PipelineFunction} newFn - The new function to add to the 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 {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline. + * @param {lunr.PipelineFunction} newFn - The new function to add to the 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 {lunr.PipelineFunction} fn The function to remove from the 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} + */ +lunr.Pipeline.prototype.run = function (tokens) { + var stackLength = this._stack.length + + for (var i = 0; i < stackLength; i++) { + var fn = this._stack[i] + var memo = [] + + for (var j = 0; j < tokens.length; j++) { + var result = fn(tokens[j], j, tokens) + + if (result === null || result === void 0 || result === '') continue + + if (Array.isArray(result)) { + for (var k = 0; k < result.length; k++) { + memo.push(result[k]) + } + } else { + memo.push(result) + } + } + + tokens = memo + } + + return tokens +} + +/** + * Convenience method for passing a string through a pipeline and getting + * strings out. This method takes care of wrapping the passed string in a + * token and mapping the resulting tokens back to strings. + * + * @param {string} str - The string to pass through the pipeline. + * @param {?object} metadata - Optional metadata to associate with the token + * passed to the pipeline. + * @returns {string[]} + */ +lunr.Pipeline.prototype.runString = function (str, metadata) { + var token = new lunr.Token (str, metadata) + + return this.run([token]).map(function (t) { + return t.toString() + }) +} + +/** + * Resets the pipeline by removing any existing processors. + * + */ +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} + */ +lunr.Pipeline.prototype.toJSON = function () { + return this._stack.map(function (fn) { + lunr.Pipeline.warnIfFunctionNotRegistered(fn) + + return fn.label + }) +} +/*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + */ + +/** + * A vector is used to construct the vector space of documents and queries. These + * vectors support operations to determine the similarity between two documents or + * a document and a query. + * + * Normally no parameters are required for initializing a vector, but in the case of + * loading a previously dumped vector the raw elements can be provided to the constructor. + * + * For performance reasons vectors are implemented with a flat array, where an elements + * index is immediately followed by its value. E.g. [index, value, index, value]. This + * allows the underlying array to be as sparse as possible and still offer decent + * performance when being used for vector calculations. + * + * @constructor + * @param {Number[]} [elements] - The flat list of element index and element value pairs. + */ +lunr.Vector = function (elements) { + this._magnitude = 0 + this.elements = elements || [] +} + + +/** + * Calculates the position within the vector to insert a given index. + * + * This is used internally by insert and upsert. If there are duplicate indexes then + * the position is returned as if the value for that index were to be updated, but it + * is the callers responsibility to check whether there is a duplicate at that index + * + * @param {Number} insertIdx - The index at which the element should be inserted. + * @returns {Number} + */ +lunr.Vector.prototype.positionForIndex = function (index) { + // For an empty vector the tuple can be inserted at the beginning + if (this.elements.length == 0) { + return 0 + } + + var start = 0, + end = this.elements.length / 2, + sliceLength = end - start, + pivotPoint = Math.floor(sliceLength / 2), + pivotIndex = this.elements[pivotPoint * 2] + + while (sliceLength > 1) { + if (pivotIndex < index) { + start = pivotPoint + } + + if (pivotIndex > index) { + end = pivotPoint + } + + if (pivotIndex == index) { + break + } + + sliceLength = end - start + pivotPoint = start + Math.floor(sliceLength / 2) + pivotIndex = this.elements[pivotPoint * 2] + } + + if (pivotIndex == index) { + return pivotPoint * 2 + } + + if (pivotIndex > index) { + return pivotPoint * 2 + } + + if (pivotIndex < index) { + return (pivotPoint + 1) * 2 + } +} + +/** + * Inserts an element at an index within the vector. + * + * Does not allow duplicates, will throw an error if there is already an entry + * for this index. + * + * @param {Number} insertIdx - The index at which the element should be inserted. + * @param {Number} val - The value to be inserted into the vector. + */ +lunr.Vector.prototype.insert = function (insertIdx, val) { + this.upsert(insertIdx, val, function () { + throw "duplicate index" + }) +} + +/** + * Inserts or updates an existing index within the vector. + * + * @param {Number} insertIdx - The index at which the element should be inserted. + * @param {Number} val - The value to be inserted into the vector. + * @param {function} fn - A function that is called for updates, the existing value and the + * requested value are passed as arguments + */ +lunr.Vector.prototype.upsert = function (insertIdx, val, fn) { + this._magnitude = 0 + var position = this.positionForIndex(insertIdx) + + if (this.elements[position] == insertIdx) { + this.elements[position + 1] = fn(this.elements[position + 1], val) + } else { + this.elements.splice(position, 0, insertIdx, val) + } +} + +/** + * Calculates the magnitude of this vector. + * + * @returns {Number} + */ +lunr.Vector.prototype.magnitude = function () { + if (this._magnitude) return this._magnitude + + var sumOfSquares = 0, + elementsLength = this.elements.length + + for (var i = 1; i < elementsLength; i += 2) { + var val = this.elements[i] + sumOfSquares += val * val + } + + 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} + */ +lunr.Vector.prototype.dot = function (otherVector) { + var dotProduct = 0, + a = this.elements, b = otherVector.elements, + aLen = a.length, bLen = b.length, + aVal = 0, bVal = 0, + i = 0, j = 0 + + while (i < aLen && j < bLen) { + aVal = a[i], bVal = b[j] + if (aVal < bVal) { + i += 2 + } else if (aVal > bVal) { + j += 2 + } else if (aVal == bVal) { + dotProduct += a[i + 1] * b[j + 1] + i += 2 + j += 2 + } + } + + return dotProduct +} + +/** + * Calculates the similarity between this vector and another vector. + * + * @param {lunr.Vector} otherVector - The other vector to calculate the + * similarity with. + * @returns {Number} + */ +lunr.Vector.prototype.similarity = function (otherVector) { + return this.dot(otherVector) / this.magnitude() || 0 +} + +/** + * Converts the vector to an array of the elements within the vector. + * + * @returns {Number[]} + */ +lunr.Vector.prototype.toArray = function () { + var output = new Array (this.elements.length / 2) + + for (var i = 1, j = 0; i < this.elements.length; i += 2, j++) { + output[j] = this.elements[i] + } + + return output +} + +/** + * A JSON serializable representation of the vector. + * + * @returns {Number[]} + */ +lunr.Vector.prototype.toJSON = function () { + return this.elements +} +/* eslint-disable */ +/*! + * lunr.stemmer + * Copyright (C) 2020 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 + * + * @static + * @implements {lunr.PipelineFunction} + * @param {lunr.Token} token - The string to stem + * @returns {lunr.Token} + * @see {@link lunr.Pipeline} + * @function + */ +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 function (token) { + return token.update(porterStemmer); + } +})(); + +lunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer') +/*! + * lunr.stopWordFilter + * Copyright (C) 2020 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. + * + * @function + * @param {Array} token The token to pass through the filter + * @returns {lunr.PipelineFunction} + * @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.toString()] !== token.toString()) 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. + * + * @function + * @implements {lunr.PipelineFunction} + * @params {lunr.Token} token - A token to check for being a stop word. + * @returns {lunr.Token} + * @see {@link 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) 2020 Oliver Nightingale + */ + +/** + * lunr.trimmer is a pipeline function for trimming non word + * characters from the beginning 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. + * + * @static + * @implements {lunr.PipelineFunction} + * @param {lunr.Token} token The token to pass through the filter + * @returns {lunr.Token} + * @see lunr.Pipeline + */ +lunr.trimmer = function (token) { + return token.update(function (s) { + return s.replace(/^\W+/, '').replace(/\W+$/, '') + }) +} + +lunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer') +/*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + */ + +/** + * A token set is used to store the unique list of all tokens + * within an index. Token sets are also used to represent an + * incoming query to the index, this query token set and index + * token set are then intersected to find which tokens to look + * up in the inverted index. + * + * A token set can hold multiple tokens, as in the case of the + * index token set, or it can hold a single token as in the + * case of a simple query token set. + * + * Additionally token sets are used to perform wildcard matching. + * Leading, contained and trailing wildcards are supported, and + * from this edit distance matching can also be provided. + * + * Token sets are implemented as a minimal finite state automata, + * where both common prefixes and suffixes are shared between tokens. + * This helps to reduce the space used for storing the token set. + * + * @constructor + */ +lunr.TokenSet = function () { + this.final = false + this.edges = {} + this.id = lunr.TokenSet._nextId + lunr.TokenSet._nextId += 1 +} + +/** + * Keeps track of the next, auto increment, identifier to assign + * to a new tokenSet. + * + * TokenSets require a unique identifier to be correctly minimised. + * + * @private + */ +lunr.TokenSet._nextId = 1 + +/** + * Creates a TokenSet instance from the given sorted array of words. + * + * @param {String[]} arr - A sorted array of strings to create the set from. + * @returns {lunr.TokenSet} + * @throws Will throw an error if the input array is not sorted. + */ +lunr.TokenSet.fromArray = function (arr) { + var builder = new lunr.TokenSet.Builder + + for (var i = 0, len = arr.length; i < len; i++) { + builder.insert(arr[i]) + } + + builder.finish() + return builder.root +} + +/** + * Creates a token set from a query clause. + * + * @private + * @param {Object} clause - A single clause from lunr.Query. + * @param {string} clause.term - The query clause term. + * @param {number} [clause.editDistance] - The optional edit distance for the term. + * @returns {lunr.TokenSet} + */ +lunr.TokenSet.fromClause = function (clause) { + if ('editDistance' in clause) { + return lunr.TokenSet.fromFuzzyString(clause.term, clause.editDistance) + } else { + return lunr.TokenSet.fromString(clause.term) + } +} + +/** + * Creates a token set representing a single string with a specified + * edit distance. + * + * Insertions, deletions, substitutions and transpositions are each + * treated as an edit distance of 1. + * + * Increasing the allowed edit distance will have a dramatic impact + * on the performance of both creating and intersecting these TokenSets. + * It is advised to keep the edit distance less than 3. + * + * @param {string} str - The string to create the token set from. + * @param {number} editDistance - The allowed edit distance to match. + * @returns {lunr.Vector} + */ +lunr.TokenSet.fromFuzzyString = function (str, editDistance) { + var root = new lunr.TokenSet + + var stack = [{ + node: root, + editsRemaining: editDistance, + str: str + }] + + while (stack.length) { + var frame = stack.pop() + + // no edit + if (frame.str.length > 0) { + var char = frame.str.charAt(0), + noEditNode + + if (char in frame.node.edges) { + noEditNode = frame.node.edges[char] + } else { + noEditNode = new lunr.TokenSet + frame.node.edges[char] = noEditNode + } + + if (frame.str.length == 1) { + noEditNode.final = true + } + + stack.push({ + node: noEditNode, + editsRemaining: frame.editsRemaining, + str: frame.str.slice(1) + }) + } + + if (frame.editsRemaining == 0) { + continue + } + + // insertion + if ("*" in frame.node.edges) { + var insertionNode = frame.node.edges["*"] + } else { + var insertionNode = new lunr.TokenSet + frame.node.edges["*"] = insertionNode + } + + if (frame.str.length == 0) { + insertionNode.final = true + } + + stack.push({ + node: insertionNode, + editsRemaining: frame.editsRemaining - 1, + str: frame.str + }) + + // deletion + // can only do a deletion if we have enough edits remaining + // and if there are characters left to delete in the string + if (frame.str.length > 1) { + stack.push({ + node: frame.node, + editsRemaining: frame.editsRemaining - 1, + str: frame.str.slice(1) + }) + } + + // deletion + // just removing the last character from the str + if (frame.str.length == 1) { + frame.node.final = true + } + + // substitution + // can only do a substitution if we have enough edits remaining + // and if there are characters left to substitute + if (frame.str.length >= 1) { + if ("*" in frame.node.edges) { + var substitutionNode = frame.node.edges["*"] + } else { + var substitutionNode = new lunr.TokenSet + frame.node.edges["*"] = substitutionNode + } + + if (frame.str.length == 1) { + substitutionNode.final = true + } + + stack.push({ + node: substitutionNode, + editsRemaining: frame.editsRemaining - 1, + str: frame.str.slice(1) + }) + } + + // transposition + // can only do a transposition if there are edits remaining + // and there are enough characters to transpose + if (frame.str.length > 1) { + var charA = frame.str.charAt(0), + charB = frame.str.charAt(1), + transposeNode + + if (charB in frame.node.edges) { + transposeNode = frame.node.edges[charB] + } else { + transposeNode = new lunr.TokenSet + frame.node.edges[charB] = transposeNode + } + + if (frame.str.length == 1) { + transposeNode.final = true + } + + stack.push({ + node: transposeNode, + editsRemaining: frame.editsRemaining - 1, + str: charA + frame.str.slice(2) + }) + } + } + + return root +} + +/** + * Creates a TokenSet from a string. + * + * The string may contain one or more wildcard characters (*) + * that will allow wildcard matching when intersecting with + * another TokenSet. + * + * @param {string} str - The string to create a TokenSet from. + * @returns {lunr.TokenSet} + */ +lunr.TokenSet.fromString = function (str) { + var node = new lunr.TokenSet, + root = node + + /* + * Iterates through all characters within the passed string + * appending a node for each character. + * + * When a wildcard character is found then a self + * referencing edge is introduced to continually match + * any number of any characters. + */ + for (var i = 0, len = str.length; i < len; i++) { + var char = str[i], + final = (i == len - 1) + + if (char == "*") { + node.edges[char] = node + node.final = final + + } else { + var next = new lunr.TokenSet + next.final = final + + node.edges[char] = next + node = next + } + } + + return root +} + +/** + * Converts this TokenSet into an array of strings + * contained within the TokenSet. + * + * This is not intended to be used on a TokenSet that + * contains wildcards, in these cases the results are + * undefined and are likely to cause an infinite loop. + * + * @returns {string[]} + */ +lunr.TokenSet.prototype.toArray = function () { + var words = [] + + var stack = [{ + prefix: "", + node: this + }] + + while (stack.length) { + var frame = stack.pop(), + edges = Object.keys(frame.node.edges), + len = edges.length + + if (frame.node.final) { + /* In Safari, at this point the prefix is sometimes corrupted, see: + * https://github.com/olivernn/lunr.js/issues/279 Calling any + * String.prototype method forces Safari to "cast" this string to what + * it's supposed to be, fixing the bug. */ + frame.prefix.charAt(0) + words.push(frame.prefix) + } + + for (var i = 0; i < len; i++) { + var edge = edges[i] + + stack.push({ + prefix: frame.prefix.concat(edge), + node: frame.node.edges[edge] + }) + } + } + + return words +} + +/** + * Generates a string representation of a TokenSet. + * + * This is intended to allow TokenSets to be used as keys + * in objects, largely to aid the construction and minimisation + * of a TokenSet. As such it is not designed to be a human + * friendly representation of the TokenSet. + * + * @returns {string} + */ +lunr.TokenSet.prototype.toString = function () { + // NOTE: Using Object.keys here as this.edges is very likely + // to enter 'hash-mode' with many keys being added + // + // avoiding a for-in loop here as it leads to the function + // being de-optimised (at least in V8). From some simple + // benchmarks the performance is comparable, but allowing + // V8 to optimize may mean easy performance wins in the future. + + if (this._str) { + return this._str + } + + var str = this.final ? '1' : '0', + labels = Object.keys(this.edges).sort(), + len = labels.length + + for (var i = 0; i < len; i++) { + var label = labels[i], + node = this.edges[label] + + str = str + label + node.id + } + + return str +} + +/** + * Returns a new TokenSet that is the intersection of + * this TokenSet and the passed TokenSet. + * + * This intersection will take into account any wildcards + * contained within the TokenSet. + * + * @param {lunr.TokenSet} b - An other TokenSet to intersect with. + * @returns {lunr.TokenSet} + */ +lunr.TokenSet.prototype.intersect = function (b) { + var output = new lunr.TokenSet, + frame = undefined + + var stack = [{ + qNode: b, + output: output, + node: this + }] + + while (stack.length) { + frame = stack.pop() + + // NOTE: As with the #toString method, we are using + // Object.keys and a for loop instead of a for-in loop + // as both of these objects enter 'hash' mode, causing + // the function to be de-optimised in V8 + var qEdges = Object.keys(frame.qNode.edges), + qLen = qEdges.length, + nEdges = Object.keys(frame.node.edges), + nLen = nEdges.length + + for (var q = 0; q < qLen; q++) { + var qEdge = qEdges[q] + + for (var n = 0; n < nLen; n++) { + var nEdge = nEdges[n] + + if (nEdge == qEdge || qEdge == '*') { + var node = frame.node.edges[nEdge], + qNode = frame.qNode.edges[qEdge], + final = node.final && qNode.final, + next = undefined + + if (nEdge in frame.output.edges) { + // an edge already exists for this character + // no need to create a new node, just set the finality + // bit unless this node is already final + next = frame.output.edges[nEdge] + next.final = next.final || final + + } else { + // no edge exists yet, must create one + // set the finality bit and insert it + // into the output + next = new lunr.TokenSet + next.final = final + frame.output.edges[nEdge] = next + } + + stack.push({ + qNode: qNode, + output: next, + node: node + }) + } + } + } + } + + return output +} +lunr.TokenSet.Builder = function () { + this.previousWord = "" + this.root = new lunr.TokenSet + this.uncheckedNodes = [] + this.minimizedNodes = {} +} + +lunr.TokenSet.Builder.prototype.insert = function (word) { + var node, + commonPrefix = 0 + + if (word < this.previousWord) { + throw new Error ("Out of order word insertion") + } + + for (var i = 0; i < word.length && i < this.previousWord.length; i++) { + if (word[i] != this.previousWord[i]) break + commonPrefix++ + } + + this.minimize(commonPrefix) + + if (this.uncheckedNodes.length == 0) { + node = this.root + } else { + node = this.uncheckedNodes[this.uncheckedNodes.length - 1].child + } + + for (var i = commonPrefix; i < word.length; i++) { + var nextNode = new lunr.TokenSet, + char = word[i] + + node.edges[char] = nextNode + + this.uncheckedNodes.push({ + parent: node, + char: char, + child: nextNode + }) + + node = nextNode + } + + node.final = true + this.previousWord = word +} + +lunr.TokenSet.Builder.prototype.finish = function () { + this.minimize(0) +} + +lunr.TokenSet.Builder.prototype.minimize = function (downTo) { + for (var i = this.uncheckedNodes.length - 1; i >= downTo; i--) { + var node = this.uncheckedNodes[i], + childKey = node.child.toString() + + if (childKey in this.minimizedNodes) { + node.parent.edges[node.char] = this.minimizedNodes[childKey] + } else { + // Cache the key for this node since + // we know it can't change anymore + node.child._str = childKey + + this.minimizedNodes[childKey] = node.child + } + + this.uncheckedNodes.pop() + } +} +/*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + */ + +/** + * An index contains the built index of all documents and provides a query interface + * to the index. + * + * Usually instances of lunr.Index will not be created using this constructor, instead + * lunr.Builder should be used to construct new indexes, or lunr.Index.load should be + * used to load previously built and serialized indexes. + * + * @constructor + * @param {Object} attrs - The attributes of the built search index. + * @param {Object} attrs.invertedIndex - An index of term/field to document reference. + * @param {Object} attrs.fieldVectors - Field vectors + * @param {lunr.TokenSet} attrs.tokenSet - An set of all corpus tokens. + * @param {string[]} attrs.fields - The names of indexed document fields. + * @param {lunr.Pipeline} attrs.pipeline - The pipeline to use for search terms. + */ +lunr.Index = function (attrs) { + this.invertedIndex = attrs.invertedIndex + this.fieldVectors = attrs.fieldVectors + this.tokenSet = attrs.tokenSet + this.fields = attrs.fields + this.pipeline = attrs.pipeline +} + +/** + * A result contains details of a document matching a search query. + * @typedef {Object} lunr.Index~Result + * @property {string} ref - The reference of the document this result represents. + * @property {number} score - A number between 0 and 1 representing how similar this document is to the query. + * @property {lunr.MatchData} matchData - Contains metadata about this match including which term(s) caused the match. + */ + +/** + * Although lunr provides the ability to create queries using lunr.Query, it also provides a simple + * query language which itself is parsed into an instance of lunr.Query. + * + * For programmatically building queries it is advised to directly use lunr.Query, the query language + * is best used for human entered text rather than program generated text. + * + * At its simplest queries can just be a single term, e.g. `hello`, multiple terms are also supported + * and will be combined with OR, e.g `hello world` will match documents that contain either 'hello' + * or 'world', though those that contain both will rank higher in the results. + * + * Wildcards can be included in terms to match one or more unspecified characters, these wildcards can + * be inserted anywhere within the term, and more than one wildcard can exist in a single term. Adding + * wildcards will increase the number of documents that will be found but can also have a negative + * impact on query performance, especially with wildcards at the beginning of a term. + * + * Terms can be restricted to specific fields, e.g. `title:hello`, only documents with the term + * hello in the title field will match this query. Using a field not present in the index will lead + * to an error being thrown. + * + * Modifiers can also be added to terms, lunr supports edit distance and boost modifiers on terms. A term + * boost will make documents matching that term score higher, e.g. `foo^5`. Edit distance is also supported + * to provide fuzzy matching, e.g. 'hello~2' will match documents with hello with an edit distance of 2. + * Avoid large values for edit distance to improve query performance. + * + * Each term also supports a presence modifier. By default a term's presence in document is optional, however + * this can be changed to either required or prohibited. For a term's presence to be required in a document the + * term should be prefixed with a '+', e.g. `+foo bar` is a search for documents that must contain 'foo' and + * optionally contain 'bar'. Conversely a leading '-' sets the terms presence to prohibited, i.e. it must not + * appear in a document, e.g. `-foo bar` is a search for documents that do not contain 'foo' but may contain 'bar'. + * + * To escape special characters the backslash character '\' can be used, this allows searches to include + * characters that would normally be considered modifiers, e.g. `foo\~2` will search for a term "foo~2" instead + * of attempting to apply a boost of 2 to the search term "foo". + * + * @typedef {string} lunr.Index~QueryString + * @example Simple single term query + * hello + * @example Multiple term query + * hello world + * @example term scoped to a field + * title:hello + * @example term with a boost of 10 + * hello^10 + * @example term with an edit distance of 2 + * hello~2 + * @example terms with presence modifiers + * -foo +bar baz + */ + +/** + * Performs a search against the index using lunr query syntax. + * + * Results will be returned sorted by their score, the most relevant results + * will be returned first. For details on how the score is calculated, please see + * the {@link https://lunrjs.com/guides/searching.html#scoring|guide}. + * + * For more programmatic querying use lunr.Index#query. + * + * @param {lunr.Index~QueryString} queryString - A string containing a lunr query. + * @throws {lunr.QueryParseError} If the passed query string cannot be parsed. + * @returns {lunr.Index~Result[]} + */ +lunr.Index.prototype.search = function (queryString) { + return this.query(function (query) { + var parser = new lunr.QueryParser(queryString, query) + parser.parse() + }) +} + +/** + * A query builder callback provides a query object to be used to express + * the query to perform on the index. + * + * @callback lunr.Index~queryBuilder + * @param {lunr.Query} query - The query object to build up. + * @this lunr.Query + */ + +/** + * Performs a query against the index using the yielded lunr.Query object. + * + * If performing programmatic queries against the index, this method is preferred + * over lunr.Index#search so as to avoid the additional query parsing overhead. + * + * A query object is yielded to the supplied function which should be used to + * express the query to be run against the index. + * + * Note that although this function takes a callback parameter it is _not_ an + * asynchronous operation, the callback is just yielded a query object to be + * customized. + * + * @param {lunr.Index~queryBuilder} fn - A function that is used to build the query. + * @returns {lunr.Index~Result[]} + */ +lunr.Index.prototype.query = function (fn) { + // for each query clause + // * process terms + // * expand terms from token set + // * find matching documents and metadata + // * get document vectors + // * score documents + + var query = new lunr.Query(this.fields), + matchingFields = Object.create(null), + queryVectors = Object.create(null), + termFieldCache = Object.create(null), + requiredMatches = Object.create(null), + prohibitedMatches = Object.create(null) + + /* + * To support field level boosts a query vector is created per + * field. An empty vector is eagerly created to support negated + * queries. + */ + for (var i = 0; i < this.fields.length; i++) { + queryVectors[this.fields[i]] = new lunr.Vector + } + + fn.call(query, query) + + for (var i = 0; i < query.clauses.length; i++) { + /* + * Unless the pipeline has been disabled for this term, which is + * the case for terms with wildcards, we need to pass the clause + * term through the search pipeline. A pipeline returns an array + * of processed terms. Pipeline functions may expand the passed + * term, which means we may end up performing multiple index lookups + * for a single query term. + */ + var clause = query.clauses[i], + terms = null, + clauseMatches = lunr.Set.empty + + if (clause.usePipeline) { + terms = this.pipeline.runString(clause.term, { + fields: clause.fields + }) + } else { + terms = [clause.term] + } + + for (var m = 0; m < terms.length; m++) { + var term = terms[m] + + /* + * Each term returned from the pipeline needs to use the same query + * clause object, e.g. the same boost and or edit distance. The + * simplest way to do this is to re-use the clause object but mutate + * its term property. + */ + clause.term = term + + /* + * From the term in the clause we create a token set which will then + * be used to intersect the indexes token set to get a list of terms + * to lookup in the inverted index + */ + var termTokenSet = lunr.TokenSet.fromClause(clause), + expandedTerms = this.tokenSet.intersect(termTokenSet).toArray() + + /* + * If a term marked as required does not exist in the tokenSet it is + * impossible for the search to return any matches. We set all the field + * scoped required matches set to empty and stop examining any further + * clauses. + */ + if (expandedTerms.length === 0 && clause.presence === lunr.Query.presence.REQUIRED) { + for (var k = 0; k < clause.fields.length; k++) { + var field = clause.fields[k] + requiredMatches[field] = lunr.Set.empty + } + + break + } + + for (var j = 0; j < expandedTerms.length; j++) { + /* + * For each term get the posting and termIndex, this is required for + * building the query vector. + */ + var expandedTerm = expandedTerms[j], + posting = this.invertedIndex[expandedTerm], + termIndex = posting._index + + for (var k = 0; k < clause.fields.length; k++) { + /* + * For each field that this query term is scoped by (by default + * all fields are in scope) we need to get all the document refs + * that have this term in that field. + * + * The posting is the entry in the invertedIndex for the matching + * term from above. + */ + var field = clause.fields[k], + fieldPosting = posting[field], + matchingDocumentRefs = Object.keys(fieldPosting), + termField = expandedTerm + "/" + field, + matchingDocumentsSet = new lunr.Set(matchingDocumentRefs) + + /* + * if the presence of this term is required ensure that the matching + * documents are added to the set of required matches for this clause. + * + */ + if (clause.presence == lunr.Query.presence.REQUIRED) { + clauseMatches = clauseMatches.union(matchingDocumentsSet) + + if (requiredMatches[field] === undefined) { + requiredMatches[field] = lunr.Set.complete + } + } + + /* + * if the presence of this term is prohibited ensure that the matching + * documents are added to the set of prohibited matches for this field, + * creating that set if it does not yet exist. + */ + if (clause.presence == lunr.Query.presence.PROHIBITED) { + if (prohibitedMatches[field] === undefined) { + prohibitedMatches[field] = lunr.Set.empty + } + + prohibitedMatches[field] = prohibitedMatches[field].union(matchingDocumentsSet) + + /* + * Prohibited matches should not be part of the query vector used for + * similarity scoring and no metadata should be extracted so we continue + * to the next field + */ + continue + } + + /* + * The query field vector is populated using the termIndex found for + * the term and a unit value with the appropriate boost applied. + * Using upsert because there could already be an entry in the vector + * for the term we are working with. In that case we just add the scores + * together. + */ + queryVectors[field].upsert(termIndex, clause.boost, function (a, b) { return a + b }) + + /** + * If we've already seen this term, field combo then we've already collected + * the matching documents and metadata, no need to go through all that again + */ + if (termFieldCache[termField]) { + continue + } + + for (var l = 0; l < matchingDocumentRefs.length; l++) { + /* + * All metadata for this term/field/document triple + * are then extracted and collected into an instance + * of lunr.MatchData ready to be returned in the query + * results + */ + var matchingDocumentRef = matchingDocumentRefs[l], + matchingFieldRef = new lunr.FieldRef (matchingDocumentRef, field), + metadata = fieldPosting[matchingDocumentRef], + fieldMatch + + if ((fieldMatch = matchingFields[matchingFieldRef]) === undefined) { + matchingFields[matchingFieldRef] = new lunr.MatchData (expandedTerm, field, metadata) + } else { + fieldMatch.add(expandedTerm, field, metadata) + } + + } + + termFieldCache[termField] = true + } + } + } + + /** + * If the presence was required we need to update the requiredMatches field sets. + * We do this after all fields for the term have collected their matches because + * the clause terms presence is required in _any_ of the fields not _all_ of the + * fields. + */ + if (clause.presence === lunr.Query.presence.REQUIRED) { + for (var k = 0; k < clause.fields.length; k++) { + var field = clause.fields[k] + requiredMatches[field] = requiredMatches[field].intersect(clauseMatches) + } + } + } + + /** + * Need to combine the field scoped required and prohibited + * matching documents into a global set of required and prohibited + * matches + */ + var allRequiredMatches = lunr.Set.complete, + allProhibitedMatches = lunr.Set.empty + + for (var i = 0; i < this.fields.length; i++) { + var field = this.fields[i] + + if (requiredMatches[field]) { + allRequiredMatches = allRequiredMatches.intersect(requiredMatches[field]) + } + + if (prohibitedMatches[field]) { + allProhibitedMatches = allProhibitedMatches.union(prohibitedMatches[field]) + } + } + + var matchingFieldRefs = Object.keys(matchingFields), + results = [], + matches = Object.create(null) + + /* + * If the query is negated (contains only prohibited terms) + * we need to get _all_ fieldRefs currently existing in the + * index. This is only done when we know that the query is + * entirely prohibited terms to avoid any cost of getting all + * fieldRefs unnecessarily. + * + * Additionally, blank MatchData must be created to correctly + * populate the results. + */ + if (query.isNegated()) { + matchingFieldRefs = Object.keys(this.fieldVectors) + + for (var i = 0; i < matchingFieldRefs.length; i++) { + var matchingFieldRef = matchingFieldRefs[i] + var fieldRef = lunr.FieldRef.fromString(matchingFieldRef) + matchingFields[matchingFieldRef] = new lunr.MatchData + } + } + + for (var i = 0; i < matchingFieldRefs.length; i++) { + /* + * Currently we have document fields that match the query, but we + * need to return documents. The matchData and scores are combined + * from multiple fields belonging to the same document. + * + * Scores are calculated by field, using the query vectors created + * above, and combined into a final document score using addition. + */ + var fieldRef = lunr.FieldRef.fromString(matchingFieldRefs[i]), + docRef = fieldRef.docRef + + if (!allRequiredMatches.contains(docRef)) { + continue + } + + if (allProhibitedMatches.contains(docRef)) { + continue + } + + var fieldVector = this.fieldVectors[fieldRef], + score = queryVectors[fieldRef.fieldName].similarity(fieldVector), + docMatch + + if ((docMatch = matches[docRef]) !== undefined) { + docMatch.score += score + docMatch.matchData.combine(matchingFields[fieldRef]) + } else { + var match = { + ref: docRef, + score: score, + matchData: matchingFields[fieldRef] + } + matches[docRef] = match + results.push(match) + } + } + + /* + * Sort the results objects by score, highest first. + */ + return results.sort(function (a, b) { + return b.score - a.score + }) +} + +/** + * Prepares the index for JSON serialization. + * + * The schema for this JSON blob will be described in a + * separate JSON schema file. + * + * @returns {Object} + */ +lunr.Index.prototype.toJSON = function () { + var invertedIndex = Object.keys(this.invertedIndex) + .sort() + .map(function (term) { + return [term, this.invertedIndex[term]] + }, this) + + var fieldVectors = Object.keys(this.fieldVectors) + .map(function (ref) { + return [ref, this.fieldVectors[ref].toJSON()] + }, this) + + return { + version: lunr.version, + fields: this.fields, + fieldVectors: fieldVectors, + invertedIndex: invertedIndex, + pipeline: this.pipeline.toJSON() + } +} + +/** + * Loads a previously serialized lunr.Index + * + * @param {Object} serializedIndex - A previously serialized lunr.Index + * @returns {lunr.Index} + */ +lunr.Index.load = function (serializedIndex) { + var attrs = {}, + fieldVectors = {}, + serializedVectors = serializedIndex.fieldVectors, + invertedIndex = Object.create(null), + serializedInvertedIndex = serializedIndex.invertedIndex, + tokenSetBuilder = new lunr.TokenSet.Builder, + pipeline = lunr.Pipeline.load(serializedIndex.pipeline) + + if (serializedIndex.version != lunr.version) { + lunr.utils.warn("Version mismatch when loading serialised index. Current version of lunr '" + lunr.version + "' does not match serialized index '" + serializedIndex.version + "'") + } + + for (var i = 0; i < serializedVectors.length; i++) { + var tuple = serializedVectors[i], + ref = tuple[0], + elements = tuple[1] + + fieldVectors[ref] = new lunr.Vector(elements) + } + + for (var i = 0; i < serializedInvertedIndex.length; i++) { + var tuple = serializedInvertedIndex[i], + term = tuple[0], + posting = tuple[1] + + tokenSetBuilder.insert(term) + invertedIndex[term] = posting + } + + tokenSetBuilder.finish() + + attrs.fields = serializedIndex.fields + + attrs.fieldVectors = fieldVectors + attrs.invertedIndex = invertedIndex + attrs.tokenSet = tokenSetBuilder.root + attrs.pipeline = pipeline + + return new lunr.Index(attrs) +} +/*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + */ + +/** + * lunr.Builder performs indexing on a set of documents and + * returns instances of lunr.Index ready for querying. + * + * All configuration of the index is done via the builder, the + * fields to index, the document reference, the text processing + * pipeline and document scoring parameters are all set on the + * builder before indexing. + * + * @constructor + * @property {string} _ref - Internal reference to the document reference field. + * @property {string[]} _fields - Internal reference to the document fields to index. + * @property {object} invertedIndex - The inverted index maps terms to document fields. + * @property {object} documentTermFrequencies - Keeps track of document term frequencies. + * @property {object} documentLengths - Keeps track of the length of documents added to the index. + * @property {lunr.tokenizer} tokenizer - Function for splitting strings into tokens for indexing. + * @property {lunr.Pipeline} pipeline - The pipeline performs text processing on tokens before indexing. + * @property {lunr.Pipeline} searchPipeline - A pipeline for processing search terms before querying the index. + * @property {number} documentCount - Keeps track of the total number of documents indexed. + * @property {number} _b - A parameter to control field length normalization, setting this to 0 disabled normalization, 1 fully normalizes field lengths, the default value is 0.75. + * @property {number} _k1 - A parameter to control how quickly an increase in term frequency results in term frequency saturation, the default value is 1.2. + * @property {number} termIndex - A counter incremented for each unique term, used to identify a terms position in the vector space. + * @property {array} metadataWhitelist - A list of metadata keys that have been whitelisted for entry in the index. + */ +lunr.Builder = function () { + this._ref = "id" + this._fields = Object.create(null) + this._documents = Object.create(null) + this.invertedIndex = Object.create(null) + this.fieldTermFrequencies = {} + this.fieldLengths = {} + this.tokenizer = lunr.tokenizer + this.pipeline = new lunr.Pipeline + this.searchPipeline = new lunr.Pipeline + this.documentCount = 0 + this._b = 0.75 + this._k1 = 1.2 + this.termIndex = 0 + this.metadataWhitelist = [] +} + +/** + * Sets the document field used as the document reference. Every document must have this field. + * The type of this field in the document should be a string, if it is not a string it will be + * coerced into a string by calling toString. + * + * The default ref is 'id'. + * + * The ref should _not_ be changed during indexing, it should be set before any documents are + * added to the index. Changing it during indexing can lead to inconsistent results. + * + * @param {string} ref - The name of the reference field in the document. + */ +lunr.Builder.prototype.ref = function (ref) { + this._ref = ref +} + +/** + * A function that is used to extract a field from a document. + * + * Lunr expects a field to be at the top level of a document, if however the field + * is deeply nested within a document an extractor function can be used to extract + * the right field for indexing. + * + * @callback fieldExtractor + * @param {object} doc - The document being added to the index. + * @returns {?(string|object|object[])} obj - The object that will be indexed for this field. + * @example Extracting a nested field + * function (doc) { return doc.nested.field } + */ + +/** + * Adds a field to the list of document fields that will be indexed. Every document being + * indexed should have this field. Null values for this field in indexed documents will + * not cause errors but will limit the chance of that document being retrieved by searches. + * + * All fields should be added before adding documents to the index. Adding fields after + * a document has been indexed will have no effect on already indexed documents. + * + * Fields can be boosted at build time. This allows terms within that field to have more + * importance when ranking search results. Use a field boost to specify that matches within + * one field are more important than other fields. + * + * @param {string} fieldName - The name of a field to index in all documents. + * @param {object} attributes - Optional attributes associated with this field. + * @param {number} [attributes.boost=1] - Boost applied to all terms within this field. + * @param {fieldExtractor} [attributes.extractor] - Function to extract a field from a document. + * @throws {RangeError} fieldName cannot contain unsupported characters '/' + */ +lunr.Builder.prototype.field = function (fieldName, attributes) { + if (/\//.test(fieldName)) { + throw new RangeError ("Field '" + fieldName + "' contains illegal character '/'") + } + + this._fields[fieldName] = attributes || {} +} + +/** + * A parameter to tune the amount of field length normalisation that is applied when + * calculating relevance scores. A value of 0 will completely disable any normalisation + * and a value of 1 will fully normalise field lengths. The default is 0.75. Values of b + * will be clamped to the range 0 - 1. + * + * @param {number} number - The value to set for this tuning parameter. + */ +lunr.Builder.prototype.b = function (number) { + if (number < 0) { + this._b = 0 + } else if (number > 1) { + this._b = 1 + } else { + this._b = number + } +} + +/** + * A parameter that controls the speed at which a rise in term frequency results in term + * frequency saturation. The default value is 1.2. Setting this to a higher value will give + * slower saturation levels, a lower value will result in quicker saturation. + * + * @param {number} number - The value to set for this tuning parameter. + */ +lunr.Builder.prototype.k1 = function (number) { + this._k1 = number +} + +/** + * Adds a document to the index. + * + * Before adding fields to the index the index should have been fully setup, with the document + * ref and all fields to index already having been specified. + * + * The document must have a field name as specified by the ref (by default this is 'id') and + * it should have all fields defined for indexing, though null or undefined values will not + * cause errors. + * + * Entire documents can be boosted at build time. Applying a boost to a document indicates that + * this document should rank higher in search results than other documents. + * + * @param {object} doc - The document to add to the index. + * @param {object} attributes - Optional attributes associated with this document. + * @param {number} [attributes.boost=1] - Boost applied to all terms within this document. + */ +lunr.Builder.prototype.add = function (doc, attributes) { + var docRef = doc[this._ref], + fields = Object.keys(this._fields) + + this._documents[docRef] = attributes || {} + this.documentCount += 1 + + for (var i = 0; i < fields.length; i++) { + var fieldName = fields[i], + extractor = this._fields[fieldName].extractor, + field = extractor ? extractor(doc) : doc[fieldName], + tokens = this.tokenizer(field, { + fields: [fieldName] + }), + terms = this.pipeline.run(tokens), + fieldRef = new lunr.FieldRef (docRef, fieldName), + fieldTerms = Object.create(null) + + this.fieldTermFrequencies[fieldRef] = fieldTerms + this.fieldLengths[fieldRef] = 0 + + // store the length of this field for this document + this.fieldLengths[fieldRef] += terms.length + + // calculate term frequencies for this field + for (var j = 0; j < terms.length; j++) { + var term = terms[j] + + if (fieldTerms[term] == undefined) { + fieldTerms[term] = 0 + } + + fieldTerms[term] += 1 + + // add to inverted index + // create an initial posting if one doesn't exist + if (this.invertedIndex[term] == undefined) { + var posting = Object.create(null) + posting["_index"] = this.termIndex + this.termIndex += 1 + + for (var k = 0; k < fields.length; k++) { + posting[fields[k]] = Object.create(null) + } + + this.invertedIndex[term] = posting + } + + // add an entry for this term/fieldName/docRef to the invertedIndex + if (this.invertedIndex[term][fieldName][docRef] == undefined) { + this.invertedIndex[term][fieldName][docRef] = Object.create(null) + } + + // store all whitelisted metadata about this token in the + // inverted index + for (var l = 0; l < this.metadataWhitelist.length; l++) { + var metadataKey = this.metadataWhitelist[l], + metadata = term.metadata[metadataKey] + + if (this.invertedIndex[term][fieldName][docRef][metadataKey] == undefined) { + this.invertedIndex[term][fieldName][docRef][metadataKey] = [] + } + + this.invertedIndex[term][fieldName][docRef][metadataKey].push(metadata) + } + } + + } +} + +/** + * Calculates the average document length for this index + * + * @private + */ +lunr.Builder.prototype.calculateAverageFieldLengths = function () { + + var fieldRefs = Object.keys(this.fieldLengths), + numberOfFields = fieldRefs.length, + accumulator = {}, + documentsWithField = {} + + for (var i = 0; i < numberOfFields; i++) { + var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]), + field = fieldRef.fieldName + + documentsWithField[field] || (documentsWithField[field] = 0) + documentsWithField[field] += 1 + + accumulator[field] || (accumulator[field] = 0) + accumulator[field] += this.fieldLengths[fieldRef] + } + + var fields = Object.keys(this._fields) + + for (var i = 0; i < fields.length; i++) { + var fieldName = fields[i] + accumulator[fieldName] = accumulator[fieldName] / documentsWithField[fieldName] + } + + this.averageFieldLength = accumulator +} + +/** + * Builds a vector space model of every document using lunr.Vector + * + * @private + */ +lunr.Builder.prototype.createFieldVectors = function () { + var fieldVectors = {}, + fieldRefs = Object.keys(this.fieldTermFrequencies), + fieldRefsLength = fieldRefs.length, + termIdfCache = Object.create(null) + + for (var i = 0; i < fieldRefsLength; i++) { + var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]), + fieldName = fieldRef.fieldName, + fieldLength = this.fieldLengths[fieldRef], + fieldVector = new lunr.Vector, + termFrequencies = this.fieldTermFrequencies[fieldRef], + terms = Object.keys(termFrequencies), + termsLength = terms.length + + + var fieldBoost = this._fields[fieldName].boost || 1, + docBoost = this._documents[fieldRef.docRef].boost || 1 + + for (var j = 0; j < termsLength; j++) { + var term = terms[j], + tf = termFrequencies[term], + termIndex = this.invertedIndex[term]._index, + idf, score, scoreWithPrecision + + if (termIdfCache[term] === undefined) { + idf = lunr.idf(this.invertedIndex[term], this.documentCount) + termIdfCache[term] = idf + } else { + idf = termIdfCache[term] + } + + score = idf * ((this._k1 + 1) * tf) / (this._k1 * (1 - this._b + this._b * (fieldLength / this.averageFieldLength[fieldName])) + tf) + score *= fieldBoost + score *= docBoost + scoreWithPrecision = Math.round(score * 1000) / 1000 + // Converts 1.23456789 to 1.234. + // Reducing the precision so that the vectors take up less + // space when serialised. Doing it now so that they behave + // the same before and after serialisation. Also, this is + // the fastest approach to reducing a number's precision in + // JavaScript. + + fieldVector.insert(termIndex, scoreWithPrecision) + } + + fieldVectors[fieldRef] = fieldVector + } + + this.fieldVectors = fieldVectors +} + +/** + * Creates a token set of all tokens in the index using lunr.TokenSet + * + * @private + */ +lunr.Builder.prototype.createTokenSet = function () { + this.tokenSet = lunr.TokenSet.fromArray( + Object.keys(this.invertedIndex).sort() + ) +} + +/** + * Builds the index, creating an instance of lunr.Index. + * + * This completes the indexing process and should only be called + * once all documents have been added to the index. + * + * @returns {lunr.Index} + */ +lunr.Builder.prototype.build = function () { + this.calculateAverageFieldLengths() + this.createFieldVectors() + this.createTokenSet() + + return new lunr.Index({ + invertedIndex: this.invertedIndex, + fieldVectors: this.fieldVectors, + tokenSet: this.tokenSet, + fields: Object.keys(this._fields), + pipeline: this.searchPipeline + }) +} + +/** + * Applies a plugin to the index builder. + * + * A plugin is a function that is called with the index builder as its context. + * Plugins can be used to customise or extend the behaviour of the index + * in some way. A plugin is just a function, that encapsulated the custom + * behaviour that should be applied when building the index. + * + * The plugin function will be called with the index builder as its argument, additional + * arguments can also be passed when calling use. The function will be called + * with the index builder as its context. + * + * @param {Function} plugin The plugin to apply. + */ +lunr.Builder.prototype.use = function (fn) { + var args = Array.prototype.slice.call(arguments, 1) + args.unshift(this) + fn.apply(this, args) +} +/** + * Contains and collects metadata about a matching document. + * A single instance of lunr.MatchData is returned as part of every + * lunr.Index~Result. + * + * @constructor + * @param {string} term - The term this match data is associated with + * @param {string} field - The field in which the term was found + * @param {object} metadata - The metadata recorded about this term in this field + * @property {object} metadata - A cloned collection of metadata associated with this document. + * @see {@link lunr.Index~Result} + */ +lunr.MatchData = function (term, field, metadata) { + var clonedMetadata = Object.create(null), + metadataKeys = Object.keys(metadata || {}) + + // Cloning the metadata to prevent the original + // being mutated during match data combination. + // Metadata is kept in an array within the inverted + // index so cloning the data can be done with + // Array#slice + for (var i = 0; i < metadataKeys.length; i++) { + var key = metadataKeys[i] + clonedMetadata[key] = metadata[key].slice() + } + + this.metadata = Object.create(null) + + if (term !== undefined) { + this.metadata[term] = Object.create(null) + this.metadata[term][field] = clonedMetadata + } +} + +/** + * An instance of lunr.MatchData will be created for every term that matches a + * document. However only one instance is required in a lunr.Index~Result. This + * method combines metadata from another instance of lunr.MatchData with this + * objects metadata. + * + * @param {lunr.MatchData} otherMatchData - Another instance of match data to merge with this one. + * @see {@link lunr.Index~Result} + */ +lunr.MatchData.prototype.combine = function (otherMatchData) { + var terms = Object.keys(otherMatchData.metadata) + + for (var i = 0; i < terms.length; i++) { + var term = terms[i], + fields = Object.keys(otherMatchData.metadata[term]) + + if (this.metadata[term] == undefined) { + this.metadata[term] = Object.create(null) + } + + for (var j = 0; j < fields.length; j++) { + var field = fields[j], + keys = Object.keys(otherMatchData.metadata[term][field]) + + if (this.metadata[term][field] == undefined) { + this.metadata[term][field] = Object.create(null) + } + + for (var k = 0; k < keys.length; k++) { + var key = keys[k] + + if (this.metadata[term][field][key] == undefined) { + this.metadata[term][field][key] = otherMatchData.metadata[term][field][key] + } else { + this.metadata[term][field][key] = this.metadata[term][field][key].concat(otherMatchData.metadata[term][field][key]) + } + + } + } + } +} + +/** + * Add metadata for a term/field pair to this instance of match data. + * + * @param {string} term - The term this match data is associated with + * @param {string} field - The field in which the term was found + * @param {object} metadata - The metadata recorded about this term in this field + */ +lunr.MatchData.prototype.add = function (term, field, metadata) { + if (!(term in this.metadata)) { + this.metadata[term] = Object.create(null) + this.metadata[term][field] = metadata + return + } + + if (!(field in this.metadata[term])) { + this.metadata[term][field] = metadata + return + } + + var metadataKeys = Object.keys(metadata) + + for (var i = 0; i < metadataKeys.length; i++) { + var key = metadataKeys[i] + + if (key in this.metadata[term][field]) { + this.metadata[term][field][key] = this.metadata[term][field][key].concat(metadata[key]) + } else { + this.metadata[term][field][key] = metadata[key] + } + } +} +/** + * A lunr.Query provides a programmatic way of defining queries to be performed + * against a {@link lunr.Index}. + * + * Prefer constructing a lunr.Query using the {@link lunr.Index#query} method + * so the query object is pre-initialized with the right index fields. + * + * @constructor + * @property {lunr.Query~Clause[]} clauses - An array of query clauses. + * @property {string[]} allFields - An array of all available fields in a lunr.Index. + */ +lunr.Query = function (allFields) { + this.clauses = [] + this.allFields = allFields +} + +/** + * Constants for indicating what kind of automatic wildcard insertion will be used when constructing a query clause. + * + * This allows wildcards to be added to the beginning and end of a term without having to manually do any string + * concatenation. + * + * The wildcard constants can be bitwise combined to select both leading and trailing wildcards. + * + * @constant + * @default + * @property {number} wildcard.NONE - The term will have no wildcards inserted, this is the default behaviour + * @property {number} wildcard.LEADING - Prepend the term with a wildcard, unless a leading wildcard already exists + * @property {number} wildcard.TRAILING - Append a wildcard to the term, unless a trailing wildcard already exists + * @see lunr.Query~Clause + * @see lunr.Query#clause + * @see lunr.Query#term + * @example query term with trailing wildcard + * query.term('foo', { wildcard: lunr.Query.wildcard.TRAILING }) + * @example query term with leading and trailing wildcard + * query.term('foo', { + * wildcard: lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING + * }) + */ + +lunr.Query.wildcard = new String ("*") +lunr.Query.wildcard.NONE = 0 +lunr.Query.wildcard.LEADING = 1 +lunr.Query.wildcard.TRAILING = 2 + +/** + * Constants for indicating what kind of presence a term must have in matching documents. + * + * @constant + * @enum {number} + * @see lunr.Query~Clause + * @see lunr.Query#clause + * @see lunr.Query#term + * @example query term with required presence + * query.term('foo', { presence: lunr.Query.presence.REQUIRED }) + */ +lunr.Query.presence = { + /** + * Term's presence in a document is optional, this is the default value. + */ + OPTIONAL: 1, + + /** + * Term's presence in a document is required, documents that do not contain + * this term will not be returned. + */ + REQUIRED: 2, + + /** + * Term's presence in a document is prohibited, documents that do contain + * this term will not be returned. + */ + PROHIBITED: 3 +} + +/** + * A single clause in a {@link lunr.Query} contains a term and details on how to + * match that term against a {@link lunr.Index}. + * + * @typedef {Object} lunr.Query~Clause + * @property {string[]} fields - The fields in an index this clause should be matched against. + * @property {number} [boost=1] - Any boost that should be applied when matching this clause. + * @property {number} [editDistance] - Whether the term should have fuzzy matching applied, and how fuzzy the match should be. + * @property {boolean} [usePipeline] - Whether the term should be passed through the search pipeline. + * @property {number} [wildcard=lunr.Query.wildcard.NONE] - Whether the term should have wildcards appended or prepended. + * @property {number} [presence=lunr.Query.presence.OPTIONAL] - The terms presence in any matching documents. + */ + +/** + * Adds a {@link lunr.Query~Clause} to this query. + * + * Unless the clause contains the fields to be matched all fields will be matched. In addition + * a default boost of 1 is applied to the clause. + * + * @param {lunr.Query~Clause} clause - The clause to add to this query. + * @see lunr.Query~Clause + * @returns {lunr.Query} + */ +lunr.Query.prototype.clause = function (clause) { + if (!('fields' in clause)) { + clause.fields = this.allFields + } + + if (!('boost' in clause)) { + clause.boost = 1 + } + + if (!('usePipeline' in clause)) { + clause.usePipeline = true + } + + if (!('wildcard' in clause)) { + clause.wildcard = lunr.Query.wildcard.NONE + } + + if ((clause.wildcard & lunr.Query.wildcard.LEADING) && (clause.term.charAt(0) != lunr.Query.wildcard)) { + clause.term = "*" + clause.term + } + + if ((clause.wildcard & lunr.Query.wildcard.TRAILING) && (clause.term.slice(-1) != lunr.Query.wildcard)) { + clause.term = "" + clause.term + "*" + } + + if (!('presence' in clause)) { + clause.presence = lunr.Query.presence.OPTIONAL + } + + this.clauses.push(clause) + + return this +} + +/** + * A negated query is one in which every clause has a presence of + * prohibited. These queries require some special processing to return + * the expected results. + * + * @returns boolean + */ +lunr.Query.prototype.isNegated = function () { + for (var i = 0; i < this.clauses.length; i++) { + if (this.clauses[i].presence != lunr.Query.presence.PROHIBITED) { + return false + } + } + + return true +} + +/** + * Adds a term to the current query, under the covers this will create a {@link lunr.Query~Clause} + * to the list of clauses that make up this query. + * + * The term is used as is, i.e. no tokenization will be performed by this method. Instead conversion + * to a token or token-like string should be done before calling this method. + * + * The term will be converted to a string by calling `toString`. Multiple terms can be passed as an + * array, each term in the array will share the same options. + * + * @param {object|object[]} term - The term(s) to add to the query. + * @param {object} [options] - Any additional properties to add to the query clause. + * @returns {lunr.Query} + * @see lunr.Query#clause + * @see lunr.Query~Clause + * @example adding a single term to a query + * query.term("foo") + * @example adding a single term to a query and specifying search fields, term boost and automatic trailing wildcard + * query.term("foo", { + * fields: ["title"], + * boost: 10, + * wildcard: lunr.Query.wildcard.TRAILING + * }) + * @example using lunr.tokenizer to convert a string to tokens before using them as terms + * query.term(lunr.tokenizer("foo bar")) + */ +lunr.Query.prototype.term = function (term, options) { + if (Array.isArray(term)) { + term.forEach(function (t) { this.term(t, lunr.utils.clone(options)) }, this) + return this + } + + var clause = options || {} + clause.term = term.toString() + + this.clause(clause) + + return this +} +lunr.QueryParseError = function (message, start, end) { + this.name = "QueryParseError" + this.message = message + this.start = start + this.end = end +} + +lunr.QueryParseError.prototype = new Error +lunr.QueryLexer = function (str) { + this.lexemes = [] + this.str = str + this.length = str.length + this.pos = 0 + this.start = 0 + this.escapeCharPositions = [] +} + +lunr.QueryLexer.prototype.run = function () { + var state = lunr.QueryLexer.lexText + + while (state) { + state = state(this) + } +} + +lunr.QueryLexer.prototype.sliceString = function () { + var subSlices = [], + sliceStart = this.start, + sliceEnd = this.pos + + for (var i = 0; i < this.escapeCharPositions.length; i++) { + sliceEnd = this.escapeCharPositions[i] + subSlices.push(this.str.slice(sliceStart, sliceEnd)) + sliceStart = sliceEnd + 1 + } + + subSlices.push(this.str.slice(sliceStart, this.pos)) + this.escapeCharPositions.length = 0 + + return subSlices.join('') +} + +lunr.QueryLexer.prototype.emit = function (type) { + this.lexemes.push({ + type: type, + str: this.sliceString(), + start: this.start, + end: this.pos + }) + + this.start = this.pos +} + +lunr.QueryLexer.prototype.escapeCharacter = function () { + this.escapeCharPositions.push(this.pos - 1) + this.pos += 1 +} + +lunr.QueryLexer.prototype.next = function () { + if (this.pos >= this.length) { + return lunr.QueryLexer.EOS + } + + var char = this.str.charAt(this.pos) + this.pos += 1 + return char +} + +lunr.QueryLexer.prototype.width = function () { + return this.pos - this.start +} + +lunr.QueryLexer.prototype.ignore = function () { + if (this.start == this.pos) { + this.pos += 1 + } + + this.start = this.pos +} + +lunr.QueryLexer.prototype.backup = function () { + this.pos -= 1 +} + +lunr.QueryLexer.prototype.acceptDigitRun = function () { + var char, charCode + + do { + char = this.next() + charCode = char.charCodeAt(0) + } while (charCode > 47 && charCode < 58) + + if (char != lunr.QueryLexer.EOS) { + this.backup() + } +} + +lunr.QueryLexer.prototype.more = function () { + return this.pos < this.length +} + +lunr.QueryLexer.EOS = 'EOS' +lunr.QueryLexer.FIELD = 'FIELD' +lunr.QueryLexer.TERM = 'TERM' +lunr.QueryLexer.EDIT_DISTANCE = 'EDIT_DISTANCE' +lunr.QueryLexer.BOOST = 'BOOST' +lunr.QueryLexer.PRESENCE = 'PRESENCE' + +lunr.QueryLexer.lexField = function (lexer) { + lexer.backup() + lexer.emit(lunr.QueryLexer.FIELD) + lexer.ignore() + return lunr.QueryLexer.lexText +} + +lunr.QueryLexer.lexTerm = function (lexer) { + if (lexer.width() > 1) { + lexer.backup() + lexer.emit(lunr.QueryLexer.TERM) + } + + lexer.ignore() + + if (lexer.more()) { + return lunr.QueryLexer.lexText + } +} + +lunr.QueryLexer.lexEditDistance = function (lexer) { + lexer.ignore() + lexer.acceptDigitRun() + lexer.emit(lunr.QueryLexer.EDIT_DISTANCE) + return lunr.QueryLexer.lexText +} + +lunr.QueryLexer.lexBoost = function (lexer) { + lexer.ignore() + lexer.acceptDigitRun() + lexer.emit(lunr.QueryLexer.BOOST) + return lunr.QueryLexer.lexText +} + +lunr.QueryLexer.lexEOS = function (lexer) { + if (lexer.width() > 0) { + lexer.emit(lunr.QueryLexer.TERM) + } +} + +// This matches the separator used when tokenising fields +// within a document. These should match otherwise it is +// not possible to search for some tokens within a document. +// +// It is possible for the user to change the separator on the +// tokenizer so it _might_ clash with any other of the special +// characters already used within the search string, e.g. :. +// +// This means that it is possible to change the separator in +// such a way that makes some words unsearchable using a search +// string. +lunr.QueryLexer.termSeparator = lunr.tokenizer.separator + +lunr.QueryLexer.lexText = function (lexer) { + while (true) { + var char = lexer.next() + + if (char == lunr.QueryLexer.EOS) { + return lunr.QueryLexer.lexEOS + } + + // Escape character is '\' + if (char.charCodeAt(0) == 92) { + lexer.escapeCharacter() + continue + } + + if (char == ":") { + return lunr.QueryLexer.lexField + } + + if (char == "~") { + lexer.backup() + if (lexer.width() > 0) { + lexer.emit(lunr.QueryLexer.TERM) + } + return lunr.QueryLexer.lexEditDistance + } + + if (char == "^") { + lexer.backup() + if (lexer.width() > 0) { + lexer.emit(lunr.QueryLexer.TERM) + } + return lunr.QueryLexer.lexBoost + } + + // "+" indicates term presence is required + // checking for length to ensure that only + // leading "+" are considered + if (char == "+" && lexer.width() === 1) { + lexer.emit(lunr.QueryLexer.PRESENCE) + return lunr.QueryLexer.lexText + } + + // "-" indicates term presence is prohibited + // checking for length to ensure that only + // leading "-" are considered + if (char == "-" && lexer.width() === 1) { + lexer.emit(lunr.QueryLexer.PRESENCE) + return lunr.QueryLexer.lexText + } + + if (char.match(lunr.QueryLexer.termSeparator)) { + return lunr.QueryLexer.lexTerm + } + } +} + +lunr.QueryParser = function (str, query) { + this.lexer = new lunr.QueryLexer (str) + this.query = query + this.currentClause = {} + this.lexemeIdx = 0 +} + +lunr.QueryParser.prototype.parse = function () { + this.lexer.run() + this.lexemes = this.lexer.lexemes + + var state = lunr.QueryParser.parseClause + + while (state) { + state = state(this) + } + + return this.query +} + +lunr.QueryParser.prototype.peekLexeme = function () { + return this.lexemes[this.lexemeIdx] +} + +lunr.QueryParser.prototype.consumeLexeme = function () { + var lexeme = this.peekLexeme() + this.lexemeIdx += 1 + return lexeme +} + +lunr.QueryParser.prototype.nextClause = function () { + var completedClause = this.currentClause + this.query.clause(completedClause) + this.currentClause = {} +} + +lunr.QueryParser.parseClause = function (parser) { + var lexeme = parser.peekLexeme() + + if (lexeme == undefined) { + return + } + + switch (lexeme.type) { + case lunr.QueryLexer.PRESENCE: + return lunr.QueryParser.parsePresence + case lunr.QueryLexer.FIELD: + return lunr.QueryParser.parseField + case lunr.QueryLexer.TERM: + return lunr.QueryParser.parseTerm + default: + var errorMessage = "expected either a field or a term, found " + lexeme.type + + if (lexeme.str.length >= 1) { + errorMessage += " with value '" + lexeme.str + "'" + } + + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } +} + +lunr.QueryParser.parsePresence = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + switch (lexeme.str) { + case "-": + parser.currentClause.presence = lunr.Query.presence.PROHIBITED + break + case "+": + parser.currentClause.presence = lunr.Query.presence.REQUIRED + break + default: + var errorMessage = "unrecognised presence operator'" + lexeme.str + "'" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + var errorMessage = "expecting term or field, found nothing" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.FIELD: + return lunr.QueryParser.parseField + case lunr.QueryLexer.TERM: + return lunr.QueryParser.parseTerm + default: + var errorMessage = "expecting term or field, found '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + +lunr.QueryParser.parseField = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + if (parser.query.allFields.indexOf(lexeme.str) == -1) { + var possibleFields = parser.query.allFields.map(function (f) { return "'" + f + "'" }).join(', '), + errorMessage = "unrecognised field '" + lexeme.str + "', possible fields: " + possibleFields + + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + parser.currentClause.fields = [lexeme.str] + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + var errorMessage = "expecting term, found nothing" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + return lunr.QueryParser.parseTerm + default: + var errorMessage = "expecting term, found '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + +lunr.QueryParser.parseTerm = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + parser.currentClause.term = lexeme.str.toLowerCase() + + if (lexeme.str.indexOf("*") != -1) { + parser.currentClause.usePipeline = false + } + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + parser.nextClause() + return + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + parser.nextClause() + return lunr.QueryParser.parseTerm + case lunr.QueryLexer.FIELD: + parser.nextClause() + return lunr.QueryParser.parseField + case lunr.QueryLexer.EDIT_DISTANCE: + return lunr.QueryParser.parseEditDistance + case lunr.QueryLexer.BOOST: + return lunr.QueryParser.parseBoost + case lunr.QueryLexer.PRESENCE: + parser.nextClause() + return lunr.QueryParser.parsePresence + default: + var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + +lunr.QueryParser.parseEditDistance = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + var editDistance = parseInt(lexeme.str, 10) + + if (isNaN(editDistance)) { + var errorMessage = "edit distance must be numeric" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + parser.currentClause.editDistance = editDistance + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + parser.nextClause() + return + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + parser.nextClause() + return lunr.QueryParser.parseTerm + case lunr.QueryLexer.FIELD: + parser.nextClause() + return lunr.QueryParser.parseField + case lunr.QueryLexer.EDIT_DISTANCE: + return lunr.QueryParser.parseEditDistance + case lunr.QueryLexer.BOOST: + return lunr.QueryParser.parseBoost + case lunr.QueryLexer.PRESENCE: + parser.nextClause() + return lunr.QueryParser.parsePresence + default: + var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + +lunr.QueryParser.parseBoost = function (parser) { + var lexeme = parser.consumeLexeme() + + if (lexeme == undefined) { + return + } + + var boost = parseInt(lexeme.str, 10) + + if (isNaN(boost)) { + var errorMessage = "boost must be numeric" + throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end) + } + + parser.currentClause.boost = boost + + var nextLexeme = parser.peekLexeme() + + if (nextLexeme == undefined) { + parser.nextClause() + return + } + + switch (nextLexeme.type) { + case lunr.QueryLexer.TERM: + parser.nextClause() + return lunr.QueryParser.parseTerm + case lunr.QueryLexer.FIELD: + parser.nextClause() + return lunr.QueryParser.parseField + case lunr.QueryLexer.EDIT_DISTANCE: + return lunr.QueryParser.parseEditDistance + case lunr.QueryLexer.BOOST: + return lunr.QueryParser.parseBoost + case lunr.QueryLexer.PRESENCE: + parser.nextClause() + return lunr.QueryParser.parsePresence + default: + var errorMessage = "Unexpected lexeme type '" + nextLexeme.type + "'" + throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end) + } +} + + /** + * 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 (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(factory) + } else if (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 + })) +})(); diff --git a/assets/js/lunr/lunr.min.js b/assets/js/lunr/lunr.min.js new file mode 100644 index 0000000..cdc94cd --- /dev/null +++ b/assets/js/lunr/lunr.min.js @@ -0,0 +1,6 @@ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + */ +!function(){var e=function(t){var r=new e.Builder;return r.pipeline.add(e.trimmer,e.stopWordFilter,e.stemmer),r.searchPipeline.add(e.stemmer),t.call(r,r),r.build()};e.version="2.3.9",e.utils={},e.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),e.utils.asString=function(e){return void 0===e||null===e?"":e.toString()},e.utils.clone=function(e){if(null===e||void 0===e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i0){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}(); diff --git a/assets/js/main.min.js b/assets/js/main.min.js new file mode 100644 index 0000000..0ea1b69 --- /dev/null +++ b/assets/js/main.min.js @@ -0,0 +1,6 @@ +/*! + * Minimal Mistakes Jekyll Theme 4.24.0 by Michael Rose + * Copyright 2013-2021 Michael Rose - mademistakes.com | @mmistakes + * Licensed under MIT + */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";function m(e){return null!=e&&e===e.window}var t=[],n=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,o=t.indexOf,r={},i=r.toString,v=r.hasOwnProperty,a=v.toString,l=a.call(Object),y={},b=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},T=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function x(e,t,n){var r,o,i=(n=n||T).createElement("script");if(i.text=e,t)for(r in c)(o=t[r]||t.getAttribute&&t.getAttribute(r))&&i.setAttribute(r,o);n.head.appendChild(i).parentNode.removeChild(i)}function h(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?r[i.call(e)]||"object":typeof e}var f="3.5.1",E=function(e,t){return new E.fn.init(e,t)};function d(e){var t=!!e&&"length"in e&&e.length,n=h(e);return!b(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&0>10|55296,1023&e|56320))}function r(){C()}var e,p,x,i,o,h,d,m,w,u,l,C,T,a,E,g,s,c,v,S="sizzle"+ +new Date,y=n.document,k=0,b=0,A=ue(),N=ue(),j=ue(),I=ue(),L=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],O=t.pop,H=t.push,P=t.push,q=t.slice,M=function(e,t){for(var n=0,r=e.length;n+~]|"+$+")"+$+"*"),Q=new RegExp($+"|>"),Y=new RegExp(F),V=new RegExp("^"+R+"$"),G={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+$+"*(even|odd|(([+-]|)(\\d*)n|)"+$+"*(?:([+-]|)"+$+"*(\\d+)|))"+$+"*\\)|)","i"),bool:new RegExp("^(?:"+_+")$","i"),needsContext:new RegExp("^"+$+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+$+"*((?:-\\d)?\\d*)"+$+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,Z=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,ee=/^[^{]+\{\s*\[native \w/,te=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ne=/[+~]/,re=new RegExp("\\\\[\\da-fA-F]{1,6}"+$+"?|\\\\([^\\r\\n\\f])","g"),oe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ae=ye(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{P.apply(t=q.call(y.childNodes),y.childNodes),t[y.childNodes.length].nodeType}catch(e){P={apply:t.length?function(e,t){H.apply(e,q.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(t,e,n,r){var o,i,a,s,u,l,c,f=e&&e.ownerDocument,d=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==d&&9!==d&&11!==d)return n;if(!r&&(C(e),e=e||T,E)){if(11!==d&&(u=te.exec(t)))if(o=u[1]){if(9===d){if(!(a=e.getElementById(o)))return n;if(a.id===o)return n.push(a),n}else if(f&&(a=f.getElementById(o))&&v(e,a)&&a.id===o)return n.push(a),n}else{if(u[2])return P.apply(n,e.getElementsByTagName(t)),n;if((o=u[3])&&p.getElementsByClassName&&e.getElementsByClassName)return P.apply(n,e.getElementsByClassName(o)),n}if(p.qsa&&!I[t+" "]&&(!g||!g.test(t))&&(1!==d||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===d&&(Q.test(t)||X.test(t))){for((f=ne.test(t)&&me(e.parentNode)||e)===e&&p.scope||((s=e.getAttribute("id"))?s=s.replace(oe,ie):e.setAttribute("id",s=S)),i=(l=h(t)).length;i--;)l[i]=(s?"#"+s:":scope")+" "+ve(l[i]);c=l.join(",")}try{return P.apply(n,f.querySelectorAll(c)),n}catch(e){I(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return m(t.replace(W,"$1"),e,n,r)}function ue(){var n=[];function r(e,t){return n.push(e+" ")>x.cacheLength&&delete r[n.shift()],r[e+" "]=t}return r}function le(e){return e[S]=!0,e}function ce(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),r=n.length;r--;)x.attrHandle[n[r]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function he(a){return le(function(i){return i=+i,le(function(e,t){for(var n,r=a([],e.length,i),o=r.length;o--;)e[n=r[o]]&&(e[n]=!(t[n]=e[n]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in p=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,e=(e.ownerDocument||e).documentElement;return!K.test(t||e&&e.nodeName||"HTML")},C=se.setDocument=function(e){var t,e=e?e.ownerDocument||e:y;return e!=T&&9===e.nodeType&&e.documentElement&&(a=(T=e).documentElement,E=!o(T),y!=T&&(t=T.defaultView)&&t.top!==t&&(t.addEventListener?t.addEventListener("unload",r,!1):t.attachEvent&&t.attachEvent("onunload",r)),p.scope=ce(function(e){return a.appendChild(e).appendChild(T.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),p.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=ce(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=ee.test(T.getElementsByClassName),p.getById=ce(function(e){return a.appendChild(e).id=S,!T.getElementsByName||!T.getElementsByName(S).length}),p.getById?(x.filter.ID=function(e){var t=e.replace(re,f);return function(e){return e.getAttribute("id")===t}},x.find.ID=function(e,t){if(void 0!==t.getElementById&&E){e=t.getElementById(e);return e?[e]:[]}}):(x.filter.ID=function(e){var t=e.replace(re,f);return function(e){e=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return e&&e.value===t}},x.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),x.find.TAG=p.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"!==e)return i;for(;n=i[o++];)1===n.nodeType&&r.push(n);return r},x.find.CLASS=p.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],g=[],(p.qsa=ee.test(T.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+$+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+$+"*(?:value|"+_+")"),e.querySelectorAll("[id~="+S+"-]").length||g.push("~="),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+$+"*name"+$+"*="+$+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+$+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(p.matchesSelector=ee.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){p.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),g=g.length&&new RegExp(g.join("|")),s=s.length&&new RegExp(s.join("|")),t=ee.test(a.compareDocumentPosition),v=t||ee.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,t=t&&t.parentNode;return e===t||!(!t||1!==t.nodeType||!(n.contains?n.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},L=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e==T||e.ownerDocument==y&&v(y,e)?-1:t==T||t.ownerDocument==y&&v(y,t)?1:u?M(u,e)-M(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],s=[t];if(!o||!i)return e==T?-1:t==T?1:o?-1:i?1:u?M(u,e)-M(u,t):0;if(o===i)return de(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?de(a[r],s[r]):a[r]==y?-1:s[r]==y?1:0}),T},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(C(e),p.matchesSelector&&E&&!I[t+" "]&&(!s||!s.test(t))&&(!g||!g.test(t)))try{var n=c.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){I(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(re,f),e[3]=(e[3]||e[4]||e[5]||"").replace(re,f),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&Y.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(re,f).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=A[e+" "];return t||(t=new RegExp("(^|"+$+")"+e+"("+$+"|$)"))&&A(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(e){e=se.attr(e,t);return null==e?"!="===n:!n||(e+="","="===n?e===r:"!="===n?e!==r:"^="===n?r&&0===e.indexOf(r):"*="===n?r&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return b(n)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){if(!e)return this;if(n=n||I,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):b(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:T,!0)),N.test(r[1])&&E.isPlainObject(t))for(var r in t)b(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(e=T.getElementById(r[2]))&&(this[0]=e,this.length=1),this}).prototype=E.fn,I=E(T);var D=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function H(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,de=/^$|^module$|\/(?:java|ecma)script/i;f=T.createDocumentFragment().appendChild(T.createElement("div")),(p=T.createElement("input")).setAttribute("type","radio"),p.setAttribute("checked","checked"),p.setAttribute("name","t"),f.appendChild(p),y.checkClone=f.cloneNode(!0).cloneNode(!0).lastChild.checked,f.innerHTML="",y.noCloneChecked=!!f.cloneNode(!0).lastChild.defaultValue,f.innerHTML="",y.option=!!f.lastChild;var pe={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function he(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&A(e,t)?E.merge([e],n):n}function me(e,t){for(var n=0,r=e.length;n",""]);var ge=/<|&#?\w+;/;function ve(e,t,n,r,o){for(var i,a,s,u,l,c=t.createDocumentFragment(),f=[],d=0,p=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Le(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function De(e,t){var n,r,o,i;if(1===t.nodeType){if(V.hasData(e)&&(i=V.get(e).events))for(o in V.remove(t,"handle events"),i)for(n=0,r=i[o].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",o=function(e){r.remove(),o=null,e&&t("error"===e.type?404:200,e.type)}),T.head.appendChild(r[0])},abort:function(){o&&o()}}});var Gt=[],Kt=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||E.expando+"_"+jt.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",function(e,t,n){var r,o,i,a=!1!==e.jsonp&&(Kt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=b(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Kt,"$1"+r):!1!==e.jsonp&&(e.url+=(It.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return i||E.error(r+" was not called"),i[0]},e.dataTypes[0]="json",o=C[r],C[r]=function(){i=arguments},n.always(function(){void 0===o?E(C).removeProp(r):C[r]=o,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),i&&b(o)&&o(i[0]),i=o=void 0}),"script"}),y.createHTMLDocument=((f=T.implementation.createHTMLDocument("").body).innerHTML="
",2===f.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=T.implementation.createHTMLDocument("")).createElement("base")).href=T.location.href,t.head.appendChild(r)):t=T),r=!n&&[],(n=N.exec(e))?[t.createElement(n[1])]:(n=ve([e],t,r),r&&r.length&&E(r).remove(),E.merge([],n.childNodes)));var r},E.fn.load=function(e,t,n){var r,o,i,a=this,s=e.indexOf(" ");return-1").append(E.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,i||[e.responseText,t,e])})}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,function(e){return t===e.elem}).length},E.offset={setOffset:function(e,t,n){var r,o,i,a,s=E.css(e,"position"),u=E(e),l={};"static"===s&&(e.style.position="relative"),i=u.offset(),r=E.css(e,"top"),a=E.css(e,"left"),a=("absolute"===s||"fixed"===s)&&-1<(r+a).indexOf("auto")?(o=(s=u.position()).top,s.left):(o=parseFloat(r)||0,parseFloat(a)||0),null!=(t=b(t)?t.call(e,n,E.extend({},i)):t).top&&(l.top=t.top-i.top+o),null!=t.left&&(l.left=t.left-i.left+a),"using"in t?t.using.call(e,l):("number"==typeof l.top&&(l.top+="px"),"number"==typeof l.left&&(l.left+="px"),u.css(l))}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),n=n.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],o={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((o=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),o.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-E.css(r,"marginTop",!0),left:t.left-o.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===E.css(e,"position");)e=e.offsetParent;return e||re})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,o){var i="pageYOffset"===o;E.fn[t]=function(e){return F(this,function(e,t,n){var r;return m(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n?r?r[o]:e[t]:void(r?r.scrollTo(i?r.pageXOffset:n,i?n:r.pageYOffset):e[t]=n)},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=Ge(y.pixelPosition,function(e,t){if(t)return t=Ve(e,n),We.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,i){E.fn[i]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),o=r||(!0===e||!0===t?"margin":"border");return F(this,function(e,t,n){var r;return m(e)?0===i.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,o):E.style(e,t,n,o)},s,n?e:void 0,n)}})}),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){E.fn[t]=function(e){return this.on(t,e)}}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){E.fn[n]=function(e,t){return 0x

',t.appendChild(n.childNodes[1])),e&&i.extend(o,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];o.customSelector&&e.push(o.customSelector);var r=".fitvidsignore";o.ignore&&(r=r+", "+o.ignore);e=i(this).find(e.join(","));(e=(e=e.not("object object")).not(r)).each(function(e){var t,n=i(this);0').parent(".fluid-width-video-wrapper").css("padding-top",100*t+"%"),n.removeAttr("height").removeAttr("width"))})})}}(window.jQuery||window.Zepto),$(function(){var n,r,e,o,t=$("nav.greedy-nav .greedy-nav__toggle"),i=$("nav.greedy-nav .visible-links"),a=$("nav.greedy-nav .hidden-links"),s=$("nav.greedy-nav"),u=$("nav.greedy-nav .site-logo"),l=$("nav.greedy-nav .site-logo img"),c=$("nav.greedy-nav .site-title"),f=$("nav.greedy-nav button.search__toggle");function d(){function t(e,t){r+=t,n+=1,o.push(r)}r=n=0,e=1e3,o=[],i.children().outerWidth(t),a.children().each(function(){var e;(e=(e=$(this)).clone()).css("visibility","hidden"),i.append(e),t(0,e.outerWidth()),e.remove()})}d();var p,h,m,g,v=$(window).width(),y=v<768?0:v<1024?1:v<1280?2:3;function b(){var e=(v=$(window).width())<768?0:v<1024?1:v<1280?2:3;e!==y&&d(),y=e,h=i.children().length,p=s.innerWidth()-(0!==u.length?u.outerWidth(!0):0)-c.outerWidth(!0)-(0!==f.length?f.outerWidth(!0):0)-(h!==o.length?t.outerWidth(!0):0),m=o[h-1],po[h]&&(a.children().first().appendTo(i),h+=1,b()),t.attr("count",n-h),h===n?t.addClass("hidden"):t.removeClass("hidden")}$(window).resize(function(){b()}),t.on("click",function(){a.toggleClass("hidden"),$(this).toggleClass("close"),clearTimeout(g)}),a.on("mouseleave",function(){g=setTimeout(function(){a.addClass("hidden")},e)}).on("mouseenter",function(){clearTimeout(g)}),0===l.length||l[0].complete||0!==l[0].naturalWidth?b():l.one("load error",b)}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)}(function(l){function e(){}function c(e,t){h.ev.on("mfp"+e+x,t)}function f(e,t,n,r){var o=document.createElement("div");return o.className="mfp-"+e,n&&(o.innerHTML=n),r?t&&t.appendChild(o):(o=l(o),t&&o.appendTo(t)),o}function d(e,t){h.ev.triggerHandler("mfp"+e,t),h.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),h.st.callbacks[e]&&h.st.callbacks[e].apply(h,l.isArray(t)?t:[t]))}function p(e){return e===t&&h.currTemplate.closeBtn||(h.currTemplate.closeBtn=l(h.st.closeMarkup.replace("%title%",h.st.tClose)),t=e),h.currTemplate.closeBtn}function i(){l.magnificPopup.instance||((h=new e).init(),l.magnificPopup.instance=h)}var h,r,m,o,g,t,u="Close",v="BeforeClose",y="MarkupParse",b="Open",x=".mfp",w="mfp-ready",n="mfp-removing",a="mfp-prevent-close",s=!!window.jQuery,C=l(window);e.prototype={constructor:e,init:function(){var e=navigator.appVersion;h.isLowIE=h.isIE8=document.all&&!document.addEventListener,h.isAndroid=/android/gi.test(e),h.isIOS=/iphone|ipad|ipod/gi.test(e),h.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),h.probablyMobile=h.isAndroid||h.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),m=l(document),h.popupsCache={}},open:function(e){if(!1===e.isObj){h.items=e.items.toArray(),h.index=0;for(var t,n=e.items,r=0;r(e||C.height())},_setFocus:function(){(h.st.focus?h.content.find(h.st.focus).eq(0):h.wrap).focus()},_onFocusIn:function(e){if(e.target!==h.wrap[0]&&!l.contains(h.wrap[0],e.target))return h._setFocus(),!1},_parseMarkup:function(o,e,t){var i;t.data&&(e=l.extend(t.data,e)),d(y,[o,e,t]),l.each(e,function(e,t){return void 0===t||!1===t||void(1<(i=e.split("_")).length?0<(n=o.find(x+"-"+i[0])).length&&("replaceWith"===(r=i[1])?n[0]!==t[0]&&n.replaceWith(t):"img"===r?n.is("img")?n.attr("src",t):n.replaceWith(l("").attr("src",t).attr("class",n.attr("class"))):n.attr(i[1],t)):o.find(x+"-"+e).html(t));var n,r})},_getScrollbarSize:function(){var e;return void 0===h.scrollbarSize&&((e=document.createElement("div")).style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),h.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),h.scrollbarSize}},l.magnificPopup={instance:null,proto:e.prototype,modules:[],open:function(e,t){return i(),(e=e?l.extend(!0,{},e):{}).isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return l.magnificPopup.instance&&l.magnificPopup.instance.close()},registerModule:function(e,t){t.options&&(l.magnificPopup.defaults[e]=t.options),l.extend(this.proto,t.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},l.fn.magnificPopup=function(e){i();var t,n,r,o=l(this);return"string"==typeof e?"open"===e?(t=s?o.data("magnificPopup"):o[0].magnificPopup,n=parseInt(arguments[1],10)||0,r=t.items?t.items[n]:(r=o,(r=t.delegate?r.find(t.delegate):r).eq(n)),h._openClick({mfpEl:r},o,t)):h.isOpen&&h[e].apply(h,Array.prototype.slice.call(arguments,1)):(e=l.extend(!0,{},e),s?o.data("magnificPopup",e):o[0].magnificPopup=e,h.addGroup(o,e)),o};function T(){k&&(S.after(k.addClass(E)).detach(),k=null)}var E,S,k,A="inline";l.magnificPopup.registerModule(A,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){h.types.push(A),c(u+"."+A,function(){T()})},getInline:function(e,t){if(T(),e.src){var n,r=h.st.inline,o=l(e.src);return o.length?((n=o[0].parentNode)&&n.tagName&&(S||(E=r.hiddenClass,S=f(E),E="mfp-"+E),k=o.after(S).detach().removeClass(E)),h.updateStatus("ready")):(h.updateStatus("error",r.tNotFound),o=l("
")),e.inlineElement=o}return h.updateStatus("ready"),h._parseMarkup(t,{},e),t}}});function N(){I&&l(document.body).removeClass(I)}function j(){N(),h.req&&h.req.abort()}var I,L="ajax";l.magnificPopup.registerModule(L,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){h.types.push(L),I=h.st.ajax.cursor,c(u+"."+L,j),c("BeforeChange."+L,j)},getAjax:function(r){I&&l(document.body).addClass(I),h.updateStatus("loading");var e=l.extend({url:r.src,success:function(e,t,n){n={data:e,xhr:n};d("ParseAjax",n),h.appendContent(l(n.data),L),r.finished=!0,N(),h._setFocus(),setTimeout(function(){h.wrap.addClass(w)},16),h.updateStatus("ready"),d("AjaxContentAdded")},error:function(){N(),r.finished=r.loadError=!0,h.updateStatus("error",h.st.ajax.tError.replace("%url%",r.src))}},h.st.ajax.settings);return h.req=l.ajax(e),""}}});var D;l.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var e=h.st.image,t=".image";h.types.push("image"),c(b+t,function(){"image"===h.currItem.type&&e.cursor&&l(document.body).addClass(e.cursor)}),c(u+t,function(){e.cursor&&l(document.body).removeClass(e.cursor),C.off("resize"+x)}),c("Resize"+t,h.resizeImage),h.isLowIE&&c("AfterChange",h.resizeImage)},resizeImage:function(){var e,t=h.currItem;t&&t.img&&h.st.image.verticalFit&&(e=0,h.isLowIE&&(e=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",h.wH-e))},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,D&&clearInterval(D),e.isCheckingImgSize=!1,d("ImageHasSize",e),e.imgHidden&&(h.content&&h.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(t){var n=0,r=t.img[0],o=function(e){D&&clearInterval(D),D=setInterval(function(){0
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){h.types.push(P),c("BeforeChange",function(e,t,n){t!==n&&(t===P?H():n===P&&H(!0))}),c(u+"."+P,function(){H()})},getIframe:function(e,t){var n=e.src,r=h.st.iframe;l.each(r.patterns,function(){if(-1',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=h.st.gallery,e=".mfp-gallery";if(h.direction=!0,!i||!i.enabled)return!1;g+=" mfp-gallery",c(b+e,function(){i.navigateByImgClick&&h.wrap.on("click"+e,".mfp-img",function(){if(1=h.index,h.index=e,h.updateItemHTML()},preloadNearbyImages:function(){for(var e=h.st.gallery.preload,t=Math.min(e[0],h.items.length),n=Math.min(e[1],h.items.length),r=1;r<=(h.direction?n:t);r++)h._preloadItem(h.index+r);for(r=1;r<=(h.direction?t:n);r++)h._preloadItem(h.index-r)},_preloadItem:function(e){var t;e=q(e),h.items[e].preloaded||((t=h.items[e]).parsed||(t=h.parseEl(e)),d("LazyLoad",t),"image"===t.type&&(t.img=l('').on("load.mfploader",function(){t.hasSize=!0}).on("error.mfploader",function(){t.hasSize=!0,t.loadError=!0,d("LazyLoadError",t)}).attr("src",t.src)),t.preloaded=!0)}}});var _="retina";l.magnificPopup.registerModule(_,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){var n,r;1t.durationMax?t.durationMax:t.durationMin&&e=u)return b.cancelScroll(!0),e=t,n=g,0===(t=r)&&document.body.focus(),n||(t.focus(),document.activeElement!==t&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none"),x.scrollTo(0,e)),E("scrollStop",m,r,o),!(y=f=null)},h=function(e){var t,n,r;l+=e-(f=f||e),d=i+s*(n=d=1<(d=0===c?0:l/c)?1:d,"easeInQuad"===(t=m).easing&&(r=n*n),"easeOutQuad"===t.easing&&(r=n*(2-n)),"easeInOutQuad"===t.easing&&(r=n<.5?2*n*n:(4-2*n)*n-1),"easeInCubic"===t.easing&&(r=n*n*n),"easeOutCubic"===t.easing&&(r=--n*n*n+1),"easeInOutCubic"===t.easing&&(r=n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1),"easeInQuart"===t.easing&&(r=n*n*n*n),"easeOutQuart"===t.easing&&(r=1- --n*n*n*n),"easeInOutQuart"===t.easing&&(r=n<.5?8*n*n*n*n:1-8*--n*n*n*n),"easeInQuint"===t.easing&&(r=n*n*n*n*n),"easeOutQuint"===t.easing&&(r=1+--n*n*n*n*n),"easeInOutQuint"===t.easing&&(r=n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n),(r=t.customEasing?t.customEasing(n):r)||n),x.scrollTo(0,Math.floor(d)),p(d,a)||(y=x.requestAnimationFrame(h),f=e)},0===x.pageYOffset&&x.scrollTo(0,0),t=r,e=m,g||history.pushState&&e.updateURL&&history.pushState({smoothScroll:JSON.stringify(e),anchor:t.id},document.title,t===document.documentElement?"#top":"#"+t.id),"matchMedia"in x&&x.matchMedia("(prefers-reduced-motion)").matches?x.scrollTo(0,Math.floor(a)):(E("scrollStart",m,r,o),b.cancelScroll(!0),x.requestAnimationFrame(h)))};function t(e){if(!e.defaultPrevented&&!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)&&"closest"in e.target&&(i=e.target.closest(o),i&&"a"===i.tagName.toLowerCase()&&!e.target.closest(v.ignore)&&i.hostname===x.location.hostname&&i.pathname===x.location.pathname&&/#/.test(i.href))){var t,n,r;try{t=a(decodeURIComponent(i.hash))}catch(e){t=a(i.hash)}if("#"===t){if(!v.topOnEmptyHash)return;n=document.documentElement}else n=document.querySelector(t);(n=n||"#top"!==t?n:document.documentElement)&&(e.preventDefault(),r=v,history.replaceState&&r.updateURL&&!history.state&&(e=(e=x.location.hash)||"",history.replaceState({smoothScroll:JSON.stringify(r),anchor:e||x.pageYOffset},document.title,e||x.location.href)),b.animateScroll(n,i))}}function r(e){var t;null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(v)&&("string"==typeof(t=history.state.anchor)&&t&&!(t=document.querySelector(a(history.state.anchor)))||b.animateScroll(t,null,{updateURL:!1}))}b.destroy=function(){v&&(document.removeEventListener("click",t,!1),x.removeEventListener("popstate",r,!1),b.cancelScroll(),y=n=i=v=null)};return function(){if(!("querySelector"in document&&"addEventListener"in x&&"requestAnimationFrame"in x&&"closest"in x.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";b.destroy(),v=w(S,e||{}),n=v.header?document.querySelector(v.header):null,document.addEventListener("click",t,!1),v.updateURL&&v.popstate&&x.addEventListener("popstate",r,!1)}(),b}}),function(e,t){"function"==typeof define&&define.amd?define([],function(){return t(e)}):"object"==typeof exports?module.exports=t(e):e.Gumshoe=t(e)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,function(c){"use strict";function f(e,t,n){n.settings.events&&(n=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}),t.dispatchEvent(n))}function n(e){var t=0;if(e.offsetParent)for(;e;)t+=e.offsetTop,e=e.offsetParent;return 0<=t?t:0}function d(e){e&&e.sort(function(e,t){return n(e.content)=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)}function p(e,t){var n,r,o=e[e.length-1];if(n=o,r=t,!(!s()||!a(n.content,r,!0)))return o;for(var i=e.length-1;0<=i;i--)if(a(e[i].content,t))return e[i]}function h(e,t){var n;!e||(n=e.nav.closest("li"))&&(n.classList.remove(t.navClass),e.content.classList.remove(t.contentClass),r(n,t),f("gumshoeDeactivate",n,{link:e.nav,content:e.content,settings:t}))}var m={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},r=function(e,t){!t.nested||(e=e.parentNode.closest("li"))&&(e.classList.remove(t.nestedClass),r(e,t))},g=function(e,t){!t.nested||(e=e.parentNode.closest("li"))&&(e.classList.add(t.nestedClass),g(e,t))};return function(e,t){var n,o,i,r,a,s={setup:function(){n=document.querySelectorAll(e),o=[],Array.prototype.forEach.call(n,function(e){var t=document.getElementById(decodeURIComponent(e.hash.substr(1)));t&&o.push({nav:e,content:t})}),d(o)}};s.detect=function(){var e,t,n,r=p(o,a);r?i&&r.content===i.content||(h(i,a),t=a,!(e=r)||(n=e.nav.closest("li"))&&(n.classList.add(t.navClass),e.content.classList.add(t.contentClass),g(n,t),f("gumshoeActivate",n,{link:e.nav,content:e.content,settings:t})),i=r):i&&(h(i,a),i=null)};function u(e){r&&c.cancelAnimationFrame(r),r=c.requestAnimationFrame(s.detect)}function l(e){r&&c.cancelAnimationFrame(r),r=c.requestAnimationFrame(function(){d(o),s.detect()})}s.destroy=function(){i&&h(i,a),c.removeEventListener("scroll",u,!1),a.reflow&&c.removeEventListener("resize",l,!1),a=r=i=n=o=null};return a=function(){var n={};return Array.prototype.forEach.call(arguments,function(e){for(var t in e){if(!e.hasOwnProperty(t))return;n[t]=e[t]}}),n}(m,t||{}),s.setup(),s.detect(),c.addEventListener("scroll",u,!1),a.reflow&&c.addEventListener("resize",l,!1),s}}),$(document).ready(function(){$("#main").fitVids();function e(){(0===$(".author__urls-wrapper button").length?1024<$(window).width():!$(".author__urls-wrapper button").is(":visible"))?$(".sidebar").addClass("sticky"):$(".sidebar").removeClass("sticky")}e(),$(window).resize(function(){e()}),$(".author__urls-wrapper button").on("click",function(){$(".author__urls").toggleClass("is--visible"),$(".author__urls-wrapper button").toggleClass("open")}),$(document).keyup(function(e){27===e.keyCode&&$(".initial-content").hasClass("is--hidden")&&($(".search-content").toggleClass("is--visible"),$(".initial-content").toggleClass("is--hidden"))}),$(".search__toggle").on("click",function(){$(".search-content").toggleClass("is--visible"),$(".initial-content").toggleClass("is--hidden"),setTimeout(function(){$(".search-content input").focus()},400)});new SmoothScroll('a[href*="#"]',{offset:20,speed:400,speedAsDuration:!0,durationMax:500});0<$("nav.toc").length&&new Gumshoe("nav.toc a",{navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:20,reflow:!0,events:!0}),$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif'],a[href$='.webp']").has("> img").addClass("image-popup"),$(".image-popup").magnificPopup({type:"image",tLoading:"Loading image #%curr%...",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]},image:{tError:'Image #%curr% could not be loaded.'},removalDelay:500,mainClass:"mfp-zoom-in",callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim")}},closeOnContentClick:!0,midClick:!0}),$(".page__content").find("h1, h2, h3, h4, h5, h6").each(function(){var e,t=$(this).attr("id");t&&((e=document.createElement("a")).className="header-link",e.href="#"+t,e.innerHTML='Permalink',e.title="Permalink",$(this).append(e))})}); \ No newline at end of file diff --git a/banner.js b/banner.js new file mode 100644 index 0000000..db3974c --- /dev/null +++ b/banner.js @@ -0,0 +1,19 @@ +const fs = require("fs"); +const pkg = require("./package.json"); +const filename = "assets/js/main.min.js"; +const script = fs.readFileSync(filename); +const padStart = str => ("0" + str).slice(-2); +const dateObj = new Date(); +const date = `${dateObj.getFullYear()}-${padStart( + dateObj.getMonth() + 1 +)}-${padStart(dateObj.getDate())}`; +const banner = `/*! + * Minimal Mistakes Jekyll Theme ${pkg.version} by ${pkg.author} + * Copyright 2013-${dateObj.getFullYear()} Michael Rose - mademistakes.com | @mmistakes + * Licensed under ${pkg.license} + */ +`; + +if (script.slice(0, 3) != "/**") { + fs.writeFileSync(filename, banner + script); +} diff --git a/data/gegelati-tutorial-solution.zip b/data/gegelati-tutorial-solution.zip new file mode 100644 index 0000000..82bae2e Binary files /dev/null and b/data/gegelati-tutorial-solution.zip differ diff --git a/data/gegelati-tutorial.zip b/data/gegelati-tutorial.zip new file mode 100644 index 0000000..f0421ab Binary files /dev/null and b/data/gegelati-tutorial.zip differ diff --git a/data/main-inference.cpp b/data/main-inference.cpp new file mode 100644 index 0000000..c16e26e --- /dev/null +++ b/data/main-inference.cpp @@ -0,0 +1,85 @@ +/** +* \file main-inference.cpp +* \author Karol Desnos +* \license CeCILL-C +*/ + +#include +#include +#include +#include + +#include "pendulum.h" +#include "renderer.h" +#include "instructions.h" +#include "replay.h" + +#include "pendulum_wrapper.h" + +int main(int argc, char** argv) { + + std::cout << "Pendulum TPG inference." << std::endl; + + // Use the same instruction set as the one used for training the TPG + Instructions::Set instructionSet; + fillInstructionSet(instructionSet); + + // Use the same parameters as the one used for training the TPG + Learn::LearningParameters params; + File::ParametersParser::loadParametersFromJson(ROOT_DIR "/params.json", params); + + // Setup the Learning Environment (LE) + PendulumWrapper pendulumLE; + + // Instantiate the Learning Agent (LA) + // The learning agent is not strictly needed for inference purposes, + // nevertheless, as it provides a simple API to initialize the execution + // environment, it is easier to use it in this example. + // Also note that this code can be reused as a basis to restart the + // training of a previously saved TPG. + Learn::LearningAgent la(pendulumLE, instructionSet, params); + la.init(); + + // Load the TPG from the file + File::TPGGraphDotImporter importer(ROOT_DIR "/dat/best_tpg.dot", la.getEnvironment(), *la.getTPGGraph()); + importer.importGraph(); + + // Prepare for inference + // Create an execution engine for executing the TPG. + TPG::TPGExecutionEngine tee(la.getEnvironment()); + // Get the root of the TPG (there should be a single one) + const TPG::TPGVertex* root(la.getTPGGraph()->getRootVertices().back()); + + // Init display + Renderer::renderInit(); + + // Simulation and display loop + // Runs until the used exits the display + bool exit = false; + while (!exit) { + // Reset pendulum state + pendulumLE.reset(0, Learn::LearningMode::TESTING); + + for (auto frame = 0; frame < params.maxNbActionsPerEval && !exit; frame++) { + + /// Do one inference with the TPG + auto trace = tee.executeFromRoot(*root); + uint64_t action = ((const TPG::TPGAction*)trace.back())->getActionID(); + + // Apply the action on the learning environment. + pendulumLE.doAction(action); + + // Display the result. + auto uiAction = Renderer::renderEnv(pendulumLE.pendulum.getAngle(), pendulumLE.actions[action] * pendulumLE.pendulum.MAX_TORQUE, frame, 0, pendulumLE.pendulum.TIME_DELTA); + exit = uiAction == INT_MIN; + } + // Display the score obtained + std::cout << "Score: " << pendulumLE.getScore() << std::endl; + } + + // Cleanup instruction set + deleteInstructions(instructionSet); + + // Exit display + Renderer::renderFinalize(); +} \ No newline at end of file diff --git a/data/pendulum_wrapper_solution.zip b/data/pendulum_wrapper_solution.zip new file mode 100644 index 0000000..b6a600e Binary files /dev/null and b/data/pendulum_wrapper_solution.zip differ diff --git a/feed.xml b/feed.xml new file mode 100644 index 0000000..6eabd4b --- /dev/null +++ b/feed.xml @@ -0,0 +1 @@ +Jekyll2024-10-29T13:12:53+00:00https://gegelati.github.io/feed.xmlGEGELATIYour Name \ No newline at end of file diff --git a/img/pendulum_g6_200x200.gif b/img/pendulum_g6_200x200.gif new file mode 100644 index 0000000..38e24a8 Binary files /dev/null and b/img/pendulum_g6_200x200.gif differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..a95ab4c --- /dev/null +++ b/index.html @@ -0,0 +1,791 @@ + + + + + + + + + +GEGELATI introductory tutorial - GEGELATI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+ + +
+ + + + +
+ + + +
+ + + + + +
+ +
+

+ +

+ + + +
+ + +
+ + + +

The objective of this tutorial is to guide you through the training of your first Tangled Program Graph (TPG) with the Gegelati library. +People following this tutorial are assumed to be already acquainted with basic structural and evolutionary concepts of TPGs. +In case you’re not already familiar with these concepts, a basic introduction to these concepts and to Gegelati can be found in the linked 10-minute video.

+ +

The following topics are covered in this tutorial:

+
    +
  • Configuration of a C++ project with Gegelati.
  • +
  • Manual interaction with a Reinforcement Learning (RL) environment.
  • +
  • Interfacing of a RL environment with Gegelati.
  • +
  • Training of a TPG.
  • +
+ +

This tutorial does not require any particular prerequisites. +While being fluent in C++ certainly is an asset to follow this tutorial, bits of that must be written during the tutorial are given in this assignment.

+ +

0. Setup and build the tutorial project

+ +

C++ Environment:

+

This tutorial requires a C++ development environment compatible with the C++17 standard. +Compatibility of this tutorial was tested with MS Visual Studio Community Edition (MSVC) 2019, and GCC v9.

+ +

Bash environment

+

Some scripts embedded in the given files of this tutorial require the availability of a bash environment. +While bash is natively supported in Linux and Mac OS, an installation is required on Windows. +We advise you to use the all-in-one binaries maintained by the git community, and available here!. +When installing the tool, make sure that the tool is added to the PATH environment variable.

+ +

CMake

+

CMake is a utility tool whose purpose is to ease the portability of complex C/C++ applications by generating projects for most popular IDEs (CLion, Visual Studio, Makefile, QT Creator, …), on major operating systems (Linux, Windows, Mac OS). +To achieve this purpose, source code files and project dependencies are specified in a configuration file, called CMakeLists.txt, using a specific description language. +When CMake is launched, it automatically generates a project for a specified IDE, where all dependencies to third-party libraries are configured.

+ +

CMake version 3.12 or newer must be installed for this tutorial. +To check if the CMake tool is already available on your workstation simply type the following command:

+
cmake --version
+
+
In case CMake is not installed click here to display installation advice. +

The latest version of CMake can be downloaded at the following URL: https://cmake.org/download/. +For a simple installation, choose the binary version for windows. +During the installation process, select the “ADD TO PATH FOR ALL USERS” option. +Reboot your system at the end of the installation.

+
+ +

Third-Party Library

+

Several third party libraries and tools need to be installed for this tutorial: Gegelati, SDL2, SDL2_Image, SDL2_ttf, and curl. +The installation process for different OSes is given below.

+ +
On Windows: (Click to expand) +

All library binaries will be downloaded automatically when running the CMake project. +When using MSVC, all DLLs are copied automatically in the executable folders. +When using other compilers, if the library are not found during the build process, please refer to the /tutorial-gegelati/lib/ReadMe.md file for solutions.

+
+ +
On Linux: (Click to expand) +

The SDL library (SDL2, SDL2_Image, SDL2_ttf, and curl) are available in most package repository. +For example, on Ubuntu, simply type the following command:

+
sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev curl
+
+ +

To install Gegelati, you must build it and install it on your machine. +The following commands should do the work to build the latest release:

+
git clone -b master https://github.com/gegelati/gegelati.git
+cd gegelati/bin
+cmake ..
+cmake --build . --target install # On Linux
+
+
+ +
On Mac OS: (Click to expand) +

The SDL library (SDL2, SDL2_Image, and SDL2_ttf) are available in Homebrew. +Simply type the following command:

+
brew install sdl2 sdl2_image sdl2_ttf
+
+ +

To install Gegelati, you must build it and install it on your machine. +The following commands should do the work to build the latest release:

+
git clone -b master https://github.com/gegelati/gegelati.git
+cd gegelati/bin
+cmake ..
+cmake --build . --target install # On Mac OS
+
+
+ +

Tutorial files

+

To download the source files needed to follow this tutorial, simply download the following archive: gegelati-tutorial.zip. +Unzip these file in your favorite folder. +In the remainder of this tutorial, the parent folder where the files were unzipped will be referred as the /gegelati-tutorial folder.

+ +

To create the C++ project for your default build chain (Makefile on linux and Mac OS, MSVC -when installed- on windows), simply type the following commands in a bash terminal:

+
cd gegelati-tutorial/bin
+cmake ..
+
+

To select another IDE, use the cmake -G "<MY_FAVORITE_IDE>" .. command instead. +The list of available IDEs can be obtained by typing cmake -G.

+ +

Alternatively, some IDEs, like Clion, natively support CMake projects. +In this case, simply open a new project in the /gegelati-tutorial folder.

+ +

In all cases, make sure that no error appears during the generation of the CMake project.

+ +

The generated C++ project contains 2 targets : manual-control, and tpg-training. Please note that at this point, only the manual-control target can be built successfully. In order to build the tpg-training target, additional code will be added in Section 2, when interfacing Gegelati with the learning environment.

+ +

1. Meet the pendulum

+

The learning environment used in this tutorial is an inverted pendulum.

+ +
+ +

The pendulum itself is a physical simulation of a weight attached to a pivot with a rigid cord, and subject to both gravity and friction. +In this learning environment, it is possible to apply a clockwise or a counter clockwise torque to the pendulum to influence its swinging.

+ +

As illustrated in the previous GIF, the objective of a learning agent trained within this learning environment is to stabilize the pendulum in the upward position. +It is important to note that the maximum torque that can be applied to the pendulum is not strong enough to bring the pendulum to the upward position. +Hence, the only way to bring the pendulum to this position is to progressively gain some momentum with accelerated swings.

+ +

Build and swing!

+

To better appreciate the difficulty of this task, the first learning agent trained in this tutorial relies on a well known machine learning technique: your brain!

+ +

To build the first executable of this tutorial, open the project generated with CMake; then build the manual-control target and run the produced executable. +In case of an error, make sure you are only building the right target, as other targets cannot be built successfully at this point in the tutorial.

+ +

Once the build is complete, run the executable. +Using the keyboard, you can try to manually balance the pendulum with 7 different actions:

+
    +
  • [S], [D], [F]: Apply a clockwise torque to the pendulum. The strength of the torque applied to the pendulum decreases from left to right.
  • +
  • [J], [K], [L]: Apply a counter-clockwise torque to the pendulum. The strength of the torque applied to the pendulum increases from left to right.
  • +
  • No key: No torque is applied to the pendulum. Only gravity and friction will do their work.
  • +
+ +

Good luck holding the pendulum in the upward position for more than a few seconds.

+ +

Under the C++-hood

+

The simulation parameters of the pendulum can be changed when instantiating the corresponding C++ class. +The default parameter values were carefully chosen to give human beings a chance at stabilizing the pendulum. +Feel free to try other configurations by parameterizing the construction of the pendulum, in the /gegelati-tutorial/src/manual/main-manual.cpp

+ +
Pendulum constructor documentation (Click to expand) +
/**
+* \brief Default constructor for a pendulum.
+*
+* \param[in] a the initial angular position of the pendulum. Default value
+* is M_PI, that is downard position.
+* \param[in] c the initial angular velocity of the pendulum. Default value
+* is 0.0.
+* \param[in] maxSpeed Maximum speed of the pendulum
+* \param[in] maxTorque maximum torque applicable to the pendulum.
+* \param[in] timeDelta Simulation step duration.
+* \param[in] gravity Universal constant
+* \param[in] mass Weight of the pendulum.
+* \param[in] length Length of the pendulum.
+* \param[in] friction Friction slowing down the pendulum proportionally to
+* its velovity.
+*/
+Pendulum(double a = M_PI, double v = 0.0, double maxSpeed = 16.0,
+  double maxTorque = 1.8, double timeDelta = 0.01, double gravity = 9.81,
+  double mass = 0.8, double length = 1.0, double friction = 0.005);
+
+ +
+ +

2. Interfacing with GEGELATI

+ +

To train a Tangled Program Graph with Gegelati, the library needs to interact with the learning environment. +To achieve this purpose, the learning environment must be presented to the library using a standardized API. +In the case of Gegelati, this interfacing is done by specializing the Learn::LearningEnvironment abstract class.

+ + + +

The following steps will guide you through the creation of a PendulumWrapper class, inheriting from the Learn::LearningEnvironment class and interfacing the Pendulum class with Gegelati.

+ +

PendulumWrapper skeleton.

+

The pendulum_wrapper.h and pendulum_wrapper.cpp files already contain the skeleton of the PendulumWrapper class, which you’ll complete throughout the next steps. +To make the class compilable, this code already defines empty methods overriding all the pure virtual methods from the Learn::LearningEnvironment. +Comments in the header file explain the purpose of each method.

+ +

Pendulum attributes

+

A first specific attribute of the PendulumWrapper class is already declared: the actions vector.

+
/* From pendulum_wrapper.h */
+/// Array containing the actions available for the TPG.
+/// These actions are expressed as real numbers in [-1, 1], and will be multiplied
+/// by the MAX_TORQUE of the Pendulum to apply the corresponding action.
+static const std::vector<double> actions;
+
+ +

TODO #1:

+

Your first task is to update the definition of this vector in the pendulum_wrapper.cpp file, so that the 7 actions available to you in the manual version are also the one made available to the TPG. +It should be noted that the size of this vector is automatically used in the PendulumWrapper constructor to initialize the LearningEnvironment parent class with the number of actions available. +A single line of code needs to me modified in this task.

+ +
Solution to #1 +
const std::vector<double> PendulumWrapper::actions{ -1.0, -0.66, -0.33, 0.0, 0.33, 0.66, 1.0 };
+
+
+ +

TODO #2:

+

Add an instance of the Pendulum class to the attributes of the PendulumWrapper class. +Don’t forget to include the pendulum.h file and update the constructor of the class to initialize the Pendulum instance, keeping default parameters for now.

+ +
Solution to #2 +
/* pendulum_wrapper.h: After other includes */
+#include <pendulum.h>
+
+
/* pendulum_wrapper.h: After actions declaration */
+  /// Pendulum interfaced with the GEGELATI Lib  
+  Pendulum pendulum;
+
+
/* pendulum_wrapper.cpp*/
+PendulumWrapper::PendulumWrapper() : LearningEnvironment(actions.size()), pendulum()
+{
+}
+
+
+ +

Data access

+

In this step, you will expose the angle and velocity attributes of the pendulum so that they can be observed by the Gegelati library.

+ +

During the training process, the Gegelati library accesses the data from the environment using the getDataSources() method. +This method returns the observable state of the environment as a vector of references to Data::DataHandler.

+ +

The Data::DataHandler interface class provides a set of services that simplifies the training of TPGs. +In particular, in addition to methods for accessing the data, the Data::DataHandler supports methods for dynamically checking what the addressing space of a data source is, or which data types can be provided by a data source. +It is also possible for a Data::DataHandler to give access to data with a data type differing from the native type used for storing the data.

+ +

For example, with a Primitive2DArray<char>(10,10) data handler storing a 2D array of char[10][10], individual elements of the array can be accessed using the native data type char; but it is also possible to access a 3-by-2 subregion of data by requesting an access to data with type char[3][2]. +For more details on these features, please refer to the doxygen documentation built and delivered with the Gegelati library.

+ +

In the case of the pendulum, we will use the Data::PointerWrapper<T> specialization of the Data::DataHandler class, which acts as an interface between a native pointer (T *) and Gegelati. +Only the following 2 methods of this class needs to be used in this tutorial:

+ +
/**
+ *  \brief Constructor for the PointerWrapper class.
+ *
+ * \param[in] ptr the pointer managed by the PointerWrapper.
+ */
+PointerWrapper(T* ptr = nullptr);
+
+/**
+ * \brief Set the pointer of the PointerWrapper.
+ *
+ * \param[in] ptr the new pointer managed by the PointerWrapper.
+ *
+ */
+void setPointer(T* ptr);
+
+ +

TODO #3:

+

Instantiate two instances of the Data::PointerWrapper<T> class as attributes of the PendulumWrapper. +In the constructor of the PendulumWrapper, make these two Data::PointerWrapper point to the angle and velocity attributes of the pendulum. +Then, update the getDataSources() method to return a vector referring to these two Data::PointerWrapper. +This task requires less than 10 lines of C++ code.

+ +

C++ tip: Pushing a variable T var to a std::vector<std::references_wrapper<T>> vect is done with a simple call to vect.push_back(var).

+ +
Solution to #3 (Click to expand) +

This solution is based on a vector of Data::PointerWrapper<double>. +Alternative solutions based on two Data::PointerWrapper<double> are perfectly viable.

+ +
/* pendulum_wrapper.h : After pendulum declaration */
+/// DataHandler wrappers
+std::vector<Data::PointerWrapper<double>> data;
+
+
/* pendulum_wrapper.cpp */
+PendulumWrapper::PendulumWrapper() : LearningEnvironment(actions.size()), pendulum(), data(2)
+{
+	data.at(0).setPointer(&this->pendulum.getAngle());
+	data.at(1).setPointer(&this->pendulum.getVelocity());
+}
+
+std::vector<std::reference_wrapper<const Data::DataHandler>> PendulumWrapper::getDataSources()
+{
+	std::vector<std::reference_wrapper<const Data::DataHandler>> result;
+	result.push_back(this->data.at(0));
+	result.push_back(this->data.at(1));
+	return result;
+}
+
+
+ +

Actions on the pendulum

+

After exposing the pendulum attributes to the learning agent, this step will give it the ability to act on the pendulum.

+ +

The number of discrete actions that can be taken by the learning agent is given by the getNbActions() method from the learning environment. +The value returned by this method is already set when calling the constructor of the LearningEnvironment parent class of the PendulumWrapper.

+ +

To execute an action, the learning agent calls the doAction(int) method of the learning environment with an argument corresponding to the action to execute.

+ +

TODO #4

+

Implement the PendulumWrapper::doAction(int) method using the actions defined in the actions attribute. +To apply a torque to the pendulum, the Pendulum::applyTorque(double) method must be used.

+
/**
+* \brief Apply the given torque to the pendulum and advance the simulation.
+*
+* \param[in] torque the torque applied to the pendulum. If the given value
+* is not within the [-MAX_TORQUE, MAX_TORQUE] interval, it will be
+* saturated to the closest bound.
+*/
+void applyTorque(double torque);
+
+

Two lines of C++ code are sufficient for this task.

+ +
Solution to #4 (Click to expand) +
/* pendulum_wrapper.cpp */
+void PendulumWrapper::doAction(uint64_t actionID)
+{
+  	// Retrieve the torque corresponding to the ID
+  	double torque = this->actions[actionID] * pendulum.MAX_TORQUE;
+
+  	// Apply it to the pendulum
+  	this->pendulum.applyTorque(torque);
+}
+
+
+ +

TODO #5

+

To train the TPG, the reinforcement learning process requires making many attempts to stabilize it in the upward position. +Between each attempt, the initial position of the pendulum is reset using the reset() method. +Implement this method so that the pendulum managed by the PendulumWrapper always starts in a downward static state. +Two lines of code are needed for this task.

+ +

At this point, the arguments of the reset methods can be ignored. +Their utility will be covered in a more advanced tutorial.

+ +
Solution to #5 (Click to expand) +
/* pendulum_wrapper.cpp */
+void PendulumWrapper::reset(size_t seed, Learn::LearningMode mode)
+{
+	this->pendulum.setAngle(M_PI);
+	this->pendulum.setVelocity(0.0);
+}
+
+
+ +

Reward mechanism

+

In this last step, you are going to implement the reward mechanism used by Gegelati to identify the best strategies for controlling the pendulum.

+ +

The objective of this learning environment is to steady the pendulum in the upward position. +While it is easy to measure the distance of the pendulum to the upward position at each simulation step, appreciating the steadiness of the pendulum in this position can only be achieved over time. +Hence, the computation of the reward will be accumulated in a double attribute of the PendulumWrapper. +At each simulation step $i$, this reward will be updated as follows:

+ +
+$$ reward_{0} = 0 $$ +$$ reward_{i} = reward_{i-1} - (0.1 \cdot \theta^2 + 0.01 \cdot \omega^2 + 0.001\cdot \tau^2) $$ +
+ +

where $\theta$ is the angular distance to the upward position, $\omega$ is the velocity of the pendulum, and $\tau$ the torque applied to the pendulum. +Intuitively, the purpose of this equation is to minimize the angular distance to the upward position as a primary criteria, but also the velocity of the pendulum when reaching this position, and the torque applied to the pendulum to reach and stay in this position.

+ +

TODO #6

+

Implement the rewarding mechanism in the PendulumWrapper class by:

+
    +
  • Adding an accumulatedReward attribute.
  • +
  • Updating this reward after each action in the doAction(int) method.
  • +
  • Returning this reward in the getScore() method.
  • +
  • Resetting this reward in the reset(int, LearningMode) method. +Less than 10 new lines of code are needed for this task.
  • +
+ +

C++ tip: The double fmod(double, double) method can be used to compute the modulo of two double numbers.

+ +
Solution to #6 (Click to expand) +
/* pendulum_wrapper.h : After the PointerWrapper */
+	double accumulatedReward;
+
+ +
/* pendulum_wrapper.cpp */
+void PendulumWrapper::reset(size_t seed, Learn::LearningMode mode)
+{
+	this->pendulum.setAngle(M_PI);
+	this->pendulum.setVelocity(0.0);
+
+	this->accumulatedReward = 0.0;
+}
+
+void PendulumWrapper::doAction(uint64_t actionID)
+{
+	// Retrieve the torque corresponding to the ID
+	double torque = this->actions[actionID] * pendulum.MAX_TORQUE;
+
+	// Apply it to the pendulum
+	this->pendulum.applyTorque(torque);
+
+	// Get the angle value between -M_PI and M_PI (0 being the upward position)
+	double angle = fmod(this->pendulum.getAngle() + M_PI, 2.0 * M_PI) - M_PI;
+
+	// Compute a reward based on the angle to the upward position, the velocity and the torque.
+	// All three values should be minimized.
+	double reward = -(0.1f*(angle * angle) + 0.01f * (this->pendulum.getVelocity() * this->pendulum.getVelocity()) + 0.001f * (torque * torque));
+
+	// Accumulate the reward
+	accumulatedReward += reward;
+}
+
+double PendulumWrapper::getScore(void) const
+{
+	return accumulatedReward;
+}
+
+
+ +

The pendulum_wrapper.h and pendulum_wrapper.cpp files resulting from this tutorial can be downloaded at the following link: pendulum_wrapper_solution.zip.

+ +

3. Train your first TPG

+

The code needed to interface the pendulum with Gegelati is now complete. +This section will (finally) let you train a TPG with the pendulum learning environment.

+ +

Training procedure

+

The main-training.cpp file contains the entry point of the executable built with the tpg-training target. +The program is structured as follows:

+
    +
  1. Initialize the instruction set used in programs of the TPG.
  2. +
  3. Load the training meta-parameters from the gegelati-tutorial/params.json file.
  4. +
  5. Instantiate the PendulumWrapper learning environment.
  6. +
  7. Instantiate the Learn::LearningAgent class. This utility class will manage most aspects of the training process of the TPG, including its initialization, mutations, and evaluation of the fitness of its roots within the learning environment.
  8. +
  9. Initialize a display window. This display will be used throughout the training to show the behavior of the TPG root with the best score after each generation.
  10. +
  11. Instantiate a logger for keeping track of the training statistics throughout the training.
  12. +
  13. Iterate the genetic evolution process until the maximum number of generation is reached, or until the program is exited.
  14. +
  15. Train one generation. This step, managed by the learning agent, includes the mutation of the TPG to reach the desired number of roots, the evaluation of all the TPG roots, and the decimation of worst fitting root.
  16. +
  17. Create a replay of all actions performed by the best fitting root of the TPG, and trigger a refresh of the display.
  18. +
  19. Go back to step 7.
  20. +
+ +

Training in action

+

Build and run the tpg-training target to observe the TPG training process in action. +For a faster training, it is strongly advised to build the project in Release mode.

+ +

The first output of the training process are the logs generated in the console. +An example of log is presented hereafter:

+ +
Pendulum TPG training.
+                      Train
+      Gen   NbVert      Min      Avg      Max  T_mutat   T_eval  T_total
+        0      164 -7624.63 -1383.36  -980.33     0.00     1.51     1.51
+        1      167 -4848.23 -1263.68  -980.33     7.28     1.56    10.38
+        2      170 -6862.46 -1242.03  -844.01     2.63     1.53    14.55
+        3      170 -7707.18 -1181.00  -844.01     7.60     1.48    23.65
+        4      168
+
+ +

The generated logs contain a table that can be exported in the CSV format by giving a file path to the LABasicLogger constructor. +This table contains the following columns:

+
    +
  • Gen: Number of generation since the start of the training process.
  • +
  • NbVert: Number of vertices (teams + actions) in the TPG before the fitness of the roots is evaluated.
  • +
  • Train.Min/Avg/Max: Minimum, average, and maximum scores obtained during the evaluation process of all roots of the TPG.
  • +
  • T_mutat: Time taken in seconds to apply the mutations to the TPG.
  • +
  • T_eval: Time taken in seconds to evaluate all roots of the TPG.
  • +
  • T_total: Time in seconds since the beginning of the training process.
  • +
+ +

A few insights on these logs:

+
    +
  • It may happen that the maximum score observed at generation $n+1$ is lower than the score observed at a previous generation $n$. +This phenomenon occurs when the best root vertex observed at generation $n$ becomes an internal team of the TPG during the mutation process creating new roots for the next generation. +While this may seem weird to see the score decrease, the genetic material that had lead to a better result is not lost. +If the new roots introduced in the graph do a poor job, they will be decimated rapidly, and the best root will once again become a root. +It may also happen that the former best root remains an internal vertex of the TPG, but is copied during the mutation process, thus becoming a slightly altered root once again. +In any case, the vertex which, as a root, has provided the best reward since the beginning of the training is still the one returned by the learning agent when requesting the best root with the Learn::LearningAgent::getBestRoot() method.
  • +
  • In this learning environment, the time taken for mutating the graph is quite long, especially compared to the time taken for evaluating the roots. +The reason behind this abnormally long mutation times lies in a specific mechanism ensuring the originality of programs produced during the mutation process. +Each time a new program is created, it is compared to randomly selected pre-existing programs. +If the new program does not produce original outputs compared to other programs, it will be mutated over and over until its output becomes original. +While producing an original output is simple in learning environment with large observable space, this is a lot trickier to achieve in a learning environment with only 2 observable variables. +This is why the mutation time is long with this example.
  • +
+ +

The second output of the training process is the display of the pendulum. +While the score presented in the logs are not easily interpretable, this display makes it possible to appreciate how well the trained TPGs are doing.

+ +

With default pendulum parameters and meta-parameters, the learning agent should be able to stabilize the pendulum in less than 25 generations. +During the first generations, the learning agent usually learns how to swing the pendulum closer to the upward position. +Then it learns how to slow down the pendulum when it approaches the upward position. +Finally, it finds a way to stabilize the pendulum.

+ +

4. The fun is only beginning.

+

In this tutorial, you have learned:

+
    +
  • How to setup a project with Gegelati.
  • +
  • Create a custom learning environment.
  • +
  • Train TPG in the learning environment.
  • +
  • Understand the basic logs generated during the training.
  • +
+ +

While this tutorial illustrates the basic concepts of TPG training, Gegelati offers many features to play with TPGs. +The following tutorials guide you through these features, starting from the result of this tutorial. +These tutorial can be followed in any order, so feel free to explore them based on your personal interests and objectives.

+
    +
  • [Partially Available] Export, visualize and import TPG graphs in the DOT format.
  • +
  • [Available Soon] Accelerate training with early termination, random initial states and testing.
  • +
  • [Available Soon] Play with training meta-parameters.
  • +
  • [Available Soon] Explore TPG statistics throughout the training.
  • +
  • [Available Soon] Accelerate TPG training with deterministic multi-core support.
  • +
  • [Available Soon] Generate standalone C code for ultra-fast inference.
  • +
+ +

Several other open-source applications are available in the GitHub repository of Gegelati. +Feel free to explore them to get a better understanding of the wonderful abilities of TPGs.

+
    +
  • Gegelati-apps: MNIST, Tic-Tac-Toe, Nim Game
  • +
  • ALE-wrapper: Wrapper for the 50+ games of the Arcade Learning Environment.
  • +
  • ArmLearn-wrapper: Robotic arm control with 6 servo-motors.
  • +
  • Gym-Gegelati: Wrapper for OpenAI’s Gym reinforcement learning dataset.
  • +
+ + +
+ +
+ + + + + + +
+ + + + +
+ + +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + diff --git a/minimal-mistakes-jekyll.gemspec b/minimal-mistakes-jekyll.gemspec new file mode 100644 index 0000000..e985e49 --- /dev/null +++ b/minimal-mistakes-jekyll.gemspec @@ -0,0 +1,27 @@ +# coding: utf-8 + +Gem::Specification.new do |spec| + spec.name = "minimal-mistakes-jekyll" + spec.version = "4.24.0" + spec.authors = ["Michael Rose"] + + spec.summary = %q{A flexible two-column Jekyll theme.} + spec.homepage = "https://github.com/mmistakes/minimal-mistakes" + spec.license = "MIT" + + spec.metadata["plugin_type"] = "theme" + + spec.files = `git ls-files -z`.split("\x0").select do |f| + f.match(%r{^(assets|_(data|includes|layouts|sass)/|(LICENSE|README|CHANGELOG)((\.(txt|md|markdown)|$)))}i) + end + + spec.add_runtime_dependency "jekyll", ">= 3.7", "< 5.0" + spec.add_runtime_dependency "jekyll-paginate", "~> 1.1" + spec.add_runtime_dependency "jekyll-sitemap", "~> 1.3" + spec.add_runtime_dependency "jekyll-gist", "~> 1.5" + spec.add_runtime_dependency "jekyll-feed", "~> 0.1" + spec.add_runtime_dependency "jekyll-include-cache", "~> 0.1" + + spec.add_development_dependency "bundler" + spec.add_development_dependency "rake", ">= 12.3.3" +end diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..385cef3 --- /dev/null +++ b/robots.txt @@ -0,0 +1 @@ +Sitemap: https://gegelati.github.io/sitemap.xml diff --git a/screenshot-layouts.png b/screenshot-layouts.png new file mode 100644 index 0000000..88ef60f Binary files /dev/null and b/screenshot-layouts.png differ diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..56a0a70 Binary files /dev/null and b/screenshot.png differ diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..d28ecc3 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,18 @@ + + + +https://gegelati.github.io/about/ + + +https://gegelati.github.io/tutos/export-visualize-import + + +https://gegelati.github.io/ + + +https://gegelati.github.io/ + + +https://gegelati.github.io/tutos/ + + diff --git a/staticman.yml b/staticman.yml new file mode 100644 index 0000000..61b9592 --- /dev/null +++ b/staticman.yml @@ -0,0 +1,104 @@ +# Name of the property. You can have multiple properties with completely +# different config blocks for different sections of your site. +# For example, you can have one property to handle comment submission and +# another one to handle posts. +# To encrypt strings use the following endpoint: +# https://{your Staticman API URL}/v[2|3]/encrypt/{TEXT TO BE ENCRYPTED} + +comments: + # (*) REQUIRED + # + # Names of the fields the form is allowed to submit. If a field that is + # not here is part of the request, an error will be thrown. + allowedFields: ["name", "email", "url", "message"] + + # (*) REQUIRED WHEN USING NOTIFICATIONS + # + # When allowedOrigins is defined, only requests sent from one of the domains + # listed will be accepted. The origin is sent as part as the `options` object + # (e.g. +MathJax.Hub.Config({ + tex2jax: { + inlineMath: [['$','$'], ['\\(','\\)']], + processEscapes: true + }, + chtml: { + scale: 0.8 + }, + svg: { + scale: 0.8 + } +}); + + + + + + +Export, visualize and import TPG graphs in the DOT format - GEGELATI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+ + +
+ + + + +
+ + + +
+ + + + + +
+ +
+

+ +

+ + + +
+ + +
+ + + +

The objective of this tutorial is to experiment with the DOT file format supported in Gegelati to export trained Tangled Program Graphs (TPGs), to visualize their topology, and to import them back in a program.

+ +

The following topics are covered in this tutorial:

+
    +
  • Use of the File::TPGGraphDotExporter class to serialize pre-trained TPGs into DOT files.
  • +
  • Visualization of TPG structure evolution throughout the training process using a DOT viewer.
  • +
  • Creation of an inference-only executable using TPG graphs imported with the File::TPGGraphDotImporter class.
  • +
+ +

The starting point of this tutorial is the C++ project obtained at the end of the GEGELATI introductory tutorial. While completing the introductory tutorial is strongly advised, a copy of the project resulting from this tutorial can be downloaded at the following link: pendulum_wrapper_solution.zip.

+ +

0. Export TPGs into DOT files.

+ +

The DOT format

+

DOT is a popular description language that makes it possible to describe graphs with a few lines of code. +With a simple declarative syntax, labeled directed or undirected graphs with homogeneous or heterogeneous types of vertices can be described. +In it simplest form, the DOT syntax (mostly) focuses on the description of the topology of graphs, leaving out graphical and layout concerns. +These graphical and layouting concerns are handled automatically by dedicated visualization tools, such as the open-source GraphViz tool.

+ +

A simple example of graph described with the DOT language is presented in the following excerpt:

+ +
digraph mygraph {
+  root -> A;
+  root -> B -> C;
+  A -> A;
+  B -> A;
+}
+
+ +

The visualization of this graph with xdot produces the following output:

+ +
+ +

In Gegelati, the DOT language is used as the serialization file format for exporting, visualizing and importing TPGs. +The general structure used for storing TPGs is as follows:

+ +
/* Header */
+digraph{
+	graph[pad = "0.212, 0.055" bgcolor = lightgray]  
+	node[shape=circle style = filled label = ""]
+
+    /* Team vertex */
+    T0 [fillcolor="#1199bb"]
+
+    /* Program */
+    P0 [fillcolor="#cccccc" shape=point] //-7|7|0|-4|9|
+
+    /* Program P0 instructions (invisible) */
+    I0 [shape=box style=invis label="2|5&2|1#0|4&#92;n1|3&0|7#0|5&#92;n"]
+    P0 -> I0[style=invis]
+
+    /* Action vertex */
+    A0 [fillcolor="#ff3366" shape=box margin=0.03 width=0 height=0 label="0"]
+
+    /* TPG Edge */
+    T0 -> P0 -> A0
+
+    /* Root list */
+    { rank= same T0 }
+}    
+
+ +

Export TPGs throughout training

+ +

To export TPGs in the DOT format, Gegelati provides the File::TPGGraphDotExporter class. +Each instance of the TPGGraphDotExporter class is associated, on construction to a TPG::TPGGraph. +The constructor of the exporter class is declared as follows:

+ +
/**
+ * \brief Constructor for the exporter.
+ *
+ * \param[in] filePath initial path to the file where the dot content
+ *            will be written.
+ * \param[in] graph const reference to the graph whose content will
+ *            be exported in dot.
+ * \throws std::runtime_error in case no file could be opened at the
+ *         given filePath.
+ */
+TPGGraphDotExporter (const char *filePath, const TPG::TPGGraph &graph)
+
+ +

While the path of the file where the TPG graph is written can be modified, using the TPGGraphDotExporter::setNewFilePath(char*) method, the TPG associated to the exporter on construction can not be changed. +The reason for this constraint is that for a TPG that was already exported, following exports of the TPGs, even after mutations, will keep identical names for teams, programs and actions present in both TPGs, and will create new names for new graphs elements. +Thanks to this features, it is easier to keep track of surviving teams throughout the evolution process.

+ +

TODO 1:

+

To print the trained TPG after each generation of the training process, edit the /gegelati-tutorial/src/training/main-training.cpp file as follows:

+
    +
  • Instantiate an instance of the TPGGraphDotExporter before entering the iterative training process. To retrieve a pointer to the trained TPG, use the following method of the learning agent: Learn::LearningAgent::getTPGGraph().
  • +
  • Use the instantiated exporter within the iterative training process to export a new dot file after each generation.
  • +
  • Print all generated files in the /gegelati-tutorial/dat/ folder. You can use the ROOT_DIR macro within the c++ code to target the /gegelati-tutorial folder automatically. +To trigger the printing of a file, use the TPGGraphDotExporter::print() method.
  • +
+ +
Solution to #1 (Click to expand) +
/* main-training.cpp */
+// Create an exporter for all graphs
+File::TPGGraphDotExporter dotExporter(ROOT_DIR "/dat/tpg_0000.dot", *la.getTPGGraph());
+
+// Train for params.nbGenerations generations
+for (int i = 0; i < params.nbGenerations && !exitProgram; i++) {
+  la.trainOneGeneration(i);
+
+  // Export dot
+  char buff[150];
+  sprintf(buff, ROOT_DIR "/dat/tpg_%04d.dot", i);
+  dotExporter.setNewFilePath(buff);
+  dotExporter.print();    
+
+  // ...
+}
+
+ +
+ +

Export the cleaned best TPG

+

During the training process, the pseudo-random nature of the graph and program mutations causes the apparition of useless elements.

+ +

Training roots: +At the end of the training process, the TPG needs to be exported for further utilization, for example for inferring the pre-trained TPG, as will be done later in this tutorial. +The TPGs exported in the previous step contained all roots present in the TPG at a given generation, which is useful to better understand the training process, but also to pause a training process and restart it later.

+ +

When exporting the TPG resulting from the training, only the graph stemming from the root team providing the best results needs to be exported. +To keep only the TPG stemming from the best root, the Learn::LearningAgent::keepBestPolicy() method should be used.

+ +

Hitchhiker programs: +In TPG graphs, so-called “hitchhiker” programs may appear. +A hitchhiker program is a program that belongs to a team with a valuable behavior without contributing to this useful behavior itself. +A team has a valuable behavior if it helps the TPG to which it belongs to obtain better rewards. +A hitchhiker program is a program that belongs to a valuable team, but that never produces a winning bid when programs of this team are executed. +Because the team has a valuable behavior, it will survive with many generations, with all its programs, including the useless hitchhiker program.

+ +

To identify these hitchhiker programs, the execution of TPG graphs must be instrumented in order to keep track of how many times each team was visited, and how many times each program produced a winning bid. +This instrumentation of the TPG graph is achieved by specifying a specialized TPG factory when instantiating the learning agent. +This can be achieved as follows:

+
Learn::LearningAgent la(pendulumLE, instructionSet, params, TPG::TPGInstrumentedFactory());
+
+ +

After the training process, hitchhiker programs can be cleaned from the TPG using a helper method from this factory, as follows:

+
// Clean unused vertices and teams
+std::shared_ptr<TPG::TPGGraph> tpg = la.getTPGGraph();
+TPG::TPGInstrumentedFactory().clearUnusedTPGGraphElements(*tpg);
+
+ +

Introns: +In Programs, it is very common to observe so-called “intron” instructions that do not directly contribute to the data path leading to the result returned by the program. +While these instructions are automatically detected and skipped during program execution, they may still be valuable during the training process, as they act as dormant genes that may be activated again during future mutations.

+ +

When exporting a TPG graph, these introns only pollute the exported graph, and should thus be removed using the TPG::TPGGraph::clearProgramIntrons() method.

+ +

TODO #2:

+

Update the instatiation of the Learn::LearningAgent to use the TPG::TPGInstrumentedFactory. +Then, after the end of the iterative training process:

+
    +
  • Keep only the best root in the trained TPG.
  • +
  • Remove all its hitchhiker programs.
  • +
  • Clear all introns.
  • +
  • Export the resulting TPG in a dedicated DOT file.
  • +
+ +
Solution to #2 (Click to expand) +
/* main-training.cpp: After the for loop. */
+
+// Clean unused vertices and teams
+std::shared_ptr<TPG::TPGGraph> tpg = la.getTPGGraph();
+TPG::TPGInstrumentedFactory().clearUnusedTPGGraphElements(*tpg);
+
+// Keep only the best root
+la.keepBestPolicy();
+
+// Clean introns
+tpg->clearProgramIntrons();
+
+// Print the resulting TPG
+dotExporter.setNewFilePath(ROOT_DIR "/dat/best_tpg.dot");
+dotExporter.print();
+
+
+ +

1. Visualization of TPG graphs.

+

To visualize TPGs described with DOT, a dedicated tool can be installed on your computer, such as graphviz. +Alternatively, several website propose online viewers for graphs described with the DOT language. +For example, Edotor, GraphvizOnline, or GraphViz Visual Editor can be used to follow this tutorial.

+ +

TPG graphical semantics

+

An excerpt of the visual representation of a TPG produced by GraphViz is presented hereafter:

+
+ +

The large colored circles in the graph represents the teams of the TPG. +At the top of the image, the two darker teams are root teams of the TPG. +Lighter teams are internal teams of the TPG, referenced in the graph stemming from at least one root of the TPG. +The red rectangles represent the actions of the TPG. +The integer numbers in the action rectangles represent the numbers associated to the discrete actions available in the learning environment. +Finally, arrows linking teams to other teams of actions are separated in two halves: the first one linking the team to a program, represented with a tiny circle, and the second one linking the program to its destination team or action. +In case several edges starting from different teams share a common program and destination, a single arrow exists between the program and its destination.

+ +

In-training TPGs and emergent behavior

+ +

The training meta-parameters used in this tutorial, specified in gegelati-tutorial/params.json, specify that the trained TPG should contain 150 roots at each generation, 80% of which are removed during the decimation process. +Hence, the DOT graph exported after each generation contain 30 root teams, which make them quite large when visualized.

+ +

The first observable feature of TPGs during the training process are their maximum depth from root to actions. +When the learning agent and the trained TPG are first initialized, the number of created root is equal to the number of actions available the TPG. +Each of this root is connected to two actions, such that each action is itself connected to two roots. +Hence, at initialization, the depth of the TPG is 1 between roots and actions.

+ +

During the any iteration of the natural selection training process, additional roots are added to the TPGs to reach the desired 150 roots. +These roots are obtained by cloning and mutating existing teams from the TPG. +During this mutation process, program of mutated team can change their destination among surviving teams from the previous generation, but can never point towards another root introduced at the same generation. +Hence, the maximum depth of the TPG can increase, at most, by one at each generation. +This is why, when observing the TPG resulting from the first generation, the graph should contain +30 roots with a maximum depth of 2 between roots and actions.

+ +

In practice, the maximum depth of the TPG remains relatively stable, unless one of the root teams discovers a new valuable strategy. +Indeed, in the absence of a reward breakthrough most newly introduced team, which may be responsible for an increase of the TPG depth, won’t survive any generation. +Thanks to this property, the depth of the TPG graphs automatically reflects the complexity of the strategy deployed for maximizing their rewards. +Hence, when visualizing the TPGs obtained during the first generation, you will most likely not notice a big change in the maximum depth of the TPG.

+ +

When a root team with a valuable behavior appears, it will survive for many generations, thus increasing its chance of being itself referenced by a new root team bringing further improvement of the TPG reward. +When becoming an internal (i.e. non-root) team of the TPG, a team is protected from decimation, which further increases its life-span, and its chance of being referenced during future mutations. +This natural self preservation of valuable behavior is called the emergent hierarchal structure of TPGs.

+ +

TODO #3:

+

Visualize the TPG obtained during throughout the training process, and the structure of the best TPG exported when exiting the training process.

+ +

2. Standalone inference from imported DOT file.

+

Once a pre-trained TPG is exported, an import feature is indispensable to enable using this TPG for inference purposes. +In this step, you will create an inference executable base on a TPG exported in the DOT format.

+ +

Creation of a new executable in the CMake project.

+

TODO #4

+
    +
  1. Download the main-inference.cpp file and place it in the gegelati-tutorial/src/inference/ folder: Download Link.
  2. +
  3. Update the CMake configuration file to add a new target to the project. To do that, add the following lines at the end of the gegelati-tutorial/CMakeLists.txt file: +
    # Sub project for inference
    +file(GLOB
    + inference_files
    + ./src/inference/*.cpp
    + ./src/inference/*.h
    + ./src/training/instructions.*
    + ./src/training/pendulum_wrapper.*
    + params.json
    +)
    +include_directories(${GEGELATI_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR} ${SDL2IMAGE_INCLUDE_DIR} ${SDL2TTF_INCLUDE_DIR} "./src/" "./src/training/")
    +add_executable(tpg-inference ${pendulum_files} ${inference_files})
    +target_link_libraries(tpg-inference ${GEGELATI_LIBRARIES} ${SDL2_LIBRARY} ${SDL2IMAGE_LIBRARY} ${SDL2TTF_LIBRARY})
    +target_compile_definitions(tpg-inference PRIVATE ROOT_DIR="${CMAKE_SOURCE_DIR}")
    +
    +
  4. +
  5. Re-generate the project for your favorite IDE using appropriate CMake commands.
  6. +
+ +

Importing TPG for inference.

+

Open the gegelati-tutorial/src/inference/main-inference.cpp file which is pre-filled with the code needed to load and infer a TPG from a dot file. +The program is structured as follows:

+
    +
  1. Initialize the instruction set of the programs, with the same instructions as the ones used during training.
  2. +
  3. Initialize the PendulumWrapper learning environment and the associated learning agent. While the learning agent is not strictly needed for inference purposes, as it provides a simple API to initialize the execution environment, which is easier to use it in this example. Also note that this learning agent can be reused as a basis to restart the training of a previously saved TPG.
  4. +
  5. Load the TPG from a file using the File::TPGGraphDotImporter class with the following lines. +
    // Load the TPG from the file
    +File::TPGGraphDotImporter importer(ROOT_DIR "/dat/best_tpg.dot", la.getEnvironment(), *la.getTPGGraph());
    +importer.importGraph();
    +
    +

    It is important to note that the importer does not create its own TPG, but fills and replace the one created by the learning agent.

    +
  6. +
  7. Instantiate the TPG::TPGExecutionEngine which will manage the inference of the loaded TPG graph.
  8. +
  9. Initialize the display.
  10. +
  11. In an infinite loop, simulate and display the params.maxNbActionsPerEval actions of the TPG on the pendulum.
  12. +
  13. Each inference of the TPG is handled by the TPG::TPGExecutionEngine, which starts an execution of the TPG from a specified TPG vertex, with the current state of the pendulum learning environment. This executions produces a trace, which corresponds to the list of actors visited during one execution of the TPG. The last vertex visited in the trace is the action selected by the TPG.
  14. +
  15. After each inference, the selected action is applied to the environment, and the display is updated.
  16. +
  17. Necessary cleanups are executed after the simulation loop.
  18. +
+ +

TODO #5

+

Build and run the best TPG saved from a previous training. +Check that the result is identical to the score obtained during the training. +This score is automatically printed in the console after params.maxNbActionsPerEval actions are performed, and before restarting the simulation.

+ +

Conclusion

+

In this tutorial, you have seen how to and visualize TPGs during the training process, and also how to import them back for inference. +The code presented in this tutorial can serve as a basis for many purposes, and notably to restart the training of a TPG saved during the training process.

+ + +
+ +
+ + + + + + +
+ + + + +
+ + +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + diff --git a/tutos/index.html b/tutos/index.html new file mode 100644 index 0000000..d0f1b8c --- /dev/null +++ b/tutos/index.html @@ -0,0 +1,286 @@ + + + + + + + + + +GEGELATI Tutorials - GEGELATI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+ + +
+ + + + +
+ + + + + + + +
+
+ + + + + + + + + + + + + + + + + + +