or tag. We found the following text: ' + text);\n const wrapper = document.createElement('span');\n wrapper.innerHTML = addedNode.nodeValue;\n addedNode.parentNode.insertBefore(wrapper, addedNode);\n addedNode.parentNode.removeChild(addedNode);\n }\n } break;\n }\n }\n }\n }).observe(this, {childList: true});\n }\n\n }\n\n var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n function createCommonjsModule(fn, module) {\n \treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n }\n\n var bibtexParse = createCommonjsModule(function (module, exports) {\n /* start bibtexParse 0.0.22 */\n\n //Original work by Henrik Muehe (c) 2010\n //\n //CommonJS port by Mikola Lysenko 2013\n //\n //Port to Browser lib by ORCID / RCPETERS\n //\n //Issues:\n //no comment handling within strings\n //no string concatenation\n //no variable values yet\n //Grammar implemented here:\n //bibtex -> (string | preamble | comment | entry)*;\n //string -> '@STRING' '{' key_equals_value '}';\n //preamble -> '@PREAMBLE' '{' value '}';\n //comment -> '@COMMENT' '{' value '}';\n //entry -> '@' key '{' key ',' key_value_list '}';\n //key_value_list -> key_equals_value (',' key_equals_value)*;\n //key_equals_value -> key '=' value;\n //value -> value_quotes | value_braces | key;\n //value_quotes -> '\"' .*? '\"'; // not quite\n //value_braces -> '{' .*? '\"'; // not quite\n (function(exports) {\n\n function BibtexParser() {\n\n this.months = [\"jan\", \"feb\", \"mar\", \"apr\", \"may\", \"jun\", \"jul\", \"aug\", \"sep\", \"oct\", \"nov\", \"dec\"];\n this.notKey = [',','{','}',' ','='];\n this.pos = 0;\n this.input = \"\";\n this.entries = new Array();\n\n this.currentEntry = \"\";\n\n this.setInput = function(t) {\n this.input = t;\n };\n\n this.getEntries = function() {\n return this.entries;\n };\n\n this.isWhitespace = function(s) {\n return (s == ' ' || s == '\\r' || s == '\\t' || s == '\\n');\n };\n\n this.match = function(s, canCommentOut) {\n if (canCommentOut == undefined || canCommentOut == null)\n canCommentOut = true;\n this.skipWhitespace(canCommentOut);\n if (this.input.substring(this.pos, this.pos + s.length) == s) {\n this.pos += s.length;\n } else {\n throw \"Token mismatch, expected \" + s + \", found \"\n + this.input.substring(this.pos);\n } this.skipWhitespace(canCommentOut);\n };\n\n this.tryMatch = function(s, canCommentOut) {\n if (canCommentOut == undefined || canCommentOut == null)\n canCommentOut = true;\n this.skipWhitespace(canCommentOut);\n if (this.input.substring(this.pos, this.pos + s.length) == s) {\n return true;\n } else {\n return false;\n } };\n\n /* when search for a match all text can be ignored, not just white space */\n this.matchAt = function() {\n while (this.input.length > this.pos && this.input[this.pos] != '@') {\n this.pos++;\n }\n if (this.input[this.pos] == '@') {\n return true;\n } return false;\n };\n\n this.skipWhitespace = function(canCommentOut) {\n while (this.isWhitespace(this.input[this.pos])) {\n this.pos++;\n } if (this.input[this.pos] == \"%\" && canCommentOut == true) {\n while (this.input[this.pos] != \"\\n\") {\n this.pos++;\n } this.skipWhitespace(canCommentOut);\n } };\n\n this.value_braces = function() {\n var bracecount = 0;\n this.match(\"{\", false);\n var start = this.pos;\n var escaped = false;\n while (true) {\n if (!escaped) {\n if (this.input[this.pos] == '}') {\n if (bracecount > 0) {\n bracecount--;\n } else {\n var end = this.pos;\n this.match(\"}\", false);\n return this.input.substring(start, end);\n } } else if (this.input[this.pos] == '{') {\n bracecount++;\n } else if (this.pos >= this.input.length - 1) {\n throw \"Unterminated value\";\n } } if (this.input[this.pos] == '\\\\' && escaped == false)\n escaped = true;\n else\n escaped = false;\n this.pos++;\n } };\n\n this.value_comment = function() {\n var str = '';\n var brcktCnt = 0;\n while (!(this.tryMatch(\"}\", false) && brcktCnt == 0)) {\n str = str + this.input[this.pos];\n if (this.input[this.pos] == '{')\n brcktCnt++;\n if (this.input[this.pos] == '}')\n brcktCnt--;\n if (this.pos >= this.input.length - 1) {\n throw \"Unterminated value:\" + this.input.substring(start);\n } this.pos++;\n } return str;\n };\n\n this.value_quotes = function() {\n this.match('\"', false);\n var start = this.pos;\n var escaped = false;\n while (true) {\n if (!escaped) {\n if (this.input[this.pos] == '\"') {\n var end = this.pos;\n this.match('\"', false);\n return this.input.substring(start, end);\n } else if (this.pos >= this.input.length - 1) {\n throw \"Unterminated value:\" + this.input.substring(start);\n } }\n if (this.input[this.pos] == '\\\\' && escaped == false)\n escaped = true;\n else\n escaped = false;\n this.pos++;\n } };\n\n this.single_value = function() {\n var start = this.pos;\n if (this.tryMatch(\"{\")) {\n return this.value_braces();\n } else if (this.tryMatch('\"')) {\n return this.value_quotes();\n } else {\n var k = this.key();\n if (k.match(\"^[0-9]+$\"))\n return k;\n else if (this.months.indexOf(k.toLowerCase()) >= 0)\n return k.toLowerCase();\n else\n throw \"Value expected:\" + this.input.substring(start) + ' for key: ' + k;\n\n } };\n\n this.value = function() {\n var values = [];\n values.push(this.single_value());\n while (this.tryMatch(\"#\")) {\n this.match(\"#\");\n values.push(this.single_value());\n } return values.join(\"\");\n };\n\n this.key = function() {\n var start = this.pos;\n while (true) {\n if (this.pos >= this.input.length) {\n throw \"Runaway key\";\n } // а-яА-Я is Cyrillic\n //console.log(this.input[this.pos]);\n if (this.notKey.indexOf(this.input[this.pos]) >= 0) {\n return this.input.substring(start, this.pos);\n } else {\n this.pos++;\n\n } } };\n\n this.key_equals_value = function() {\n var key = this.key();\n if (this.tryMatch(\"=\")) {\n this.match(\"=\");\n var val = this.value();\n return [ key, val ];\n } else {\n throw \"... = value expected, equals sign missing:\"\n + this.input.substring(this.pos);\n } };\n\n this.key_value_list = function() {\n var kv = this.key_equals_value();\n this.currentEntry['entryTags'] = {};\n this.currentEntry['entryTags'][kv[0]] = kv[1];\n while (this.tryMatch(\",\")) {\n this.match(\",\");\n // fixes problems with commas at the end of a list\n if (this.tryMatch(\"}\")) {\n break;\n }\n kv = this.key_equals_value();\n this.currentEntry['entryTags'][kv[0]] = kv[1];\n } };\n\n this.entry_body = function(d) {\n this.currentEntry = {};\n this.currentEntry['citationKey'] = this.key();\n this.currentEntry['entryType'] = d.substring(1);\n this.match(\",\");\n this.key_value_list();\n this.entries.push(this.currentEntry);\n };\n\n this.directive = function() {\n this.match(\"@\");\n return \"@\" + this.key();\n };\n\n this.preamble = function() {\n this.currentEntry = {};\n this.currentEntry['entryType'] = 'PREAMBLE';\n this.currentEntry['entry'] = this.value_comment();\n this.entries.push(this.currentEntry);\n };\n\n this.comment = function() {\n this.currentEntry = {};\n this.currentEntry['entryType'] = 'COMMENT';\n this.currentEntry['entry'] = this.value_comment();\n this.entries.push(this.currentEntry);\n };\n\n this.entry = function(d) {\n this.entry_body(d);\n };\n\n this.bibtex = function() {\n while (this.matchAt()) {\n var d = this.directive();\n this.match(\"{\");\n if (d == \"@STRING\") {\n this.string();\n } else if (d == \"@PREAMBLE\") {\n this.preamble();\n } else if (d == \"@COMMENT\") {\n this.comment();\n } else {\n this.entry(d);\n }\n this.match(\"}\");\n } };\n }\n exports.toJSON = function(bibtex) {\n var b = new BibtexParser();\n b.setInput(bibtex);\n b.bibtex();\n return b.entries;\n };\n\n /* added during hackathon don't hate on me */\n exports.toBibtex = function(json) {\n var out = '';\n for ( var i in json) {\n out += \"@\" + json[i].entryType;\n out += '{';\n if (json[i].citationKey)\n out += json[i].citationKey + ', ';\n if (json[i].entry)\n out += json[i].entry ;\n if (json[i].entryTags) {\n var tags = '';\n for (var jdx in json[i].entryTags) {\n if (tags.length != 0)\n tags += ', ';\n tags += jdx + '= {' + json[i].entryTags[jdx] + '}';\n }\n out += tags;\n }\n out += '}\\n\\n';\n }\n return out;\n\n };\n\n })( exports);\n\n /* end bibtexParse */\n });\n\n // Copyright 2018 The Distill Template Authors\n\n function normalizeTag(string) {\n return string\n .replace(/[\\t\\n ]+/g, ' ')\n .replace(/{\\\\[\"^`.'acu~Hvs]( )?([a-zA-Z])}/g, (full, x, char) => char)\n .replace(/{\\\\([a-zA-Z])}/g, (full, char) => char);\n }\n\n function parseBibtex(bibtex) {\n const bibliography = new Map();\n const parsedEntries = bibtexParse.toJSON(bibtex);\n for (const entry of parsedEntries) {\n // normalize tags; note entryTags is an object, not Map\n for (const [key, value] of Object.entries(entry.entryTags)) {\n entry.entryTags[key.toLowerCase()] = normalizeTag(value);\n }\n entry.entryTags.type = entry.entryType;\n // add to bibliography\n bibliography.set(entry.citationKey, entry.entryTags);\n }\n return bibliography;\n }\n\n function serializeFrontmatterToBibtex(frontMatter) {\n return `@article{${frontMatter.slug},\n author = {${frontMatter.bibtexAuthors}},\n title = {${frontMatter.title}},\n journal = {${frontMatter.journal.title}},\n year = {${frontMatter.publishedYear}},\n note = {${frontMatter.url}},\n doi = {${frontMatter.doi}}\n}`;\n }\n\n // Copyright 2018 The Distill Template Authors\n\n class Bibliography extends HTMLElement {\n\n static get is() { return 'd-bibliography'; }\n\n constructor() {\n super();\n\n // set up mutation observer\n const options = {childList: true, characterData: true, subtree: true};\n const observer = new MutationObserver( (entries) => {\n for (const entry of entries) {\n if (entry.target.nodeName === 'SCRIPT' || entry.type === 'characterData') {\n this.parseIfPossible();\n }\n }\n });\n observer.observe(this, options);\n }\n\n connectedCallback() {\n requestAnimationFrame(() => {\n this.parseIfPossible();\n });\n }\n\n parseIfPossible() {\n const scriptTag = this.querySelector('script');\n if (!scriptTag) return;\n if (scriptTag.type == 'text/bibtex') {\n const newBibtex = scriptTag.textContent;\n if (this.bibtex !== newBibtex) {\n this.bibtex = newBibtex;\n const bibliography = parseBibtex(this.bibtex);\n this.notify(bibliography);\n }\n } else if (scriptTag.type == 'text/json') {\n const bibliography = new Map(JSON.parse(scriptTag.textContent));\n this.notify(bibliography);\n } else {\n console.warn('Unsupported bibliography script tag type: ' + scriptTag.type);\n }\n }\n\n notify(bibliography) {\n const options = { detail: bibliography, bubbles: true };\n const event = new CustomEvent('onBibliographyChanged', options);\n this.dispatchEvent(event);\n }\n\n /* observe 'src' attribute */\n\n static get observedAttributes() {\n return ['src'];\n }\n\n receivedBibtex(event) {\n const bibliography = parseBibtex(event.target.response);\n this.notify(bibliography);\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n var oReq = new XMLHttpRequest();\n oReq.onload = (e) => this.receivedBibtex(e);\n oReq.onerror = () => console.warn(`Could not load Bibtex! (tried ${newValue})`);\n oReq.responseType = 'text';\n oReq.open('GET', newValue, true);\n oReq.send();\n }\n\n\n }\n\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 // import style from '../styles/d-byline.css';\n\n function bylineTemplate(frontMatter) {\n return `\n
\n
\n
\n
\n
Published \n
May 31, 2024
\n
\n
\n`;\n }\n\n class Byline extends HTMLElement {\n\n static get is() { return 'd-byline'; }\n\n set frontMatter(frontMatter) {\n this.innerHTML = bylineTemplate(frontMatter);\n }\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$3 = Template(\n \"d-cite\",\n `\n\n\n \n\n\n \n
\n`\n );\n\n class Cite extends T$3(HTMLElement) {\n /* Lifecycle */\n constructor() {\n super();\n this._numbers = [];\n this._entries = [];\n }\n\n connectedCallback() {\n this.outerSpan = this.root.querySelector(\"#citation-\");\n this.innerSpan = this.root.querySelector(\".citation-number\");\n this.hoverBox = this.root.querySelector(\"d-hover-box\");\n window.customElements.whenDefined(\"d-hover-box\").then(() => {\n this.hoverBox.listen(this);\n });\n // in case this component got connected after values were set\n if (this.numbers) {\n this.displayNumbers(this.numbers);\n }\n if (this.entries) {\n this.displayEntries(this.entries);\n }\n }\n\n //TODO This causes an infinite loop on firefox with polyfills.\n // This is only needed for interactive editing so no priority.\n // disconnectedCallback() {\n // const options = { detail: [this, this.keys], bubbles: true };\n // const event = new CustomEvent('onCiteKeyRemoved', options);\n // document.dispatchEvent(event);\n // }\n\n /* observe 'key' attribute */\n\n static get observedAttributes() {\n return [\"key\", \"bibtex-key\"];\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n const eventName = oldValue ? \"onCiteKeyChanged\" : \"onCiteKeyCreated\";\n const keys = newValue.split(\",\").map(k => k.trim());\n const options = { detail: [this, keys], bubbles: true };\n const event = new CustomEvent(eventName, options);\n document.dispatchEvent(event);\n }\n\n set key(value) {\n this.setAttribute(\"key\", value);\n }\n\n get key() {\n return this.getAttribute(\"key\") || this.getAttribute(\"bibtex-key\");\n }\n\n get keys() {\n const result = this.key.split(\",\");\n console.log(result);\n return result;\n }\n\n /* Setters & Rendering */\n\n set numbers(numbers) {\n this._numbers = numbers;\n this.displayNumbers(numbers);\n }\n\n get numbers() {\n return this._numbers;\n }\n\n displayNumbers(numbers) {\n if (!this.innerSpan) return;\n const numberStrings = numbers.map(index => {\n return index == -1 ? \"?\" : index + 1 + \"\";\n });\n const textContent = \"[\" + numberStrings.join(\", \") + \"]\";\n this.innerSpan.textContent = textContent;\n }\n\n set entries(entries) {\n this._entries = entries;\n this.displayEntries(entries);\n }\n\n get entries() {\n return this._entries;\n }\n\n displayEntries(entries) {\n if (!this.hoverBox) return;\n this.hoverBox.innerHTML = `\n ${entries\n .map(hover_cite)\n .map(html => `${html} `)\n .join(\"\\n\")}\n `;\n }\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const styles$1 = `\nd-citation-list {\n contain: style;\n}\n\nd-citation-list .references {\n grid-column: text;\n}\n\nd-citation-list .references .title {\n font-weight: 500;\n}\n`;\n\n function renderCitationList(element, entries, dom=document) {\n if (entries.size > 0) {\n element.style.display = '';\n let list = element.querySelector('.references');\n if (list) {\n list.innerHTML = '';\n } else {\n const stylesTag = dom.createElement('style');\n stylesTag.innerHTML = styles$1;\n element.appendChild(stylesTag);\n\n const heading = dom.createElement('h3');\n heading.id = 'references';\n heading.textContent = 'References';\n element.appendChild(heading);\n\n list = dom.createElement('ol');\n list.id = 'references-list';\n list.className = 'references';\n element.appendChild(list);\n }\n\n for (const [key, entry] of entries) {\n const listItem = dom.createElement('li');\n listItem.id = key;\n listItem.innerHTML = bibliography_cite(entry);\n list.appendChild(listItem);\n }\n } else {\n element.style.display = 'none';\n }\n }\n\n class CitationList extends HTMLElement {\n\n static get is() { return 'd-citation-list'; }\n\n connectedCallback() {\n if (!this.hasAttribute('distill-prerendered')) {\n this.style.display = 'none';\n }\n }\n\n set citations(citations) {\n renderCitationList(this, citations);\n }\n\n }\n\n var prism = createCommonjsModule(function (module) {\n /* **********************************************\n Begin prism-core.js\n ********************************************** */\n\n var _self = (typeof window !== 'undefined')\n \t? window // if in browser\n \t: (\n \t\t(typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)\n \t\t? self // if in worker\n \t\t: {} // if in node js\n \t);\n\n /**\n * Prism: Lightweight, robust, elegant syntax highlighting\n * MIT license http://www.opensource.org/licenses/mit-license.php/\n * @author Lea Verou http://lea.verou.me\n */\n\n var Prism = (function (_self){\n\n // Private helper vars\n var lang = /\\blang(?:uage)?-([\\w-]+)\\b/i;\n var uniqueId = 0;\n\n\n var _ = {\n \tmanual: _self.Prism && _self.Prism.manual,\n \tdisableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler,\n \tutil: {\n \t\tencode: function encode(tokens) {\n \t\t\tif (tokens instanceof Token) {\n \t\t\t\treturn new Token(tokens.type, encode(tokens.content), tokens.alias);\n \t\t\t} else if (Array.isArray(tokens)) {\n \t\t\t\treturn tokens.map(encode);\n \t\t\t} else {\n \t\t\t\treturn tokens.replace(/&/g, '&').replace(/' + env.content + '' + env.tag + '>';\n };\n\n /**\n * @param {string} text\n * @param {LinkedList} tokenList\n * @param {any} grammar\n * @param {LinkedListNode} startNode\n * @param {number} startPos\n * @param {boolean} [oneshot=false]\n * @param {string} [target]\n */\n function matchGrammar(text, tokenList, grammar, startNode, startPos, oneshot, target) {\n \tfor (var token in grammar) {\n \t\tif (!grammar.hasOwnProperty(token) || !grammar[token]) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tvar patterns = grammar[token];\n \t\tpatterns = Array.isArray(patterns) ? patterns : [patterns];\n\n \t\tfor (var j = 0; j < patterns.length; ++j) {\n \t\t\tif (target && target == token + ',' + j) {\n \t\t\t\treturn;\n \t\t\t}\n\n \t\t\tvar pattern = patterns[j],\n \t\t\t\tinside = pattern.inside,\n \t\t\t\tlookbehind = !!pattern.lookbehind,\n \t\t\t\tgreedy = !!pattern.greedy,\n \t\t\t\tlookbehindLength = 0,\n \t\t\t\talias = pattern.alias;\n\n \t\t\tif (greedy && !pattern.pattern.global) {\n \t\t\t\t// Without the global flag, lastIndex won't work\n \t\t\t\tvar flags = pattern.pattern.toString().match(/[imsuy]*$/)[0];\n \t\t\t\tpattern.pattern = RegExp(pattern.pattern.source, flags + 'g');\n \t\t\t}\n\n \t\t\tpattern = pattern.pattern || pattern;\n\n \t\t\tfor ( // iterate the token list and keep track of the current token/string position\n \t\t\t\tvar currentNode = startNode.next, pos = startPos;\n \t\t\t\tcurrentNode !== tokenList.tail;\n \t\t\t\tpos += currentNode.value.length, currentNode = currentNode.next\n \t\t\t) {\n\n \t\t\t\tvar str = currentNode.value;\n\n \t\t\t\tif (tokenList.length > text.length) {\n \t\t\t\t\t// Something went terribly wrong, ABORT, ABORT!\n \t\t\t\t\treturn;\n \t\t\t\t}\n\n \t\t\t\tif (str instanceof Token) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n\n \t\t\t\tvar removeCount = 1; // this is the to parameter of removeBetween\n\n \t\t\t\tif (greedy && currentNode != tokenList.tail.prev) {\n \t\t\t\t\tpattern.lastIndex = pos;\n \t\t\t\t\tvar match = pattern.exec(text);\n \t\t\t\t\tif (!match) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n\n \t\t\t\t\tvar from = match.index + (lookbehind && match[1] ? match[1].length : 0);\n \t\t\t\t\tvar to = match.index + match[0].length;\n \t\t\t\t\tvar p = pos;\n\n \t\t\t\t\t// find the node that contains the match\n \t\t\t\t\tp += currentNode.value.length;\n \t\t\t\t\twhile (from >= p) {\n \t\t\t\t\t\tcurrentNode = currentNode.next;\n \t\t\t\t\t\tp += currentNode.value.length;\n \t\t\t\t\t}\n \t\t\t\t\t// adjust pos (and p)\n \t\t\t\t\tp -= currentNode.value.length;\n \t\t\t\t\tpos = p;\n\n \t\t\t\t\t// the current node is a Token, then the match starts inside another Token, which is invalid\n \t\t\t\t\tif (currentNode.value instanceof Token) {\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n\n \t\t\t\t\t// find the last node which is affected by this match\n \t\t\t\t\tfor (\n \t\t\t\t\t\tvar k = currentNode;\n \t\t\t\t\t\tk !== tokenList.tail && (p < to || (typeof k.value === 'string' && !k.prev.value.greedy));\n \t\t\t\t\t\tk = k.next\n \t\t\t\t\t) {\n \t\t\t\t\t\tremoveCount++;\n \t\t\t\t\t\tp += k.value.length;\n \t\t\t\t\t}\n \t\t\t\t\tremoveCount--;\n\n \t\t\t\t\t// replace with the new match\n \t\t\t\t\tstr = text.slice(pos, p);\n \t\t\t\t\tmatch.index -= pos;\n \t\t\t\t} else {\n \t\t\t\t\tpattern.lastIndex = 0;\n\n \t\t\t\t\tvar match = pattern.exec(str);\n \t\t\t\t}\n\n \t\t\t\tif (!match) {\n \t\t\t\t\tif (oneshot) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n\n \t\t\t\tif (lookbehind) {\n \t\t\t\t\tlookbehindLength = match[1] ? match[1].length : 0;\n \t\t\t\t}\n\n \t\t\t\tvar from = match.index + lookbehindLength,\n \t\t\t\t\tmatch = match[0].slice(lookbehindLength),\n \t\t\t\t\tto = from + match.length,\n \t\t\t\t\tbefore = str.slice(0, from),\n \t\t\t\t\tafter = str.slice(to);\n\n \t\t\t\tvar removeFrom = currentNode.prev;\n\n \t\t\t\tif (before) {\n \t\t\t\t\tremoveFrom = addAfter(tokenList, removeFrom, before);\n \t\t\t\t\tpos += before.length;\n \t\t\t\t}\n\n \t\t\t\tremoveRange(tokenList, removeFrom, removeCount);\n\n \t\t\t\tvar wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias, match, greedy);\n \t\t\t\tcurrentNode = addAfter(tokenList, removeFrom, wrapped);\n\n \t\t\t\tif (after) {\n \t\t\t\t\taddAfter(tokenList, currentNode, after);\n \t\t\t\t}\n\n\n \t\t\t\tif (removeCount > 1)\n \t\t\t\t\tmatchGrammar(text, tokenList, grammar, currentNode.prev, pos, true, token + ',' + j);\n\n \t\t\t\tif (oneshot)\n \t\t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n }\n\n /**\n * @typedef LinkedListNode\n * @property {T} value\n * @property {LinkedListNode | null} prev The previous node.\n * @property {LinkedListNode | null} next The next node.\n * @template T\n */\n\n /**\n * @template T\n */\n function LinkedList() {\n \t/** @type {LinkedListNode} */\n \tvar head = { value: null, prev: null, next: null };\n \t/** @type {LinkedListNode} */\n \tvar tail = { value: null, prev: head, next: null };\n \thead.next = tail;\n\n \t/** @type {LinkedListNode} */\n \tthis.head = head;\n \t/** @type {LinkedListNode} */\n \tthis.tail = tail;\n \tthis.length = 0;\n }\n\n /**\n * Adds a new node with the given value to the list.\n * @param {LinkedList} list\n * @param {LinkedListNode} node\n * @param {T} value\n * @returns {LinkedListNode} The added node.\n * @template T\n */\n function addAfter(list, node, value) {\n \t// assumes that node != list.tail && values.length >= 0\n \tvar next = node.next;\n\n \tvar newNode = { value: value, prev: node, next: next };\n \tnode.next = newNode;\n \tnext.prev = newNode;\n \tlist.length++;\n\n \treturn newNode;\n }\n /**\n * Removes `count` nodes after the given node. The given node will not be removed.\n * @param {LinkedList} list\n * @param {LinkedListNode} node\n * @param {number} count\n * @template T\n */\n function removeRange(list, node, count) {\n \tvar next = node.next;\n \tfor (var i = 0; i < count && next !== list.tail; i++) {\n \t\tnext = next.next;\n \t}\n \tnode.next = next;\n \tnext.prev = node;\n \tlist.length -= i;\n }\n /**\n * @param {LinkedList} list\n * @returns {T[]}\n * @template T\n */\n function toArray(list) {\n \tvar array = [];\n \tvar node = list.head.next;\n \twhile (node !== list.tail) {\n \t\tarray.push(node.value);\n \t\tnode = node.next;\n \t}\n \treturn array;\n }\n\n\n if (!_self.document) {\n \tif (!_self.addEventListener) {\n \t\t// in Node.js\n \t\treturn _;\n \t}\n\n \tif (!_.disableWorkerMessageHandler) {\n \t\t// In worker\n \t\t_self.addEventListener('message', function (evt) {\n \t\t\tvar message = JSON.parse(evt.data),\n \t\t\t\tlang = message.language,\n \t\t\t\tcode = message.code,\n \t\t\t\timmediateClose = message.immediateClose;\n\n \t\t\t_self.postMessage(_.highlight(code, _.languages[lang], lang));\n \t\t\tif (immediateClose) {\n \t\t\t\t_self.close();\n \t\t\t}\n \t\t}, false);\n \t}\n\n \treturn _;\n }\n\n //Get current script and highlight\n var script = _.util.currentScript();\n\n if (script) {\n \t_.filename = script.src;\n\n \tif (script.hasAttribute('data-manual')) {\n \t\t_.manual = true;\n \t}\n }\n\n function highlightAutomaticallyCallback() {\n \tif (!_.manual) {\n \t\t_.highlightAll();\n \t}\n }\n\n if (!_.manual) {\n \t// If the document state is \"loading\", then we'll use DOMContentLoaded.\n \t// If the document state is \"interactive\" and the prism.js script is deferred, then we'll also use the\n \t// DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they\n \t// might take longer one animation frame to execute which can create a race condition where only some plugins have\n \t// been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded.\n \t// See https://github.com/PrismJS/prism/issues/2102\n \tvar readyState = document.readyState;\n \tif (readyState === 'loading' || readyState === 'interactive' && script && script.defer) {\n \t\tdocument.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback);\n \t} else {\n \t\tif (window.requestAnimationFrame) {\n \t\t\twindow.requestAnimationFrame(highlightAutomaticallyCallback);\n \t\t} else {\n \t\t\twindow.setTimeout(highlightAutomaticallyCallback, 16);\n \t\t}\n \t}\n }\n\n return _;\n\n })(_self);\n\n if ( module.exports) {\n \tmodule.exports = Prism;\n }\n\n // hack for components to work correctly in node.js\n if (typeof commonjsGlobal !== 'undefined') {\n \tcommonjsGlobal.Prism = Prism;\n }\n\n\n /* **********************************************\n Begin prism-markup.js\n ********************************************** */\n\n Prism.languages.markup = {\n \t'comment': //,\n \t'prolog': /<\\?[\\s\\S]+?\\?>/,\n \t'doctype': {\n \t\tpattern: /\"'[\\]]|\"[^\"]*\"|'[^']*')+(?:\\[(?:(?!)*\\]\\s*)?>/i,\n \t\tgreedy: true\n \t},\n \t'cdata': //i,\n \t'tag': {\n \t\tpattern: /<\\/?(?!\\d)[^\\s>\\/=$<%]+(?:\\s(?:\\s*[^\\s>\\/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))|(?=[\\s/>])))+)?\\s*\\/?>/i,\n \t\tgreedy: true,\n \t\tinside: {\n \t\t\t'tag': {\n \t\t\t\tpattern: /^<\\/?[^\\s>\\/]+/i,\n \t\t\t\tinside: {\n \t\t\t\t\t'punctuation': /^<\\/?/,\n \t\t\t\t\t'namespace': /^[^\\s>\\/:]+:/\n \t\t\t\t}\n \t\t\t},\n \t\t\t'attr-value': {\n \t\t\t\tpattern: /=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+)/i,\n \t\t\t\tinside: {\n \t\t\t\t\t'punctuation': [\n \t\t\t\t\t\t/^=/,\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tpattern: /^(\\s*)[\"']|[\"']$/,\n \t\t\t\t\t\t\tlookbehind: true\n \t\t\t\t\t\t}\n \t\t\t\t\t]\n \t\t\t\t}\n \t\t\t},\n \t\t\t'punctuation': /\\/?>/,\n \t\t\t'attr-name': {\n \t\t\t\tpattern: /[^\\s>\\/]+/,\n \t\t\t\tinside: {\n \t\t\t\t\t'namespace': /^[^\\s>\\/:]+:/\n \t\t\t\t}\n \t\t\t}\n\n \t\t}\n \t},\n \t'entity': /?[\\da-z]{1,8};/i\n };\n\n Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] =\n \tPrism.languages.markup['entity'];\n\n // Plugin to make entity title show the real entity, idea by Roman Komarov\n Prism.hooks.add('wrap', function(env) {\n\n \tif (env.type === 'entity') {\n \t\tenv.attributes['title'] = env.content.replace(/&/, '&');\n \t}\n });\n\n Object.defineProperty(Prism.languages.markup.tag, 'addInlined', {\n \t/**\n \t * Adds an inlined language to markup.\n \t *\n \t * An example of an inlined language is CSS with `\n\n
\n\n`);\n\n class Code extends Mutating(T$4(HTMLElement)) {\n\n renderContent() {\n\n // check if language can be highlighted\n this.languageName = this.getAttribute('language');\n if (!this.languageName) {\n console.warn('You need to provide a language attribute to your block to let us know how to highlight your code; e.g.:\\n zeros = np.zeros(shape) .');\n return;\n }\n const language = prism.languages[this.languageName];\n if (language == undefined) {\n console.warn(`Distill does not yet support highlighting your code block in \"${this.languageName}'.`);\n return;\n }\n\n let content = this.textContent;\n const codeTag = this.shadowRoot.querySelector('#code-container');\n\n if (this.hasAttribute('block')) {\n // normalize the tab indents\n content = content.replace(/\\n/, '');\n const tabs = content.match(/\\s*/);\n content = content.replace(new RegExp('\\n' + tabs, 'g'), '\\n');\n content = content.trim();\n // wrap code block in pre tag if needed\n if (codeTag.parentNode instanceof ShadowRoot) {\n const preTag = document.createElement('pre');\n this.shadowRoot.removeChild(codeTag);\n preTag.appendChild(codeTag);\n this.shadowRoot.appendChild(preTag);\n }\n\n }\n\n codeTag.className = `language-${this.languageName}`;\n codeTag.innerHTML = prism.highlight(content, language);\n }\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$5 = Template('d-footnote', `\n\n\n\n \n \n\n\n \n \n\n`);\n\n class Footnote extends T$5(HTMLElement) {\n\n constructor() {\n super();\n\n const options = {childList: true, characterData: true, subtree: true};\n const observer = new MutationObserver(this.notify);\n observer.observe(this, options);\n }\n\n notify() {\n const options = { detail: this, bubbles: true };\n const event = new CustomEvent('onFootnoteChanged', options);\n document.dispatchEvent(event);\n }\n\n connectedCallback() {\n // listen and notify about changes to slotted content\n // const slot = this.shadowRoot.querySelector('#slot');\n // console.warn(slot.textContent);\n // slot.addEventListener('slotchange', this.notify);\n this.hoverBox = this.root.querySelector('d-hover-box');\n window.customElements.whenDefined('d-hover-box').then(() => {\n this.hoverBox.listen(this);\n });\n // create numeric ID\n Footnote.currentFootnoteId += 1;\n const IdString = Footnote.currentFootnoteId.toString();\n this.root.host.id = 'd-footnote-' + IdString;\n\n // set up hidden hover box\n const id = 'dt-fn-hover-box-' + IdString;\n this.hoverBox.id = id;\n\n // set up visible footnote marker\n const span = this.root.querySelector('#fn-');\n span.setAttribute('id', 'fn-' + IdString);\n span.setAttribute('data-hover-ref', id);\n span.textContent = IdString;\n }\n\n }\n\n Footnote.currentFootnoteId = 0;\n\n // Copyright 2018 The Distill Template Authors\n\n const T$6 = Template('d-footnote-list', `\n\n\nFootnotes \n \n`, false);\n\n class FootnoteList extends T$6(HTMLElement) {\n\n connectedCallback() {\n super.connectedCallback();\n\n this.list = this.root.querySelector('ol');\n // footnotes list is initially hidden\n this.root.style.display = 'none';\n // look through document and register existing footnotes\n // Store.subscribeTo('footnotes', (footnote) => {\n // this.renderFootnote(footnote);\n // });\n }\n\n // TODO: could optimize this to accept individual footnotes?\n set footnotes(footnotes) {\n this.list.innerHTML = '';\n if (footnotes.length) {\n // ensure footnote list is visible\n this.root.style.display = '';\n\n for (const footnote of footnotes) {\n // construct and append list item to show footnote\n const listItem = document.createElement('li');\n listItem.id = footnote.id + '-listing';\n listItem.innerHTML = footnote.innerHTML;\n\n const backlink = document.createElement('a');\n backlink.setAttribute('class', 'footnote-backlink');\n backlink.textContent = '[↩]';\n backlink.href = '#' + footnote.id;\n\n listItem.appendChild(backlink);\n this.list.appendChild(listItem);\n }\n } else {\n // ensure footnote list is invisible\n this.root.style.display = 'none';\n }\n }\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$7 = Template('d-hover-box', `\n\n\n\n`);\n\n class HoverBox extends T$7(HTMLElement) {\n\n constructor() {\n super();\n }\n\n connectedCallback() {\n\n }\n\n listen(element) {\n // console.log(element)\n this.bindDivEvents(this);\n this.bindTriggerEvents(element);\n // this.style.display = \"block\";\n }\n\n bindDivEvents(element) {\n // For mice, same behavior as hovering on links\n element.addEventListener('mouseover', () => {\n if (!this.visible) this.showAtNode(element);\n this.stopTimeout();\n });\n element.addEventListener('mouseout', () => {\n this.extendTimeout(500);\n });\n // Don't trigger body touchstart event when touching within box\n element.addEventListener('touchstart', (event) => {\n event.stopPropagation();\n }, {passive: true});\n // Close box when touching outside box\n document.body.addEventListener('touchstart', () => {\n this.hide();\n }, {passive: true});\n }\n\n bindTriggerEvents(node) {\n node.addEventListener('mouseover', () => {\n if (!this.visible) {\n this.showAtNode(node);\n }\n this.stopTimeout();\n });\n\n node.addEventListener('mouseout', () => {\n this.extendTimeout(300);\n });\n\n node.addEventListener('touchstart', (event) => {\n if (this.visible) {\n this.hide();\n } else {\n this.showAtNode(node);\n }\n // Don't trigger body touchstart event when touching link\n event.stopPropagation();\n }, {passive: true});\n }\n\n show(position) {\n this.visible = true;\n this.style.display = 'block';\n // 10px extra offset from element\n this.style.top = Math.round(position[1] + 10) + 'px';\n }\n\n showAtNode(node) {\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop\n const bbox = node.getBoundingClientRect();\n this.show([node.offsetLeft + bbox.width, node.offsetTop + bbox.height]);\n }\n\n hide() {\n this.visible = false;\n this.style.display = 'none';\n this.stopTimeout();\n }\n\n stopTimeout() {\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n }\n\n extendTimeout(time) {\n this.stopTimeout();\n this.timeout = setTimeout(() => {\n this.hide();\n }, time);\n }\n\n }\n\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 class Title extends HTMLElement {\n static get is() { return 'd-title'; }\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$8 = Template('d-references', `\n\n`, false);\n\n class References extends T$8(HTMLElement) {\n\n }\n\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 class TOC extends HTMLElement {\n\n static get is() { return 'd-toc'; }\n\n connectedCallback() {\n if (!this.getAttribute('prerendered')) {\n window.onload = () => {\n const article = document.querySelector('d-article');\n const headings = article.querySelectorAll('h2, h3');\n renderTOC(this, headings);\n };\n }\n }\n\n }\n\n function renderTOC(element, headings) {\n\n let ToC =`\n \n \n Table of contents \n `;\n\n for (const el of headings) {\n // should element be included in TOC?\n const isInTitle = el.parentElement.tagName == 'D-TITLE';\n const isException = el.getAttribute('no-toc');\n if (isInTitle || isException) continue;\n // create TOC entry\n const title = el.textContent;\n const link = '#' + el.getAttribute('id');\n\n let newLine = '' + '' + title + ' ' + ' ';\n if (el.tagName == 'H3') {\n newLine = '';\n } else {\n newLine += ' ';\n }\n ToC += newLine;\n\n }\n\n ToC += ' ';\n element.innerHTML = ToC;\n }\n\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 // Figure\n //\n // d-figure provides a state-machine of visibility events:\n //\n // scroll out of view\n // +----------------+\n // *do work here* | |\n // +----------------+ +-+---------+ +-v---------+\n // | ready +----> onscreen | | offscreen |\n // +----------------+ +---------^-+ +---------+-+\n // | |\n // +----------------+\n // scroll into view\n //\n\n class Figure extends HTMLElement {\n\n static get is() { return 'd-figure'; }\n\n static get readyQueue() {\n if (!Figure._readyQueue) {\n Figure._readyQueue = [];\n }\n return Figure._readyQueue;\n }\n\n static addToReadyQueue(figure) {\n if (Figure.readyQueue.indexOf(figure) === -1) {\n Figure.readyQueue.push(figure);\n Figure.runReadyQueue();\n }\n }\n\n static runReadyQueue() {\n // console.log(\"Checking to run readyQueue, length: \" + Figure.readyQueue.length + \", scrolling: \" + Figure.isScrolling);\n // if (Figure.isScrolling) return;\n // console.log(\"Running ready Queue\");\n const figure = Figure.readyQueue\n .sort((a,b) => a._seenOnScreen - b._seenOnScreen )\n .filter((figure) => !figure._ready)\n .pop();\n if (figure) {\n figure.ready();\n requestAnimationFrame(Figure.runReadyQueue);\n }\n\n }\n\n constructor() {\n super();\n // debugger\n this._ready = false;\n this._onscreen = false;\n this._offscreen = true;\n }\n\n connectedCallback() {\n this.loadsWhileScrolling = this.hasAttribute('loadsWhileScrolling');\n Figure.marginObserver.observe(this);\n Figure.directObserver.observe(this);\n }\n\n disconnectedCallback() {\n Figure.marginObserver.unobserve(this);\n Figure.directObserver.unobserve(this);\n }\n\n // We use two separate observers:\n // One with an extra 1000px margin to warn if the viewpoint gets close,\n // And one for the actual on/off screen events\n\n static get marginObserver() {\n if (!Figure._marginObserver) {\n // if (!('IntersectionObserver' in window)) {\n // throw new Error('no interscetionobbserver!');\n // }\n const viewportHeight = window.innerHeight;\n const margin = Math.floor(2 * viewportHeight);\n const options = {rootMargin: margin + 'px 0px ' + margin + 'px 0px', threshold: 0.01};\n const callback = Figure.didObserveMarginIntersection;\n const observer = new IntersectionObserver(callback, options);\n Figure._marginObserver = observer;\n }\n return Figure._marginObserver;\n }\n\n static didObserveMarginIntersection(entries) {\n for (const entry of entries) {\n const figure = entry.target;\n if (entry.isIntersecting && !figure._ready) {\n Figure.addToReadyQueue(figure);\n }\n }\n }\n\n static get directObserver() {\n if (!Figure._directObserver) {\n Figure._directObserver = new IntersectionObserver(\n Figure.didObserveDirectIntersection, {\n rootMargin: '0px', threshold: [0, 1.0],\n }\n );\n }\n return Figure._directObserver;\n }\n\n static didObserveDirectIntersection(entries) {\n for (const entry of entries) {\n const figure = entry.target;\n if (entry.isIntersecting) {\n figure._seenOnScreen = new Date();\n // if (!figure._ready) { figure.ready(); }\n if (figure._offscreen) { figure.onscreen(); }\n } else {\n if (figure._onscreen) { figure.offscreen(); }\n }\n }\n }\n\n // Notify listeners that registered late, too:\n\n addEventListener(eventName, callback) {\n super.addEventListener(eventName, callback);\n // if we had already dispatched something while presumingly no one was listening, we do so again\n // debugger\n if (eventName === 'ready') {\n if (Figure.readyQueue.indexOf(this) !== -1) {\n this._ready = false;\n Figure.runReadyQueue();\n }\n }\n if (eventName === 'onscreen') {\n this.onscreen();\n }\n }\n\n // Custom Events\n\n ready() {\n // debugger\n this._ready = true;\n Figure.marginObserver.unobserve(this);\n const event = new CustomEvent('ready');\n this.dispatchEvent(event);\n }\n\n onscreen() {\n this._onscreen = true;\n this._offscreen = false;\n const event = new CustomEvent('onscreen');\n this.dispatchEvent(event);\n }\n\n offscreen() {\n this._onscreen = false;\n this._offscreen = true;\n const event = new CustomEvent('offscreen');\n this.dispatchEvent(event);\n }\n\n }\n\n if (typeof window !== 'undefined') {\n\n Figure.isScrolling = false;\n let timeout;\n const resetTimer = () => {\n Figure.isScrolling = true;\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n Figure.isScrolling = false;\n Figure.runReadyQueue();\n }, 500);\n };\n window.addEventListener('scroll', resetTimer, true);\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n // This overlay is not secure.\n // It is only meant as a social deterrent.\n\n const productionHostname = 'distill.pub';\n const T$9 = Template('d-interstitial', `\n\n\n\n
\n
This article is in review. \n
Do not share this URL or the contents of this article. Thank you!
\n
\n
Enter the password we shared with you as part of the review process to view the article.
\n
\n
\n`);\n\n class Interstitial extends T$9(HTMLElement) {\n\n connectedCallback() {\n if (this.shouldRemoveSelf()) {\n this.parentElement.removeChild(this);\n } else {\n const passwordInput = this.root.querySelector('#interstitial-password-input');\n passwordInput.oninput = (event) => this.passwordChanged(event);\n }\n }\n\n passwordChanged(event) {\n const entered = event.target.value;\n if (entered === this.password) {\n console.log('Correct password entered.');\n this.parentElement.removeChild(this);\n if (typeof(Storage) !== 'undefined') {\n console.log('Saved that correct password was entered.');\n localStorage.setItem(this.localStorageIdentifier(), 'true');\n }\n }\n }\n\n shouldRemoveSelf() {\n // should never be visible in production\n if (window && window.location.hostname === productionHostname) {\n console.warn('Interstitial found on production, hiding it.');\n return true\n }\n // should only have to enter password once\n if (typeof(Storage) !== 'undefined') {\n if (localStorage.getItem(this.localStorageIdentifier()) === 'true') {\n console.log('Loaded that correct password was entered before; skipping interstitial.');\n return true;\n }\n }\n // otherwise, leave visible\n return false;\n }\n\n localStorageIdentifier() {\n const prefix = 'distill-drafts';\n const suffix = 'interstitial-password-correct';\n return prefix + (window ? window.location.pathname : '-') + suffix\n }\n\n }\n\n function ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n }\n\n function bisector(compare) {\n if (compare.length === 1) compare = ascendingComparator(compare);\n return {\n left: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n },\n right: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n };\n }\n\n function ascendingComparator(f) {\n return function(d, x) {\n return ascending(f(d), x);\n };\n }\n\n var ascendingBisect = bisector(ascending);\n var bisectRight = ascendingBisect.right;\n\n function range(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n }\n\n var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\n function ticks(start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n start = Math.ceil(start / step);\n stop = Math.floor(stop / step);\n ticks = new Array(n = Math.ceil(stop - start + 1));\n while (++i < n) ticks[i] = (start + i) * step;\n } else {\n start = Math.floor(start * step);\n stop = Math.ceil(stop * step);\n ticks = new Array(n = Math.ceil(start - stop + 1));\n while (++i < n) ticks[i] = (start - i) / step;\n }\n\n if (reverse) ticks.reverse();\n\n return ticks;\n }\n\n function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n }\n\n function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;\n else if (error >= e5) step1 *= 5;\n else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n }\n\n function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n }\n\n function define(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n }\n\n function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n }\n\n function Color() {}\n\n var darker = 0.7;\n var brighter = 1 / darker;\n\n var reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\n var named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n };\n\n define(Color, color, {\n copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n });\n\n function color_formatHex() {\n return this.rgb().formatHex();\n }\n\n function color_formatHsl() {\n return hslConvert(this).formatHsl();\n }\n\n function color_formatRgb() {\n return this.rgb().formatRgb();\n }\n\n function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n }\n\n function rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n }\n\n function rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n }\n\n function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n }\n\n function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n }\n\n function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n }\n\n define(Rgb, rgb, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n }));\n\n function rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n }\n\n function rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n\n function hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n }\n\n function hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n }\n\n function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n }\n\n function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n }\n\n function Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n }\n\n define(Hsl, hsl, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n }));\n\n /* From FvD 13.37, CSS Color Module Level 3 */\n function hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n }\n\n var deg2rad = Math.PI / 180;\n var rad2deg = 180 / Math.PI;\n\n // https://observablehq.com/@mbostock/lab-and-rgb\n var K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\n function labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n }\n\n function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n }\n\n function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n }\n\n define(Lab, lab, extend(Color, {\n brighter: function(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker: function(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb: function() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n }));\n\n function xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n }\n\n function lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n }\n\n function lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n }\n\n function rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n }\n\n function hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * rad2deg;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n }\n\n function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n }\n\n function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n }\n\n function hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * deg2rad;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n }\n\n define(Hcl, hcl, extend(Color, {\n brighter: function(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker: function(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb: function() {\n return hcl2lab(this).rgb();\n }\n }));\n\n var A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\n function cubehelixConvert(o) {\n if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n bl = b - l,\n k = (E * (g - l) - C * bl) / D,\n s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n }\n\n function cubehelix(h, s, l, opacity) {\n return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n }\n\n function Cubehelix(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n }\n\n define(Cubehelix, cubehelix, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n l = +this.l,\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh)),\n this.opacity\n );\n }\n }));\n\n function constant(x) {\n return function() {\n return x;\n };\n }\n\n function linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n }\n\n function exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n }\n\n function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n }\n\n function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n }\n\n var rgb$1 = (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb$1(start, end) {\n var r = color((start = rgb(start)).r, (end = rgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb$1.gamma = rgbGamma;\n\n return rgb$1;\n })(1);\n\n function numberArray(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n }\n\n function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n }\n\n function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = interpolate(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n }\n\n function date(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n }\n\n function interpolateNumber(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n }\n\n function object(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = interpolate(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n }\n\n var reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\n function zero(b) {\n return function() {\n return b;\n };\n }\n\n function one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n }\n\n function string(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: interpolateNumber(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n }\n\n function interpolate(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? interpolateNumber\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb$1) : string)\n : b instanceof color ? rgb$1\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : interpolateNumber)(a, b);\n }\n\n function interpolateRound(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n }\n\n function constant$1(x) {\n return function() {\n return x;\n };\n }\n\n function number(x) {\n return +x;\n }\n\n var unit = [0, 1];\n\n function identity(x) {\n return x;\n }\n\n function normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant$1(isNaN(b) ? NaN : 0.5);\n }\n\n function clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n }\n\n // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n // interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\n function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n }\n\n function polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisectRight(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n }\n\n function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n }\n\n function transformer() {\n var domain = unit,\n range = unit,\n interpolate$1 = interpolate,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate$1 = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n }\n\n function continuous() {\n return transformer()(identity, identity);\n }\n\n // Computes the decimal coefficient and exponent of the specified number x with\n // significant digits p, where x is positive and p is in [1, 21] or undefined.\n // For example, formatDecimal(1.23) returns [\"123\", 0].\n function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }\n\n function exponent(x) {\n return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;\n }\n\n function formatGroup(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n }\n\n function formatNumerals(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n }\n\n // [[fill]align][sign][symbol][0][width][,][.precision][~][type]\n var re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\n function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n }\n\n formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\n function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n }\n\n FormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n };\n\n // Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\n function formatTrim(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n }\n\n var prefixExponent;\n\n function formatPrefixAuto(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n }\n\n function formatRounded(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n }\n\n var formatTypes = {\n \"%\": function(x, p) { return (x * 100).toFixed(p); },\n \"b\": function(x) { return Math.round(x).toString(2); },\n \"c\": function(x) { return x + \"\"; },\n \"d\": function(x) { return Math.round(x).toString(10); },\n \"e\": function(x, p) { return x.toExponential(p); },\n \"f\": function(x, p) { return x.toFixed(p); },\n \"g\": function(x, p) { return x.toPrecision(p); },\n \"o\": function(x) { return Math.round(x).toString(8); },\n \"p\": function(x, p) { return formatRounded(x * 100, p); },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n \"x\": function(x) { return Math.round(x).toString(16); }\n };\n\n function identity$1(x) {\n return x;\n }\n\n var map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\n function formatLocale(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity$1 : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity$1 : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n }\n\n var locale;\n var format;\n var formatPrefix;\n\n defaultLocale({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"],\n minus: \"-\"\n });\n\n function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n }\n\n function precisionFixed(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n }\n\n function precisionPrefix(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n }\n\n function precisionRound(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n }\n\n function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n }\n\n function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain(),\n i0 = 0,\n i1 = d.length - 1,\n start = d[i0],\n stop = d[i1],\n step;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n\n step = tickIncrement(start, stop, count);\n\n if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n step = tickIncrement(start, stop, count);\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n step = tickIncrement(start, stop, count);\n }\n\n if (step > 0) {\n d[i0] = Math.floor(start / step) * step;\n d[i1] = Math.ceil(stop / step) * step;\n domain(d);\n } else if (step < 0) {\n d[i0] = Math.ceil(start * step) / step;\n d[i1] = Math.floor(stop * step) / step;\n domain(d);\n }\n\n return scale;\n };\n\n return scale;\n }\n\n function linear$1() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear$1());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n }\n\n var t0$1 = new Date,\n t1$1 = new Date;\n\n function newInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = function(date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function(date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [], previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = function(start, end) {\n t0$1.setTime(+start), t1$1.setTime(+end);\n floori(t0$1), floori(t1$1);\n return Math.floor(count(t0$1, t1$1));\n };\n\n interval.every = function(step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? function(d) { return field(d) % step === 0; }\n : function(d) { return interval.count(0, d) % step === 0; });\n };\n }\n\n return interval;\n }\n\n var millisecond = newInterval(function() {\n // noop\n }, function(date, step) {\n date.setTime(+date + step);\n }, function(start, end) {\n return end - start;\n });\n\n // An optimized implementation for this simple case.\n millisecond.every = function(k) {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return newInterval(function(date) {\n date.setTime(Math.floor(date / k) * k);\n }, function(date, step) {\n date.setTime(+date + step * k);\n }, function(start, end) {\n return (end - start) / k;\n });\n };\n\n var durationSecond = 1e3;\n var durationMinute = 6e4;\n var durationHour = 36e5;\n var durationDay = 864e5;\n var durationWeek = 6048e5;\n\n var second = newInterval(function(date) {\n date.setTime(date - date.getMilliseconds());\n }, function(date, step) {\n date.setTime(+date + step * durationSecond);\n }, function(start, end) {\n return (end - start) / durationSecond;\n }, function(date) {\n return date.getUTCSeconds();\n });\n\n var minute = newInterval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n }, function(date, step) {\n date.setTime(+date + step * durationMinute);\n }, function(start, end) {\n return (end - start) / durationMinute;\n }, function(date) {\n return date.getMinutes();\n });\n\n var hour = newInterval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n }, function(date, step) {\n date.setTime(+date + step * durationHour);\n }, function(start, end) {\n return (end - start) / durationHour;\n }, function(date) {\n return date.getHours();\n });\n\n var day = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n }, function(date) {\n return date.getDate() - 1;\n });\n\n function weekday(i) {\n return newInterval(function(date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n }\n\n var sunday = weekday(0);\n var monday = weekday(1);\n var tuesday = weekday(2);\n var wednesday = weekday(3);\n var thursday = weekday(4);\n var friday = weekday(5);\n var saturday = weekday(6);\n\n var month = newInterval(function(date) {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setMonth(date.getMonth() + step);\n }, function(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n }, function(date) {\n return date.getMonth();\n });\n\n var year = newInterval(function(date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n }, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n }, function(date) {\n return date.getFullYear();\n });\n\n // An optimized implementation for this simple case.\n year.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n };\n\n var utcMinute = newInterval(function(date) {\n date.setUTCSeconds(0, 0);\n }, function(date, step) {\n date.setTime(+date + step * durationMinute);\n }, function(start, end) {\n return (end - start) / durationMinute;\n }, function(date) {\n return date.getUTCMinutes();\n });\n\n var utcHour = newInterval(function(date) {\n date.setUTCMinutes(0, 0, 0);\n }, function(date, step) {\n date.setTime(+date + step * durationHour);\n }, function(start, end) {\n return (end - start) / durationHour;\n }, function(date) {\n return date.getUTCHours();\n });\n\n var utcDay = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n }, function(start, end) {\n return (end - start) / durationDay;\n }, function(date) {\n return date.getUTCDate() - 1;\n });\n\n function utcWeekday(i) {\n return newInterval(function(date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / durationWeek;\n });\n }\n\n var utcSunday = utcWeekday(0);\n var utcMonday = utcWeekday(1);\n var utcTuesday = utcWeekday(2);\n var utcWednesday = utcWeekday(3);\n var utcThursday = utcWeekday(4);\n var utcFriday = utcWeekday(5);\n var utcSaturday = utcWeekday(6);\n\n var utcMonth = newInterval(function(date) {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n }, function(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n }, function(date) {\n return date.getUTCMonth();\n });\n\n var utcYear = newInterval(function(date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n }, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n }, function(date) {\n return date.getUTCFullYear();\n });\n\n // An optimized implementation for this simple case.\n utcYear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n };\n\n function localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n }\n\n function utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n }\n\n function newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n }\n\n function formatLocale$1(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day$1;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day$1 = week.getUTCDay();\n week = day$1 > 4 || day$1 === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day$1 = week.getDay();\n week = day$1 > 4 || day$1 === 0 ? monday.ceil(week) : monday(week);\n week = day.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day$1 = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day$1 + 5) % 7 : d.w + d.U * 7 - (day$1 + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n }\n\n var pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\n function pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n }\n\n function requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n }\n\n function formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n }\n\n function formatLookup(names) {\n var map = {}, i = -1, n = names.length;\n while (++i < n) map[names[i].toLowerCase()] = i;\n return map;\n }\n\n function parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n }\n\n function parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n }\n\n function parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n }\n\n function parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n }\n\n function parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n }\n\n function parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n }\n\n function parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n }\n\n function parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n }\n\n function parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n }\n\n function parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n }\n\n function parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n }\n\n function parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n }\n\n function parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n }\n\n function parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n }\n\n function formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n }\n\n function formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n }\n\n function formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n }\n\n function formatDayOfYear(d, p) {\n return pad(1 + day.count(year(d), d), p, 3);\n }\n\n function formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n }\n\n function formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n }\n\n function formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n }\n\n function formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n }\n\n function formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n }\n\n function formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n }\n\n function formatWeekNumberSunday(d, p) {\n return pad(sunday.count(year(d) - 1, d), p, 2);\n }\n\n function formatWeekNumberISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? thursday(d) : thursday.ceil(d);\n return pad(thursday.count(year(d), d) + (year(d).getDay() === 4), p, 2);\n }\n\n function formatWeekdayNumberSunday(d) {\n return d.getDay();\n }\n\n function formatWeekNumberMonday(d, p) {\n return pad(monday.count(year(d) - 1, d), p, 2);\n }\n\n function formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n }\n\n function formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n }\n\n function formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n }\n\n function formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n }\n\n function formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n }\n\n function formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n }\n\n function formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n }\n\n function formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n }\n\n function formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n }\n\n function formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n }\n\n function formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n }\n\n function formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n }\n\n function formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n }\n\n function formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n }\n\n function formatUTCWeekNumberISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n }\n\n function formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n }\n\n function formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n }\n\n function formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n }\n\n function formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n }\n\n function formatUTCZone() {\n return \"+0000\";\n }\n\n function formatLiteralPercent() {\n return \"%\";\n }\n\n function formatUnixTimestamp(d) {\n return +d;\n }\n\n function formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n }\n\n var locale$1;\n var timeFormat;\n var timeParse;\n var utcFormat;\n var utcParse;\n\n defaultLocale$1({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n });\n\n function defaultLocale$1(definition) {\n locale$1 = formatLocale$1(definition);\n timeFormat = locale$1.format;\n timeParse = locale$1.parse;\n utcFormat = locale$1.utcFormat;\n utcParse = locale$1.utcParse;\n return locale$1;\n }\n\n var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\n function formatIsoNative(date) {\n return date.toISOString();\n }\n\n var formatIso = Date.prototype.toISOString\n ? formatIsoNative\n : utcFormat(isoSpecifier);\n\n function parseIsoNative(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n }\n\n var parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n ? parseIsoNative\n : utcParse(isoSpecifier);\n\n var noop = {value: function() {}};\n\n function dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n }\n\n function Dispatch(_) {\n this._ = _;\n }\n\n function parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n }\n\n Dispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n };\n\n function get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n }\n\n function set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n }\n\n var xhtml = \"http://www.w3.org/1999/xhtml\";\n\n var namespaces = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n };\n\n function namespace(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name;\n }\n\n function creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n }\n\n function creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n }\n\n function creator(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n }\n\n function none() {}\n\n function selector(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n }\n\n function selection_select(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n }\n\n function empty() {\n return [];\n }\n\n function selectorAll(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n }\n\n function selection_selectAll(select) {\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n }\n\n function matcher(selector) {\n return function() {\n return this.matches(selector);\n };\n }\n\n function selection_filter(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n }\n\n function sparse(update) {\n return new Array(update.length);\n }\n\n function selection_enter() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n }\n\n function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n }\n\n EnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n };\n\n function constant$2(x) {\n return function() {\n return x;\n };\n }\n\n var keyPrefix = \"$\"; // Protect against keys like “__proto__”.\n\n function bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n }\n\n function bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = {},\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n if (keyValue in nodeByKeyValue) {\n exit[i] = node;\n } else {\n nodeByKeyValue[keyValue] = node;\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = keyPrefix + key.call(parent, data[i], i, data);\n if (node = nodeByKeyValue[keyValue]) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue[keyValue] = null;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n exit[i] = node;\n }\n }\n }\n\n function selection_data(value, key) {\n if (!value) {\n data = new Array(this.size()), j = -1;\n this.each(function(d) { data[++j] = d; });\n return data;\n }\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant$2(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = value.call(parent, parent && parent.__data__, j, parents),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n }\n\n function selection_exit() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n }\n\n function selection_join(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n enter = typeof onenter === \"function\" ? onenter(enter) : enter.append(onenter + \"\");\n if (onupdate != null) update = onupdate(update);\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n }\n\n function selection_merge(selection) {\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n }\n\n function selection_order() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n }\n\n function selection_sort(compare) {\n if (!compare) compare = ascending$1;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n }\n\n function ascending$1(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n }\n\n function selection_call() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n }\n\n function selection_nodes() {\n var nodes = new Array(this.size()), i = -1;\n this.each(function() { nodes[++i] = this; });\n return nodes;\n }\n\n function selection_node() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n }\n\n function selection_size() {\n var size = 0;\n this.each(function() { ++size; });\n return size;\n }\n\n function selection_empty() {\n return !this.node();\n }\n\n function selection_each(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n }\n\n function attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n }\n\n function attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n }\n\n function attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n }\n\n function attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n }\n\n function attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n }\n\n function attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n }\n\n function selection_attr(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n }\n\n function defaultView(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n }\n\n function styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n }\n\n function styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n }\n\n function styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n }\n\n function selection_style(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n }\n\n function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n }\n\n function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n }\n\n function propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n }\n\n function propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n }\n\n function selection_property(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n }\n\n function classArray(string) {\n return string.trim().split(/^|\\s+/);\n }\n\n function classList(node) {\n return node.classList || new ClassList(node);\n }\n\n function ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n }\n\n ClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n };\n\n function classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n }\n\n function classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n }\n\n function classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n }\n\n function classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n }\n\n function classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n }\n\n function selection_classed(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n }\n\n function textRemove() {\n this.textContent = \"\";\n }\n\n function textConstant(value) {\n return function() {\n this.textContent = value;\n };\n }\n\n function textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n }\n\n function selection_text(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n }\n\n function htmlRemove() {\n this.innerHTML = \"\";\n }\n\n function htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n }\n\n function htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n }\n\n function selection_html(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n }\n\n function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n }\n\n function selection_raise() {\n return this.each(raise);\n }\n\n function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n }\n\n function selection_lower() {\n return this.each(lower);\n }\n\n function selection_append(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n }\n\n function constantNull() {\n return null;\n }\n\n function selection_insert(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n }\n\n function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n }\n\n function selection_remove() {\n return this.each(remove);\n }\n\n function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n }\n\n function selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n }\n\n function selection_clone(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n }\n\n function selection_datum(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n }\n\n var filterEvents = {};\n\n var event = null;\n\n if (typeof document !== \"undefined\") {\n var element = document.documentElement;\n if (!(\"onmouseenter\" in element)) {\n filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n }\n }\n\n function filterContextListener(listener, index, group) {\n listener = contextListener(listener, index, group);\n return function(event) {\n var related = event.relatedTarget;\n if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n listener.call(this, event);\n }\n };\n }\n\n function contextListener(listener, index, group) {\n return function(event1) {\n var event0 = event; // Events can be reentrant (e.g., focus).\n event = event1;\n try {\n listener.call(this, this.__data__, index, group);\n } finally {\n event = event0;\n }\n };\n }\n\n function parseTypenames$1(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n }\n\n function onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.capture);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n }\n\n function onAdd(typename, value, capture) {\n var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n return function(d, i, group) {\n var on = this.__on, o, listener = wrap(value, i, group);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.capture);\n this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, capture);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n }\n\n function selection_on(typename, value, capture) {\n var typenames = parseTypenames$1(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n if (capture == null) capture = false;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n return this;\n }\n\n function customEvent(event1, listener, that, args) {\n var event0 = event;\n event1.sourceEvent = event;\n event = event1;\n try {\n return listener.apply(that, args);\n } finally {\n event = event0;\n }\n }\n\n function dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n }\n\n function dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n }\n\n function dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n }\n\n function selection_dispatch(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n }\n\n var root = [null];\n\n function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n }\n\n function selection() {\n return new Selection([[document.documentElement]], root);\n }\n\n Selection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch\n };\n\n function select(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n }\n\n function sourceEvent() {\n var current = event, source;\n while (source = current.sourceEvent) current = source;\n return current;\n }\n\n function point(node, event) {\n var svg = node.ownerSVGElement || node;\n\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n\n function mouse(node) {\n var event = sourceEvent();\n if (event.changedTouches) event = event.changedTouches[0];\n return point(node, event);\n }\n\n function touch(node, touches, identifier) {\n if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches;\n\n for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {\n if ((touch = touches[i]).identifier === identifier) {\n return point(node, touch);\n }\n }\n\n return null;\n }\n\n function nopropagation() {\n event.stopImmediatePropagation();\n }\n\n function noevent() {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n\n function nodrag(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, true);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, true);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n }\n\n function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, true);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n }\n\n function constant$3(x) {\n return function() {\n return x;\n };\n }\n\n function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {\n this.target = target;\n this.type = type;\n this.subject = subject;\n this.identifier = id;\n this.active = active;\n this.x = x;\n this.y = y;\n this.dx = dx;\n this.dy = dy;\n this._ = dispatch;\n }\n\n DragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n };\n\n // Ignore right-click, since that should open the context menu.\n function defaultFilter() {\n return !event.ctrlKey && !event.button;\n }\n\n function defaultContainer() {\n return this.parentNode;\n }\n\n function defaultSubject(d) {\n return d == null ? {x: event.x, y: event.y} : d;\n }\n\n function defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n }\n\n function drag() {\n var filter = defaultFilter,\n container = defaultContainer,\n subject = defaultSubject,\n touchable = defaultTouchable,\n gestures = {},\n listeners = dispatch(\"start\", \"drag\", \"end\"),\n active = 0,\n mousedownx,\n mousedowny,\n mousemoving,\n touchending,\n clickDistance2 = 0;\n\n function drag(selection) {\n selection\n .on(\"mousedown.drag\", mousedowned)\n .filter(touchable)\n .on(\"touchstart.drag\", touchstarted)\n .on(\"touchmove.drag\", touchmoved)\n .on(\"touchend.drag touchcancel.drag\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n function mousedowned() {\n if (touchending || !filter.apply(this, arguments)) return;\n var gesture = beforestart(\"mouse\", container.apply(this, arguments), mouse, this, arguments);\n if (!gesture) return;\n select(event.view).on(\"mousemove.drag\", mousemoved, true).on(\"mouseup.drag\", mouseupped, true);\n nodrag(event.view);\n nopropagation();\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\");\n }\n\n function mousemoved() {\n noevent();\n if (!mousemoving) {\n var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n gestures.mouse(\"drag\");\n }\n\n function mouseupped() {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent();\n gestures.mouse(\"end\");\n }\n\n function touchstarted() {\n if (!filter.apply(this, arguments)) return;\n var touches = event.changedTouches,\n c = container.apply(this, arguments),\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) {\n nopropagation();\n gesture(\"start\");\n }\n }\n }\n\n function touchmoved() {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent();\n gesture(\"drag\");\n }\n }\n }\n\n function touchended() {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation();\n gesture(\"end\");\n }\n }\n }\n\n function beforestart(id, container, point, that, args) {\n var p = point(container, id), s, dx, dy,\n sublisteners = listeners.copy();\n\n if (!customEvent(new DragEvent(drag, \"beforestart\", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {\n if ((event.subject = s = subject.apply(that, args)) == null) return false;\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n return true;\n })) return;\n\n return function gesture(type) {\n var p0 = p, n;\n switch (type) {\n case \"start\": gestures[id] = gesture, n = active++; break;\n case \"end\": delete gestures[id], --active; // nobreak\n case \"drag\": p = point(container, id), n = active; break;\n }\n customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);\n };\n }\n\n drag.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant$3(!!_), drag) : filter;\n };\n\n drag.container = function(_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant$3(_), drag) : container;\n };\n\n drag.subject = function(_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant$3(_), drag) : subject;\n };\n\n drag.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant$3(!!_), drag) : touchable;\n };\n\n drag.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag : value;\n };\n\n drag.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n };\n\n return drag;\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$a = Template('d-slider', `\n\n\n \n`);\n\n // ARIA\n // If the slider has a visible label, it is referenced by aria-labelledby on the slider element. Otherwise, the slider element has a label provided by aria-label.\n // If the slider is vertically oriented, it has aria-orientation set to vertical. The default value of aria-orientation for a slider is horizontal.\n\n const keyCodes = {\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n pageUp: 33,\n pageDown: 34,\n end: 35,\n home: 36\n };\n\n class Slider extends T$a(HTMLElement) {\n\n\n connectedCallback() {\n this.connected = true;\n this.setAttribute('role', 'slider');\n // Makes the element tab-able.\n if (!this.hasAttribute('tabindex')) { this.setAttribute('tabindex', 0); }\n\n // Keeps track of keyboard vs. mouse interactions for focus rings\n this.mouseEvent = false;\n\n // Handles to shadow DOM elements\n this.knob = this.root.querySelector('.knob-container');\n this.background = this.root.querySelector('.background');\n this.trackFill = this.root.querySelector('.track-fill');\n this.track = this.root.querySelector('.track');\n\n // Default values for attributes\n this.min = this.min ? this.min : 0;\n this.max = this.max ? this.max : 100;\n this.scale = linear$1().domain([this.min, this.max]).range([0, 1]).clamp(true);\n\n this.origin = this.origin !== undefined ? this.origin : this.min;\n this.step = this.step ? this.step : 1;\n this.update(this.value ? this.value : 0);\n\n this.ticks = this.ticks ? this.ticks : false;\n this.renderTicks();\n\n this.drag = drag()\n .container(this.background)\n .on('start', () => {\n this.mouseEvent = true;\n this.background.classList.add('mousedown');\n this.changeValue = this.value;\n this.dragUpdate();\n })\n .on('drag', () => {\n this.dragUpdate();\n })\n .on('end', () => {\n this.mouseEvent = false;\n this.background.classList.remove('mousedown');\n this.dragUpdate();\n if (this.changeValue !== this.value) this.dispatchChange();\n this.changeValue = this.value;\n });\n this.drag(select(this.background));\n\n this.addEventListener('focusin', () => {\n if(!this.mouseEvent) {\n this.background.classList.add('focus');\n }\n });\n this.addEventListener('focusout', () => {\n this.background.classList.remove('focus');\n });\n this.addEventListener('keydown', this.onKeyDown);\n\n }\n\n static get observedAttributes() {return ['min', 'max', 'value', 'step', 'ticks', 'origin', 'tickValues', 'tickLabels']; }\n\n attributeChangedCallback(attr, oldValue, newValue) {\n if (isNaN(newValue) || newValue === undefined || newValue === null) return;\n if (attr == 'min') {\n this.min = +newValue;\n this.setAttribute('aria-valuemin', this.min);\n }\n if (attr == 'max') {\n this.max = +newValue;\n this.setAttribute('aria-valuemax', this.max);\n }\n if (attr == 'value') {\n this.update(+newValue);\n }\n if (attr == 'origin') {\n this.origin = +newValue;\n // this.update(this.value);\n }\n if (attr == 'step') {\n if (newValue > 0) {\n this.step = +newValue;\n }\n }\n if (attr == 'ticks') {\n this.ticks = (newValue === '' ? true : newValue);\n }\n }\n\n onKeyDown(event) {\n this.changeValue = this.value;\n let stopPropagation = false;\n switch (event.keyCode) {\n case keyCodes.left:\n case keyCodes.down:\n this.update(this.value - this.step);\n stopPropagation = true;\n break;\n case keyCodes.right:\n case keyCodes.up:\n this.update(this.value + this.step);\n stopPropagation = true;\n break;\n case keyCodes.pageUp:\n this.update(this.value + this.step * 10);\n stopPropagation = true;\n break;\n\n case keyCodes.pageDown:\n this.update(this.value + this.step * 10);\n stopPropagation = true;\n break;\n case keyCodes.home:\n this.update(this.min);\n stopPropagation = true;\n break;\n case keyCodes.end:\n this.update(this.max);\n stopPropagation = true;\n break;\n }\n if (stopPropagation) {\n this.background.classList.add('focus');\n event.preventDefault();\n event.stopPropagation();\n if (this.changeValue !== this.value) this.dispatchChange();\n }\n }\n\n validateValueRange(min, max, value) {\n return Math.max(Math.min(max, value), min);\n }\n\n quantizeValue(value, step) {\n return Math.round(value / step) * step;\n }\n\n dragUpdate() {\n const bbox = this.background.getBoundingClientRect();\n const x = event.x;\n const width = bbox.width;\n this.update(this.scale.invert(x / width));\n }\n\n update(value) {\n let v = value;\n if (this.step !== 'any') {\n v = this.quantizeValue(value, this.step);\n }\n v = this.validateValueRange(this.min, this.max, v);\n if (this.connected) {\n this.knob.style.left = this.scale(v) * 100 + '%';\n this.trackFill.style.width = this.scale(this.min + Math.abs(v - this.origin)) * 100 + '%';\n this.trackFill.style.left = this.scale(Math.min(v, this.origin)) * 100 + '%';\n }\n if (this.value !== v) {\n this.value = v;\n this.setAttribute('aria-valuenow', this.value);\n this.dispatchInput();\n }\n }\n\n // Dispatches only on a committed change (basically only on mouseup).\n dispatchChange() {\n const e = new Event('change');\n this.dispatchEvent(e, {});\n }\n\n // Dispatches on each value change.\n dispatchInput() {\n const e = new Event('input');\n this.dispatchEvent(e, {});\n }\n\n renderTicks() {\n const ticksContainer = this.root.querySelector('.ticks');\n if (this.ticks !== false) {\n let tickData = [];\n if (this.ticks > 0) {\n tickData = this.scale.ticks(this.ticks);\n } else if (this.step === 'any') {\n tickData = this.scale.ticks();\n } else {\n tickData = range(this.min, this.max + 1e-6, this.step);\n }\n tickData.forEach(d => {\n const tick = document.createElement('div');\n tick.classList.add('tick');\n tick.style.left = this.scale(d) * 100 + '%';\n ticksContainer.appendChild(tick);\n });\n } else {\n ticksContainer.style.display = 'none';\n }\n }\n }\n\n var logo = \"\\n \\n \\n\";\n\n const headerTemplate = `\n\n\n`;\n\n // Copyright 2018 The Distill Template Authors\n\n const T$b = Template('distill-header', headerTemplate, false);\n\n class DistillHeader extends T$b(HTMLElement) {\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const styles$2 = `\n\n`;\n\n function appendixTemplate(frontMatter) {\n let html = styles$2;\n\n if (typeof frontMatter.githubUrl !== 'undefined') {\n html += `\n Updates and Corrections \n `;\n if (frontMatter.githubCompareUpdatesUrl) {\n html += `View all changes to this article since it was first published.`;\n }\n html += `\n If you see mistakes or want to suggest changes, please create an issue on GitHub .
\n `;\n }\n\n const journal = frontMatter.journal;\n if (typeof journal !== 'undefined' && journal.title === 'Distill') {\n html += `\n Reuse \n 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 …”.
\n `;\n }\n\n if (typeof frontMatter.publishedDate !== 'undefined') {\n html += `\n Citation \n For attribution in academic contexts, please cite this work as
\n ${frontMatter.concatenatedAuthors}, \"${frontMatter.title}\", Distill, ${frontMatter.publishedYear}. \n BibTeX citation
\n ${serializeFrontmatterToBibtex(frontMatter)} \n `;\n }\n\n return html;\n }\n\n class DistillAppendix extends HTMLElement {\n\n static get is() { return 'distill-appendix'; }\n\n set frontMatter(frontMatter) {\n this.innerHTML = appendixTemplate(frontMatter);\n }\n\n }\n\n const footerTemplate = `\n\n\n\n\n`;\n\n // Copyright 2018 The Distill Template Authors\n\n const T$c = Template('distill-footer', footerTemplate);\n\n class DistillFooter extends T$c(HTMLElement) {\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n let templateIsLoading = false;\n let runlevel = 0;\n const initialize = function() {\n if (window.distill.runlevel < 1) {\n throw new Error(\"Insufficient Runlevel for Distill Template!\");\n }\n\n /* 1. Flag that we're being loaded */\n if (\"distill\" in window && window.distill.templateIsLoading) {\n throw new Error(\n \"Runlevel 1: Distill Template is getting loaded more than once, aborting!\"\n );\n } else {\n window.distill.templateIsLoading = true;\n console.debug(\"Runlevel 1: Distill Template has started loading.\");\n }\n\n /* 2. Add styles if they weren't added during prerendering */\n makeStyleTag(document);\n console.debug(\"Runlevel 1: Static Distill styles have been added.\");\n console.debug(\"Runlevel 1->2.\");\n window.distill.runlevel += 1;\n\n /* 3. Register Controller listener functions */\n /* Needs to happen before components to their connected callbacks have a controller to talk to. */\n for (const [functionName, callback] of Object.entries(Controller.listeners)) {\n if (typeof callback === \"function\") {\n document.addEventListener(functionName, callback);\n } else {\n console.error(\"Runlevel 2: Controller listeners need to be functions!\");\n }\n }\n console.debug(\"Runlevel 2: We can now listen to controller events.\");\n console.debug(\"Runlevel 2->3.\");\n window.distill.runlevel += 1;\n\n /* 4. Register components */\n const components = [\n Abstract, Appendix, Article, Bibliography, Byline, Cite, CitationList, Code,\n Footnote, FootnoteList, FrontMatter$1, HoverBox, Title, DMath, References, TOC, Figure,\n Slider, Interstitial\n ];\n\n const distillComponents = [DistillHeader, DistillAppendix, DistillFooter];\n\n if (window.distill.runlevel < 2) {\n throw new Error(\"Insufficient Runlevel for adding custom elements!\");\n }\n const allComponents = components.concat(distillComponents);\n for (const component of allComponents) {\n console.debug(\"Runlevel 2: Registering custom element: \" + component.is);\n customElements.define(component.is, component);\n }\n\n console.debug(\n \"Runlevel 3: Distill Template finished registering custom elements.\"\n );\n console.debug(\"Runlevel 3->4.\");\n window.distill.runlevel += 1;\n\n // If template was added after DOMContentLoaded we may have missed that event.\n // Controller will check for that case, so trigger the event explicitly:\n if (domContentLoaded()) {\n Controller.listeners.DOMContentLoaded();\n }\n\n console.debug(\"Runlevel 4: Distill Template initialisation complete.\");\n window.distill.templateIsLoading = false;\n window.distill.templateHasLoaded = true;\n };\n\n window.distill = { runlevel, initialize, templateIsLoading };\n\n /* 0. Check browser feature support; synchronously polyfill if needed */\n if (Polyfills.browserSupportsAllFeatures()) {\n console.debug(\"Runlevel 0: No need for polyfills.\");\n console.debug(\"Runlevel 0->1.\");\n window.distill.runlevel += 1;\n window.distill.initialize();\n } else {\n console.debug(\"Runlevel 0: Distill Template is loading polyfills.\");\n Polyfills.load(window.distill.initialize);\n }\n\n})));\n//# sourceMappingURL=template.v2.js.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","// startup\n// Load entry module and return exports\n// This entry module used 'module' so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(265);\n"],"names":["define","days","months","zeroPad","n","RFC","date","day","getDay","substring","paddedDate","getDate","month","getMonth","year","getFullYear","toString","hours","getUTCHours","minutes","getUTCMinutes","seconds","getUTCSeconds","concat","Author","_createClass","object","_classCallCheck","this","name","author","personalURL","authorURL","affiliation","affiliationURL","affiliations","key","get","names","split","slice","length","join","FrontMatter","title","description","authors","bibliography","Map","bibliographyParsed","citations","citationsCollected","journal","katex","doi","undefined","publishedDate","_url","distillPath","url","set","value","githubPath","_previewURL","updatedDate","toISOString","volume","publishedYear","Error","lastName","map","firstName","slug","toLowerCase","_this","citationKey","_bibliography","_typeof","property","hasOwnProperty","mapFromObject","target","Object","assign","Array","from","reduce","_ref","_ref2","_slicedToArray","objectFromMap","bibliographyEntries","githubUrl","previewURL","issue","publishedDateRFC","publishedMonth","publishedDay","publishedMonthPadded","publishedDayPadded","updatedDateRFC","concatenatedAuthors","bibtexAuthors","source","frontMatter","Mutating","superclass","_superclass","_class","_this2","_callSuper","options","childList","characterData","subtree","observer","MutationObserver","disconnect","renderIfPossible","observe","_inherits","_get","_getPrototypeOf","prototype","call","textContent","root","renderContent","console","error","constructor","Template","templateString","useShadow","arguments","template","document","createElement","innerHTML","window","ShadyCSS","prepareTemplate","_superclass2","_class2","_this3","clone","importNode","content","attachShadow","mode","shadowRoot","appendChild","hasAttribute","styleElement","insertBefore","firstChild","query","querySelector","querySelectorAll","math","findEndOfMath","delimiter","text","startIndex","index","braceLevel","delimLength","character","splitAtDelimiters","startData","leftDelim","rightDelim","display","finalData","i","type","data","lookingForLeft","currIndex","nextIndex","indexOf","push","rawData","renderMathInText","optionsCopy","delimiters","left","right","splitWithDelimiters","fragment","createDocumentFragment","createTextNode","tag","displayMode","setAttribute","e","ParseError","errorCallback","renderElem","elem","childNodes","childNode","nodeType","mightHaveMath","frag","replaceChild","ignoredTags","nodeName","defaultAutoRenderOptions","msg","err","renderMathInElement","delimiterStrings","flatMap","d","some","katexCSSTag","DMath","_Mutating","localOptions","katexOptions","katexAdded","addKatex","container","render","_katexOptions","katexLoadedCallback","_step","_iterator","_createForOfIteratorHelper","s","done","f","body","head","insertAdjacentHTML","scriptTag","src","async","onload","crossorigin","T","HTMLElement","collect_citations","_step2","dom","Set","_iterator2","_step3","_iterator3","getAttribute","k","trim","add","author_string","ent","sep","finalSep","name_strings","last","firsts","initials","replace","venue_string","cite","booktitle","number","pages","publisher","link_string","arxiv_match","exec","label","doi_string","new_line","bibliography_cite","fancy","title_string","hover_cite","a_str","v_str","Math","min","domContentLoaded","readyState","parseFrontmatter","element","firstElementChild","_step4","_iterator4","hasOldStyle","Boolean","hasNewStyle","warn","newAffiliation","_moveLegacyAffiliationFormatIntoArray","JSON","parse","inlineMathRendered","FrontMatter$1","_HTMLElement","_this4","entries","_step5","_iterator5","entry","notify","event","CustomEvent","detail","bubbles","dispatchEvent","_wrapNativeSuper","Controller","waitingOn","listeners","onCiteKeyCreated","_event$detail","citeTag","keys","numbers","onCiteKeyChanged","_step6","_iterator6","waitingCallback","citationListTag","_step7","_iterator7","log","onCiteKeyRemoved","onBibliographyChanged","_step8","_iterator8","debug","onFootnoteChanged","footnotesList","footnotes","onFrontMatterChanged","published","Date","String","authorObject","password","interstitial","parentElement","removeChild","article","byline","h1","hasPassword","inBrowser","onLocalhost","location","hostname","includes","appendix","footnoteList","citationList","optionalComponents","DOMContentLoaded","loaded","frontMatterTag","_step9","_iterator9","_step10","_iterator10","styles","base","addPolyfill","polyfill","polyfillLoadedCallback","script","onerror","polyfills","support","Element","Polyfills","every","poly","callback","_step11","polyfillLoaded","neededPolyfills","distillRunlevel","_iterator11","_neededPolyfills","filter","Abstract","_T$","selector","T$1","Appendix","_T$2","T$2","isOnlyWhitespace","Article","_HTMLElement2","_this5","mutations","_step12","_iterator12","_step13","_iterator13","addedNodes","addedNode","nodeValue","test","wrapper","parentNode","commonjsGlobal","globalThis","global","self","createCommonjsModule","fn","module","exports","bibtexParse","BibtexParser","notKey","pos","input","currentEntry","setInput","t","getEntries","isWhitespace","match","canCommentOut","skipWhitespace","tryMatch","matchAt","value_braces","bracecount","start","escaped","end","value_comment","str","brcktCnt","value_quotes","single_value","values","key_equals_value","key_value_list","kv","entry_body","directive","preamble","comment","bibtex","string","toJSON","b","toBibtex","json","out","entryType","entryTags","tags","jdx","normalizeTag","full","x","char","parseBibtex","_step14","_iterator14","_i","_Object$entries","_Object$entries$_i","Bibliography","_HTMLElement3","_this6","_step15","_iterator15","parseIfPossible","_this7","requestAnimationFrame","newBibtex","response","oldValue","newValue","_this8","oReq","XMLHttpRequest","receivedBibtex","responseType","open","send","Byline","_HTMLElement4","bylineTemplate","Cite","_T$3","_this9","_numbers","_entries","_this10","outerSpan","innerSpan","hoverBox","customElements","whenDefined","then","listen","displayNumbers","displayEntries","eventName","result","html","T$3","CitationList","_HTMLElement5","style","size","list","stylesTag","heading","id","className","_step16","_iterator16","_step16$value","listItem","renderCitationList","prism","Prism","_self","lang","uniqueId","_","manual","disableWorkerMessageHandler","util","encode","tokens","Token","alias","isArray","o","objId","obj","defineProperty","deepClone","visited","forEach","v","getLanguage","currentScript","stack","scripts","getElementsByTagName","languages","extend","redef","inside","before","insert","grammar","ret","token","newToken","old","DFS","propertyType","plugins","highlightAll","highlightAllUnder","env","hooks","run","elements","apply","highlightElement","language","parent","code","insertHighlightedCode","highlightedCode","Worker","worker","filename","onmessage","evt","postMessage","stringify","immediateClose","highlight","tokenize","rest","tokenList","LinkedList","addAfter","matchGrammar","array","node","next","tail","toArray","all","callbacks","matchedStr","greedy","startNode","startPos","oneshot","patterns","j","pattern","lookbehind","lookbehindLength","flags","RegExp","currentNode","removeCount","prev","lastIndex","to","p","after","removeFrom","removeRange","newNode","count","classes","attributes","aliases","addEventListener","message","close","highlightAutomaticallyCallback","defer","setTimeout","WorkerGlobalScope","markup","tagName","includedCdataInside","def","xml","mathml","svg","css","addInlined","clike","javascript","js","fileHighlight","Extensions","pre","extension","xhr","onreadystatechange","status","responseText","statusText","python","py","lua","envVars","insideString","bash","variable","toBeCopied","shell","go","inner","createInline","starAlternative","tableCell","tableRow","tableLine","markdown","punctuation","walkTokens","l","codeLang","codeBlock","cls","autoloader","valueOf","floor","random","loadLanguages","ele","getElementById","md","julia","Code","_Mutating2","languageName","codeTag","tabs","ShadowRoot","preTag","T$4","Footnote","_T$4","_this11","_this12","currentFootnoteId","IdString","host","span","T$5","FootnoteList","_T$5","_step17","_iterator17","footnote","backlink","href","T$6","HoverBox","_T$6","bindDivEvents","bindTriggerEvents","_this13","visible","showAtNode","stopTimeout","extendTimeout","stopPropagation","passive","hide","_this14","position","top","round","bbox","getBoundingClientRect","show","offsetLeft","width","offsetTop","height","timeout","clearTimeout","time","_this15","T$7","Title","_HTMLElement6","References","_T$7","T$8","TOC","_HTMLElement7","_this16","headings","_step18","ToC","_iterator18","el","isInTitle","isException","newLine","renderTOC","Figure","_HTMLElement8","_this17","_ready","_onscreen","_offscreen","loadsWhileScrolling","marginObserver","directObserver","unobserve","readyQueue","runReadyQueue","onscreen","_readyQueue","figure","sort","a","_seenOnScreen","pop","ready","_marginObserver","viewportHeight","innerHeight","margin","rootMargin","threshold","didObserveMarginIntersection","IntersectionObserver","_step19","_iterator19","isIntersecting","addToReadyQueue","_directObserver","didObserveDirectIntersection","_step20","_iterator20","offscreen","isScrolling","Interstitial","_T$8","_this18","shouldRemoveSelf","oninput","passwordChanged","Storage","localStorage","setItem","localStorageIdentifier","getItem","pathname","T$9","ascending","NaN","compare","bisectRight","lo","hi","mid","e10","sqrt","e5","e2","tickIncrement","stop","step","max","power","LN10","pow","initRange","domain","range","factory","definition","create","Color","darker","brighter","reI","reN","reP","reHex","reRgbInteger","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","named","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","color_formatHex","rgb","formatHex","color_formatRgb","formatRgb","color","format","m","parseInt","rgbn","Rgb","rgba","hsla","r","g","rgbConvert","opacity","rgb_formatHex","hex","rgb_formatRgb","isNaN","h","Hsl","hslConvert","hsl2rgb","m1","m2","copy","channels","displayable","formatHsl","deg2rad","PI","rad2deg","Xn","Yn","Zn","t0","t1","t2","t3","labConvert","Lab","Hcl","hcl2lab","z","rgb2lrgb","y","xyz2lab","lab2xyz","lrgb2rgb","c","cos","sin","atan2","hclConvert","A","B","C","D","E","ED","EB","BC_DA","Cubehelix","constant","gamma","nogamma","exponential","linear","bl","cubehelixConvert","cosh","sinh","rgb$1","rgbGamma","numberArray","genericArray","nb","na","interpolate","setTime","interpolateNumber","reA","reB","am","bm","bs","bi","q","one","zero","ArrayBuffer","isView","DataView","interpolateRound","unit","identity","normalize","bimap","d0","d1","r0","r1","polymap","reverse","transformer","transform","untransform","unknown","piecewise","output","interpolate$1","clamp","rescale","scale","invert","rangeRound","u","formatDecimal","toExponential","coefficient","exponent","abs","prefixExponent","re","formatSpecifier","specifier","FormatSpecifier","fill","align","sign","symbol","comma","precision","formatRounded","formatTypes","toFixed","toPrecision","toUpperCase","identity$1","locale","formatPrefix","prefixes","formatLocale","grouping","thousands","group","Number","currencyPrefix","currency","currencySuffix","decimal","numerals","formatNumerals","percent","minus","nan","newFormat","prefix","suffix","formatType","maybeSuffix","valuePrefix","valueSuffix","valueNegative","i1","i0","formatTrim","charCodeAt","Infinity","padding","tickFormat","step0","step1","tickStep","precisionPrefix","precisionRound","precisionFixed","linearish","ticks","isFinite","ceil","nice","linear$1","t0$1","t1$1","newInterval","floori","offseti","field","interval","offset","previous","millisecond","durationSecond","durationMinute","durationHour","durationDay","durationWeek","getMilliseconds","getSeconds","getMinutes","getHours","setHours","setDate","getTimezoneOffset","weekday","sunday","monday","thursday","setMonth","setFullYear","setUTCSeconds","setUTCMinutes","utcDay","setUTCHours","setUTCDate","getUTCDate","utcWeekday","getUTCDay","utcSunday","utcMonday","utcThursday","utcYear","setUTCMonth","getUTCMonth","getUTCFullYear","setUTCFullYear","localDate","H","M","S","L","utcDate","UTC","newDate","locale$1","utcFormat","utcParse","pads","numberRe","percentRe","requoteRe","pad","requote","formatRe","formatLookup","parseWeekdayNumberSunday","w","parseWeekdayNumberMonday","parseWeekNumberSunday","U","parseWeekNumberISO","V","parseWeekNumberMonday","W","parseFullYear","parseYear","parseZone","Z","parseQuarter","parseMonthNumber","parseDayOfMonth","parseDayOfYear","parseHour24","parseMinutes","parseSeconds","parseMilliseconds","parseMicroseconds","parseLiteralPercent","parseUnixTimestamp","Q","parseUnixTimestampSeconds","formatDayOfMonth","formatHour24","formatHour12","formatDayOfYear","formatMilliseconds","formatMicroseconds","formatMonthNumber","formatMinutes","formatSeconds","formatWeekdayNumberMonday","formatWeekNumberSunday","formatWeekNumberISO","formatWeekdayNumberSunday","formatWeekNumberMonday","formatYear","formatFullYear","formatZone","formatUTCDayOfMonth","formatUTCHour24","formatUTCHour12","formatUTCDayOfYear","formatUTCMilliseconds","getUTCMilliseconds","formatUTCMicroseconds","formatUTCMonthNumber","formatUTCMinutes","formatUTCSeconds","formatUTCWeekdayNumberMonday","dow","formatUTCWeekNumberSunday","formatUTCWeekNumberISO","formatUTCWeekdayNumberSunday","formatUTCWeekNumberMonday","formatUTCYear","formatUTCFullYear","formatUTCZone","formatLiteralPercent","formatUnixTimestamp","formatUnixTimestampSeconds","locale_dateTime","dateTime","locale_date","locale_time","locale_periods","periods","locale_weekdays","locale_shortWeekdays","shortDays","locale_months","locale_shortMonths","shortMonths","periodRe","periodLookup","weekdayRe","weekdayLookup","shortWeekdayRe","shortWeekdayLookup","monthRe","monthLookup","shortMonthRe","shortMonthLookup","formats","utcFormats","parses","parseSpecifier","charAt","newParse","week","day$1","X","formatLocale$1","defaultLocale$1","isoSpecifier","noop","dispatch","Dispatch","on","typename","types","that","args","xhtml","namespaces","xlink","xmlns","namespace","space","local","creatorInherit","ownerDocument","uri","namespaceURI","documentElement","createElementNS","creatorFixed","fullname","creator","none","empty","sparse","update","EnterNode","datum","_next","_parent","__data__","child","keyPrefix","bindIndex","enter","exit","groupLength","dataLength","bindKey","keyValue","nodeByKeyValue","keyValues","ascending$1","attrRemove","removeAttribute","attrRemoveNS","removeAttributeNS","attrConstant","attrConstantNS","setAttributeNS","attrFunction","attrFunctionNS","defaultView","styleRemove","removeProperty","styleConstant","priority","setProperty","styleFunction","propertyRemove","propertyConstant","propertyFunction","classArray","classList","ClassList","_node","_names","classedAdd","classedRemove","remove","classedTrue","classedFalse","classedFunction","textRemove","textConstant","textFunction","htmlRemove","htmlConstant","htmlFunction","raise","nextSibling","lower","previousSibling","constantNull","selection_cloneShallow","cloneNode","selection_cloneDeep","splice","contains","filterEvents","filterContextListener","listener","contextListener","related","relatedTarget","compareDocumentPosition","event1","event0","onRemove","__on","removeEventListener","capture","onAdd","wrap","customEvent","sourceEvent","params","createEvent","initEvent","cancelable","dispatchConstant","dispatchFunction","mouseenter","mouseleave","Selection","groups","parents","_groups","_parents","select","current","point","ownerSVGElement","createSVGPoint","clientX","clientY","matrixTransform","getScreenCTM","inverse","rect","clientLeft","clientTop","mouse","changedTouches","touch","touches","identifier","nopropagation","stopImmediatePropagation","noevent","preventDefault","constant$3","DragEvent","subject","active","dx","dy","defaultFilter","ctrlKey","button","defaultContainer","defaultSubject","defaultTouchable","navigator","maxTouchPoints","drag","mousedownx","mousedowny","mousemoving","touchending","touchable","gestures","clickDistance2","selection","mousedowned","touchstarted","touchmoved","touchended","gesture","beforestart","view","mousemoved","mouseupped","__noselect","MozUserSelect","nodrag","noclick","yesdrag","sublisteners","p0","clickDistance","subgroups","subnode","subgroup","selectAll","selectorAll","matches","matcher","each","bind","enterGroup","updateGroup","_enter","_exit","onenter","onupdate","onexit","append","merge","order","groups0","groups1","m0","merges","group0","group1","compareNode","sortgroups","sortgroup","nodes","attr","getAttributeNS","getPropertyValue","getComputedStyle","styleValue","classed","deep","typenames","parseTypenames$1","T$a","keyCodes","Slider","_T$a","_this19","connected","mouseEvent","knob","background","trackFill","track","origin","renderTicks","changeValue","dragUpdate","dispatchChange","onKeyDown","keyCode","quantizeValue","validateValueRange","dispatchInput","Event","_this20","ticksContainer","tick","logo","DistillHeader","_T$b","T$b","DistillAppendix","_HTMLElement9","githubCompareUpdatesUrl","serializeFrontmatterToBibtex","appendixTemplate","DistillFooter","_T$c","T$c","distill","runlevel","initialize","templateIsLoading","styleTagId","styleTag","cssTextTag","firstScriptTag","makeStyleTag","_i2","_Object$entries2","_Object$entries2$_i","functionName","components","distillComponents","_step21","_iterator21","component","is","templateHasLoaded","browserSupportsAllFeatures","load","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","Function"],"sourceRoot":""}
\ No newline at end of file