{"version":3,"sources":["webpack:///./pagination/index.js","webpack:///./utils/session-timer.js","webpack:///./screens/session-timer/index.js","webpack:///./screens/simplelayout/index.js","webpack:///./utils/constants.js","webpack:///./utils/loader.js","webpack:///./utils/venice.js"],"names":["AnimatedSwitchPagination","previousPage","undefined","currentPage","stack","styles","offset","opacity","transform","window","scrollTo","className","runOnMount","location","pathname","atEnter","action","this","props","history","atLeave","atActive","mapStyles","children","Component","withRouter","signoutTimer","warningTimer","onWarning","init","options","clientData","isUserLoggedIn","venice","setTimeout","startWebAuthTimer","assign","STYLES","MODAL","css","zIndex","Wrapper","glamorous","div","display","justifyContent","Container","flexDirection","alignItems","ButtonContainer","marginTop","l10n","getContent","SessionTimer","useState","isOpen","setIsOpen","isLoading","setIsLoading","useEffect","initSessionTimer","onSubmit","a","axios","clearTimeout","ReactDOM","unstable_batchedUpdates","hideLogo","title","hideTitle","overpanel","onClose","closeOnBackgroundClick","closeButtonLabel","src","ILLUSTRATIONS","WARNING","alt","width","height","disabled","onClick","position","background","tableLayout","top","SpinnerContainer","left","backgroundColor","animation","White","right","overflow","overflowY","maxWidth","margin","padding","isMyProfile","Content","isSettingsPage","marginBottom","isProfileTreatment","navigationItemStylingFix","cursor","NavLink","verticalAlign","Navigation","linkName","currentPath","pathName","split","subPathName","trackAction","INSTRUMENTATION","INSTRUMENTATION_MAP","NEW","Events","tracking","e","type","key","trackClick","push","goBack","_closeLink","React","createRef","current","focus","style","dir","isTimeoutPage","tabIndex","onKeyDown","handleBackButton","data-testid","aria-label","href","flowCancelUrl","ref","Layout","document","getElementById","scrollTop","match","url","isNewUser","id","SPINNER_ID","size","screenReaderText","isNativeApp","DEFAULT_PROFILE_PHOTO","COVER_PHOTO_URLS","GREEN","RASTER","VECTOR","BLUE","PURPLE","RED","YELLOW","profile","OLD","PAGE_GROUP","PAGE_NAME","back","close","about","confirm","recipient","settings","username","picture","addLoader","overlayedElement","removeProperty","removeLoader","elementWithSpinner","setProperty","Boolean","isIOS","navigator","platform","test","onShareText","obj","shareText","text","onProfileSave","photoDataURI","profileSave","profileImageChanged","reAuth"],"mappings":";;;;;;;;;;;ozDAqCMA,E,oOACI,CACNC,kBAAcC,EACdC,iBAAaD,EACbE,MAAO,K,wCAGG,SAAAC,GACV,IAAIC,EAASD,EAAOC,OAGpB,OAFAA,EAAS,GAAH,OAAMA,EAAN,MAEC,CACLC,QAASF,EAAOE,QAChBC,UAAW,cAAF,OAAgBF,EAAhB,S,0EAKXG,OAAOC,SAAS,EAAG,K,+BAInB,OACE,kBAAC,IAAD,aACEC,UAAU,iBACVC,WAAkC,MAAtBC,SAASC,UAzCpB,CACLC,QAAS,CACPT,OAAmB,UAHAU,EA2CGC,KAAKC,MAAMC,QAAQH,QAxCb,KAAO,IACnCT,QAAS,GAEXa,QAAS,CACPd,OAAmB,SAAXU,GAAqB,IAAM,IACnCT,QAAS,GAEXc,SAAU,CACRf,OAAQ,EACRC,QAAS,IA4BT,CAIEe,UAAWL,KAAKK,YAEfL,KAAKC,MAAMK,UA9CpB,IAAyBP,M,GAiBcQ,aAmCxBC,sBAAWzB,I;;;;;;;;;;;;;;;;;;;gHCjEtB0B,EACAC,EACAC,E,wwBAEJ,SAASC,EAAKC,GACPC,IAAWC,iBAIhBJ,EAAYE,EAAQF,UAChBK,IASJC,WAAWD,IADK,MAAQ,GAAK,KAL3BE,KASJ,SAASA,IAEPR,EAAeO,YAAW,WACxBN,IACAF,EAAeQ,YAAW,WACxBzB,OAAOI,SAASuB,OAAO,aACtB,OALW,MCblB,IAAMC,EAAS,CACbC,MAAOC,cAAI,CAAEC,OAAQ,SAGjBC,EAAUC,IAAUC,IAAI,CAC5BC,QAAS,OACTC,eAAgB,WAEZC,EAAYJ,IAAUC,IAAI,CAC9BC,QAAS,OACTG,cAAe,SACfC,WAAY,WAGRC,EAAkBP,IAAUC,IAAI,CAAEO,UAAW,SAE7CC,EAAOC,YAAW,uBAoETC,UAlEf,WAAwB,MACMC,oBAAS,GADf,mBACfC,EADe,KACPC,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AEbjD,IAAK,CACHkD,KAAM,oDACNC,MAAO,wDAKA3F,EAAgB,CAC3BC,QACE,0E;;;;;qFC5HJ,sGAAO,IAAMwE,EAAa,+BAEbyB,EAAY,WACvB,IAAMC,EAAmBjC,SAASC,eAAeM,GAE7C0B,GACFA,EAAiB7C,MAAM8C,eAAe,YAI7BC,EAAe,WAC1B,IAAMC,EAAqBpC,SAASC,eAAeM,GAE/C6B,GACFA,EAAmBhD,MAAMiD,YAAY,UAAW,U;;;;;iGChBpD,wIAOO,IAAM3B,EAAc4B,QACP,oBAAX1K,QAA0BA,OAAOwB,QAGpCmJ,EAAQD,QACM,oBAAX1K,QACLA,OAAO4K,WACP5K,OAAO4K,UAAUC,UACjB,mBAAmBC,KAAKF,UAAUC,WAI/B,SAASE,EAAYC,GACrBlC,IACD6B,EACF3K,OAAOwB,OAAOyJ,UAAUD,GAExBhL,OAAOwB,OAAOyJ,UAAUD,EAAIE,OAKzB,SAASC,IAA0D,6DAAJ,GAAI,IAA1CC,oBAA0C,MAA3B,GAA2B,EACnEtC,IAGA6B,GACH3K,OAAOwB,OAAO6J,cAIZD,GAAgBT,GAClB3K,OAAOwB,OAAO8J,oBAAoBF,IAe/B,SAASG,IACd,OAAOvL,OAAOwB,OAAO+J","file":"ppme-shared.bundle.js","sourcesContent":["// @flow\n\nimport React, { Component } from 'react'\nimport { AnimatedSwitch } from 'react-router-transition'\nimport { withRouter } from 'react-router-dom'\nimport type { RouterHistory } from 'react-router'\nimport './index.css'\n\ntype Props = {\n children: React$Element,\n history: RouterHistory,\n}\n\ntype State = {\n invert: boolean,\n currentPage: ?string,\n previousPage: ?string,\n stack: Array,\n}\n\nfunction pageTransitions(action) {\n return {\n atEnter: {\n offset: action === 'PUSH' ? 600 : -600,\n opacity: 1,\n },\n atLeave: {\n offset: action === 'PUSH' ? -600 : 600,\n opacity: 0,\n },\n atActive: {\n offset: 0,\n opacity: 1,\n },\n }\n}\n\nclass AnimatedSwitchPagination extends Component {\n state = {\n previousPage: undefined,\n currentPage: undefined,\n stack: [],\n }\n\n mapStyles = styles => {\n let offset = styles.offset\n offset = `${offset}px`\n\n return {\n opacity: styles.opacity,\n transform: `translateX(${offset})`,\n }\n }\n\n componentWillReceiveProps() {\n window.scrollTo(0, 0)\n }\n\n render() {\n return (\n \n {this.props.children}\n \n )\n }\n}\n\nexport default withRouter(AnimatedSwitchPagination)\n","// @flow\n// after 15 minutes of inactivity, the user's session expires\n// we warn them of this after 14 minutes to give them a minute to interact\n// with the app and extend their session.\nimport * as venice from './venice'\nimport clientData from './client-data'\n\nlet signoutTimer\nlet warningTimer\nlet onWarning\n\nfunction init(options) {\n if (!clientData.isUserLoggedIn) {\n // no reason to log them out if they're not logged in\n return\n }\n onWarning = options.onWarning\n if (venice.isNativeApp) {\n startNativeAuthTimer()\n } else {\n startWebAuthTimer()\n }\n}\n\nfunction startNativeAuthTimer() {\n const TIMEOUT = 15.02 * 60 * 1000 // 15 minutes and 1.2 seconds\n setTimeout(venice.reAuth, TIMEOUT)\n}\n\nfunction startWebAuthTimer() {\n const TIMEOUT = 14 * 60 * 1000 // 14 minutes\n warningTimer = setTimeout(() => {\n onWarning()\n signoutTimer = setTimeout(() => {\n window.location.assign('/signin')\n }, 60 * 1000) // 1 minute\n }, TIMEOUT)\n}\n\nfunction onSessionExtended() {\n clearTimeout(signoutTimer)\n clearTimeout(warningTimer)\n startWebAuthTimer()\n}\n\nexport { init, onSessionExtended }\n","// @flow\n\nimport React, { useState, useEffect } from 'react'\nimport ReactDOM from 'react-dom'\nimport glamorous from 'glamorous'\nimport { css } from 'glamor'\nimport getContent from 'pp-react-l10n'\nimport axios from 'axios'\nimport { Modal, Button } from '@paypalcorp/pp-react'\n\nimport { ILLUSTRATIONS } from 'utils/constants'\n\nimport {\n init as initSessionTimer,\n onSessionExtended,\n} from 'utils/session-timer'\n\nconst STYLES = {\n MODAL: css({ zIndex: 99999 }),\n}\n\nconst Wrapper = glamorous.div({\n display: 'flex',\n justifyContent: 'center',\n})\nconst Container = glamorous.div({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n})\n\nconst ButtonContainer = glamorous.div({ marginTop: '2rem' })\n\nconst l10n = getContent('pages/session-timer')\n\nfunction SessionTimer() {\n const [isOpen, setIsOpen] = useState(false)\n const [isLoading, setIsLoading] = useState(false)\n\n useEffect(() => {\n initSessionTimer({\n onWarning: () => {\n setIsOpen(true)\n },\n })\n }, [])\n\n const onClose = () => {\n setIsOpen(false)\n }\n\n const onSubmit = async () => {\n // double check since React does not guarantee renders between event boundaries\n if (isLoading) {\n return\n }\n\n setIsLoading(true)\n\n try {\n await axios('/auth/extend')\n\n onSessionExtended()\n\n ReactDOM.unstable_batchedUpdates(() => {\n setIsLoading(false)\n setIsOpen(false)\n })\n } catch (e) {\n setIsLoading(false)\n }\n }\n\n return (\n \n \n \n \"\"\n

{l10n('session.all_done')}

\n {l10n('session.we_will_log_you_out')}\n \n \n \n
\n
\n \n )\n}\n\nexport default SessionTimer\n","// @flow\n\nimport React, { Component } from 'react'\nimport glamorous from 'glamorous'\nimport getContent from 'pp-react-l10n'\nimport { withRouter } from 'react-router-dom'\nimport { LoadingSpinner as Spinner } from '@paypalcorp/pp-react'\nimport type { RouterHistory } from 'react-router'\nimport clientData from 'utils/client-data'\nimport _ from 'lodash'\nimport { isNativeApp } from 'utils/venice'\nimport { SPINNER_ID } from 'utils/loader'\nimport { INSTRUMENTATION_MAP } from 'utils/constants'\nimport { tracking, trackAction } from '../../lib/analytics'\nimport Events from 'lib/analytics/event-tags'\n\nconst l10n = getContent('pages/settings')\n\nconst Wrapper = glamorous.div({\n position: 'absolute',\n zIndex: '1050',\n width: '100%',\n height: '100%',\n background: '#f4f6f9',\n display: 'table',\n tableLayout: 'fixed',\n top: '0',\n})\n\nconst SpinnerContainer = glamorous.div({\n position: 'fixed',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n backgroundColor: 'rgba(255, 255, 255, 0.6)',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n animation: 'vx_fade-in 0.3s ease-out 0s both',\n zIndex: 1,\n})\n\nconst White = glamorous.div(props => ({\n position: 'fixed',\n right: 0,\n left: 0,\n\n // super important for animations to work because as our route\n // \"leaves\" to the right/left of the screen, it will be hidden\n overflow: 'hidden',\n overflowY: 'auto',\n\n width: '66.6%',\n height: '100%',\n maxWidth: '700px',\n margin: '0 auto',\n padding: '0 20px',\n background: '#ffffff',\n\n '@media (max-width: 640px)': {\n width: '100%',\n padding: props.isMyProfile ? '0' : '0 20px',\n },\n}))\n\nconst Content = glamorous.div(props => ({\n marginTop: props.isSettingsPage ? 84 : 104,\n marginBottom: 104,\n padding: props.isProfileTreatment\n ? '0 25%'\n : props.isMyProfile\n ? '0 13%'\n : '0 25%',\n\n '@media (max-width: 1024px)': {\n padding: '0 12.5%',\n },\n\n '@media (max-width: 640px)': {\n padding: '0 8.33%',\n },\n\n '@media (max-width: 480px)': {\n padding: '0',\n },\n}))\n\n// the x and back button on the modal corners has a weird bounding\n// box due to use of padding instead of margin\nconst navigationItemStylingFix = {\n padding: 0,\n margin: '24px 4px 0',\n cursor: 'pointer',\n}\n\nconst NavLink = glamorous.a(\n 'vx_backBtn vx_backBtn_flow',\n navigationItemStylingFix,\n {\n // these overrides are to ensure the back arrow always points backwards\n // this overrides the [dir=rtl] style ruls from vx\n ':before': {\n verticalAlign: 'inherit',\n transform: 'none',\n },\n },\n)\n\ntype NavigationProps = {\n history: RouterHistory,\n isMyProfile: boolean,\n isSettingsPage: boolean,\n isTimeoutPage: boolean,\n}\n\nclass Navigation extends Component {\n constructor(props) {\n super(props)\n this._closeLink = React.createRef()\n }\n\n componentDidMount() {\n // for a11y, set the focus on the close link everytime it renders\n if (this._closeLink.current) this._closeLink.current.focus()\n }\n\n trackClick = linkName => {\n const currentPath = _.get(this.props, 'history.location.pathname', '')\n let pathName = currentPath.split('/')[2]\n const subPathName = currentPath.split('/')[3]\n if (subPathName) {\n pathName += `/${subPathName}`\n }\n // FPTI back instrumentation handled automatically via event handlers\n if (linkName === 'close') {\n trackAction('close')\n }\n const INSTRUMENTATION = INSTRUMENTATION_MAP[pathName]\n if (\n INSTRUMENTATION &&\n INSTRUMENTATION.NEW &&\n INSTRUMENTATION.NEW[linkName] &&\n Events[INSTRUMENTATION.NEW[linkName]]\n ) {\n tracking(Events[INSTRUMENTATION.NEW[linkName]]({}))\n }\n }\n\n handleBackButton = e => {\n if (e.type === 'click' || e.key === 'Enter') {\n this.trackClick('back')\n if (this.props.isMyProfile) {\n this.props.history.push('/my/settings')\n } else {\n this.props.history.goBack()\n }\n }\n }\n\n componentDidUpdate() {\n if (this._closeLink.current) this._closeLink.current.focus()\n }\n\n render() {\n // the navigation flow is directionality specific and should always go\n // from left to right. So we'll make sure things flow that way here too\n return (\n
\n {!(this.props.isSettingsPage || this.props.isTimeoutPage) ? (\n \n \n {this.props.isMyProfile\n ? l10n('button.manage')\n : l10n('button.back')}\n \n \n ) : null}\n {!this.props.isTimeoutPage ? (\n this.trackClick('close')}\n >\n {l10n('icon.close')}\n \n ) : null}\n
\n )\n }\n}\n\ntype LayoutProps = {\n children: Node,\n history: RouterHistory,\n match: {\n url: string,\n },\n}\nclass Layout extends Component {\n componentDidUpdate() {\n const overpanel = document.getElementById('core-white-overpanel-navigation')\n if (overpanel) {\n overpanel.scrollTop = 0\n }\n }\n\n render() {\n const isMyProfile = this.props.match.url.split('/')[2] === 'profile'\n const isSettingsPage = this.props.match.url.split('/')[2] === 'settings'\n const isNewUser = _.get(clientData, 'myProfileData.isNewUser')\n const isTimeoutPage =\n this.props.match.url.split('/')[2] === 'session-timeout'\n return (\n \n \n \n \n \n {!isNewUser && !isNativeApp && (\n \n )}\n \n {this.props.children}\n \n \n \n )\n }\n}\nexport default withRouter(Layout)\n","export const DEFAULT_PROFILE_PHOTO =\n 'https://www.paypalobjects.com/digitalassets/c/consumer/paypalme/networkidentity/profile_man.svg'\n\nexport const COVER_PHOTO_URLS = {\n GREEN: {\n RASTER: 'https://www.paypalobjects.com/profiles/cover/green.jpg',\n VECTOR: 'https://www.paypalobjects.com/profiles/cover/green.svg',\n },\n BLUE: {\n RASTER: 'https://www.paypalobjects.com/profiles/cover/blue.jpg',\n VECTOR: 'https://www.paypalobjects.com/profiles/cover/blue.svg',\n },\n PURPLE: {\n RASTER: 'https://www.paypalobjects.com/profiles/cover/purple.jpg',\n VECTOR: 'https://www.paypalobjects.com/profiles/cover/purple.svg',\n },\n RED: {\n RASTER: 'https://www.paypalobjects.com/profiles/cover/red.jpg',\n VECTOR: 'https://www.paypalobjects.com/profiles/cover/red.svg',\n },\n YELLOW: {\n RASTER: 'https://www.paypalobjects.com/profiles/cover/yellow.jpg',\n VECTOR: 'https://www.paypalobjects.com/profiles/cover/yellow.svg',\n },\n}\n\nexport const INSTRUMENTATION_MAP = {\n profile: {\n OLD: {\n PAGE_GROUP: 'main:ppme:profile:preview',\n PAGE_NAME: 'main:ppme:profile:preview',\n },\n NEW: {\n back: 'public_identity_my_profile_back_pressed',\n close: 'public_identity_my_profile_close_pressed',\n },\n },\n about: {\n OLD: {\n PAGE_GROUP: 'main:ppme:about',\n PAGE_NAME: 'main:ppme:about',\n },\n NEW: {\n back: 'public_identity_edit_about_back_pressed',\n close: 'public_identity_edit_about_close_pressed',\n },\n },\n confirm: {\n OLD: {\n PAGE_GROUP: 'main:ppme:hide:confirm',\n PAGE_NAME: 'main:ppme:hide:confirm',\n },\n NEW: {\n back: 'public_identity_hide_profile_confirmation_back_pressed',\n close: 'public_identity_hide_profile_confirmation_close_pressed',\n },\n },\n location: {\n OLD: {\n PAGE_GROUP: 'main:ppme:location',\n PAGE_NAME: 'main:ppme:location',\n },\n NEW: {\n back: 'public_identity_edit_location_back_pressed',\n close: 'public_identity_edit_location_close_pressed',\n },\n },\n recipient: {\n OLD: {\n PAGE_GROUP: 'main:ppme:recipientprofile',\n PAGE_NAME: 'main:ppme:recipientprofile:::',\n },\n },\n settings: {\n OLD: {\n PAGE_GROUP: 'main:ppme:settings',\n PAGE_NAME: 'main:ppme:settings:::',\n },\n NEW: {\n close: 'public_identity_edit_profile_close_pressed',\n },\n },\n username: {\n OLD: {\n PAGE_GROUP: 'main:ppme:username',\n PAGE_NAME: 'main:ppme:username:::change',\n },\n NEW: {\n back: 'public_identity_edit_username_back_pressed',\n close: 'public_identity_edit_username_close_pressed',\n },\n },\n 'cover/select': {\n OLD: {\n PAGE_GROUP: 'main:ppme:background:edit',\n PAGE_NAME: 'main:ppme:background:edit',\n },\n NEW: {\n back: 'public_identity_background_edit_back_pressed',\n close: 'public_identity_background_edit_close_pressed',\n },\n },\n 'cover/pan': {\n OLD: {\n PAGE_GROUP: 'main:ppme:background:adjust',\n PAGE_NAME: 'main:ppme:background:adjust',\n },\n NEW: {\n back: 'public_identity_background_adjust_back_pressed',\n close: 'public_identity_background_adjust_close_pressed',\n },\n },\n picture: {\n OLD: {\n PAGE_GROUP: 'main:ppme:profile_pic:edit',\n PAGE_NAME: 'main:ppme:profile_pic:edit',\n },\n NEW: {\n back: 'public_identity_profile_picture_edit_back_pressed',\n close: 'public_identity_profile_picture_edit_close_pressed',\n },\n },\n}\n\nexport const ILLUSTRATIONS = {\n WARNING:\n 'https://www.paypalobjects.com/paypal-ui/illustrations/svg/warning.svg',\n}\n","// @flow\n\nexport const SPINNER_ID = 'core-white-overpanel-spinner'\n\nexport const addLoader = function() {\n const overlayedElement = document.getElementById(SPINNER_ID)\n\n if (overlayedElement) {\n overlayedElement.style.removeProperty('display')\n }\n}\n\nexport const removeLoader = function() {\n const elementWithSpinner = document.getElementById(SPINNER_ID)\n\n if (elementWithSpinner) {\n elementWithSpinner.style.setProperty('display', 'none')\n }\n}\n","/**\n * For mobile apps communicate through the venice bridge when certain\n * events happen.\n *\n * @flow\n */\n\nexport const isNativeApp = Boolean(\n typeof window !== 'undefined' && window.venice,\n)\n\nconst isIOS = Boolean(\n typeof window !== 'undefined' &&\n window.navigator &&\n window.navigator.platform &&\n /iPad|iPhone|iPod/.test(navigator.platform),\n)\n\ntype ShareText = { text: string, url: string }\nexport function onShareText(obj: ShareText) {\n if (!isNativeApp) return\n if (isIOS) {\n window.venice.shareText(obj)\n } else {\n window.venice.shareText(obj.text)\n }\n}\n\ntype ProfileOptions = { profilePhotoUrl?: string }\nexport function onProfileSave({ photoDataURI = '' }: ProfileOptions = {}) {\n if (!isNativeApp) return\n\n // doesn't seem to exist for IOS at least\n if (!isIOS) {\n window.venice.profileSave()\n }\n\n // we need to check these methods exist, becuase they don't always...\n if (photoDataURI && isIOS) {\n window.venice.profileImageChanged(photoDataURI)\n }\n}\n\n// this is something about resetting the image\n// when we don't go through with profile creation\nexport function onProfileCancel() {\n if (!isNativeApp) return\n\n // doesn't seem to exist for IOS at least\n if (window.venice.profileCancel) {\n window.venice.profileCancel()\n }\n}\n\nexport function reAuth() {\n return window.venice.reAuth()\n}\n"],"sourceRoot":""}