{"version":3,"file":"static/chunks/pages/advocacy/policy-making/naic-df94b8cffea77d03.js","mappings":"mMAiBA,WAAeA,EAAAA,EAAAA,IAZO,SAAAC,GACpB,OAAO,QAAC,IAAgBA,O,mHCE1B,IAAMC,EAAQ,CACZC,YAAa,CAAF,0HAuCb,IA7BA,SAA4BC,GA0B1B,OAzBA,SAAsBH,GACpB,OAA0DI,EAAAA,EAAAA,MAAlDC,EAAR,EAAQA,UAAWC,EAAnB,EAAmBA,gBAAiBC,EAApC,EAAoCA,kBAE9BC,IADeC,EAAAA,EAAAA,aAAbC,UACaC,EAAAA,EAAAA,KAAY,SAAAC,GAAK,OAAIA,EAAMC,KAAKR,cAErD,OAAIA,GAAaG,GAEb,eAAKM,IAAKb,EAAMC,cACd,QAAC,IAAD,OAKDG,GAAcG,GAAiBF,GAS7B,QAACH,EAAcH,IARpBO,EAAkB,CAChBQ,SAAU,CACRC,SAAUC,OAAOC,SAASR,YAGvB,S,sBCtCRO,OAAOE,SAAWF,OAAOE,UAAY,IAAIC,KAAK,CAC7C,+BACA,WACE,OAAO,EAAQ,Y","sources":["webpack://_N_E/./pages/advocacy/policy-making/naic.js","webpack://_N_E/./src/shared/components/WithAuthentication/index.js","webpack://_N_E/?2e74"],"sourcesContent":["import React from 'react';\n\nimport ContentPage from '@/src/cms/components/CMSPage/Content';\nimport withAuthentication from '@/src/shared/components/WithAuthentication';\n\nconst International = props => {\n return ;\n};\n\nexport async function getStaticProps() {\n return {\n props: {\n sitepageid: 506,\n },\n };\n}\n\nexport default withAuthentication(International);\n","import { useAuth0 } from '@auth0/auth0-react';\nimport { css, jsx } from '@emotion/core';\nimport Router, { useRouter } from 'next/router';\nimport React from 'react';\nimport { useSelector } from 'react-redux';\n\nimport LoadingPage from '../LoadingPage/LoadingPage';\n\nconst style = {\n loadingPage: css`\n height: 100vh;\n width: 100vw;\n background: white;\n display: flex;\n justify-content: center;\n align-items: center;\n `,\n};\n\nfunction withAuthentication(Component) {\n function NewComponent(props) {\n const { isLoading, isAuthenticated, loginWithRedirect } = useAuth0();\n const { pathname } = useRouter();\n const stateLoading = useSelector(state => state.auth.isLoading);\n\n if (isLoading || stateLoading) {\n return (\n
\n \n
\n );\n }\n\n if (!isLoading && !stateLoading && !isAuthenticated) {\n loginWithRedirect({\n appState: {\n returnTo: window.location.pathname,\n },\n });\n return null;\n }\n\n return ;\n }\n\n return NewComponent;\n}\n\nexport default withAuthentication;\n","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/advocacy/policy-making/naic\",\n function () {\n return require(\"private-next-pages/advocacy/policy-making/naic.js\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/advocacy/policy-making/naic\"])\n });\n }\n "],"names":["withAuthentication","props","style","loadingPage","Component","useAuth0","isLoading","isAuthenticated","loginWithRedirect","stateLoading","useRouter","pathname","useSelector","state","auth","css","appState","returnTo","window","location","__NEXT_P","push"],"sourceRoot":""}