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iB,MAAnF,CAAsFqK,GCA/E,MAAME,EAAeA,CAACpL,EAAQqL,EAAY,QAC/C,MAAM1E,EAAM,CAAC,EAQb,OAPA2C,EAAAA,EAAmBxC,SAAQC,IACzB,MAAMuE,EAAMtL,EAAO+G,GACfuE,GAAOvE,IAAQsE,IACjB1E,EAAII,GAAOuE,EACb,IAGK3E,CAAG,EAqBZ,MAlBcvG,EAAGoH,cACf,MAAM+D,EAAcb,EAAAA,EAAYc,MAAM9I,OAAOwB,SAAS0E,QAChD5I,EAAS,KAAKyL,EAAAA,EAAAA,QAAgBF,GAG9BG,EAAQ,CACZlE,UAASD,cAHW6D,EAAapL,IAKnC,OAJeA,EAAOoK,IAAMuB,EAAAA,MAIb9B,EAAAA,GACN1I,EAAAA,cAAC2I,EAAiB4B,GAEpBvK,EAAAA,cAAC+J,EAAiBQ,EAAU,C,+EChC9B,MAAMpC,EAAqB,CAChC,SACA,2BACA,eACA,aACA,QACA,gBAGWI,EAAoB,CAAC,CAChCkC,KAAM,gBACN3F,GAAI,U,uECTC,MAAM0B,EAAekE,IAC1B,MAAMtI,GAAMxB,EAAAA,EAAAA,UAIZ,OAHAiB,EAAAA,EAAAA,YAAU,KACRO,EAAIlB,QAAUwJ,CAAK,IAEdtI,EAAIlB,OAAO,C,iOCNpB,IAAIyJ,EAAK,uBACLC,EAAK,uBACLC,EAAK,uBACLC,EAAK,uBACLC,EAAK,uBACLC,EAAK,uBACLC,EAAK,uBACLC,EAAK,sB","sources":["webpack://artfully-walls/./app/javascript/arts/actions/walls.js","webpack://artfully-walls/./app/javascript/arts/components/InfiniteScroll/container.js","webpack://artfully-walls/./app/javascript/arts/components/InfiniteScroll/index.js","webpack://artfully-walls/./app/javascript/arts/components/category/category_description.js","webpack://artfully-walls/./app/javascript/arts/components/walls_as_grid/wall.js","webpack://artfully-walls/./app/javascript/arts/components/walls_as_grid/container.js","webpack://artfully-walls/./app/javascript/arts/components/walls_as_grid/no_results.js","webpack://artfully-walls/./app/javascript/arts/components/walls/list.js","webpack://artfully-walls/./app/javascript/arts/components/walls_as_grid/walls_as_grid.js","webpack://artfully-walls/./app/javascript/arts/components/walls_as_grid/index.js","webpack://artfully-walls/./app/javascript/arts/components/walls_as_page/walls_as_page.js","webpack://artfully-walls/./app/javascript/arts/components/walls_as_page/index.js","webpack://artfully-walls/./app/javascript/arts/components/walls/index.js","webpack://artfully-walls/./app/javascript/arts/components/walls/shared.js","webpack://artfully-walls/./app/javascript/arts/config/hooks.js","webpack://artfully-walls/./app/javascript/arts/components/category/styles.module.scss?215b"],"sourcesContent":["import Constants from 'arts/config/constants';\nimport { loadWallsApi, loadWallFiltersApi } from 'arts/config/api';\n\nexport const fetchWalls = (page, params) => (dispatch) => {\n dispatch({\n type: Constants.Walls.FETCH,\n page\n });\n\n loadWallsApi(page, params)\n .then((walls) => dispatch({\n type: Constants.Walls.FETCH_SUCCESS,\n walls,\n page,\n params\n })).catch(() => {});\n};\n\nexport const resetWalls = () => ({\n type: Constants.Walls.RESET\n});\n\nexport const fetchWallFilters = () => (dispatch) => {\n loadWallFiltersApi()\n .then(\n (filters) => dispatch({\n type: Constants.WallFilters.FETCH_SUCCESS,\n filters\n })\n ).catch(() => {});\n};\n","import React from 'react';\nimport T from 'prop-types';\nimport * as AppClasses from '../Application/styles.module.scss';\n\nconst Container = ({ children }) => (\n
\n \n
\n);\nContainer.propTypes = {\n children: T.node.isRequired\n};\n\nexport default Container;\n","/* eslint-disable prefer-destructuring */\nimport React, {\n useState, useEffect, useRef, useCallback, useMemo\n} from 'react';\nimport T from 'prop-types';\nimport DefaultContainer from './container';\n\nconst InfiniteScroll = ({\n items,\n itemRenderer,\n itemsContainer = DefaultContainer,\n onLoad,\n rootClassName,\n threshold = 100\n}) => {\n const rootRef = useRef(null);\n const [ticking, setTicking] = useState(false);\n\n const recalculate = useCallback(() => {\n if (!rootRef.current) {\n return;\n }\n const { top, height } = rootRef.current.getBoundingClientRect();\n const scrollY = window.scrollY || window.pageYOffset;\n const innerHeight = window.innerHeight;\n const rootElBottom = top + scrollY + height;\n const viewportBottom = scrollY + innerHeight;\n\n const shouldLoad = rootElBottom - threshold <= viewportBottom;\n\n if (shouldLoad) {\n setTicking(true);\n }\n }, [onLoad, threshold]);\n\n const onChange = useCallback(() => {\n if (!ticking) {\n setTimeout(() => {\n window.requestAnimationFrame(recalculate);\n }, 0);\n }\n }, [ticking, recalculate]);\n\n useEffect(() => {\n window.addEventListener('resize', onChange);\n window.addEventListener('scroll', onChange);\n\n recalculate();\n\n return () => {\n window.removeEventListener('resize', onChange);\n window.removeEventListener('scroll', onChange);\n };\n }, [onChange, recalculate]);\n\n useEffect(() => {\n if (ticking && items.length) {\n setTimeout(() => { setTicking(false); }, 0);\n }\n }, [items && items.length, ticking]);\n\n useEffect(() => {\n if (ticking) {\n onLoad();\n }\n }, [ticking, onLoad]);\n\n const content = useMemo(() => (\n React.createElement(\n itemsContainer,\n null,\n items.map(itemRenderer)\n )\n ), [items, itemRenderer, itemsContainer]);\n\n return (\n
\n { content }\n
\n );\n};\n\nInfiniteScroll.propTypes = {\n items: T.instanceOf(Array).isRequired,\n itemRenderer: T.func.isRequired,\n itemsContainer: T.oneOfType([T.element, T.func]),\n onLoad: T.func.isRequired,\n rootClassName: T.string,\n threshold: T.number\n};\n\nexport default InfiniteScroll;\n","import React, { useState, useMemo, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport ReactMarkdown from 'react-markdown';\nimport { loadPageDescriptionApi } from 'arts/config/api';\nimport * as AppClasses from '../Application/styles.module.scss';\nimport * as Classes from './styles.module.scss';\n\nconst CategoryDescription = ({ description, skipShowMore, loadadble }) => {\n const [showMore, setShowMore] = useState(!!skipShowMore);\n const [renderDescription, setRenderDescription] = useState(description);\n\n useEffect(() => {\n setRenderDescription(description);\n }, [description]);\n\n useEffect(() => {\n if (loadadble) {\n loadPageDescriptionApi().then(res => setRenderDescription(res.description)).catch(() => {});\n }\n }, [loadadble, description, window.location.href]);\n\n const button = useMemo(() => {\n if (skipShowMore) return null;\n if (showMore) {\n return (\n \n );\n }\n return (\n \n );\n }, [showMore, skipShowMore]);\n\n if (!renderDescription) return null;\n\n return (\n
\n
\n \n { renderDescription }\n \n { button }\n
\n
\n );\n};\n\nCategoryDescription.propTypes = {\n description: PropTypes.string,\n skipShowMore: PropTypes.bool,\n loadadble: PropTypes.bool\n};\n\nexport default CategoryDescription;\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'react-router-dom';\nimport PinIt from 'arts/components/Social/pin_it';\nimport Favorite from '../favorite';\nimport { WallStoreItem } from '../store_item';\nimport { onWallClick } from '../../config/analytics';\n\nimport * as AppClasses from '../Application/styles.module.scss';\nimport * as Classes from '../walls/styles.module.scss';\nimport ZoomModal from '../Viewer/zoom_modal';\n\nconst Wall = ({\n id, name, description, imageUrl, href, allowStores, storeItemId,\n wallPictures, discountPercent, position\n}) => {\n const [displayPreview, setDisplayPreview] = useState(false);\n const showPreview = () => setDisplayPreview(true);\n const hidePreview = () => setDisplayPreview(false);\n\n const preview = displayPreview ? (\n \n ) : null;\n\n const storeOpts = allowStores ? (\n \n ) : null;\n\n const onClick = () => onWallClick({\n id, name, wallPictures, discountPercent\n }, position);\n\n return (\n
  • \n { preview }\n
    \n \n \n \n { storeOpts }\n
    \n \n {\n

    { name }

    \n

    \n { description }\n

    \n \n
    \n \n SHOP THIS WALL\n \n
    \n
  • \n );\n};\n\nWall.propTypes = {\n id: PropTypes.number.isRequired,\n name: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired,\n imageUrl: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n allowStores: PropTypes.bool,\n storeItemId: PropTypes.number,\n discountPercent: PropTypes.number.isRequired,\n wallPictures: PropTypes.array.isRequired,\n position: PropTypes.number.isRequired\n};\n\nexport default Wall;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport * as AppClasses from '../Application/styles.module.scss';\nimport * as Classes from '../walls/styles.module.scss';\n\nconst Container = React.forwardRef(({ children }, ref) => (\n
      \n { children }\n
    \n));\n\nContainer.propTypes = {\n children: PropTypes.node.isRequired\n};\n\nexport default Container;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst NoResults = ({ loading, walls }) => {\n const noResults = !loading && walls.length === 0;\n return noResults ? (\n
    \n There are no results that match your selection - please try again.\n
    \n ) : null;\n};\n\nNoResults.propTypes = {\n loading: PropTypes.bool.isRequired,\n walls: PropTypes.array.isRequired\n};\n\nexport default NoResults;\n","import React, { useEffect, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport ReactRouterPropTypes from 'react-router-prop-types';\nimport * as AppClasses from 'arts/components/Application/styles.module.scss';\nimport * as Classes from 'arts/components/walls/styles.module.scss';\nimport { usePrevious } from 'arts/config/hooks';\nimport Filter from '../works/filter';\nimport BreadCrumbsGeneric from '../bread_crumbs';\nimport GridSelection, { THUMB } from './grid_selection';\nimport { VALID_QUERY_PARAMS, BREADCRUMBS_LINKS } from './shared';\nimport GTMPageView from '../Application/data_layer';\n\nconst mapSlugsToIds = (params) => {\n const out = { ...params };\n Object.keys(out).forEach(key => {\n if (key === 'with_home_decor_style_id' || key === 'with_room_id') {\n if (!parseInt(out[key], 10)) {\n const slugMap = (key === 'with_home_decor_style_id') ? window.slugsMaps.home_decor_styles : window.slugsMaps.rooms;\n const id = slugMap[out[key]];\n out[key] = id;\n }\n }\n });\n return out;\n};\n\nconst GALERRY_WALLS = 'Gallery Walls';\n\nconst getParams = (params, pathname, wallFilters) => {\n if (pathname === '/walls') {\n return [mapSlugsToIds(params), [], GALERRY_WALLS];\n }\n // string to id using window.slugsMaps - udpate params and skipFilterKeys\n // URL to params using pathname - udpate params and skipFilterKeys\n if (pathname.match(/\\/walls\\/room/)) {\n const slug = pathname.split('/').pop();\n const id = parseInt(window.slugsMaps.rooms[slug], 10);\n const filter = (wallFilters || []).find(f => f.key === 'with_room_id');\n const title = filter ? filter.options.find(o => o.id === id).name : '';\n return [mapSlugsToIds({ ...params, with_room_id: id }), [], `${ title } ${ GALERRY_WALLS }`];\n }\n\n if (pathname.match(/\\/walls\\/style/)) {\n const slug = pathname.split('/').pop();\n const id = parseInt(window.slugsMaps.home_decor_styles[slug], 10);\n const filter = (wallFilters || []).find(f => f.key === 'with_home_decor_style_id');\n const title = filter ? filter.options.find(o => o.id === id).name : '';\n return [mapSlugsToIds({ ...params, with_home_decor_style_id: id }), [], `${ title } ${ GALERRY_WALLS }`];\n }\n\n return [params, []];\n};\n\nconst WallsList = ({\n fetchWallFilters,\n resetWalls,\n // filters\n wallFilters,\n activeFilters,\n history,\n // children\n loadNextPage,\n children\n}) => {\n const prevFilters = usePrevious(activeFilters);\n\n const [\n queryParams, skipFilterKeys, title\n ] = useMemo(\n () => getParams(activeFilters, window.location.pathname, wallFilters),\n [window.location.pathname, window.location.search, wallFilters]\n );\n\n const resetWallsFilter = () => {\n resetWalls();\n setTimeout(loadNextPage, 0);\n };\n\n useEffect(() => {\n if (activeFilters.with_work_id !== (prevFilters || {}).with_work_id) {\n resetWallsFilter();\n }\n }, [activeFilters.with_work_id]);\n\n useEffect(() => {\n if (!wallFilters) {\n fetchWallFilters();\n }\n }, []);\n\n return (\n
    \n
    \n

    { title }

    \n
    \n \n \n
    \n \n \n \n
    \n \n { children }\n
    \n );\n};\n\nWallsList.propTypes = {\n resetWalls: PropTypes.func.isRequired,\n fetchWallFilters: PropTypes.func.isRequired,\n // filters\n wallFilters: PropTypes.arrayOf(PropTypes.any),\n activeFilters: PropTypes.object.isRequired,\n history: ReactRouterPropTypes.history.isRequired,\n // children\n loadNextPage: PropTypes.func.isRequired,\n children: PropTypes.node.isRequired\n};\n\nexport default WallsList;\n","import React, { useEffect, useRef, useMemo } from 'react';\nimport queryString from 'query-string';\nimport PropTypes from 'prop-types';\nimport ReactRouterPropTypes from 'react-router-prop-types';\nimport InfiniteScroll from 'arts/components/InfiniteScroll';\nimport { Loader } from 'semantic-ui-react';\nimport Wall from './wall';\nimport WallsContainer from './container';\nimport NoResults from './no_results';\nimport CategoryDescription from '../category/category_description';\nimport { trackEvent } from '../../config/analytics';\n\nimport * as AppClasses from '../Application/styles.module.scss';\nimport { humanizeParams } from '../works/works';\nimport WallsList from '../walls/list';\n\n// eslint-disable-next-line react/prop-types\nconst ParentContainer = (parentRef) => ({ children }) => (\n \n { children }\n \n);\n\nconst WallsAsGrid = ({\n walls,\n loading,\n hasMore,\n fetchWalls,\n resetWalls,\n fetchWallFilters,\n wallFilters,\n page,\n history,\n activeFilters\n}) => {\n const canFetch = () => !loading && hasMore;\n\n const parentRef = useRef(null);\n\n const loadNextPage = () => {\n if (!canFetch()) { return; }\n fetchWalls(page + 1, activeFilters);\n };\n\n const renderWall = (wall, position) => {\n const href = `${ wall.href }?as=thumb&${ queryString.stringify({ ...activeFilters }) }`;\n return (\n \n );\n };\n\n useEffect(() => {\n if (!loading && walls.length && wallFilters) {\n const humanParams = humanizeParams(activeFilters, wallFilters);\n trackEvent('walls center', { ...humanParams, as: 'grid', 'walls count': walls.length });\n }\n }, [loading, walls.length, wallFilters]);\n\n const pc = useMemo(() => ParentContainer(parentRef), [parentRef]);\n\n return (\n \n
    \n \n {\n loading\n ? (\n
    \n \n Loading more items, hold on for a sec...\n \n
    \n )\n : null\n }\n \n \n
    \n \n );\n};\n\nWallsAsGrid.propTypes = {\n fetchWalls: PropTypes.func.isRequired,\n resetWalls: PropTypes.func.isRequired,\n fetchWallFilters: PropTypes.func.isRequired,\n // walls\n loading: PropTypes.bool.isRequired,\n walls: PropTypes.array.isRequired,\n hasMore: PropTypes.bool.isRequired,\n page: PropTypes.number.isRequired,\n // filters\n wallFilters: PropTypes.arrayOf(PropTypes.any),\n activeFilters: PropTypes.object.isRequired,\n history: ReactRouterPropTypes.history.isRequired\n};\n\nexport default WallsAsGrid;\n","import { connect } from 'react-redux';\nimport { fetchWalls, resetWalls, fetchWallFilters } from 'arts/actions/walls';\nimport WallsAsGrid from './walls_as_grid';\n\nconst mapStateToProps = ({ walls, wallFilters: { filters } }) => ({\n ...walls,\n wallFilters: filters\n});\n\nexport default connect(mapStateToProps, { fetchWalls, resetWalls, fetchWallFilters })(WallsAsGrid);\n","import React, { useEffect } from 'react';\nimport ReactRouterPropTypes from 'react-router-prop-types';\nimport PropTypes from 'prop-types';\nimport { Redirect } from 'react-router-dom';\nimport queryString from 'query-string';\nimport { Loader } from 'semantic-ui-react';\nimport NoResults from '../walls_as_grid/no_results';\nimport WallsList from '../walls/list';\n\n// this is only loader and redirector\n\nconst WallsAsPage = ({\n walls,\n loading,\n fetchWalls,\n hasMore,\n page,\n activeFilters,\n wallFilters,\n fetchWallFilters,\n history,\n resetWalls\n}) => {\n const canFetch = () => !loading && hasMore;\n\n const loadNextPage = () => {\n if (!canFetch()) { return; }\n fetchWalls(page + 1, activeFilters);\n };\n\n useEffect(() => {\n if (!walls.length) {\n loadNextPage();\n }\n }, []);\n\n if (walls.length) {\n const index = 0;\n const to = `${ walls[index].href }?${ queryString.stringify(activeFilters) }`;\n return ;\n }\n\n return (\n \n {\n loading\n ? (\n \n Loading more items, hold on for a sec...\n \n )\n : null\n }\n \n \n );\n};\n\nWallsAsPage.propTypes = {\n fetchWalls: PropTypes.func.isRequired,\n fetchWallFilters: PropTypes.func.isRequired,\n resetWalls: PropTypes.func.isRequired,\n // walls\n loading: PropTypes.bool.isRequired,\n walls: PropTypes.array.isRequired,\n hasMore: PropTypes.bool.isRequired,\n page: PropTypes.number.isRequired,\n // filters\n wallFilters: PropTypes.arrayOf(PropTypes.any),\n activeFilters: PropTypes.object.isRequired,\n history: ReactRouterPropTypes.history.isRequired\n};\n\nexport default WallsAsPage;\n","import { connect } from 'react-redux';\nimport { fetchWalls, resetWalls, fetchWallFilters } from 'arts/actions/walls';\nimport WallsAsPage from './walls_as_page';\n\nconst mapStateToProps = ({ walls, wallFilters: { filters } }) => ({\n ...walls,\n wallFilters: filters\n});\n\nexport default connect(mapStateToProps, { fetchWalls, resetWalls, fetchWallFilters })(WallsAsPage);\n","import React from 'react';\nimport queryString from 'query-string';\nimport { useParams } from 'react-router-dom';\nimport ReactRouterPropTypes from 'react-router-prop-types';\nimport { DEFAULT_GRID, THUMB } from './grid_selection';\nimport WallsAsGrid from '../walls_as_grid';\nimport WallsAsPage from '../walls_as_page';\nimport { VALID_QUERY_PARAMS } from './shared';\n\nexport const clearFilters = (params, skipParam = null) => {\n const out = {};\n VALID_QUERY_PARAMS.forEach(key => {\n const val = params[key];\n if (val && key !== skipParam) {\n out[key] = val;\n }\n });\n\n return out;\n};\n\nconst Walls = ({ history }) => {\n const extraParams = queryString.parse(window.location.search);\n const params = { ...useParams(), ...extraParams };\n const activeFilters = clearFilters(params);\n const format = params.as || DEFAULT_GRID;\n const props = {\n history, activeFilters\n };\n if (format === THUMB) {\n return ;\n }\n return ;\n};\n\nWalls.propTypes = {\n history: ReactRouterPropTypes.history.isRequired\n};\n\nexport default Walls;\n","export const VALID_QUERY_PARAMS = [\n 'newest',\n 'with_home_decor_style_id',\n 'with_room_id',\n 'with_price',\n 'query',\n 'with_work_id'\n];\n\nexport const BREADCRUMBS_LINKS = [{\n text: 'Gallery Walls',\n to: '/walls'\n}];\n","import { useRef, useEffect } from 'react';\n\nexport const usePrevious = (value) => {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n};\n","// extracted by mini-css-extract-plugin\nvar _1 = \"GnTxdLjaEAveUAPAK3Vg\";\nvar _2 = \"fHvf_erHDz6DUBG_TlfU\";\nvar _3 = \"SHYWF0Nt0E1U9D9FgA7L\";\nvar _4 = \"ZH_xP52rJyit3BsoOKMV\";\nvar _5 = \"hwtBvA5Gzgvnx6eDE27P\";\nvar _6 = \"Uctz7l38jJxS11gPk0E4\";\nvar _7 = \"wiVGqipIp7M28JdA_07g\";\nvar _8 = \"tGyt_x2fGxoqlBqCw7g1\";\nexport { _1 as \"description\", _2 as \"header\", _3 as \"headerText\", _4 as \"imgD\", _5 as \"imgM\", _6 as \"imgMHolder\", _7 as \"showLess\", _8 as \"showMore\" }\n"],"names":["fetchWalls","page","params","dispatch","type","Constants","Walls","FETCH","loadWallsApi","then","walls","FETCH_SUCCESS","catch","resetWalls","RESET","fetchWallFilters","loadWallFiltersApi","filters","WallFilters","Container","children","React","className","AppClasses","InfiniteScroll","items","itemRenderer","itemsContainer","DefaultContainer","onLoad","rootClassName","threshold","rootRef","useRef","ticking","setTicking","useState","recalculate","useCallback","current","top","height","getBoundingClientRect","scrollY","window","pageYOffset","innerHeight","onChange","setTimeout","requestAnimationFrame","useEffect","addEventListener","removeEventListener","length","content","useMemo","map","ref","CategoryDescription","description","skipShowMore","loadadble","showMore","setShowMore","renderDescription","setRenderDescription","loadPageDescriptionApi","res","location","href","button","Classes","onClick","classnames","ReactMarkdown","Wall","id","name","imageUrl","allowStores","storeItemId","wallPictures","discountPercent","position","displayPreview","setDisplayPreview","preview","ZoomModal","img","onHide","hidePreview","storeOpts","WallStoreItem","wallId","onWallClick","PinIt","Favorite","showPreview","Link","to","src","alt","style","propTypes","PropTypes","isRequired","NoResults","loading","mapSlugsToIds","out","Object","keys","forEach","key","parseInt","slugsMaps","home_decor_styles","rooms","GALERRY_WALLS","WallsList","wallFilters","activeFilters","history","loadNextPage","prevFilters","usePrevious","queryParams","skipFilterKeys","title","getParams","pathname","match","slug","split","pop","filter","find","f","options","o","with_room_id","with_home_decor_style_id","search","resetWallsFilter","with_work_id","GTMPageView","pageType","section","Filter","assign","path","label","VALID_QUERY_PARAMS","artFilters","BreadCrumbsGeneric","links","BREADCRUMBS_LINKS","GridSelection","grid","THUMB","WallsAsGrid","hasMore","parentRef","humanParams","humanizeParams","trackEvent","as","pc","WallsContainer","ParentContainer","renderWall","wall","queryString","stringify","forwardRef","Loader","active","inline","connect","mapStateToProps","WallsAsPage","Redirect","clearFilters","skipParam","val","extraParams","parse","useParams","props","DEFAULT_GRID","text","value","_1","_2","_3","_4","_5","_6","_7","_8"],"sourceRoot":""}