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AUC,EAAML,EAANK,OAAM,OACpE,WACI,IAAMC,GAAc/B,EAAAA,EAAAA,KAMpB,OAJAa,EAAAA,EAAAA,YAAU,YACN3B,EAAAA,EAAAA,IACJ,GAAG,IAGC8C,EAAAA,cAACC,EAAAA,EAAc,CAACd,OAAQA,GACpBa,EAAAA,cAACE,EAAAA,QAAW,CAEJJ,OAAAA,EACAD,SAAAA,EACAH,kBAAAA,EACAC,aAAAA,EACAI,YAAAA,EACAI,YAAahC,EAAAA,SACbyB,WAAAA,IAKpB,CAAE,ECtCNQ,IAAAA,SAAsB,CAACC,SAAAA,G","sources":["webpack://sniffspot/./frontend/src/helpers/firebase.js","webpack://sniffspot/./frontend/src/helpers/firstClick.js","webpack://sniffspot/./frontend/src/rails/bundles/hooks/useMobileScreen.jsx","webpack://sniffspot/./frontend/src/rails/bundles/Blog/components/BlogHome.client.jsx","webpack://sniffspot/./frontend/src/rails/packs/generated/BlogHome.js"],"sourcesContent":["// Import the functions you need from the SDKs you need\nimport { initializeApp } from 'firebase/app';\nimport { getAnalytics } from 'firebase/analytics';\nimport { getPerformance } from 'firebase/performance';\n// TODO: Add SDKs for Firebase products that you want to use\n// https://firebase.google.com/docs/web/setup#available-libraries\n\n// Your web app's Firebase configuration\n// For Firebase JS SDK v7.20.0 and later, measurementId is optional\nconst firebaseConfig = {\n apiKey: 'AIzaSyAaLCqfgJam5xganH4Mjpp3f1O8Z8vJw1k',\n authDomain: 'sniffspot-1536749561931.firebaseapp.com',\n databaseURL: 'https://sniffspot-1536749561931.firebaseio.com',\n projectId: 'sniffspot-1536749561931',\n storageBucket: 'sniffspot-1536749561931.appspot.com',\n messagingSenderId: '615270541288',\n appId: '1:615270541288:web:97cb125114184f97cfa65d',\n measurementId: 'G-G6KD383WXF',\n};\n\n// Initialize Firebase\nconst app = initializeApp(firebaseConfig);\n\n// Initialize Analytics and get a reference to the service\nexport const analytics = getAnalytics(app);\n\n// Initialize Performance Monitoring and get a reference to the service\nexport const perf = getPerformance(app);\n","import { COOKIE_PARAM_NAME } from '../consts/cookies.consts';\nimport CookieService from '../services/cookie.service';\n\nexport const setFirstClick = () => {\n const isWindow = typeof window !== undefined;\n\n if (!isWindow) {\n return;\n }\n\n const hasFirstClick = CookieService.get(COOKIE_PARAM_NAME.SNIFF_FIRST_CLICK);\n\n if (hasFirstClick) {\n return;\n }\n\n const firstClick = window.document.referrer || window.location.href;\n CookieService.set(COOKIE_PARAM_NAME.SNIFF_FIRST_CLICK, firstClick);\n};\n","import { useCallback, useEffect, useState } from 'react';\n\nexport const MOBILE_SCREEN = '(min-width: 0px) and (max-width: 768px)';\n\nexport default function useMobileScreen() {\n const [isMobile, setIsMobile] = useState(true);\n\n const handleResize = useCallback((e) => {\n const window = e.currentTarget;\n const newWidth = window.matchMedia(MOBILE_SCREEN).matches;\n if (isMobile !== newWidth) {\n setIsMobile(newWidth);\n }\n });\n\n useEffect(() => {\n setIsMobile(window.matchMedia(MOBILE_SCREEN).matches);\n }, []);\n\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, [handleResize]);\n\n return isMobile;\n}\n","import '../../../../../styles.scss';\nimport React, { useEffect, useState } from 'react';\nimport { AWS_STATIC_ASSET_HOST } from '../../../../consts/env.consts';\nimport { ApolloClient, ApolloProvider, InMemoryCache } from '@apollo/client';\nimport { setFirstClick } from '../../../../helpers/firstClick';\nimport useMobileScreen from '../../hooks/useMobileScreen';\nimport BlogHomeSSR from '../../../../pages/blog';\nimport '../../../../helpers/firebase';\n\n// eslint-disable-next-line no-undef\n__webpack_public_path__ = `${AWS_STATIC_ASSET_HOST}/packs/`;\n\nconst client = new ApolloClient({\n uri: '/graphql',\n cache: new InMemoryCache(),\n});\n\nconst BlogHome =\n ({ blogCategoriesSSR, blogPostsSSR, totalPages }, { pathname, search }) =>\n () => {\n const isMobileSSR = useMobileScreen();\n\n useEffect(() => {\n setFirstClick();\n }, []);\n\n return (\n \n \n \n );\n };\n\nexport default BlogHome;\n","import ReactOnRails from 'react-on-rails';\nimport BlogHome from '../../bundles/Blog/components/BlogHome.client.jsx';\n\nReactOnRails.register({BlogHome});\n"],"names":["app","initializeApp","apiKey","authDomain","databaseURL","projectId","storageBucket","messagingSenderId","appId","measurementId","getAnalytics","getPerformance","setFirstClick","undefined","window","CookieService","get","COOKIE_PARAM_NAME","SNIFF_FIRST_CLICK","firstClick","document","referrer","location","href","set","MOBILE_SCREEN","useMobileScreen","_useState2","_slicedToArray","useState","isMobile","setIsMobile","handleResize","useCallback","e","newWidth","currentTarget","matchMedia","matches","useEffect","addEventListener","removeEventListener","__webpack_public_path__","concat","AWS_STATIC_ASSET_HOST","client","ApolloClient","uri","cache","InMemoryCache","_ref","_ref2","blogCategoriesSSR","blogPostsSSR","totalPages","pathname","search","isMobileSSR","React","ApolloProvider","BlogHomeSSR","useStateSSR","ReactOnRails","BlogHome"],"sourceRoot":""}