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./app/javascript/components/Description/Author/style.js","webpack:///./app/javascript/components/Description/Author/translations.js","webpack:///./app/javascript/components/Description/Author/index.jsx","webpack:///./app/javascript/components/Description/Feedback/style.js","webpack:///./app/javascript/components/Description/Feedback/translations.js","webpack:///./app/javascript/components/Description/Feedback/index.jsx","webpack:///./app/javascript/components/Description/TableOfContents/style.js","webpack:///./app/javascript/components/Description/TableOfContents/index.jsx","webpack:///./app/javascript/components/Description/TableOfContents/translations.js","webpack:///./app/javascript/components/Description/index.jsx","webpack:///./app/javascript/components/Description/loading.jsx","webpack:///./app/javascript/components/Description/style.js"],"sourcesContent":["export const DEFAULT_PROPS = {\n  titleSize: '24px',\n  titleType: 'h1',\n  imageMaxWidth: '100%',\n  gap: '16px',\n  hideTitle: false\n}\n\nexport const DEFAULT_LOADING_PROPS = {\n  ...DEFAULT_PROPS,\n  contents: [\n    { height: '200px', align: 'center', type: 'image' },\n    { lines: 5, type: 'paragraph' },\n    { lines: 6, type: 'paragraph' }\n  ]\n}\n","import styled, { css } from 'styled-components'\n\nconst minimizeStyle = ({ $minimize }) => {\n  if (!$minimize) return null\n\n  return css`\n    flex-direction: row-reverse;\n    justify-content: space-between;\n    align-items: center;\n  `\n}\n\nexport const Wrapper = styled.div`\n  display: flex;\n  flex-direction: column;\n  gap: 4px;\n\n  ${props => minimizeStyle(props)}\n`\n\nexport const FlexBox = styled.div`\n  display: flex;\n  gap: 4px;\n`\n\nexport const Text = styled.div`\n  color: ${props => props.theme.colors.textHeading};\n`\n\nexport const Highlight = styled.div`\n  color: ${props => props.theme.colors.textHeading};\n  font-weight: 600;\n`\n\nexport const Muted = styled.div`\n  color: ${props => props.theme.colors.textPlaceholder};\n  font-size: 14px;\n`\n","export default {\n  en: {\n    Author: {\n      by: 'Author',\n      shareArticle: 'Share this article via',\n      youMayInterestedArticle: 'You may interested in',\n    }\n  },\n\n  th: {\n    Author: {\n      by: 'เขียนโดย',\n      shareArticle: 'แชร์บทความนี้ผ่าน',\n      youMayInterestedArticle: 'บทความที่คุณอาจสนใจ',\n    }\n  }\n}","import * as Styled from './style'\n\nimport translations from './translations'\nimport { i18n, initializeI18n } from '../../../utilities/i18n'\n\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\nconst renderDate = (date, minimize) => {\n  const text = minimize ? date?.displayShort : date?.display\n  if (!text) return null\n\n  return <Styled.Muted>{text}</Styled.Muted>\n}\n\nexport const DescriptionAuthor = ({\n  author,\n  date,\n  minimize = false\n}) => {\n  initializeI18n({ localeFiles: translations })\n\n  return (\n    <Styled.Wrapper $minimize={minimize}>\n      <Styled.FlexBox>\n        <Styled.Text>{i18n.t('Author.by')}</Styled.Text>\n        <Styled.Highlight>{author?.name || 'OneStockHome'}</Styled.Highlight>\n      </Styled.FlexBox>\n\n      {renderDate(date, minimize)}\n    </Styled.Wrapper>\n  )\n}\n\nDescriptionAuthor.propTypes = {\n  author: PropTypes.shape({\n    name: PropTypes.string.isRequired\n  }),\n  date: PropTypes.shape({\n    display: PropTypes.string,\n    displayShort: PropTypes.string\n  }),\n  minimize: PropTypes.bool\n}\n","import styled from 'styled-components'\n\nexport const Wrapper = styled.div`\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n`\n\nexport const FlexBox = styled.div`\n  display: flex;\n  gap: 8px;\n  align-items: center;\n`\n\nexport const Title = styled.div`\n  color: ${props => props.theme.colors.textHeading};\n  font-weight: 600;\n`\n","export default {\n  en: {\n    DescriptionFeedback: {\n      title: 'Does the product information include all the details?',\n      complete: 'Complete Info.',\n      improve: 'Should be improved',\n    }\n  },\n\n  th: {\n    DescriptionFeedback: {\n      title: 'ข้อมูลสินค้าครบถ้วนหรือไม่',\n      complete: 'ครบถ้วน',\n      improve: 'ควรปรับปรุง',\n    }\n  }\n}\n","import * as Styled from './style'\nimport { Button, useVoteHooks } from '../../../elements'\n\nimport translations from '../Feedback/translations'\nimport { i18n, initializeI18n } from '../../../utilities/i18n'\n\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\nconst getHTMLType = (current, voteType, activeType) => {\n  if (voteType !== current) return 'default'\n\n  return activeType\n}\n\nexport const DescriptionFeedback = ({\n  votableId,\n  votableType,\n  description\n}) => {\n  initializeI18n({ localeFiles: translations })\n\n  const { myVote } = description || {}\n  const { current, deleting, onVoteUp, onVoteDown, saving } = useVoteHooks(`${votableId}`, votableType, myVote, true)\n\n  const handleVote = (event, onVote) => {\n    event.preventDefault()\n    event.stopPropagation()\n    if (deleting || saving) return null\n\n    onVote()\n  }\n\n  return (\n    <Styled.Wrapper>\n      <Styled.Title>{i18n.t('DescriptionFeedback.title')}</Styled.Title>\n\n      <Styled.FlexBox>\n        <Button\n          prefix={<i className=\"fa-regular fa-face-smile\"></i>}\n          onClick={event => handleVote(event, onVoteUp)}\n          htmlType={getHTMLType(current, 'up_vote', 'primary-outlined')}\n          size=\"small\">\n          {i18n.t('DescriptionFeedback.complete')}\n        </Button>\n        <Button prefix={<i className=\"fa-regular fa-face-frown\"></i>}\n          onClick={event => handleVote(event, onVoteDown)}\n          htmlType={getHTMLType(current, 'down_vote', 'secondary-outlined')}\n          size=\"small\">\n          {i18n.t('DescriptionFeedback.improve')}\n        </Button>\n      </Styled.FlexBox>\n    </Styled.Wrapper>\n  )\n}\n\nDescriptionFeedback.propTypes = {\n  votableId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n  votableType: PropTypes.string.isRequired,\n  description: PropTypes.shape({\n    upVoteCount: PropTypes.number,\n    downVoteCount: PropTypes.number,\n    myVote: PropTypes.object\n  })\n}\n","import { styled } from 'styled-components'\n\nexport const ArticleTableOfContentsContainer = styled.div`\n  display: flex;\n  flex-direction: column;\n  gap: 16px;\n  align-self: start; /* is required for position: sticky */\n  position: sticky;\n  top: ${({ $navbarOffset }) => `${$navbarOffset || 0}px`};\n`\n\nexport const TableOfContentsTitle = styled.h3`\n  margin: 0;\n  font-size: 16px;\n  font-weight: 400;\n  color: ${({ theme }) => theme.colors.textPlaceholder};\n`\n\nexport const ContentListNavigation = styled.nav`\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n  ul {\n    list-style-type: none;\n    padding: 0;\n    margin: 0;\n    padding-left: 8px;\n  }\n  svg {\n    position: absolute;\n    left: 0;\n    top: 0;\n    width: 100%;\n    height: 100%;\n    z-index: -1;\n  }\n  path {\n    transition: all 300ms ease;\n    fill: transparent;\n    stroke: ${({ theme }) => theme.colors.mainBlue};\n    stroke-width: 3px;\n    stroke-dasharray: 0 0 0 1000;\n    stroke-linecap: round;\n    stroke-linejoin: round;\n  }\n`\n\nexport const ContentListItem = styled.li`\n  padding-top: 4px;\n  &:first-child {\n    padding-top: 0;\n  }\n  font-weight: 400;\n  font-size: ${({ $tag }) => {\n    const hTag = $tag?.split('h')[1] || 0\n    return `${18 - (hTag * 2)}px`\n  }};\n  ul {\n    padding-left: 16px;\n    padding-top: 8px;\n  }\n  > a {\n    color: ${({ theme }) => theme.colors.textSubHeading};\n    text-decoration: none;\n    display: inline-block;\n    transition: all 300ms ease-in-out;\n    &:hover {\n      color: ${({ theme }) => theme.colors.mainBlue} !important;\n    }\n  }\n  &.active {\n    font-weight: 600;\n    > a {\n      color: ${({ theme }) => theme.colors.textHeading};\n      transform: translate(5px);\n    }\n  }\n`\n\nexport const ArticleTableOfContentsDropdownContainer = styled.div`\n  display: flex;\n  flex-direction: column;\n  gap: 8px;\n`\n\nexport const TocDropdownLayout = styled.div`\n  padding: 24px 48px;\n  border: 1px solid ${({ theme }) => theme.colors.zinc100};\n  border-radius: 8px;\n  ul {\n    list-style-type: disc;\n    margin: 0;\n    padding: 0;\n    li {\n      font-size: 16px;\n      margin: 0;\n      padding: 0;\n    }\n  }\n  > ${TableOfContentsTitle} {\n    margin-bottom: 24px;\n  }\n`","import * as Styled from './style'\nimport translations from './translations'\nimport { i18n, initializeI18n } from '../../../utilities/i18n'\n\nimport React, { useState, useEffect, useRef } from 'react'\nimport PropTypes from 'prop-types'\nimport { observe } from 'react-intersection-observer'\n\ninitializeI18n({ localeFiles: translations })\n\nconst parseTagLevel = (tag) => {\n  return parseInt(tag.replace('h', ''))\n}\n\nconst generateList = (items, activeIds) => {\n  let contentList = []\n  for (let i = 0; i < items.length; i++) {\n    const [key, text, tag] = items[i]\n    const itemLevel = parseTagLevel(tag)\n    const active = activeIds[key] || false\n\n    // Find nested items\n    const nestedItems = []\n    i++ // Skip current item\n    while ( i < items.length && parseTagLevel(items[i][2]) > itemLevel) {\n      nestedItems.push(items[i])\n      i++\n    }\n    i-- // Reset to previous index\n\n    contentList.push(\n      <Styled.ContentListItem\n        key={key}\n        $tag={tag}\n        className={active ? 'active' : ''}\n      >\n        <a href={`#${key}`}>{text}</a>\n        {nestedItems.length > 0 && (\n          <ul key={`${key}-nested`}>\n            {generateList(nestedItems, activeIds)}\n          </ul>\n        )}\n      </Styled.ContentListItem>\n    )\n  }\n  return contentList\n} \n\nexport const DescriptionTableOfContents = ({ tableOfContents }) => {\n  const [activeIds, setActiveIds] = useState({})\n  const navigationRef = useRef(null)\n  const navbarHeight = document.getElementById('navbar')?.offsetHeight || 0\n  const contentIds = tableOfContents?.map(([key]) => key) || []\n  const destroyer = []\n  useEffect(() => {\n    if (!contentIds || contentIds.length === 0) return\n\n    const elements = contentIds.map((id) => document.getElementById(id))\n    elements.forEach((el) => {\n      if (el) {\n        const destroy = observe(\n          el,\n          (inView, entry) => {\n            if (inView) {\n              setActiveIds((prev) => ({ ...prev, [entry.target.id]: true }))\n            } else {\n              setActiveIds((prev) => ({ ...prev, [entry.target.id]: false }))\n            }\n          }\n        )\n        destroyer.push(destroy)\n      }\n    })\n  }, [contentIds])\n\n  // NOTE: Cleanup observer\n  useEffect(() => {\n    return () => { destroyer.forEach((destroy) => destroy()) }\n  }, [])\n\n  useEffect(() => {\n    const nav = navigationRef.current\n    if (!nav) return\n\n    const navListItems = Array.from(nav.querySelectorAll('li'))\n    const navPath = nav.querySelector('path')\n    const navItems = navListItems.map(listItem => {\n      const anchor = listItem.querySelector('a')\n      const targetID = anchor && anchor.getAttribute('href').slice(1)\n      const target = document.getElementById(targetID)\n      return { listItem, anchor, target }\n    }).filter(item => item.target)\n\n    drawPath(navItems, navPath)\n    syncPath(nav, navItems, navPath, 'active')\n  }, [navigationRef, activeIds])\n\n  if (!tableOfContents || tableOfContents.length === 0) return <div />\n  \n  return (\n    // NOTE: + 8 for extra padding\n    <Styled.ArticleTableOfContentsContainer $navbarOffset={navbarHeight + 8}>\n      <Styled.TableOfContentsTitle>\n        {i18n.t('ArticleTableOfContents.tableOfContents')}\n      </Styled.TableOfContentsTitle>\n      <Styled.ContentListNavigation ref={navigationRef}>\n        <ul>\n          {generateList(tableOfContents, activeIds)}\n        </ul>\n        <svg xmlns=\"http://www.w3.org/2000/svg\">\n          <path />\n        </svg>\n      </Styled.ContentListNavigation>\n    </Styled.ArticleTableOfContentsContainer>\n  )\n}\n\nDescriptionTableOfContents.propTypes = {\n  tableOfContents: PropTypes.arrayOf(PropTypes.array)\n}\n\n\nexport const ArticleTableOfContentsDropdown = ({ tableOfContents }) => {\n  if (!tableOfContents || tableOfContents.length === 0) return null\n\n  return (\n    <Styled.ArticleTableOfContentsDropdownContainer>\n      <Styled.TocDropdownLayout>\n        <Styled.TableOfContentsTitle>\n          {i18n.t('ArticleTableOfContents.tableOfContents')}\n        </Styled.TableOfContentsTitle>\n        <ul>\n          {/* NOTE: No active for mobile */}\n          {generateList(tableOfContents, [])}\n        </ul>\n      </Styled.TocDropdownLayout>\n    </Styled.ArticleTableOfContentsDropdownContainer>\n  )\n}\nArticleTableOfContentsDropdown.propTypes = {\n  tableOfContents: PropTypes.arrayOf(PropTypes.array)\n}\n\n// NOTE: Ref by https://codepen.io/agrimsrud/pen/XWNLMeW\nfunction drawPath(navItems, navPath) {\n\n  let path = [], \n    pathIndent\n\n  navItems.forEach((item, i) => {\n    const x = item.anchor.offsetLeft - 5,\n      y = item.anchor.offsetTop,\n      height = item.anchor.offsetHeight\n\n    if(i === 0) {\n      \n      path.push('M', x, y, 'L', x, y + height)\n      item.pathStart = 0\n\n    } else {\n      \n      if(pathIndent !== x)\n        path.push('L', pathIndent, y)\n      \n      path.push('L', x, y)\n      \n      navPath.setAttribute('d', path.join(' '))\n      item.pathStart = navPath.getTotalLength() || 0\n      path.push('L', x, y + height)  \n    }\n    \n    pathIndent = x\n    navPath.setAttribute('d', path.join(' '))\n    item.pathEnd = navPath.getTotalLength()\n  })\n}\n\nfunction syncPath(nav, navItems, navPath, visibleClass ) {\n  \n  const someElsAreVisible = () => nav.querySelectorAll(`.${visibleClass}`).length > 0\n  const thisElIsVisible = el => el.classList.contains(visibleClass)\n  const pathLength = navPath.getTotalLength()\n\n  let pathStart = pathLength,\n    pathEnd = 0,\n    lastPathStart,\n    lastPathEnd\n  \n  navItems.forEach(item => {\n    if(thisElIsVisible(item.listItem)) {\n      pathStart = Math.min(item.pathStart, pathStart)\n      pathEnd = Math.max(item.pathEnd, pathEnd)\n    }\n  })\n\n  if(someElsAreVisible() && pathStart < pathEnd) {\n    \n    if(pathStart !== lastPathStart || pathEnd !== lastPathEnd) {\n      \n      const dashArray = `1 ${pathStart} ${pathEnd - pathStart} ${pathLength}`\n      navPath.style.setProperty('stroke-dashoffset', '1')\n      navPath.style.setProperty('stroke-dasharray', dashArray)\n      navPath.style.setProperty('opacity', 1)\n    }\n  } else { \n    navPath.style.setProperty('opacity', 0)\n  }\n  lastPathStart = pathStart\n  lastPathEnd = pathEnd\n}","export default {\n  th: {\n    ArticleTableOfContents: {\n      tableOfContents: 'เนื้อหา',\n    }\n  },\n  en: {\n    ArticleTableOfContents: {\n      tableOfContents: 'Table of Contents',\n    }\n  }\n}","import * as Styled from './style'\nimport { DEFAULT_PROPS } from './constants'\nimport DescriptionLoading from './loading'\n\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\nimport HTMLReactParser from 'html-react-parser'\n\nconst renderTitle = ({ title, titleSize, titleType }) => {\n  if (!title) return null\n\n  return (\n    <Styled.Title as={titleType} $size={titleSize}>\n      {title}\n    </Styled.Title>\n  )\n}\n\nconst renderBody = (body) => {\n  return HTMLReactParser(body, {\n    // Add parser options here if needed\n  })\n}\n\nconst Description = inputProps => {\n  const props = { ...DEFAULT_PROPS, ...inputProps }\n  const { description, gap, imageMaxWidth, customStyle } = props\n\n  if (props.loading) return <DescriptionLoading {...props} />\n  if (!description || !description.body) return null\n\n  return (\n    <Styled.GridBox as={Styled.Wrapper} $gap={gap} $customStyle={customStyle}>\n      {renderTitle(props)}\n\n      <Styled.Description $imageMaxWidth={imageMaxWidth}>\n        {renderBody(description.body)}\n      </Styled.Description>\n    </Styled.GridBox>\n  )\n}\n\nDescription.propTypes = {\n  title: PropTypes.string,\n  titleSize: PropTypes.string,\n  titleType: PropTypes.string,\n  description: PropTypes.shape({\n    body: PropTypes.string\n  }),\n  loading: PropTypes.bool,\n  imageMaxWidth: PropTypes.string,\n  gap: PropTypes.string,\n  customStyle: PropTypes.any,\n  hideTitle: PropTypes.bool\n}\n\nexport * from './Author'\nexport * from './Feedback'\nexport * from './TableOfContents'\nexport default Description\n","import * as Styled from './style'\nimport { DEFAULT_LOADING_PROPS } from './constants'\nimport { Skeleton } from '../../elements'\n\nimport { renderElementMultipleTimes } from '../../utilities/render'\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\nconst loadTitle = ({ hideTitle, titleSize }) => {\n  if (hideTitle) return null\n\n  return <Skeleton width=\"200px\" size={titleSize} />\n}\n\n// { height: '<number>px', align: '<left | center | right>', type: 'image' }\nconst loadImage = ({ height = '200px', align = 'left' }, index, width) => {\n  return <Skeleton key={index} width={width} height={height} align={align} type=\"image\" />\n}\n\n// { lines: <number>, type: 'paragraph' }\nconst loadParagraph = ({ lines = 2 }, index) => {\n  return (\n    <div key={index}>\n      {renderElementMultipleTimes(lines - 1, <Skeleton width=\"100%\" />)}\n      <Skeleton width=\"60%\" />\n    </div>\n  )\n}\n\nconst renderContents = ({ contents, imageMaxWidth }) => {\n  return contents.map((content, index) => {\n    switch (content.type) {\n    case 'image':\n      return loadImage(content, index, imageMaxWidth)\n    case 'paragraph':\n      return loadParagraph(content, index)\n    default:\n      return null\n    }\n  })\n}\n\nconst DescriptionLoading = inputProps => {\n  const props = { ...DEFAULT_LOADING_PROPS, ...inputProps }\n\n  return (\n    <Styled.GridBox as={Styled.Wrapper} $gap={props.gap} $customStyle={props.customStyle}>\n      {loadTitle(props)}\n\n      <Styled.GridBox $gap=\"16px\">\n        {renderContents(props)}\n      </Styled.GridBox>\n    </Styled.GridBox>\n  )\n}\n\nDescriptionLoading.propTypes = {\n  titleSize: PropTypes.string,\n  imageMaxWidth: PropTypes.string,\n  gap: PropTypes.string,\n  customStyle: PropTypes.any,\n  hideTitle: PropTypes.bool\n}\n\nexport default DescriptionLoading\n","import styled from 'styled-components'\n\nexport const GridBox = styled.div`\n  display: flex;\n  flex-direction: column;\n  gap: ${props => props.$gap};\n`\n\nexport const Wrapper = styled.div`\n  line-height: 1.5;\n\n  ${props => props.$customStyle}\n`\n\nexport const Title = styled.div`\n  font-size: ${props => props.$size};\n  font-weight: 600;\n  margin: 0;\n`\n\nexport const Description = styled.div`\n  img {\n    max-width: ${props => props.$imageMaxWidth};\n  }\n  \n  .table {\n    width: 100%;\n  \n    thead tr {\n      background-color: ${props => props.theme.colors.mainRed};\n      color:  ${props => props.theme.colors.white};\n      text-align: left;\n    }\n  \n    th,\n    td {\n      padding: 12px 15px;\n    }\n  \n    tbody tr {\n      border-bottom: 1px solid #dddddd;\n    }\n  \n    tbody tr:hover {\n      background-color: #f3f3f3;\n    }\n  \n    tbody tr:last-of-type {\n      border-bottom: 2px solid $red;\n    }\n  }\n\n  .PlaygroundEditorTheme__layoutItem {\n    border: none;\n  }\n\n  /* For mobile */\n  iframe {\n    width: 100%;\n    height: auto;\n    aspect-ratio: 16 / 9;\n  }\n\n  @media only screen and (max-width: 768px) {\n    .PlaygroundEditorTheme__tableCell {\n      width: auto  !important;\n    }\n    .PlaygroundEditorTheme__layoutContainer {\n      grid-template-columns: 1fr !important;\n    }\n  }\n  /* End for mobile */\n\n  /* For desktop */\n  @media only screen and (min-width: 768px) {\n    iframe {\n      width: 50%;\n    }\n  }\n  /* End for desktop */\n`\n"],"names":["DEFAULT_PROPS","titleSize","titleType","imageMaxWidth","gap","hideTitle","DEFAULT_LOADING_PROPS","_objectSpread","contents","height","align","type","lines","Wrapper","styled","div","_templateObject2","_taggedTemplateLiteral","props","$minimize","css","_templateObject","FlexBox","_templateObject3","Text","_templateObject4","theme","colors","textHeading","Highlight","_templateObject5","Muted","_templateObject6","textPlaceholder","en","Author","by","shareArticle","youMayInterestedArticle","th","DescriptionAuthor","_ref","author","date","_ref$minimize","minimize","initializeI18n","localeFiles","translations","React","Styled","i18n","t","name","text","displayShort","display","renderDate","Title","DescriptionFeedback","title","complete","improve","getHTMLType","current","voteType","activeType","votableId","votableType","description","myVote","_useVoteHooks","useVoteHooks","concat","deleting","onVoteUp","onVoteDown","saving","handleVote","event","onVote","preventDefault","stopPropagation","Button","prefix","className","onClick","htmlType","size","ArticleTableOfContentsContainer","$navbarOffset","TableOfContentsTitle","h3","_ref2","ContentListNavigation","nav","_ref3","mainBlue","ContentListItem","li","_ref4","$tag","hTag","split","_ref5","textSubHeading","_ref6","_ref7","ArticleTableOfContentsDropdownContainer","TocDropdownLayout","_ref8","zinc100","ArticleTableOfContents","tableOfContents","parseTagLevel","tag","parseInt","replace","generateList","items","activeIds","contentList","i","length","_items$i","_slicedToArray","key","itemLevel","active","nestedItems","push","href","DescriptionTableOfContents","_document$getElementB","_useState2","useState","setActiveIds","navigationRef","useRef","navbarHeight","document","getElementById","offsetHeight","contentIds","map","destroyer","useEffect","id","forEach","el","destroy","observe","inView","entry","prev","_defineProperty","target","navListItems","Array","from","querySelectorAll","navPath","querySelector","navItems","listItem","anchor","targetID","getAttribute","slice","filter","item","pathIndent","path","x","offsetLeft","y","offsetTop","pathStart","setAttribute","join","getTotalLength","pathEnd","drawPath","visibleClass","lastPathStart","lastPathEnd","someElsAreVisible","thisElIsVisible","classList","contains","pathLength","Math","min","max","dashArray","style","setProperty","syncPath","ref","xmlns","ArticleTableOfContentsDropdown","inputProps","body","customStyle","loading","DescriptionLoading","as","$gap","$customStyle","$size","$imageMaxWidth","HTMLReactParser","renderContents","content","index","width","_ref2$height","_ref2$align","Skeleton","loadImage","_ref3$lines","renderElementMultipleTimes","loadParagraph","GridBox","Description","mainRed","white"],"sourceRoot":""}