{"version":3,"sources":["polyfills.js","config.js","Home.jsx","App.jsx","registerServiceWorker.js","index.js"],"names":["window","TextEncoder","oidc","clientId","process","issuer","redirectUri","scopes","pkce","disableHttpsCheck","OKTA_TESTING_DISABLEHTTPSCHECK","Home","useOktaAuth","authState","authService","useEffect","isAuthenticated","getUser","then","info","undefined","groups","indexOf","location","href","login","isPending","App","config","text","style","marginTop","path","exact","component","LoginCallback","isLocalhost","Boolean","hostname","match","registerValidSW","swUrl","navigator","serviceWorker","register","registration","onupdatefound","installingWorker","installing","onstatechange","state","controller","console","log","catch","error","ReactDOM","render","document","getElementById","URL","origin","addEventListener","fetch","response","status","headers","get","ready","unregister","reload","checkValidServiceWorker","registerServiceWorker"],"mappings":"sPAIkC,qBAAvBA,OAAOC,cAChBD,OAAOC,YAAcA,e,sCCDR,GACbC,KAAM,CACJC,SANcC,uBAOdC,OANWD,kEAOXE,YAAaF,gEACbG,OAAQ,CAAC,SAAU,UAAW,SAC9BC,MAAM,EACNC,kBATmCL,y/BAAYM,iCAAkC,ICwDtEC,EA3CF,WAAO,IAAD,EACoBC,wBAA3BC,EADO,EACPA,UAAWC,EADJ,EACIA,YA+BnB,OA7BAC,qBAAU,WACDF,EAAUG,gBAIXF,EAAYG,UAAUC,MAAK,SAACC,QACJC,IAAhBD,EAAKE,QAAwBF,EAAKE,OAAOC,QAAQlB,cAA+C,EAChGJ,OAAOuB,SAASC,KAAOpB,uCAEAgB,IAAhBD,EAAKE,SACXF,EAAKE,OAAOC,QAAQlB,iBAAmD,GACpEe,EAAKE,OAAOC,QAAQlB,2CAAoD,GAC5EJ,OAAOuB,SAASC,KAAOpB,+BAEAgB,IAAhBD,EAAKE,SACXF,EAAKE,OAAOC,QAAQlB,iBAAgD,GACjEe,EAAKE,OAAOC,QAAQlB,uCAAiD,GACzEJ,OAAOuB,SAASC,KAAOpB,kCAEAgB,IAAhBD,EAAKE,QAAwBF,EAAKE,OAAOC,QAAQlB,wCAA0C,EAClGJ,OAAOuB,SAASC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,eAKpB9B,EAAgBC,MAGnBa,OAAM,WACLF,QAAQC,IACN,oEA5DAkB,CAAwB9B,GAGxBD,EAAgBC,OC7BxB+B,K","file":"static/js/main.47985d5e.chunk.js","sourcesContent":["// polyfill TextEncoder for IE Edge\r\nimport { TextEncoder } from 'text-encoding';\r\n\r\n/* global window */\r\nif (typeof window.TextEncoder === 'undefined') {\r\n window.TextEncoder = TextEncoder;\r\n}\r\n","const CLIENT_ID = process.env.REACT_APP_CLIENT_ID || '';\r\nconst ISSUER = process.env.REACT_APP_ISSUER || '';\r\nconst OKTA_TESTING_DISABLEHTTPSCHECK = process.env.OKTA_TESTING_DISABLEHTTPSCHECK || false;\r\n\r\nexport default {\r\n oidc: {\r\n clientId: CLIENT_ID,\r\n issuer: ISSUER,\r\n redirectUri: process.env.REACT_APP_SITE_BASE_URL + '/implicit/callback',\r\n scopes: ['openid', 'profile', 'email'],\r\n pkce: true,\r\n disableHttpsCheck: OKTA_TESTING_DISABLEHTTPSCHECK,\r\n }\r\n};\r\n","/*\r\n * Copyright (c) 2018, Okta, Inc. and/or its affiliates. All rights reserved.\r\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\r\n *\r\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n *\r\n * See the License for the specific language governing permissions and limitations under the License.\r\n */\r\n\r\nimport { useOktaAuth } from '@okta/okta-react';\r\nimport React, { useEffect } from 'react';\r\n\r\nconst Home = () => {\r\n const { authState, authService } = useOktaAuth();\r\n\r\n useEffect(() => {\r\n if (!authState.isAuthenticated) {\r\n // When user isn't authenticated, forget any user info\r\n authService.login('/');\r\n } else {\r\n authService.getUser().then((info) => {\r\n if (info.groups !== undefined && info.groups.indexOf(process.env.REACT_APP_TRAVELERPORTAL_GROUP) >= 0) {\r\n window.location.href = process.env.REACT_APP_TRAVELERPORTAL_URL;\r\n\r\n } else if (info.groups !== undefined &&\r\n (info.groups.indexOf(process.env.REACT_APP_CLIENTPORTALTRAVEL_GROUP) >= 0 ||\r\n info.groups.indexOf(process.env.REACT_APP_CLIENTPORTALTRAVEL_GROUP2) >= 0)) {\r\n window.location.href = process.env.REACT_APP_CLIENTPORTALTRAVEL_URL;\r\n\r\n } else if (info.groups !== undefined &&\r\n (info.groups.indexOf(process.env.REACT_APP_AFFILIATEPORTAL_GROUP) >= 0 ||\r\n info.groups.indexOf(process.env.REACT_APP_AFFILIATEPORTAL_GROUP2) >= 0)) {\r\n window.location.href = process.env.REACT_APP_AFFILIATEPORTAL_URL;\r\n \r\n } else if (info.groups !== undefined && info.groups.indexOf(process.env.REACT_APP_CLIENTPRN_GROUP) >= 0) {\r\n window.location.href = process.env.REACT_APP_CLIENTPRN_URL;\r\n\r\n } else {\r\n window.location.href = process.env.REACT_APP_OKTA_USER_HOME;\r\n }\r\n });\r\n }\r\n }, [authState, authService]); // Update if authState changes\r\n\r\n if (authState.isPending) {\r\n return (\r\n