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A,kBAAiB,CACnE1K,IAAayK,IAAAA,OAAiBE,WAC9B1K,MAAawK,IAAAA,OAAiBE,WAC9BvK,gBAAiBqK,IAAAA,OACjBtK,YAAasK,IAAAA,OAAgBC,EAAAA,EAAAA,kBAAiB,CAC7CtK,gBAAiBqK,IAAAA,UAElBvK,WAAa0K,EAA4BD,WACzCE,WAAaJ,IAAAA,S","sources":["components/BlueprintThumbnail.js","components/LoadingIcon.js","components/PageHeader.js","components/grid/MostFavoritedGrid.js","components/grid/PaginationControls.js","components/search/EfficientSearchForm.js","components/search/EfficientTagForm.js","components/single/Spinner.js","helpers/buildImageUrl.ts","helpers/getHeaders.ts","hooks/useAuthored.js","hooks/useFavorites.js","hooks/useTagOptions.js","propTypes/ImgurImageSummaryProjection.js","propTypes/BlueprintSummaryProjection.js"],"sourcesContent":["import {faHeart} from '@fortawesome/free-solid-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\n\nimport {useQueryClient} from '@tanstack/react-query';\nimport {forbidExtraProps} from 'airbnb-prop-types';\n\nimport React from 'react';\nimport Card from 'react-bootstrap/Card';\nimport OverlayTrigger from 'react-bootstrap/OverlayTrigger';\nimport Tooltip from 'react-bootstrap/Tooltip';\nimport {Link} from 'react-router-dom';\n\nimport NoAvailableImage from '../gif/No_available_image.gif';\n\nimport buildImageUrl from '../helpers/buildImageUrl';\nimport useAuthored from '../hooks/useAuthored';\nimport useFavorites from '../hooks/useFavorites';\nimport BlueprintSummaryProjection from '../propTypes/BlueprintSummaryProjection';\n\nBlueprintThumbnail.propTypes = forbidExtraProps({\n\tblueprintSummary: BlueprintSummaryProjection,\n});\n\nfunction BlueprintThumbnail({blueprintSummary: {key, title, imgurImage, voteSummary}}) {\n\tconst numberOfUpvotes = voteSummary?.numberOfUpvotes;\n\n\tconst queryClient = useQueryClient()\n\tif (voteSummary === undefined)\n\t{\n\t\tconsole.log('BlueprintThumbnail clearing the query cache')\n\t\tqueryClient.clear()\n\t}\n\n\tconst {isSuccess, data} = useFavorites();\n\tconst authoredResult = useAuthored();\n\n\tconst mine = authoredResult.isSuccess && authoredResult.data.includes(key);\n\tconst favorite = isSuccess && data.includes(key);\n\n\tconst tooltip = (\n\t\t\n\t\t\t{title}\n\t\t\n\t);\n\tconst imageUrl = imgurImage ?\n\t\tbuildImageUrl(imgurImage.imgurId, imgurImage.imgurType, 'b') :\n\t\tNoAvailableImage;\n\n\tconst mineStyle = mine ? 'text-warning' : 'text-default';\n\tconst favoriteStyle = favorite ? 'text-warning' : 'text-default';\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t\t{`${numberOfUpvotes}`} favorites\n\t\t\t\t\n\t\t\t\t\t{/* TODO: This heart should be a toggle button */}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{' '}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\n\t);\n}\n\nexport default BlueprintThumbnail;\n","import {faCog} from '@fortawesome/free-solid-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nLoadingIcon.propTypes = {\n\tisLoading: PropTypes.bool.isRequired,\n};\n\nfunction LoadingIcon(props)\n{\n\treturn props.isLoading\n\t\t? \n\t\t: <>;\n}\n\nexport default LoadingIcon;\n","import {forbidExtraProps} from 'airbnb-prop-types';\n\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport Row from 'react-bootstrap/Row';\n\nconst PageHeader = ({title}) =>\n\t(\n\t\t\n\t\t\t
\n\t\t\t\t{title}\n\t\t\t
\n\t\t\n\t);\n\nPageHeader.propTypes = forbidExtraProps({\n\ttitle: PropTypes.node.isRequired,\n});\n\nexport default PageHeader;\n","import {faExclamationTriangle} from '@fortawesome/free-solid-svg-icons';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport axios from 'axios';\nimport React, {useState} from 'react';\nimport Container from 'react-bootstrap/Container';\nimport Row from 'react-bootstrap/Row';\nimport {useQuery} from '@tanstack/react-query';\n\nimport {ArrayParam, StringParam, useQueryParam, withDefault} from 'use-query-params';\n\nimport BlueprintThumbnail from '../BlueprintThumbnail';\nimport PageHeader from '../PageHeader';\nimport EfficientSearchForm from '../search/EfficientSearchForm';\nimport EfficientTagForm from '../search/EfficientTagForm';\nimport Spinner from '../single/Spinner';\nimport PaginationControls from './PaginationControls';\n\nfunction MostFavoritedGrid()\n{\n\tconst [page, setPage] = useState(1);\n\n\tconst [titleFilter] = useQueryParam('title', StringParam);\n\tconst [selectedTags] = useQueryParam('tags', withDefault(ArrayParam, []));\n\n\tconst fetchBlueprintSummaries = async (page = 1, titleFilter, selectedTags) =>\n\t{\n\t\tconst url = `${process.env.REACT_APP_REST_URL}/api/blueprintSummaries/top/page/${page}`;\n\t\tconst params = new URLSearchParams();\n\t\tif (titleFilter)\n\t\t{\n\t\t\tparams.append('title', titleFilter);\n\t\t}\n\t\tselectedTags.forEach(tag => params.append('tag', '/' + tag + '/'));\n\t\tconst result = await axios.get(url, {params});\n\t\treturn result.data;\n\t};\n\n\tconst options = {\n\t\tkeepPreviousData: true,\n\t\tplaceholderData : {_data: [], _metadata: {pagination: {numberOfPages: 0, pageNumber: 0}}},\n\t};\n\tconst result = useQuery(['top', page, titleFilter, selectedTags], () => fetchBlueprintSummaries(page, titleFilter, selectedTags), options);\n\n\t// TODO: Refactor out grid commonality\n\n\tconst {isLoading, isError, data, isPreviousData} = result;\n\n\tif (isLoading)\n\t{\n\t\treturn \n\t}\n\n\tif (isError)\n\t{\n\t\tconsole.log({result});\n\t\treturn (\n\t\t\t