{"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/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/guides.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":["defaultScrollTop","StickyResponsiveSidebar","props","_openNavMenu","setState","open","state","_closeNavMenu","componentDidMount","latoutNode","document","getElementById","currentClass","location","pathname","split","activeNode","getElementsByClassName","length","parentElement","ariaExpanded","addEventListener","e","scrollTop","target","componentWillUnmount","removeEventListener","render","this","smallScreenSidebarStyles","top","left","bottom","right","position","backgroundColor","colors","white","zIndex","height","overflowY","WebkitOverflowScrolling","pointerEvents","iconOffset","menuOpacity","menuOffset","style","id","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","item","directory","href","startIndex","indexOf","endIndex","lastIndexOf","substring","includes","pathArray","slice","slugify","MarkdownHeader","title","type","halign","valign","dark","marginBottom","fonts","header","addString","list","string","push","key","toCommaSeparatedList","array","renderCallback","map","forEach","index","Sidebar","NavigationFooter","next","prev","background","paddingTop","paddingBottom","paddingRight","basis","SecondaryLabel","PrimaryLink","to","textAlign","propTypes","PropTypes","shape","isRequired","children","updatedUrl","replace","borderColor","subtle","fontSize","borderBottomWidth","borderBottomStyle","small","ScrollSyncSection","context","activeItemId","itemTopOffsets","calculateItemTopOffsets","bind","handleResize","handleScroll","window","section","itemIds","_getItemIds","items","_getElementTopOffsetsById","find","itemTopOffset","i","nextItemTopOffset","scrollY","offsetTop","isScrollSync","subItemIds","subitems","subitem","reduce","current","concat","ids","element","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","rel","verticalAlign","createLinkDocs","createLinkTutorial","onLinkClick","createLinkMicroservices","createLinkTerms","fontWeight","linkblue","borderLeft","text","borderBottom","fontweight","Guides","data","sectionListDocs","sectionListGuides_en","markdownRemark","fields","langKey","sectionListGuides_zh","console","log","createLink","sectionList","object","pageQuery","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","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","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","navHidden","onNavClick","localName","stopPropagation","preventDefault","renderSectionItems","onSectionTitleClick","fontFeatureSettings","userSelect","aria-expanded","isOrdered","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","maxHeight","_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":"sQAiBA,IAAIA,EAAmB,EASjBC,E,+BACJ,WAAYC,GAAe,IAAD,SACxB,cAAMA,IAAN,MAMFC,aAAe,WACb,EAAKC,SAAS,CAAEC,MAAO,EAAKC,MAAMD,QARV,EAW1BE,cAAgB,WACd,EAAKH,SAAS,CAAEC,MAAM,KATtB,EAAKC,MAAQ,CACXD,MAAM,GAJgB,E,2BAe1BG,kBAAA,WAEE,IAAIC,EAAaC,SAASC,eAAe,eACrCC,EAAeC,SAASC,SAASC,MAAM,KAAK,GAC5CC,EAAaN,SAASO,uBAAuBL,GAC7CI,EAAWE,OAAS,IACtBF,EAAW,GAAGG,cAAcA,cAAcA,cAAcC,cAAe,EACvEJ,EAAW,GAAGG,cAAcA,cAAcA,cAAcA,cAAcA,cAAcA,cAAcC,cAAe,GAE/GX,IACFA,EAAWY,iBAAiB,UAAU,SAAAC,GACpCb,EAAWc,UAAYD,EAAEE,OAAOD,aAElCd,EAAWc,UAAYvB,I,EAK3ByB,qBAAA,WAEE,IAAIhB,EAAaC,SAASC,eAAe,eACrCF,IACFA,EAAWiB,oBAAoB,UAAU,SAAAJ,GACvCb,EAAWc,UAAYD,EAAEE,OAAOD,aAElCvB,EAAmBS,EAAWc,Y,EAIlCI,OAAA,WAAU,IAAD,QACCtB,EAASuB,KAAKtB,MAAdD,KACFwB,EAA2B,CAC/BC,IAAK,EACLC,KAAM,EACNC,OAAQ,EACRC,MAAO,EACPC,SAAU,QACVC,gBAAiBC,IAAOC,MACxBC,OAAQ,EACRC,OAAQ,QACRC,UAAW,OACXC,wBAAyB,QACzBC,cAAerC,EAAO,OAAS,QAO3BsC,EAAatC,EAAO,GAAK,EACzBuC,EAAcvC,EAAO,EAAI,EACzBwC,EAAaxC,EAAO,EAAI,GAG9B,OACE,uBAAKyC,MAAO,CAAEP,OAAQ,SACpB,uBAAKQ,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,YApBRY,uBAAsB,SAAUF,GAC9Bf,EAAYe,EACZD,EAAKC,MAxDHG,CAAK/c,EAAEE,OAAOsb,KAAM,CAClBvI,SAAUA,EACVC,OAAQA,EACRgJ,SAAU,WAqBhB,IAAkBV,EACZxS,EADYwS,EApBDxb,EAAEE,OAAOsb,MAqBpBxS,EAAU5J,SAASC,eAAemc,EAAKvX,UAAU,OAG9C,wCAAwC+Y,KAAKhU,EAAQ2S,WACxD3S,EAAQ/F,UAAY,GAGtB+F,EAAQiU,eAzCuC,K,oLCb3B1H,IAAM/R,U,IAmD1BhC,IAAK,GACTkB,QAAS,OACTQ,cAAe,MACfC,WAAY,SACZX,MAAO1B,IAAO6D,KACdhD,WAAY,sBACZM,YAAa,GACbgE,aAAc,GACdoF,WAAY,IAEZ,SAAU,CACRsL,QAAS,EACT9V,gBAAiBC,IAAO6D,KACxBnC,MAAO1B,IAAOC,SAGfc,IAAMM,KAAK,WAAY,CACtBF,YAAa,EACbgE,aAAc,GAlBP,EAqBRpE,IAAMK,QAAQ,QAAS,WAAY,CAClCD,YAAa,GACbgE,aAAc,IAvBP,EA0BRpE,IAAME,YAAY,WAAY,CAC7BE,YAAa,GACbgE,aAAc,GACde,SAAU,GAEV,qBAAsB,CACpBxE,MAAO1B,IAAO2B,QAhCT,K","file":"component---src-templates-guides-js-5444e13bca1746f1a64c.js","sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * @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\nlet defaultScrollTop = 0;\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 _openNavMenu = () => {\n this.setState({ open: !this.state.open });\n };\n\n _closeNavMenu = () => {\n this.setState({ open: false });\n };\n\n componentDidMount() {\n // 组件挂载时将defaultScrollTop赋值滚动条的scrollTop,并记录当前页面\n let latoutNode = document.getElementById(\"navbarclass\");\n let currentClass = location.pathname.split(\"/\")[5];\n let activeNode = document.getElementsByClassName(currentClass);\n if (activeNode.length > 0) {\n activeNode[0].parentElement.parentElement.parentElement.ariaExpanded = true;\n activeNode[0].parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.ariaExpanded = true;\n }\n if (latoutNode) {\n latoutNode.addEventListener(\"scroll\", e => {\n latoutNode.scrollTop = e.target.scrollTop;\n });\n latoutNode.scrollTop = defaultScrollTop;\n }\n\n }\n\n componentWillUnmount() {\n // 组件卸载时移除监听事件,同时拿到defaultScrollTop \n let latoutNode = document.getElementById(\"navbarclass\");\n if (latoutNode) {\n latoutNode.removeEventListener(\"scroll\", e => {\n latoutNode.scrollTop = e.target.scrollTop;\n });\n defaultScrollTop = latoutNode.scrollTop;\n }\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 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\",\"Ė\":\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A\",\"Έ\":\"E\",\"Ή\":\"H\",\"Ί\":\"I\",\"Ό\":\"O\",\"Ύ\":\"Y\",\"Ώ\":\"W\",\"ΐ\":\"i\",\"Α\":\"A\",\"Β\":\"B\",\"Γ\":\"G\",\"Δ\":\"D\",\"Ε\":\"E\",\"Ζ\":\"Z\",\"Η\":\"H\",\"Θ\":\"8\",\"Ι\":\"I\",\"Κ\":\"K\",\"Λ\":\"L\",\"Μ\":\"M\",\"Ν\":\"N\",\"Ξ\":\"3\",\"Ο\":\"O\",\"Π\":\"P\",\"Ρ\":\"R\",\"Σ\":\"S\",\"Τ\":\"T\",\"Υ\":\"Y\",\"Φ\":\"F\",\"Χ\":\"X\",\"Ψ\":\"PS\",\"Ω\":\"W\",\"Ϊ\":\"I\",\"Ϋ\":\"Y\",\"ά\":\"a\",\"έ\":\"e\",\"ή\":\"h\",\"ί\":\"i\",\"ΰ\":\"y\",\"α\":\"a\",\"β\":\"b\",\"γ\":\"g\",\"δ\":\"d\",\"ε\":\"e\",\"ζ\":\"z\",\"η\":\"h\",\"θ\":\"8\",\"ι\":\"i\",\"κ\":\"k\",\"λ\":\"l\",\"μ\":\"m\",\"ν\":\"n\",\"ξ\":\"3\",\"ο\":\"o\",\"π\":\"p\",\"ρ\":\"r\",\"ς\":\"s\",\"σ\":\"s\",\"τ\":\"t\",\"υ\":\"y\",\"φ\":\"f\",\"χ\":\"x\",\"ψ\":\"ps\",\"ω\":\"w\",\"ϊ\":\"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 createLinkMicroservices = ({\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 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 fontweight: 700,\n\n '&:hover': {\n color: colors.linkblue,\n },\n};\n\nexport {\n createLinkBlog,\n createLinkCommunity,\n createLinkDocs,\n createLinkTutorial,\n createLinkMicroservices,\n createLinkTerms,\n createLinkapi,\n};\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 {sectionListGuides_en, sectionListGuides_zh} from 'utils/sectionList';\n\nconst Guides = ({data, location}) => {\n let sectionListDocs = sectionListGuides_en;\n if (data.markdownRemark.fields.langKey === 'zh') {\n sectionListDocs = sectionListGuides_zh;\n }\n console.log('guides data');\n console.log(data.markdownRemark);\n return (\n \n \n \n );\n};\n\nGuides.propTypes = {\n data: PropTypes.object.isRequired,\n};\n\nexport const pageQuery = graphql`\n query TemplateGuidesMarkdown($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 Guides;\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 * 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 = {\n uid: ('' + Math.random()).replace(/\\D/g, ''),\n navHidden: true\n };\n onNavClick = (e) => {\n if (e.target.parentElement.localName == \"li\") {\n this.setState({ navHidden: !this.state.navHidden });\n if (e.target.parentElement.ariaExpanded !== \"false\") {\n e.target.parentElement.ariaExpanded = false;\n } else {\n e.target.parentElement.ariaExpanded = true;\n }\n }\n if (e.target.parentElement.localName == \"div\") {\n this.setState({ navHidden: !this.state.navHidden });\n if (e.target.parentElement.parentElement.ariaExpanded !== \"false\") {\n e.target.parentElement.parentElement.ariaExpanded = false;\n } else {\n e.target.parentElement.parentElement.ariaExpanded = true;\n }\n }\n if (e.target.parentElement.localName == \"g\") {\n this.setState({ navHidden: !this.state.navHidden });\n if (e.target.parentElement.parentElement.parentElement.parentElement.ariaExpanded !== \"false\") {\n e.target.parentElement.parentElement.parentElement.parentElement.ariaExpanded = false;\n } else {\n e.target.parentElement.parentElement.parentElement.parentElement.ariaExpanded = true;\n }\n }\n e.stopPropagation();\n e.preventDefault();\n }\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 {item.id == \"none\" &&
{item.title}\n \n
}\n
\n {item.id !== \"none\" && (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 {item.subitems && (\n this.renderSectionItems(item.subitems)\n )}\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 = 15;\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: 18,\n\n ':hover:not(:focus)': {\n color: colors.brand,\n },\n },\n};\n\n\nexport default DownloadPDF;\n"],"sourceRoot":""}