{"version":3,"sources":["webpack:///./src/components/molecules/ExploreTopics/ExploreTopics.tsx","webpack:///./src/components/molecules/PopularPosts/PopularPosts.tsx","webpack:///./src/components/organisms/aside/AsideBar.tsx","webpack:///./src/components/organisms/grid-layout/GridLayout.tsx","webpack:///./src/components/organisms/videos-carousel/videos-carousel.tsx","webpack:///./src/templates/videosTemplate.tsx","webpack:///./src/components/molecules/PreviewCard/PreviewCard.tsx","webpack:///./src/components/molecules/paginator/Paginator.tsx","webpack:///./src/utils/arrayUtilities.ts"],"names":["ExploreTopics","topics","useStaticQuery","allContentfulSubcategoria","nodes","referenciaSubcategorias","React","createElement","className","map","topic","key","Link","to","slug","nombreSubcategoria","PopularPosts","posts","setPosts","useState","data","useEffect","_data$allContentfulHo","_data$allContentfulHo2","allContentfulHome","process","shuffleArray","node","_node$referenciaSubca","filter","item","tipoContenido","length","flat","titulo","referenciaInterna","referenciaCabecera","tituloPrincipal","imagen","imagenHeader","file","url","fecha","dateToRelativeFormat","createdAt","slice","post","withPrefix","src","alt","AsideBar","GridLayout","props","children","trim","style","gridTemplateColumns","columns","gap","padding","VideosCarousel","_ref","actualVideo","setActualVideo","videos","carouselRef","useRef","actualIndex","setActualIndex","showPopUp","setShowPopUp","scrollCarousel","direction","carousel","current","newActualIndex","video","image","indexOf","valueToScroll","scrollLeft","scroll","scrollWidth","compClass","Fragment","VideosPopUp","FaLongArrowAltLeft","onClick","FaLongArrowAltRight","ref","index","updateActualVideo","dangerouslySetInnerHTML","__html","span","VideosTemplate","pageData","pageContext","pageContent","numPages","currentPage","elements","redireccionBoton","tituloSpan","migaDePan","Layout","hideHeaderDesktop","hideHeaderMobile","isNotRoot","SEO","title","metaTitulo","nombreCategoria","description","metaDescripcion","json","content","value","lang","VideosHeader","element","i","_element$video","imageUrl","leftSub","link","replace","external","rightSub","icon","FaYoutube","PreviewCard","Object","assign","Paginator","quantity","Suscribe","adapterSuscribe","Disclaimer","target","next","back","Array","from","_","active","array","randomIndex","currentIndex","Math","floor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tDP,kCAAO,MAAM7G,EAAgBwH,IAC3B,IAAIA,EAAO,MAAO,GAClB,IACEC,EADEC,EAAeF,EAAMlH,OAEzB,KAAuB,GAAhBoH,GACLD,EAAcE,KAAKC,MAAMD,KAAKE,SAAWH,GACzCA,KACCF,EAAME,GAAeF,EAAMC,IAAgB,CAC1CD,EAAMC,GACND,EAAME,IAGV,OAAOF,I","file":"component---src-templates-videos-template-tsx-5c639d277629630c2b81.js","sourcesContent":["import React, { useState } from \"react\";\r\nimport { useStaticQuery, graphql, Link } from \"gatsby\";\r\nimport \"./ExploreTopics.scss\";\r\n\r\nconst ExploreTopics = () => {\r\n const data = useStaticQuery(graphql`\r\n query exploreQuery {\r\n allContentfulSubcategoria(\r\n filter: { contentful_id: { eq: \"409cITTPuyHorR4bnTIBWl\" } }\r\n ) {\r\n nodes {\r\n titulo\r\n referenciaSubcategorias {\r\n slug\r\n nombreSubcategoria\r\n }\r\n id\r\n contentful_id\r\n }\r\n }\r\n }\r\n `);\r\n\r\n const topics =\r\n data.allContentfulSubcategoria.nodes[0].referenciaSubcategorias;\r\n \r\n return (\r\n
\r\n
\r\n

Explorar temas

\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default ExploreTopics;\r\n","import React, { useEffect, useState } from \"react\";\r\nimport { useStaticQuery, graphql, Link, withPrefix } from \"gatsby\";\r\n\r\nimport \"./PopularPosts.scss\";\r\nimport { shuffleArray } from \"../../../utils/arrayUtilities\";\r\nimport { dateToRelativeFormat } from \"../../../utils/dateToRelativeFormat\";\r\n\r\nconst PopularPosts = () => {\r\n const [posts, setPosts] = useState([]);\r\n const data = useStaticQuery(graphql`\r\n query data2 {\r\n allContentfulHome {\r\n nodes {\r\n referenciaSubcategorias {\r\n titulo\r\n slug\r\n referenciaSubcategorias {\r\n titulo\r\n slug\r\n tipoContenido\r\n createdAt\r\n referenciaInterna {\r\n referenciaCabecera {\r\n imagenHeader {\r\n file {\r\n url\r\n }\r\n }\r\n tituloPrincipal\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n `);\r\n\r\n useEffect(() => {\r\n if(!data.allContentfulHome?.nodes[0]?.referenciaSubcategorias) return;\r\n const process = shuffleArray(\r\n data.allContentfulHome.nodes[0].referenciaSubcategorias\r\n .map((node) => {\r\n const articles = node.referenciaSubcategorias\r\n ?.filter((item) => item.tipoContenido === \"Articulo\")\r\n .map((item) => ({ ...item, slug: node.slug + item.slug }));\r\n return articles;\r\n })\r\n .filter((item) => (item ? item.length >= 1 : false))\r\n .flat()\r\n .map((item) => ({\r\n slug: item.slug,\r\n titulo: item.referenciaInterna.referenciaCabecera.tituloPrincipal,\r\n imagen:\r\n item.referenciaInterna.referenciaCabecera.imagenHeader.file.url,\r\n fecha: dateToRelativeFormat(item.createdAt),\r\n }))\r\n );\r\n setPosts(process.slice(0, 3));\r\n }, []);\r\n\r\n return (\r\n
\r\n
\r\n

Entradas populares

\r\n
\r\n {posts.map((post, key) => (\r\n \r\n
\r\n
\r\n \"\"\r\n
\r\n
\r\n

{post.titulo}

\r\n
\r\n
\r\n {post.fecha}\r\n
\r\n
\r\n
\r\n
\r\n \r\n ))}\r\n
\r\n );\r\n};\r\n\r\nexport default PopularPosts;\r\n","import React from 'react'\r\nimport ExploreTopics from '../../molecules/ExploreTopics/ExploreTopics'\r\nimport PopularPosts from '../../molecules/PopularPosts/PopularPosts'\r\n\r\nimport \"./AsideBar.scss\"\r\n\r\nconst AsideBar = () => {\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default AsideBar\r\n","import React from \"react\";\r\nimport \"./grid-layout.scss\";\r\n\r\ntype GridLayoutProps = {\r\n columns?: string;\r\n gap?: string;\r\n padding?: string;\r\n children?: React.ReactNode;\r\n className?: string;\r\n};\r\n\r\nconst GridLayout = (props: GridLayoutProps) => {\r\n const { children } = props;\r\n const compClass = \"o-gridLayout\";\r\n return (\r\n
\r\n \r\n {children}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default GridLayout;\r\n","import React, { useRef, useEffect, useState } from \"react\";\r\nimport { FaLongArrowAltLeft, FaLongArrowAltRight } from \"react-icons/fa\";\r\nimport VideosPopUp from \"../videos-popup/videos-popup\";\r\nimport \"./videos-carousel.scss\";\r\n\r\nconst VideosCarousel = ({ actualVideo, setActualVideo, videos }) => {\r\n const carouselRef = useRef();\r\n const scrollStep = 200;\r\n const [actualIndex, setActualIndex] = useState(0);\r\n const [showPopUp, setShowPopUp] = useState(false);\r\n\r\n const scrollCarousel = (direction) => {\r\n const carousel = carouselRef.current;\r\n const newActualIndex = videos\r\n .map((video) => video.image)\r\n .indexOf(actualVideo.image);\r\n if (direction === \"left\") {\r\n setActualIndex(newActualIndex - 1);\r\n setActualIndex(newActualIndex === 0 ? 0 : newActualIndex - 1);\r\n setActualVideo(\r\n newActualIndex === 0 ? videos[0] : videos[newActualIndex - 1]\r\n );\r\n const valueToScroll =\r\n carousel.scrollLeft - scrollStep < 0\r\n ? 0\r\n : carousel.scrollLeft - scrollStep;\r\n carousel.scroll(valueToScroll, 0);\r\n } else {\r\n setActualIndex(\r\n newActualIndex === videos.length - 1\r\n ? videos.length - 1\r\n : newActualIndex + 1\r\n );\r\n setActualVideo(\r\n newActualIndex === videos.length - 1\r\n ? videos[videos.length - 1]\r\n : videos[newActualIndex + 1]\r\n );\r\n const valueToScroll =\r\n carousel.scrollLeft + scrollStep >= carousel.scrollWidth\r\n ? carousel.scrollWidth\r\n : carousel.scrollLeft + scrollStep;\r\n carousel.scroll(valueToScroll, 0);\r\n }\r\n };\r\n const compClass = \"o-carousel-videos\";\r\n const updateActualVideo = (video, index) => {\r\n setActualVideo(video);\r\n setActualIndex(index);\r\n };\r\n useEffect(() => {\r\n setActualVideo(videos[0]);\r\n }, []);\r\n\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n \r\n Videos\r\n
\r\n más recientes\r\n
\r\n
\r\n scrollCarousel(\"left\")} />\r\n scrollCarousel(\"right\")} />\r\n
\r\n
\r\n
\r\n {videos.map((video, index) => (\r\n updateActualVideo(video, index)}\r\n className={`${compClass}__iframeWrapper ${\r\n index === actualIndex\r\n ? `${compClass}__iframeWrapper-active`\r\n : \"\"\r\n } `}\r\n >\r\n setShowPopUp(true)}\r\n />\r\n
\r\n setShowPopUp(true)}\r\n >\r\n

{video?.span || \"Span\"}

\r\n
\r\n
\r\n ))}\r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nexport default VideosCarousel;\r\n","import React, { useState } from \"react\";\r\nimport { FaYoutube } from \"react-icons/fa\";\r\nimport Disclaimer from \"../components/molecules/disclaimer/disclaimer\";\r\nimport Paginator from \"../components/molecules/paginator/Paginator\";\r\nimport PreviewCard, {\r\n PreviewCardProps,\r\n} from \"../components/molecules/PreviewCard/PreviewCard\";\r\nimport Suscribe from \"../components/molecules/suscribe/suscribe\";\r\nimport AsideBar from \"../components/organisms/aside/AsideBar\";\r\nimport GridLayout from \"../components/organisms/grid-layout/GridLayout\";\r\nimport Layout from \"../components/organisms/layout/layout\";\r\nimport VideosCarousel from \"../components/organisms/videos-carousel/videos-carousel\";\r\nimport VideosHeader from \"../components/organisms/videos-header/videos-header\";\r\nimport { adapterSuscribe } from \"../components/templates/library-components/adapters\";\r\nimport SEO from \"../shared/seo\";\r\nimport { dateToRelativeFormat } from \"../utils/dateToRelativeFormat\";\r\nimport \"./../styles/index.scss\";\r\n\r\nconst VideosTemplate = (props: any) => {\r\n const pageData = props.pageContext.pageContent;\r\n const { slug, numPages, currentPage, elements } = props.pageContext;\r\n const videos = elements.map((node) => {\r\n return {\r\n imagen: node.referenciaInterna.referenciaCabecera.imagenHeader.file.url,\r\n video: node.referenciaInterna.referenciaCabecera.redireccionBoton,\r\n titulo: node.referenciaInterna.referenciaCabecera.tituloPrincipal,\r\n span: node.referenciaInterna.referenciaCabecera.tituloSpan,\r\n migaDePan: node.referenciaInterna.referenciaCabecera.migaDePan,\r\n slug: node.slug,\r\n fecha: node.createdAt,\r\n };\r\n });\r\n const [actualVideo, setActualVideo] = useState(videos[0]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n {videos.map((element, i) => {\r\n let process: PreviewCardProps = {\r\n description: element.span,\r\n imageUrl: element.imagen,\r\n leftSub: \"Video\",\r\n link: element.video?.replace(\"embed/\", \"watch?v=\"),\r\n external: true,\r\n rightSub: dateToRelativeFormat(element.fecha),\r\n title: element.titulo,\r\n icon: ,\r\n };\r\n return ;\r\n })}\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n\r\nexport default VideosTemplate;\r\n","import React from \"react\";\r\nimport { Link } from \"gatsby\";\r\nimport \"./previewCard.scss\";\r\n\r\nexport type PreviewCardProps = {\r\n link: string;\r\n external?: boolean;\r\n imageUrl: string;\r\n leftSub?: string;\r\n rightSub?: string;\r\n title: string;\r\n description?: string;\r\n icon?: React.ReactNode;\r\n};\r\n\r\nconst PreviewCard = (props: PreviewCardProps) => {\r\n const compClass = \"m-previewCard\";\r\n const {\r\n link,\r\n external,\r\n description,\r\n imageUrl,\r\n leftSub,\r\n rightSub,\r\n title,\r\n icon,\r\n } = props;\r\n return (\r\n \r\n
\r\n
\r\n {title\r\n
\r\n
\r\n
\r\n \r\n {icon && icon} {leftSub}\r\n \r\n {rightSub}\r\n
\r\n \r\n

\r\n {description || \"Ver más.\"}\r\n

\r\n
\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default PreviewCard;\r\n","import { Link } from \"gatsby\";\r\nimport React from \"react\";\r\nimport \"./paginator.scss\";\r\n\r\nexport interface IPaginator {\r\n quantity: number;\r\n currentPage: number;\r\n slug: string;\r\n}\r\n\r\nconst Paginator = (props: IPaginator) => {\r\n const { quantity, currentPage, slug } = props;\r\n const compClass = \"m-paginator\";\r\n const itemClass = (active) => {\r\n return `${compClass}__item ${\r\n active ? `${compClass}__item--active` : \"\"\r\n }`.trim();\r\n };\r\n let next = currentPage + 1;\r\n let back = currentPage - 1;\r\n return (\r\n
\r\n \r\n Atrás\r\n \r\n
\r\n {Array.from({ length: quantity }).map((_, index) => {\r\n if (index < currentPage - 3 && index !== 0) return \".\";\r\n if (index > currentPage + 2 && index !== quantity - 1) return \".\";\r\n return (\r\n \r\n {index === 0 ? (\r\n {index + 1}\r\n ) : (\r\n {index + 1}\r\n )}\r\n \r\n );\r\n })}\r\n
\r\n
\r\n {currentPage}\r\n de\r\n {quantity}\r\n
\r\n \r\n Siguiente\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default Paginator;\r\n","export const shuffleArray = (array) => {\r\n if(!array) return [];\r\n let currentIndex = array.length,\r\n randomIndex;\r\n while (currentIndex != 0) {\r\n randomIndex = Math.floor(Math.random() * currentIndex);\r\n currentIndex--;\r\n [array[currentIndex], array[randomIndex]] = [\r\n array[randomIndex],\r\n array[currentIndex],\r\n ];\r\n }\r\n return array;\r\n};\r\n"],"sourceRoot":""}