{"version":3,"sources":["logo.svg","redtail.js","salesforce.js","App.js","serviceWorker.js","index.js"],"names":["module","exports","Redtail","props","state","response","errorMessage","token","env","query","URLSearchParams","window","location","search","queryString","get","fetch","envresponse","ok","Error","statusText","json","envJson","console","log","isNaN","this","url","then","body","CRMContactId","open","catch","err","setState","message","src","className","React","Component","Salesforce","newClientUrl","existingClientUrl","ClientId","IsExistingClient","ClientNumber","App","exact","path","Boolean","hostname","match","ReactDOM","render","StrictMode","document","getElementById","navigator","serviceWorker","ready","registration","unregister","error"],"mappings":"mJAAAA,EAAOC,QAAU,IAA0B,kC,4LCuE5BC,E,kDArEX,WAAYC,GAAQ,IAAD,8BACf,cAAMA,IACDC,MAAQ,CACTC,SAAU,GACVC,aAAc,GACdC,MAAO,GACPC,IAAK,IANM,E,wMAWTC,EAAQ,IAAIC,gBAAgBC,OAAOC,SAASC,QAC5CC,EAAcL,EAAMM,IAAI,eAE1BP,EAAM,G,kBAGoBQ,MAAM,gB,WAA1BC,E,QACWC,G,sBACPC,MAAMF,EAAYG,Y,wBAENH,EAAYI,O,QAA5BC,E,OACNd,EAAMc,EAAQd,I,kDAEde,QAAQC,IAAR,M,QAGAC,MAAMX,IACNY,KAAKtB,MAAMG,MAAQO,EACfa,EAAM,mBAAqBnB,EAAM,mDAClB,GACnBQ,MAAM,4BAAD,OAA6BU,KAAKtB,MAAMG,QACxCqB,MAAK,SAAAvB,GAAQ,OAAIA,EAASgB,OAAOO,MAAK,SAAAC,GAAI,MAAK,CAAExB,WAAUwB,cAC3DD,MAAK,YAAyB,IAAtBvB,EAAqB,EAArBA,SAAUwB,EAAW,EAAXA,KACXxB,EAASa,KACMW,EAAKC,aACpBnB,OAAOoB,KAAKJ,EAAK,aAGxBK,OAAM,SAAAC,GACH,EAAKC,SAAS,CAAE5B,aAAc2B,EAAIE,cAI1CT,KAAKQ,SAAS,CAAE5B,aAAc,0B,+IAIlC,OACI,8BACMoB,KAAKtB,MAAME,cAAgB,wGAG3BoB,KAAKtB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B,+IAMlC,OACI,yBAAK+B,UAAU,OACX,4BAAQA,UAAU,eACZX,KAAKtB,MAAME,cAAgB,wGAG3BoB,KAAKtB,MAAME,cAAgB,yBAAK8B,IAAI,oBAIrCV,KAAKtB,MAAME,cACR,6BACI,yBAAK+B,UAAU,WACX,6FAAqE,6BACrE,qG,GArFPC,IAAMC,WCsChBO,E,uKAvBP,OACI,yBAAKT,UAAU,OACX,4BAAQA,UAAU,cACd,kBAAC,IAAD,KACI,kBAAC,IAAD,KACI,kBAAC,IAAD,CAAOU,OAAK,EAACC,KAAK,qBACd,kBAAC,EAAD,OAEJ,kBAAC,IAAD,CAAOD,OAAK,EAACC,KAAK,SACd,kBAAC,EAAD,OAEJ,kBAAC,IAAD,CAAOD,OAAK,EAACC,KAAK,yBACd,kBAAC,EAAD,e,GAfdV,IAAMC,WCDJU,QACW,cAA7BtC,OAAOC,SAASsC,UAEe,UAA7BvC,OAAOC,SAASsC,UAEhBvC,OAAOC,SAASsC,SAASC,MACvB,2DCZNC,IAASC,OACP,kBAAC,IAAMC,WAAP,KACE,kBAAC,EAAD,OAEFC,SAASC,eAAe,SDyHpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrB/B,MAAK,SAAAgC,GACJA,EAAaC,gBAEd7B,OAAM,SAAA8B,GACLvC,QAAQuC,MAAMA,EAAM3B,c","file":"static/js/main.c96b9b46.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/logo.00694ddf.svg\";","import React from 'react'\r\nclass Redtail extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n response: '',\r\n errorMessage: '',\r\n token: '',\r\n env: ''\r\n }\r\n }\r\n\r\n async componentDidMount() {\r\n const query = new URLSearchParams(window.location.search);\r\n const queryString = query.get('rtRequestId')\r\n\r\n var env = '';\r\n\r\n try {\r\n const envresponse = await fetch(`/home/GetEnv`);\r\n if (!envresponse.ok) {\r\n throw Error(envresponse.statusText);\r\n }\r\n const envJson = await envresponse.json();\r\n env = envJson.env;\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n\r\n if (isNaN(queryString)) {\r\n this.state.token = queryString;\r\n var url = 'https://acportal' + env + '.kestrafinancial.com/Pages/home?redtailsync=true';\r\n var crmContactId = '';\r\n fetch(`/api/redtail?rtrequestid=${this.state.token}`)\r\n .then(response => response.json().then(body => ({ response, body })))\r\n .then(({ response, body }) => {\r\n if (response.ok) {\r\n crmContactId = body.CRMContactId;\r\n window.open(url, '_self');\r\n }\r\n })\r\n .catch(err => {\r\n this.setState({ errorMessage: err.message });\r\n });\r\n }\r\n else {\r\n this.setState({ errorMessage: '404 error : not found' });\r\n }\r\n }\r\n render() {\r\n return ( \r\n
\r\n {!this.state.errorMessage &&

\r\n SYNC IN PROGRESS - YOU WILL BE REDIRECTED TO ADVISORCOMPLETE MOMENTARILY\r\n

}\r\n {!this.state.errorMessage && }\r\n\r\n {/* {this.state.errorMessage &&

{this.state.errorMessage}

} */}\r\n\r\n {this.state.errorMessage &&\r\n
\r\n
\r\n

Oops, something went wrong! The data sync failed unexpectedly.



\r\n

Please close the window, or click the button below to go back.

\r\n
\r\n
\r\n }\r\n
\r\n );\r\n }\r\n}\r\nexport default Redtail\r\n","import React from 'react'\r\nclass Salesforce extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n response: '',\r\n errorMessage: '',\r\n token: '',\r\n env: ''\r\n }\r\n }\r\n\r\n async componentDidMount() {\r\n \r\n const query = new URLSearchParams(window.location.search);\r\n const queryString = query.get('sfRequestId')\r\n\r\n var env = ''; \r\n\r\n try {\r\n const envresponse = await fetch(`/home/GetEnv`);\r\n if (!envresponse.ok) {\r\n throw Error(envresponse.statusText);\r\n }\r\n const envJson = await envresponse.json();\r\n env = envJson.env;\r\n \r\n } catch (error) {\r\n console.log(error);\r\n }\r\n\r\n console.log(queryString);\r\n if (isNaN(queryString)) {\r\n //this.setState({ token: queryString })\r\n this.state.token = queryString;\r\n var newClientUrl = 'https://accounts' + env + '.kestrafinancial.com/Client/EditProfile/';\r\n var existingClientUrl = 'https://accounts' + env + '.kestrafinancial.com/Client/EditWithPreviousChanges/';\r\n var url = '';\r\n var crmContactId = '';\r\n console.log(\"Entered api\");\r\n fetch(`/api/salesforce?sfRequestId=${this.state.token}`)\r\n .then(response => response.json().then(body => ({ response, body })))\r\n .then(({ response, body }) => {\r\n if (response.ok) {\r\n var ClientId = body.ClientId;\r\n var IsExistingClient = body.IsExistingClient;\r\n if (body.IsExistingClient == false)\r\n url = newClientUrl + ClientId;\r\n else\r\n url = existingClientUrl + ClientId + \"?repClientNumber=\" + body.ClientNumber;\r\n\r\n crmContactId = body.CRMContactId;\r\n if (ClientId == 0) {\r\n this.setState({ errorMessage: \"Sync Failed\" });\r\n return;\r\n }\r\n console.log(url);\r\n window.open(url, '_self');\r\n }\r\n })\r\n .catch(err => {\r\n this.setState({ errorMessage: err.message });\r\n });\r\n }\r\n\r\n else {\r\n this.setState({ errorMessage: '404 error : not found' });\r\n }\r\n\r\n \r\n }\r\n render() {\r\n return (\r\n
\r\n
\r\n {!this.state.errorMessage &&

\r\n SYNC IN PROGRESS - YOU WILL BE REDIRECTED TO ADVISORCOMPLETE MOMENTARILY\r\n

}\r\n {!this.state.errorMessage && }\r\n\r\n {/* {this.state.errorMessage &&

{this.state.errorMessage}

} */}\r\n\r\n {this.state.errorMessage &&\r\n
\r\n
\r\n

Oops, something went wrong! The data sync failed unexpectedly.



\r\n

Please close the window, or click the button below to go back.

\r\n
\r\n
\r\n }\r\n
\r\n
\r\n );\r\n }\r\n}\r\nexport default Salesforce\r\n","import React, { Component } from 'react';\r\nimport ReactDOM from \"react-dom\";\r\nimport logo from './logo.svg';\r\nimport './App.css';\r\nimport {\r\n BrowserRouter as Router,\r\n Switch,\r\n Route,\r\n Link\r\n} from \"react-router-dom\";\r\nimport Redtail from \"./redtail\"\r\nimport Salesforce from \"./salesforce\"\r\n\r\nclass App extends React.Component { \r\n\r\n render() {\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\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default App;","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.0/8 are considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl, {\r\n headers: { 'Service-Worker': 'script' },\r\n })\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready\r\n .then(registration => {\r\n registration.unregister();\r\n })\r\n .catch(error => {\r\n console.error(error.message);\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\n\r\nReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want your app to work offline and load faster, you can change\r\n// unregister() to register() below. Note this comes with some pitfalls.\r\n// Learn more about service workers: https://bit.ly/CRA-PWA\r\nserviceWorker.unregister();\r\n"],"sourceRoot":""}