{"version":3,"sources":["webpack:///./src/components/StickyResponsiveSidebar/StickyResponsiveSidebar.js","webpack:///./src/utils/isItemActive.js","webpack:///./src/components/MarkdownHeader/MarkdownHeader.js","webpack:///./src/components/StickyResponsiveSidebar/index.js","webpack:///./src/utils/toCommaSeparatedList.js","webpack:///./src/templates/components/Sidebar/index.js","webpack:///./src/templates/topics.js","webpack:///./src/templates/components/NavigationFooter/NavigationFooter.js","webpack:///./src/templates/components/Sidebar/ScrollSyncSection.js","webpack:///./node_modules/slugify/slugify.js","webpack:///./src/utils/createLink.js","webpack:///./src/templates/components/ChevronSvg/index.js","webpack:///./src/components/MarkdownPage/MarkdownPage.js","webpack:///./src/utils/findSectionForPath.js","webpack:///./node_modules/tocbot/src/js/default-options.js","webpack:///./src/components/MarkdownHeader/index.js","webpack:///./src/utils/createOgUrl.js","webpack:///./node_modules/tocbot/src/js/index.js","webpack:///./src/components/TOC.js","webpack:///./src/templates/components/Sidebar/Section.js","webpack:///./node_modules/tocbot/src/js/build-html.js","webpack:///./src/components/MarkdownPage/index.js","webpack:///./src/utils/slugify.js","webpack:///./node_modules/core-js/modules/es6.array.last-index-of.js","webpack:///./src/templates/components/Sidebar/Sidebar.js","webpack:///./node_modules/tocbot/src/js/parse-content.js","webpack:///./src/templates/components/NavigationFooter/index.js","webpack:///./node_modules/tocbot/src/js/scroll-smooth/index.js","webpack:///./src/components/MarkdownPage/DownloadPDF.js"],"names":["StickyResponsiveSidebar","props","_openNavMenu","setState","open","state","_closeNavMenu","render","this","smallScreenSidebarStyles","top","left","bottom","right","position","backgroundColor","colors","white","zIndex","height","overflowY","WebkitOverflowScrolling","pointerEvents","iconOffset","menuOpacity","menuOffset","style","opacity","transition","css","media","lessThan","greaterThan","marginLeft","paddingLeft","between","size","transform","marginTop","closeParentMenu","darker","color","brand","display","cursor","borderRadius","border","boxShadow","onClick","role","tabIndex","flexDirection","alignItems","overflow","width","alignSelf","cssProps","Component","isItemActive","location","item","directory","href","pathname","startIndex","indexOf","endIndex","lastIndexOf","length","substring","id","includes","pathArray","split","slice","slugify","MarkdownHeader","title","type","halign","valign","dark","marginBottom","fonts","header","addString","list","string","push","key","toCommaSeparatedList","array","renderCallback","map","forEach","index","Sidebar","Topics","data","sectionListDocs","sectionListTopics_en","markdownRemark","fields","langKey","sectionListTopics_zh","console","log","createLink","createLinkDocs","sectionList","propTypes","PropTypes","object","isRequired","pageQuery","NavigationFooter","next","prev","background","paddingTop","paddingBottom","paddingRight","basis","SecondaryLabel","PrimaryLink","to","textAlign","shape","children","updatedUrl","replace","borderColor","subtle","fontSize","borderBottomWidth","borderBottomStyle","small","ScrollSyncSection","context","activeItemId","itemTopOffsets","calculateItemTopOffsets","bind","handleResize","handleScroll","componentDidMount","window","addEventListener","componentWillUnmount","removeEventListener","section","itemIds","_getItemIds","items","_getElementTopOffsetsById","find","itemTopOffset","i","nextItemTopOffset","scrollY","offsetTop","isScrollSync","subItemIds","subitems","subitem","reduce","current","concat","ids","element","document","getElementById","filter","factory","charMap","JSON","parse","locales","options","Error","locale","replacement","slug","result","ch","remove","trim","RegExp","lower","toLowerCase","strict","extend","customMap","module","exports","createLinkBlog","isActive","linkCss","activeLinkCss","activeLinkBefore","createLinkCommunity","target","rel","verticalAlign","createLinkTutorial","onLinkClick","createLinkTerms","createLinkapi","fontWeight","linkblue","borderLeft","text","borderBottom","fontweight","ChevronSvg","viewBox","version","x","y","d","fill","MarkdownPage","authors","date","enableScrollSync","ogDescription","titlePostfix","hasCurTOC","hasAuthors","titlePrefix","frontmatter","direction","grow","shrink","flex","ogUrl","createOgUrl","sharedStyles","articleLayout","container","sidebar","defaultActiveSection","findSectionForPath","article","author","link","url","name","content","markdown","dangerouslySetInnerHTML","__html","html","path","editLink","curPageTOC","sections","activeSection","slugId","currentPath","hasMatch","some","tocSelector","contentSelector","headingSelector","ignoreSelector","hasInnerContainers","linkClass","extraLinkClasses","activeLinkClass","listClass","extraListClasses","isCollapsedClass","collapsibleClass","listItemClass","activeListItemClass","collapseDepth","scrollSmooth","scrollSmoothDuration","scrollSmoothOffset","scrollEndCallback","e","headingsOffset","throttleTimeout","positionFixedSelector","positionFixedClass","fixedSidebarOffset","includeHtml","orderedList","scrollContainer","skipRendering","headingLabelCallback","ignoreHiddenElements","headingObjectCallback","urlRoot","root","global","buildHtml","parseContent","headingsArray","defaultOptions","tocbot","BuildHtml","ParseContent","supports","querySelector","hasOwnProperty","Object","prototype","destroy","innerHTML","warn","_scrollListener","_clickListener","init","customOptions","arguments","source","call","duration","offset","initSmoothScrolling","_buildHtml","_parseContent","selectHeadings","nestedHeadings","nestHeadingsArray","nest","throttle","updateToc","isTop","scrollingElement","scrollTop","eventPhase","currentTarget","timeout","event","disableTocAnimation","clearTimeout","setTimeout","enableTocAnimation","refresh","fn","threshhold","scope","last","deferTimer","now","Date","args","apply","TOC","parseInt","data-cy","showHeading","txt","onDark","className","React","defaultProps","listClasses","bool","Section","uid","Math","random","renderSectionItems","onSectionTitleClick","fontFeatureSettings","isOrdered","aria-expanded","aria-controls","outline","body","currentlyHighlighting","createEl","appendChild","createElement","a","setAttribute","onclick","childNodes","node","cloneNode","textContent","nodeName","createList","isCollapsed","child","listElement","classes","srcElement","selector","parent","firstChild","removeChild","documentElement","posFixedEl","join","updateFixedSidebarClass","topHeader","headings","heading","getHeadingTopPos","obj","offsetParent","tocLinks","querySelectorAll","tocLink","tocLis","tocLi","activeTocLink","li","parentNode","tocLists","nextSibling","removeCollapsedFromParents","filename","filenameWithSuffix","$export","toIObject","toInteger","toLength","$native","NEGATIVE_ZERO","P","F","searchElement","O","min","SectionComponent","_toggleSection","getLastItem","getHeadingLevel","getHeadingObject","HTMLElement","offsetHeight","headingLevel","String","curr","currentHeading","level","lastItem","counter","undefined","addNode","selectors","pageUrl","hash","stripHash","n","tagName","charAt","timeStart","timeElapsed","start","pageYOffset","opt","callback","easing","t","b","c","tgt","decodeURI","distance","getBoundingClientRect","loop","time","scrollTo","requestAnimationFrame","jump","test","focus"],"mappings":"gQAyBMA,E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* @emails react-core\n * @flow\n */\n\nimport Container from 'components/Container';\nimport React, {Component} from 'react';\nimport Sidebar from 'templates/components/Sidebar';\nimport {colors, media} from 'theme';\nimport ChevronSvg from 'templates/components/ChevronSvg';\n\ntype State = {\n open: boolean,\n};\n\ntype Props = {\n enableScrollSync?: boolean,\n createLink: Function, // TODO: Add better flow type once we Flow-type createLink\n defaultActiveSection: string,\n location: Location,\n sectionList: Array, // TODO: Add better flow type once we have the Section component\n};\n\nclass StickyResponsiveSidebar extends Component {\n constructor(props: Props) {\n super(props);\n\n this.state = {\n open: false,\n };\n }\n\n _openNavMenu = () => {\n this.setState({open: !this.state.open});\n };\n\n _closeNavMenu = () => {\n this.setState({open: false});\n };\n\n render() {\n const {open} = this.state;\n const smallScreenSidebarStyles = {\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n position: 'fixed',\n backgroundColor: colors.white,\n zIndex: 2,\n height: '100vh',\n overflowY: 'auto',\n WebkitOverflowScrolling: 'touch',\n pointerEvents: open ? 'auto' : 'none',\n };\n\n const smallScreenBottomBarStyles = {\n display: 'inline-block',\n };\n\n const iconOffset = open ? 8 : -4;\n const menuOpacity = open ? 1 : 0;\n const menuOffset = open ? 0 : 40;\n\n // TODO: role and aria props for 'close' button?\n return (\n
\n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n );\n }\n}\n\nexport default StickyResponsiveSidebar;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n * @flow\n */\n\nimport slugify from 'utils/slugify';\n\nconst toAnchor = (href: string = ''): string => {\n const index = href.indexOf('#');\n return index >= 0 ? href.substr(index) : '';\n};\n\n// TODO Account for redirect_from URLs somehow; they currently won't match.\n// This comment should not be true anymore since we're using 300 redirects\n\ntype Item = {\n id: string,\n href: string,\n};\n\nconst isItemActive = (location: Location, item: Item, directory): boolean => {\n if (item.href) {\n let pathname = location.pathname;\n let startIndex = pathname.indexOf('/zh/');\n let endIndex = pathname.lastIndexOf('/');\n if (startIndex == -1) {\n startIndex = pathname.indexOf('/en/');\n if (startIndex == -1) {\n startIndex = 0;\n }\n }\n if (endIndex != pathname.length - 1) {\n endIndex = pathname.length;\n }\n const currentPath = pathname.substring(startIndex, endIndex);\n if (currentPath === (directory + '/' + item.href)) {\n return true;\n }\n } else if (item.id.includes('html')) {\n return location.pathname.includes(item.id);\n }\n const pathArray = location.pathname.split('/');\n const slugId = pathArray.slice(pathArray.length - 2)[0];\n return slugId === slugify(item.id);\n};\n\nexport default isItemActive;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n * @flow\n */\n\nimport Flex from 'components/Flex';\nimport React from 'react';\nimport {colors, fonts, media} from 'theme';\n\nconst MarkdownHeader = ({title}: {title: string}) => (\n \n \n {title}\n \n \n);\n\nexport default MarkdownHeader;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n */\n\nimport StickyResponsiveSidebar from './StickyResponsiveSidebar';\n\nexport default StickyResponsiveSidebar;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n * @flow\n */\n\nimport React from 'react';\n\nimport type {Node} from 'react';\n\nconst addString = (list: Array, string: string) =>\n list.push({string});\n\nconst toCommaSeparatedList = (\n array: Array,\n renderCallback: Function,\n): Array => {\n if (array.length <= 1) {\n return array.map(renderCallback);\n }\n\n const list = [];\n\n array.forEach((item, index) => {\n if (index === array.length - 1) {\n addString(list, array.length === 2 ? ' and ' : ', and ');\n list.push(renderCallback(item, index));\n } else if (index > 0) {\n addString(list, ', ');\n list.push(renderCallback(item, index));\n } else {\n list.push(renderCallback(item, index));\n }\n });\n\n return list;\n};\n\nexport default toCommaSeparatedList;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n */\n\nimport Sidebar from './Sidebar';\n\nexport default Sidebar;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n */\n\nimport MarkdownPage from 'components/MarkdownPage';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport {graphql} from 'gatsby';\nimport Layout from 'components/Layout';\nimport {createLinkDocs} from 'utils/createLink';\nimport {sectionListTopics_en, sectionListTopics_zh} from 'utils/sectionList';\n\nconst Topics = ({data, location}) => {\n let sectionListDocs = sectionListTopics_en;\n if (data.markdownRemark.fields.langKey === 'zh') {\n sectionListDocs = sectionListTopics_zh;\n }\n console.log('docs data');\n console.log(data.markdownRemark);\n return (\n \n \n \n );\n};\n\nTopics.propTypes = {\n data: PropTypes.object.isRequired,\n};\n\nexport const pageQuery = graphql`\n query TemplateTopicsMarkdown($slug: String!) {\n markdownRemark(fields: {slug: {eq: $slug}}) {\n html\n frontmatter {\n title\n next\n prev\n }\n fields {\n path\n slug\n langKey\n }\n }\n }\n`;\n\nexport default Topics;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n */\n\nimport Container from 'components/Container';\nimport Flex from 'components/Flex';\nimport {Link} from 'gatsby';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport {colors, fonts, media} from 'theme';\n\nconst NavigationFooter = ({next, prev, location}) => {\n return (\n \n \n \n \n {prev && (\n
\n Previous article\n \n \n {prev.title}\n \n
\n \n )}\n
\n {next && (\n \n
\n Next article\n \n \n {next.title}\n \n
\n \n \n )}\n \n
\n \n );\n};\n\nNavigationFooter.propTypes = {\n next: PropTypes.shape({\n id: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n }),\n prev: PropTypes.shape({\n id: PropTypes.string.isRequired,\n title: PropTypes.string.isRequired,\n }),\n};\n\nexport default NavigationFooter;\n\nconst PrimaryLink = ({children, to, location}) => {\n // quick fix\n // TODO: replace this with better method of getting correct full url\n const updatedUrl =\n (location && location.pathname.replace(/\\/[^/]+\\.html/, '/' + to)) || to;\n return (\n \n {children}\n \n );\n};\n\nconst SecondaryLabel = ({children}) => (\n \n {children}\n \n);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the CC-BY-4.0 license found\n * in the LICENSE file in the root directory of this source tree.\n *\n * @emails react-core\n */\n\nimport React, {Component} from 'react';\nimport Section from './Section';\n\nclass ScrollSyncSection extends Component {\n constructor(props, context) {\n super(props, context);\n\n this.state = {\n activeItemId: '',\n itemTopOffsets: [],\n };\n\n this.calculateItemTopOffsets = this.calculateItemTopOffsets.bind(this);\n this.handleResize = this.handleResize.bind(this);\n this.handleScroll = this.handleScroll.bind(this);\n }\n\n componentDidMount() {\n this.calculateItemTopOffsets();\n\n window.addEventListener('resize', this.handleResize);\n window.addEventListener('scroll', this.handleScroll);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.handleResize);\n window.removeEventListener('scroll', this.handleScroll);\n }\n\n calculateItemTopOffsets() {\n const {section} = this.props;\n\n const itemIds = _getItemIds(section.items);\n this.setState({\n itemTopOffsets: _getElementTopOffsetsById(itemIds),\n });\n }\n\n handleResize() {\n this.calculateItemTopOffsets();\n this.handleScroll();\n }\n\n handleScroll() {\n const {itemTopOffsets} = this.state;\n const item = itemTopOffsets.find((itemTopOffset, i) => {\n const nextItemTopOffset = itemTopOffsets[i + 1];\n if (nextItemTopOffset) {\n return (\n window.scrollY >= itemTopOffset.offsetTop &&\n window.scrollY < nextItemTopOffset.offsetTop\n );\n }\n return window.scrollY >= itemTopOffset.offsetTop;\n });\n this.setState({\n activeItemId: item ? item.id : '',\n });\n }\n\n render() {\n const {activeItemId} = this.state;\n return
;\n }\n}\n\nconst _getItemIds = items =>\n items\n .map(item => {\n let subItemIds = [];\n if (item.subitems) {\n subItemIds = item.subitems.map(subitem => subitem.id);\n }\n return [item.id, ...subItemIds];\n })\n .reduce((prev, current) => prev.concat(current));\n\nconst _getElementTopOffsetsById = ids =>\n ids\n .map(id => {\n const element = document.getElementById(id);\n if (!element) {\n return null;\n }\n return {\n id,\n offsetTop: element.offsetTop,\n };\n })\n .filter(item => item);\n\nexport default ScrollSyncSection;\n","require(\"core-js/modules/es6.regexp.constructor\");\n\nrequire(\"core-js/modules/es6.regexp.split\");\n\nrequire(\"core-js/modules/es6.array.reduce\");\n\nrequire(\"core-js/modules/es6.string.trim\");\n\nrequire(\"core-js/modules/es6.regexp.replace\");\n\n;\n\n(function (name, root, factory) {\n if (typeof exports === 'object') {\n module.exports = factory();\n module.exports['default'] = factory();\n }\n /* istanbul ignore next */\n else if (typeof define === 'function' && define.amd) {\n define(factory);\n } else {\n root[name] = factory();\n }\n})('slugify', this, function () {\n var charMap = JSON.parse('{\"$\":\"dollar\",\"%\":\"percent\",\"&\":\"and\",\"<\":\"less\",\">\":\"greater\",\"|\":\"or\",\"¢\":\"cent\",\"£\":\"pound\",\"¤\":\"currency\",\"¥\":\"yen\",\"©\":\"(c)\",\"ª\":\"a\",\"®\":\"(r)\",\"º\":\"o\",\"À\":\"A\",\"Á\":\"A\",\"Â\":\"A\",\"Ã\":\"A\",\"Ä\":\"A\",\"Å\":\"A\",\"Æ\":\"AE\",\"Ç\":\"C\",\"È\":\"E\",\"É\":\"E\",\"Ê\":\"E\",\"Ë\":\"E\",\"Ì\":\"I\",\"Í\":\"I\",\"Î\":\"I\",\"Ï\":\"I\",\"Ð\":\"D\",\"Ñ\":\"N\",\"Ò\":\"O\",\"Ó\":\"O\",\"Ô\":\"O\",\"Õ\":\"O\",\"Ö\":\"O\",\"Ø\":\"O\",\"Ù\":\"U\",\"Ú\":\"U\",\"Û\":\"U\",\"Ü\":\"U\",\"Ý\":\"Y\",\"Þ\":\"TH\",\"ß\":\"ss\",\"à\":\"a\",\"á\":\"a\",\"â\":\"a\",\"ã\":\"a\",\"ä\":\"a\",\"å\":\"a\",\"æ\":\"ae\",\"ç\":\"c\",\"è\":\"e\",\"é\":\"e\",\"ê\":\"e\",\"ë\":\"e\",\"ì\":\"i\",\"í\":\"i\",\"î\":\"i\",\"ï\":\"i\",\"ð\":\"d\",\"ñ\":\"n\",\"ò\":\"o\",\"ó\":\"o\",\"ô\":\"o\",\"õ\":\"o\",\"ö\":\"o\",\"ø\":\"o\",\"ù\":\"u\",\"ú\":\"u\",\"û\":\"u\",\"ü\":\"u\",\"ý\":\"y\",\"þ\":\"th\",\"ÿ\":\"y\",\"Ā\":\"A\",\"ā\":\"a\",\"Ă\":\"A\",\"ă\":\"a\",\"Ą\":\"A\",\"ą\":\"a\",\"Ć\":\"C\",\"ć\":\"c\",\"Č\":\"C\",\"č\":\"c\",\"Ď\":\"D\",\"ď\":\"d\",\"Đ\":\"DJ\",\"đ\":\"dj\",\"Ē\":\"E\",\"ē\":\"e\",\"Ė\":\"E\",\"ė\":\"e\",\"Ę\":\"e\",\"ę\":\"e\",\"Ě\":\"E\",\"ě\":\"e\",\"Ğ\":\"G\",\"ğ\":\"g\",\"Ģ\":\"G\",\"ģ\":\"g\",\"Ĩ\":\"I\",\"ĩ\":\"i\",\"Ī\":\"i\",\"ī\":\"i\",\"Į\":\"I\",\"į\":\"i\",\"İ\":\"I\",\"ı\":\"i\",\"Ķ\":\"k\",\"ķ\":\"k\",\"Ļ\":\"L\",\"ļ\":\"l\",\"Ľ\":\"L\",\"ľ\":\"l\",\"Ł\":\"L\",\"ł\":\"l\",\"Ń\":\"N\",\"ń\":\"n\",\"Ņ\":\"N\",\"ņ\":\"n\",\"Ň\":\"N\",\"ň\":\"n\",\"Ő\":\"O\",\"ő\":\"o\",\"Œ\":\"OE\",\"œ\":\"oe\",\"Ŕ\":\"R\",\"ŕ\":\"r\",\"Ř\":\"R\",\"ř\":\"r\",\"Ś\":\"S\",\"ś\":\"s\",\"Ş\":\"S\",\"ş\":\"s\",\"Š\":\"S\",\"š\":\"s\",\"Ţ\":\"T\",\"ţ\":\"t\",\"Ť\":\"T\",\"ť\":\"t\",\"Ũ\":\"U\",\"ũ\":\"u\",\"Ū\":\"u\",\"ū\":\"u\",\"Ů\":\"U\",\"ů\":\"u\",\"Ű\":\"U\",\"ű\":\"u\",\"Ų\":\"U\",\"ų\":\"u\",\"Ŵ\":\"W\",\"ŵ\":\"w\",\"Ŷ\":\"Y\",\"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ϊ\":\"i\",\"ϋ\":\"y\",\"ό\":\"o\",\"ύ\":\"y\",\"ώ\":\"w\",\"Ё\":\"Yo\",\"Ђ\":\"DJ\",\"Є\":\"Ye\",\"І\":\"I\",\"Ї\":\"Yi\",\"Ј\":\"J\",\"Љ\":\"LJ\",\"Њ\":\"NJ\",\"Ћ\":\"C\",\"Џ\":\"DZ\",\"А\":\"A\",\"Б\":\"B\",\"В\":\"V\",\"Г\":\"G\",\"Д\":\"D\",\"Е\":\"E\",\"Ж\":\"Zh\",\"З\":\"Z\",\"И\":\"I\",\"Й\":\"J\",\"К\":\"K\",\"Л\":\"L\",\"М\":\"M\",\"Н\":\"N\",\"О\":\"O\",\"П\":\"P\",\"Р\":\"R\",\"С\":\"S\",\"Т\":\"T\",\"У\":\"U\",\"Ф\":\"F\",\"Х\":\"H\",\"Ц\":\"C\",\"Ч\":\"Ch\",\"Ш\":\"Sh\",\"Щ\":\"Sh\",\"Ъ\":\"U\",\"Ы\":\"Y\",\"Ь\":\"\",\"Э\":\"E\",\"Ю\":\"Yu\",\"Я\":\"Ya\",\"а\":\"a\",\"б\":\"b\",\"в\":\"v\",\"г\":\"g\",\"д\":\"d\",\"е\":\"e\",\"ж\":\"zh\",\"з\":\"z\",\"и\":\"i\",\"й\":\"j\",\"к\":\"k\",\"л\":\"l\",\"м\":\"m\",\"н\":\"n\",\"о\":\"o\",\"п\":\"p\",\"р\":\"r\",\"с\":\"s\",\"т\":\"t\",\"у\":\"u\",\"ф\":\"f\",\"х\":\"h\",\"ц\":\"c\",\"ч\":\"ch\",\"ш\":\"sh\",\"щ\":\"sh\",\"ъ\":\"u\",\"ы\":\"y\",\"ь\":\"\",\"э\":\"e\",\"ю\":\"yu\",\"я\":\"ya\",\"ё\":\"yo\",\"ђ\":\"dj\",\"є\":\"ye\",\"і\":\"i\",\"ї\":\"yi\",\"ј\":\"j\",\"љ\":\"lj\",\"њ\":\"nj\",\"ћ\":\"c\",\"ѝ\":\"u\",\"џ\":\"dz\",\"Ґ\":\"G\",\"ґ\":\"g\",\"Ғ\":\"GH\",\"ғ\":\"gh\",\"Қ\":\"KH\",\"қ\":\"kh\",\"Ң\":\"NG\",\"ң\":\"ng\",\"Ү\":\"UE\",\"ү\":\"ue\",\"Ұ\":\"U\",\"ұ\":\"u\",\"Һ\":\"H\",\"һ\":\"h\",\"Ә\":\"AE\",\"ә\":\"ae\",\"Ө\":\"OE\",\"ө\":\"oe\",\"฿\":\"baht\",\"ა\":\"a\",\"ბ\":\"b\",\"გ\":\"g\",\"დ\":\"d\",\"ე\":\"e\",\"ვ\":\"v\",\"ზ\":\"z\",\"თ\":\"t\",\"ი\":\"i\",\"კ\":\"k\",\"ლ\":\"l\",\"მ\":\"m\",\"ნ\":\"n\",\"ო\":\"o\",\"პ\":\"p\",\"ჟ\":\"zh\",\"რ\":\"r\",\"ს\":\"s\",\"ტ\":\"t\",\"უ\":\"u\",\"ფ\":\"f\",\"ქ\":\"k\",\"ღ\":\"gh\",\"ყ\":\"q\",\"შ\":\"sh\",\"ჩ\":\"ch\",\"ც\":\"ts\",\"ძ\":\"dz\",\"წ\":\"ts\",\"ჭ\":\"ch\",\"ხ\":\"kh\",\"ჯ\":\"j\",\"ჰ\":\"h\",\"Ẁ\":\"W\",\"ẁ\":\"w\",\"Ẃ\":\"W\",\"ẃ\":\"w\",\"Ẅ\":\"W\",\"ẅ\":\"w\",\"ẞ\":\"SS\",\"Ạ\":\"A\",\"ạ\":\"a\",\"Ả\":\"A\",\"ả\":\"a\",\"Ấ\":\"A\",\"ấ\":\"a\",\"Ầ\":\"A\",\"ầ\":\"a\",\"Ẩ\":\"A\",\"ẩ\":\"a\",\"Ẫ\":\"A\",\"ẫ\":\"a\",\"Ậ\":\"A\",\"ậ\":\"a\",\"Ắ\":\"A\",\"ắ\":\"a\",\"Ằ\":\"A\",\"ằ\":\"a\",\"Ẳ\":\"A\",\"ẳ\":\"a\",\"Ẵ\":\"A\",\"ẵ\":\"a\",\"Ặ\":\"A\",\"ặ\":\"a\",\"Ẹ\":\"E\",\"ẹ\":\"e\",\"Ẻ\":\"E\",\"ẻ\":\"e\",\"Ẽ\":\"E\",\"ẽ\":\"e\",\"Ế\":\"E\",\"ế\":\"e\",\"Ề\":\"E\",\"ề\":\"e\",\"Ể\":\"E\",\"ể\":\"e\",\"Ễ\":\"E\",\"ễ\":\"e\",\"Ệ\":\"E\",\"ệ\":\"e\",\"Ỉ\":\"I\",\"ỉ\":\"i\",\"Ị\":\"I\",\"ị\":\"i\",\"Ọ\":\"O\",\"ọ\":\"o\",\"Ỏ\":\"O\",\"ỏ\":\"o\",\"Ố\":\"O\",\"ố\":\"o\",\"Ồ\":\"O\",\"ồ\":\"o\",\"Ổ\":\"O\",\"ổ\":\"o\",\"Ỗ\":\"O\",\"ỗ\":\"o\",\"Ộ\":\"O\",\"ộ\":\"o\",\"Ớ\":\"O\",\"ớ\":\"o\",\"Ờ\":\"O\",\"ờ\":\"o\",\"Ở\":\"O\",\"ở\":\"o\",\"Ỡ\":\"O\",\"ỡ\":\"o\",\"Ợ\":\"O\",\"ợ\":\"o\",\"Ụ\":\"U\",\"ụ\":\"u\",\"Ủ\":\"U\",\"ủ\":\"u\",\"Ứ\":\"U\",\"ứ\":\"u\",\"Ừ\":\"U\",\"ừ\":\"u\",\"Ử\":\"U\",\"ử\":\"u\",\"Ữ\":\"U\",\"ữ\":\"u\",\"Ự\":\"U\",\"ự\":\"u\",\"Ỳ\":\"Y\",\"ỳ\":\"y\",\"Ỵ\":\"Y\",\"ỵ\":\"y\",\"Ỷ\":\"Y\",\"ỷ\":\"y\",\"Ỹ\":\"Y\",\"ỹ\":\"y\",\"‘\":\"\\'\",\"’\":\"\\'\",\"“\":\"\\\\\\\"\",\"”\":\"\\\\\\\"\",\"†\":\"+\",\"•\":\"*\",\"…\":\"...\",\"₠\":\"ecu\",\"₢\":\"cruzeiro\",\"₣\":\"french franc\",\"₤\":\"lira\",\"₥\":\"mill\",\"₦\":\"naira\",\"₧\":\"peseta\",\"₨\":\"rupee\",\"₩\":\"won\",\"₪\":\"new shequel\",\"₫\":\"dong\",\"€\":\"euro\",\"₭\":\"kip\",\"₮\":\"tugrik\",\"₯\":\"drachma\",\"₰\":\"penny\",\"₱\":\"peso\",\"₲\":\"guarani\",\"₳\":\"austral\",\"₴\":\"hryvnia\",\"₵\":\"cedi\",\"₸\":\"kazakhstani tenge\",\"₹\":\"indian rupee\",\"₽\":\"russian ruble\",\"₿\":\"bitcoin\",\"℠\":\"sm\",\"™\":\"tm\",\"∂\":\"d\",\"∆\":\"delta\",\"∑\":\"sum\",\"∞\":\"infinity\",\"♥\":\"love\",\"元\":\"yuan\",\"円\":\"yen\",\"﷼\":\"rial\"}');\n var locales = JSON.parse('{\"vi\":{\"Đ\":\"D\",\"đ\":\"d\"}}');\n\n function replace(string, options) {\n if (typeof string !== 'string') {\n throw new Error('slugify: string argument expected');\n }\n\n options = typeof options === 'string' ? {\n replacement: options\n } : options || {};\n var locale = locales[options.locale] || {};\n var replacement = options.replacement || '-';\n var slug = string.split('') // replace characters based on charMap\n .reduce(function (result, ch) {\n return result + (locale[ch] || charMap[ch] || ch);\n }, '') // remove not allowed characters\n .replace(options.remove || /[^\\w\\s$*_+~.()'\"!\\-:@]+/g, '') // trim leading/trailing spaces\n .trim() // convert spaces to replacement character\n // also remove duplicates of the replacement character\n .replace(new RegExp('[\\\\s' + replacement + ']+', 'g'), replacement);\n\n if (options.lower) {\n slug = slug.toLowerCase();\n }\n\n if (options.strict) {\n // remove anything besides letters, numbers, and the replacement char\n slug = slug.replace(new RegExp('[^a-zA-Z0-9' + replacement + ']', 'g'), '');\n }\n\n return slug;\n }\n\n replace.extend = function (customMap) {\n for (var key in customMap) {\n charMap[key] = customMap[key];\n }\n };\n\n return replace;\n});","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n * @flow\n */\n\nimport { Link } from 'gatsby';\nimport React from 'react';\nimport ExternalLinkSvg from 'templates/components/ExternalLinkSvg';\nimport slugify from 'utils/slugify';\nimport { colors, media } from 'theme';\n\nimport type { Node } from 'react';\n\ntype CreateLinkBaseProps = {\n isActive: boolean,\n item: Object,\n section: Object,\n};\n\nconst createLinkBlog = ({\n isActive,\n item,\n section,\n}: CreateLinkBaseProps): Node => {\n if (item.href) {\n return (\n \n {item.title}\n \n );\n }\n return (\n \n {isActive && }\n {item.title}\n \n );\n};\n\nconst createLinkCommunity = ({\n isActive,\n item,\n section,\n}: CreateLinkBaseProps): Node => {\n if (item.href) {\n return (\n \n {item.title}\n \n \n );\n }\n return createLinkDocs({\n isActive,\n item,\n section,\n });\n};\n\nconst createLinkDocs = ({\n isActive,\n item,\n section,\n}: CreateLinkBaseProps): Node => {\n let href = item.href ? section.directory + '/' + item.href : slugify(item.id, section.directory);\n return (\n \n {isActive && }\n {item.title}\n \n );\n};\n\ntype CreateLinkTutorialProps = {\n onLinkClick: Function,\n} & CreateLinkBaseProps;\n\nconst createLinkTutorial = ({\n isActive,\n item,\n onLinkClick,\n section,\n}: CreateLinkTutorialProps): Node => {\n let href = item.href ? section.directory + '/' + item.href : slugify(item.id, section.directory);\n return (\n \n {isActive && }\n {item.title}\n \n );\n};\n\nconst createLinkTerms = ({\n isActive,\n item,\n section,\n}: CreateLinkBaseProps): Node => {\n if (item.href) {\n return (\n \n {item.title}\n \n );\n }\n return createLinkDocs({\n isActive,\n item,\n section,\n });\n};\n\nconst createLinkapi = ({\n isActive,\n item,\n section,\n}: CreateLinkBaseProps): Node => {\n let href = item.href ? section.directory + '/' + item.href : slugify(item.id, section.directory);\n return (\n \n {isActive && }\n {item.title}\n \n );\n};\n\nconst activeLinkCss = {\n fontWeight: 700,\n color: colors.linkblue,\n};\n\nconst activeLinkBefore = {\n width: 4,\n height: 25,\n borderLeft: `4px solid ${colors.linkblue}`,\n paddingLeft: 16,\n position: 'absolute',\n left: -15,\n};\n\nconst linkCss = {\n color: colors.text,\n display: 'inline-block',\n borderBottom: '1px solid transparent',\n transition: 'border 0.2s ease',\n fontSize: '16px', //定义侧目录二级标题的字体\n marginTop: 5,\n fontweight: 700,\n\n '&:hover': {\n color: colors.linkblue,\n },\n};\n\nexport {\n createLinkBlog,\n createLinkCommunity,\n createLinkDocs,\n createLinkTutorial,\n createLinkTerms,\n createLinkapi,\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n * @flow\n */\n\nimport React from 'react';\n\ntype Props = {\n size: number,\n cssProps: Object,\n};\n\nconst ChevronSvg = ({size = 10, cssProps = {}}: Props) => (\n \n \n \n \n \n);\n\nexport default ChevronSvg;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n * @flow\n */\n\nimport Container from 'components/Container';\nimport Flex from 'components/Flex';\nimport MarkdownHeader from 'components/MarkdownHeader';\nimport NavigationFooter from 'templates/components/NavigationFooter';\nimport React from 'react';\nimport StickyResponsiveSidebar from 'components/StickyResponsiveSidebar';\nimport TitleAndMetaTags from 'components/TitleAndMetaTags';\nimport findSectionForPath from 'utils/findSectionForPath';\nimport toCommaSeparatedList from 'utils/toCommaSeparatedList';\nimport {sharedStyles} from 'theme';\nimport createOgUrl from 'utils/createOgUrl';\nimport TOC from 'components/TOC.js';\n\nimport DownloadPDF from './DownloadPDF';\nimport type {Node} from 'types';\n\ntype Props = {\n authors: Array,\n createLink: Function, // TODO: Add better flow type once we Flow-type createLink\n date?: string,\n enableScrollSync?: boolean,\n ogDescription: string,\n location: Location,\n markdownRemark: Node,\n sectionList: Array, // TODO: Add better flow type once we have the Section component\n titlePostfix: string,\n hasCurTOC: Boolean,\n};\n\n// const getPageById = (sectionList: Array, templateFile: ?string) => {\n// if (!templateFile) {\n// return null;\n// }\n\n// const sectionItems = sectionList.map(section => section.items);\n// const flattenedSectionItems = [].concat.apply([], sectionItems);\n// const linkId = templateFile.replace('.html', '');\n\n// return flattenedSectionItems.find(item => item.id === linkId);\n// };\n\nconst MarkdownPage = ({\n authors = [],\n createLink,\n date,\n enableScrollSync,\n ogDescription,\n location,\n markdownRemark,\n sectionList,\n titlePostfix = '-SuperMap',\n hasCurTOC = true,\n}: Props) => {\n const hasAuthors = authors.length > 0;\n const titlePrefix = markdownRemark.frontmatter.title || '';\n\n // const prev = getPageById(sectionList, markdownRemark.frontmatter.prev);\n // const next = getPageById(sectionList, markdownRemark.frontmatter.next);\n // console.log(markdownRemark.html);\n\n return (\n \n \n
\n \n
\n
\n \n
\n \n \n\n {(date || hasAuthors) && (\n
\n {date}{' '}\n {hasAuthors && (\n \n by{' '}\n {toCommaSeparatedList(authors, author => (\n \n {author.frontmatter.name}\n \n ))}\n \n )}\n
\n )}\n\n
\n {/* */}\n
\n\n {markdownRemark.fields.path && (\n
\n \n {/* Edit this page // 注释掉编辑此页的内容 */}\n \n
\n )}\n
\n \n {hasCurTOC?
\n \n
:null}\n \n
\n \n
\n\n {/* {(next || prev) && (\n \n )} */}\n \n );\n};\n\nexport default MarkdownPage;\n\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n * @flow\n */\n\nimport slugify from './slugify';\n\n/**\n * Helper method to locate the section containing the current URL/path.\n * This method specifically works with the nav_*.yml format.\n */\n\ntype Item = {\n id: string,\n subitems: Array,\n};\n\ntype Section = {\n items: Array,\n};\n\nconst findSectionForPath = (\n pathname: string,\n sections: Array
,\n): Section | void => {\n let activeSection;\n const pathArray = pathname.split('/');\n const index = pathArray.length - 2;\n const slugId = pathArray.slice(index)[0];\n\n let startIndex = pathname.indexOf('/zh/');\n let endIndex = pathname.lastIndexOf('/');\n if (startIndex == -1) {\n startIndex = pathname.indexOf('/en/');\n if (startIndex == -1) {\n startIndex = 0;\n }\n }\n if (endIndex != pathname.length - 1) {\n endIndex = pathname.length;\n }\n const currentPath = pathname.substring(startIndex, endIndex);\n\n function hasMatch(items, directory) {\n return items.some(\n item => (item.href && currentPath === (directory + '/' + item.href)) || slugId === slugify(item.id) ||\n (item.subitems && hasMatch(item.subitems, directory))\n );\n };\n\n sections.forEach(section => {\n const match = hasMatch(section.items, section.directory);\n if (match) {\n activeSection = section;\n }\n });\n\n return activeSection;\n};\n\nexport default findSectionForPath;\n","module.exports = {\n // Where to render the table of contents.\n tocSelector: '.js-toc',\n // Where to grab the headings to build the table of contents.\n contentSelector: '.js-toc-content',\n // Which headings to grab inside of the contentSelector element.\n headingSelector: 'h1, h2, h3',\n // Headings that match the ignoreSelector will be skipped.\n ignoreSelector: '.js-toc-ignore',\n // For headings inside relative or absolute positioned containers within content\n hasInnerContainers: false,\n // Main class to add to links.\n linkClass: 'toc-link',\n // Extra classes to add to links.\n extraLinkClasses: '',\n // Class to add to active links,\n // the link corresponding to the top most heading on the page.\n activeLinkClass: 'is-active-link',\n // Main class to add to lists.\n listClass: 'toc-list',\n // Extra classes to add to lists.\n extraListClasses: '',\n // Class that gets added when a list should be collapsed.\n isCollapsedClass: 'is-collapsed',\n // Class that gets added when a list should be able\n // to be collapsed but isn't necessarily collapsed.\n collapsibleClass: 'is-collapsible',\n // Class to add to list items.\n listItemClass: 'toc-list-item',\n // Class to add to active list items.\n activeListItemClass: 'is-active-li',\n // How many heading levels should not be collapsed.\n // For example, number 6 will show everything since\n // there are only 6 heading levels and number 0 will collapse them all.\n // The sections that are hidden will open\n // and close as you scroll to headings within them.\n collapseDepth: 0,\n // Smooth scrolling enabled.\n scrollSmooth: true,\n // Smooth scroll duration.\n scrollSmoothDuration: 420,\n // Smooth scroll offset.\n scrollSmoothOffset: 0,\n // Callback for scroll end.\n scrollEndCallback: function scrollEndCallback(e) {},\n // Headings offset between the headings and the top of the document (this is meant for minor adjustments).\n headingsOffset: 1,\n // Timeout between events firing to make sure it's\n // not too rapid (for performance reasons).\n throttleTimeout: 50,\n // Element to add the positionFixedClass to.\n positionFixedSelector: null,\n // Fixed position class to add to make sidebar fixed after scrolling\n // down past the fixedSidebarOffset.\n positionFixedClass: 'is-position-fixed',\n // fixedSidebarOffset can be any number but by default is set\n // to auto which sets the fixedSidebarOffset to the sidebar\n // element's offsetTop from the top of the document on init.\n fixedSidebarOffset: 'auto',\n // includeHtml can be set to true to include the HTML markup from the\n // heading node instead of just including the textContent.\n includeHtml: false,\n // onclick function to apply to all links in toc. will be called with\n // the event as the first parameter, and this can be used to stop,\n // propagation, prevent default or perform action\n onClick: false,\n // orderedList can be set to false to generate unordered lists (ul)\n // instead of ordered lists (ol)\n orderedList: true,\n // If there is a fixed article scroll container, set to calculate titles' offset\n scrollContainer: null,\n // prevent ToC DOM rendering if it's already rendered by an external system\n skipRendering: false,\n // Optional callback to change heading labels.\n // For example it can be used to cut down and put ellipses on multiline headings you deem too long.\n // Called each time a heading is parsed. Expects a string in return, the modified label to display.\n // function (string) => string\n headingLabelCallback: false,\n // ignore headings that are hidden in DOM\n ignoreHiddenElements: false,\n // Optional callback to modify properties of parsed headings.\n // The heading element is passed in node parameter and information parsed by default parser is provided in obj parameter.\n // Function has to return the same or modified obj.\n // The heading will be excluded from TOC if nothing is returned.\n // function (object, HTMLElement) => object | void\n headingObjectCallback: null\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n */\n\nimport MarkdownHeader from './MarkdownHeader';\n\nexport default MarkdownHeader;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n * @flow\n */\n\nimport {urlRoot} from 'site-constants';\n\nexport default (slug: string): string | null =>\n slug == null ? null : `${urlRoot}/${slug.replace(/^\\//, '')}`;\n","/**\n * Tocbot\n * Tocbot creates a toble of contents based on HTML headings on a page,\n * this allows users to easily jump to different sections of the document.\n * Tocbot was inspired by tocify (http://gregfranko.com/jquery.tocify.js/).\n * The main differences are that it works natively without any need for jquery or jquery UI).\n *\n * @author Tim Scanlin\n */\n\n/* globals define */\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n define([], factory(root));\n } else if (typeof exports === 'object') {\n module.exports = factory(root);\n } else {\n root.tocbot = factory(root);\n }\n})(typeof global !== 'undefined' ? global : this.window || this.global, function (root) {\n 'use strict'; // Default options.\n\n var defaultOptions = require('./default-options.js'); // Object to store current options.\n\n\n var options = {}; // Object for public APIs.\n\n var tocbot = {};\n\n var BuildHtml = require('./build-html.js');\n\n var ParseContent = require('./parse-content.js'); // Keep these variables at top scope once options are passed in.\n\n\n var buildHtml;\n var parseContent; // Just return if its not a browser.\n\n var supports = !!root && !!root.document && !!root.document.querySelector && !!root.addEventListener; // Feature test\n\n if (typeof window === 'undefined' && !supports) {\n return;\n }\n\n var headingsArray; // From: https://github.com/Raynos/xtend\n\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n function extend() {\n var target = {};\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n } // From: https://remysharp.com/2010/07/21/throttling-function-calls\n\n\n function throttle(fn, threshhold, scope) {\n threshhold || (threshhold = 250);\n var last;\n var deferTimer;\n return function () {\n var context = scope || this;\n var now = +new Date();\n var args = arguments;\n\n if (last && now < last + threshhold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshhold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n }\n /**\n * Destroy tocbot.\n */\n\n\n tocbot.destroy = function () {\n if (!options.skipRendering) {\n // Clear HTML.\n try {\n document.querySelector(options.tocSelector).innerHTML = '';\n } catch (e) {\n console.warn('Element not found: ' + options.tocSelector); // eslint-disable-line\n }\n } // Remove event listeners.\n\n\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n document.querySelector(options.scrollContainer).removeEventListener('scroll', this._scrollListener, false);\n document.querySelector(options.scrollContainer).removeEventListener('resize', this._scrollListener, false);\n\n if (buildHtml) {\n document.querySelector(options.scrollContainer).removeEventListener('click', this._clickListener, false);\n }\n } else {\n document.removeEventListener('scroll', this._scrollListener, false);\n document.removeEventListener('resize', this._scrollListener, false);\n\n if (buildHtml) {\n document.removeEventListener('click', this._clickListener, false);\n }\n }\n };\n /**\n * Initialize tocbot.\n * @param {object} customOptions\n */\n\n\n tocbot.init = function (customOptions) {\n // feature test\n if (!supports) {\n return;\n } // Merge defaults with user options.\n // Set to options variable at the top.\n\n\n options = extend(defaultOptions, customOptions || {});\n this.options = options;\n this.state = {}; // Init smooth scroll if enabled (default).\n\n if (options.scrollSmooth) {\n options.duration = options.scrollSmoothDuration;\n options.offset = options.scrollSmoothOffset;\n tocbot.scrollSmooth = require('./scroll-smooth').initSmoothScrolling(options);\n } // Pass options to these modules.\n\n\n buildHtml = BuildHtml(options);\n parseContent = ParseContent(options); // For testing purposes.\n\n this._buildHtml = buildHtml;\n this._parseContent = parseContent; // Destroy it if it exists first.\n\n tocbot.destroy(); // Get headings array.\n\n headingsArray = parseContent.selectHeadings(options.contentSelector, options.headingSelector); // Return if no headings are found.\n\n if (headingsArray === null) {\n return;\n } // Build nested headings array.\n\n\n var nestedHeadingsObj = parseContent.nestHeadingsArray(headingsArray);\n var nestedHeadings = nestedHeadingsObj.nest; // Render.\n\n if (!options.skipRendering) {\n buildHtml.render(options.tocSelector, nestedHeadings);\n } // Update Sidebar and bind listeners.\n\n\n this._scrollListener = throttle(function (e) {\n buildHtml.updateToc(headingsArray);\n var isTop = e && e.target && e.target.scrollingElement && e.target.scrollingElement.scrollTop === 0;\n\n if (e && (e.eventPhase === 0 || e.currentTarget === null) || isTop) {\n buildHtml.updateToc(headingsArray);\n\n if (options.scrollEndCallback) {\n options.scrollEndCallback(e);\n }\n }\n }, options.throttleTimeout);\n\n this._scrollListener();\n\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n document.querySelector(options.scrollContainer).addEventListener('scroll', this._scrollListener, false);\n document.querySelector(options.scrollContainer).addEventListener('resize', this._scrollListener, false);\n } else {\n document.addEventListener('scroll', this._scrollListener, false);\n document.addEventListener('resize', this._scrollListener, false);\n } // Bind click listeners to disable animation.\n\n\n var timeout = null;\n this._clickListener = throttle(function (event) {\n if (options.scrollSmooth) {\n buildHtml.disableTocAnimation(event);\n }\n\n buildHtml.updateToc(headingsArray); // Timeout to re-enable the animation.\n\n timeout && clearTimeout(timeout);\n timeout = setTimeout(function () {\n buildHtml.enableTocAnimation();\n }, options.scrollSmoothDuration);\n }, options.throttleTimeout);\n\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n document.querySelector(options.scrollContainer).addEventListener('click', this._clickListener, false);\n } else {\n document.addEventListener('click', this._clickListener, false);\n }\n\n return this;\n };\n /**\n * Refresh tocbot.\n */\n\n\n tocbot.refresh = function (customOptions) {\n tocbot.destroy();\n tocbot.init(customOptions || this.options);\n }; // Make tocbot available globally.\n\n\n root.tocbot = tocbot;\n return tocbot;\n});","import React from 'react';\nimport PropTypes from 'prop-types';\nimport tocbot from 'tocbot';\nimport {FormattedMessage} from 'react-intl';\n\nclass TOC extends React.Component {\n componentDidMount() {\n tocbot.init({\n // Where to render the table of contents.\n tocSelector: `#artile_TocListContainer`,\n // Where to grab the headings to build the table of contents.\n contentSelector: `#article_Content`,\n // Which headings to grab inside of the contentSelector element.\n headingSelector: `h2, h3`,\n headingsOffset: parseInt(this.props.headingsOffset),\n \n })\n }\n\n render() {\n return (\n \n )\n }\n}\n\nTOC.defaultProps = {\n headingsOffset: `5`,\n showHeading: true,\n}\n\nTOC.propTypes = {\n headingsOffset: PropTypes.string,\n className: PropTypes.string,\n listClasses: PropTypes.string,\n showHeading: PropTypes.bool,\n}\n\nexport default TOC\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n */\n\nimport React from 'react';\nimport { colors, media } from 'theme';\nimport isItemActive from 'utils/isItemActive';\nimport MetaTitle from '../MetaTitle';\nimport ChevronSvg from '../ChevronSvg';\n\nclass Section extends React.Component {\n state = { uid: ('' + Math.random()).replace(/\\D/g, '') };\n\n renderSectionItems(items) {\n const {\n activeItemId,\n createLink,\n isActive,\n isScrollSync,\n location,\n onLinkClick,\n onSectionTitleClick,\n section,\n } = this.props;\n const uid = 'section_' + this.state.uid;\n return (\n \n {items.map((item, index) => (\n \n {createLink({\n isActive: isScrollSync\n ? activeItemId === item.id\n : isItemActive(location, item, section.directory),\n item: section.isOrdered\n ? { ...item, title: `${index + 1}. ${item.title}` }\n : item,\n location,\n onLinkClick,\n section,\n })}\n\n {item.subitems && (\n this.renderSectionItems(item.subitems)\n )}\n \n ))}\n \n )\n }\n\n render() {\n const {\n activeItemId,\n createLink,\n isActive,\n isScrollSync,\n location,\n onLinkClick,\n onSectionTitleClick,\n section,\n } = this.props;\n const uid = 'section_' + this.state.uid;\n return (\n
\n \n \n {section.title}\n \n \n \n {\n this.renderSectionItems(section.items)\n }\n
\n );\n }\n}\nexport default Section;\n","require(\"core-js/modules/es6.regexp.replace\");\n\nrequire(\"core-js/modules/es6.regexp.split\");\n\nrequire(\"core-js/modules/es6.array.index-of\");\n\nrequire(\"core-js/modules/es6.array.some\");\n\nrequire(\"core-js/modules/es6.array.for-each\");\n\n/**\n * This file is responsible for building the DOM and updating DOM state.\n *\n * @author Tim Scanlin\n */\nmodule.exports = function (options) {\n var forEach = [].forEach;\n var some = [].some;\n var body = document.body;\n var currentlyHighlighting = true;\n var SPACE_CHAR = ' ';\n /**\n * Create link and list elements.\n * @param {Object} d\n * @param {HTMLElement} container\n * @return {HTMLElement}\n */\n\n function createEl(d, container) {\n var link = container.appendChild(createLink(d));\n\n if (d.children.length) {\n var list = createList(d.isCollapsed);\n d.children.forEach(function (child) {\n createEl(child, list);\n });\n link.appendChild(list);\n }\n }\n /**\n * Render nested heading array data into a given selector.\n * @param {String} selector\n * @param {Array} data\n * @return {HTMLElement}\n */\n\n\n function render(selector, data) {\n var collapsed = false;\n var container = createList(collapsed);\n data.forEach(function (d) {\n createEl(d, container);\n });\n var parent = document.querySelector(selector); // Return if no parent is found.\n\n if (parent === null) {\n return;\n } // Remove existing child if it exists.\n\n\n if (parent.firstChild) {\n parent.removeChild(parent.firstChild);\n } // Just return the parent and don't append the list if no links are found.\n\n\n if (data.length === 0) {\n return parent;\n } // Append the Elements that have been created\n\n\n return parent.appendChild(container);\n }\n /**\n * Create link element.\n * @param {Object} data\n * @return {HTMLElement}\n */\n\n\n function createLink(data) {\n var item = document.createElement('li');\n var a = document.createElement('a');\n\n if (options.listItemClass) {\n item.setAttribute('class', options.listItemClass);\n }\n\n if (options.onClick) {\n a.onclick = options.onClick;\n }\n\n if (options.includeHtml && data.childNodes.length) {\n forEach.call(data.childNodes, function (node) {\n a.appendChild(node.cloneNode(true));\n });\n } else {\n // Default behavior.\n a.textContent = data.textContent;\n }\n\n a.setAttribute('href', '#' + data.id);\n a.setAttribute('class', options.linkClass + SPACE_CHAR + 'node-name--' + data.nodeName + SPACE_CHAR + options.extraLinkClasses);\n item.appendChild(a);\n return item;\n }\n /**\n * Create list element.\n * @param {Boolean} isCollapsed\n * @return {HTMLElement}\n */\n\n\n function createList(isCollapsed) {\n var listElement = options.orderedList ? 'ol' : 'ul';\n var list = document.createElement(listElement);\n var classes = options.listClass + SPACE_CHAR + options.extraListClasses;\n\n if (isCollapsed) {\n classes += SPACE_CHAR + options.collapsibleClass;\n classes += SPACE_CHAR + options.isCollapsedClass;\n }\n\n list.setAttribute('class', classes);\n return list;\n }\n /**\n * Update fixed sidebar class.\n * @return {HTMLElement}\n */\n\n\n function updateFixedSidebarClass() {\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n var top;\n top = document.querySelector(options.scrollContainer).scrollTop;\n } else {\n top = document.documentElement.scrollTop || body.scrollTop;\n }\n\n var posFixedEl = document.querySelector(options.positionFixedSelector);\n\n if (options.fixedSidebarOffset === 'auto') {\n options.fixedSidebarOffset = document.querySelector(options.tocSelector).offsetTop;\n }\n\n if (top > options.fixedSidebarOffset) {\n if (posFixedEl.className.indexOf(options.positionFixedClass) === -1) {\n posFixedEl.className += SPACE_CHAR + options.positionFixedClass;\n }\n } else {\n posFixedEl.className = posFixedEl.className.split(SPACE_CHAR + options.positionFixedClass).join('');\n }\n }\n /**\n * Get top position of heading\n * @param {HTMLElement}\n * @return {integer} position\n */\n\n\n function getHeadingTopPos(obj) {\n var position = 0;\n\n if (obj !== document.querySelector(options.contentSelector && obj != null)) {\n position = obj.offsetTop;\n\n if (options.hasInnerContainers) {\n position += getHeadingTopPos(obj.offsetParent);\n }\n }\n\n return position;\n }\n /**\n * Update TOC highlighting and collpased groupings.\n */\n\n\n function updateToc(headingsArray) {\n // If a fixed content container was set\n if (options.scrollContainer && document.querySelector(options.scrollContainer)) {\n var top;\n top = document.querySelector(options.scrollContainer).scrollTop;\n } else {\n top = document.documentElement.scrollTop || body.scrollTop;\n } // Add fixed class at offset\n\n\n if (options.positionFixedSelector) {\n updateFixedSidebarClass();\n } // Get the top most heading currently visible on the page so we know what to highlight.\n\n\n var headings = headingsArray;\n var topHeader; // Using some instead of each so that we can escape early.\n\n if (currentlyHighlighting && document.querySelector(options.tocSelector) !== null && headings.length > 0) {\n some.call(headings, function (heading, i) {\n if (getHeadingTopPos(heading) > top + options.headingsOffset + 10) {\n // Don't allow negative index value.\n var index = i === 0 ? i : i - 1;\n topHeader = headings[index];\n return true;\n } else if (i === headings.length - 1) {\n // This allows scrolling for the last heading on the page.\n topHeader = headings[headings.length - 1];\n return true;\n }\n }); // Remove the active class from the other tocLinks.\n\n var tocLinks = document.querySelector(options.tocSelector).querySelectorAll('.' + options.linkClass);\n forEach.call(tocLinks, function (tocLink) {\n tocLink.className = tocLink.className.split(SPACE_CHAR + options.activeLinkClass).join('');\n });\n var tocLis = document.querySelector(options.tocSelector).querySelectorAll('.' + options.listItemClass);\n forEach.call(tocLis, function (tocLi) {\n tocLi.className = tocLi.className.split(SPACE_CHAR + options.activeListItemClass).join('');\n }); // Add the active class to the active tocLink.\n\n var activeTocLink = document.querySelector(options.tocSelector).querySelector('.' + options.linkClass + '.node-name--' + topHeader.nodeName + '[href=\"#' + topHeader.id.replace(/([ #;&,.+*~':\"!^$[\\]()=>|/@])/g, '\\\\$1') + '\"]');\n\n if (activeTocLink.className.indexOf(options.activeLinkClass) === -1) {\n activeTocLink.className += SPACE_CHAR + options.activeLinkClass;\n }\n\n var li = activeTocLink.parentNode;\n\n if (li && li.className.indexOf(options.activeListItemClass) === -1) {\n li.className += SPACE_CHAR + options.activeListItemClass;\n }\n\n var tocLists = document.querySelector(options.tocSelector).querySelectorAll('.' + options.listClass + '.' + options.collapsibleClass); // Collapse the other collapsible lists.\n\n forEach.call(tocLists, function (list) {\n if (list.className.indexOf(options.isCollapsedClass) === -1) {\n list.className += SPACE_CHAR + options.isCollapsedClass;\n }\n }); // Expand the active link's collapsible list and its sibling if applicable.\n\n if (activeTocLink.nextSibling && activeTocLink.nextSibling.className.indexOf(options.isCollapsedClass) !== -1) {\n activeTocLink.nextSibling.className = activeTocLink.nextSibling.className.split(SPACE_CHAR + options.isCollapsedClass).join('');\n }\n\n removeCollapsedFromParents(activeTocLink.parentNode.parentNode);\n }\n }\n /**\n * Remove collpased class from parent elements.\n * @param {HTMLElement} element\n * @return {HTMLElement}\n */\n\n\n function removeCollapsedFromParents(element) {\n if (element.className.indexOf(options.collapsibleClass) !== -1 && element.className.indexOf(options.isCollapsedClass) !== -1) {\n element.className = element.className.split(SPACE_CHAR + options.isCollapsedClass).join('');\n return removeCollapsedFromParents(element.parentNode.parentNode);\n }\n\n return element;\n }\n /**\n * Disable TOC Animation when a link is clicked.\n * @param {Event} event\n */\n\n\n function disableTocAnimation(event) {\n var target = event.target || event.srcElement;\n\n if (typeof target.className !== 'string' || target.className.indexOf(options.linkClass) === -1) {\n return;\n } // Bind to tocLink clicks to temporarily disable highlighting\n // while smoothScroll is animating.\n\n\n currentlyHighlighting = false;\n }\n /**\n * Enable TOC Animation.\n */\n\n\n function enableTocAnimation() {\n currentlyHighlighting = true;\n }\n\n return {\n enableTocAnimation: enableTocAnimation,\n disableTocAnimation: disableTocAnimation,\n render: render,\n updateToc: updateToc\n };\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n */\n\nimport MarkdownPage from './MarkdownPage';\n\nexport default MarkdownPage;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n * @flow\n */\n\nimport slugify from 'slugify';\n\nexport default (string: string, directory?: string): string => {\n const filename = slugify(string);\n const filenameWithSuffix = slugify(string);\n\n return directory ? `/${directory}/${filename}/` : filenameWithSuffix;\n};\n","'use strict';\nvar $export = require('./_export');\nvar toIObject = require('./_to-iobject');\nvar toInteger = require('./_to-integer');\nvar toLength = require('./_to-length');\nvar $native = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;\n\n$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', {\n // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])\n lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;\n var O = toIObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;\n return -1;\n }\n});\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n */\n\nimport React, {Component} from 'react';\nimport Flex from 'components/Flex';\nimport Section from './Section';\nimport ScrollSyncSection from './ScrollSyncSection';\nimport {media} from 'theme';\n\nclass Sidebar extends Component {\n constructor(props, context) {\n super(props, context);\n\n this.state = {\n activeSection: props.defaultActiveSection,\n };\n }\n\n render() {\n const {\n closeParentMenu,\n createLink,\n enableScrollSync,\n location,\n sectionList,\n } = this.props;\n const {activeSection} = this.state;\n\n const SectionComponent = enableScrollSync ? ScrollSyncSection : Section;\n\n return (\n \n {sectionList.map((section, index) => (\n this._toggleSection(section)}\n section={section}\n />\n ))}\n \n );\n }\n\n _toggleSection(section) {\n this.setState(state => ({\n activeSection: state.activeSection === section ? null : section,\n }));\n }\n}\n\nexport default Sidebar;\n","require(\"core-js/modules/es6.array.map\");\n\nrequire(\"core-js/modules/es6.string.trim\");\n\nrequire(\"core-js/modules/es6.regexp.split\");\n\nrequire(\"core-js/modules/es6.array.reduce\");\n\n/**\n * This file is responsible for parsing the content from the DOM and making\n * sure data is nested properly.\n *\n * @author Tim Scanlin\n */\nmodule.exports = function parseContent(options) {\n var reduce = [].reduce;\n /**\n * Get the last item in an array and return a reference to it.\n * @param {Array} array\n * @return {Object}\n */\n\n function getLastItem(array) {\n return array[array.length - 1];\n }\n /**\n * Get heading level for a heading dom node.\n * @param {HTMLElement} heading\n * @return {Number}\n */\n\n\n function getHeadingLevel(heading) {\n return +heading.nodeName.split('H').join('');\n }\n /**\n * Get important properties from a heading element and store in a plain object.\n * @param {HTMLElement} heading\n * @return {Object}\n */\n\n\n function getHeadingObject(heading) {\n // each node is processed twice by this method because nestHeadingsArray() and addNode() calls it\n // first time heading is real DOM node element, second time it is obj\n // that is causing problem so I am processing only original DOM node\n if (!(heading instanceof window.HTMLElement)) return heading;\n\n if (options.ignoreHiddenElements && (!heading.offsetHeight || !heading.offsetParent)) {\n return null;\n }\n\n var obj = {\n id: heading.id,\n children: [],\n nodeName: heading.nodeName,\n headingLevel: getHeadingLevel(heading),\n textContent: options.headingLabelCallback ? String(options.headingLabelCallback(heading.textContent)) : heading.textContent.trim()\n };\n\n if (options.includeHtml) {\n obj.childNodes = heading.childNodes;\n }\n\n if (options.headingObjectCallback) {\n return options.headingObjectCallback(obj, heading);\n }\n\n return obj;\n }\n /**\n * Add a node to the nested array.\n * @param {Object} node\n * @param {Array} nest\n * @return {Array}\n */\n\n\n function addNode(node, nest) {\n var obj = getHeadingObject(node);\n var level = obj.headingLevel;\n var array = nest;\n var lastItem = getLastItem(array);\n var lastItemLevel = lastItem ? lastItem.headingLevel : 0;\n var counter = level - lastItemLevel;\n\n while (counter > 0) {\n lastItem = getLastItem(array);\n\n if (lastItem && lastItem.children !== undefined) {\n array = lastItem.children;\n }\n\n counter--;\n }\n\n if (level >= options.collapseDepth) {\n obj.isCollapsed = true;\n }\n\n array.push(obj);\n return array;\n }\n /**\n * Select headings in content area, exclude any selector in options.ignoreSelector\n * @param {String} contentSelector\n * @param {Array} headingSelector\n * @return {Array}\n */\n\n\n function selectHeadings(contentSelector, headingSelector) {\n var selectors = headingSelector;\n\n if (options.ignoreSelector) {\n selectors = headingSelector.split(',').map(function mapSelectors(selector) {\n return selector.trim() + ':not(' + options.ignoreSelector + ')';\n });\n }\n\n try {\n return document.querySelector(contentSelector).querySelectorAll(selectors);\n } catch (e) {\n console.warn('Element not found: ' + contentSelector); // eslint-disable-line\n\n return null;\n }\n }\n /**\n * Nest headings array into nested arrays with 'children' property.\n * @param {Array} headingsArray\n * @return {Object}\n */\n\n\n function nestHeadingsArray(headingsArray) {\n return reduce.call(headingsArray, function reducer(prev, curr) {\n var currentHeading = getHeadingObject(curr);\n\n if (currentHeading) {\n addNode(currentHeading, prev.nest);\n }\n\n return prev;\n }, {\n nest: []\n });\n }\n\n return {\n nestHeadingsArray: nestHeadingsArray,\n selectHeadings: selectHeadings\n };\n};","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @emails react-core\n */\n\nimport NavigationFooter from './NavigationFooter';\n\nexport default NavigationFooter;\n","require(\"core-js/modules/es6.regexp.split\");\n\nrequire(\"core-js/modules/es6.array.last-index-of\");\n\nrequire(\"core-js/modules/es6.array.index-of\");\n\n/* globals location, requestAnimationFrame */\nexports.initSmoothScrolling = initSmoothScrolling;\n\nfunction initSmoothScrolling(options) {\n if (isCssSmoothSCrollSupported()) {}\n\n var duration = options.duration;\n var offset = options.offset;\n var pageUrl = location.hash ? stripHash(location.href) : location.href;\n delegatedLinkHijacking();\n\n function delegatedLinkHijacking() {\n document.body.addEventListener('click', onClick, false);\n\n function onClick(e) {\n if (!isInPageLink(e.target) || e.target.className.indexOf('no-smooth-scroll') > -1 || e.target.href.charAt(e.target.href.length - 2) === '#' && e.target.href.charAt(e.target.href.length - 1) === '!' || e.target.className.indexOf(options.linkClass) === -1) {\n return;\n } // Don't prevent default or hash doesn't change.\n // e.preventDefault()\n\n\n jump(e.target.hash, {\n duration: duration,\n offset: offset,\n callback: function callback() {\n setFocus(e.target.hash);\n }\n });\n }\n }\n\n function isInPageLink(n) {\n return n.tagName.toLowerCase() === 'a' && (n.hash.length > 0 || n.href.charAt(n.href.length - 1) === '#') && (stripHash(n.href) === pageUrl || stripHash(n.href) + '#' === pageUrl);\n }\n\n function stripHash(url) {\n return url.slice(0, url.lastIndexOf('#'));\n }\n\n function isCssSmoothSCrollSupported() {\n return 'scrollBehavior' in document.documentElement.style;\n } // Adapted from:\n // https://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/\n\n\n function setFocus(hash) {\n var element = document.getElementById(hash.substring(1));\n\n if (element) {\n if (!/^(?:a|select|input|button|textarea)$/i.test(element.tagName)) {\n element.tabIndex = -1;\n }\n\n element.focus();\n }\n }\n}\n\nfunction jump(target, options) {\n var start = window.pageYOffset;\n var opt = {\n duration: options.duration,\n offset: options.offset || 0,\n callback: options.callback,\n easing: options.easing || easeInOutQuad\n }; // This makes ids that start with a number work: ('[id=\"' + decodeURI(target).split('#').join('') + '\"]')\n // DecodeURI for nonASCII hashes, they was encoded, but id was not encoded, it lead to not finding the tgt element by id.\n // And this is for IE: document.body.scrollTop\n\n var tgt = document.querySelector('[id=\"' + decodeURI(target).split('#').join('') + '\"]');\n var distance = typeof target === 'string' ? opt.offset + (target ? tgt && tgt.getBoundingClientRect().top || 0 // handle non-existent links better.\n : -(document.documentElement.scrollTop || document.body.scrollTop)) : target;\n var duration = typeof opt.duration === 'function' ? opt.duration(distance) : opt.duration;\n var timeStart;\n var timeElapsed;\n requestAnimationFrame(function (time) {\n timeStart = time;\n loop(time);\n });\n\n function loop(time) {\n timeElapsed = time - timeStart;\n window.scrollTo(0, opt.easing(timeElapsed, start, distance, duration));\n\n if (timeElapsed < duration) {\n requestAnimationFrame(loop);\n } else {\n end();\n }\n }\n\n function end() {\n window.scrollTo(0, start + distance);\n\n if (typeof opt.callback === 'function') {\n opt.callback();\n }\n } // Robert Penner's easeInOutQuad - http://robertpenner.com/easing/\n\n\n function easeInOutQuad(t, b, c, d) {\n t /= d / 2;\n if (t < 1) return c / 2 * t * t + b;\n t--;\n return -c / 2 * (t * (t - 2) - 1) + b;\n }\n}","import React from 'react';\nimport {colors, media} from 'theme';\n//import html2canvas from 'html2canvas';\n//import jsPdf from 'jspdf';\n\nclass DownloadPDF extends React.Component {\n\n constructor(props){\n super(props);\n this.downloadPDF = this.downloadPDF.bind(this);\n }\n\n downloadPDF(event) {\n //console.log(\"downloadPDF\");\n //const domElement = document.getElementById('article_Content');\n \n\n //html2canvas(domElement).then((canvas)=>{\n\n //const img = canvas.toDataURL('image/jpeg');\n //console.log(canvas.width+\",\" +canvas.height);\n\n //var HTML_Width = canvas.width;\n //var HTML_Height = canvas.height;\n //var top_left_margin = 20;\n //var PDF_Width = HTML_Width+(top_left_margin*2);\n //var PDF_Height = (PDF_Width*1.5)+(top_left_margin*2);\n //console.log(\"PDF_Width: \"+PDF_Width);\n //console.log(\"PDF_Height: \"+PDF_Height);\n //var canvas_image_width = HTML_Width;\n //var canvas_image_height = HTML_Height;\n \n //var totalPDFPages = Math.ceil(HTML_Height/PDF_Height)-1;\n //console.log(\"totalPDFPages: \"+totalPDFPages);\n\n //var pdf = new jsPdf('p', 'pt', [PDF_Width, PDF_Height]);\n\n //pdf.addImage(img, 'JPG', top_left_margin, top_left_margin,canvas_image_width,canvas_image_height);\n //for (var i = 1; i <= totalPDFPages; i++) { \n //pdf.addPage(PDF_Width, PDF_Height);\n //pdf.addImage(img, 'JPG', top_left_margin, -(PDF_Height*i)+(top_left_margin*4),canvas_image_width,canvas_image_height);\n //}\n //pdf.save(this.props.markdownTitle+'.pdf'); \n //})\n }\n\n render() {\n return (\n
\n {this.props.title}\n
\n )\n }\n \n}\n\nconst style = {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n color: colors.dark,\n transition: 'color 0.2s ease-out',\n paddingLeft: 15,\n paddingRight: 15,\n fontWeight: 300,\n\n ':focus': {\n outline: 0,\n backgroundColor: colors.dark,\n color: colors.white,\n },\n\n [media.size('xsmall')]: {\n paddingLeft: 8,\n paddingRight: 8,\n },\n\n [media.between('small', 'medium')]: {\n paddingLeft: 10,\n paddingRight: 10,\n },\n\n [media.greaterThan('xlarge')]: {\n paddingLeft: 20,\n paddingRight: 20,\n fontSize: 20,\n\n ':hover:not(:focus)': {\n color: colors.brand,\n },\n },\n};\n\n\nexport default DownloadPDF;\n"],"sourceRoot":""}