├── .gitignore ├── .nojekyll ├── README.md ├── _quarto.yml ├── docs ├── img │ └── profile.png ├── index.html ├── projects.html ├── search.json └── site_libs │ ├── bootstrap │ ├── bootstrap-icons.css │ ├── bootstrap-icons.woff │ ├── bootstrap.min.css │ └── bootstrap.min.js │ ├── clipboard │ └── clipboard.min.js │ ├── quarto-html │ ├── anchor.min.js │ ├── popper.min.js │ ├── quarto-syntax-highlighting.css │ ├── quarto.js │ ├── tippy.css │ └── tippy.umd.min.js │ ├── quarto-nav │ ├── headroom.min.js │ └── quarto-nav.js │ └── quarto-search │ ├── autocomplete.umd.js │ ├── fuse.min.js │ └── quarto-search.js ├── img └── profile.png ├── index.qmd ├── projects.qmd └── website-template.Rproj /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # website-template 2 | 3 | [Video tutorial](https://youtu.be/YN75YXaLFGM) 4 | 5 | This is a template for creating a Quarto web site using RStudio. 6 | 7 | To use it effectively you need to know how to push and pull from GitHub to RStudio using the Git panel buttons, which requires a working GitHub personal access token (PAT). If you don't have one setup, following [these instructions](https://happygitwithr.com/https-pat.html#tldr) in *Happy Git and GitHub for the useR* to set one up. (In short you will create a token for HTTPS and store it using **gitcreds**.) 8 | 9 | In addition open RStudio and update to the latest version by clicking "Help" "Check for Updates". (This is necessary to ensure that Quarto is installed.) 10 | 11 | ## ABSOLUTE ESSENTIALS 12 | 13 | *If you have any difficulties or have feedback of any kind, please file an issue or communicate through [Discussions](https://github.com/jtr13/website-template/discussions).* 14 | 15 | ### Copy this template (GitHub) 16 | 17 | - [ ] 1. Click the green "Use this template" button above. (You need to login to GitHub to see this option). Choose the "Create a new repository" option. DO NOT FORK THE REPO. Choose a descriptive name for your repo based on your content. (Unlike when you fork a repo, you get to choose the name. If you change your mind before you do any work, delete your new repo and start over.) Leave the "Public" option checked or else GitHub Pages won't work. 18 | 19 | ### Set up Pages (GitHub) 20 | 21 | - [ ] 1. You've now left the template page and are viewing your new repo on GitHub. On the home page, click Settings. Click the "Pages" section on the left. In the **Build and Deployment** section, set **Source** to "Deploy from a branch" (Classic Pages experience) and **Branch** to **main** with **/docs** folder. Click Save. 22 | 23 | - [ ] 2. Click the little gear button near "About" on the top right side of the home page of the repo and check the "Use your Github Pages website" box under "Website". Click "Save changes". Test the link and you should see a web site with a stick figure on it. It may take a few minutes to build so if it's not working do a few more steps and then come back to check. 24 | 25 | ### Copy the repo link (GitHub) 26 | 27 | - [ ] 1. Click the green Code button, choose "HTTPS" and copy the link below. It should have the format: `https://github.com/[USERNAME]/[REPO NAME].git` 28 | 29 | ### Clone the repo (RStudio) 30 | 31 | - [ ] 1. Clone your new repo with *File, New Project..., Version Control, Git* in RStudio. You will need to paste the link from the previous step in the Repository URL box. If it's not automatically populated, enter the repo name in the "Project directory name:" box. Choose the location of the project 32 | 33 | ### Edit `_quarto.yml` (RStudio) 34 | 35 | Tip: From the file pane in RStudio, open `README.md`, which contains these instructions. You can delete steps as you complete them. 36 | 37 | - [ ] 1. Edit the all caps info in `_quarto.yml` to your info. It's very important to maintain the indenting structure in this file precisely as is -- be careful! 38 | 39 | ### Render the web site (RStudio) 40 | 41 | - [ ] 1. If you haven't already, click "Help" "Check for Updates" to make sure you have the latest version of RStudio (and thus have Quarto installed.) 42 | 43 | - [ ] 2. Render the web site locally by clicking the "Build" tap on the right and then "Render Website". 44 | 45 | - [ ] 3. Use `browseURL("docs/index.html")` to view your site locally (or just open `docs/index.html` in a browser). 46 | 47 | - [ ] 4. If it looks good, commit and push all changed files to GitHub. 48 | 49 | (You will need to repeat steps 2 and 4 every time you wish to update the book online.) 50 | 51 | ### Next steps 52 | 53 | - Add content to `index.qmd` as desired. 54 | 55 | - Add content to `projects.qmd` as desired. 56 | 57 | - Change the photo in the `img` folder to your photo. 58 | 59 | - Choose a theme from [https://bootswatch.com/](https://bootswatch.com/) and replace "cerulean" in `_quarto.yml` with your prefered theme. 60 | 61 | - Add additional tabs/sections by creating new `.qmd` files and listing them in `_quarto.yml` under `projects.qmd`. 62 | 63 | ### Additional features 64 | 65 | Please consult the official guide to **quarto** web sites: [https://quarto.org/docs/websites/](https://quarto.org/docs/websites/) 66 | 67 | ### Last but not least 68 | 69 | Once you've completed these steps, delete the content of this **README** and add a short description of your project with a link to the book URL. It would be appreciated if you add the following to the end: 70 | 71 | *This repo was initially generated from a Quarto template available here: https://github.com/jtr13/website-template.* 72 | 73 | (If you found this helpful, please let us know by starring the repo. ⭐ 😄) 74 | 75 | -------------------------------------------------------------------------------- /_quarto.yml: -------------------------------------------------------------------------------- 1 | project: 2 | type: website 3 | output-dir: docs 4 | 5 | website: 6 | title: "MY WEB SITE" 7 | navbar: 8 | left: 9 | - href: index.qmd 10 | text: Home 11 | - projects.qmd 12 | tools: 13 | - icon: twitter 14 | href: https://twitter.com/ 15 | - icon: github 16 | href: https://github.com/YOURUSERNAME/YOURREPO 17 | page-footer: 18 | right: "Built with [Quarto](https://quarto.org/)" 19 | left: "© Copyright 2023, YOUR NAME" 20 | 21 | format: 22 | html: 23 | theme: cerulean 24 | toc: true 25 | 26 | editor: source 27 | 28 | -------------------------------------------------------------------------------- /docs/img/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtr13/website-template/c3eb589322c282087bd8d3b466a997bd1abd207b/docs/img/profile.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | MY WEB SITE - About Me 11 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
68 |
69 | 98 |
99 | 100 |
101 | 102 | 103 | 104 | 105 |
106 | 107 | 108 | 109 |
110 |
111 |
112 |
113 |
114 |

About Me

115 |
116 |
117 |
118 |
119 |
120 |

Goals

121 |
122 |
123 |

Education

124 |
125 |
126 |

Experience

127 |
128 |
129 |
130 |
131 | 132 |

Thanks for checking out my web site!

133 | 134 | 135 | 136 | 137 |
138 | 364 |
365 | 374 | 375 | 376 | 377 | -------------------------------------------------------------------------------- /docs/projects.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | MY WEB SITE - Projects 11 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
69 |
70 | 99 |
100 | 101 |
102 | 103 | 104 | 115 | 116 |
117 | 118 |
119 |
120 |

Projects

121 |
122 | 123 | 124 | 125 |
126 | 127 | 128 | 129 | 130 |
131 | 132 | 133 |
134 | 135 |
136 |

Project 1

137 |
138 |
139 |

Project 2

140 |
141 |
142 |

Project 3

