Page not found
-Looks like there has been a mistake. Nothing exists here.
-You will be redirected to the main page within 3 seconds. If not redirected, please go back to the home page.
- -diff --git a/404.html b/404.html index d337f3fe830d..324618393be9 100644 --- a/404.html +++ b/404.html @@ -1,281 +1 @@ - - - - -
- - - - - - - - -Looks like there has been a mistake. Nothing exists here.
-You will be redirected to the main page within 3 seconds. If not redirected, please go back to the home page.
- -Looks like there has been a mistake. Nothing exists here.
You will be redirected to the main page within 3 seconds. If not redirected, please go back to the home page.
tag. We found the following text: ' + text); - const wrapper = document.createElement('span'); - wrapper.innerHTML = addedNode.nodeValue; - addedNode.parentNode.insertBefore(wrapper, addedNode); - addedNode.parentNode.removeChild(addedNode); - } - } break; - } - } - } - }).observe(this, {childList: true}); - } - - } - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - var bibtexParse = createCommonjsModule(function (module, exports) { - /* start bibtexParse 0.0.22 */ - - //Original work by Henrik Muehe (c) 2010 - // - //CommonJS port by Mikola Lysenko 2013 - // - //Port to Browser lib by ORCID / RCPETERS - // - //Issues: - //no comment handling within strings - //no string concatenation - //no variable values yet - //Grammar implemented here: - //bibtex -> (string | preamble | comment | entry)*; - //string -> '@STRING' '{' key_equals_value '}'; - //preamble -> '@PREAMBLE' '{' value '}'; - //comment -> '@COMMENT' '{' value '}'; - //entry -> '@' key '{' key ',' key_value_list '}'; - //key_value_list -> key_equals_value (',' key_equals_value)*; - //key_equals_value -> key '=' value; - //value -> value_quotes | value_braces | key; - //value_quotes -> '"' .*? '"'; // not quite - //value_braces -> '{' .*? '"'; // not quite - (function(exports) { - - function BibtexParser() { - - this.months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"]; - this.notKey = [',','{','}',' ','=']; - this.pos = 0; - this.input = ""; - this.entries = new Array(); - - this.currentEntry = ""; - - this.setInput = function(t) { - this.input = t; - }; - - this.getEntries = function() { - return this.entries; - }; - - this.isWhitespace = function(s) { - return (s == ' ' || s == '\r' || s == '\t' || s == '\n'); - }; - - this.match = function(s, canCommentOut) { - if (canCommentOut == undefined || canCommentOut == null) - canCommentOut = true; - this.skipWhitespace(canCommentOut); - if (this.input.substring(this.pos, this.pos + s.length) == s) { - this.pos += s.length; - } else { - throw "Token mismatch, expected " + s + ", found " - + this.input.substring(this.pos); - } this.skipWhitespace(canCommentOut); - }; - - this.tryMatch = function(s, canCommentOut) { - if (canCommentOut == undefined || canCommentOut == null) - canCommentOut = true; - this.skipWhitespace(canCommentOut); - if (this.input.substring(this.pos, this.pos + s.length) == s) { - return true; - } else { - return false; - } }; - - /* when search for a match all text can be ignored, not just white space */ - this.matchAt = function() { - while (this.input.length > this.pos && this.input[this.pos] != '@') { - this.pos++; - } - if (this.input[this.pos] == '@') { - return true; - } return false; - }; - - this.skipWhitespace = function(canCommentOut) { - while (this.isWhitespace(this.input[this.pos])) { - this.pos++; - } if (this.input[this.pos] == "%" && canCommentOut == true) { - while (this.input[this.pos] != "\n") { - this.pos++; - } this.skipWhitespace(canCommentOut); - } }; - - this.value_braces = function() { - var bracecount = 0; - this.match("{", false); - var start = this.pos; - var escaped = false; - while (true) { - if (!escaped) { - if (this.input[this.pos] == '}') { - if (bracecount > 0) { - bracecount--; - } else { - var end = this.pos; - this.match("}", false); - return this.input.substring(start, end); - } } else if (this.input[this.pos] == '{') { - bracecount++; - } else if (this.pos >= this.input.length - 1) { - throw "Unterminated value"; - } } if (this.input[this.pos] == '\\' && escaped == false) - escaped = true; - else - escaped = false; - this.pos++; - } }; - - this.value_comment = function() { - var str = ''; - var brcktCnt = 0; - while (!(this.tryMatch("}", false) && brcktCnt == 0)) { - str = str + this.input[this.pos]; - if (this.input[this.pos] == '{') - brcktCnt++; - if (this.input[this.pos] == '}') - brcktCnt--; - if (this.pos >= this.input.length - 1) { - throw "Unterminated value:" + this.input.substring(start); - } this.pos++; - } return str; - }; - - this.value_quotes = function() { - this.match('"', false); - var start = this.pos; - var escaped = false; - while (true) { - if (!escaped) { - if (this.input[this.pos] == '"') { - var end = this.pos; - this.match('"', false); - return this.input.substring(start, end); - } else if (this.pos >= this.input.length - 1) { - throw "Unterminated value:" + this.input.substring(start); - } } - if (this.input[this.pos] == '\\' && escaped == false) - escaped = true; - else - escaped = false; - this.pos++; - } }; - - this.single_value = function() { - var start = this.pos; - if (this.tryMatch("{")) { - return this.value_braces(); - } else if (this.tryMatch('"')) { - return this.value_quotes(); - } else { - var k = this.key(); - if (k.match("^[0-9]+$")) - return k; - else if (this.months.indexOf(k.toLowerCase()) >= 0) - return k.toLowerCase(); - else - throw "Value expected:" + this.input.substring(start) + ' for key: ' + k; - - } }; - - this.value = function() { - var values = []; - values.push(this.single_value()); - while (this.tryMatch("#")) { - this.match("#"); - values.push(this.single_value()); - } return values.join(""); - }; - - this.key = function() { - var start = this.pos; - while (true) { - if (this.pos >= this.input.length) { - throw "Runaway key"; - } // а-яА-Я is Cyrillic - //console.log(this.input[this.pos]); - if (this.notKey.indexOf(this.input[this.pos]) >= 0) { - return this.input.substring(start, this.pos); - } else { - this.pos++; - - } } }; - - this.key_equals_value = function() { - var key = this.key(); - if (this.tryMatch("=")) { - this.match("="); - var val = this.value(); - return [ key, val ]; - } else { - throw "... = value expected, equals sign missing:" - + this.input.substring(this.pos); - } }; - - this.key_value_list = function() { - var kv = this.key_equals_value(); - this.currentEntry['entryTags'] = {}; - this.currentEntry['entryTags'][kv[0]] = kv[1]; - while (this.tryMatch(",")) { - this.match(","); - // fixes problems with commas at the end of a list - if (this.tryMatch("}")) { - break; - } - kv = this.key_equals_value(); - this.currentEntry['entryTags'][kv[0]] = kv[1]; - } }; - - this.entry_body = function(d) { - this.currentEntry = {}; - this.currentEntry['citationKey'] = this.key(); - this.currentEntry['entryType'] = d.substring(1); - this.match(","); - this.key_value_list(); - this.entries.push(this.currentEntry); - }; - - this.directive = function() { - this.match("@"); - return "@" + this.key(); - }; - - this.preamble = function() { - this.currentEntry = {}; - this.currentEntry['entryType'] = 'PREAMBLE'; - this.currentEntry['entry'] = this.value_comment(); - this.entries.push(this.currentEntry); - }; - - this.comment = function() { - this.currentEntry = {}; - this.currentEntry['entryType'] = 'COMMENT'; - this.currentEntry['entry'] = this.value_comment(); - this.entries.push(this.currentEntry); - }; - - this.entry = function(d) { - this.entry_body(d); - }; - - this.bibtex = function() { - while (this.matchAt()) { - var d = this.directive(); - this.match("{"); - if (d == "@STRING") { - this.string(); - } else if (d == "@PREAMBLE") { - this.preamble(); - } else if (d == "@COMMENT") { - this.comment(); - } else { - this.entry(d); - } - this.match("}"); - } }; - } - exports.toJSON = function(bibtex) { - var b = new BibtexParser(); - b.setInput(bibtex); - b.bibtex(); - return b.entries; - }; - - /* added during hackathon don't hate on me */ - exports.toBibtex = function(json) { - var out = ''; - for ( var i in json) { - out += "@" + json[i].entryType; - out += '{'; - if (json[i].citationKey) - out += json[i].citationKey + ', '; - if (json[i].entry) - out += json[i].entry ; - if (json[i].entryTags) { - var tags = ''; - for (var jdx in json[i].entryTags) { - if (tags.length != 0) - tags += ', '; - tags += jdx + '= {' + json[i].entryTags[jdx] + '}'; - } - out += tags; - } - out += '}\n\n'; - } - return out; - - }; - - })( exports); - - /* end bibtexParse */ - }); - - // Copyright 2018 The Distill Template Authors - - function normalizeTag(string) { - return string - .replace(/[\t\n ]+/g, ' ') - .replace(/{\\["^`.'acu~Hvs]( )?([a-zA-Z])}/g, (full, x, char) => char) - .replace(/{\\([a-zA-Z])}/g, (full, char) => char); - } - - function parseBibtex(bibtex) { - const bibliography = new Map(); - const parsedEntries = bibtexParse.toJSON(bibtex); - for (const entry of parsedEntries) { - // normalize tags; note entryTags is an object, not Map - for (const [key, value] of Object.entries(entry.entryTags)) { - entry.entryTags[key.toLowerCase()] = normalizeTag(value); - } - entry.entryTags.type = entry.entryType; - // add to bibliography - bibliography.set(entry.citationKey, entry.entryTags); - } - return bibliography; - } - - function serializeFrontmatterToBibtex(frontMatter) { - return `@article{${frontMatter.slug}, - author = {${frontMatter.bibtexAuthors}}, - title = {${frontMatter.title}}, - journal = {${frontMatter.journal.title}}, - year = {${frontMatter.publishedYear}}, - note = {${frontMatter.url}}, - doi = {${frontMatter.doi}} -}`; - } - - // Copyright 2018 The Distill Template Authors - - class Bibliography extends HTMLElement { - - static get is() { return 'd-bibliography'; } - - constructor() { - super(); - - // set up mutation observer - const options = {childList: true, characterData: true, subtree: true}; - const observer = new MutationObserver( (entries) => { - for (const entry of entries) { - if (entry.target.nodeName === 'SCRIPT' || entry.type === 'characterData') { - this.parseIfPossible(); - } - } - }); - observer.observe(this, options); - } - - connectedCallback() { - requestAnimationFrame(() => { - this.parseIfPossible(); - }); - } - - parseIfPossible() { - const scriptTag = this.querySelector('script'); - if (!scriptTag) return; - if (scriptTag.type == 'text/bibtex') { - const newBibtex = scriptTag.textContent; - if (this.bibtex !== newBibtex) { - this.bibtex = newBibtex; - const bibliography = parseBibtex(this.bibtex); - this.notify(bibliography); - } - } else if (scriptTag.type == 'text/json') { - const bibliography = new Map(JSON.parse(scriptTag.textContent)); - this.notify(bibliography); - } else { - console.warn('Unsupported bibliography script tag type: ' + scriptTag.type); - } - } - - notify(bibliography) { - const options = { detail: bibliography, bubbles: true }; - const event = new CustomEvent('onBibliographyChanged', options); - this.dispatchEvent(event); - } - - /* observe 'src' attribute */ - - static get observedAttributes() { - return ['src']; - } - - receivedBibtex(event) { - const bibliography = parseBibtex(event.target.response); - this.notify(bibliography); - } - - attributeChangedCallback(name, oldValue, newValue) { - var oReq = new XMLHttpRequest(); - oReq.onload = (e) => this.receivedBibtex(e); - oReq.onerror = () => console.warn(`Could not load Bibtex! (tried ${newValue})`); - oReq.responseType = 'text'; - oReq.open('GET', newValue, true); - oReq.send(); - } - - - } - - // Copyright 2018 The Distill Template Authors - // - // Licensed under the Apache License, Version 2.0 (the "License"); - // you may not use this file except in compliance with the License. - // You may obtain a copy of the License at - // - // http://www.apache.org/licenses/LICENSE-2.0 - // - // Unless required by applicable law or agreed to in writing, software - // distributed under the License is distributed on an "AS IS" BASIS, - // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - // See the License for the specific language governing permissions and - // limitations under the License. - - // import style from '../styles/d-byline.css'; - - function bylineTemplate(frontMatter) { - return ` -
-`; - } - - class Byline extends HTMLElement { - - static get is() { return 'd-byline'; } - - set frontMatter(frontMatter) { - this.innerHTML = bylineTemplate(frontMatter); - } - - } - - // Copyright 2018 The Distill Template Authors - - const T$3 = Template( - "d-cite", - ` - - -
-
-`);
-
- class Code extends Mutating(T$4(HTMLElement)) {
-
- renderContent() {
-
- // check if language can be highlighted
- this.languageName = this.getAttribute('language');
- if (!this.languageName) {
- console.warn('You need to provide a language attribute to your `; - if (frontMatter.githubCompareUpdatesUrl) { - html += `View all changes to this article since it was first published.`; - } - html += ` - If you see mistakes or want to suggest changes, please create an issue on GitHub.
- `; - } - - const journal = frontMatter.journal; - if (typeof journal !== 'undefined' && journal.title === 'Distill') { - html += ` -Diagrams and text are licensed under Creative Commons Attribution CC-BY 4.0 with the source available on GitHub, unless noted otherwise. The figures that have been reused from other sources don’t fall under this license and can be recognized by a note in their caption: “Figure from …”.
- `; - } - - if (typeof frontMatter.publishedDate !== 'undefined') { - html += ` -For attribution in academic contexts, please cite this work as
-${frontMatter.concatenatedAuthors}, "${frontMatter.title}", Distill, ${frontMatter.publishedYear}.-
BibTeX citation
-${serializeFrontmatterToBibtex(frontMatter)}- `; - } - - return html; - } - - class DistillAppendix extends HTMLElement { - - static get is() { return 'distill-appendix'; } - - set frontMatter(frontMatter) { - this.innerHTML = appendixTemplate(frontMatter); - } - - } - - const footerTemplate = ` - - - - -`; - - // Copyright 2018 The Distill Template Authors - - const T$c = Template('distill-footer', footerTemplate); - - class DistillFooter extends T$c(HTMLElement) { - - } - - // Copyright 2018 The Distill Template Authors - - let templateIsLoading = false; - let runlevel = 0; - const initialize = function() { - if (window.distill.runlevel < 1) { - throw new Error("Insufficient Runlevel for Distill Template!"); - } - - /* 1. Flag that we're being loaded */ - if ("distill" in window && window.distill.templateIsLoading) { - throw new Error( - "Runlevel 1: Distill Template is getting loaded more than once, aborting!" - ); - } else { - window.distill.templateIsLoading = true; - console.debug("Runlevel 1: Distill Template has started loading."); - } - - /* 2. Add styles if they weren't added during prerendering */ - makeStyleTag(document); - console.debug("Runlevel 1: Static Distill styles have been added."); - console.debug("Runlevel 1->2."); - window.distill.runlevel += 1; - - /* 3. Register Controller listener functions */ - /* Needs to happen before components to their connected callbacks have a controller to talk to. */ - for (const [functionName, callback] of Object.entries(Controller.listeners)) { - if (typeof callback === "function") { - document.addEventListener(functionName, callback); - } else { - console.error("Runlevel 2: Controller listeners need to be functions!"); - } - } - console.debug("Runlevel 2: We can now listen to controller events."); - console.debug("Runlevel 2->3."); - window.distill.runlevel += 1; - - /* 4. Register components */ - const components = [ - Abstract, Appendix, Article, Bibliography, Byline, Cite, CitationList, Code, - Footnote, FootnoteList, FrontMatter$1, HoverBox, Title, DMath, References, TOC, Figure, - Slider, Interstitial - ]; - - const distillComponents = [DistillHeader, DistillAppendix, DistillFooter]; - - if (window.distill.runlevel < 2) { - throw new Error("Insufficient Runlevel for adding custom elements!"); - } - const allComponents = components.concat(distillComponents); - for (const component of allComponents) { - console.debug("Runlevel 2: Registering custom element: " + component.is); - customElements.define(component.is, component); - } - - console.debug( - "Runlevel 3: Distill Template finished registering custom elements." - ); - console.debug("Runlevel 3->4."); - window.distill.runlevel += 1; - - // If template was added after DOMContentLoaded we may have missed that event. - // Controller will check for that case, so trigger the event explicitly: - if (domContentLoaded()) { - Controller.listeners.DOMContentLoaded(); - } - - console.debug("Runlevel 4: Distill Template initialisation complete."); - window.distill.templateIsLoading = false; - window.distill.templateHasLoaded = true; - }; - - window.distill = { runlevel, initialize, templateIsLoading }; - - /* 0. Check browser feature support; synchronously polyfill if needed */ - if (Polyfills.browserSupportsAllFeatures()) { - console.debug("Runlevel 0: No need for polyfills."); - console.debug("Runlevel 0->1."); - window.distill.runlevel += 1; - window.distill.initialize(); - } else { - console.debug("Runlevel 0: Distill Template is loading polyfills."); - Polyfills.load(window.distill.initialize); - } - -}))); -//# sourceMappingURL=template.v2.js.map +!function(n){"function"==typeof define&&define.amd?define(n):n()}(function(){"use strict"; +// Copyright 2018 The Distill Template Authors +function n(n,t){n.title=t.title,t.published&&(t.published instanceof Date?n.publishedDate=t.published:t.published.constructor===String&&(n.publishedDate=new Date(t.published))),t.publishedDate&&(t.publishedDate instanceof Date?n.publishedDate=t.publishedDate:t.publishedDate.constructor===String?n.publishedDate=new Date(t.publishedDate):console.error("Don't know what to do with published date: "+t.publishedDate)),n.description=t.description,n.authors=t.authors.map(n=>new Nr(n)),n.katex=t.katex,n.password=t.password,t.doi&&(n.doi=t.doi)} +// Copyright 2018 The Distill Template Authors +function t(n=document){const t=new Set,e=n.querySelectorAll("d-cite");for(const n of e){const e=(n.getAttribute("key")||n.getAttribute("bibtex-key")).split(",").map(n=>n.trim());for(const n of e)t.add(n)}return[...t]}function e(n,t,e,i){if(null==n.author)return"";var r=n.author.split(" and ");let o=r.map(n=>{if(-1!=(n=n.trim()).indexOf(","))var e=n.split(",")[0].trim(),i=n.split(",")[1];else if(-1!=n.indexOf(" "))e=n.split(" ").slice(-1)[0].trim(),i=n.split(" ").slice(0,-1).join(" ");else e=n.trim();var r="";return i!=undefined&&(r=(r=i.trim().split(" ").map(n=>n.trim()[0])).join(".")+"."),t.replace("${F}",i).replace("${L}",e).replace("${I}",r).trim()});if(r.length>1){var a=o.slice(0,r.length-1).join(e);return a+=(i||e)+o[r.length-1]}return o[0]}function i(n){var t=n.journal||n.booktitle||"";if("volume"in n){var e=n.issue||n.number;e=e!=undefined?"("+e+")":"",t+=", Vol "+n.volume+e}return"pages"in n&&(t+=", pp. "+n.pages),""!=t&&(t+=". "),"publisher"in n&&"."!=(t+=n.publisher)[t.length-1]&&(t+="."),t}function r(n){if("url"in n){var t=n.url,e=/arxiv\.org\/abs\/([0-9\.]*)/.exec(t);if(null!=e&&(t=`http://arxiv.org/pdf/${e[1]}.pdf`),".pdf"==t.slice(-4))var i="PDF";else if(".html"==t.slice(-5))i="HTML";return` [${i||"link"}]`}return""}function o(n,t){return"doi"in n?`${t?"
',n.githubCompareUpdatesUrl&&(t+=`View all changes to this article since it was first published.`),t+=`\n If you see mistakes or want to suggest changes, please create an issue on GitHub.
\n `);const e=n.journal;return void 0!==e&&"Distill"===e.title&&(t+=`\nDiagrams and text are licensed under Creative Commons Attribution CC-BY 4.0 with the source available on GitHub, unless noted otherwise. The figures that have been reused from other sources don\u2019t fall under this license and can be recognized by a note in their caption: \u201cFigure from \u2026\u201d.
\n `),"undefined"!=typeof n.publishedDate&&(t+=`\nFor attribution in academic contexts, please cite this work as
\n${n.concatenatedAuthors}, "${n.title}", Distill, ${n.publishedYear}.\n
BibTeX citation
\n${v(n)}\n `),t}const Mr=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Tr=["Jan.","Feb.","March","April","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],_r=n=>n<10?"0"+n:n,Cr=function(n){return`${Mr[n.getDay()].substring(0,3)}, ${_r(n.getDate())} ${Tr[n.getMonth()].substring(0,3)} ${n.getFullYear().toString()} ${n.getUTCHours().toString()}:${n.getUTCMinutes().toString()}:${n.getUTCSeconds().toString()} Z`},Ar=function(n){return Array.from(n).reduce((n,[t,e])=>Object.assign(n,{[t]:e}),{})},Er=function(n){const t=new Map;for(var e in n)n.hasOwnProperty(e)&&t.set(e,n[e]);return t};class Nr{constructor(n){this.name=n.author,this.personalURL=n.authorURL,this.affiliation=n.affiliation,this.affiliationURL=n.affiliationURL,this.affiliations=n.affiliations||[]}get firstName(){const n=this.name.split(" ");return n.slice(0,n.length-1).join(" ")}get lastName(){const n=this.name.split(" ");return n[n.length-1]}}class Lr{constructor(){this.title="unnamed article",this.description="",this.authors=[],this.bibliography=new Map,this.bibliographyParsed=!1,this.citations=[],this.citationsCollected=!1,this.journal={},this.katex={},this.doi=undefined,this.publishedDate=undefined}set url(n){this._url=n}get url(){return this._url?this._url:this.distillPath&&this.journal.url?this.journal.url+"/"+this.distillPath:this.journal.url?this.journal.url:void 0}get githubUrl(){return this.githubPath?"https://github.com/"+this.githubPath:undefined}set previewURL(n){this._previewURL=n}get previewURL(){return this._previewURL?this._previewURL:this.url+"/thumbnail.jpg"}get publishedDateRFC(){return Cr(this.publishedDate)}get updatedDateRFC(){return Cr(this.updatedDate)}get publishedYear(){return this.publishedDate.getFullYear()}get publishedMonth(){return Tr[this.publishedDate.getMonth()]}get publishedDay(){return this.publishedDate.getDate()}get publishedMonthPadded(){return _r(this.publishedDate.getMonth()+1)}get publishedDayPadded(){return _r(this.publishedDate.getDate())}get publishedISODateOnly(){return this.publishedDate.toISOString().split("T")[0]}get volume(){const n=this.publishedYear-2015;if(n<1)throw new Error("Invalid publish date detected during computing volume");return n}get issue(){return this.publishedDate.getMonth()+1}get concatenatedAuthors(){return this.authors.length>2?this.authors[0].lastName+", et al.":2===this.authors.length?this.authors[0].lastName+" & "+this.authors[1].lastName:1===this.authors.length?this.authors[0].lastName:void 0}get bibtexAuthors(){return this.authors.map(n=>n.lastName+", "+n.firstName).join(" and ")}get slug(){let n="";return this.authors.length&&(n+=this.authors[0].lastName.toLowerCase(),n+=this.publishedYear,n+=this.title.split(" ")[0].toLowerCase()),n||"Untitled"}get bibliographyEntries(){return new Map(this.citations.map(n=>{return[n,this.bibliography.get(n)]}))}set bibliography(n){n instanceof Map?this._bibliography=n:"object"==typeof n&&(this._bibliography=Er(n))}get bibliography(){return this._bibliography}static fromObject(n){const t=new Lr;return Object.assign(t,n),t}assignToObject(n){Object.assign(n,this),n.bibliography=Ar(this.bibliographyEntries),n.url=this.url,n.doi=this.doi,n.githubUrl=this.githubUrl,n.previewURL=this.previewURL,this.publishedDate&&(n.volume=this.volume,n.issue=this.issue,n.publishedDateRFC=this.publishedDateRFC,n.publishedYear=this.publishedYear,n.publishedMonth=this.publishedMonth,n.publishedDay=this.publishedDay,n.publishedMonthPadded=this.publishedMonthPadded,n.publishedDayPadded=this.publishedDayPadded),this.updatedDate&&(n.updatedDateRFC=this.updatedDateRFC),n.concatenatedAuthors=this.concatenatedAuthors,n.bibtexAuthors=this.bibtexAuthors,n.slug=this.slug}} +// Copyright 2018 The Distill Template Authors +const Dr=n=>(class extends n{constructor(){super();const n={childList:!0,characterData:!0,subtree:!0},t=new MutationObserver(()=>{t.disconnect(),this.renderIfPossible(),t.observe(this,n)});t.observe(this,n)}connectedCallback(){super.connectedCallback(),this.renderIfPossible()}renderIfPossible(){this.textContent&&this.root&&this.renderContent()}renderContent(){console.error(`Your class ${this.constructor.name} must provide a custom renderContent() method!`)}}),Or=(n,t,e=!0)=>i=>{const r=document.createElement("template");return r.innerHTML=t,e&&"ShadyCSS"in window&&ShadyCSS.prepareTemplate(r,n),class extends i{static get is(){return n}constructor(){super(),this.clone=document.importNode(r.content,!0),e&&(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(this.clone))}connectedCallback(){this.hasAttribute("distill-prerendered")||(e?"ShadyCSS"in window&&ShadyCSS.styleElement(this):this.insertBefore(this.clone,this.firstChild))}get root(){return e?this.shadowRoot:this}$(n){return this.root.querySelector(n)}$$(n){return this.root.querySelectorAll(n)}}}; +// Copyright 2018 The Distill Template Authors +var Ir='/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nspan.katex-display {\n text-align: left;\n padding: 8px 0 8px 0;\n margin: 0.5em 0 0.5em 1em;\n}\n\nspan.katex {\n -webkit-font-smoothing: antialiased;\n color: rgba(0, 0, 0, 0.8);\n font-size: 1.18em;\n}\n'; +// Copyright 2018 The Distill Template Authors +const Fr=function(n,t,e){let i=e,r=0;const o=n.length;for(;i
tag. We found the following text: "+t);const e=document.createElement("span");e.innerHTML=n.nodeValue,n.parentNode.insertBefore(e,n),n.parentNode.removeChild(n)}}}}).observe(this,{childList:!0})}}var ro="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},oo=m(function(n,t){!function(n){function t(){this.months=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],this.notKey=[",","{","}"," ","="],this.pos=0,this.input="",this.entries=new Array,this.currentEntry="",this.setInput=function(n){this.input=n},this.getEntries=function(){return this.entries},this.isWhitespace=function(n){return" "==n||"\r"==n||"\t"==n||"\n"==n},this.match=function(n,t){if(t!=undefined&&null!=t||(t=!0),this.skipWhitespace(t),this.input.substring(this.pos,this.pos+n.length)!=n)throw"Token mismatch, expected "+n+", found "+this.input.substring(this.pos);this.pos+=n.length,this.skipWhitespace(t)},this.tryMatch=function(n,t){return t!=undefined&&null!=t||(t=!0),this.skipWhitespace(t),this.input.substring(this.pos,this.pos+n.length)==n},this.matchAt=function(){for(;this.input.length>this.pos&&"@"!=this.input[this.pos];)this.pos++;return"@"==this.input[this.pos]},this.skipWhitespace=function(n){for(;this.isWhitespace(this.input[this.pos]);)this.pos++;if("%"==this.input[this.pos]&&1==n){for(;"\n"!=this.input[this.pos];)this.pos++;this.skipWhitespace(n)}},this.value_braces=function(){var n=0;this.match("{",!1);for(var t=this.pos,e=!1;;){if(!e)if("}"==this.input[this.pos]){if(!(n>0)){var i=this.pos;return this.match("}",!1),this.input.substring(t,i)}n--}else if("{"==this.input[this.pos])n++;else if(this.pos>=this.input.length-1)throw"Unterminated value";e="\\"==this.input[this.pos]&&0==e,this.pos++}},this.value_comment=function(){for(var n="",t=0;!this.tryMatch("}",!1)||0!=t;){if(n+=this.input[this.pos],"{"==this.input[this.pos]&&t++,"}"==this.input[this.pos]&&t--,this.pos>=this.input.length-1)throw"Unterminated value:"+this.input.substring(start);this.pos++}return n},this.value_quotes=function(){this.match('"',!1);for(var n=this.pos,t=!1;;){if(!t){if('"'==this.input[this.pos]){var e=this.pos;return this.match('"',!1),this.input.substring(n,e)}if(this.pos>=this.input.length-1)throw"Unterminated value:"+this.input.substring(n)}t="\\"==this.input[this.pos]&&0==t,this.pos++}},this.single_value=function(){var n=this.pos;if(this.tryMatch("{"))return this.value_braces();if(this.tryMatch('"'))return this.value_quotes();var t=this.key();if(t.match("^[0-9]+$"))return t;if(this.months.indexOf(t.toLowerCase())>=0)return t.toLowerCase();throw"Value expected:"+this.input.substring(n)+" for key: "+t},this.value=function(){var n=[];for(n.push(this.single_value());this.tryMatch("#");)this.match("#"),n.push(this.single_value());return n.join("")},this.key=function(){for(var n=this.pos;;){if(this.pos>=this.input.length)throw"Runaway key";if(this.notKey.indexOf(this.input[this.pos])>=0)return this.input.substring(n,this.pos);this.pos++}},this.key_equals_value=function(){var n=this.key();if(this.tryMatch("="))return this.match("="),[n,this.value()];throw"... = value expected, equals sign missing:"+this.input.substring(this.pos)},this.key_value_list=function(){var n=this.key_equals_value();for(this.currentEntry.entryTags={},this.currentEntry.entryTags[n[0]]=n[1];this.tryMatch(",")&&(this.match(","),!this.tryMatch("}"));)n=this.key_equals_value(),this.currentEntry.entryTags[n[0]]=n[1]},this.entry_body=function(n){this.currentEntry={},this.currentEntry.citationKey=this.key(),this.currentEntry.entryType=n.substring(1),this.match(","),this.key_value_list(),this.entries.push(this.currentEntry)},this.directive=function(){return this.match("@"),"@"+this.key()},this.preamble=function(){this.currentEntry={},this.currentEntry.entryType="PREAMBLE",this.currentEntry.entry=this.value_comment(),this.entries.push(this.currentEntry)},this.comment=function(){this.currentEntry={},this.currentEntry.entryType="COMMENT",this.currentEntry.entry=this.value_comment(),this.entries.push(this.currentEntry)},this.entry=function(n){this.entry_body(n)},this.bibtex=function(){for(;this.matchAt();){var n=this.directive();this.match("{"),"@STRING"==n?this.string():"@PREAMBLE"==n?this.preamble():"@COMMENT"==n?this.comment():this.entry(n),this.match("}")}}}n.toJSON=function(n){var e=new t;return e.setInput(n),e.bibtex(),e.entries},n.toBibtex=function(n){var t="";for(var e in n){if(t+="@"+n[e].entryType,t+="{",n[e].citationKey&&(t+=n[e].citationKey+", "),n[e].entry&&(t+=n[e].entry),n[e].entryTags){var i="";for(var r in n[e].entryTags)0!=i.length&&(i+=", "),i+=r+"= {"+n[e].entryTags[r]+"}";t+=i}t+="}\n\n"}return t}}(t)});class ao extends HTMLElement{static get is(){return"d-bibliography"}constructor(){super();const n={childList:!0,characterData:!0,subtree:!0};new MutationObserver(n=>{for(const t of n)"SCRIPT"!==t.target.nodeName&&"characterData"!==t.type||this.parseIfPossible()}).observe(this,n)}connectedCallback(){requestAnimationFrame(()=>{this.parseIfPossible()})}parseIfPossible(){const n=this.querySelector("script");if(n)if("text/bibtex"==n.type){const t=n.textContent;if(this.bibtex!==t){this.bibtex=t;const n=y(this.bibtex);this.notify(n)}}else if("text/json"==n.type){const t=new Map(JSON.parse(n.textContent));this.notify(t)}else console.warn("Unsupported bibliography script tag type: "+n.type)}notify(n){const t=new CustomEvent("onBibliographyChanged",{detail:n,bubbles:!0});this.dispatchEvent(t)}static get observedAttributes(){return["src"]}receivedBibtex(n){const t=y(n.target.response);this.notify(t)}attributeChangedCallback(n,t,e){var i=new XMLHttpRequest;i.onload=(n=>this.receivedBibtex(n)),i.onerror=(()=>console.warn(`Could not load Bibtex! (tried ${e})`)),i.responseType="text",i.open("GET",e,!0),i.send()}}class so extends HTMLElement{static get is(){return"d-byline"}set frontMatter(n){this.innerHTML=w(n)}}
+// Copyright 2018 The Distill Template Authors
+const lo=Or("d-cite",'\n\n\n
\n\n`);class go extends(Dr(fo(HTMLElement))){renderContent(){if(this.languageName=this.getAttribute("language"),!this.languageName)return void console.warn('You need to provide a language attribute to your