{"version":3,"sources":["../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","components/TagIndexPage.js","components/TagPage.js","routes/tags.js","components/TagIndexPage.module.css","components/TagPage.module.css"],"names":["_arrayLikeToArray","arr","len","length","i","arr2","Array","_toConsumableArray","isArray","_arrayWithoutHoles","iter","Symbol","iterator","Object","from","_iterableToArray","o","minLen","n","prototype","toString","call","slice","constructor","name","test","_unsupportedIterableToArray","TypeError","_nonIterableSpread","TagIndexPage","props","react_default","a","createElement","className","styles","tags","map","tag","key","href","dist_es","count","TagPage","_ref","blogRoot","routes","route","url","ArticleSummary","crawlRoutes","_callee4","root","_yield$crawl","paths","regenerator_default","wrap","_context4","prev","next","cache","crawl","context","crawlingRoutes","sent","resolve","method","urls","abrupt","stop","tagRoutes","compose","withContext","req","objectSpread2","tagsRoot","mountpath","withCrawlerPatterns","/:tag","_tag","asyncToGenerator","mark","_callee","_context","t0","getAvailableTagsFromRoutes","t1","_x2","_x3","apply","this","arguments","mount","/","title","getView","_getView","_callee2","_context2","fromPairs","toLowerCase","forEach","data","push","components_TagIndexPage","join","_x4","_x5","getTitle","params","_getView2","_callee3","lowerCaseTag","_context3","find","metaTag","components_TagPage","_x6","_x7","Set","concat","module","exports"],"mappings":"2FAAe,SAAAA,EAAAC,EAAAC,IACf,MAAAA,KAAAD,EAAAE,UAAAD,EAAAD,EAAAE,QAEA,QAAAC,EAAA,EAAAC,EAAA,IAAAC,MAAAJ,GAAwCE,EAAAF,EAASE,IACjDC,EAAA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AAvB,EAAAiD,KAAE,SAAA8B,EAAOtC,EAAKX,GAAZ,IAAAkD,EAAAlE,EAAAwB,EAAA,OAAAf,EAAAvB,EAAAwB,KAAA,SAAAyD,GAAA,cAAAA,EAAAvD,KAAAuD,EAAAtD,MAAA,cACHqD,EAAevC,EAAIoC,OAAOvE,IAAI8D,cAD3Ba,EAAAtD,KAAA,EAEYT,EAAYY,EAAQjB,UAFhC,cAEHC,EAFGmE,EAAAjD,KAKHM,EAAY,GAChBxB,EAAOuD,QAAQ,SAAAtD,IACDA,EAAMuD,MAAQvD,EAAMuD,KAAKlE,MAAS,IACrC8E,KAAK,SAAAC,GAAO,OAAIA,EAAQf,gBAAkBY,KACjD1C,EAAUiC,KAAKxD,KATZkE,EAAA7C,OAAA,SAcLrC,EAAAC,EAAAC,cAACmF,EAAD,CACEvE,SAAUiB,EAAQjB,SAClBrB,KAAMiD,EAAIoC,OAAOvE,IACjBQ,OAAQwB,KAjBL,wBAAA2C,EAAA5C,SAAA0C,MAAF,gBAAAM,EAAAC,GAAA,OAAAR,EAAArB,MAAAC,KAAAC,YAAA,QAyBb,SAASN,EAA2BvC,GAAQ,IAAAF,EAC1C,OAAOtC,MAAMQ,KACX,IAAIyG,KACF3E,EAAA,IAAG4E,OAAH/B,MAAA7C,EAAArC,EAAauC,EAAOT,IAAI,SAAAU,GAAK,OAAKA,EAAMuD,MAAQvD,EAAMuD,KAAKlE,MAAS,SAK3DkC,gCC9GfmD,EAAAC,QAAA,CAAkB7F,aAAA,wDCAlB4F,EAAAC,QAAA,CAAkB/E,QAAA","file":"static/js/10.e8f4ab19.chunk.js","sourcesContent":["export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import React from 'react'\nimport { Link } from 'react-navi'\nimport styles from './TagIndexPage.module.css'\n\nfunction TagIndexPage(props) {\n return (\n
\n

Tags

\n \n
\n )\n}\n\nexport default TagIndexPage","import React from 'react'\nimport ArticleSummary from './ArticleSummary'\nimport styles from './TagPage.module.css'\n\nfunction TagPage({ blogRoot, name, routes }) {\n return (\n
\n

{name} posts

\n \n
\n )\n}\n\nexport default TagPage","import React from 'react'\nimport { compose, crawl, mount, resolve, route, withContext, withCrawlerPatterns } from 'navi'\nimport { join } from 'path'\nimport { fromPairs } from 'lodash'\nimport TagIndexPage from '../components/TagIndexPage'\nimport TagPage from '../components/TagPage'\nimport routes from './index'\n\nasync function crawlRoutes(root) {\n if (!crawlRoutes.cache[root]) {\n let { paths } = await crawl({\n context: {\n crawlingRoutes: true,\n },\n root,\n routes,\n })\n crawlRoutes.cache[root] = await resolve({\n method: 'HEAD',\n routes,\n urls: paths,\n }) \n }\n return crawlRoutes.cache[root]\n}\ncrawlRoutes.cache = {}\n\nconst tagRoutes = compose(\n withContext((req, context) => ({\n ...context,\n tagsRoot: req.mountpath,\n })),\n withCrawlerPatterns({\n '/:tag': async (req, context) => {\n if (!context.crawlingRoutes) {\n return getAvailableTagsFromRoutes(\n await crawlRoutes(context.blogRoot)\n ).map(tag => '/'+tag)\n }\n return []\n }\n }),\n mount({\n '/': route({\n title: 'Tags',\n\n getView: async (req, context) => {\n // Build a list of pages for each tag\n let routes = await crawlRoutes(context.blogRoot)\n let tags = getAvailableTagsFromRoutes(routes)\n let tagRoutes = fromPairs(tags.map(name => [name.toLowerCase(), []]))\n routes.forEach(route => {\n let data = route.data\n if (data && data.tags) {\n data.tags.forEach(tag => {\n tag = tag.toLowerCase()\n if (tagRoutes[tag]) {\n tagRoutes[tag].push(route)\n }\n })\n }\n })\n\n return (\n ({\n name,\n href: join(req.mountpath, name.toLowerCase()),\n count: (tagRoutes[name] || []).length,\n }))}\n />\n )\n },\n }),\n\n '/:tag': route({\n getTitle: req => req.params.tag,\n getView: async (req, context) => {\n let lowerCaseTag = req.params.tag.toLowerCase()\n let routes = await crawlRoutes(context.blogRoot)\n\n // Build a list of pages that include the tag from the site map\n let tagRoutes = []\n routes.forEach(route => {\n let tags = (route.data && route.data.tags) || []\n if (tags.find(metaTag => metaTag.toLowerCase() === lowerCaseTag)) {\n tagRoutes.push(route)\n }\n })\n\n return (\n \n )\n },\n }),\n }),\n)\n\nfunction getAvailableTagsFromRoutes(routes) {\n return Array.from(\n new Set(\n [].concat(...routes.map(route => (route.data && route.data.tags) || [])),\n ),\n )\n}\n\nexport default tagRoutes\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"TagIndexPage\":\"TagIndexPage_TagIndexPage__1KLH1\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"TagPage\":\"TagPage_TagPage__2Zrai\"};"],"sourceRoot":""}