143 | 144 | 145 |
146 | 147 |
148 | 381 |
382 | 391 | 392 | 393 | 394 | -------------------------------------------------------------------------------- /docs/search.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "objectID": "projects.html#project-2", 4 | "href": "projects.html#project-2", 5 | "title": "Projects", 6 | "section": "Project 2", 7 | "text": "Project 2" 8 | }, 9 | { 10 | "objectID": "projects.html#project-3", 11 | "href": "projects.html#project-3", 12 | "title": "Projects", 13 | "section": "Project 3", 14 | "text": "Project 3" 15 | }, 16 | { 17 | "objectID": "index.html", 18 | "href": "index.html", 19 | "title": "About Me", 20 | "section": "", 21 | "text": "Thanks for checking out my web site!" 22 | } 23 | ] -------------------------------------------------------------------------------- /docs/site_libs/bootstrap/bootstrap-icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtr13/website-template/c3eb589322c282087bd8d3b466a997bd1abd207b/docs/site_libs/bootstrap/bootstrap-icons.woff -------------------------------------------------------------------------------- /docs/site_libs/clipboard/clipboard.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * clipboard.js v2.0.11 3 | * https://clipboardjs.com/ 4 | * 5 | * Licensed MIT © Zeno Rocha 6 | */ 7 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return b}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),r=n.n(e);function c(t){try{return document.execCommand(t)}catch(t){return}}var a=function(t){t=r()(t);return c("cut"),t};function o(t,e){var n,o,t=(n=t,o="rtl"===document.documentElement.getAttribute("dir"),(t=document.createElement("textarea")).style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px",o=window.pageYOffset||document.documentElement.scrollTop,t.style.top="".concat(o,"px"),t.setAttribute("readonly",""),t.value=n,t);return e.container.appendChild(t),e=r()(t),c("copy"),t.remove(),e}var f=function(t){var e=1.anchorjs-link,.anchorjs-link:focus{opacity:1}",u.sheet.cssRules.length),u.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",u.sheet.cssRules.length),u.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',u.sheet.cssRules.length)),u=document.querySelectorAll("[id]"),t=[].map.call(u,function(A){return A.id}),i=0;i\]./()*\\\n\t\b\v\u00A0]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),A=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||A||!1}}}); 9 | // @license-end -------------------------------------------------------------------------------- /docs/site_libs/quarto-html/popper.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @popperjs/core v2.11.4 - MIT License 3 | */ 4 | 5 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.max,a=Math.min,s=Math.round;function f(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),o=1,i=1;if(r(e)&&t){var a=e.offsetHeight,f=e.offsetWidth;f>0&&(o=s(n.width)/f||1),a>0&&(i=s(n.height)/a||1)}return{width:n.width/o,height:n.height/i,top:n.top/i,right:n.right/o,bottom:n.bottom/i,left:n.left/o,x:n.left/o,y:n.top/i}}function c(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function p(e){return e?(e.nodeName||"").toLowerCase():null}function u(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function l(e){return f(u(e)).left+c(e).scrollLeft}function d(e){return t(e).getComputedStyle(e)}function h(e){var t=d(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function m(e,n,o){void 0===o&&(o=!1);var i,a,d=r(n),m=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),v=u(n),g=f(e,m),y={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(d||!d&&!o)&&(("body"!==p(n)||h(v))&&(y=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:c(i)),r(n)?((b=f(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):v&&(b.x=l(v))),{x:g.left+y.scrollLeft-b.x,y:g.top+y.scrollTop-b.y,width:g.width,height:g.height}}function v(e){var t=f(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function g(e){return"html"===p(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||u(e)}function y(e){return["html","body","#document"].indexOf(p(e))>=0?e.ownerDocument.body:r(e)&&h(e)?e:y(g(e))}function b(e,n){var r;void 0===n&&(n=[]);var o=y(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],h(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(b(g(s)))}function x(e){return["table","td","th"].indexOf(p(e))>=0}function w(e){return r(e)&&"fixed"!==d(e).position?e.offsetParent:null}function O(e){for(var n=t(e),i=w(e);i&&x(i)&&"static"===d(i).position;)i=w(i);return i&&("html"===p(i)||"body"===p(i)&&"static"===d(i).position)?n:i||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&r(e)&&"fixed"===d(e).position)return null;var n=g(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(p(n))<0;){var i=d(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var j="top",E="bottom",D="right",A="left",L="auto",P=[j,E,D,A],M="start",k="end",W="viewport",B="popper",H=P.reduce((function(e,t){return e.concat([t+"-"+M,t+"-"+k])}),[]),T=[].concat(P,[L]).reduce((function(e,t){return e.concat([t,t+"-"+M,t+"-"+k])}),[]),R=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function S(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function C(e){return e.split("-")[0]}function q(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function V(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function N(e,r){return r===W?V(function(e){var n=t(e),r=u(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,f=0;return o&&(i=o.width,a=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=o.offsetLeft,f=o.offsetTop)),{width:i,height:a,x:s+l(e),y:f}}(e)):n(r)?function(e){var t=f(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(r):V(function(e){var t,n=u(e),r=c(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=i(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=i(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+l(e),p=-r.scrollTop;return"rtl"===d(o||n).direction&&(f+=i(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:f,y:p}}(u(e)))}function I(e,t,o){var s="clippingParents"===t?function(e){var t=b(g(e)),o=["absolute","fixed"].indexOf(d(e).position)>=0&&r(e)?O(e):e;return n(o)?t.filter((function(e){return n(e)&&q(e,o)&&"body"!==p(e)})):[]}(e):[].concat(t),f=[].concat(s,[o]),c=f[0],u=f.reduce((function(t,n){var r=N(e,n);return t.top=i(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),N(e,c));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function _(e){return e.split("-")[1]}function F(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function U(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?C(o):null,a=o?_(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case j:t={x:s,y:n.y-r.height};break;case E:t={x:s,y:n.y+n.height};break;case D:t={x:n.x+n.width,y:f};break;case A:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?F(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case M:t[c]=t[c]-(n[p]/2-r[p]/2);break;case k:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}function z(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function X(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Y(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,a=r.boundary,s=void 0===a?"clippingParents":a,c=r.rootBoundary,p=void 0===c?W:c,l=r.elementContext,d=void 0===l?B:l,h=r.altBoundary,m=void 0!==h&&h,v=r.padding,g=void 0===v?0:v,y=z("number"!=typeof g?g:X(g,P)),b=d===B?"reference":B,x=e.rects.popper,w=e.elements[m?b:d],O=I(n(w)?w:w.contextElement||u(e.elements.popper),s,p),A=f(e.elements.reference),L=U({reference:A,element:x,strategy:"absolute",placement:i}),M=V(Object.assign({},x,L)),k=d===B?M:A,H={top:O.top-k.top+y.top,bottom:k.bottom-O.bottom+y.bottom,left:O.left-k.left+y.left,right:k.right-O.right+y.right},T=e.modifiersData.offset;if(d===B&&T){var R=T[i];Object.keys(H).forEach((function(e){var t=[D,E].indexOf(e)>=0?1:-1,n=[j,E].indexOf(e)>=0?"y":"x";H[e]+=R[n]*t}))}return H}var G={placement:"bottom",modifiers:[],strategy:"absolute"};function J(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[A,D].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},ie={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return ie[e]}))}var se={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return se[e]}))}function ce(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?T:f,p=_(r),u=p?s?H:H.filter((function(e){return _(e)===p})):P,l=u.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,n){return t[n]=Y(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[C(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var pe={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,g=C(v),y=f||(g===v||!h?[ae(v)]:function(e){if(C(e)===L)return[];var t=ae(e);return[fe(e),t,fe(t)]}(v)),b=[v].concat(y).reduce((function(e,n){return e.concat(C(n)===L?ce(t,{placement:n,boundary:p,rootBoundary:u,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,O=new Map,P=!0,k=b[0],W=0;W=0,S=R?"width":"height",q=Y(t,{placement:B,boundary:p,rootBoundary:u,altBoundary:l,padding:c}),V=R?T?D:A:T?E:j;x[S]>w[S]&&(V=ae(V));var N=ae(V),I=[];if(i&&I.push(q[H]<=0),s&&I.push(q[V]<=0,q[N]<=0),I.every((function(e){return e}))){k=B,P=!1;break}O.set(B,I)}if(P)for(var F=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},U=h?3:1;U>0;U--){if("break"===F(U))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ue(e,t,n){return i(e,a(t,n))}var le={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=void 0===o||o,f=n.altAxis,c=void 0!==f&&f,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,h=n.tether,m=void 0===h||h,g=n.tetherOffset,y=void 0===g?0:g,b=Y(t,{boundary:p,rootBoundary:u,padding:d,altBoundary:l}),x=C(t.placement),w=_(t.placement),L=!w,P=F(x),k="x"===P?"y":"x",W=t.modifiersData.popperOffsets,B=t.rects.reference,H=t.rects.popper,T="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,R="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,q={x:0,y:0};if(W){if(s){var V,N="y"===P?j:A,I="y"===P?E:D,U="y"===P?"height":"width",z=W[P],X=z+b[N],G=z-b[I],J=m?-H[U]/2:0,K=w===M?B[U]:H[U],Q=w===M?-H[U]:-B[U],Z=t.elements.arrow,$=m&&Z?v(Z):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[N],ne=ee[I],re=ue(0,B[U],$[U]),oe=L?B[U]/2-J-re-te-R.mainAxis:K-re-te-R.mainAxis,ie=L?-B[U]/2+J+re+ne+R.mainAxis:Q+re+ne+R.mainAxis,ae=t.elements.arrow&&O(t.elements.arrow),se=ae?"y"===P?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(V=null==S?void 0:S[P])?V:0,ce=z+ie-fe,pe=ue(m?a(X,z+oe-fe-se):X,z,m?i(G,ce):G);W[P]=pe,q[P]=pe-z}if(c){var le,de="x"===P?j:A,he="x"===P?E:D,me=W[k],ve="y"===k?"height":"width",ge=me+b[de],ye=me-b[he],be=-1!==[j,A].indexOf(x),xe=null!=(le=null==S?void 0:S[k])?le:0,we=be?ge:me-B[ve]-H[ve]-xe+R.altAxis,Oe=be?me+B[ve]+H[ve]-xe-R.altAxis:ye,je=m&&be?function(e,t,n){var r=ue(e,t,n);return r>n?n:r}(we,me,Oe):ue(m?we:ge,me,m?Oe:ye);W[k]=je,q[k]=je-me}t.modifiersData[r]=q}},requiresIfExists:["offset"]};var de={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=C(n.placement),f=F(s),c=[A,D].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return z("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:X(e,P))}(o.padding,n),u=v(i),l="y"===f?j:A,d="y"===f?E:D,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],m=a[f]-n.rects.reference[f],g=O(i),y=g?"y"===f?g.clientHeight||0:g.clientWidth||0:0,b=h/2-m/2,x=p[l],w=y-u[c]-p[d],L=y/2-u[c]/2+b,M=ue(x,L,w),k=f;n.modifiersData[r]=((t={})[k]=M,t.centerOffset=M-L,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&q(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function he(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function me(e){return[j,D,E,A].some((function(t){return e[t]>=0}))}var ve={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Y(t,{elementContext:"reference"}),s=Y(t,{altBoundary:!0}),f=he(a,r),c=he(s,o,i),p=me(f),u=me(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}},ge=K({defaultModifiers:[Z,$,ne,re]}),ye=[Z,$,ne,re,oe,pe,le,de,ve],be=K({defaultModifiers:ye});e.applyStyles=re,e.arrow=de,e.computeStyles=ne,e.createPopper=be,e.createPopperLite=ge,e.defaultModifiers=ye,e.detectOverflow=Y,e.eventListeners=Z,e.flip=pe,e.hide=ve,e.offset=oe,e.popperGenerator=K,e.popperOffsets=$,e.preventOverflow=le,Object.defineProperty(e,"__esModule",{value:!0})})); 6 | 7 | -------------------------------------------------------------------------------- /docs/site_libs/quarto-html/quarto-syntax-highlighting.css: -------------------------------------------------------------------------------- 1 | /* quarto syntax highlight colors */ 2 | :root { 3 | --quarto-hl-ot-color: #003B4F; 4 | --quarto-hl-at-color: #657422; 5 | --quarto-hl-ss-color: #20794D; 6 | --quarto-hl-an-color: #5E5E5E; 7 | --quarto-hl-fu-color: #4758AB; 8 | --quarto-hl-st-color: #20794D; 9 | --quarto-hl-cf-color: #003B4F; 10 | --quarto-hl-op-color: #5E5E5E; 11 | --quarto-hl-er-color: #AD0000; 12 | --quarto-hl-bn-color: #AD0000; 13 | --quarto-hl-al-color: #AD0000; 14 | --quarto-hl-va-color: #111111; 15 | --quarto-hl-bu-color: inherit; 16 | --quarto-hl-ex-color: inherit; 17 | --quarto-hl-pp-color: #AD0000; 18 | --quarto-hl-in-color: #5E5E5E; 19 | --quarto-hl-vs-color: #20794D; 20 | --quarto-hl-wa-color: #5E5E5E; 21 | --quarto-hl-do-color: #5E5E5E; 22 | --quarto-hl-im-color: #00769E; 23 | --quarto-hl-ch-color: #20794D; 24 | --quarto-hl-dt-color: #AD0000; 25 | --quarto-hl-fl-color: #AD0000; 26 | --quarto-hl-co-color: #5E5E5E; 27 | --quarto-hl-cv-color: #5E5E5E; 28 | --quarto-hl-cn-color: #8f5902; 29 | --quarto-hl-sc-color: #5E5E5E; 30 | --quarto-hl-dv-color: #AD0000; 31 | --quarto-hl-kw-color: #003B4F; 32 | } 33 | 34 | /* other quarto variables */ 35 | :root { 36 | --quarto-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; 37 | } 38 | 39 | pre > code.sourceCode > span { 40 | color: #003B4F; 41 | } 42 | 43 | code span { 44 | color: #003B4F; 45 | } 46 | 47 | code.sourceCode > span { 48 | color: #003B4F; 49 | } 50 | 51 | div.sourceCode, 52 | div.sourceCode pre.sourceCode { 53 | color: #003B4F; 54 | } 55 | 56 | code span.ot { 57 | color: #003B4F; 58 | font-style: inherit; 59 | } 60 | 61 | code span.at { 62 | color: #657422; 63 | font-style: inherit; 64 | } 65 | 66 | code span.ss { 67 | color: #20794D; 68 | font-style: inherit; 69 | } 70 | 71 | code span.an { 72 | color: #5E5E5E; 73 | font-style: inherit; 74 | } 75 | 76 | code span.fu { 77 | color: #4758AB; 78 | font-style: inherit; 79 | } 80 | 81 | code span.st { 82 | color: #20794D; 83 | font-style: inherit; 84 | } 85 | 86 | code span.cf { 87 | color: #003B4F; 88 | font-style: inherit; 89 | } 90 | 91 | code span.op { 92 | color: #5E5E5E; 93 | font-style: inherit; 94 | } 95 | 96 | code span.er { 97 | color: #AD0000; 98 | font-style: inherit; 99 | } 100 | 101 | code span.bn { 102 | color: #AD0000; 103 | font-style: inherit; 104 | } 105 | 106 | code span.al { 107 | color: #AD0000; 108 | font-style: inherit; 109 | } 110 | 111 | code span.va { 112 | color: #111111; 113 | font-style: inherit; 114 | } 115 | 116 | code span.bu { 117 | font-style: inherit; 118 | } 119 | 120 | code span.ex { 121 | font-style: inherit; 122 | } 123 | 124 | code span.pp { 125 | color: #AD0000; 126 | font-style: inherit; 127 | } 128 | 129 | code span.in { 130 | color: #5E5E5E; 131 | font-style: inherit; 132 | } 133 | 134 | code span.vs { 135 | color: #20794D; 136 | font-style: inherit; 137 | } 138 | 139 | code span.wa { 140 | color: #5E5E5E; 141 | font-style: italic; 142 | } 143 | 144 | code span.do { 145 | color: #5E5E5E; 146 | font-style: italic; 147 | } 148 | 149 | code span.im { 150 | color: #00769E; 151 | font-style: inherit; 152 | } 153 | 154 | code span.ch { 155 | color: #20794D; 156 | font-style: inherit; 157 | } 158 | 159 | code span.dt { 160 | color: #AD0000; 161 | font-style: inherit; 162 | } 163 | 164 | code span.fl { 165 | color: #AD0000; 166 | font-style: inherit; 167 | } 168 | 169 | code span.co { 170 | color: #5E5E5E; 171 | font-style: inherit; 172 | } 173 | 174 | code span.cv { 175 | color: #5E5E5E; 176 | font-style: italic; 177 | } 178 | 179 | code span.cn { 180 | color: #8f5902; 181 | font-style: inherit; 182 | } 183 | 184 | code span.sc { 185 | color: #5E5E5E; 186 | font-style: inherit; 187 | } 188 | 189 | code span.dv { 190 | color: #AD0000; 191 | font-style: inherit; 192 | } 193 | 194 | code span.kw { 195 | color: #003B4F; 196 | font-style: inherit; 197 | } 198 | 199 | .prevent-inlining { 200 | content: " { 9 | // Find any conflicting margin elements and add margins to the 10 | // top to prevent overlap 11 | const marginChildren = window.document.querySelectorAll( 12 | ".column-margin.column-container > * " 13 | ); 14 | 15 | let lastBottom = 0; 16 | for (const marginChild of marginChildren) { 17 | if (marginChild.offsetParent !== null) { 18 | // clear the top margin so we recompute it 19 | marginChild.style.marginTop = null; 20 | const top = marginChild.getBoundingClientRect().top + window.scrollY; 21 | console.log({ 22 | childtop: marginChild.getBoundingClientRect().top, 23 | scroll: window.scrollY, 24 | top, 25 | lastBottom, 26 | }); 27 | if (top < lastBottom) { 28 | const margin = lastBottom - top; 29 | marginChild.style.marginTop = `${margin}px`; 30 | } 31 | const styles = window.getComputedStyle(marginChild); 32 | const marginTop = parseFloat(styles["marginTop"]); 33 | 34 | console.log({ 35 | top, 36 | height: marginChild.getBoundingClientRect().height, 37 | marginTop, 38 | total: top + marginChild.getBoundingClientRect().height + marginTop, 39 | }); 40 | lastBottom = top + marginChild.getBoundingClientRect().height + marginTop; 41 | } 42 | } 43 | }; 44 | 45 | window.document.addEventListener("DOMContentLoaded", function (_event) { 46 | // Recompute the position of margin elements anytime the body size changes 47 | if (window.ResizeObserver) { 48 | const resizeObserver = new window.ResizeObserver( 49 | throttle(layoutMarginEls, 50) 50 | ); 51 | resizeObserver.observe(window.document.body); 52 | } 53 | 54 | const tocEl = window.document.querySelector('nav.toc-active[role="doc-toc"]'); 55 | const sidebarEl = window.document.getElementById("quarto-sidebar"); 56 | const leftTocEl = window.document.getElementById("quarto-sidebar-toc-left"); 57 | const marginSidebarEl = window.document.getElementById( 58 | "quarto-margin-sidebar" 59 | ); 60 | // function to determine whether the element has a previous sibling that is active 61 | const prevSiblingIsActiveLink = (el) => { 62 | const sibling = el.previousElementSibling; 63 | if (sibling && sibling.tagName === "A") { 64 | return sibling.classList.contains("active"); 65 | } else { 66 | return false; 67 | } 68 | }; 69 | 70 | // fire slideEnter for bootstrap tab activations (for htmlwidget resize behavior) 71 | function fireSlideEnter(e) { 72 | const event = window.document.createEvent("Event"); 73 | event.initEvent("slideenter", true, true); 74 | window.document.dispatchEvent(event); 75 | } 76 | const tabs = window.document.querySelectorAll('a[data-bs-toggle="tab"]'); 77 | tabs.forEach((tab) => { 78 | tab.addEventListener("shown.bs.tab", fireSlideEnter); 79 | }); 80 | 81 | // fire slideEnter for tabby tab activations (for htmlwidget resize behavior) 82 | document.addEventListener("tabby", fireSlideEnter, false); 83 | 84 | // Track scrolling and mark TOC links as active 85 | // get table of contents and sidebar (bail if we don't have at least one) 86 | const tocLinks = tocEl 87 | ? [...tocEl.querySelectorAll("a[data-scroll-target]")] 88 | : []; 89 | const makeActive = (link) => tocLinks[link].classList.add("active"); 90 | const removeActive = (link) => tocLinks[link].classList.remove("active"); 91 | const removeAllActive = () => 92 | [...Array(tocLinks.length).keys()].forEach((link) => removeActive(link)); 93 | 94 | // activate the anchor for a section associated with this TOC entry 95 | tocLinks.forEach((link) => { 96 | link.addEventListener("click", () => { 97 | if (link.href.indexOf("#") !== -1) { 98 | const anchor = link.href.split("#")[1]; 99 | const heading = window.document.querySelector( 100 | `[data-anchor-id=${anchor}]` 101 | ); 102 | if (heading) { 103 | // Add the class 104 | heading.classList.add("reveal-anchorjs-link"); 105 | 106 | // function to show the anchor 107 | const handleMouseout = () => { 108 | heading.classList.remove("reveal-anchorjs-link"); 109 | heading.removeEventListener("mouseout", handleMouseout); 110 | }; 111 | 112 | // add a function to clear the anchor when the user mouses out of it 113 | heading.addEventListener("mouseout", handleMouseout); 114 | } 115 | } 116 | }); 117 | }); 118 | 119 | const sections = tocLinks.map((link) => { 120 | const target = link.getAttribute("data-scroll-target"); 121 | if (target.startsWith("#")) { 122 | return window.document.getElementById(decodeURI(`${target.slice(1)}`)); 123 | } else { 124 | return window.document.querySelector(decodeURI(`${target}`)); 125 | } 126 | }); 127 | 128 | const sectionMargin = 200; 129 | let currentActive = 0; 130 | // track whether we've initialized state the first time 131 | let init = false; 132 | 133 | const updateActiveLink = () => { 134 | // The index from bottom to top (e.g. reversed list) 135 | let sectionIndex = -1; 136 | if ( 137 | window.innerHeight + window.pageYOffset >= 138 | window.document.body.offsetHeight 139 | ) { 140 | sectionIndex = 0; 141 | } else { 142 | sectionIndex = [...sections].reverse().findIndex((section) => { 143 | if (section) { 144 | return window.pageYOffset >= section.offsetTop - sectionMargin; 145 | } else { 146 | return false; 147 | } 148 | }); 149 | } 150 | if (sectionIndex > -1) { 151 | const current = sections.length - sectionIndex - 1; 152 | if (current !== currentActive) { 153 | removeAllActive(); 154 | currentActive = current; 155 | makeActive(current); 156 | if (init) { 157 | window.dispatchEvent(sectionChanged); 158 | } 159 | init = true; 160 | } 161 | } 162 | }; 163 | 164 | const inHiddenRegion = (top, bottom, hiddenRegions) => { 165 | for (const region of hiddenRegions) { 166 | if (top <= region.bottom && bottom >= region.top) { 167 | return true; 168 | } 169 | } 170 | return false; 171 | }; 172 | 173 | const categorySelector = "header.quarto-title-block .quarto-category"; 174 | const activateCategories = (href) => { 175 | // Find any categories 176 | // Surround them with a link pointing back to: 177 | // #category=Authoring 178 | try { 179 | const categoryEls = window.document.querySelectorAll(categorySelector); 180 | for (const categoryEl of categoryEls) { 181 | const categoryText = categoryEl.textContent; 182 | if (categoryText) { 183 | const link = `${href}#category=${encodeURIComponent(categoryText)}`; 184 | const linkEl = window.document.createElement("a"); 185 | linkEl.setAttribute("href", link); 186 | for (const child of categoryEl.childNodes) { 187 | linkEl.append(child); 188 | } 189 | categoryEl.appendChild(linkEl); 190 | } 191 | } 192 | } catch { 193 | // Ignore errors 194 | } 195 | }; 196 | function hasTitleCategories() { 197 | return window.document.querySelector(categorySelector) !== null; 198 | } 199 | 200 | function offsetRelativeUrl(url) { 201 | const offset = getMeta("quarto:offset"); 202 | return offset ? offset + url : url; 203 | } 204 | 205 | function offsetAbsoluteUrl(url) { 206 | const offset = getMeta("quarto:offset"); 207 | const baseUrl = new URL(offset, window.location); 208 | 209 | const projRelativeUrl = url.replace(baseUrl, ""); 210 | if (projRelativeUrl.startsWith("/")) { 211 | return projRelativeUrl; 212 | } else { 213 | return "/" + projRelativeUrl; 214 | } 215 | } 216 | 217 | // read a meta tag value 218 | function getMeta(metaName) { 219 | const metas = window.document.getElementsByTagName("meta"); 220 | for (let i = 0; i < metas.length; i++) { 221 | if (metas[i].getAttribute("name") === metaName) { 222 | return metas[i].getAttribute("content"); 223 | } 224 | } 225 | return ""; 226 | } 227 | 228 | async function findAndActivateCategories() { 229 | const currentPagePath = offsetAbsoluteUrl(window.location.href); 230 | const response = await fetch(offsetRelativeUrl("listings.json")); 231 | if (response.status == 200) { 232 | return response.json().then(function (listingPaths) { 233 | const listingHrefs = []; 234 | for (const listingPath of listingPaths) { 235 | const pathWithoutLeadingSlash = listingPath.listing.substring(1); 236 | for (const item of listingPath.items) { 237 | if ( 238 | item === currentPagePath || 239 | item === currentPagePath + "index.html" 240 | ) { 241 | // Resolve this path against the offset to be sure 242 | // we already are using the correct path to the listing 243 | // (this adjusts the listing urls to be rooted against 244 | // whatever root the page is actually running against) 245 | const relative = offsetRelativeUrl(pathWithoutLeadingSlash); 246 | const baseUrl = window.location; 247 | const resolvedPath = new URL(relative, baseUrl); 248 | listingHrefs.push(resolvedPath.pathname); 249 | break; 250 | } 251 | } 252 | } 253 | 254 | // Look up the tree for a nearby linting and use that if we find one 255 | const nearestListing = findNearestParentListing( 256 | offsetAbsoluteUrl(window.location.pathname), 257 | listingHrefs 258 | ); 259 | if (nearestListing) { 260 | activateCategories(nearestListing); 261 | } else { 262 | // See if the referrer is a listing page for this item 263 | const referredRelativePath = offsetAbsoluteUrl(document.referrer); 264 | const referrerListing = listingHrefs.find((listingHref) => { 265 | const isListingReferrer = 266 | listingHref === referredRelativePath || 267 | listingHref === referredRelativePath + "index.html"; 268 | return isListingReferrer; 269 | }); 270 | 271 | if (referrerListing) { 272 | // Try to use the referrer if possible 273 | activateCategories(referrerListing); 274 | } else if (listingHrefs.length > 0) { 275 | // Otherwise, just fall back to the first listing 276 | activateCategories(listingHrefs[0]); 277 | } 278 | } 279 | }); 280 | } 281 | } 282 | if (hasTitleCategories()) { 283 | findAndActivateCategories(); 284 | } 285 | 286 | const findNearestParentListing = (href, listingHrefs) => { 287 | if (!href || !listingHrefs) { 288 | return undefined; 289 | } 290 | // Look up the tree for a nearby linting and use that if we find one 291 | const relativeParts = href.substring(1).split("/"); 292 | while (relativeParts.length > 0) { 293 | const path = relativeParts.join("/"); 294 | for (const listingHref of listingHrefs) { 295 | if (listingHref.startsWith(path)) { 296 | return listingHref; 297 | } 298 | } 299 | relativeParts.pop(); 300 | } 301 | 302 | return undefined; 303 | }; 304 | 305 | const manageSidebarVisiblity = (el, placeholderDescriptor) => { 306 | let isVisible = true; 307 | let elRect; 308 | 309 | return (hiddenRegions) => { 310 | if (el === null) { 311 | return; 312 | } 313 | 314 | // Find the last element of the TOC 315 | const lastChildEl = el.lastElementChild; 316 | 317 | if (lastChildEl) { 318 | // Converts the sidebar to a menu 319 | const convertToMenu = () => { 320 | for (const child of el.children) { 321 | child.style.opacity = 0; 322 | child.style.overflow = "hidden"; 323 | } 324 | 325 | nexttick(() => { 326 | const toggleContainer = window.document.createElement("div"); 327 | toggleContainer.style.width = "100%"; 328 | toggleContainer.classList.add("zindex-over-content"); 329 | toggleContainer.classList.add("quarto-sidebar-toggle"); 330 | toggleContainer.classList.add("headroom-target"); // Marks this to be managed by headeroom 331 | toggleContainer.id = placeholderDescriptor.id; 332 | toggleContainer.style.position = "fixed"; 333 | 334 | const toggleIcon = window.document.createElement("i"); 335 | toggleIcon.classList.add("quarto-sidebar-toggle-icon"); 336 | toggleIcon.classList.add("bi"); 337 | toggleIcon.classList.add("bi-caret-down-fill"); 338 | 339 | const toggleTitle = window.document.createElement("div"); 340 | const titleEl = window.document.body.querySelector( 341 | placeholderDescriptor.titleSelector 342 | ); 343 | if (titleEl) { 344 | toggleTitle.append( 345 | titleEl.textContent || titleEl.innerText, 346 | toggleIcon 347 | ); 348 | } 349 | toggleTitle.classList.add("zindex-over-content"); 350 | toggleTitle.classList.add("quarto-sidebar-toggle-title"); 351 | toggleContainer.append(toggleTitle); 352 | 353 | const toggleContents = window.document.createElement("div"); 354 | toggleContents.classList = el.classList; 355 | toggleContents.classList.add("zindex-over-content"); 356 | toggleContents.classList.add("quarto-sidebar-toggle-contents"); 357 | for (const child of el.children) { 358 | if (child.id === "toc-title") { 359 | continue; 360 | } 361 | 362 | const clone = child.cloneNode(true); 363 | clone.style.opacity = 1; 364 | clone.style.display = null; 365 | toggleContents.append(clone); 366 | } 367 | toggleContents.style.height = "0px"; 368 | const positionToggle = () => { 369 | // position the element (top left of parent, same width as parent) 370 | if (!elRect) { 371 | elRect = el.getBoundingClientRect(); 372 | } 373 | toggleContainer.style.left = `${elRect.left}px`; 374 | toggleContainer.style.top = `${elRect.top}px`; 375 | toggleContainer.style.width = `${elRect.width}px`; 376 | }; 377 | positionToggle(); 378 | 379 | toggleContainer.append(toggleContents); 380 | el.parentElement.prepend(toggleContainer); 381 | 382 | // Process clicks 383 | let tocShowing = false; 384 | // Allow the caller to control whether this is dismissed 385 | // when it is clicked (e.g. sidebar navigation supports 386 | // opening and closing the nav tree, so don't dismiss on click) 387 | const clickEl = placeholderDescriptor.dismissOnClick 388 | ? toggleContainer 389 | : toggleTitle; 390 | 391 | const closeToggle = () => { 392 | if (tocShowing) { 393 | toggleContainer.classList.remove("expanded"); 394 | toggleContents.style.height = "0px"; 395 | tocShowing = false; 396 | } 397 | }; 398 | 399 | // Get rid of any expanded toggle if the user scrolls 400 | window.document.addEventListener( 401 | "scroll", 402 | throttle(() => { 403 | closeToggle(); 404 | }, 50) 405 | ); 406 | 407 | // Handle positioning of the toggle 408 | window.addEventListener( 409 | "resize", 410 | throttle(() => { 411 | elRect = undefined; 412 | positionToggle(); 413 | }, 50) 414 | ); 415 | 416 | window.addEventListener("quarto-hrChanged", () => { 417 | elRect = undefined; 418 | }); 419 | 420 | // Process the click 421 | clickEl.onclick = () => { 422 | if (!tocShowing) { 423 | toggleContainer.classList.add("expanded"); 424 | toggleContents.style.height = null; 425 | tocShowing = true; 426 | } else { 427 | closeToggle(); 428 | } 429 | }; 430 | }); 431 | }; 432 | 433 | // Converts a sidebar from a menu back to a sidebar 434 | const convertToSidebar = () => { 435 | for (const child of el.children) { 436 | child.style.opacity = 1; 437 | child.style.overflow = null; 438 | } 439 | 440 | const placeholderEl = window.document.getElementById( 441 | placeholderDescriptor.id 442 | ); 443 | if (placeholderEl) { 444 | placeholderEl.remove(); 445 | } 446 | 447 | el.classList.remove("rollup"); 448 | }; 449 | 450 | if (isReaderMode()) { 451 | convertToMenu(); 452 | isVisible = false; 453 | } else { 454 | // Find the top and bottom o the element that is being managed 455 | const elTop = el.offsetTop; 456 | const elBottom = 457 | elTop + lastChildEl.offsetTop + lastChildEl.offsetHeight; 458 | 459 | if (!isVisible) { 460 | // If the element is current not visible reveal if there are 461 | // no conflicts with overlay regions 462 | if (!inHiddenRegion(elTop, elBottom, hiddenRegions)) { 463 | convertToSidebar(); 464 | isVisible = true; 465 | } 466 | } else { 467 | // If the element is visible, hide it if it conflicts with overlay regions 468 | // and insert a placeholder toggle (or if we're in reader mode) 469 | if (inHiddenRegion(elTop, elBottom, hiddenRegions)) { 470 | convertToMenu(); 471 | isVisible = false; 472 | } 473 | } 474 | } 475 | } 476 | }; 477 | }; 478 | 479 | const tabEls = document.querySelectorAll('a[data-bs-toggle="tab"]'); 480 | for (const tabEl of tabEls) { 481 | const id = tabEl.getAttribute("data-bs-target"); 482 | if (id) { 483 | const columnEl = document.querySelector( 484 | `${id} .column-margin, .tabset-margin-content` 485 | ); 486 | if (columnEl) 487 | tabEl.addEventListener("shown.bs.tab", function (event) { 488 | const el = event.srcElement; 489 | if (el) { 490 | const visibleCls = `${el.id}-margin-content`; 491 | // walk up until we find a parent tabset 492 | let panelTabsetEl = el.parentElement; 493 | while (panelTabsetEl) { 494 | if (panelTabsetEl.classList.contains("panel-tabset")) { 495 | break; 496 | } 497 | panelTabsetEl = panelTabsetEl.parentElement; 498 | } 499 | 500 | if (panelTabsetEl) { 501 | const prevSib = panelTabsetEl.previousElementSibling; 502 | if ( 503 | prevSib && 504 | prevSib.classList.contains("tabset-margin-container") 505 | ) { 506 | const childNodes = prevSib.querySelectorAll( 507 | ".tabset-margin-content" 508 | ); 509 | for (const childEl of childNodes) { 510 | if (childEl.classList.contains(visibleCls)) { 511 | childEl.classList.remove("collapse"); 512 | } else { 513 | childEl.classList.add("collapse"); 514 | } 515 | } 516 | } 517 | } 518 | } 519 | 520 | layoutMarginEls(); 521 | }); 522 | } 523 | } 524 | 525 | // Manage the visibility of the toc and the sidebar 526 | const marginScrollVisibility = manageSidebarVisiblity(marginSidebarEl, { 527 | id: "quarto-toc-toggle", 528 | titleSelector: "#toc-title", 529 | dismissOnClick: true, 530 | }); 531 | const sidebarScrollVisiblity = manageSidebarVisiblity(sidebarEl, { 532 | id: "quarto-sidebarnav-toggle", 533 | titleSelector: ".title", 534 | dismissOnClick: false, 535 | }); 536 | let tocLeftScrollVisibility; 537 | if (leftTocEl) { 538 | tocLeftScrollVisibility = manageSidebarVisiblity(leftTocEl, { 539 | id: "quarto-lefttoc-toggle", 540 | titleSelector: "#toc-title", 541 | dismissOnClick: true, 542 | }); 543 | } 544 | 545 | // Find the first element that uses formatting in special columns 546 | const conflictingEls = window.document.body.querySelectorAll( 547 | '[class^="column-"], [class*=" column-"], aside, [class*="margin-caption"], [class*=" margin-caption"], [class*="margin-ref"], [class*=" margin-ref"]' 548 | ); 549 | 550 | // Filter all the possibly conflicting elements into ones 551 | // the do conflict on the left or ride side 552 | const arrConflictingEls = Array.from(conflictingEls); 553 | const leftSideConflictEls = arrConflictingEls.filter((el) => { 554 | if (el.tagName === "ASIDE") { 555 | return false; 556 | } 557 | return Array.from(el.classList).find((className) => { 558 | return ( 559 | className !== "column-body" && 560 | className.startsWith("column-") && 561 | !className.endsWith("right") && 562 | !className.endsWith("container") && 563 | className !== "column-margin" 564 | ); 565 | }); 566 | }); 567 | const rightSideConflictEls = arrConflictingEls.filter((el) => { 568 | if (el.tagName === "ASIDE") { 569 | return true; 570 | } 571 | 572 | const hasMarginCaption = Array.from(el.classList).find((className) => { 573 | return className == "margin-caption"; 574 | }); 575 | if (hasMarginCaption) { 576 | return true; 577 | } 578 | 579 | return Array.from(el.classList).find((className) => { 580 | return ( 581 | className !== "column-body" && 582 | !className.endsWith("container") && 583 | className.startsWith("column-") && 584 | !className.endsWith("left") 585 | ); 586 | }); 587 | }); 588 | 589 | const kOverlapPaddingSize = 10; 590 | function toRegions(els) { 591 | return els.map((el) => { 592 | const boundRect = el.getBoundingClientRect(); 593 | const top = 594 | boundRect.top + 595 | document.documentElement.scrollTop - 596 | kOverlapPaddingSize; 597 | return { 598 | top, 599 | bottom: top + el.scrollHeight + 2 * kOverlapPaddingSize, 600 | }; 601 | }); 602 | } 603 | 604 | let hasObserved = false; 605 | const visibleItemObserver = (els) => { 606 | let visibleElements = [...els]; 607 | const intersectionObserver = new IntersectionObserver( 608 | (entries, _observer) => { 609 | entries.forEach((entry) => { 610 | if (entry.isIntersecting) { 611 | if (visibleElements.indexOf(entry.target) === -1) { 612 | visibleElements.push(entry.target); 613 | } 614 | } else { 615 | visibleElements = visibleElements.filter((visibleEntry) => { 616 | return visibleEntry !== entry; 617 | }); 618 | } 619 | }); 620 | 621 | if (!hasObserved) { 622 | hideOverlappedSidebars(); 623 | } 624 | hasObserved = true; 625 | }, 626 | {} 627 | ); 628 | els.forEach((el) => { 629 | intersectionObserver.observe(el); 630 | }); 631 | 632 | return { 633 | getVisibleEntries: () => { 634 | return visibleElements; 635 | }, 636 | }; 637 | }; 638 | 639 | const rightElementObserver = visibleItemObserver(rightSideConflictEls); 640 | const leftElementObserver = visibleItemObserver(leftSideConflictEls); 641 | 642 | const hideOverlappedSidebars = () => { 643 | marginScrollVisibility(toRegions(rightElementObserver.getVisibleEntries())); 644 | sidebarScrollVisiblity(toRegions(leftElementObserver.getVisibleEntries())); 645 | if (tocLeftScrollVisibility) { 646 | tocLeftScrollVisibility( 647 | toRegions(leftElementObserver.getVisibleEntries()) 648 | ); 649 | } 650 | }; 651 | 652 | window.quartoToggleReader = () => { 653 | // Applies a slow class (or removes it) 654 | // to update the transition speed 655 | const slowTransition = (slow) => { 656 | const manageTransition = (id, slow) => { 657 | const el = document.getElementById(id); 658 | if (el) { 659 | if (slow) { 660 | el.classList.add("slow"); 661 | } else { 662 | el.classList.remove("slow"); 663 | } 664 | } 665 | }; 666 | 667 | manageTransition("TOC", slow); 668 | manageTransition("quarto-sidebar", slow); 669 | }; 670 | const readerMode = !isReaderMode(); 671 | setReaderModeValue(readerMode); 672 | 673 | // If we're entering reader mode, slow the transition 674 | if (readerMode) { 675 | slowTransition(readerMode); 676 | } 677 | highlightReaderToggle(readerMode); 678 | hideOverlappedSidebars(); 679 | 680 | // If we're exiting reader mode, restore the non-slow transition 681 | if (!readerMode) { 682 | slowTransition(!readerMode); 683 | } 684 | }; 685 | 686 | const highlightReaderToggle = (readerMode) => { 687 | const els = document.querySelectorAll(".quarto-reader-toggle"); 688 | if (els) { 689 | els.forEach((el) => { 690 | if (readerMode) { 691 | el.classList.add("reader"); 692 | } else { 693 | el.classList.remove("reader"); 694 | } 695 | }); 696 | } 697 | }; 698 | 699 | const setReaderModeValue = (val) => { 700 | if (window.location.protocol !== "file:") { 701 | window.localStorage.setItem("quarto-reader-mode", val); 702 | } else { 703 | localReaderMode = val; 704 | } 705 | }; 706 | 707 | const isReaderMode = () => { 708 | if (window.location.protocol !== "file:") { 709 | return window.localStorage.getItem("quarto-reader-mode") === "true"; 710 | } else { 711 | return localReaderMode; 712 | } 713 | }; 714 | let localReaderMode = null; 715 | 716 | const tocOpenDepthStr = tocEl?.getAttribute("data-toc-expanded"); 717 | const tocOpenDepth = tocOpenDepthStr ? Number(tocOpenDepthStr) : 1; 718 | 719 | // Walk the TOC and collapse/expand nodes 720 | // Nodes are expanded if: 721 | // - they are top level 722 | // - they have children that are 'active' links 723 | // - they are directly below an link that is 'active' 724 | const walk = (el, depth) => { 725 | // Tick depth when we enter a UL 726 | if (el.tagName === "UL") { 727 | depth = depth + 1; 728 | } 729 | 730 | // It this is active link 731 | let isActiveNode = false; 732 | if (el.tagName === "A" && el.classList.contains("active")) { 733 | isActiveNode = true; 734 | } 735 | 736 | // See if there is an active child to this element 737 | let hasActiveChild = false; 738 | for (child of el.children) { 739 | hasActiveChild = walk(child, depth) || hasActiveChild; 740 | } 741 | 742 | // Process the collapse state if this is an UL 743 | if (el.tagName === "UL") { 744 | if (tocOpenDepth === -1 && depth > 1) { 745 | el.classList.add("collapse"); 746 | } else if ( 747 | depth <= tocOpenDepth || 748 | hasActiveChild || 749 | prevSiblingIsActiveLink(el) 750 | ) { 751 | el.classList.remove("collapse"); 752 | } else { 753 | el.classList.add("collapse"); 754 | } 755 | 756 | // untick depth when we leave a UL 757 | depth = depth - 1; 758 | } 759 | return hasActiveChild || isActiveNode; 760 | }; 761 | 762 | // walk the TOC and expand / collapse any items that should be shown 763 | 764 | if (tocEl) { 765 | walk(tocEl, 0); 766 | updateActiveLink(); 767 | } 768 | 769 | // Throttle the scroll event and walk peridiocally 770 | window.document.addEventListener( 771 | "scroll", 772 | throttle(() => { 773 | if (tocEl) { 774 | updateActiveLink(); 775 | walk(tocEl, 0); 776 | } 777 | if (!isReaderMode()) { 778 | hideOverlappedSidebars(); 779 | } 780 | }, 5) 781 | ); 782 | window.addEventListener( 783 | "resize", 784 | throttle(() => { 785 | if (!isReaderMode()) { 786 | hideOverlappedSidebars(); 787 | } 788 | }, 10) 789 | ); 790 | hideOverlappedSidebars(); 791 | highlightReaderToggle(isReaderMode()); 792 | }); 793 | 794 | // grouped tabsets 795 | window.addEventListener("pageshow", (_event) => { 796 | function getTabSettings() { 797 | const data = localStorage.getItem("quarto-persistent-tabsets-data"); 798 | if (!data) { 799 | localStorage.setItem("quarto-persistent-tabsets-data", "{}"); 800 | return {}; 801 | } 802 | if (data) { 803 | return JSON.parse(data); 804 | } 805 | } 806 | 807 | function setTabSettings(data) { 808 | localStorage.setItem( 809 | "quarto-persistent-tabsets-data", 810 | JSON.stringify(data) 811 | ); 812 | } 813 | 814 | function setTabState(groupName, groupValue) { 815 | const data = getTabSettings(); 816 | data[groupName] = groupValue; 817 | setTabSettings(data); 818 | } 819 | 820 | function toggleTab(tab, active) { 821 | const tabPanelId = tab.getAttribute("aria-controls"); 822 | const tabPanel = document.getElementById(tabPanelId); 823 | if (active) { 824 | tab.classList.add("active"); 825 | tabPanel.classList.add("active"); 826 | } else { 827 | tab.classList.remove("active"); 828 | tabPanel.classList.remove("active"); 829 | } 830 | } 831 | 832 | function toggleAll(selectedGroup, selectorsToSync) { 833 | for (const [thisGroup, tabs] of Object.entries(selectorsToSync)) { 834 | const active = selectedGroup === thisGroup; 835 | for (const tab of tabs) { 836 | toggleTab(tab, active); 837 | } 838 | } 839 | } 840 | 841 | function findSelectorsToSyncByLanguage() { 842 | const result = {}; 843 | const tabs = Array.from( 844 | document.querySelectorAll(`div[data-group] a[id^='tabset-']`) 845 | ); 846 | for (const item of tabs) { 847 | const div = item.parentElement.parentElement.parentElement; 848 | const group = div.getAttribute("data-group"); 849 | if (!result[group]) { 850 | result[group] = {}; 851 | } 852 | const selectorsToSync = result[group]; 853 | const value = item.innerHTML; 854 | if (!selectorsToSync[value]) { 855 | selectorsToSync[value] = []; 856 | } 857 | selectorsToSync[value].push(item); 858 | } 859 | return result; 860 | } 861 | 862 | function setupSelectorSync() { 863 | const selectorsToSync = findSelectorsToSyncByLanguage(); 864 | Object.entries(selectorsToSync).forEach(([group, tabSetsByValue]) => { 865 | Object.entries(tabSetsByValue).forEach(([value, items]) => { 866 | items.forEach((item) => { 867 | item.addEventListener("click", (_event) => { 868 | setTabState(group, value); 869 | toggleAll(value, selectorsToSync[group]); 870 | }); 871 | }); 872 | }); 873 | }); 874 | return selectorsToSync; 875 | } 876 | 877 | const selectorsToSync = setupSelectorSync(); 878 | for (const [group, selectedName] of Object.entries(getTabSettings())) { 879 | const selectors = selectorsToSync[group]; 880 | // it's possible that stale state gives us empty selections, so we explicitly check here. 881 | if (selectors) { 882 | toggleAll(selectedName, selectors); 883 | } 884 | } 885 | }); 886 | 887 | function throttle(func, wait) { 888 | let waiting = false; 889 | return function () { 890 | if (!waiting) { 891 | func.apply(this, arguments); 892 | waiting = true; 893 | setTimeout(function () { 894 | waiting = false; 895 | }, wait); 896 | } 897 | }; 898 | } 899 | 900 | function nexttick(func) { 901 | return setTimeout(func, 0); 902 | } 903 | -------------------------------------------------------------------------------- /docs/site_libs/quarto-html/tippy.css: -------------------------------------------------------------------------------- 1 | .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1} -------------------------------------------------------------------------------- /docs/site_libs/quarto-html/tippy.umd.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],t):(e=e||self).tippy=t(e.Popper)}(this,(function(e){"use strict";var t={passive:!0,capture:!0},n=function(){return document.body};function r(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function o(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function i(e,t){return"function"==typeof e?e.apply(void 0,t):e}function a(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function s(e,t){var n=Object.assign({},e);return t.forEach((function(e){delete n[e]})),n}function u(e){return[].concat(e)}function c(e,t){-1===e.indexOf(t)&&e.push(t)}function p(e){return e.split("-")[0]}function f(e){return[].slice.call(e)}function l(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function d(){return document.createElement("div")}function v(e){return["Element","Fragment"].some((function(t){return o(e,t)}))}function m(e){return o(e,"MouseEvent")}function g(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function h(e){return v(e)?[e]:function(e){return o(e,"NodeList")}(e)?f(e):Array.isArray(e)?e:f(document.querySelectorAll(e))}function b(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function y(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function w(e){var t,n=u(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function E(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function O(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var x={isTouch:!1},C=0;function T(){x.isTouch||(x.isTouch=!0,window.performance&&document.addEventListener("mousemove",A))}function A(){var e=performance.now();e-C<20&&(x.isTouch=!1,document.removeEventListener("mousemove",A)),C=e}function L(){var e=document.activeElement;if(g(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var D=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,R=Object.assign({appendTo:n,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),k=Object.keys(R);function P(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=R[o])?r:i);return t}),{});return Object.assign({},e,t)}function j(e,t){var n=Object.assign({},t,{content:i(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(P(Object.assign({},R,{plugins:t}))):k).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},R.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function M(e,t){e.innerHTML=t}function V(e){var t=d();return!0===e?t.className="tippy-arrow":(t.className="tippy-svg-arrow",v(e)?t.appendChild(e):M(t,e)),t}function I(e,t){v(t.content)?(M(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?M(e,t.content):e.textContent=t.content)}function S(e){var t=e.firstElementChild,n=f(t.children);return{box:t,content:n.find((function(e){return e.classList.contains("tippy-content")})),arrow:n.find((function(e){return e.classList.contains("tippy-arrow")||e.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function N(e){var t=d(),n=d();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=d();function o(n,r){var o=S(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||I(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(V(r.arrow))):i.appendChild(V(r.arrow)):s&&i.removeChild(s)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),I(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}N.$$tippy=!0;var B=1,H=[],U=[];function _(o,s){var v,g,h,C,T,A,L,k,M=j(o,Object.assign({},R,P(l(s)))),V=!1,I=!1,N=!1,_=!1,F=[],W=a(we,M.interactiveDebounce),X=B++,Y=(k=M.plugins).filter((function(e,t){return k.indexOf(e)===t})),$={id:X,reference:o,popper:d(),popperInstance:null,props:M,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:Y,clearDelayTimeouts:function(){clearTimeout(v),clearTimeout(g),cancelAnimationFrame(h)},setProps:function(e){if($.state.isDestroyed)return;ae("onBeforeUpdate",[$,e]),be();var t=$.props,n=j(o,Object.assign({},t,l(e),{ignoreAttributes:!0}));$.props=n,he(),t.interactiveDebounce!==n.interactiveDebounce&&(ce(),W=a(we,n.interactiveDebounce));t.triggerTarget&&!n.triggerTarget?u(t.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):n.triggerTarget&&o.removeAttribute("aria-expanded");ue(),ie(),J&&J(t,n);$.popperInstance&&(Ce(),Ae().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));ae("onAfterUpdate",[$,e])},setContent:function(e){$.setProps({content:e})},show:function(){var e=$.state.isVisible,t=$.state.isDestroyed,o=!$.state.isEnabled,a=x.isTouch&&!$.props.touch,s=r($.props.duration,0,R.duration);if(e||t||o||a)return;if(te().hasAttribute("disabled"))return;if(ae("onShow",[$],!1),!1===$.props.onShow($))return;$.state.isVisible=!0,ee()&&(z.style.visibility="visible");ie(),de(),$.state.isMounted||(z.style.transition="none");if(ee()){var u=re(),p=u.box,f=u.content;b([p,f],0)}A=function(){var e;if($.state.isVisible&&!_){if(_=!0,z.offsetHeight,z.style.transition=$.props.moveTransition,ee()&&$.props.animation){var t=re(),n=t.box,r=t.content;b([n,r],s),y([n,r],"visible")}se(),ue(),c(U,$),null==(e=$.popperInstance)||e.forceUpdate(),ae("onMount",[$]),$.props.animation&&ee()&&function(e,t){me(e,t)}(s,(function(){$.state.isShown=!0,ae("onShown",[$])}))}},function(){var e,t=$.props.appendTo,r=te();e=$.props.interactive&&t===n||"parent"===t?r.parentNode:i(t,[r]);e.contains(z)||e.appendChild(z);$.state.isMounted=!0,Ce()}()},hide:function(){var e=!$.state.isVisible,t=$.state.isDestroyed,n=!$.state.isEnabled,o=r($.props.duration,1,R.duration);if(e||t||n)return;if(ae("onHide",[$],!1),!1===$.props.onHide($))return;$.state.isVisible=!1,$.state.isShown=!1,_=!1,V=!1,ee()&&(z.style.visibility="hidden");if(ce(),ve(),ie(!0),ee()){var i=re(),a=i.box,s=i.content;$.props.animation&&(b([a,s],o),y([a,s],"hidden"))}se(),ue(),$.props.animation?ee()&&function(e,t){me(e,(function(){!$.state.isVisible&&z.parentNode&&z.parentNode.contains(z)&&t()}))}(o,$.unmount):$.unmount()},hideWithInteractivity:function(e){ne().addEventListener("mousemove",W),c(H,W),W(e)},enable:function(){$.state.isEnabled=!0},disable:function(){$.hide(),$.state.isEnabled=!1},unmount:function(){$.state.isVisible&&$.hide();if(!$.state.isMounted)return;Te(),Ae().forEach((function(e){e._tippy.unmount()})),z.parentNode&&z.parentNode.removeChild(z);U=U.filter((function(e){return e!==$})),$.state.isMounted=!1,ae("onHidden",[$])},destroy:function(){if($.state.isDestroyed)return;$.clearDelayTimeouts(),$.unmount(),be(),delete o._tippy,$.state.isDestroyed=!0,ae("onDestroy",[$])}};if(!M.render)return $;var q=M.render($),z=q.popper,J=q.onUpdate;z.setAttribute("data-tippy-root",""),z.id="tippy-"+$.id,$.popper=z,o._tippy=$,z._tippy=$;var G=Y.map((function(e){return e.fn($)})),K=o.hasAttribute("aria-expanded");return he(),ue(),ie(),ae("onCreate",[$]),M.showOnCreate&&Le(),z.addEventListener("mouseenter",(function(){$.props.interactive&&$.state.isVisible&&$.clearDelayTimeouts()})),z.addEventListener("mouseleave",(function(){$.props.interactive&&$.props.trigger.indexOf("mouseenter")>=0&&ne().addEventListener("mousemove",W)})),$;function Q(){var e=$.props.touch;return Array.isArray(e)?e:[e,0]}function Z(){return"hold"===Q()[0]}function ee(){var e;return!(null==(e=$.props.render)||!e.$$tippy)}function te(){return L||o}function ne(){var e=te().parentNode;return e?w(e):document}function re(){return S(z)}function oe(e){return $.state.isMounted&&!$.state.isVisible||x.isTouch||C&&"focus"===C.type?0:r($.props.delay,e?0:1,R.delay)}function ie(e){void 0===e&&(e=!1),z.style.pointerEvents=$.props.interactive&&!e?"":"none",z.style.zIndex=""+$.props.zIndex}function ae(e,t,n){var r;(void 0===n&&(n=!0),G.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=$.props)[e].apply(r,t)}function se(){var e=$.props.aria;if(e.content){var t="aria-"+e.content,n=z.id;u($.props.triggerTarget||o).forEach((function(e){var r=e.getAttribute(t);if($.state.isVisible)e.setAttribute(t,r?r+" "+n:n);else{var o=r&&r.replace(n,"").trim();o?e.setAttribute(t,o):e.removeAttribute(t)}}))}}function ue(){!K&&$.props.aria.expanded&&u($.props.triggerTarget||o).forEach((function(e){$.props.interactive?e.setAttribute("aria-expanded",$.state.isVisible&&e===te()?"true":"false"):e.removeAttribute("aria-expanded")}))}function ce(){ne().removeEventListener("mousemove",W),H=H.filter((function(e){return e!==W}))}function pe(e){if(!x.isTouch||!N&&"mousedown"!==e.type){var t=e.composedPath&&e.composedPath()[0]||e.target;if(!$.props.interactive||!O(z,t)){if(u($.props.triggerTarget||o).some((function(e){return O(e,t)}))){if(x.isTouch)return;if($.state.isVisible&&$.props.trigger.indexOf("click")>=0)return}else ae("onClickOutside",[$,e]);!0===$.props.hideOnClick&&($.clearDelayTimeouts(),$.hide(),I=!0,setTimeout((function(){I=!1})),$.state.isMounted||ve())}}}function fe(){N=!0}function le(){N=!1}function de(){var e=ne();e.addEventListener("mousedown",pe,!0),e.addEventListener("touchend",pe,t),e.addEventListener("touchstart",le,t),e.addEventListener("touchmove",fe,t)}function ve(){var e=ne();e.removeEventListener("mousedown",pe,!0),e.removeEventListener("touchend",pe,t),e.removeEventListener("touchstart",le,t),e.removeEventListener("touchmove",fe,t)}function me(e,t){var n=re().box;function r(e){e.target===n&&(E(n,"remove",r),t())}if(0===e)return t();E(n,"remove",T),E(n,"add",r),T=r}function ge(e,t,n){void 0===n&&(n=!1),u($.props.triggerTarget||o).forEach((function(r){r.addEventListener(e,t,n),F.push({node:r,eventType:e,handler:t,options:n})}))}function he(){var e;Z()&&(ge("touchstart",ye,{passive:!0}),ge("touchend",Ee,{passive:!0})),(e=$.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(ge(e,ye),e){case"mouseenter":ge("mouseleave",Ee);break;case"focus":ge(D?"focusout":"blur",Oe);break;case"focusin":ge("focusout",Oe)}}))}function be(){F.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),F=[]}function ye(e){var t,n=!1;if($.state.isEnabled&&!xe(e)&&!I){var r="focus"===(null==(t=C)?void 0:t.type);C=e,L=e.currentTarget,ue(),!$.state.isVisible&&m(e)&&H.forEach((function(t){return t(e)})),"click"===e.type&&($.props.trigger.indexOf("mouseenter")<0||V)&&!1!==$.props.hideOnClick&&$.state.isVisible?n=!0:Le(e),"click"===e.type&&(V=!n),n&&!r&&De(e)}}function we(e){var t=e.target,n=te().contains(t)||z.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=p(o.placement),s=o.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,f="right"===a?s.left.x:0,l="left"===a?s.right.x:0,d=t.top-r+u>i,v=r-t.bottom-c>i,m=t.left-n+f>i,g=n-t.right-l>i;return d||v||m||g}))}(Ae().concat(z).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:M}:null})).filter(Boolean),e)&&(ce(),De(e))}function Ee(e){xe(e)||$.props.trigger.indexOf("click")>=0&&V||($.props.interactive?$.hideWithInteractivity(e):De(e))}function Oe(e){$.props.trigger.indexOf("focusin")<0&&e.target!==te()||$.props.interactive&&e.relatedTarget&&z.contains(e.relatedTarget)||De(e)}function xe(e){return!!x.isTouch&&Z()!==e.type.indexOf("touch")>=0}function Ce(){Te();var t=$.props,n=t.popperOptions,r=t.placement,i=t.offset,a=t.getReferenceClientRect,s=t.moveTransition,u=ee()?S(z).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||te()}:o,p=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(ee()){var n=re().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];ee()&&u&&p.push({name:"arrow",options:{element:u,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),$.popperInstance=e.createPopper(c,z,Object.assign({},n,{placement:r,onFirstUpdate:A,modifiers:p}))}function Te(){$.popperInstance&&($.popperInstance.destroy(),$.popperInstance=null)}function Ae(){return f(z.querySelectorAll("[data-tippy-root]"))}function Le(e){$.clearDelayTimeouts(),e&&ae("onTrigger",[$,e]),de();var t=oe(!0),n=Q(),r=n[0],o=n[1];x.isTouch&&"hold"===r&&o&&(t=o),t?v=setTimeout((function(){$.show()}),t):$.show()}function De(e){if($.clearDelayTimeouts(),ae("onUntrigger",[$,e]),$.state.isVisible){if(!($.props.trigger.indexOf("mouseenter")>=0&&$.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&V)){var t=oe(!1);t?g=setTimeout((function(){$.state.isVisible&&$.hide()}),t):h=requestAnimationFrame((function(){$.hide()}))}}else ve()}}function F(e,n){void 0===n&&(n={});var r=R.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",T,t),window.addEventListener("blur",L);var o=Object.assign({},n,{plugins:r}),i=h(e).reduce((function(e,t){var n=t&&_(t,o);return n&&e.push(n),e}),[]);return v(e)?i[0]:i}F.defaultProps=R,F.setDefaultProps=function(e){Object.keys(e).forEach((function(t){R[t]=e[t]}))},F.currentInput=x;var W=Object.assign({},e.applyStyles,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),X={mouseover:"mouseenter",focusin:"focus",click:"click"};var Y={name:"animateFill",defaultValue:!1,fn:function(e){var t;if(null==(t=e.props.render)||!t.$$tippy)return{};var n=S(e.popper),r=n.box,o=n.content,i=e.props.animateFill?function(){var e=d();return e.className="tippy-backdrop",y([e],"hidden"),e}():null;return{onCreate:function(){i&&(r.insertBefore(i,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",e.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(i){var e=r.style.transitionDuration,t=Number(e.replace("ms",""));o.style.transitionDelay=Math.round(t/10)+"ms",i.style.transitionDuration=e,y([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&y([i],"hidden")}}}};var $={clientX:0,clientY:0},q=[];function z(e){var t=e.clientX,n=e.clientY;$={clientX:t,clientY:n}}var J={name:"followCursor",defaultValue:!1,fn:function(e){var t=e.reference,n=w(e.props.triggerTarget||t),r=!1,o=!1,i=!0,a=e.props;function s(){return"initial"===e.props.followCursor&&e.state.isVisible}function u(){n.addEventListener("mousemove",f)}function c(){n.removeEventListener("mousemove",f)}function p(){r=!0,e.setProps({getReferenceClientRect:null}),r=!1}function f(n){var r=!n.target||t.contains(n.target),o=e.props.followCursor,i=n.clientX,a=n.clientY,s=t.getBoundingClientRect(),u=i-s.left,c=a-s.top;!r&&e.props.interactive||e.setProps({getReferenceClientRect:function(){var e=t.getBoundingClientRect(),n=i,r=a;"initial"===o&&(n=e.left+u,r=e.top+c);var s="horizontal"===o?e.top:r,p="vertical"===o?e.right:n,f="horizontal"===o?e.bottom:r,l="vertical"===o?e.left:n;return{width:p-l,height:f-s,top:s,right:p,bottom:f,left:l}}})}function l(){e.props.followCursor&&(q.push({instance:e,doc:n}),function(e){e.addEventListener("mousemove",z)}(n))}function d(){0===(q=q.filter((function(t){return t.instance!==e}))).filter((function(e){return e.doc===n})).length&&function(e){e.removeEventListener("mousemove",z)}(n)}return{onCreate:l,onDestroy:d,onBeforeUpdate:function(){a=e.props},onAfterUpdate:function(t,n){var i=n.followCursor;r||void 0!==i&&a.followCursor!==i&&(d(),i?(l(),!e.state.isMounted||o||s()||u()):(c(),p()))},onMount:function(){e.props.followCursor&&!o&&(i&&(f($),i=!1),s()||u())},onTrigger:function(e,t){m(t)&&($={clientX:t.clientX,clientY:t.clientY}),o="focus"===t.type},onHidden:function(){e.props.followCursor&&(p(),c(),i=!0)}}}};var G={name:"inlinePositioning",defaultValue:!1,fn:function(e){var t,n=e.reference;var r=-1,o=!1,i=[],a={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(o){var a=o.state;e.props.inlinePositioning&&(-1!==i.indexOf(a.placement)&&(i=[]),t!==a.placement&&-1===i.indexOf(a.placement)&&(i.push(a.placement),e.setProps({getReferenceClientRect:function(){return function(e){return function(e,t,n,r){if(n.length<2||null===e)return t;if(2===n.length&&r>=0&&n[0].left>n[1].right)return n[r]||t;switch(e){case"top":case"bottom":var o=n[0],i=n[n.length-1],a="top"===e,s=o.top,u=i.bottom,c=a?o.left:i.left,p=a?o.right:i.right;return{top:s,bottom:u,left:c,right:p,width:p-c,height:u-s};case"left":case"right":var f=Math.min.apply(Math,n.map((function(e){return e.left}))),l=Math.max.apply(Math,n.map((function(e){return e.right}))),d=n.filter((function(t){return"left"===e?t.left===f:t.right===l})),v=d[0].top,m=d[d.length-1].bottom;return{top:v,bottom:m,left:f,right:l,width:l-f,height:m-v};default:return t}}(p(e),n.getBoundingClientRect(),f(n.getClientRects()),r)}(a.placement)}})),t=a.placement)}};function s(){var t;o||(t=function(e,t){var n;return{popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat(((null==(n=e.popperOptions)?void 0:n.modifiers)||[]).filter((function(e){return e.name!==t.name})),[t])})}}(e.props,a),o=!0,e.setProps(t),o=!1)}return{onCreate:s,onAfterUpdate:s,onTrigger:function(t,n){if(m(n)){var o=f(e.reference.getClientRects()),i=o.find((function(e){return e.left-2<=n.clientX&&e.right+2>=n.clientX&&e.top-2<=n.clientY&&e.bottom+2>=n.clientY})),a=o.indexOf(i);r=a>-1?a:r}},onHidden:function(){r=-1}}}};var K={name:"sticky",defaultValue:!1,fn:function(e){var t=e.reference,n=e.popper;function r(t){return!0===e.props.sticky||e.props.sticky===t}var o=null,i=null;function a(){var s=r("reference")?(e.popperInstance?e.popperInstance.state.elements.reference:t).getBoundingClientRect():null,u=r("popper")?n.getBoundingClientRect():null;(s&&Q(o,s)||u&&Q(i,u))&&e.popperInstance&&e.popperInstance.update(),o=s,i=u,e.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){e.props.sticky&&a()}}}};function Q(e,t){return!e||!t||(e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left)}return F.setDefaultProps({plugins:[Y,J,G,K],render:N}),F.createSingleton=function(e,t){var n;void 0===t&&(t={});var r,o=e,i=[],a=[],c=t.overrides,p=[],f=!1;function l(){a=o.map((function(e){return u(e.props.triggerTarget||e.reference)})).reduce((function(e,t){return e.concat(t)}),[])}function v(){i=o.map((function(e){return e.reference}))}function m(e){o.forEach((function(t){e?t.enable():t.disable()}))}function g(e){return o.map((function(t){var n=t.setProps;return t.setProps=function(o){n(o),t.reference===r&&e.setProps(o)},function(){t.setProps=n}}))}function h(e,t){var n=a.indexOf(t);if(t!==r){r=t;var s=(c||[]).concat("content").reduce((function(e,t){return e[t]=o[n].props[t],e}),{});e.setProps(Object.assign({},s,{getReferenceClientRect:"function"==typeof s.getReferenceClientRect?s.getReferenceClientRect:function(){var e;return null==(e=i[n])?void 0:e.getBoundingClientRect()}}))}}m(!1),v(),l();var b={fn:function(){return{onDestroy:function(){m(!0)},onHidden:function(){r=null},onClickOutside:function(e){e.props.showOnCreate&&!f&&(f=!0,r=null)},onShow:function(e){e.props.showOnCreate&&!f&&(f=!0,h(e,i[0]))},onTrigger:function(e,t){h(e,t.currentTarget)}}}},y=F(d(),Object.assign({},s(t,["overrides"]),{plugins:[b].concat(t.plugins||[]),triggerTarget:a,popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat((null==(n=t.popperOptions)?void 0:n.modifiers)||[],[W])})})),w=y.show;y.show=function(e){if(w(),!r&&null==e)return h(y,i[0]);if(!r||null!=e){if("number"==typeof e)return i[e]&&h(y,i[e]);if(o.indexOf(e)>=0){var t=e.reference;return h(y,t)}return i.indexOf(e)>=0?h(y,e):void 0}},y.showNext=function(){var e=i[0];if(!r)return y.show(0);var t=i.indexOf(r);y.show(i[t+1]||e)},y.showPrevious=function(){var e=i[i.length-1];if(!r)return y.show(e);var t=i.indexOf(r),n=i[t-1]||e;y.show(n)};var E=y.setProps;return y.setProps=function(e){c=e.overrides||c,E(e)},y.setInstances=function(e){m(!0),p.forEach((function(e){return e()})),o=e,m(!1),v(),l(),p=g(y),y.setProps({triggerTarget:a})},p=g(y),y},F.delegate=function(e,n){var r=[],o=[],i=!1,a=n.target,c=s(n,["target"]),p=Object.assign({},c,{trigger:"manual",touch:!1}),f=Object.assign({touch:R.touch},c,{showOnCreate:!0}),l=F(e,p);function d(e){if(e.target&&!i){var t=e.target.closest(a);if(t){var r=t.getAttribute("data-tippy-trigger")||n.trigger||R.trigger;if(!t._tippy&&!("touchstart"===e.type&&"boolean"==typeof f.touch||"touchstart"!==e.type&&r.indexOf(X[e.type])<0)){var s=F(t,f);s&&(o=o.concat(s))}}}}function v(e,t,n,o){void 0===o&&(o=!1),e.addEventListener(t,n,o),r.push({node:e,eventType:t,handler:n,options:o})}return u(l).forEach((function(e){var n=e.destroy,a=e.enable,s=e.disable;e.destroy=function(e){void 0===e&&(e=!0),e&&o.forEach((function(e){e.destroy()})),o=[],r.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),r=[],n()},e.enable=function(){a(),o.forEach((function(e){return e.enable()})),i=!1},e.disable=function(){s(),o.forEach((function(e){return e.disable()})),i=!0},function(e){var n=e.reference;v(n,"touchstart",d,t),v(n,"mouseover",d),v(n,"focusin",d),v(n,"click",d)}(e)})),l},F.hideAll=function(e){var t=void 0===e?{}:e,n=t.exclude,r=t.duration;U.forEach((function(e){var t=!1;if(n&&(t=g(n)?e.reference===n:e.popper===n.popper),!t){var o=e.props.duration;e.setProps({duration:r}),e.hide(),e.state.isDestroyed||e.setProps({duration:o})}}))},F.roundArrow='',F})); 2 | 3 | -------------------------------------------------------------------------------- /docs/site_libs/quarto-nav/headroom.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * headroom.js v0.12.0 - Give your page some headroom. Hide your header until you need it 3 | * Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js 4 | * License: MIT 5 | */ 6 | 7 | !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).Headroom=n()}(this,function(){"use strict";function t(){return"undefined"!=typeof window}function d(t){return function(t){return t&&t.document&&function(t){return 9===t.nodeType}(t.document)}(t)?function(t){var n=t.document,o=n.body,s=n.documentElement;return{scrollHeight:function(){return Math.max(o.scrollHeight,s.scrollHeight,o.offsetHeight,s.offsetHeight,o.clientHeight,s.clientHeight)},height:function(){return t.innerHeight||s.clientHeight||o.clientHeight},scrollY:function(){return void 0!==t.pageYOffset?t.pageYOffset:(s||o.parentNode||o).scrollTop}}}(t):function(t){return{scrollHeight:function(){return Math.max(t.scrollHeight,t.offsetHeight,t.clientHeight)},height:function(){return Math.max(t.offsetHeight,t.clientHeight)},scrollY:function(){return t.scrollTop}}}(t)}function n(t,s,e){var n,o=function(){var n=!1;try{var t={get passive(){n=!0}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){n=!1}return n}(),i=!1,r=d(t),l=r.scrollY(),a={};function c(){var t=Math.round(r.scrollY()),n=r.height(),o=r.scrollHeight();a.scrollY=t,a.lastScrollY=l,a.direction=ls.tolerance[a.direction],e(a),l=t,i=!1}function h(){i||(i=!0,n=requestAnimationFrame(c))}var u=!!o&&{passive:!0,capture:!1};return t.addEventListener("scroll",h,u),c(),{destroy:function(){cancelAnimationFrame(n),t.removeEventListener("scroll",h,u)}}}function o(t){return t===Object(t)?t:{down:t,up:t}}function s(t,n){n=n||{},Object.assign(this,s.options,n),this.classes=Object.assign({},s.options.classes,n.classes),this.elem=t,this.tolerance=o(this.tolerance),this.offset=o(this.offset),this.initialised=!1,this.frozen=!1}return s.prototype={constructor:s,init:function(){return s.cutsTheMustard&&!this.initialised&&(this.addClass("initial"),this.initialised=!0,setTimeout(function(t){t.scrollTracker=n(t.scroller,{offset:t.offset,tolerance:t.tolerance},t.update.bind(t))},100,this)),this},destroy:function(){this.initialised=!1,Object.keys(this.classes).forEach(this.removeClass,this),this.scrollTracker.destroy()},unpin:function(){!this.hasClass("pinned")&&this.hasClass("unpinned")||(this.addClass("unpinned"),this.removeClass("pinned"),this.onUnpin&&this.onUnpin.call(this))},pin:function(){this.hasClass("unpinned")&&(this.addClass("pinned"),this.removeClass("unpinned"),this.onPin&&this.onPin.call(this))},freeze:function(){this.frozen=!0,this.addClass("frozen")},unfreeze:function(){this.frozen=!1,this.removeClass("frozen")},top:function(){this.hasClass("top")||(this.addClass("top"),this.removeClass("notTop"),this.onTop&&this.onTop.call(this))},notTop:function(){this.hasClass("notTop")||(this.addClass("notTop"),this.removeClass("top"),this.onNotTop&&this.onNotTop.call(this))},bottom:function(){this.hasClass("bottom")||(this.addClass("bottom"),this.removeClass("notBottom"),this.onBottom&&this.onBottom.call(this))},notBottom:function(){this.hasClass("notBottom")||(this.addClass("notBottom"),this.removeClass("bottom"),this.onNotBottom&&this.onNotBottom.call(this))},shouldUnpin:function(t){return"down"===t.direction&&!t.top&&t.toleranceExceeded},shouldPin:function(t){return"up"===t.direction&&t.toleranceExceeded||t.top},addClass:function(t){this.elem.classList.add.apply(this.elem.classList,this.classes[t].split(" "))},removeClass:function(t){this.elem.classList.remove.apply(this.elem.classList,this.classes[t].split(" "))},hasClass:function(t){return this.classes[t].split(" ").every(function(t){return this.classList.contains(t)},this.elem)},update:function(t){t.isOutOfBounds||!0!==this.frozen&&(t.top?this.top():this.notTop(),t.bottom?this.bottom():this.notBottom(),this.shouldUnpin(t)?this.unpin():this.shouldPin(t)&&this.pin())}},s.options={tolerance:{up:0,down:0},offset:0,scroller:t()?window:null,classes:{frozen:"headroom--frozen",pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},s.cutsTheMustard=!!(t()&&function(){}.bind&&"classList"in document.documentElement&&Object.assign&&Object.keys&&requestAnimationFrame),s}); 8 | -------------------------------------------------------------------------------- /docs/site_libs/quarto-nav/quarto-nav.js: -------------------------------------------------------------------------------- 1 | const headroomChanged = new CustomEvent("quarto-hrChanged", { 2 | detail: {}, 3 | bubbles: true, 4 | cancelable: false, 5 | composed: false, 6 | }); 7 | 8 | window.document.addEventListener("DOMContentLoaded", function () { 9 | let init = false; 10 | 11 | // Manage the back to top button, if one is present. 12 | let lastScrollTop = window.pageYOffset || document.documentElement.scrollTop; 13 | const scrollDownBuffer = 5; 14 | const scrollUpBuffer = 35; 15 | const btn = document.getElementById("quarto-back-to-top"); 16 | const hideBackToTop = () => { 17 | btn.style.display = "none"; 18 | }; 19 | const showBackToTop = () => { 20 | btn.style.display = "inline-block"; 21 | }; 22 | if (btn) { 23 | window.document.addEventListener( 24 | "scroll", 25 | function () { 26 | const currentScrollTop = 27 | window.pageYOffset || document.documentElement.scrollTop; 28 | 29 | // Shows and hides the button 'intelligently' as the user scrolls 30 | if (currentScrollTop - scrollDownBuffer > lastScrollTop) { 31 | hideBackToTop(); 32 | lastScrollTop = currentScrollTop <= 0 ? 0 : currentScrollTop; 33 | } else if (currentScrollTop < lastScrollTop - scrollUpBuffer) { 34 | showBackToTop(); 35 | lastScrollTop = currentScrollTop <= 0 ? 0 : currentScrollTop; 36 | } 37 | 38 | // Show the button at the bottom, hides it at the top 39 | if (currentScrollTop <= 0) { 40 | hideBackToTop(); 41 | } else if ( 42 | window.innerHeight + currentScrollTop >= 43 | document.body.offsetHeight 44 | ) { 45 | showBackToTop(); 46 | } 47 | }, 48 | false 49 | ); 50 | } 51 | 52 | function throttle(func, wait) { 53 | var timeout; 54 | return function () { 55 | const context = this; 56 | const args = arguments; 57 | const later = function () { 58 | clearTimeout(timeout); 59 | timeout = null; 60 | func.apply(context, args); 61 | }; 62 | 63 | if (!timeout) { 64 | timeout = setTimeout(later, wait); 65 | } 66 | }; 67 | } 68 | 69 | function headerOffset() { 70 | // Set an offset if there is are fixed top navbar 71 | const headerEl = window.document.querySelector("header.fixed-top"); 72 | if (headerEl) { 73 | return headerEl.clientHeight; 74 | } else { 75 | return 0; 76 | } 77 | } 78 | 79 | function footerOffset() { 80 | const footerEl = window.document.querySelector("footer.footer"); 81 | if (footerEl) { 82 | return footerEl.clientHeight; 83 | } else { 84 | return 0; 85 | } 86 | } 87 | 88 | function updateDocumentOffsetWithoutAnimation() { 89 | updateDocumentOffset(false); 90 | } 91 | 92 | function updateDocumentOffset(animated) { 93 | // set body offset 94 | const topOffset = headerOffset(); 95 | const bodyOffset = topOffset + footerOffset(); 96 | const bodyEl = window.document.body; 97 | bodyEl.setAttribute("data-bs-offset", topOffset); 98 | bodyEl.style.paddingTop = topOffset + "px"; 99 | 100 | // deal with sidebar offsets 101 | const sidebars = window.document.querySelectorAll( 102 | ".sidebar, .headroom-target" 103 | ); 104 | sidebars.forEach((sidebar) => { 105 | if (!animated) { 106 | sidebar.classList.add("notransition"); 107 | // Remove the no transition class after the animation has time to complete 108 | setTimeout(function () { 109 | sidebar.classList.remove("notransition"); 110 | }, 201); 111 | } 112 | 113 | if (window.Headroom && sidebar.classList.contains("sidebar-unpinned")) { 114 | sidebar.style.top = "0"; 115 | sidebar.style.maxHeight = "100vh"; 116 | } else { 117 | sidebar.style.top = topOffset + "px"; 118 | sidebar.style.maxHeight = "calc(100vh - " + topOffset + "px)"; 119 | } 120 | }); 121 | 122 | // allow space for footer 123 | const mainContainer = window.document.querySelector(".quarto-container"); 124 | if (mainContainer) { 125 | mainContainer.style.minHeight = "calc(100vh - " + bodyOffset + "px)"; 126 | } 127 | 128 | // link offset 129 | let linkStyle = window.document.querySelector("#quarto-target-style"); 130 | if (!linkStyle) { 131 | linkStyle = window.document.createElement("style"); 132 | linkStyle.setAttribute("id", "quarto-target-style"); 133 | window.document.head.appendChild(linkStyle); 134 | } 135 | while (linkStyle.firstChild) { 136 | linkStyle.removeChild(linkStyle.firstChild); 137 | } 138 | if (topOffset > 0) { 139 | linkStyle.appendChild( 140 | window.document.createTextNode(` 141 | section:target::before { 142 | content: ""; 143 | display: block; 144 | height: ${topOffset}px; 145 | margin: -${topOffset}px 0 0; 146 | }`) 147 | ); 148 | } 149 | if (init) { 150 | window.dispatchEvent(headroomChanged); 151 | } 152 | init = true; 153 | } 154 | 155 | // initialize headroom 156 | var header = window.document.querySelector("#quarto-header"); 157 | if (header && window.Headroom) { 158 | const headroom = new window.Headroom(header, { 159 | tolerance: 5, 160 | onPin: function () { 161 | const sidebars = window.document.querySelectorAll( 162 | ".sidebar, .headroom-target" 163 | ); 164 | sidebars.forEach((sidebar) => { 165 | sidebar.classList.remove("sidebar-unpinned"); 166 | }); 167 | updateDocumentOffset(); 168 | }, 169 | onUnpin: function () { 170 | const sidebars = window.document.querySelectorAll( 171 | ".sidebar, .headroom-target" 172 | ); 173 | sidebars.forEach((sidebar) => { 174 | sidebar.classList.add("sidebar-unpinned"); 175 | }); 176 | updateDocumentOffset(); 177 | }, 178 | }); 179 | headroom.init(); 180 | 181 | let frozen = false; 182 | window.quartoToggleHeadroom = function () { 183 | if (frozen) { 184 | headroom.unfreeze(); 185 | frozen = false; 186 | } else { 187 | headroom.freeze(); 188 | frozen = true; 189 | } 190 | }; 191 | } 192 | 193 | window.addEventListener( 194 | "hashchange", 195 | function (e) { 196 | if ( 197 | getComputedStyle(document.documentElement).scrollBehavior !== "smooth" 198 | ) { 199 | window.scrollTo(0, window.pageYOffset - headerOffset()); 200 | } 201 | }, 202 | false 203 | ); 204 | 205 | // Observe size changed for the header 206 | const headerEl = window.document.querySelector("header.fixed-top"); 207 | if (headerEl && window.ResizeObserver) { 208 | const observer = new window.ResizeObserver( 209 | updateDocumentOffsetWithoutAnimation 210 | ); 211 | observer.observe(headerEl, { 212 | attributes: true, 213 | childList: true, 214 | characterData: true, 215 | }); 216 | } else { 217 | window.addEventListener( 218 | "resize", 219 | throttle(updateDocumentOffsetWithoutAnimation, 50) 220 | ); 221 | } 222 | setTimeout(updateDocumentOffsetWithoutAnimation, 250); 223 | 224 | // fixup index.html links if we aren't on the filesystem 225 | if (window.location.protocol !== "file:") { 226 | const links = window.document.querySelectorAll("a"); 227 | for (let i = 0; i < links.length; i++) { 228 | if (links[i].href) { 229 | links[i].href = links[i].href.replace(/\/index\.html/, "/"); 230 | } 231 | } 232 | 233 | // Fixup any sharing links that require urls 234 | // Append url to any sharing urls 235 | const sharingLinks = window.document.querySelectorAll( 236 | "a.sidebar-tools-main-item" 237 | ); 238 | for (let i = 0; i < sharingLinks.length; i++) { 239 | const sharingLink = sharingLinks[i]; 240 | const href = sharingLink.getAttribute("href"); 241 | if (href) { 242 | sharingLink.setAttribute( 243 | "href", 244 | href.replace("|url|", window.location.href) 245 | ); 246 | } 247 | } 248 | 249 | // Scroll the active navigation item into view, if necessary 250 | const navSidebar = window.document.querySelector("nav#quarto-sidebar"); 251 | if (navSidebar) { 252 | // Find the active item 253 | const activeItem = navSidebar.querySelector("li.sidebar-item a.active"); 254 | if (activeItem) { 255 | // Wait for the scroll height and height to resolve by observing size changes on the 256 | // nav element that is scrollable 257 | const resizeObserver = new ResizeObserver((_entries) => { 258 | // The bottom of the element 259 | const elBottom = activeItem.offsetTop; 260 | const viewBottom = navSidebar.scrollTop + navSidebar.clientHeight; 261 | 262 | // The element height and scroll height are the same, then we are still loading 263 | if (viewBottom !== navSidebar.scrollHeight) { 264 | // Determine if the item isn't visible and scroll to it 265 | if (elBottom >= viewBottom) { 266 | navSidebar.scrollTop = elBottom; 267 | } 268 | 269 | // stop observing now since we've completed the scroll 270 | resizeObserver.unobserve(navSidebar); 271 | } 272 | }); 273 | resizeObserver.observe(navSidebar); 274 | } 275 | } 276 | } 277 | }); 278 | -------------------------------------------------------------------------------- /docs/site_libs/quarto-search/fuse.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io) 3 | * 4 | * Copyright (c) 2022 Kiro Risk (http://kiro.me) 5 | * All Rights Reserved. Apache Software License 2.0 6 | * 7 | * http://www.apache.org/licenses/LICENSE-2.0 8 | */ 9 | var e,t;e=this,t=function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=new Map,r=Math.pow(10,t);return{get:function(t){var i=t.match(C).length;if(n.has(i))return n.get(i);var o=1/Math.pow(i,.5*e),c=parseFloat(Math.round(o*r)/r);return n.set(i,c),c},clear:function(){n.clear()}}}var $=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,i=void 0===n?I.getFn:n,o=t.fieldNormWeight,c=void 0===o?I.fieldNormWeight:o;r(this,e),this.norm=E(c,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return o(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,g(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();g(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?I.getFn:r,o=n.fieldNormWeight,c=void 0===o?I.fieldNormWeight:o,a=new $({getFn:i,fieldNormWeight:c});return a.setKeys(e.map(_)),a.setSources(t),a.create(),a}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?I.distance:s,h=t.ignoreLocation,l=void 0===h?I.ignoreLocation:h,f=r/e.length;if(l)return f;var d=Math.abs(a-o);return u?f+d/u:d?1:f}function N(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}var P=32;function W(e){for(var t={},n=0,r=e.length;n1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,c=void 0===o?I.location:o,a=i.threshold,s=void 0===a?I.threshold:a,u=i.distance,h=void 0===u?I.distance:u,l=i.includeMatches,f=void 0===l?I.includeMatches:l,d=i.findAllMatches,v=void 0===d?I.findAllMatches:d,g=i.minMatchCharLength,y=void 0===g?I.minMatchCharLength:g,p=i.isCaseSensitive,m=void 0===p?I.isCaseSensitive:p,k=i.ignoreLocation,M=void 0===k?I.ignoreLocation:k;if(r(this,e),this.options={location:c,threshold:s,distance:h,includeMatches:f,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:m,ignoreLocation:M},this.pattern=m?t:t.toLowerCase(),this.chunks=[],this.pattern.length){var b=function(e,t){n.chunks.push({pattern:e,alphabet:W(e),startIndex:t})},x=this.pattern.length;if(x>P){for(var w=0,L=x%P,S=x-L;w3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?I.location:i,c=r.distance,a=void 0===c?I.distance:c,s=r.threshold,u=void 0===s?I.threshold:s,h=r.findAllMatches,l=void 0===h?I.findAllMatches:h,f=r.minMatchCharLength,d=void 0===f?I.minMatchCharLength:f,v=r.includeMatches,g=void 0===v?I.includeMatches:v,y=r.ignoreLocation,p=void 0===y?I.ignoreLocation:y;if(t.length>P)throw new Error(w(P));for(var m,k=t.length,M=e.length,b=Math.max(0,Math.min(o,M)),x=u,L=b,S=d>1||g,_=S?Array(M):[];(m=e.indexOf(t,L))>-1;){var O=R(t,{currentLocation:m,expectedLocation:b,distance:a,ignoreLocation:p});if(x=Math.min(O,x),L=m+k,S)for(var j=0;j=z;q-=1){var B=q-1,J=n[e.charAt(B)];if(S&&(_[B]=+!!J),K[q]=(K[q+1]<<1|1)&J,F&&(K[q]|=(A[q+1]|A[q])<<1|1|A[q+1]),K[q]&$&&(C=R(t,{errors:F,currentLocation:B,expectedLocation:b,distance:a,ignoreLocation:p}))<=x){if(x=C,(L=B)<=b)break;z=Math.max(1,2*b-L)}}if(R(t,{errors:F+1,currentLocation:b,expectedLocation:b,distance:a,ignoreLocation:p})>x)break;A=K}var U={isMatch:L>=0,score:Math.max(.001,C)};if(S){var V=N(_,d);V.length?g&&(U.indices=V):U.isMatch=!1}return U}(e,n,i,{location:c+o,distance:a,threshold:s,findAllMatches:u,minMatchCharLength:h,includeMatches:r,ignoreLocation:l}),p=y.isMatch,m=y.score,k=y.indices;p&&(g=!0),v+=m,p&&k&&(d=[].concat(f(d),f(k)))}));var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=d),y}}]),e}(),z=function(){function e(t){r(this,e),this.pattern=t}return o(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return D(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return D(e,this.singleRegex)}}]),e}();function D(e,t){var n=e.match(t);return n?n[1]:null}var K=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),n}(z),q=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),n}(z),B=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),n}(z),J=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),n}(z),U=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),n}(z),V=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),n}(z),G=function(e){a(n,e);var t=l(n);function n(e){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=o.location,a=void 0===c?I.location:c,s=o.threshold,u=void 0===s?I.threshold:s,h=o.distance,l=void 0===h?I.distance:h,f=o.includeMatches,d=void 0===f?I.includeMatches:f,v=o.findAllMatches,g=void 0===v?I.findAllMatches:v,y=o.minMatchCharLength,p=void 0===y?I.minMatchCharLength:y,m=o.isCaseSensitive,k=void 0===m?I.isCaseSensitive:m,M=o.ignoreLocation,b=void 0===M?I.ignoreLocation:M;return r(this,n),(i=t.call(this,e))._bitapSearch=new T(e,{location:a,threshold:u,distance:l,includeMatches:d,findAllMatches:g,minMatchCharLength:p,isCaseSensitive:k,ignoreLocation:b}),i}return o(n,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),n}(z),H=function(e){a(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return o(n,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),n}(z),Q=[K,H,B,J,V,U,q,G],X=Q.length,Y=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;function Z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(Y).filter((function(e){return e&&!!e.trim()})),r=[],i=0,o=n.length;i1&&void 0!==arguments[1]?arguments[1]:{},i=n.isCaseSensitive,o=void 0===i?I.isCaseSensitive:i,c=n.includeMatches,a=void 0===c?I.includeMatches:c,s=n.minMatchCharLength,u=void 0===s?I.minMatchCharLength:s,h=n.ignoreLocation,l=void 0===h?I.ignoreLocation:h,f=n.findAllMatches,d=void 0===f?I.findAllMatches:f,v=n.location,g=void 0===v?I.location:v,y=n.threshold,p=void 0===y?I.threshold:y,m=n.distance,k=void 0===m?I.distance:m;r(this,e),this.query=null,this.options={isCaseSensitive:o,includeMatches:a,minMatchCharLength:u,findAllMatches:d,ignoreLocation:l,location:g,threshold:p,distance:k},this.pattern=o?t:t.toLowerCase(),this.query=Z(this.pattern,this.options)}return o(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,a=0,s=t.length;a-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function ve(e,t){t.score=e.score}function ge(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?I.includeMatches:r,o=n.includeScore,c=void 0===o?I.includeScore:o,a=[];return i&&a.push(de),c&&a.push(ve),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach((function(t){t(e,r)})),r}))}var ye=function(){function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;r(this,e),this.options=t(t({},I),i),this.options.useExtendedSearch,this._keyStore=new S(this.options.keys),this.setCollection(n,o)}return o(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof $))throw new Error("Incorrect 'index' type");this._myIndex=t||F(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){k(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,i=this.options,o=i.includeMatches,c=i.includeScore,a=i.shouldSort,s=i.sortFn,u=i.ignoreFieldNorm,h=g(e)?g(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return fe(h,{ignoreFieldNorm:u}),a&&h.sort(s),y(r)&&r>-1&&(h=h.slice(0,r)),ge(h,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(e){var t=re(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,o=e.n;if(k(n)){var c=t.searchIn(n),a=c.isMatch,s=c.score,u=c.indices;a&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:u}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).auto,r=void 0===n||n,i=function e(n){var i=Object.keys(n),o=ue(n);if(!o&&i.length>1&&!se(n))return e(le(n));if(he(n)){var c=o?n[ce]:i[0],a=o?n[ae]:n[c];if(!g(a))throw new Error(x(c));var s={keyId:j(c),pattern:a};return r&&(s.searcher=re(a,t)),s}var u={children:[],operator:i[0]};return i.forEach((function(t){var r=n[t];v(r)&&r.forEach((function(t){u.children.push(e(t))}))})),u};return se(e)||(e=le(e)),i(e)}(e,this.options),r=function e(n,r,i){if(!n.children){var o=n.keyId,c=n.searcher,a=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(r,o),searcher:c});return a&&a.length?[{idx:i,item:r,matches:a}]:[]}for(var s=[],u=0,h=n.children.length;u1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?I.getFn:n,i=t.fieldNormWeight,o=void 0===i?I.fieldNormWeight:i,c=e.keys,a=e.records,s=new $({getFn:r,fieldNormWeight:o});return s.setKeys(c),s.setIndexRecords(a),s},ye.config=I,function(){ne.push.apply(ne,arguments)}(te),ye},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Fuse=t(); -------------------------------------------------------------------------------- /docs/site_libs/quarto-search/quarto-search.js: -------------------------------------------------------------------------------- 1 | const kQueryArg = "q"; 2 | const kResultsArg = "show-results"; 3 | 4 | // If items don't provide a URL, then both the navigator and the onSelect 5 | // function aren't called (and therefore, the default implementation is used) 6 | // 7 | // We're using this sentinel URL to signal to those handlers that this 8 | // item is a more item (along with the type) and can be handled appropriately 9 | const kItemTypeMoreHref = "0767FDFD-0422-4E5A-BC8A-3BE11E5BBA05"; 10 | 11 | window.document.addEventListener("DOMContentLoaded", function (_event) { 12 | // Ensure that search is available on this page. If it isn't, 13 | // should return early and not do anything 14 | var searchEl = window.document.getElementById("quarto-search"); 15 | if (!searchEl) return; 16 | 17 | const { autocomplete } = window["@algolia/autocomplete-js"]; 18 | 19 | let quartoSearchOptions = {}; 20 | let language = {}; 21 | const searchOptionEl = window.document.getElementById( 22 | "quarto-search-options" 23 | ); 24 | if (searchOptionEl) { 25 | const jsonStr = searchOptionEl.textContent; 26 | quartoSearchOptions = JSON.parse(jsonStr); 27 | language = quartoSearchOptions.language; 28 | } 29 | 30 | // note the search mode 31 | if (quartoSearchOptions.type === "overlay") { 32 | searchEl.classList.add("type-overlay"); 33 | } else { 34 | searchEl.classList.add("type-textbox"); 35 | } 36 | 37 | // Used to determine highlighting behavior for this page 38 | // A `q` query param is expected when the user follows a search 39 | // to this page 40 | const currentUrl = new URL(window.location); 41 | const query = currentUrl.searchParams.get(kQueryArg); 42 | const showSearchResults = currentUrl.searchParams.get(kResultsArg); 43 | const mainEl = window.document.querySelector("main"); 44 | 45 | // highlight matches on the page 46 | if (query !== null && mainEl) { 47 | // perform any highlighting 48 | highlight(escapeRegExp(query), mainEl); 49 | 50 | // fix up the URL to remove the q query param 51 | const replacementUrl = new URL(window.location); 52 | replacementUrl.searchParams.delete(kQueryArg); 53 | window.history.replaceState({}, "", replacementUrl); 54 | } 55 | 56 | // function to clear highlighting on the page when the search query changes 57 | // (e.g. if the user edits the query or clears it) 58 | let highlighting = true; 59 | const resetHighlighting = (searchTerm) => { 60 | if (mainEl && highlighting && query !== null && searchTerm !== query) { 61 | clearHighlight(query, mainEl); 62 | highlighting = false; 63 | } 64 | }; 65 | 66 | // Clear search highlighting when the user scrolls sufficiently 67 | const resetFn = () => { 68 | resetHighlighting(""); 69 | window.removeEventListener("quarto-hrChanged", resetFn); 70 | window.removeEventListener("quarto-sectionChanged", resetFn); 71 | }; 72 | 73 | // Register this event after the initial scrolling and settling of events 74 | // on the page 75 | window.addEventListener("quarto-hrChanged", resetFn); 76 | window.addEventListener("quarto-sectionChanged", resetFn); 77 | 78 | // Responsively switch to overlay mode if the search is present on the navbar 79 | // Note that switching the sidebar to overlay mode requires more coordinate (not just 80 | // the media query since we generate different HTML for sidebar overlays than we do 81 | // for sidebar input UI) 82 | const detachedMediaQuery = 83 | quartoSearchOptions.type === "overlay" ? "all" : "(max-width: 991px)"; 84 | 85 | // If configured, include the analytics client to send insights 86 | const plugins = configurePlugins(quartoSearchOptions); 87 | 88 | let lastState = null; 89 | const { setIsOpen, setQuery, setCollections } = autocomplete({ 90 | container: searchEl, 91 | detachedMediaQuery: detachedMediaQuery, 92 | defaultActiveItemId: 0, 93 | panelContainer: "#quarto-search-results", 94 | panelPlacement: quartoSearchOptions["panel-placement"], 95 | debug: false, 96 | openOnFocus: true, 97 | plugins, 98 | classNames: { 99 | form: "d-flex", 100 | }, 101 | translations: { 102 | clearButtonTitle: language["search-clear-button-title"], 103 | detachedCancelButtonText: language["search-detached-cancel-button-title"], 104 | submitButtonTitle: language["search-submit-button-title"], 105 | }, 106 | initialState: { 107 | query, 108 | }, 109 | getItemUrl({ item }) { 110 | return item.href; 111 | }, 112 | onStateChange({ state }) { 113 | // Perhaps reset highlighting 114 | resetHighlighting(state.query); 115 | 116 | // If the panel just opened, ensure the panel is positioned properly 117 | if (state.isOpen) { 118 | if (lastState && !lastState.isOpen) { 119 | setTimeout(() => { 120 | positionPanel(quartoSearchOptions["panel-placement"]); 121 | }, 150); 122 | } 123 | } 124 | 125 | // Perhaps show the copy link 126 | showCopyLink(state.query, quartoSearchOptions); 127 | 128 | lastState = state; 129 | }, 130 | reshape({ sources, state }) { 131 | return sources.map((source) => { 132 | try { 133 | const items = source.getItems(); 134 | 135 | // Validate the items 136 | validateItems(items); 137 | 138 | // group the items by document 139 | const groupedItems = new Map(); 140 | items.forEach((item) => { 141 | const hrefParts = item.href.split("#"); 142 | const baseHref = hrefParts[0]; 143 | const isDocumentItem = hrefParts.length === 1; 144 | 145 | const items = groupedItems.get(baseHref); 146 | if (!items) { 147 | groupedItems.set(baseHref, [item]); 148 | } else { 149 | // If the href for this item matches the document 150 | // exactly, place this item first as it is the item that represents 151 | // the document itself 152 | if (isDocumentItem) { 153 | items.unshift(item); 154 | } else { 155 | items.push(item); 156 | } 157 | groupedItems.set(baseHref, items); 158 | } 159 | }); 160 | 161 | const reshapedItems = []; 162 | let count = 1; 163 | for (const [_key, value] of groupedItems) { 164 | const firstItem = value[0]; 165 | reshapedItems.push({ 166 | ...firstItem, 167 | type: kItemTypeDoc, 168 | }); 169 | 170 | const collapseMatches = quartoSearchOptions["collapse-after"]; 171 | const collapseCount = 172 | typeof collapseMatches === "number" ? collapseMatches : 1; 173 | 174 | if (value.length > 1) { 175 | const target = `search-more-${count}`; 176 | const isExpanded = 177 | state.context.expanded && 178 | state.context.expanded.includes(target); 179 | 180 | const remainingCount = value.length - collapseCount; 181 | 182 | for (let i = 1; i < value.length; i++) { 183 | if (collapseMatches && i === collapseCount) { 184 | reshapedItems.push({ 185 | target, 186 | title: isExpanded 187 | ? language["search-hide-matches-text"] 188 | : remainingCount === 1 189 | ? `${remainingCount} ${language["search-more-match-text"]}` 190 | : `${remainingCount} ${language["search-more-matches-text"]}`, 191 | type: kItemTypeMore, 192 | href: kItemTypeMoreHref, 193 | }); 194 | } 195 | 196 | if (isExpanded || !collapseMatches || i < collapseCount) { 197 | reshapedItems.push({ 198 | ...value[i], 199 | type: kItemTypeItem, 200 | target, 201 | }); 202 | } 203 | } 204 | } 205 | count += 1; 206 | } 207 | 208 | return { 209 | ...source, 210 | getItems() { 211 | return reshapedItems; 212 | }, 213 | }; 214 | } catch (error) { 215 | // Some form of error occurred 216 | return { 217 | ...source, 218 | getItems() { 219 | return [ 220 | { 221 | title: error.name || "An Error Occurred While Searching", 222 | text: 223 | error.message || 224 | "An unknown error occurred while attempting to perform the requested search.", 225 | type: kItemTypeError, 226 | }, 227 | ]; 228 | }, 229 | }; 230 | } 231 | }); 232 | }, 233 | navigator: { 234 | navigate({ itemUrl }) { 235 | if (itemUrl !== offsetURL(kItemTypeMoreHref)) { 236 | window.location.assign(itemUrl); 237 | } 238 | }, 239 | navigateNewTab({ itemUrl }) { 240 | if (itemUrl !== offsetURL(kItemTypeMoreHref)) { 241 | const windowReference = window.open(itemUrl, "_blank", "noopener"); 242 | if (windowReference) { 243 | windowReference.focus(); 244 | } 245 | } 246 | }, 247 | navigateNewWindow({ itemUrl }) { 248 | if (itemUrl !== offsetURL(kItemTypeMoreHref)) { 249 | window.open(itemUrl, "_blank", "noopener"); 250 | } 251 | }, 252 | }, 253 | getSources({ state, setContext, setActiveItemId, refresh }) { 254 | return [ 255 | { 256 | sourceId: "documents", 257 | getItemUrl({ item }) { 258 | if (item.href) { 259 | return offsetURL(item.href); 260 | } else { 261 | return undefined; 262 | } 263 | }, 264 | onSelect({ 265 | item, 266 | state, 267 | setContext, 268 | setIsOpen, 269 | setActiveItemId, 270 | refresh, 271 | }) { 272 | if (item.type === kItemTypeMore) { 273 | toggleExpanded(item, state, setContext, setActiveItemId, refresh); 274 | 275 | // Toggle more 276 | setIsOpen(true); 277 | } 278 | }, 279 | getItems({ query }) { 280 | if (query === null || query === "") { 281 | return []; 282 | } 283 | 284 | const limit = quartoSearchOptions.limit; 285 | if (quartoSearchOptions.algolia) { 286 | return algoliaSearch(query, limit, quartoSearchOptions.algolia); 287 | } else { 288 | // Fuse search options 289 | const fuseSearchOptions = { 290 | isCaseSensitive: false, 291 | shouldSort: true, 292 | minMatchCharLength: 2, 293 | limit: limit, 294 | }; 295 | 296 | return readSearchData().then(function (fuse) { 297 | return fuseSearch(query, fuse, fuseSearchOptions); 298 | }); 299 | } 300 | }, 301 | templates: { 302 | noResults({ createElement }) { 303 | const hasQuery = lastState.query; 304 | 305 | return createElement( 306 | "div", 307 | { 308 | class: `quarto-search-no-results${ 309 | hasQuery ? "" : " no-query" 310 | }`, 311 | }, 312 | language["search-no-results-text"] 313 | ); 314 | }, 315 | header({ items, createElement }) { 316 | // count the documents 317 | const count = items.filter((item) => { 318 | return item.type === kItemTypeDoc; 319 | }).length; 320 | 321 | if (count > 0) { 322 | return createElement( 323 | "div", 324 | { class: "search-result-header" }, 325 | `${count} ${language["search-matching-documents-text"]}` 326 | ); 327 | } else { 328 | return createElement( 329 | "div", 330 | { class: "search-result-header-no-results" }, 331 | `` 332 | ); 333 | } 334 | }, 335 | footer({ _items, createElement }) { 336 | if ( 337 | quartoSearchOptions.algolia && 338 | quartoSearchOptions.algolia["show-logo"] 339 | ) { 340 | const libDir = quartoSearchOptions.algolia["libDir"]; 341 | const logo = createElement("img", { 342 | src: offsetURL( 343 | `${libDir}/quarto-search/search-by-algolia.svg` 344 | ), 345 | class: "algolia-search-logo", 346 | }); 347 | return createElement( 348 | "a", 349 | { href: "http://www.algolia.com/" }, 350 | logo 351 | ); 352 | } 353 | }, 354 | 355 | item({ item, createElement }) { 356 | return renderItem( 357 | item, 358 | createElement, 359 | state, 360 | setActiveItemId, 361 | setContext, 362 | refresh 363 | ); 364 | }, 365 | }, 366 | }, 367 | ]; 368 | }, 369 | }); 370 | 371 | window.quartoOpenSearch = () => { 372 | setIsOpen(false); 373 | setIsOpen(true); 374 | focusSearchInput(); 375 | }; 376 | 377 | // Remove the labeleledby attribute since it is pointing 378 | // to a non-existent label 379 | if (quartoSearchOptions.type === "overlay") { 380 | const inputEl = window.document.querySelector( 381 | "#quarto-search .aa-Autocomplete" 382 | ); 383 | if (inputEl) { 384 | inputEl.removeAttribute("aria-labelledby"); 385 | } 386 | } 387 | 388 | // If the main document scrolls dismiss the search results 389 | // (otherwise, since they're floating in the document they can scroll with the document) 390 | window.document.body.onscroll = () => { 391 | setIsOpen(false); 392 | }; 393 | 394 | if (showSearchResults) { 395 | setIsOpen(true); 396 | focusSearchInput(); 397 | } 398 | }); 399 | 400 | function configurePlugins(quartoSearchOptions) { 401 | const autocompletePlugins = []; 402 | const algoliaOptions = quartoSearchOptions.algolia; 403 | if ( 404 | algoliaOptions && 405 | algoliaOptions["analytics-events"] && 406 | algoliaOptions["search-only-api-key"] && 407 | algoliaOptions["application-id"] 408 | ) { 409 | const apiKey = algoliaOptions["search-only-api-key"]; 410 | const appId = algoliaOptions["application-id"]; 411 | 412 | // Aloglia insights may not be loaded because they require cookie consent 413 | // Use deferred loading so events will start being recorded when/if consent 414 | // is granted. 415 | const algoliaInsightsDeferredPlugin = deferredLoadPlugin(() => { 416 | if ( 417 | window.aa && 418 | window["@algolia/autocomplete-plugin-algolia-insights"] 419 | ) { 420 | window.aa("init", { 421 | appId, 422 | apiKey, 423 | useCookie: true, 424 | }); 425 | 426 | const { createAlgoliaInsightsPlugin } = 427 | window["@algolia/autocomplete-plugin-algolia-insights"]; 428 | // Register the insights client 429 | const algoliaInsightsPlugin = createAlgoliaInsightsPlugin({ 430 | insightsClient: window.aa, 431 | onItemsChange({ insights, insightsEvents }) { 432 | const events = insightsEvents.map((event) => { 433 | const maxEvents = event.objectIDs.slice(0, 20); 434 | return { 435 | ...event, 436 | objectIDs: maxEvents, 437 | }; 438 | }); 439 | 440 | insights.viewedObjectIDs(...events); 441 | }, 442 | }); 443 | return algoliaInsightsPlugin; 444 | } 445 | }); 446 | 447 | // Add the plugin 448 | autocompletePlugins.push(algoliaInsightsDeferredPlugin); 449 | return autocompletePlugins; 450 | } 451 | } 452 | 453 | // For plugins that may not load immediately, create a wrapper 454 | // plugin and forward events and plugin data once the plugin 455 | // is initialized. This is useful for cases like cookie consent 456 | // which may prevent the analytics insights event plugin from initializing 457 | // immediately. 458 | function deferredLoadPlugin(createPlugin) { 459 | let plugin = undefined; 460 | let subscribeObj = undefined; 461 | const wrappedPlugin = () => { 462 | if (!plugin && subscribeObj) { 463 | plugin = createPlugin(); 464 | if (plugin && plugin.subscribe) { 465 | plugin.subscribe(subscribeObj); 466 | } 467 | } 468 | return plugin; 469 | }; 470 | 471 | return { 472 | subscribe: (obj) => { 473 | subscribeObj = obj; 474 | }, 475 | onStateChange: (obj) => { 476 | const plugin = wrappedPlugin(); 477 | if (plugin && plugin.onStateChange) { 478 | plugin.onStateChange(obj); 479 | } 480 | }, 481 | onSubmit: (obj) => { 482 | const plugin = wrappedPlugin(); 483 | if (plugin && plugin.onSubmit) { 484 | plugin.onSubmit(obj); 485 | } 486 | }, 487 | onReset: (obj) => { 488 | const plugin = wrappedPlugin(); 489 | if (plugin && plugin.onReset) { 490 | plugin.onReset(obj); 491 | } 492 | }, 493 | getSources: (obj) => { 494 | const plugin = wrappedPlugin(); 495 | if (plugin && plugin.getSources) { 496 | return plugin.getSources(obj); 497 | } else { 498 | return Promise.resolve([]); 499 | } 500 | }, 501 | data: (obj) => { 502 | const plugin = wrappedPlugin(); 503 | if (plugin && plugin.data) { 504 | plugin.data(obj); 505 | } 506 | }, 507 | }; 508 | } 509 | 510 | function validateItems(items) { 511 | // Validate the first item 512 | if (items.length > 0) { 513 | const item = items[0]; 514 | const missingFields = []; 515 | if (item.href == undefined) { 516 | missingFields.push("href"); 517 | } 518 | if (!item.title == undefined) { 519 | missingFields.push("title"); 520 | } 521 | if (!item.text == undefined) { 522 | missingFields.push("text"); 523 | } 524 | 525 | if (missingFields.length === 1) { 526 | throw { 527 | name: `Error: Search index is missing the ${missingFields[0]} field.`, 528 | message: `The items being returned for this search do not include all the required fields. Please ensure that your index items include the ${missingFields[0]} field or use index-fields in your _quarto.yml file to specify the field names.`, 529 | }; 530 | } else if (missingFields.length > 1) { 531 | const missingFieldList = missingFields 532 | .map((field) => { 533 | return `${field}`; 534 | }) 535 | .join(", "); 536 | 537 | throw { 538 | name: `Error: Search index is missing the following fields: ${missingFieldList}.`, 539 | message: `The items being returned for this search do not include all the required fields. Please ensure that your index items includes the following fields: ${missingFieldList}, or use index-fields in your _quarto.yml file to specify the field names.`, 540 | }; 541 | } 542 | } 543 | } 544 | 545 | let lastQuery = null; 546 | function showCopyLink(query, options) { 547 | const language = options.language; 548 | lastQuery = query; 549 | // Insert share icon 550 | const inputSuffixEl = window.document.body.querySelector( 551 | ".aa-Form .aa-InputWrapperSuffix" 552 | ); 553 | 554 | if (inputSuffixEl) { 555 | let copyButtonEl = window.document.body.querySelector( 556 | ".aa-Form .aa-InputWrapperSuffix .aa-CopyButton" 557 | ); 558 | 559 | if (copyButtonEl === null) { 560 | copyButtonEl = window.document.createElement("button"); 561 | copyButtonEl.setAttribute("class", "aa-CopyButton"); 562 | copyButtonEl.setAttribute("type", "button"); 563 | copyButtonEl.setAttribute("title", language["search-copy-link-title"]); 564 | copyButtonEl.onmousedown = (e) => { 565 | e.preventDefault(); 566 | e.stopPropagation(); 567 | }; 568 | 569 | const linkIcon = "bi-clipboard"; 570 | const checkIcon = "bi-check2"; 571 | 572 | const shareIconEl = window.document.createElement("i"); 573 | shareIconEl.setAttribute("class", `bi ${linkIcon}`); 574 | copyButtonEl.appendChild(shareIconEl); 575 | inputSuffixEl.prepend(copyButtonEl); 576 | 577 | const clipboard = new window.ClipboardJS(".aa-CopyButton", { 578 | text: function (_trigger) { 579 | const copyUrl = new URL(window.location); 580 | copyUrl.searchParams.set(kQueryArg, lastQuery); 581 | copyUrl.searchParams.set(kResultsArg, "1"); 582 | return copyUrl.toString(); 583 | }, 584 | }); 585 | clipboard.on("success", function (e) { 586 | // Focus the input 587 | 588 | // button target 589 | const button = e.trigger; 590 | const icon = button.querySelector("i.bi"); 591 | 592 | // flash "checked" 593 | icon.classList.add(checkIcon); 594 | icon.classList.remove(linkIcon); 595 | setTimeout(function () { 596 | icon.classList.remove(checkIcon); 597 | icon.classList.add(linkIcon); 598 | }, 1000); 599 | }); 600 | } 601 | 602 | // If there is a query, show the link icon 603 | if (copyButtonEl) { 604 | if (lastQuery && options["copy-button"]) { 605 | copyButtonEl.style.display = "flex"; 606 | } else { 607 | copyButtonEl.style.display = "none"; 608 | } 609 | } 610 | } 611 | } 612 | 613 | /* Search Index Handling */ 614 | // create the index 615 | var fuseIndex = undefined; 616 | async function readSearchData() { 617 | // Initialize the search index on demand 618 | if (fuseIndex === undefined) { 619 | // create fuse index 620 | const options = { 621 | keys: [ 622 | { name: "title", weight: 20 }, 623 | { name: "section", weight: 20 }, 624 | { name: "text", weight: 10 }, 625 | ], 626 | ignoreLocation: true, 627 | threshold: 0.1, 628 | }; 629 | const fuse = new window.Fuse([], options); 630 | 631 | // fetch the main search.json 632 | const response = await fetch(offsetURL("search.json")); 633 | if (response.status == 200) { 634 | return response.json().then(function (searchDocs) { 635 | searchDocs.forEach(function (searchDoc) { 636 | fuse.add(searchDoc); 637 | }); 638 | fuseIndex = fuse; 639 | return fuseIndex; 640 | }); 641 | } else { 642 | return Promise.reject( 643 | new Error( 644 | "Unexpected status from search index request: " + response.status 645 | ) 646 | ); 647 | } 648 | } 649 | return fuseIndex; 650 | } 651 | 652 | function inputElement() { 653 | return window.document.body.querySelector(".aa-Form .aa-Input"); 654 | } 655 | 656 | function focusSearchInput() { 657 | setTimeout(() => { 658 | const inputEl = inputElement(); 659 | if (inputEl) { 660 | inputEl.focus(); 661 | } 662 | }, 50); 663 | } 664 | 665 | /* Panels */ 666 | const kItemTypeDoc = "document"; 667 | const kItemTypeMore = "document-more"; 668 | const kItemTypeItem = "document-item"; 669 | const kItemTypeError = "error"; 670 | 671 | function renderItem( 672 | item, 673 | createElement, 674 | state, 675 | setActiveItemId, 676 | setContext, 677 | refresh 678 | ) { 679 | switch (item.type) { 680 | case kItemTypeDoc: 681 | return createDocumentCard( 682 | createElement, 683 | "file-richtext", 684 | item.title, 685 | item.section, 686 | item.text, 687 | item.href 688 | ); 689 | case kItemTypeMore: 690 | return createMoreCard( 691 | createElement, 692 | item, 693 | state, 694 | setActiveItemId, 695 | setContext, 696 | refresh 697 | ); 698 | case kItemTypeItem: 699 | return createSectionCard( 700 | createElement, 701 | item.section, 702 | item.text, 703 | item.href 704 | ); 705 | case kItemTypeError: 706 | return createErrorCard(createElement, item.title, item.text); 707 | default: 708 | return undefined; 709 | } 710 | } 711 | 712 | function createDocumentCard(createElement, icon, title, section, text, href) { 713 | const iconEl = createElement("i", { 714 | class: `bi bi-${icon} search-result-icon`, 715 | }); 716 | const titleEl = createElement("p", { class: "search-result-title" }, title); 717 | const titleContainerEl = createElement( 718 | "div", 719 | { class: "search-result-title-container" }, 720 | [iconEl, titleEl] 721 | ); 722 | 723 | const textEls = []; 724 | if (section) { 725 | const sectionEl = createElement( 726 | "p", 727 | { class: "search-result-section" }, 728 | section 729 | ); 730 | textEls.push(sectionEl); 731 | } 732 | const descEl = createElement("p", { 733 | class: "search-result-text", 734 | dangerouslySetInnerHTML: { 735 | __html: text, 736 | }, 737 | }); 738 | textEls.push(descEl); 739 | 740 | const textContainerEl = createElement( 741 | "div", 742 | { class: "search-result-text-container" }, 743 | textEls 744 | ); 745 | 746 | const containerEl = createElement( 747 | "div", 748 | { 749 | class: "search-result-container", 750 | }, 751 | [titleContainerEl, textContainerEl] 752 | ); 753 | 754 | const linkEl = createElement( 755 | "a", 756 | { 757 | href: offsetURL(href), 758 | class: "search-result-link", 759 | }, 760 | containerEl 761 | ); 762 | 763 | const classes = ["search-result-doc", "search-item"]; 764 | if (!section) { 765 | classes.push("document-selectable"); 766 | } 767 | 768 | return createElement( 769 | "div", 770 | { 771 | class: classes.join(" "), 772 | }, 773 | linkEl 774 | ); 775 | } 776 | 777 | function createMoreCard( 778 | createElement, 779 | item, 780 | state, 781 | setActiveItemId, 782 | setContext, 783 | refresh 784 | ) { 785 | const moreCardEl = createElement( 786 | "div", 787 | { 788 | class: "search-result-more search-item", 789 | onClick: (e) => { 790 | // Handle expanding the sections by adding the expanded 791 | // section to the list of expanded sections 792 | toggleExpanded(item, state, setContext, setActiveItemId, refresh); 793 | e.stopPropagation(); 794 | }, 795 | }, 796 | item.title 797 | ); 798 | 799 | return moreCardEl; 800 | } 801 | 802 | function toggleExpanded(item, state, setContext, setActiveItemId, refresh) { 803 | const expanded = state.context.expanded || []; 804 | if (expanded.includes(item.target)) { 805 | setContext({ 806 | expanded: expanded.filter((target) => target !== item.target), 807 | }); 808 | } else { 809 | setContext({ expanded: [...expanded, item.target] }); 810 | } 811 | 812 | refresh(); 813 | setActiveItemId(item.__autocomplete_id); 814 | } 815 | 816 | function createSectionCard(createElement, section, text, href) { 817 | const sectionEl = createSection(createElement, section, text, href); 818 | return createElement( 819 | "div", 820 | { 821 | class: "search-result-doc-section search-item", 822 | }, 823 | sectionEl 824 | ); 825 | } 826 | 827 | function createSection(createElement, title, text, href) { 828 | const descEl = createElement("p", { 829 | class: "search-result-text", 830 | dangerouslySetInnerHTML: { 831 | __html: text, 832 | }, 833 | }); 834 | 835 | const titleEl = createElement("p", { class: "search-result-section" }, title); 836 | const linkEl = createElement( 837 | "a", 838 | { 839 | href: offsetURL(href), 840 | class: "search-result-link", 841 | }, 842 | [titleEl, descEl] 843 | ); 844 | return linkEl; 845 | } 846 | 847 | function createErrorCard(createElement, title, text) { 848 | const descEl = createElement("p", { 849 | class: "search-error-text", 850 | dangerouslySetInnerHTML: { 851 | __html: text, 852 | }, 853 | }); 854 | 855 | const titleEl = createElement("p", { 856 | class: "search-error-title", 857 | dangerouslySetInnerHTML: { 858 | __html: ` ${title}`, 859 | }, 860 | }); 861 | const errorEl = createElement("div", { class: "search-error" }, [ 862 | titleEl, 863 | descEl, 864 | ]); 865 | return errorEl; 866 | } 867 | 868 | function positionPanel(pos) { 869 | const panelEl = window.document.querySelector( 870 | "#quarto-search-results .aa-Panel" 871 | ); 872 | const inputEl = window.document.querySelector( 873 | "#quarto-search .aa-Autocomplete" 874 | ); 875 | 876 | if (panelEl && inputEl) { 877 | panelEl.style.top = `${Math.round(panelEl.offsetTop)}px`; 878 | if (pos === "start") { 879 | panelEl.style.left = `${Math.round(inputEl.left)}px`; 880 | } else { 881 | panelEl.style.right = `${Math.round(inputEl.offsetRight)}px`; 882 | } 883 | } 884 | } 885 | 886 | /* Highlighting */ 887 | // highlighting functions 888 | function highlightMatch(query, text) { 889 | if (text) { 890 | const start = text.toLowerCase().indexOf(query.toLowerCase()); 891 | if (start !== -1) { 892 | const startMark = ""; 893 | const endMark = ""; 894 | 895 | const end = start + query.length; 896 | text = 897 | text.slice(0, start) + 898 | startMark + 899 | text.slice(start, end) + 900 | endMark + 901 | text.slice(end); 902 | const startInfo = clipStart(text, start); 903 | const endInfo = clipEnd( 904 | text, 905 | startInfo.position + startMark.length + endMark.length 906 | ); 907 | text = 908 | startInfo.prefix + 909 | text.slice(startInfo.position, endInfo.position) + 910 | endInfo.suffix; 911 | 912 | return text; 913 | } else { 914 | return text; 915 | } 916 | } else { 917 | return text; 918 | } 919 | } 920 | 921 | function clipStart(text, pos) { 922 | const clipStart = pos - 50; 923 | if (clipStart < 0) { 924 | // This will just return the start of the string 925 | return { 926 | position: 0, 927 | prefix: "", 928 | }; 929 | } else { 930 | // We're clipping before the start of the string, walk backwards to the first space. 931 | const spacePos = findSpace(text, pos, -1); 932 | return { 933 | position: spacePos.position, 934 | prefix: "", 935 | }; 936 | } 937 | } 938 | 939 | function clipEnd(text, pos) { 940 | const clipEnd = pos + 200; 941 | if (clipEnd > text.length) { 942 | return { 943 | position: text.length, 944 | suffix: "", 945 | }; 946 | } else { 947 | const spacePos = findSpace(text, clipEnd, 1); 948 | return { 949 | position: spacePos.position, 950 | suffix: spacePos.clipped ? "…" : "", 951 | }; 952 | } 953 | } 954 | 955 | function findSpace(text, start, step) { 956 | let stepPos = start; 957 | while (stepPos > -1 && stepPos < text.length) { 958 | const char = text[stepPos]; 959 | if (char === " " || char === "," || char === ":") { 960 | return { 961 | position: step === 1 ? stepPos : stepPos - step, 962 | clipped: stepPos > 1 && stepPos < text.length, 963 | }; 964 | } 965 | stepPos = stepPos + step; 966 | } 967 | 968 | return { 969 | position: stepPos - step, 970 | clipped: false, 971 | }; 972 | } 973 | 974 | // removes highlighting as implemented by the mark tag 975 | function clearHighlight(searchterm, el) { 976 | const childNodes = el.childNodes; 977 | for (let i = childNodes.length - 1; i >= 0; i--) { 978 | const node = childNodes[i]; 979 | if (node.nodeType === Node.ELEMENT_NODE) { 980 | if ( 981 | node.tagName === "MARK" && 982 | node.innerText.toLowerCase() === searchterm.toLowerCase() 983 | ) { 984 | el.replaceChild(document.createTextNode(node.innerText), node); 985 | } else { 986 | clearHighlight(searchterm, node); 987 | } 988 | } 989 | } 990 | } 991 | 992 | function escapeRegExp(string) { 993 | return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string 994 | } 995 | 996 | // highlight matches 997 | function highlight(term, el) { 998 | const termRegex = new RegExp(term, "ig"); 999 | const childNodes = el.childNodes; 1000 | 1001 | // walk back to front avoid mutating elements in front of us 1002 | for (let i = childNodes.length - 1; i >= 0; i--) { 1003 | const node = childNodes[i]; 1004 | 1005 | if (node.nodeType === Node.TEXT_NODE) { 1006 | // Search text nodes for text to highlight 1007 | const text = node.nodeValue; 1008 | 1009 | let startIndex = 0; 1010 | let matchIndex = text.search(termRegex); 1011 | if (matchIndex > -1) { 1012 | const markFragment = document.createDocumentFragment(); 1013 | while (matchIndex > -1) { 1014 | const prefix = text.slice(startIndex, matchIndex); 1015 | markFragment.appendChild(document.createTextNode(prefix)); 1016 | 1017 | const mark = document.createElement("mark"); 1018 | mark.appendChild( 1019 | document.createTextNode( 1020 | text.slice(matchIndex, matchIndex + term.length) 1021 | ) 1022 | ); 1023 | markFragment.appendChild(mark); 1024 | 1025 | startIndex = matchIndex + term.length; 1026 | matchIndex = text.slice(startIndex).search(new RegExp(term, "ig")); 1027 | if (matchIndex > -1) { 1028 | matchIndex = startIndex + matchIndex; 1029 | } 1030 | } 1031 | if (startIndex < text.length) { 1032 | markFragment.appendChild( 1033 | document.createTextNode(text.slice(startIndex, text.length)) 1034 | ); 1035 | } 1036 | 1037 | el.replaceChild(markFragment, node); 1038 | } 1039 | } else if (node.nodeType === Node.ELEMENT_NODE) { 1040 | // recurse through elements 1041 | highlight(term, node); 1042 | } 1043 | } 1044 | } 1045 | 1046 | /* Link Handling */ 1047 | // get the offset from this page for a given site root relative url 1048 | function offsetURL(url) { 1049 | var offset = getMeta("quarto:offset"); 1050 | return offset ? offset + url : url; 1051 | } 1052 | 1053 | // read a meta tag value 1054 | function getMeta(metaName) { 1055 | var metas = window.document.getElementsByTagName("meta"); 1056 | for (let i = 0; i < metas.length; i++) { 1057 | if (metas[i].getAttribute("name") === metaName) { 1058 | return metas[i].getAttribute("content"); 1059 | } 1060 | } 1061 | return ""; 1062 | } 1063 | 1064 | function algoliaSearch(query, limit, algoliaOptions) { 1065 | const { getAlgoliaResults } = window["@algolia/autocomplete-preset-algolia"]; 1066 | 1067 | const applicationId = algoliaOptions["application-id"]; 1068 | const searchOnlyApiKey = algoliaOptions["search-only-api-key"]; 1069 | const indexName = algoliaOptions["index-name"]; 1070 | const indexFields = algoliaOptions["index-fields"]; 1071 | const searchClient = window.algoliasearch(applicationId, searchOnlyApiKey); 1072 | const searchParams = algoliaOptions["params"]; 1073 | const searchAnalytics = !!algoliaOptions["analytics-events"]; 1074 | 1075 | return getAlgoliaResults({ 1076 | searchClient, 1077 | queries: [ 1078 | { 1079 | indexName: indexName, 1080 | query, 1081 | params: { 1082 | hitsPerPage: limit, 1083 | clickAnalytics: searchAnalytics, 1084 | ...searchParams, 1085 | }, 1086 | }, 1087 | ], 1088 | transformResponse: (response) => { 1089 | if (!indexFields) { 1090 | return response.hits.map((hit) => { 1091 | return hit.map((item) => { 1092 | return { 1093 | ...item, 1094 | text: highlightMatch(query, item.text), 1095 | }; 1096 | }); 1097 | }); 1098 | } else { 1099 | const remappedHits = response.hits.map((hit) => { 1100 | return hit.map((item) => { 1101 | const newItem = { ...item }; 1102 | ["href", "section", "title", "text"].forEach((keyName) => { 1103 | const mappedName = indexFields[keyName]; 1104 | if ( 1105 | mappedName && 1106 | item[mappedName] !== undefined && 1107 | mappedName !== keyName 1108 | ) { 1109 | newItem[keyName] = item[mappedName]; 1110 | delete newItem[mappedName]; 1111 | } 1112 | }); 1113 | newItem.text = highlightMatch(query, newItem.text); 1114 | return newItem; 1115 | }); 1116 | }); 1117 | return remappedHits; 1118 | } 1119 | }, 1120 | }); 1121 | } 1122 | 1123 | function fuseSearch(query, fuse, fuseOptions) { 1124 | return fuse.search(query, fuseOptions).map((result) => { 1125 | const addParam = (url, name, value) => { 1126 | const anchorParts = url.split("#"); 1127 | const baseUrl = anchorParts[0]; 1128 | const sep = baseUrl.search("\\?") > 0 ? "&" : "?"; 1129 | anchorParts[0] = baseUrl + sep + name + "=" + value; 1130 | return anchorParts.join("#"); 1131 | }; 1132 | 1133 | return { 1134 | title: result.item.title, 1135 | section: result.item.section, 1136 | href: addParam(result.item.href, kQueryArg, query), 1137 | text: highlightMatch(query, result.item.text), 1138 | }; 1139 | }); 1140 | } 1141 | -------------------------------------------------------------------------------- /img/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jtr13/website-template/c3eb589322c282087bd8d3b466a997bd1abd207b/img/profile.png -------------------------------------------------------------------------------- /index.qmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "About Me" 3 | about: 4 | id: me 5 | template: broadside 6 | image: img/profile.png 7 | --- 8 | 9 | :::{#me} 10 | 11 | ## Goals 12 | 13 | ## Education 14 | 15 | ## Experience 16 | 17 | ::: 18 | 19 | Thanks for checking out my web site! 20 | -------------------------------------------------------------------------------- /projects.qmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Projects" 3 | --- 4 | 5 | ## Project 1 6 | 7 | ## Project 2 8 | 9 | ## Project 3 10 | -------------------------------------------------------------------------------- /website-template.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | --------------------------------------------------------------------------------