{"version":3,"sources":["webpack:///./transfer/components/single-amount-field.styles.js","webpack:///./transfer/components/single-amount-field.js","webpack:///./transfer/components/bill-splitting-partner-header.js","webpack:///./transfer/components/homepage/multi-recipient-selector.js"],"names":["styleVars","selectColor","selectFontSize","arrowIconWidth","StyleSheet","create","inputWrapper","display","justifyContent","currencySymbol","marginRight","marginTop","textAlign","color","colors","inputText","fontSize","fontWeight","input","background","border","padding","margin","textOverflow","outline","cursor","letterSpacing","inputWithHiddenCursor","textShadow","concat","inputReadOnly","selectWrapper","position","height","selectWrapperCondensed","marginBottom","selectWrapperReadOnly","select","appearance","paddingTop","paddingRight","paddingBottom","paddingLeft","backgroundColor","top","left","zIndex","selectReadOnly","selectArrow","firstTimeUserTooltipWrapper","lineHeight","i18n","content","SingleAmountField","Component","constructor","props","super","_defineProperty","isMouseDown","_ref","target","value","currencyCode","this","handleChange","_ref2","_ref3","moveCursorToTheEnd","onFocus","_ref4","setState","hideCursor","sortedCurrencyCodeList","sortCurrencyList","currencyCodeList","currencySymbolMap","componentDidMount","_isMounted","isFontLoaded","then","forceUpdate","catch","isAmountReadOnly","_input","focus","componentWillUnmount","componentWillReceiveProps","nextProps","showInvalid","focusAmountField","_ref5","normalizedValue","amountUtils","cleanValue","numberValue","Number","_isNaN","length","MAX_AMOUNT_LENGTH","formattedValue","currencyDecimal","toString","onChange","isInvalid","setTimeout","render","state","adjustedValue","getCurrencyPrecision","parseFloat","toFixed","inputFontSize","inputWidth","selectWidth","_select","inputWrapperClasses","classNames","css","styles","inputStyles","width","styleOverrides","inputColor","selectWrapperColor","invalidInputColor","arrowPosition","currencySymbolClassNames","inputClassNames","dropdownWrapperClassNames","showCondensedUI","isCurrencyCodeReadOnly","dropdownClassNames","amountComponents","React","createElement","aria-label","key","ref","c","type","className","style","dir","name","data-nemo","id","autoComplete","required","readOnly","handleInputChange","handleFocus","onClick","handleClick","onMouseDown","handleMouseDown","onMouseUp","handleMouseUp","symbol","amountFieldAndSymbol","getAmountParts","filter","part","map","defaultCurrency","Object","keys","htmlFor","disabled","handleSelectChange","code","isCurrencyReadOnly","handleFirstTimeUserTooltipClick","ContentContainer","glamorous","div","recipientPartnerPadding","flexDirection","alignItems","ParagraphContent","p","connect","amount","billSplitting","server","locale","request","currencyMap","partnerLogoUrl","logoUrl","partnerName","partnerDisplayName","shouldDisplay","partnerLogo","backgroundImage","center","recipientPartnerWidth","logo","AmountField","hideCurrencyCode","sysColorErrorMain","sysColorBackgroundMediumContrast","_PAYPAL_THEME","callAll","_len","arguments","fns","Array","_key","_len2","args","_key2","forEach","fn","ErrorContainer","ErrorText","CriticalIconContainer","MultiRecipientSelector","_this","validateInput","recipient","tracking","Events","p2p_contact_typing_stopped","num_characters_input","search_type","alreadyTyped","_debounce","trackTypingStoppedAndMakeTypingAvailable","item","removeRecipient","changes","hasOwnProperty","isOpen","event","p2p_contact_typing_started","trackTypingStoppedDebounced","p2p_contact_search_pressed","trackDirectorySearchClick","selectAllText","index","selected","onSelectItem","SelectedRecipient","handleRecipientSelection","contact","inputValue","undefined","thumbnailUrl","firstName","lastName","fullName","alternateFullName","phones","email","networkIdDisplayName","details","getInformalName","givenName","surname","country","countryCode","isArray","getContactPhone","isPhoneOrEmail","hasNetworkId","networkId","SearchContactRow","role","_CriticalIcon","size","_CaptionText","as","errorMessage","flush","selectedRecipients","inputProps","submitRecipient","submit","isRecipientValid","isAndroid","showError","AutoComplete","multi","_objectSpread","autoFocus","shouldContactSearchInputBeAutofocus","placeholder","boxShadow","onBlur","handleInputBlur","handleInputFocus","selectedItem","renderItem","renderSelectedItem","onStateChange","handleStateChange","removeSelectedItem","submitItem","isInputValid","renderError","excludeRecipients"],"mappings":"mKAGaA,EAAY,CACvBC,YAAa,UACbC,eAAgB,GAChBC,eAAgB,IAGHC,MAAWC,OAAO,CAC/BC,aAAc,CACZC,QAAS,OACTC,eAAgB,UAElBC,eAAgB,CACdC,YAAa,EACbC,UAAW,GACXC,UAAW,QACXC,MAAOC,IAAOC,UACdC,SAAU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,MAAMqP,qBAIrCnP,IA3MoB+J,EAAsB,eAmBnB,CACpBG,UAAW,GACXwD,WAAY,GACZW,YAAa,GACbd,aAAc","file":"default~request-page~request-preview.esm.js","sourcesContent":["import { StyleSheet } from 'lib/paypalphrodite'\nimport { colors } from '../../lib/styles/variables'\n\nexport const styleVars = {\n selectColor: '#0070ba',\n selectFontSize: 20,\n arrowIconWidth: 20,\n}\n\nexport default StyleSheet.create({\n inputWrapper: {\n display: 'flex',\n justifyContent: 'center',\n },\n currencySymbol: {\n marginRight: 4,\n marginTop: 20,\n textAlign: 'right',\n color: colors.inputText,\n fontSize: 24,\n fontWeight: '300',\n },\n input: {\n background: 'none',\n border: 'none',\n color: colors.inputText,\n textAlign: 'center',\n padding: '0',\n margin: '0',\n textOverflow: 'clip',\n outline: 0,\n cursor: 'pointer',\n letterSpacing: 'normal', // overrides vxpattern-lib-paypal letter-spacing value on all inputs\n },\n inputWithHiddenCursor: {\n color: 'transparent',\n textShadow: `${colors.inputText} 0 0 0`,\n },\n inputReadOnly: {\n cursor: 'default',\n },\n selectWrapper: {\n textAlign: 'center',\n margin: '28px auto',\n color: styleVars.selectColor,\n fontSize: styleVars.selectFontSize,\n position: 'relative',\n height: 32,\n // width: set dynamically based on width of selected option\n },\n selectWrapperCondensed: {\n marginTop: 0,\n marginBottom: 0,\n },\n selectWrapperReadOnly: {\n color: colors.inputText,\n },\n select: {\n position: 'absolute',\n appearance: 'none', // remove browser styles\n border: 0,\n paddingTop: 4,\n paddingRight: styleVars.arrowIconWidth,\n paddingBottom: 4,\n paddingLeft: 2,\n backgroundColor: 'transparent',\n top: 0,\n left: -2, // to compensate for the padding\n zIndex: 2,\n cursor: 'pointer',\n '::-ms-expand': { display: 'none' },\n },\n selectReadOnly: {\n cursor: 'default',\n },\n selectArrow: {\n fontWeight: 'bold',\n position: 'absolute',\n top: 4,\n // left: set dynamically based on width of selected option\n zIndex: 1,\n ':before': {\n position: 'absolute',\n top: 10,\n },\n },\n firstTimeUserTooltipWrapper: {\n lineHeight: '77px', // to vertically center the tooltip icon\n },\n})\n","import PropTypes from 'prop-types'\nimport React, { Component } from 'react'\nimport { StyleSheet, css } from 'lib/paypalphrodite'\nimport styles, { styleVars } from './single-amount-field.styles'\nimport classNames from 'classnames'\nimport { isFontLoaded } from '../../lib/is-font-loaded'\nimport * as amountUtils from '../../lib/amountUtils'\nimport { moveCursorToTheEnd } from '../../lib/dom-utils'\nimport { MAX_AMOUNT_LENGTH } from '../constants'\nimport _ from 'lodash'\nimport { getAmountParts, sortCurrencyList } from '../utils/currencyUtils'\nimport content from 'pp-react-l10n'\nimport { getCurrencyPrecision } from '../../../../lib/utils/currencyUtils'\n\nconst i18n = content('transfer/page/preview')\n\nexport class SingleAmountField extends Component {\n static propTypes = {\n onChange: PropTypes.func.isRequired,\n currencyDecimal: PropTypes.string.isRequired,\n currencySymbolMap: PropTypes.object.isRequired,\n currencyCode: PropTypes.string.isRequired,\n currencyCodeList: PropTypes.array.isRequired,\n value: PropTypes.string.isRequired,\n isAmountReadOnly: PropTypes.bool.isRequired,\n isCurrencyCodeReadOnly: PropTypes.bool,\n inputColor: PropTypes.string,\n selectColor: PropTypes.string,\n showInvalid: PropTypes.bool,\n focusAmountField: PropTypes.bool,\n showFirstTimeUserTooltip: PropTypes.bool,\n showCondensedUI: PropTypes.bool,\n handleFirstTimeUserTooltipClick: PropTypes.func.isRequired,\n onFocus: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n }\n\n static defaultProps = {\n isAmountReadOnly: false,\n isCurrencyReadOnly: false,\n handleFirstTimeUserTooltipClick: () => {},\n }\n\n state = { isMouseDown: false }\n\n constructor(props) {\n super(props)\n\n this.sortedCurrencyCodeList = sortCurrencyList(\n props.currencyCodeList,\n props.currencySymbolMap\n )\n }\n\n componentDidMount() {\n this._isMounted = true\n\n isFontLoaded('PayPal-Sans-Big')\n .then(() => {\n if (this._isMounted) {\n // it could have unmounted before this is resolved\n // once the font has been confirmed to be loaded, we need to recalculate the width of the input.\n this.forceUpdate()\n }\n })\n .catch(() => {\n // do absolutely nothing\n })\n\n if (!this.props.isAmountReadOnly) {\n this._input.focus()\n }\n }\n\n componentWillUnmount() {\n this._isMounted = false\n }\n\n componentWillReceiveProps(nextProps) {\n if (nextProps.showInvalid) {\n this.showInvalid()\n }\n\n if (nextProps.focusAmountField) {\n this._input.focus()\n }\n }\n\n /**\n * This handles the value and currency change. Because a change in currency can cause a change in the value (due to\n * differences in precision), this will be called when the value or the currency is changed.\n *\n * We first strip out all non-digits then validate that the result is a real number. If it's not, then we don't do\n * anything (and the input value is not updated). If the result is equal to 0, then we'll call onAmountChange with an\n * empty string. Otherwise, we'll format it and if it's not the same as it was before, we'll call onAmountChange with\n * that.\n * @param {Object} changes holds the new value and the currencyCode\n */\n handleChange({\n value = this.props.value,\n currencyCode = this.props.currencyCode,\n }) {\n const normalizedValue = amountUtils.normalizeNumberInputs(value)\n const cleanValue = amountUtils.replaceNonDigits(normalizedValue)\n\n // convert value to number to remove leading zeros\n const numberValue = Number(cleanValue)\n\n if (_.isNaN(numberValue) || cleanValue.length >= MAX_AMOUNT_LENGTH) {\n this.showInvalid()\n return\n } else if (numberValue === 0) {\n const newValue = ''\n this.props.onChange(newValue, currencyCode)\n return\n }\n\n const formattedValue = amountUtils.formatUserCentsInput(\n currencyCode,\n this.props.currencyDecimal,\n numberValue.toString()\n )\n if (\n formattedValue !== this.props.value ||\n currencyCode !== this.props.currencyCode\n ) {\n this.props.onChange(formattedValue, currencyCode)\n }\n }\n\n handleSelectChange = ({ target: { value: currencyCode } }) =>\n this.handleChange({ currencyCode })\n handleInputChange = ({ target: { value } }) => this.handleChange({ value })\n handleFocus = ({ target }) => {\n moveCursorToTheEnd(target)\n if (this.props.onFocus) {\n this.props.onFocus(target)\n }\n }\n handleClick = ({ target }) => moveCursorToTheEnd(target)\n handleMouseDown = () => this.setState({ hideCursor: true })\n handleMouseUp = () => this.setState({ hideCursor: false })\n\n /**\n * This function sets the isInvalid state which results in a rerender which will add css classes to cause a shake\n * effect on the input wrapper. It also sets a timeout and sets isInvalid to false so the shake effect doesn't go on\n * forever.\n */\n showInvalid() {\n this.setState({ isInvalid: true }, () => {\n setTimeout(\n () =>\n this.setState({ isInvalid: false }, () => {\n if (this.props.focusAmountField) {\n this._input.focus()\n }\n }),\n 300\n )\n })\n }\n\n render() {\n const { hideCursor, isInvalid } = this.state\n const { selectFontSize } = styleVars\n const {\n value,\n currencyCode,\n currencySymbolMap,\n currencyDecimal,\n } = this.props\n const currencySymbol = currencySymbolMap[currencyCode] || '$'\n\n // non-decimal currencies should have the digits after the decimal removed\n let adjustedValue = value\n if (getCurrencyPrecision(currencyCode) === 0) {\n adjustedValue = parseFloat(value || 0).toFixed(0)\n }\n\n const formattedValue = amountUtils.formatUserCentsInput(\n currencyCode,\n currencyDecimal,\n adjustedValue\n )\n const inputFontSize = amountUtils.updateFontSize(\n formattedValue,\n currencySymbol\n )\n const extraSpaceToAccountForWeirdChromeBug = 2\n const inputWidth =\n amountUtils.measureTextSizeWithStyle(\n inputFontSize,\n this._input,\n formattedValue\n ) + extraSpaceToAccountForWeirdChromeBug\n const selectWidth = amountUtils.measureTextSizeWithStyle(\n selectFontSize,\n this._select,\n currencyCode\n )\n const inputWrapperClasses = classNames(css(styles.inputWrapper), {\n 'animated shake': isInvalid,\n })\n const inputStyles = {\n width: inputWidth,\n fontSize: inputFontSize,\n }\n\n const styleOverrides = StyleSheet.create({\n inputColor: {\n color: this.props.inputColor || '',\n },\n selectWrapperColor: {\n color: this.props.selectColor || '',\n },\n invalidInputColor: {\n color: '#D20000',\n },\n arrowPosition: {\n left: selectWidth,\n },\n })\n\n const currencySymbolClassNames = css(\n styles.currencySymbol,\n this.props.inputColor && styleOverrides.inputColor,\n isInvalid && styleOverrides.invalidInputColor\n )\n\n const inputClassNames = css(\n styles.input,\n hideCursor && styles.inputWithHiddenCursor,\n this.props.isAmountReadOnly && styles.inputReadOnly, // overrides cursor to default\n this.props.inputColor && styleOverrides.inputColor, // overrides color of input text with prop\n isInvalid && styleOverrides.invalidInputColor\n )\n\n const dropdownWrapperClassNames = css(\n styles.selectWrapper,\n this.props.showCondensedUI && styles.selectWrapperCondensed,\n this.props.isCurrencyCodeReadOnly && styles.selectWrapperReadOnly, // overrides color to input default (black)\n this.props.selectColor && styleOverrides.selectWrapperColor // overrides color of select and arrow down with prop\n )\n\n const dropdownClassNames = css(\n styles.select,\n this.props.isCurrencyCodeReadOnly && styles.selectReadOnly // overrides cursor to default\n )\n\n const amountComponents = {\n value: (\n (this._input = c)}\n type=\"tel\"\n className={`${inputClassNames} ppvx_text--xl3`}\n style={inputStyles}\n dir=\"ltr\"\n name=\"amount\"\n data-nemo=\"amount\"\n id=\"fn-amount\"\n autoComplete=\"off\"\n required\n readOnly={this.props.isAmountReadOnly}\n value={formattedValue}\n onChange={this.handleInputChange}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n onMouseDown={this.handleMouseDown}\n onMouseUp={this.handleMouseUp}\n />\n ),\n symbol: (\n