{"version":3,"sources":["webpack:///js/0.113329050bef597b9cba.js","webpack:///../node_modules/xo-ui-components/src/spinner-button/template.html","webpack:///../node_modules/xo-address-components/src/add-address/directive.js","webpack:///../node_modules/xo-address-components/src/add-address/template.html","webpack:///../node_modules/xo-address-components/src/address-normalization/directive.js","webpack:///../node_modules/xo-address-components/src/address-normalization/route.js","webpack:///../node_modules/xo-address-components/src/address-normalization/template.html","webpack:///../node_modules/xo-form-components/src/name-input/directive.js","webpack:///../node_modules/xo-form-components/src/name-input/template.html","webpack:///../node_modules/xo-form-components/src/phone/lib/territoriesByCode.js","webpack:///../node_modules/xo-form-components/src/phone/phoneInput/directive.js","webpack:///../node_modules/xo-form-components/src/phone/phoneInput/template.html","webpack:///../node_modules/xo-form-components/src/phone/phoneInputA/directive.js","webpack:///../node_modules/xo-form-components/src/phone/phoneInputA/template.html","webpack:///../node_modules/xo-form-components/src/phone/phoneInputB/directive.js","webpack:///../node_modules/xo-form-components/src/phone/phoneInputB/template.html","webpack:///../node_modules/xo-form-components/src/zipcode/directive.js","webpack:///../node_modules/xo-form-components/src/zipcode/template.html","webpack:///../node_modules/xo-models/src/address/index.js","webpack:///../node_modules/xo-models/src/checkoutIncentive/index.js","webpack:///../node_modules/xo-page-components/src/aside-header/directive.js","webpack:///../node_modules/xo-page-components/src/aside-header/template.html","webpack:///../node_modules/xo-tray-height/dist/directive.js","webpack:///../node_modules/xo-ui-components/src/address-box/directive.js","webpack:///../node_modules/xo-ui-components/src/address-box/template.html","webpack:///../node_modules/xo-ui-components/src/dropdown-multiline/directive.js","webpack:///../node_modules/xo-ui-components/src/dropdown/directive.js","webpack:///../node_modules/xo-ui-components/src/expired-fi-panel/factory.js","webpack:///../node_modules/xo-ui-components/src/floating-label/directive.js","webpack:///../node_modules/xo-ui-components/src/prefix-attrs-with/directive.js","webpack:///../node_modules/xo-ui-components/src/spinner-button/directive.js","webpack:///../node_modules/xo-wallet-components/src/add-card/addCep/directive.js","webpack:///../node_modules/xo-wallet-components/src/add-card/addCep/route.js","webpack:///../node_modules/xo-wallet-components/src/add-card/addCep/template.html","webpack:///../node_modules/xo-wallet-components/src/add-card/addbilling/directive.js","webpack:///../node_modules/xo-wallet-components/src/add-card/addbilling/route.js","webpack:///../node_modules/xo-wallet-components/src/add-card/addbilling/template.html","webpack:///../node_modules/xo-wallet-components/src/add-card/addcard/directive.js","webpack:///../node_modules/xo-wallet-components/src/add-card/addcard/route.js","webpack:///../node_modules/xo-wallet-components/src/add-card/addcard/template.html","webpack:///../node_modules/xo-wallet-components/src/add-card/cardExpiry/directive.js","webpack:///../node_modules/xo-wallet-components/src/add-card/cardExpiry/template.html","webpack:///../node_modules/xo-wallet-components/src/add-card/cardIssueDate/directive.js","webpack:///../node_modules/xo-wallet-components/src/add-card/cardIssueDate/template.html","webpack:///../node_modules/xo-wallet-components/src/add-card/creditcard-input/directive.js","webpack:///../node_modules/xo-wallet-components/src/add-card/creditcard-input/template.html","webpack:///../node_modules/xo-wallet-components/src/add-card/directive.js","webpack:///../node_modules/xo-wallet-components/src/add-card/dob/directive.js","webpack:///../node_modules/xo-wallet-components/src/add-card/dob/template.html","webpack:///../node_modules/xo-wallet-components/src/add-card/index.js","webpack:///../node_modules/xo-wallet-components/src/add-card/route.js","webpack:///../node_modules/xo-wallet-components/src/add-card/selectcard/directive.js","webpack:///../node_modules/xo-wallet-components/src/add-card/selectcard/route.js","webpack:///../node_modules/xo-wallet-components/src/add-card/selectcard/template.html","webpack:///../node_modules/xo-wallet-components/src/add-card/template.html","webpack:///../node_modules/xo-wallet-components/src/confirm-upop/confirm/directive.js","webpack:///../node_modules/xo-wallet-components/src/confirm-upop/confirm/template.html","webpack:///../node_modules/xo-wallet-components/src/confirm-upop/directive.js","webpack:///../node_modules/xo-wallet-components/src/confirm-upop/init/directive.js","webpack:///../node_modules/xo-wallet-components/src/confirm-upop/init/template.html","webpack:///../node_modules/xo-wallet-components/src/confirm-upop/route.js","webpack:///../node_modules/xo-wallet-components/src/confirm-upop/template.html","webpack:///../node_modules/xo-wallet-components/src/fi-contingency-list/contingencies.js","webpack:///../node_modules/xo-wallet-components/src/fi-contingency-list/util.js","webpack:///./pages/xo-add-card/directive.js","webpack:///./pages/xo-add-card/route.js","webpack:///./pages/xo-add-card/template.html"],"names":["webpackJsonp","../node_modules/noop-loader/index.js!../node_modules/xo-ui-components/src/spinner-button/template.html","module","exports","../node_modules/xo-address-components/src/add-address/directive.js","__webpack_require__","__esModule","$xoAddAddressComponent","undefined","_angular","_squid","_index","_template","_template2","obj","_logger","$Component","extend","tag","template","props","address","type","required","isShipping","country","metadata","hideButtonHandler","hideCep","hideAddPreferred","hideName","triggerZipCodeBlur","triggerZipCodeKeyPress","renderBillingAddCheckbox","controller","$scope","$populate","$CheckoutAppDataModel","$ShippingRuleSummaryModel","$CheckoutPayeeModel","$CheckoutCartModel","onCountryChange","sortStates","$feature","getSortedStateList","states","$locale","content","get","statesList","angular","forEach","key","value","push","code","sname","sort","a","b","localeCompare","sortedStatesList","getAddress","prefix","str","prefixStr","line1","line2","deliveryAddresses","isArray","length","array","pop","join","displayLine1","displayLine2","city","state","postal_code","displayLine3","dropDownAddress","populateAddressFormFields","neighborhood","populateErrorMessage","messages","locale","lookupFailureMessage","msgs","isShowLookupFields","isLookupFailure","processLookupResult","list","isLookupSuccess","isShowLookupDropDown","lookupAddressList","map","addr","singleAddress","token","$rootScope","checkoutCart","instance","retrieve","checkoutAppData","checkoutPayee","then","is_snt_supported","profileRulesSummary","params","merchant_id","merchant","id","currency_code","purchase","amounts","total","$logger","info","snt_or_callback_flow","isSnTEnabled","instantUpdateIntegration","$MetadataModel","create","$watch","choose","lang","$on","attrPrefix","$emit","normalizeCountry","countryCode","isAddPreferred","isAddressLookupEnabled","formatZip","unformatted","replace","formatted","slice","x","lastPrefilledZip","prefill","cepPattern","first_name","last_name","test","prefillAddress","$PrefillAddressModel","save","data","success","result","findAddress","lookupAddress","house_number","building_name","document","querySelector","classList","add","isLookupProcessing","silent","contingencies","INTERNAL_ERROR","changeAddressDropDown","selectedAddress","showFullAddress","stateNamesInGroup","retrieveStateNamesInGroup","groups","group","groupName","common","zipCodeBlur","zipCodeKeyPress","event","../node_modules/xo-address-components/src/add-address/template.html","../node_modules/xo-address-components/src/address-normalization/directive.js","$","directive","scope","doneFn","sidebar","hideBackButton","centerLightBox","element","windowElement","window","lboxContainerElem","css","Math","max","height","outerHeight","computedLeft","width","outerWidth","leftBound","offset","left","elementLeft","trinityResponseCallback","showNormalization","$timeout","resize","desensitizedAddress","val","hasOwnProperty","trim","toLowerCase","$util","assert","userEnteredAddress","addrFormat","addressSelected","transitionName","fromJson","toJson","streetNumber","servAddress","normalization_status","addressNormalization","$AddressNormalizationModel","VALIDATION_ERROR","normalizedAddress","streetName","isEqual","preferred_address","callback","error","address1","address2","addressOne","JSON","parse","stringify","addressTwo","isLine2First","onBack","selection","onContinue","this","addressNormalizationForm","$modelValue","isBack","call","../node_modules/xo-address-components/src/address-normalization/route.js","$AddressNormalizationRoute","$ComponentRoute","name","titleContent","trackingData","fptiState","buzname","loginRequired","children","../node_modules/xo-address-components/src/address-normalization/styles.less","../node_modules/xo-address-components/src/address-normalization/template.html","../node_modules/xo-form-components/src/name-input/directive.js","user","lifecycle","enter","_this","handleCountryChange","../node_modules/xo-form-components/src/name-input/template.html","../node_modules/xo-form-components/src/phone/lib/territoriesByCode.js","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","../node_modules/xo-form-components/src/phone/phoneInput/directive.js","phone","reqiured","showPhoneType","optional","hideWork","exclude","hidePhoneType","treatment","throttle","$config","$experiment","../node_modules/xo-form-components/src/phone/phoneInput/template.html","../node_modules/xo-form-components/src/phone/phoneInputA/directive.js","_interopRequireDefault","_territoriesByCode","_territoriesByCode2","link","attr","on","find","mask","0","pattern","getPhoneMask","phoneType","phoneEntry","masks","mobileMask","MOBILE","fixedLineMask","FIXED_LINE","getPhonePattern","patterns","GENERAL","populatePhoneMetadata","copy","IntDialingCodes","defaultCountryPhoneCode","hideCountry","dropdownCountry","hideInOtherCountries","IntDialingCountryCode","phoneCountryCode","phoneTypeChanged","newValue","newVal","showWork","../node_modules/xo-form-components/src/phone/phoneInputA/styles.less","../node_modules/xo-form-components/src/phone/phoneInputA/template.html","../node_modules/xo-form-components/src/phone/phoneInputB/directive.js","_jquery","_jquery2","KEYS","ENTER","UP","DOWN","TAB","ESC","A","Z","SPACE","query","queryTimer","actions","updatePhoneMaskAndPattern","localization","phoneCountry","applyMaskOnPhoneInput","getPhoneDialingCode","territory","overrides","regionalOverrides","internationalDialingCode","updateDialingCodeAndCountry","arguments","text","updatePhoneFieldMetadata","listVisible","collapseListAndFocusOnParent","getTerritoryDataFromMetadata","dialingCodeList","_ref","init","showDialingCodeContainer","_$locale$metadata","_$locale$metadata$ter","_$locale$metadata$add","additionalDialingCodes","_$config$dialingCodeB","dialingCodeBlacklist","concat","filter","_ref2","includes","territoryData","expandList","show","focus","collapseList","hide","toggleList","highlightListItem","listItem","removeClass","addClass","selectListItem","searchForCountry","queryString","i","startsWith","substr","toUpperCase","updateAngularModel","ispreFill","telephone","$element","handleListMouseover","$event","target","handleKeyboardInputForDropdown","which","stopPropagation","preventDefault","handleKeyboardInputForList","$listItems","$selected","$current","cancel","String","fromCharCode","is","eq","next","last","prev","populate","trigger","addressChangeEvent","e","../node_modules/xo-form-components/src/phone/phoneInputB/styles.less","../node_modules/xo-form-components/src/phone/phoneInputB/template.html","../node_modules/xo-form-components/src/zipcode/directive.js","keyPressFn","maxLength","postalCodeLabel","zipEntry","zipErrorKey","zipLabel","zipRequired","formatRegex","inputParams","minLength","formatPattern","RegExp","formatZipWithDash","zipcode","index","changeZip","doneFunction","keyPressHandler","../node_modules/xo-form-components/src/zipcode/template.html","../node_modules/xo-models/src/address/index.js","$ValidateAddressModel","$Model","api","$Api","uri","../node_modules/xo-models/src/checkoutIncentive/index.js","$GetPSBOffersModel","$GetOfferProgramModel","$CreateOfferModel","$EvaluateCheckoutOfferEligibilityModel","postAttempts","isEligible","Boolean","eligible","getCurrencyCode","getOfferProgramCode","offer_program_code","getOfferProgramID","offer_program_id","getOfferValue","offer_value","createdOffer","offer_id","getOfferAmountLowestDenom","computation_rules","getProperty","getTxnMinimumLowestDenom","getOfferCurrencyCode","getOfferValueLowestDenom","getMinCartTotalLowestDenom","isUserInApplicableCountry","userCountry","applicableCountries","indexOf","hasActiveOffer","resource_list","hasActiveCheckoutIncentive","some","offer","hasOfferWithRedemptionCode","redemption_code","../node_modules/xo-page-components/src/aside-header/directive.js","_uiRouter","_angular2","restrict","hdrtype","heading","subHead","addLink","backUrl","closeUrl","hidex","headerLeftLink","headerLeft","headerLeftIcon","headerRightLink","headerRight","headerRightIcon","subHeaderLeftLink","subHeaderLeft","subHeaderLeftIcon","subHeaderRightLink","subHeaderRight","subHeaderRightIcon","showDualFi","isUndefined","onClickLink","showFiOptions","isFunction","$state","go","../node_modules/xo-page-components/src/aside-header/template.html","../node_modules/xo-tray-height/dist/directive.js","attrs","deprecatedCalculate","warn","message","headerHeight","mainHeight","asideContentHeight","$aside","parents","$asideContent","miniBrowser","minHeight","topClass","topSelector","topElem","inScope","curElem","className","getComputedStyle","position","style","parentNode","../node_modules/xo-ui-components/src/address-box/directive.js","$registerDirective","header","fullname","addresses","changeFn","addressList","line3","updateType","updateFn","../node_modules/xo-ui-components/src/address-box/styles.less","../node_modules/xo-ui-components/src/address-box/template.html","../node_modules/xo-ui-components/src/dropdown-multiline/directive.js","squid","require","$select","ngModel","updateCover","$span","html","createList","$options","getModel","modelName","model","subParts","substring","$option","split","hideList","$list","$container","append","isListVisible","positionList","top","setFocusOnSelected","showList","processContainerKeypress","keyCode","remove","Array","prototype","option","innerHTML","click","$target","removeAttr","removeProp","prop","$setViewValue","$innerContainer","keydown","bind","contains","blur","$newTarget","explicitOriginalTarget","activeElement","listCreated","render","options","wrap","parent","after","defaultOption","createElement","innerText","$broadcast","../node_modules/xo-ui-components/src/dropdown/directive.js","console","fn","dropdown","$parse","$window","$compile","userAgent","navigator","isWinOS","match","dropdownTextBindVar","executeSelectChange","$parentScope","selectInitialValue","ngChange","toggleOptionsLTROverride","documentElement","getAttribute","toggleClass","hasRTL","$parent","ngOptions","isDefined","selectTextElement","../node_modules/xo-ui-components/src/expired-fi-panel/factory.js","__dirname","__filename","exportProviders","factory","disallowedContentMap","disallowedExp","resourceName","control","disallowedFi","preAuth","getPxpResult","models","schedule","cart","isBilling","approval_type","isPurchase","solution","$integration","isFlow","$elmo","treatment_name","filterInstrumentsFromDisallowed","instrument","fundingOptions","fundingInstrument","disallowedDueToPreAuth","declineReason","isPreferred","disallowedDueToOther","mapDisallowedContent","disallowed","logInstrumentToFpti","fptiPayload","getAllInstruments","instruments","checkoutSession","getDisplayInstruments","$promise","resolve","getDisallowedInstruments","fundingOption","disallowedPreAuth","disallowedPreferred","getDisallowedPreferred","disallowedOther","../node_modules/xo-ui-components/src/floating-label/directive.js","getTreatment","treatmentType","newLocale","oldLocale","showFloatingLabels","input","select","label","flSpan","currentTarget","../node_modules/xo-ui-components/src/floating-label/styles.less","../node_modules/xo-ui-components/src/prefix-attrs-with/directive.js","elem","prefixAttrsWith","attrName","base","dasherizeToCamel","../node_modules/xo-ui-components/src/spinner-button/directive.js","track","onClick","buttonText","isProcessing","validate","submit","../node_modules/xo-wallet-components/src/add-card/addCep/directive.js","onSubmit","../node_modules/xo-wallet-components/src/add-card/addCep/route.js","../node_modules/xo-wallet-components/src/add-card/addCep/template.html","../node_modules/xo-wallet-components/src/add-card/addbilling/directive.js","_address","_checkout","_fi","auth","parentCallbacks","showmeftsection","hideparenthead","billingaddressupdated","isUserInputtedAddress","handleValidation","res","fields","field","$field","$el","first","getCountryCodeISO","billing","normalize","toggle","prefilledAddress","prefilled","editFlow","$stateParams","flow_type","billingAddresses","$BillingAddressesModel","flowEligibility","$FlowEligibilityModel","geolocation","$meta","localeCountry","debitCardFlow","paymentCardProductClass","cancelFn","done","el","updateAddress","showAddressFields","newBilling","$BillingAddressModel","billingAddress","full_address","updateBillingAddressAndReturn","validation","uponNormalization","newBillingAddress","unshift","../node_modules/xo-wallet-components/src/add-card/addbilling/route.js","attributes","../node_modules/xo-wallet-components/src/add-card/addbilling/template.html","../node_modules/xo-wallet-components/src/add-card/addcard/directive.js","_auth","_choice","_newMember","_index2","_checkoutIncentive","_util","_cardMetaData","_factory","_factory2","_constants","messagetitle","pagetitle","cardmodel","selectedPromotionCardType","promotion","pageLevel","logout","manageCardFlow","showCancel","showSetPreferredFi","onSuccess","backUri","showIncentive","incentiveAmount","updateCardCpa","cause","isCPAEligible","address_box","isNoBalanceEligible","$NoBalanceFactory","showPageTitle","isNmjDesign2","isNmjDesign3","showMessageTitle","showMessageBanner","showNoBalanceHeaderAndNoFiContingency","$AuthModel","$CheckoutSessionModel","NEED_CREDIT_CARD","noop","EXPIRED_CREDIT_CARD","tokenizedWalletInfoModel","$TokenizedWalletInfoModel","formattedNameInformal","formatNameInformal","email","isIndiaAndBilling","isCreditDisallowedForMerchant","headingTextKey","isConsumerCountry","isRecurringPayment","is_wps_flow","isReferenceTransaction","isMerchantCountry","isChargePatternImmediateOrDeferred","$NewMemberEligibility","getVariant","variant","isNmj","isNmjDesign1","isGreyHeader","isExpiredCard","disallowedInstruments","hasDisallowedBank","fi","showAddBank","addBankUri","contentKey","body","headerMsg","userName","$renderContent","$ChoiceEligibility","choiceExperiment","multipleFi","showMultipleFI","addErrorMessage","handleContingencies","contentBundle","defaultErrorKey","errorData","errorCodes","$fiErrorUtil","addPageErrors","scrollTo","initiateOTP","$ResolveOTP","action","country_code","number","resultModel","INIT_OTP_CONTINGENCY","card","last4","addFieldErrors","DEFAULT","handleCheckoutSession","isNewCard","cardType","plccOffer","cardAdded","numberAdded","cardTypeAdded","isString","last4Added","cvvData","last4ToUse","cardTypeToUse","set","updateCardSidebarMessage","updateCardPageMessage","addCardMessage","createOfferModel","markAsAlreadyShown","logObj","isWalletTokenization","Object","assign","baToken","isExisting","showplcc","showNotYou","is_auth_api_call","param","showHiMsg","sponsor_id","showSidebarBackArrow","manageCardFlowBackUri","showMultipeFI","$AddCardFactory","shouldDisplayAddressBox","displayAddressBox","gotoBilling","showCep","isUPOP","needOTPForAddCard","isCUP","isUpop","isUpdateDebitCard","flag","$CardMetaData","getMetaData","contentString","cardTypeChanged","handleFIContingency","contingency","contingencyName","errorDetails","errorProperty","invalidModels","defaultError","checkoutFlowType","_$fiErrorUtil$mapVali","mapValidationErrorToModel","invalidFields","highlightInvalidFields","addPageErrorByErrorName","fpti_payload","is3DSRequried","confirmation","is3DSrequired","initiate3DS","three_ds_confirmation_details","supplement","supplemental_data_details","threeDSData","cardBin","bank_identification_number","networkLogo","network_logo","ddsUrl","device_data_collection_url","jwtInfo","jwtIssuer","jwt_issuer","jwtOrgUnitId","jwt_org_unit_id","jwtDuration","jwt_duration","initiate3dsData","fundingId","confirmationMethod","bypassConfirmationProcess","referenceId","reference_id","cvv","integrationType","showThreedsPopup","hideModal","oncomplete3ds","onCardSaveSuccess","threeDSStatus","_fpti_payload","$q","when","$PreferredFi","preferred","transientError","err","reject","fptiData","from","to","add_incentive","context_id","add_incentive_reason","evaluateCheckoutOfferEligibilityModel","getOfferProgramModel","createOfferData","payer_id","buyer_id","value_issued","incentive_added","_validation","msg","planId","threeDSResolved","handleNotifyChangeContingency","int_error_desc","error_source","int_error_code","operation","NOTIFY_CHANGE_FUNDING_CONTINGENCY","status","STATUS_SUCCESS","STATUS_API_ERROR","STATUS_DECLINE","card4","preference","../node_modules/xo-wallet-components/src/add-card/addcard/route.js","_route","_route2","route","../node_modules/xo-wallet-components/src/add-card/addcard/template.html","../node_modules/xo-wallet-components/src/add-card/cardExpiry/directive.js","$xoCardExpiryDirective","expiryMonth","expiryYear","format","regexPattern","expiryDate","expiryInfo","regexMatch","exec","today","Date","currentYear","getFullYear","expMonth","Number","expYear","toString","../node_modules/xo-wallet-components/src/add-card/cardExpiry/template.html","../node_modules/xo-wallet-components/src/add-card/cardIssueDate/directive.js","$xoCardIssueDateDirective","issueMonth","issueYear","dateFormat","maxlength","formatIssueDate","charCode","strokes","issueDate","validMonths","range","num","validYears","y","month","year","isValid","parseInt","../node_modules/xo-wallet-components/src/add-card/cardIssueDate/template.html","../node_modules/xo-wallet-components/src/add-card/creditcard-input/directive.js","scrollTop","cardNumberChanged","cardLengthValid","cardLuhnValid","numdigits","parity","sum","digit","charAt","cardProductValid","productType","isPlcc","cardTypeServiceCall","tokenizedWalletCardTypeServiceCall","isUnsupportedCard","lastVerifiedBin","lastRequestedBin","mxDebitCards","unformattedCardNumber","showMXCardLogos","cardTypes","$CardTypesModel","formatCardNumber","spaces","selectCardTypeForDualBrands","dualCardTypes","keys","regex","selected","dualType","allowed","selectCardType","clearCardType","getCardTypeByNumberServiceCall","bin","$CardTypeFromBinModel","user_country","disallowedCard","allowedCardsTooltip","forceDropDown","showDropDown","ccNumber","GET_FI_ISSUER_DETAILS_ERR","$DeviceInfo","isSafariiOSBrowserView","getiOSVersion","showScanCardExperiment","supportedCardNamesCommaSeparated","supportedNames","changeCardNumber","cvvShown","expiryShown","enableDropDown","showAcceptedCardLogos","getCardTypeByNumber","types","getCardType","ccOnBlur","getAllowedCardTypeByNumber","getDisallowedCardTypeByNumber","enableAddMode","changeType","expiry_month","expiry_year","start_month","start_year","issue_number","dob_day","dob_month","dob_year","security_code","isCardTypeChanged","formattedNumber","subType","ccField","getElementById","inputLength","cursorStart","selectionStart","selectionEnd","../node_modules/xo-wallet-components/src/add-card/creditcard-input/template.html","../node_modules/xo-wallet-components/src/add-card/directive.js","_index3","fundingid","addCCDone","finish","callbacks","cardTypeSelected","cepDone","hide_type","$AddCardModel","$CardModel","resolution","fundingSource","funding","lastDigits","../node_modules/xo-wallet-components/src/add-card/dob/directive.js","pad","days","months","years","reverse","../node_modules/xo-wallet-components/src/add-card/dob/template.html","../node_modules/xo-wallet-components/src/add-card/index.js","_directive","defineProperty","enumerable","_directive2","../node_modules/xo-wallet-components/src/add-card/route.js","isupdatecard","../node_modules/xo-wallet-components/src/add-card/selectcard/directive.js","../node_modules/xo-wallet-components/src/add-card/selectcard/route.js","../node_modules/xo-wallet-components/src/add-card/selectcard/template.html","../node_modules/xo-wallet-components/src/add-card/template.html","../node_modules/xo-wallet-components/src/confirm-upop/confirm/directive.js","addMessage","msgKeys","stopConfirmCodeTimer","confirmCodeTimer","$interval","countdown","stopResendCodeTimer","resendCodeTimer","showResendLink","updateCountdown","timer","floor","isConfirmProcessing","startCountdown","resetTimer","processed","sendNewCode","otp_code","resendCode","_this2","resolveOTP","cardLast4","confirmOTP","_this3","card_data","expiration_time","card_verification_code","COMPLETE_OTP_CONTINGENCY","_this4","phoneLast4","../node_modules/xo-wallet-components/src/confirm-upop/confirm/template.html","../node_modules/xo-wallet-components/src/confirm-upop/directive.js","_addCard","onCancel","goto","cardNumber","fromLoginOverlay","handler","_success","closeModal","initSuccess","collectOtpInput","confirmed","setMessage","../node_modules/xo-wallet-components/src/confirm-upop/init/directive.js","initOtp","../node_modules/xo-wallet-components/src/confirm-upop/init/template.html","../node_modules/xo-wallet-components/src/confirm-upop/route.js","$xoConfirmUpopRoute","$Route","path","pageOnOverlay","../node_modules/xo-wallet-components/src/confirm-upop/styles.less","../node_modules/xo-wallet-components/src/confirm-upop/template.html","../node_modules/xo-wallet-components/src/fi-contingency-list/contingencies.js","INSTRUMENT_COUNT_EXCEEDED","INSTRUMENT_COUNT_EXCEEDED_VERIFIED","INSTRUMENT_COUNT_LIMIT_EXCEEDED","INSTRUMENT_COUNT_LIMIT_EXCEEDED_VERIFIED","INSTRUMENT_UNAVAILABLE","INSTRUMENT_REFUSED_DUE_TO_MAX_LIMIT","INSTRUMENT_REFUSED_DUE_TO_MAX_SHARED_INSTRUMENT_LIMIT","INSTRUMENT_SHARING_LIMIT_EXCEEDED","INSTRUMENT_ALREADY_EXISTS","INSTRUMENT_BILLING_ADDRESS_NOT_ACCEPTED","BILLING_ADDRESS1","BILLING_CITY","BILLING_COUNTRY","BILLING_DIFFERENT_COUNTRY","INSTRUMENT_UPDATE_NO_CHANGE","INSTRUMENT_DUPLICATE_LIMIT_REACHED","NOT_ELIGIBLE_TO_EDIT_CARD","INSTRUMENT_REFUSED","INSTRUMENT_INTERNATIONAL","REJECT_REFUSED","PAYPAL_DEBIT_CARD_REFUSED","PAYPAL_CREDIT_CARD_REFUSED","PAYPAL_CARD_REFUSED","EXCESSIVE_REJECTIONS","CC_INVALID_CSC","INVALID_EXPIRATION_DATE","CHECK_DIGITS_NOT_PRESENT","REJECT_UNKNOWN","SETTLEMENT_DENIED","MAX_AMOUNT_EXCEEDED","ISSUER_ERROR","MISSING_FIELD","INVALID_PARAMETERS","INVALID_DATA","INVALID_ACCOUNT","INVALID_INSTRUMENT_ID","ACCOUNT_RESTRICTED","ISSUER_RESTRICTED","ISSUER_REJECTED","ADDRESS_MISMATCH","CHECK_DIGITS_NOT_PROC","CHECK_DIGITS_UNSUPPORTED","CHECK_DIGITS_UNAVAILABLE","BILL_ADDR_UNAVAILABLE","BILL_ADDR_UNSUPPORTED","BILL_ADDR_UNAVAILABLE_GLOBAL","BILL_ADDR_NOT_ALLOWED","BILL_ADDR_UNAVAILABLE_INTL","INSTRUMENT_DISABLED","PI_TYPE_NOT_SUPPORTED","REJECT_AMEX_ADULT","INVALID_BANK_ROUTING_NUMBER","BANK_ROUTING_NUMBER_IS_EMPTY","INVALID_BANK_ACCOUNT_NUMBER","BANK_ACCOUNT_NUMBER_IS_EMPTY","INVALID_BANK_IBAN","INVALID_IBAN_CODE","INVALID_BANK_IBAN_CONVERSION_ERROR","INVALID_BENEFICIARY_FIRST_NAME","INVALID_BENEFICIARY_NAME","INVALID_BANK_BENEFICIARY_NUMBER","INVALID_BANK_ADDRESS","INVALID_CARD_NUMBER","INVALID_CARD_TYPE","INVALID_SECURITY_CODE","INVALID_FIRST_NAME","INVALID_LAST_NAME","INVALID_EXPIRY","INVALID_PHONE","BANK_ADDRESS_IS_EMPTY","INVALID_BANK_BRANCH_NUMBER","ADD_REFUSED_DUE_TO_EXCEEDING_MAX_DUPLICATE_INSTRUMENT_LIMIT","EMPTY_DATA","ISSUER_DECLINE","WRONG_CONFIRMATION_VALUES","CONFIRMATION_RESEND_COUNT_EXCEEDED","FREQUENT_REQUEST_VERIFICATION_CODE","TRANSACTION_TIMEOUT","NOT_CONFIRMED","CONTACT_CARD_ISSUER_TO_VERIFY","CARD_NOT_ACTIVATED_FOR_UPOP","RESTRICTED_CARD","INVALID_ONE_TIME_PASSWORD","DUPLICATED_TRANSACTION","../node_modules/xo-wallet-components/src/fi-contingency-list/util.js","_contingencies","_contingencies2","FIELD_TO_MODEL_MAPPING","ACTOR","BILLING_ADDRESS","BIN","CARD","CUP_CARD","CVV","DOB","EXPIRY","defaultKey","errorCode","_iterator","_isArray","_i","Symbol","iterator","modelPrefix","addFieldErrorsByName","fieldName","./pages/xo-add-card/directive.js","$xoPageAddCardPageComponent","_app","_fiMessages","_factory3","_sharedUtil","$ExpiredFiPanelFactory","isProcessorDeclineExperiment","walletPinModel","isSetupEligible","debug","routeTo","goTo","parentState","NEED_DEBIT_CARD","EXPIRED_DEBIT_CARD","unavailableCard","$UnavailableCardModel","payee","noBalanceFactoryState","decideEligibility","fiMeta","fetch","$SharedUtil","checkCpaEligibility","inCpaElmoTreatment","hash","$TokenizedWalletPinModel","hideControlMsg","checkoutIncentiveEligibility","eligibility_reason","isGambling","offerEligibilityData","language","getLocaleCode","touchpoint_code","offerCurrencyCode","getCartCurrencyCode","txnMinimumLowestDenom","precisionDigits","currency","digits","txnMinimum","pow","toFixed","getPurchaseAmount","pxpFptiData","state_name","transition_name","incentive_name","getCheckoutIncentivePxpResult","selectFiVariant","selectFi","checkDeclineReason","disallowedNonBankInstruments","disallowedInstrument","addCardContingency","issuerDeclineTreatment","declinedInstruments","getIssuerDeclineElmoResult","smartDollarAuthFailed","$fiMessages","processorDeclinedMsg","wallet","creditDisallowedMessage","redirectFromXoon","retry","avsRetry","getGamblingMsg","getAddCardMsg","noBillingFIContingencyIndia","getAddBankTreatmentMsg","getPreAuthTreatmentMsg","getAddCardTreatmentMsg","title","offerValue","currencyCode","showIncentiveTerms","toggleShowIncentiveTerms","isAddCardContingency","./pages/xo-add-card/route.js","$AddCardPageRoute","templateName","pageGoal","./pages/xo-add-card/template.html"],"mappings":"AAAAA,cAAc,EAAE,IAEVC,yGACA,SAAUC,EAAQC,GCHxBD,EAAOC,QAAU,yUDSXC,qEACA,SAAUF,EAAQC,EAASE,GERjCF,EAAQG,YAAa,EACrBH,EAAQI,2BAAyBC,EAEjC,IAAIC,GAAW,EAAQ,0CAEnBC,EAAS,EAAQ,sCAErB,GAAQ,8DAER,EAAQ,wEAER,EAAQ,mEAER,EAAQ,uEAER,EAAQ,iEAER,IAAIC,GAAS,EAAQ,iDAErB,GAAQ,+DAER,EAAQ,wDAER,IAAIC,GAAY,EAAQ,uEAEpBC,EAIJ,SAAgCC,GAAO,MAAOA,IAAOA,EAAIR,WAAaQ,GAAQ,QAAWA,IAJjDF,GAEpCG,EAAU,EAAQ,4CAIlBR,EAAyBJ,EAAQI,uBAAyBG,EAAOM,WAAWC,OAAO,0BACnFC,IAAK,iBACLC,SAAUN,EAAoB,QAC9BO,OACIC,SACIC,KAAM,MACNC,UAAU,GAEdC,YACIF,KAAM,MACNC,UAAU,GAEdE,SACIH,KAAM,MACNC,UAAU,GAEdG,UACIJ,KAAM,MACNC,UAAU,GAEdI,mBACIL,KAAM,MACNC,UAAU,GAEdK,SACIN,KAAM,MACNC,UAAU,GAEdM,kBACIP,KAAM,MACNC,UAAU,GAEdO,UACIR,KAAM,MACNC,UAAU,GAEdQ,oBACIT,KAAM,MACNC,UAAU,GAEdS,wBACIV,KAAM,MACNC,UAAU,GAEdU,0BACIX,KAAM,MACNC,UAAU,IAGlBW,YAAa,SAAU,YAAa,wBAAyB,4BAA6B,sBAAuB,qBAAsB,SAAUC,EAAQC,EAAWC,EAAuBC,EAA2BC,EAAqBC,GA6CvO,QAASC,MACLC,GAAa,EAAIhC,EAAOiC,UAAU,wBAAwB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QAAW,eAIvBE,WACIN,KAAM,oBACNif,YACIvoB,MAAO,QACPopB,aAAc,eACd5P,QAAS,UACT6P,UAAW,YACX,mBAAoB,YACpBK,OAAQ,SACR,cAAe,aACf,iBAAkB,gBAClB,mBAAoB,kBACpBS,MAAO,YAKnBntB,SAAQG,MAAM,oBAAqB8yC,GACnCz1C,EAAO6O,iBjE62QD+mC,oCACA,SAAUp2C,EAAQC,GkE35QxBD,EAAOC,QAAU","file":"js/0.113329050bef597b9cba.js","sourcesContent":["webpackJsonp([0,1],{\n\n/***/ \"../node_modules/noop-loader/index.js!../node_modules/xo-ui-components/src/spinner-button/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n \\n
\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-address-components/src/add-address/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\nexports.$xoAddAddressComponent = undefined;\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/dropdown/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/dropdown-multiline/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/error-tooltip/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/prefix-attrs-with/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-form-components/src/name-input/directive.js\");\n\nvar _index = __webpack_require__(\"../node_modules/xo-models/src/address/index.js\");\n\n__webpack_require__(\"../node_modules/xo-form-components/src/zipcode/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-models/src/shippingMethod/index.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-address-components/src/add-address/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _logger = __webpack_require__(\"../node_modules/xo-beaver/dist/logger.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar $xoAddAddressComponent = exports.$xoAddAddressComponent = _squid.$Component.extend('$xoAddAddressComponent', {\n tag: 'xo-add-address',\n template: _template2['default'],\n props: {\n address: {\n type: 'var',\n required: false\n },\n isShipping: {\n type: 'var',\n required: false\n },\n country: {\n type: 'var',\n required: false\n },\n metadata: {\n type: 'str',\n required: false\n },\n hideButtonHandler: {\n type: 'var',\n required: false\n },\n hideCep: {\n type: 'var',\n required: false\n },\n hideAddPreferred: {\n type: 'var',\n required: false\n },\n hideName: {\n type: 'var',\n required: false\n },\n triggerZipCodeBlur: {\n type: 'var',\n required: false\n },\n triggerZipCodeKeyPress: {\n type: 'var',\n required: false\n },\n renderBillingAddCheckbox: {\n type: 'var',\n required: false\n }\n },\n controller: ['$scope', '$populate', '$CheckoutAppDataModel', '$ShippingRuleSummaryModel', '$CheckoutPayeeModel', '$CheckoutCartModel', function ($scope, $populate, $CheckoutAppDataModel, $ShippingRuleSummaryModel, $CheckoutPayeeModel, $CheckoutCartModel) {\n // eslint-disable-line max-statements\n\n $scope.token = _angular.$rootScope.token;\n\n $populate($scope, {\n checkoutCart: $CheckoutCartModel.instance($scope.token).retrieve(),\n checkoutAppData: $CheckoutAppDataModel.instance($scope.token).retrieve(),\n checkoutPayee: $CheckoutPayeeModel.instance($scope.token).retrieve()\n }).then(function () {\n // Snt Flow check\n if ($scope.checkoutAppData.is_snt_supported()) {\n $populate($scope, {\n profileRulesSummary: $ShippingRuleSummaryModel.instance($scope.token).retrieve({\n params: {\n merchant_id: $scope.checkoutPayee.merchant.id,\n currency_code: $scope.checkoutCart.purchase.amounts.total.currency_code\n }\n })\n }).then(function () {\n // Variable to determine the county is optional or required for GB SNT and CALLBACK flows.\n // with out being the county required, shipping methods won't populate.\n // JIRA ID : PPPLMER-71514\n _logger.$logger.info('setting_snt_or_callback_flow_for_snt');\n $scope.snt_or_callback_flow = !!($scope.profileRulesSummary && $scope.profileRulesSummary.isSnTEnabled);\n });\n } else if ($scope.checkoutCart.instantUpdateIntegration) {\n _logger.$logger.info('setting_snt_or_callback_flow_for_callback');\n $scope.snt_or_callback_flow = true;\n }\n });\n\n var sortStates = void 0;\n var country = $scope.country || $scope.address && $scope.address.country;\n\n $scope.country = country;\n $scope.locale = _squid.$locale;\n $scope.metadata = _squid.$MetadataModel.create();\n\n // If the user changes their shipping/billing address country, fetch that metadata (if needed) and re-render.\n $scope.$watch('country', function () {\n $scope.metadata.choose($scope.country, $scope.locale.lang);\n onCountryChange();\n });\n\n function onCountryChange() {\n sortStates = (0, _squid.$feature)('sortStatesForAddress', false, $scope.country);\n\n if (sortStates) {\n getSortedStateList();\n }\n }\n\n onCountryChange();\n\n // If the user changes languagle toggle, fetch that metadata (if needed) and re-render.\n $scope.$on('contentChange', function () {\n $scope.metadata.choose($scope.country, $scope.locale.lang);\n });\n\n /**\n * Prefix to use for `id`, `name`, and `for` attributes. This is needed because Xoon will sometimes display both billing\n * and shipping address forms on the same page and without a prefix there will be duplicte `id`s and `name`s on the page.\n */\n $scope.attrPrefix = $scope.isShipping ? 'shipping' : 'billing';\n\n $scope.$watch('address.state', function () {\n _angular.$rootScope.$emit($scope.attrPrefix + 'AddressStateChange', $scope.address);\n });\n\n $scope.normalizeCountry = function (countryCode) {\n return (0, _squid.$feature)('AddressFormat', countryCode, countryCode) || countryCode;\n };\n\n $scope.isAddPreferred = (0, _squid.$feature)('preferredShipping', false, $scope.country) && $scope.isShipping;\n $scope.isAddressLookupEnabled = (0, _squid.$feature)('addressLookup', false, $scope.country);\n $scope.isShowLookupFields = $scope.isAddressLookupEnabled;\n\n if ($scope.isShowLookupFields) {\n // Show the Address Lookup Fields only when the hideButtonHandler function is passed by the caller.\n if ($scope.hideButtonHandler) {\n $scope.hideButtonHandler(true);\n } else {\n $scope.isShowLookupFields = false;\n }\n }\n\n function getSortedStateList() {\n var states = _squid.$locale.content.get(sortStates, {});\n var statesList = [];\n\n angular.forEach(states, function (key, value) {\n statesList.push({ code: value, sname: key });\n });\n statesList.sort(function (a, b) {\n return a.sname.localeCompare(b.sname);\n });\n\n $scope.sortedStatesList = statesList;\n }\n\n $scope.formatZip = function () {\n var unformatted = $scope.address.postal_code && $scope.address.postal_code.replace(/[^0-9]/gi, '');\n var formatted = [['', unformatted.slice(0, 3)], ['-', unformatted.slice(3)]].map(function (x) {\n return x[1] && x[0] + x[1] || '';\n }).join('');\n\n $scope.address.postal_code = formatted;\n };\n\n function getAddress(address) {\n var COMMA = ', ';\n var SPACE = ' ';\n var line1 = void 0;\n var line2 = void 0;\n\n function prefix(str, prefixStr) {\n if (str) {\n return (prefixStr ? prefixStr : '') + str;\n }\n return '';\n }\n\n if (!address.deliveryAddresses || angular.isArray(address.deliveryAddresses) && address.deliveryAddresses.length === 0) {\n // if deliveryAddresses is not an array or is empty\n // line would be empty, hence return to caller.\n return;\n }\n\n var array = address.deliveryAddresses;\n\n if (array.length > 1) {\n // populate line2 from the last element\n line2 = array.pop();\n }\n line1 = array.join(COMMA);\n\n var displayLine1 = line1 + prefix(line2, COMMA);\n var displayLine2 = prefix(address.city) + prefix(address.state, COMMA) + prefix(address.postal_code, SPACE);\n var displayLine3 = prefix(address.country);\n\n return {\n line1: line1,\n line2: line2,\n city: address.city,\n state: address.state,\n postal_code: address.postal_code,\n country: address.country,\n displayLine1: displayLine1,\n displayLine2: displayLine2,\n displayLine3: displayLine3,\n dropDownAddress: displayLine1 + prefix(displayLine2, ' \\\\n ') + prefix(displayLine3, ' \\\\n ')\n };\n }\n\n function populateAddressFormFields(address) {\n $scope.address.line1 = address.line1;\n $scope.address.line2 = address.line2;\n $scope.address.city = address.city;\n $scope.address.state = address.state;\n $scope.address.postal_code = address.postal_code;\n $scope.address.neighborhood = address.neighborhood;\n }\n\n /**\n * Show error message and display the full-address fields\n */\n function populateErrorMessage() {\n var messages = [];\n\n messages.push($scope.locale.content.get('addressBook.lookupError'));\n $scope.lookupFailureMessage = {\n msgs: messages,\n type: 'warning'\n };\n $scope.isShowLookupFields = false;\n $scope.isLookupFailure = true;\n }\n\n function processLookupResult(list) {\n if (list.length > 1) {\n // Show drop-down list of all addresses\n $scope.isLookupSuccess = true;\n $scope.isShowLookupDropDown = true;\n $scope.lookupAddressList = list.map(function (addr) {\n return getAddress(addr);\n });\n } else if (list.length === 1) {\n // Show single address component\n $scope.isLookupSuccess = true;\n $scope.isShowLookupDropDown = false;\n\n var address = getAddress(list[0]);\n\n $scope.singleAddress = address;\n populateAddressFormFields(address);\n } else {\n populateErrorMessage();\n }\n }\n\n if ($scope.address) {\n $scope.lastPrefilledZip = $scope.address.postal_code;\n }\n\n $scope.prefill = function () {\n var cepPattern = /^(\\d{5}-\\d{3}|\\d{5}|\\d{8})$/;\n var first_name = void 0;\n var last_name = void 0;\n\n if ($scope.lastPrefilledZip === $scope.address.postal_code || !cepPattern.test($scope.address.postal_code)) {\n return;\n }\n\n if ($scope.isShipping) {\n first_name = $scope.address.first_name;\n last_name = $scope.address.last_name;\n }\n\n $scope.prefillAddress = new _index.$PrefillAddressModel({\n id: $scope.token,\n address: {\n country: $scope.address.country,\n postal_code: $scope.address.postal_code\n }\n });\n\n return $scope.prefillAddress.save({\n data: $scope.prefillAddress,\n success: function success(result) {\n if (result) {\n populateAddressFormFields(result);\n $scope.lastPrefilledZip = $scope.address.postal_code;\n if ($scope.isShipping) {\n $scope.address.first_name = first_name;\n $scope.address.last_name = last_name;\n }\n }\n }\n });\n };\n\n $scope.findAddress = function () {\n $scope.lookupAddress = _index.$PrefillAddressModel.create($scope.token, {\n address: {\n country: $scope.address.country,\n postal_code: $scope.address.postal_code,\n house_number: $scope.address.house_number,\n building_name: $scope.address.building_name\n }\n });\n\n if (document.querySelector('#lookupZip.ng-invalid')) {\n document.querySelector('#addressLookupFields').classList.add('validated');\n } else {\n $scope.isLookupProcessing = true;\n $scope.lookupAddress.save({\n data: $scope.lookupAddress,\n silent: true,\n success: function success(result) {\n processLookupResult(result);\n $scope.hideButtonHandler(false);\n },\n contingencies: {\n INTERNAL_ERROR: populateErrorMessage\n }\n });\n }\n };\n\n $scope.changeAddressDropDown = function () {\n populateAddressFormFields($scope.address.selectedAddress);\n };\n\n $scope.showFullAddress = function () {\n $scope.isShowLookupFields = false;\n $scope.hideButtonHandler(false);\n };\n\n /**\n * Pass an array of group names to retrieve the list of states\n * e.g. ['england', 'northernIreland', 'scotland', 'wales', 'ukOffshoreDependencies']\n */\n var stateNamesInGroup = [];\n\n $scope.retrieveStateNamesInGroup = function (groups) {\n if (stateNamesInGroup.length) {\n // Angular keeps watching for this method as its used in ng-model, hence return cached data.\n return stateNamesInGroup;\n }\n var content = _squid.$locale.content;\n\n angular.forEach(groups, function (group) {\n var groupName = content.common[group];\n var statesList = content[group];\n\n angular.forEach(statesList, function (value, key) {\n stateNamesInGroup.push({\n key: key,\n value: value,\n group: groupName\n });\n });\n });\n return stateNamesInGroup;\n };\n\n $scope.zipCodeBlur = function () {\n if ($scope.triggerZipCodeBlur) {\n _angular.$rootScope.$emit('zip_code_blur');\n }\n };\n\n $scope.zipCodeKeyPress = function (event) {\n if ($scope.triggerZipCodeKeyPress) {\n _angular.$rootScope.$emit('zip_code_keypress', { event: event });\n }\n };\n }]\n});\n\nangular.value(\"$xoAddAddressComponent\", $xoAddAddressComponent);\n_angular.$rootScope;\n\n_squid.$Component;\n\n_squid.$feature;\n\n_squid.$locale;\n\n_squid.$MetadataModel;\n\n_index.$PrefillAddressModel;\n\n_logger.$logger;\n\n/***/ }),\n\n/***/ \"../node_modules/xo-address-components/src/add-address/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n \\n
\\n
\\n \\n\\n
\\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n
\\n\\n
\\n \\n
\\n
\\n
\\n {{ content('addressBook.address') }}\\n
\\n
\\n \\n
\\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n {{ content('addBillingAddress.lookupTitle') }}\\n {{ content('addressBook.enterFullAddress') }}\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n \\n
\\n
\\n
\\n {{ content('addressBook.address') }}\\n \\n {{ content('common.change') }}\\n \\n
\\n
\\n\\n \\n
\\n
\\n {{ singleAddress.displayLine1 }}
\\n {{ singleAddress.displayLine2 }}
\\n {{ singleAddress.displayLine3 }}\\n
\\n
\\n
\\n \\n
\\n \\n \\n
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n
\\n \\n \\n
\\n \\n
\\n \\n \\n
\\n
\\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n
\\n \\n\\n
\\n \\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n
\\n \\n \\n
\\n \\n
\\n \\n \\n
\\n
\\n
\\n \\n
\\n
\\n \\n
\\n
\\n \\n \\n
\\n\\n
\\n \\n \\n
\\n\\n
\\n \\n \\n
\\n\\n
\\n \\n \\n
\\n
\\n
\\n
\\n\\n
\\n \\n \\n
\\n\\n
\\n \\n \\n
\\n
\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-address-components/src/address-normalization/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function($) {\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _index = __webpack_require__(\"../node_modules/xo-models/src/address/index.js\");\n\n__webpack_require__(\"../node_modules/xo-page-components/src/aside-header/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-tray-height/dist/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-address-components/src/address-normalization/styles.less\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-address-components/src/address-normalization/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoAddressNormalization', function () {\n return {\n template: _template2['default'],\n scope: {\n id: '=?',\n address: '=?',\n doneFn: '=?',\n sidebar: '=?',\n hideBackButton: '=?'\n },\n\n controller: ['$scope', function ($scope) {\n _squid.$util.assert($scope.address, 'Original Address cannot be empty');\n\n $scope.showNormalization = false;\n\n var normalize = (0, _squid.$feature)('addressNormalization', false, $scope.address.country);\n if (!normalize) {\n $scope.doneFn($scope.address, false);\n return;\n }\n\n var userEnteredAddress;\n var addrFormat = (0, _squid.$feature)('FormatAddressForNormalization', $scope.address.country, $scope.address.country);\n\n $scope.addressSelected = 'normalizedAddress';\n $scope.transitionName = 'address_normalization_normalizedAddress';\n\n // Brazil specific format\n if (addrFormat === 'AddressBR') {\n userEnteredAddress = angular.fromJson(angular.toJson($scope.address));\n userEnteredAddress.line1 = $scope.address.line1 + ' ' + $scope.address.streetNumber;\n userEnteredAddress.line2 = $scope.address.neighborhood;\n }\n\n $scope.servAddress = userEnteredAddress ? userEnteredAddress : $scope.address;\n $scope.servAddress.normalization_status = 'UNNORMALIZED_USER_PREFERRED';\n\n $scope.addressNormalization = new _index.$AddressNormalizationModel({\n id: $scope.id,\n address: $scope.servAddress\n });\n\n function centerLightBox() {\n var element = $('#lbox');\n if (!element.length) {\n return;\n }\n\n var windowElement = $(window);\n var lboxContainerElem = $('#lboxContainer');\n element.css('top', Math.max(0, (windowElement.height() - element.outerHeight()) / 2) + 'px');\n element.css('width', '65%');\n var computedLeft = (windowElement.width() - element.outerWidth()) / 2;\n var leftBound = lboxContainerElem.offset().left + lboxContainerElem.width() * 0.1;\n var elementLeft = computedLeft < leftBound ? leftBound : computedLeft;\n if (computedLeft < leftBound) {\n element.css('width', lboxContainerElem.width() * 0.8);\n }\n element.css('left', Math.max(0, elementLeft) + 'px');\n return element;\n }\n\n function trinityResponseCallback() {\n $scope.showNormalization = true;\n\n // default behavior of $timeout with no 2nd param is to wait for dom to finish rendering before executing callback\n (0, _angular.$timeout)(function () {\n centerLightBox();\n $(window).resize(centerLightBox);\n });\n }\n\n $scope.addressNormalization.save({\n data: $scope.addressNormalization,\n\n contingencies: {\n VALIDATION_ERROR: function VALIDATION_ERROR() {\n trinityResponseCallback();\n $scope.transitionName = 'address_normalization_enteredAddress';\n return;\n }\n },\n\n success: function success(result) {\n trinityResponseCallback();\n if (result === false) {\n // trinity doesn't find any match\n $scope.transitionName = 'address_normalization_enteredAddress';\n return;\n }\n $scope.normalizedAddress = result;\n $scope.normalizedAddress.normalization_status = 'NORMALIZED';\n\n if (addrFormat === 'AddressBR') {\n $scope.normalizedAddress.line1 = $scope.normalizedAddress.streetName + ' ' + $scope.normalizedAddress.streetNumber;\n $scope.normalizedAddress.line2 = $scope.normalizedAddress.neighborhood;\n }\n\n // if the two addresses equal, no need to show the panel\n if ($scope.isEqual($scope.normalizedAddress, $scope.servAddress)) {\n if ($scope.servAddress.preferred_address) {\n $scope.normalizedAddress.preferred_address = true;\n }\n\n if (addrFormat === 'AddressBR' && $scope.address.line2) {\n $scope.normalizedAddress.line1 = $scope.normalizedAddress.line1 + ' ' + $scope.address.line2;\n }\n $scope.callback($scope.normalizedAddress, false);\n } else if (addrFormat === 'AddressBR' && $scope.address.line2) {\n $scope.normalizedAddress.line1 = $scope.normalizedAddress.line1 + ' ' + $scope.address.line2;\n }\n },\n\n error: trinityResponseCallback\n });\n\n // make space and case insensitive. sub empty vals for undefined.\n function desensitizedAddress(addr) {\n for (var key in addr) {\n var val = addr[key];\n if (addr.hasOwnProperty(key)) {\n if (val && val.length) {\n addr[key] = val.trim().toLowerCase();\n } else {\n addr[key] = undefined;\n }\n }\n }\n return addr;\n }\n\n // check if the two address are the same\n $scope.isEqual = function (address1, address2) {\n var addressOne = desensitizedAddress(JSON.parse(JSON.stringify(address1)));\n var addressTwo = desensitizedAddress(JSON.parse(JSON.stringify(address2)));\n\n if (!addressOne || !addressTwo) {\n return false;\n }\n\n return addressOne.line1 === addressTwo.line1 && addressOne.line2 === addressTwo.line2 && addressOne.city === addressTwo.city && addressOne.state === addressTwo.state && addressOne.postal_code === addressTwo.postal_code && addressOne.country === addressTwo.country;\n };\n\n // Australia displays address line2 first\n $scope.isLine2First = function () {\n return $scope.address.country === 'AU';\n };\n\n $scope.onBack = function () {\n $scope.callback($scope.address, true);\n };\n\n $scope.selection = function (value) {\n $scope.transitionName = 'address_normalization_' + value;\n };\n\n $scope.onContinue = function () {\n $scope.addressSelected = this.addressNormalizationForm.addressSelected;\n\n if ($scope.addressSelected && $scope.addressSelected.$modelValue === 'normalizedAddress') {\n if ($scope.servAddress.preferred_address) {\n $scope.normalizedAddress.preferred_address = true;\n }\n $scope.callback($scope.normalizedAddress, false);\n } else {\n $scope.servAddress.normalization_status = 'UNNORMALIZED_USER_PREFERRED';\n if (addrFormat === 'AddressBR' && $scope.address.line2) {\n $scope.servAddress.line1 = $scope.servAddress.line1 + ' ' + $scope.address.line2;\n }\n $scope.callback($scope.servAddress, false);\n }\n };\n\n $scope.callback = function (address, isBack) {\n $scope.doneFn(address, isBack);\n };\n }]\n };\n});\n\n_angular.$timeout;\n\n_squid.$feature;\n\n_squid.$util;\n\n_index.$AddressNormalizationModel;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-address-components/src/address-normalization/route.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\nexports.$AddressNormalizationRoute = undefined;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-address-components/src/address-normalization/directive.js\");\n\nvar $AddressNormalizationRoute = exports.$AddressNormalizationRoute = _squid.$ComponentRoute.extend('AddressNormalizationRoute', {\n name: 'addressNormalization',\n titleContent: 'addressNormalization.addressmatch',\n directive: 'xo-address-normalization',\n trackingData: {\n fptiState: 'address_normalization',\n buzname: {\n 'fullpage': {\n 'pagename': '%::address_normalization',\n 'pagename2': '%::address_normalization:member:hermes:',\n 'version': 'member:%:'\n }\n }\n },\n loginRequired: true,\n\n children: []\n});\n\nangular.value(\"$AddressNormalizationRoute\", $AddressNormalizationRoute);\n_squid.$ComponentRoute;\n\n/***/ }),\n\n/***/ \"../node_modules/xo-address-components/src/address-normalization/styles.less\":\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ \"../node_modules/xo-address-components/src/address-normalization/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n \\n
\\n
\\n
\\n

{{ content('addressNormalization.title') }}

\\n

{{ content('addressNormalization.intro') }}

\\n
\\n

\\n \\n
\\n
\\n

\\n\\n \\n
\\n
\\n
\\n

{{ content('addressNormalization.noaddressmatchTitle') }}

\\n

{{ content('addressNormalization.noaddressmatchMsg') }}

\\n \\n
\\n

{{ content('addressNormalization.addressyouenter') }}

\\n
\\n
\\n {{servAddress.line2}} {{servAddress.line1}},\\n
\\n
\\n
{{servAddress.line1}}, {{address.line2}}, {{servAddress.line2}}
\\n
{{servAddress.line1}}, {{servAddress.line2}}
\\n
\\n
\\n {{servAddress.city}}, {{servAddress.state}}\\n {{servAddress.postal_code}}, {{content('countryList.'+servAddress.country)}}\\n
\\n
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n \\n
\\n
\\n
\\n
\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/name-input/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/error-tooltip/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/floating-label/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/prefix-attrs-with/directive.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-form-components/src/name-input/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoNameInput', {\n tag: 'xo-name-input',\n\n template: _template2['default'],\n\n props: {\n attrPrefix: {\n required: false,\n type: 'var'\n },\n country: {\n required: false,\n type: 'str'\n },\n user: {\n required: false,\n type: 'var'\n }\n },\n\n lifecycle: {\n enter: function enter() {\n var _this = this;\n\n this.locale = _squid.$locale;\n this.metadata = _squid.$MetadataModel.create();\n\n var handleCountryChange = function handleCountryChange() {\n _this.metadata.choose(_this.country || _squid.$locale.country, _squid.$locale.lang);\n };\n\n this.$watch('country', handleCountryChange);\n }\n }\n});\n\n\n_squid.$Component;\n\n_squid.$locale;\n\n_squid.$MetadataModel;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/name-input/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n
\\n \\n
\\n
\\n \\n \\n
\\n
\\n\\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n\\n
\\n \\n
\\n \\n \\n
\\n\\n \\n
\\n \\n \\n
\\n
\\n
\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/phone/lib/territoriesByCode.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n return {\n 'AC': {\n 'status': 'reserved',\n 'phoneCountryCode': '247',\n 'showCountryCodeList': false\n },\n 'AD': {\n 'status': 'assigned',\n 'phoneCountryCode': '376',\n 'showCountryCodeList': false\n },\n 'AE': {\n 'status': 'assigned',\n 'phoneCountryCode': '971',\n 'showCountryCodeList': false\n },\n 'AF': {\n 'status': 'assigned',\n 'phoneCountryCode': '93',\n 'showCountryCodeList': false\n },\n 'AG': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'AI': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'AL': {\n 'status': 'assigned',\n 'phoneCountryCode': '355',\n 'showCountryCodeList': false\n },\n 'AM': {\n 'status': 'assigned',\n 'phoneCountryCode': '374',\n 'showCountryCodeList': false\n },\n 'AN': {\n 'status': 'assigned',\n 'phoneCountryCode': '599',\n 'showCountryCodeList': false\n },\n 'AO': {\n 'status': 'assigned',\n 'phoneCountryCode': '244',\n 'showCountryCodeList': false\n },\n 'AQ': {\n 'status': 'assigned',\n 'phoneCountryCode': '672',\n 'showCountryCodeList': false\n },\n 'AR': {\n 'status': 'assigned',\n 'phoneCountryCode': '54',\n 'showCountryCodeList': false\n },\n 'AS': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'AT': {\n 'status': 'assigned',\n 'phoneCountryCode': '43',\n 'showCountryCodeList': true\n },\n 'AU': {\n 'status': 'assigned',\n 'phoneCountryCode': '61',\n 'showCountryCodeList': true\n },\n 'AW': {\n 'status': 'assigned',\n 'phoneCountryCode': '297',\n 'showCountryCodeList': false\n },\n 'AZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '994',\n 'showCountryCodeList': false\n },\n 'BA': {\n 'status': 'assigned',\n 'phoneCountryCode': '387',\n 'showCountryCodeList': false\n },\n 'BB': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'BD': {\n 'status': 'assigned',\n 'phoneCountryCode': '880',\n 'showCountryCodeList': false\n },\n 'BE': {\n 'status': 'assigned',\n 'phoneCountryCode': '32',\n 'showCountryCodeList': true\n },\n 'BF': {\n 'status': 'assigned',\n 'phoneCountryCode': '226',\n 'showCountryCodeList': false\n },\n 'BG': {\n 'status': 'assigned',\n 'phoneCountryCode': '359',\n 'showCountryCodeList': false\n },\n 'BH': {\n 'status': 'assigned',\n 'phoneCountryCode': '973',\n 'showCountryCodeList': false\n },\n 'BI': {\n 'status': 'assigned',\n 'phoneCountryCode': '257',\n 'showCountryCodeList': false\n },\n 'BJ': {\n 'status': 'assigned',\n 'phoneCountryCode': '229',\n 'showCountryCodeList': false\n },\n 'BL': {\n 'status': 'assigned',\n 'phoneCountryCode': '590',\n 'showCountryCodeList': false\n },\n 'BM': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'BN': {\n 'status': 'assigned',\n 'phoneCountryCode': '673',\n 'showCountryCodeList': false\n },\n 'BO': {\n 'status': 'assigned',\n 'phoneCountryCode': '591',\n 'showCountryCodeList': false\n },\n 'BQ': {\n 'status': 'assigned',\n 'phoneCountryCode': '599',\n 'showCountryCodeList': false\n },\n 'BR': {\n 'status': 'assigned',\n 'phoneCountryCode': '55',\n 'showCountryCodeList': false\n },\n 'BS': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'BT': {\n 'status': 'assigned',\n 'phoneCountryCode': '975',\n 'showCountryCodeList': false\n },\n 'BV': {\n 'status': 'assigned'\n },\n 'BW': {\n 'status': 'assigned',\n 'phoneCountryCode': '267',\n 'showCountryCodeList': false\n },\n 'BY': {\n 'status': 'assigned',\n 'phoneCountryCode': '375',\n 'showCountryCodeList': false\n },\n 'BZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '501',\n 'showCountryCodeList': false\n },\n 'C2': {\n 'status': 'assigned',\n 'phoneCountryCode': '86',\n 'showCountryCodeList': false\n },\n 'CA': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'CC': {\n 'status': 'assigned',\n 'phoneCountryCode': '61',\n 'showCountryCodeList': false\n },\n 'CD': {\n 'status': 'assigned',\n 'phoneCountryCode': '243',\n 'showCountryCodeList': false\n },\n 'CF': {\n 'status': 'assigned',\n 'phoneCountryCode': '236',\n 'showCountryCodeList': false\n },\n 'CG': {\n 'status': 'assigned',\n 'phoneCountryCode': '242',\n 'showCountryCodeList': false\n },\n 'CH': {\n 'status': 'assigned',\n 'phoneCountryCode': '41',\n 'showCountryCodeList': true\n },\n 'CI': {\n 'status': 'assigned',\n 'phoneCountryCode': '225',\n 'showCountryCodeList': false\n },\n 'CK': {\n 'status': 'assigned',\n 'phoneCountryCode': '682',\n 'showCountryCodeList': false\n },\n 'CL': {\n 'status': 'assigned',\n 'phoneCountryCode': '56',\n 'showCountryCodeList': false\n },\n 'CM': {\n 'status': 'assigned',\n 'phoneCountryCode': '237',\n 'showCountryCodeList': false\n },\n 'CN': {\n 'status': 'assigned',\n 'phoneCountryCode': '86',\n 'showCountryCodeList': false\n },\n 'CO': {\n 'status': 'assigned',\n 'phoneCountryCode': '57',\n 'showCountryCodeList': false\n },\n 'CR': {\n 'status': 'assigned',\n 'phoneCountryCode': '506',\n 'showCountryCodeList': false\n },\n 'CU': {\n 'status': 'assigned',\n 'phoneCountryCode': '53',\n 'showCountryCodeList': false\n },\n 'CV': {\n 'status': 'assigned',\n 'phoneCountryCode': '238',\n 'showCountryCodeList': false\n },\n 'CW': {\n 'status': 'assigned',\n 'phoneCountryCode': '599',\n 'showCountryCodeList': false\n },\n 'CX': {\n 'status': 'assigned',\n 'phoneCountryCode': '61',\n 'showCountryCodeList': false\n },\n 'CY': {\n 'status': 'assigned',\n 'phoneCountryCode': '357',\n 'showCountryCodeList': false\n },\n 'CZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '420',\n 'showCountryCodeList': false\n },\n 'DE': {\n 'status': 'assigned',\n 'phoneCountryCode': '49',\n 'showCountryCodeList': false\n },\n 'DJ': {\n 'status': 'assigned',\n 'phoneCountryCode': '253',\n 'showCountryCodeList': false\n },\n 'DK': {\n 'status': 'assigned',\n 'phoneCountryCode': '45',\n 'showCountryCodeList': true\n },\n 'DM': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'DO': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'DZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '213',\n 'showCountryCodeList': false\n },\n 'EC': {\n 'status': 'assigned',\n 'phoneCountryCode': '593',\n 'showCountryCodeList': false\n },\n 'EE': {\n 'status': 'assigned',\n 'phoneCountryCode': '372',\n 'showCountryCodeList': false\n },\n 'EG': {\n 'status': 'assigned',\n 'phoneCountryCode': '20',\n 'showCountryCodeList': false\n },\n 'EH': {\n 'status': 'assigned',\n 'phoneCountryCode': '212',\n 'showCountryCodeList': false\n },\n 'ER': {\n 'status': 'assigned',\n 'phoneCountryCode': '291',\n 'showCountryCodeList': false\n },\n 'ES': {\n 'status': 'assigned',\n 'phoneCountryCode': '34',\n 'showCountryCodeList': false\n },\n 'ET': {\n 'status': 'assigned',\n 'phoneCountryCode': '251',\n 'showCountryCodeList': false\n },\n 'FI': {\n 'status': 'assigned',\n 'phoneCountryCode': '358',\n 'showCountryCodeList': false\n },\n 'FJ': {\n 'status': 'assigned',\n 'phoneCountryCode': '679',\n 'showCountryCodeList': false\n },\n 'FK': {\n 'status': 'assigned',\n 'phoneCountryCode': '500',\n 'showCountryCodeList': false\n },\n 'FM': {\n 'status': 'assigned',\n 'phoneCountryCode': '691',\n 'showCountryCodeList': false\n },\n 'FO': {\n 'status': 'assigned',\n 'phoneCountryCode': '298',\n 'showCountryCodeList': false\n },\n 'FR': {\n 'status': 'assigned',\n 'phoneCountryCode': '33',\n 'showCountryCodeList': false\n },\n 'GA': {\n 'status': 'assigned',\n 'phoneCountryCode': '241',\n 'showCountryCodeList': false\n },\n 'GB': {\n 'status': 'assigned',\n 'phoneCountryCode': '44',\n 'showCountryCodeList': false\n },\n 'GD': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'GE': {\n 'status': 'assigned',\n 'phoneCountryCode': '995',\n 'showCountryCodeList': false\n },\n 'GF': {\n 'status': 'assigned',\n 'phoneCountryCode': '594',\n 'showCountryCodeList': false\n },\n 'GG': {\n 'status': 'assigned',\n 'phoneCountryCode': '44',\n 'showCountryCodeList': false\n },\n 'GH': {\n 'status': 'assigned',\n 'phoneCountryCode': '233',\n 'showCountryCodeList': false\n },\n 'GI': {\n 'status': 'assigned',\n 'phoneCountryCode': '350',\n 'showCountryCodeList': false\n },\n 'GL': {\n 'status': 'assigned',\n 'phoneCountryCode': '299',\n 'showCountryCodeList': false\n },\n 'GM': {\n 'status': 'assigned',\n 'phoneCountryCode': '220',\n 'showCountryCodeList': false\n },\n 'GN': {\n 'status': 'assigned',\n 'phoneCountryCode': '224',\n 'showCountryCodeList': false\n },\n 'GP': {\n 'status': 'assigned',\n 'phoneCountryCode': '590',\n 'showCountryCodeList': false\n },\n 'GQ': {\n 'status': 'assigned',\n 'phoneCountryCode': '240',\n 'showCountryCodeList': false\n },\n 'GR': {\n 'status': 'assigned',\n 'phoneCountryCode': '30',\n 'showCountryCodeList': false\n },\n 'GS': {\n 'status': 'assigned',\n 'phoneCountryCode': '500',\n 'showCountryCodeList': false\n },\n 'GT': {\n 'status': 'assigned',\n 'phoneCountryCode': '502',\n 'showCountryCodeList': false\n },\n 'GU': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'GW': {\n 'status': 'assigned',\n 'phoneCountryCode': '245',\n 'showCountryCodeList': false\n },\n 'GY': {\n 'status': 'assigned',\n 'phoneCountryCode': '592',\n 'showCountryCodeList': false\n },\n 'HK': {\n 'status': 'assigned',\n 'phoneCountryCode': '852',\n 'showCountryCodeList': true\n },\n 'HM': {\n 'status': 'assigned'\n },\n 'HN': {\n 'status': 'assigned',\n 'phoneCountryCode': '504',\n 'showCountryCodeList': false\n },\n 'HR': {\n 'status': 'assigned',\n 'phoneCountryCode': '385',\n 'showCountryCodeList': false\n },\n 'HT': {\n 'status': 'assigned',\n 'phoneCountryCode': '509',\n 'showCountryCodeList': false\n },\n 'HU': {\n 'status': 'assigned',\n 'phoneCountryCode': '36',\n 'showCountryCodeList': false\n },\n 'ID': {\n 'status': 'assigned',\n 'phoneCountryCode': '62',\n 'showCountryCodeList': false\n },\n 'IE': {\n 'status': 'assigned',\n 'phoneCountryCode': '353',\n 'showCountryCodeList': false\n },\n 'IL': {\n 'status': 'assigned',\n 'phoneCountryCode': '972',\n 'showCountryCodeList': false\n },\n 'IM': {\n 'status': 'assigned',\n 'phoneCountryCode': '44',\n 'showCountryCodeList': false\n },\n 'IN': {\n 'status': 'assigned',\n 'phoneCountryCode': '91',\n 'showCountryCodeList': false\n },\n 'IO': {\n 'status': 'assigned',\n 'phoneCountryCode': '246',\n 'showCountryCodeList': false\n },\n 'IQ': {\n 'status': 'assigned',\n 'phoneCountryCode': '964',\n 'showCountryCodeList': false\n },\n 'IR': {\n 'status': 'assigned',\n 'phoneCountryCode': '98',\n 'showCountryCodeList': false\n },\n 'IS': {\n 'status': 'assigned',\n 'phoneCountryCode': '354',\n 'showCountryCodeList': false\n },\n 'IT': {\n 'status': 'assigned',\n 'phoneCountryCode': '39',\n 'showCountryCodeList': false\n },\n 'JE': {\n 'status': 'assigned',\n 'phoneCountryCode': '44',\n 'showCountryCodeList': false\n },\n 'JM': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'JO': {\n 'status': 'assigned',\n 'phoneCountryCode': '962',\n 'showCountryCodeList': false\n },\n 'JP': {\n 'status': 'assigned',\n 'phoneCountryCode': '81',\n 'showCountryCodeList': false\n },\n 'KE': {\n 'status': 'assigned',\n 'phoneCountryCode': '254',\n 'showCountryCodeList': false\n },\n 'KG': {\n 'status': 'assigned',\n 'phoneCountryCode': '996',\n 'showCountryCodeList': false\n },\n 'KH': {\n 'status': 'assigned',\n 'phoneCountryCode': '855',\n 'showCountryCodeList': false\n },\n 'KI': {\n 'status': 'assigned',\n 'phoneCountryCode': '686',\n 'showCountryCodeList': false\n },\n 'KM': {\n 'status': 'assigned',\n 'phoneCountryCode': '269',\n 'showCountryCodeList': false\n },\n 'KN': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'KP': {\n 'status': 'assigned',\n 'phoneCountryCode': '850',\n 'showCountryCodeList': false\n },\n 'KR': {\n 'status': 'assigned',\n 'phoneCountryCode': '82',\n 'showCountryCodeList': false\n },\n 'KW': {\n 'status': 'assigned',\n 'phoneCountryCode': '965',\n 'showCountryCodeList': false\n },\n 'KY': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'KZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '7',\n 'showCountryCodeList': false\n },\n 'LA': {\n 'status': 'assigned',\n 'phoneCountryCode': '856',\n 'showCountryCodeList': true\n },\n 'LB': {\n 'status': 'assigned',\n 'phoneCountryCode': '961',\n 'showCountryCodeList': false\n },\n 'LC': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'LI': {\n 'status': 'assigned',\n 'phoneCountryCode': '423',\n 'showCountryCodeList': false\n },\n 'LK': {\n 'status': 'assigned',\n 'phoneCountryCode': '94',\n 'showCountryCodeList': false\n },\n 'LR': {\n 'status': 'assigned',\n 'phoneCountryCode': '231',\n 'showCountryCodeList': false\n },\n 'LS': {\n 'status': 'assigned',\n 'phoneCountryCode': '266',\n 'showCountryCodeList': false\n },\n 'LT': {\n 'status': 'assigned',\n 'phoneCountryCode': '370',\n 'showCountryCodeList': false\n },\n 'LU': {\n 'status': 'assigned',\n 'phoneCountryCode': '352',\n 'showCountryCodeList': false\n },\n 'LV': {\n 'status': 'assigned',\n 'phoneCountryCode': '371',\n 'showCountryCodeList': false\n },\n 'LY': {\n 'status': 'assigned',\n 'phoneCountryCode': '218',\n 'showCountryCodeList': false\n },\n 'MA': {\n 'status': 'assigned',\n 'phoneCountryCode': '212',\n 'showCountryCodeList': false\n },\n 'MC': {\n 'status': 'assigned',\n 'phoneCountryCode': '377',\n 'showCountryCodeList': false\n },\n 'MD': {\n 'status': 'assigned',\n 'phoneCountryCode': '373',\n 'showCountryCodeList': false\n },\n 'ME': {\n 'status': 'assigned',\n 'phoneCountryCode': '382',\n 'showCountryCodeList': false\n },\n 'MF': {\n 'status': 'assigned',\n 'phoneCountryCode': '590',\n 'showCountryCodeList': false\n },\n 'MG': {\n 'status': 'assigned',\n 'phoneCountryCode': '261',\n 'showCountryCodeList': false\n },\n 'MH': {\n 'status': 'assigned',\n 'phoneCountryCode': '692',\n 'showCountryCodeList': false\n },\n 'MK': {\n 'status': 'assigned',\n 'phoneCountryCode': '389',\n 'showCountryCodeList': false\n },\n 'ML': {\n 'status': 'assigned',\n 'phoneCountryCode': '223',\n 'showCountryCodeList': false\n },\n 'MM': {\n 'status': 'assigned',\n 'phoneCountryCode': '95',\n 'showCountryCodeList': false\n },\n 'MN': {\n 'status': 'assigned',\n 'phoneCountryCode': '976',\n 'showCountryCodeList': false\n },\n 'MO': {\n 'status': 'assigned',\n 'phoneCountryCode': '853',\n 'showCountryCodeList': false\n },\n 'MP': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'MQ': {\n 'status': 'assigned',\n 'phoneCountryCode': '596',\n 'showCountryCodeList': false\n },\n 'MR': {\n 'status': 'assigned',\n 'phoneCountryCode': '222',\n 'showCountryCodeList': false\n },\n 'MS': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'MT': {\n 'status': 'assigned',\n 'phoneCountryCode': '356',\n 'showCountryCodeList': false\n },\n 'MU': {\n 'status': 'assigned',\n 'phoneCountryCode': '230',\n 'showCountryCodeList': false\n },\n 'MV': {\n 'status': 'assigned',\n 'phoneCountryCode': '960',\n 'showCountryCodeList': false\n },\n 'MW': {\n 'status': 'assigned',\n 'phoneCountryCode': '265',\n 'showCountryCodeList': false\n },\n 'MX': {\n 'status': 'assigned',\n 'phoneCountryCode': '52',\n 'showCountryCodeList': false\n },\n 'MY': {\n 'status': 'assigned',\n 'phoneCountryCode': '60',\n 'showCountryCodeList': false\n },\n 'MZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '258',\n 'showCountryCodeList': false\n },\n 'NA': {\n 'status': 'assigned',\n 'phoneCountryCode': '264',\n 'showCountryCodeList': false\n },\n 'NC': {\n 'status': 'assigned',\n 'phoneCountryCode': '687',\n 'showCountryCodeList': false\n },\n 'NE': {\n 'status': 'assigned',\n 'phoneCountryCode': '227',\n 'showCountryCodeList': false\n },\n 'NF': {\n 'status': 'assigned',\n 'phoneCountryCode': '672',\n 'showCountryCodeList': false\n },\n 'NG': {\n 'status': 'assigned',\n 'phoneCountryCode': '234',\n 'showCountryCodeList': false\n },\n 'NI': {\n 'status': 'assigned',\n 'phoneCountryCode': '505',\n 'showCountryCodeList': false\n },\n 'NL': {\n 'status': 'assigned',\n 'phoneCountryCode': '31',\n 'showCountryCodeList': true\n },\n 'NO': {\n 'status': 'assigned',\n 'phoneCountryCode': '47',\n 'showCountryCodeList': true\n },\n 'NP': {\n 'status': 'assigned',\n 'phoneCountryCode': '977',\n 'showCountryCodeList': false\n },\n 'NR': {\n 'status': 'assigned',\n 'phoneCountryCode': '674',\n 'showCountryCodeList': false\n },\n 'NU': {\n 'status': 'assigned',\n 'phoneCountryCode': '683',\n 'showCountryCodeList': false\n },\n 'NZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '64',\n 'showCountryCodeList': false\n },\n 'OM': {\n 'status': 'assigned',\n 'phoneCountryCode': '968',\n 'showCountryCodeList': false\n },\n 'PA': {\n 'status': 'assigned',\n 'phoneCountryCode': '507',\n 'showCountryCodeList': false\n },\n 'PE': {\n 'status': 'assigned',\n 'phoneCountryCode': '51',\n 'showCountryCodeList': false\n },\n 'PF': {\n 'status': 'assigned',\n 'phoneCountryCode': '689',\n 'showCountryCodeList': false\n },\n 'PG': {\n 'status': 'assigned',\n 'phoneCountryCode': '675',\n 'showCountryCodeList': false\n },\n 'PH': {\n 'status': 'assigned',\n 'phoneCountryCode': '63',\n 'showCountryCodeList': false\n },\n 'PK': {\n 'status': 'assigned',\n 'phoneCountryCode': '92',\n 'showCountryCodeList': false\n },\n 'PL': {\n 'status': 'assigned',\n 'phoneCountryCode': '48',\n 'showCountryCodeList': true\n },\n 'PM': {\n 'status': 'assigned',\n 'phoneCountryCode': '508',\n 'showCountryCodeList': false\n },\n 'PN': {\n 'status': 'assigned',\n 'phoneCountryCode': '870',\n 'showCountryCodeList': false\n },\n 'PR': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'PS': {\n 'status': 'assigned',\n 'phoneCountryCode': '970',\n 'showCountryCodeList': false\n },\n 'PT': {\n 'status': 'assigned',\n 'phoneCountryCode': '351',\n 'showCountryCodeList': false\n },\n 'PW': {\n 'status': 'assigned',\n 'phoneCountryCode': '680',\n 'showCountryCodeList': false\n },\n 'PY': {\n 'status': 'assigned',\n 'phoneCountryCode': '595',\n 'showCountryCodeList': false\n },\n 'QA': {\n 'status': 'assigned',\n 'phoneCountryCode': '974',\n 'showCountryCodeList': false\n },\n 'RE': {\n 'status': 'assigned',\n 'phoneCountryCode': '262',\n 'showCountryCodeList': false\n },\n 'RO': {\n 'status': 'assigned',\n 'phoneCountryCode': '40',\n 'showCountryCodeList': false\n },\n 'RS': {\n 'status': 'assigned',\n 'phoneCountryCode': '381',\n 'showCountryCodeList': false\n },\n 'RU': {\n 'status': 'assigned',\n 'phoneCountryCode': '7',\n 'showCountryCodeList': false\n },\n 'RW': {\n 'status': 'assigned',\n 'phoneCountryCode': '250',\n 'showCountryCodeList': false\n },\n 'SA': {\n 'status': 'assigned',\n 'phoneCountryCode': '966',\n 'showCountryCodeList': false\n },\n 'SB': {\n 'status': 'assigned',\n 'phoneCountryCode': '677',\n 'showCountryCodeList': false\n },\n 'SC': {\n 'status': 'assigned',\n 'phoneCountryCode': '248',\n 'showCountryCodeList': false\n },\n 'SD': {\n 'status': 'assigned',\n 'phoneCountryCode': '249',\n 'showCountryCodeList': false\n },\n 'SE': {\n 'status': 'assigned',\n 'phoneCountryCode': '46',\n 'showCountryCodeList': true\n },\n 'SG': {\n 'status': 'assigned',\n 'phoneCountryCode': '65',\n 'showCountryCodeList': true\n },\n 'SH': {\n 'status': 'assigned',\n 'phoneCountryCode': '290',\n 'showCountryCodeList': false\n },\n 'SI': {\n 'status': 'assigned',\n 'phoneCountryCode': '386',\n 'showCountryCodeList': false\n },\n 'SJ': {\n 'status': 'assigned',\n 'phoneCountryCode': '47',\n 'showCountryCodeList': false\n },\n 'SK': {\n 'status': 'assigned',\n 'phoneCountryCode': '421',\n 'showCountryCodeList': false\n },\n 'SL': {\n 'status': 'assigned',\n 'phoneCountryCode': '232',\n 'showCountryCodeList': false\n },\n 'SM': {\n 'status': 'assigned',\n 'phoneCountryCode': '378',\n 'showCountryCodeList': false\n },\n 'SN': {\n 'status': 'assigned',\n 'phoneCountryCode': '221',\n 'showCountryCodeList': false\n },\n 'SO': {\n 'status': 'assigned',\n 'phoneCountryCode': '252',\n 'showCountryCodeList': false\n },\n 'SR': {\n 'status': 'assigned',\n 'phoneCountryCode': '597',\n 'showCountryCodeList': false\n },\n 'SS': {\n 'status': 'assigned',\n 'phoneCountryCode': '211',\n 'showCountryCodeList': false\n },\n 'ST': {\n 'status': 'assigned',\n 'phoneCountryCode': '239',\n 'showCountryCodeList': false\n },\n 'SV': {\n 'status': 'assigned',\n 'phoneCountryCode': '503',\n 'showCountryCodeList': false\n },\n 'SX': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'SY': {\n 'status': 'assigned',\n 'phoneCountryCode': '963',\n 'showCountryCodeList': false\n },\n 'SZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '268',\n 'showCountryCodeList': false\n },\n 'TC': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'TD': {\n 'status': 'assigned',\n 'phoneCountryCode': '235',\n 'showCountryCodeList': false\n },\n 'TF': {\n 'status': 'assigned',\n 'phoneCountryCode': '262',\n 'showCountryCodeList': false\n },\n 'TG': {\n 'status': 'assigned',\n 'phoneCountryCode': '228',\n 'showCountryCodeList': false\n },\n 'TH': {\n 'status': 'assigned',\n 'phoneCountryCode': '66',\n 'showCountryCodeList': false\n },\n 'TJ': {\n 'status': 'assigned',\n 'phoneCountryCode': '992',\n 'showCountryCodeList': false\n },\n 'TK': {\n 'status': 'assigned',\n 'phoneCountryCode': '690',\n 'showCountryCodeList': false\n },\n 'TL': {\n 'status': 'assigned',\n 'phoneCountryCode': '670',\n 'showCountryCodeList': false\n },\n 'TM': {\n 'status': 'assigned',\n 'phoneCountryCode': '993',\n 'showCountryCodeList': false\n },\n 'TN': {\n 'status': 'assigned',\n 'phoneCountryCode': '216',\n 'showCountryCodeList': false\n },\n 'TO': {\n 'status': 'assigned',\n 'phoneCountryCode': '676',\n 'showCountryCodeList': false\n },\n 'TR': {\n 'status': 'assigned',\n 'phoneCountryCode': '90',\n 'showCountryCodeList': true\n },\n 'TT': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'TV': {\n 'status': 'assigned',\n 'phoneCountryCode': '688',\n 'showCountryCodeList': false\n },\n 'TW': {\n 'status': 'assigned',\n 'phoneCountryCode': '886',\n 'showCountryCodeList': true\n },\n 'TZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '255',\n 'showCountryCodeList': false\n },\n 'UA': {\n 'status': 'assigned',\n 'phoneCountryCode': '380',\n 'showCountryCodeList': false\n },\n 'UG': {\n 'status': 'assigned',\n 'phoneCountryCode': '256',\n 'showCountryCodeList': false\n },\n 'UM': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'US': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false,\n 'hideInOtherCountries': true\n },\n 'UY': {\n 'status': 'assigned',\n 'phoneCountryCode': '598',\n 'showCountryCodeList': false\n },\n 'UZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '998',\n 'showCountryCodeList': false\n },\n 'VA': {\n 'status': 'assigned',\n 'phoneCountryCode': '39',\n 'showCountryCodeList': false\n },\n 'VC': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'VE': {\n 'status': 'assigned',\n 'phoneCountryCode': '58',\n 'showCountryCodeList': false\n },\n 'VG': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'VI': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'VN': {\n 'status': 'assigned',\n 'phoneCountryCode': '84',\n 'showCountryCodeList': false\n },\n 'VU': {\n 'status': 'assigned',\n 'phoneCountryCode': '678',\n 'showCountryCodeList': false\n },\n 'WF': {\n 'status': 'assigned',\n 'phoneCountryCode': '681',\n 'showCountryCodeList': false\n },\n 'WS': {\n 'status': 'assigned',\n 'phoneCountryCode': '685',\n 'showCountryCodeList': false\n },\n 'YE': {\n 'status': 'assigned',\n 'phoneCountryCode': '967',\n 'showCountryCodeList': false\n },\n 'YT': {\n 'status': 'assigned',\n 'phoneCountryCode': '262',\n 'showCountryCodeList': false\n },\n 'ZA': {\n 'status': 'assigned',\n 'phoneCountryCode': '27',\n 'showCountryCodeList': false\n },\n 'ZM': {\n 'status': 'assigned',\n 'phoneCountryCode': '260',\n 'showCountryCodeList': false\n },\n 'ZW': {\n 'status': 'assigned',\n 'phoneCountryCode': '263',\n 'showCountryCodeList': false\n }\n };\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/phone/phoneInput/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-form-components/src/phone/phoneInput/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\n__webpack_require__(\"../node_modules/xo-form-components/src/phone/phoneInputB/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-form-components/src/phone/phoneInputA/directive.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoPhoneInput', {\n tag: 'xo-phone-input',\n template: _template2['default'],\n\n props: {\n phone: {\n type: 'var',\n reqiured: false\n },\n\n showPhoneType: {\n type: 'var',\n optional: true,\n 'default': true\n },\n\n hideWork: {\n type: 'var',\n optional: true,\n 'default': false\n },\n\n token: {\n type: 'var',\n optional: true\n },\n\n exclude: {\n type: 'var',\n optional: true\n },\n\n hidePhoneType: {\n type: 'var',\n optional: true,\n 'default': false\n },\n\n country: {\n type: 'var',\n optional: true\n }\n },\n\n lifecycle: {\n enter: function enter() {\n var _this = this;\n\n var getTreatment = function getTreatment() {\n\n if ((0, _squid.$feature)('showNewPhoneDesign', false, _squid.$locale.country)) {\n return true;\n }\n\n var throttle = void 0;\n\n if (_squid.$config['newPhoneDesignThrottle']) {\n\n throttle = _squid.$config['newPhoneDesignThrottle']['DEFAULT'];\n\n if (_squid.$config['newPhoneDesignThrottle'][_squid.$locale.country] >= 0) {\n throttle = _squid.$config['newPhoneDesignThrottle'][_squid.$locale.country];\n }\n }\n\n var id = _squid.$locale.country + _angular.$rootScope.token;\n\n return throttle !== undefined && (0, _squid.$experiment)('new_phone_design_exp', throttle, id, {}) ? true : false;\n };\n\n this.treatment = getTreatment();\n\n this.$watch('showPhoneType', function () {\n _this.hidePhoneType = _this.showPhoneType === false;\n }, true);\n }\n }\n\n});\n\n\n_angular.$rootScope;\n\n_squid.$Component;\n\n_squid.$locale;\n\n_squid.$experiment;\n\n_squid.$config;\n\n_squid.$feature;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/phone/phoneInput/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\n\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/phone/phoneInputA/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function($) {\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/directionality/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/dropdown/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/error-tooltip/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/floating-label/directive.js\");\n\nvar _territoriesByCode = __webpack_require__(\"../node_modules/xo-form-components/src/phone/lib/territoriesByCode.js\");\n\nvar _territoriesByCode2 = _interopRequireDefault(_territoriesByCode);\n\n__webpack_require__(\"../node_modules/xo-form-components/src/phone/phoneInputA/styles.less\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-form-components/src/phone/phoneInputA/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoPhoneInputA', function () {\n return {\n template: _template2['default'],\n scope: {\n phone: '=?',\n showPhoneType: '=?',\n exclude: '@?',\n country: '=?'\n },\n\n link: function link(scope, element, attr, controller) {\n element.on('keyup', function (event) {\n element.find('.telephone').mask(scope.mask, {\n 'translation': {\n 0: { pattern: /[0-9]/ }\n }\n });\n });\n },\n\n controller: ['$scope', function ($scope) {\n $scope.locale = _squid.$locale;\n $scope.IntDialingCodes = _territoriesByCode2['default'];\n $scope.defaultCountryPhoneCode = _territoriesByCode2['default'][_squid.$locale.country];\n $scope.showPhoneType = (0, _squid.$feature)('phoneType', true, $scope.country) && $scope.showPhoneType !== false;\n\n // dont display countries that are tagged with hideInOtherCountries flag in territoriesByCode.js.\n // if localeCountry and dropdown country are same ignore hideInOtherCountries and display the countrycode.\n $scope.hideCountry = function (dropdownCountry, hideInOtherCountries) {\n return _squid.$locale.country !== dropdownCountry && hideInOtherCountries;\n };\n\n $scope.phone = $scope.phone || {};\n $scope.phone.phoneType = $scope.phone.phoneType || 'Mobile';\n $scope.phone.IntDialingCountryCode = $scope.defaultCountryPhoneCode.phoneCountryCode;\n\n angular.extend($scope.phone, {\n phoneCountryCode: _squid.$locale.country\n });\n\n function getPhoneMask(phoneType, phoneEntry) {\n var defaultMask = '0000000000000000';\n var masks = phoneEntry && phoneEntry.masks;\n var mobileMask = masks && masks.MOBILE ? masks.MOBILE : defaultMask;\n var fixedLineMask = masks && masks.FIXED_LINE ? masks.FIXED_LINE : defaultMask;\n\n return phoneType === 'Mobile' ? mobileMask : fixedLineMask;\n }\n\n function getPhonePattern(phoneEntry) {\n var defaultPattern = '^[0-9]+$';\n var patterns = phoneEntry && phoneEntry.patterns;\n // less stric regex validation in place for now, just use general regex to match mobile AND fixed-line formats\n // for now we use less strict regex validation because we are not ready for this more strict validation\n\n if (patterns) {\n return patterns.GENERAL ? patterns.GENERAL : defaultPattern;\n }\n return defaultPattern;\n\n // more strict regex validaiton based on phone type is found commented below\n // var ret;\n // switch ($scope.phone.phoneType) {\n // case 'Mobile':\n // ret = patterns.MOBILE;\n // break;\n // case 'Home':\n // case 'Work':\n // ret = patterns.FIXED_LINE;\n // break;\n // default:\n // ret = patterns.GENERAL;\n // break;\n // }\n // return ret ? ret : defaultPattern;\n }\n\n function populatePhoneMetadata() {\n if (!$scope.metadata || $scope.metadata.country !== _squid.$locale.metadata.country) {\n $scope.metadata = angular.copy(_squid.$locale.metadata);\n }\n var phoneEntry = $scope.metadata.phoneEntry;\n\n $scope.mask = getPhoneMask($scope.phone.phoneType, phoneEntry);\n $scope.pattern = getPhonePattern(phoneEntry);\n }\n\n populatePhoneMetadata();\n\n // Reset the phone number mask from according to the phone type\n $scope.phoneTypeChanged = function () {\n $scope.mask = getPhoneMask($scope.phone.phoneType, $scope.metadata.phoneEntry);\n $scope.pattern = getPhonePattern($scope.metadata.phoneEntry);\n $('.telephone').mask($scope.mask);\n };\n\n $scope.$watch('phone.phoneCountryCode', function (newValue) {\n $scope.phone.IntDialingCountryCode = _territoriesByCode2['default'][newValue].phoneCountryCode;\n });\n\n $scope.$on('localeChange', function () {\n $scope.defaultCountryPhoneCode = _territoriesByCode2['default'][_squid.$locale.country];\n $scope.phone.phoneCountryCode = _squid.$locale.country;\n if (!$scope.metadata || $scope.metadata.country !== _squid.$locale.metadata.country) {\n populatePhoneMetadata();\n $('.telephone').mask($scope.mask);\n }\n });\n\n $scope.$watch('country', function (newVal) {\n if (newVal) {\n $scope.defaultCountryPhoneCode = _territoriesByCode2['default'][$scope.country];\n $scope.phone.phoneCountryCode = $scope.country;\n\n if (!$scope.metadata || $scope.metadata.country !== $scope.country) {\n\n $scope.metadata = _squid.$MetadataModel.create();\n $scope.metadata.choose($scope.country, _squid.$locale.lang).then(function () {\n\n var phoneEntry = $scope.metadata.phoneEntry;\n\n $scope.mask = getPhoneMask($scope.phone.phoneType, phoneEntry);\n $scope.pattern = getPhonePattern(phoneEntry);\n\n $('.telephone').mask($scope.mask);\n });\n }\n }\n });\n\n $scope.showWork = $scope.exclude === 'WORK';\n }]\n };\n});\n\n_squid.$feature;\n\n_squid.$locale;\n\n_squid.$MetadataModel;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/phone/phoneInputA/styles.less\":\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/phone/phoneInputA/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n
\\n \\n \\n
\\n\\n
\\n \\n \\n
\\n\\n
\\n\\n \\n \\n
\\n
\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/phone/phoneInputB/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _jquery = __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\");\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _logger = __webpack_require__(\"../node_modules/xo-beaver/dist/logger.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-form-components/src/phone/phoneInputB/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\n__webpack_require__(\"../node_modules/xo-form-components/src/phone/phoneInputB/styles.less\");\n\n__webpack_require__(\"../node_modules/xo-jquery-mask-plugin/dist/jquery.mask.min.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar MOBILE = 'Mobile';\nvar KEYS = {\n ENTER: 13,\n UP: 38,\n DOWN: 40,\n TAB: 9,\n ESC: 27,\n A: 65,\n Z: 90,\n SPACE: 32\n};\n\nvar query = '';\nvar queryTimer = null;\n\nexports['default'] = _squid.$Component.extend('$xoPhoneInputB', {\n tag: 'xo-phone-input-b',\n template: _template2['default'],\n\n props: {\n phone: {\n type: 'var',\n required: false\n },\n\n hidePhoneType: {\n type: 'var',\n required: false\n },\n\n hideWork: {\n type: 'var',\n required: false,\n 'default': false\n }\n },\n\n actions: {\n\n // return the phonePattern\n getPhonePattern: function getPhonePattern(phoneEntry) {\n var DEFAULT_PATTERN = '^[0-9]+$';\n var patterns = phoneEntry && phoneEntry.patterns;\n // less strict regex validation in place for now, just use general regex to match mobile AND fixed-line\n // formats\n // for now we use less strict regex validation because we are not ready for this more strict validation\n\n return patterns && patterns.GENERAL ? patterns.GENERAL : DEFAULT_PATTERN;\n },\n\n\n // return phoneMask based on phone Type\n getPhoneMask: function getPhoneMask(phoneType, phoneEntry) {\n var DEFAULT_MASK = '0000000000000000';\n var masks = phoneEntry && phoneEntry.masks;\n\n if (phoneType === MOBILE) {\n return masks && masks.MOBILE ? masks.MOBILE : DEFAULT_MASK;\n } else {\n return masks && masks.FIXED_LINE ? masks.FIXED_LINE : DEFAULT_MASK;\n }\n },\n\n\n // set the phone number mask and pattern\n updatePhoneMaskAndPattern: function updatePhoneMaskAndPattern() {\n var country = this.metadata.localization.country;\n // If phoneCountry does not match the country the metadata is from then\n // we set phoneEntry to a falsey value so the default pattern and mask are\n // used for the phone input.\n\n var phoneEntry = this.phoneCountry === country && this.metadata.phoneEntry;\n\n this.mask = this.actions.getPhoneMask(this.phone.phoneType, phoneEntry);\n this.pattern = this.actions.getPhonePattern(phoneEntry);\n this.actions.applyMaskOnPhoneInput();\n },\n getPhoneDialingCode: function getPhoneDialingCode(territory, state) {\n var overrides = this.metadata.regionalOverrides;\n\n if (state && overrides && overrides.hasOwnProperty(state) && overrides[state].props.internationalDialingCode) {\n return overrides[state].props.internationalDialingCode;\n }\n\n return territory.internationalDialingCode;\n },\n\n\n // fetch the passed country's international dialing code\n updateDialingCodeAndCountry: function updateDialingCodeAndCountry() {\n var territory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var state = arguments[1];\n\n this.phoneCountry = territory.code;\n this.phone.IntDialingCountryCode = this.actions.getPhoneDialingCode(territory, state);\n (0, _jquery2['default'])('.fixedCode').text('+' + this.phone.IntDialingCountryCode);\n },\n\n\n /* if user chooses a different dialing code -\n -. fetch the new country's metadata\n -. update phone Country and dialing code\n -. update the phone number mask and pattern (no explicit call as it happens when metadata updates)\n -. close the dropdown if open\n */\n updatePhoneFieldMetadata: function updatePhoneFieldMetadata() {\n var territory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var state = arguments[1];\n\n // create a local copy of metadata (only happens on initial load)\n if (!this.metadata) {\n this.metadata = _squid.$MetadataModel.instance(0, {\n 'noBroadcast': true\n });\n }\n\n this.metadata.choose(territory.code);\n\n this.actions.updateDialingCodeAndCountry(territory, state);\n // Whenever metadata is updated that is promise returns then the metadata listener will update the mask\n // and pattern so not calling it here. Moving on...\n\n // close the dropdown if open\n if (this.listVisible) {\n this.actions.collapseListAndFocusOnParent();\n }\n\n _logger.$logger.info('phone_country_code_updated', {\n territory: territory.code\n });\n },\n getTerritoryDataFromMetadata: function getTerritoryDataFromMetadata(country) {\n return _squid.$util.find(this.dialingCodeList, function (_ref) {\n var code = _ref.code;\n return code === country;\n });\n },\n\n\n // set the stage on first load or on locale change\n init: function init(country) {\n this.hidePhoneType = this.hidePhoneType || (0, _squid.$feature)('hidePhoneType', false, country);\n\n this.showDialingCodeContainer = (0, _squid.$feature)('showDialingCodeContainer', false, country);\n\n this.listVisible = false;\n\n // default the phone type to Mobile if not specified\n // Note: this.phone is not optional\n this.phone = this.phone || {};\n\n this.phone.phoneType = this.phone.phoneType || 'Mobile';\n\n // populate the dialing code list/options\n var _$locale$metadata = _squid.$locale.metadata,\n _$locale$metadata$ter = _$locale$metadata.territory,\n territory = _$locale$metadata$ter === undefined ? [] : _$locale$metadata$ter,\n _$locale$metadata$add = _$locale$metadata.additionalDialingCodes,\n additionalDialingCodes = _$locale$metadata$add === undefined ? [] : _$locale$metadata$add;\n var _$config$dialingCodeB = _squid.$config.dialingCodeBlacklist,\n dialingCodeBlacklist = _$config$dialingCodeB === undefined ? [] : _$config$dialingCodeB;\n\n // Merge dialing codes from supported countries with dialing codes from\n // assigned countries and then filtering countries that are blacklisted\n\n this.dialingCodeList = territory.concat(additionalDialingCodes).filter(function (_ref2) {\n var code = _ref2.code;\n return !dialingCodeBlacklist.includes(code);\n }).sort(function (a, b) {\n return a.name.localeCompare(b.name);\n });\n var territoryData = this.actions.getTerritoryDataFromMetadata(this.phone.phoneCountry || country);\n\n this.actions.updatePhoneFieldMetadata(territoryData);\n },\n\n\n // helper to show the options list and focus on the selected phone country option\n expandList: function expandList() {\n (0, _jquery2['default'])('.country-list').show();\n this.listVisible = true;\n (0, _jquery2['default'])('.country-list .country.selected').focus();\n },\n\n\n // helper to collapse the options\n collapseList: function collapseList() {\n this.listVisible = false;\n (0, _jquery2['default'])('.country-list').hide();\n },\n\n\n // helper to collapse the options and xfer focus back to the parent dropdown\n collapseListAndFocusOnParent: function collapseListAndFocusOnParent() {\n this.actions.collapseList();\n (0, _jquery2['default'])('#dialingCodeContainer div.selected-flag').focus();\n },\n\n\n // helper to toggle the dropdown list\n toggleList: function toggleList() {\n if (this.listVisible) {\n this.actions.collapseListAndFocusOnParent();\n } else {\n this.actions.expandList();\n }\n },\n\n\n // remove highlighting from other list items and highlight the given item\n highlightListItem: function highlightListItem(listItem) {\n (0, _jquery2['default'])('li.country').removeClass('highlight');\n listItem.addClass('highlight');\n listItem.focus();\n },\n\n // select the given item and update the phone field metadata\n selectListItem: function selectListItem(listItem) {\n var country = listItem.attr('data-country-code');\n var territory = this.actions.getTerritoryDataFromMetadata(country);\n\n this.actions.updatePhoneFieldMetadata(territory);\n },\n\n // find the first list item whose name starts with the query string\n searchForCountry: function searchForCountry(queryString) {\n for (var i = 0; i < this.dialingCodeList.length; i++) {\n if (this.actions.startsWith(this.dialingCodeList[i].name, queryString)) {\n\n var listItem = (0, _jquery2['default'])('.country-list').find('[data-country-code=\"' + this.dialingCodeList[i].code + '\"]');\n // update highlighting and scroll\n\n this.actions.highlightListItem(listItem);\n break;\n }\n }\n },\n\n // check if (uppercase) string a starts with string b\n startsWith: function startsWith(a, b) {\n return a.substr(0, b.length).toUpperCase() === b;\n },\n\n // When Switching between double Byte -> Single Byte character\n // angular model is not properly updated by jquery-mask (PPPLMER-52127)\n // re-update the model with entered value.\n updateAngularModel: function updateAngularModel() {\n if (this.phone.ispreFill) {\n // We set the flag to false once the prefill is completed.\n // This helps to update angular model properly upon next keyUp()\n this.phone.ispreFill = false;\n } else {\n this.phone.telephone = this.$element.find('.telephone').val();\n }\n },\n\n // format the phone number\n applyMaskOnPhoneInput: function applyMaskOnPhoneInput() {\n // If `this.mask` is `undefined` and we try to mask this field\n // jQuery mask will throw a type error when it tries to access\n // `mask.length` during a for loop.\n if (!this.mask) {\n return;\n }\n\n this.actions.updateAngularModel();\n\n this.$element.find('.telephone').mask(this.mask, {\n 'translation': {\n 0: { pattern: /[0-9]/ }\n }\n });\n },\n\n // highlight the event target\n handleListMouseover: function handleListMouseover($event) {\n this.actions.highlightListItem((0, _jquery2['default'])($event.target));\n },\n\n // expand the list when down arrow is pressed\n handleKeyboardInputForDropdown: function handleKeyboardInputForDropdown($event) {\n\n var key = $event.which;\n\n if (key === KEYS.DOWN || key === KEYS.UP || key === KEYS.SPACE) {\n $event.stopPropagation();\n $event.preventDefault();\n this.actions.expandList();\n } else {\n this.actions.collapseList();\n }\n },\n\n /*\n navigating list using the keyboard\n up, down, esc, enter and letter keys\n */\n handleKeyboardInputForList: function handleKeyboardInputForList($event) {\n var $listItems = (0, _jquery2['default'])('li.country');\n var key = $event.which;\n var $selected = (0, _jquery2['default'])($event.target);\n var $current = void 0;\n\n $event.stopPropagation();\n $event.preventDefault();\n\n // if user types in an input, focus on the first country starting with that query\n // upper case letters (since keyup/keydown only return upper case letters)\n if (key >= KEYS.A && key <= KEYS.Z) {\n if (queryTimer) {\n _angular.$timeout.cancel(queryTimer);\n }\n\n query += String.fromCharCode(key);\n this.actions.searchForCountry(query);\n\n queryTimer = (0, _angular.$timeout)(function () {\n query = '';\n }, 1e3);\n\n return;\n }\n\n // ignore other keys\n if (key !== KEYS.DOWN && key !== KEYS.UP && key !== KEYS.ENTER && key !== KEYS.ESC) {\n return;\n }\n\n // select the the new phone country when user hits enter\n if (key === KEYS.ENTER) {\n this.actions.selectListItem($selected);\n return;\n }\n\n // close the list if escape is pressed\n if (key === KEYS.ESC) {\n this.actions.collapseListAndFocusOnParent();\n return;\n }\n\n // highlight the next/prev element when arrow key is pressed\n if (key === KEYS.DOWN) // Down key\n {\n if (!$selected.length || $selected.is(':last-child')) {\n $current = $listItems.eq(0);\n } else {\n $current = $selected.next();\n }\n }\n\n // Up key\n if (key === KEYS.UP) {\n if (!$selected.length || $selected.is(':first-child')) {\n $current = $listItems.last();\n } else {\n $current = $selected.prev();\n }\n }\n\n this.actions.highlightListItem($current);\n }\n },\n\n lifecycle: {\n enter: function enter() {\n this.actions.init(_squid.$locale.country);\n },\n populate: function populate() {\n var _this = this;\n\n this.$on('localeChange', function () {\n _this.actions.init(_squid.$locale.country);\n });\n\n // update the phone mask and pattern when metadata is changed\n this.$watch('metadata', function () {\n _this.actions.updatePhoneMaskAndPattern();\n }, true);\n\n // update the mask when .telephone val changes either programatically or via user action\n this.$watch('this.phone.telephone', function (newVal) {\n if (newVal) {\n _this.$element.find('.telephone').val(newVal).trigger('input');\n }\n }, true);\n\n var addressChangeEvent = _angular.$rootScope.$on('billingAddressStateChange', function (e, address) {\n var territory = _this.actions.getTerritoryDataFromMetadata(_this.metadata.country);\n\n _this.actions.updatePhoneFieldMetadata(territory, address.state);\n });\n\n this.$on('$destroy', addressChangeEvent);\n\n // hide the dropdown list if a click occurs anywhere else on the page\n (0, _jquery2['default'])('*').on('click', function (event) {\n if (!(0, _jquery2['default'])('#dialingCodeContainer div.selected-flag').is((0, _jquery2['default'])(event.target))) {\n _this.actions.collapseList();\n }\n });\n }\n }\n});\n\n\n_angular.$rootScope;\n\n_angular.$timeout;\n\n_squid.$Component;\n\n_squid.$locale;\n\n_squid.$feature;\n\n_squid.$util;\n\n_squid.$MetadataModel;\n\n_squid.$config;\n\n_logger.$logger;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/phone/phoneInputB/styles.less\":\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/phone/phoneInputB/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n
\\n\\n \\n\\n \\n
\\n\\n\\n
\\n\\n
\\n
\\n
\\n
\\n
\\n\\n
    \\n
  • \\n\\n
    \\n
    \\n
    \\n\\n {{ value.name }}\\n\\n +{{ value.internationalDialingCode }}\\n
  • \\n
\\n
\\n\\n \\n
\\n\\n\\n
\\n\\n +{{ phone.IntDialingCountryCode }}\\n \\n \\n
\\n\\n\\n
\\n\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/zipcode/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/error-tooltip/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/prefix-attrs-with/directive.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-form-components/src/zipcode/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoZipcode', {\n tag: 'xo-zipcode',\n\n template: _template2['default'],\n\n props: {\n address: {\n reqiured: false,\n type: 'var'\n },\n attrPrefix: {\n required: false,\n type: 'var'\n },\n country: {\n required: false,\n type: 'str'\n },\n doneFn: {\n required: false,\n type: 'var'\n },\n keyPressFn: {\n required: false,\n type: 'var'\n },\n maxLength: {\n required: false,\n type: 'var'\n },\n postalCodeLabel: {\n required: false,\n type: 'var'\n },\n zipEntry: {\n required: false,\n type: 'var'\n },\n zipErrorKey: {\n required: false,\n type: 'str'\n },\n zipLabel: {\n required: false,\n type: 'str'\n },\n zipRequired: {\n reqiured: false,\n type: 'var'\n }\n },\n\n lifecycle: {\n enter: function enter() {\n this.formatRegex = undefined;\n this.inputParams = (0, _squid.$feature)('zipcodeInputParams', undefined, this.country);\n\n if (this.inputParams) {\n this.minLength = this.inputParams.minLength;\n this.maxLength = this.inputParams.maxLength;\n\n if (this.inputParams.formatPattern) {\n this.formatRegex = new RegExp(this.inputParams.formatPattern, 'g');\n }\n }\n\n this.formatZipWithDash = function (zipcode, index) {\n if (zipcode.length > index) {\n zipcode = zipcode.slice(0, index) + '-' + zipcode.slice(index);\n }\n\n return zipcode;\n };\n }\n },\n\n actions: {\n changeZip: function changeZip(zipcode) {\n if (zipcode) {\n\n if (this.formatRegex) {\n zipcode = zipcode.replace(this.formatRegex, '');\n }\n\n if (this.inputParams && this.inputParams.formatZip) {\n zipcode = this.formatZipWithDash(zipcode, this.inputParams.minLength);\n }\n\n this.address.postal_code = zipcode;\n }\n },\n doneFunction: function doneFunction() {\n if (this.doneFn) {\n this.doneFn();\n }\n },\n keyPressHandler: function keyPressHandler(event) {\n if (this.keyPressFn) {\n this.keyPressFn(event);\n }\n }\n }\n});\n\n\n_squid.$Component;\n\n_squid.$feature;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"../node_modules/xo-form-components/src/zipcode/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n \\n \\n
\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-models/src/address/index.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\nexports.$ValidateAddressModel = exports.$PrefillAddressModel = exports.$AddressNormalizationModel = undefined;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar $AddressNormalizationModel = exports.$AddressNormalizationModel = _squid.$Model.extend('$AddressNormalizationModel', {\n api: new _squid.$Api({\n uri: '/api/address/normalize'\n })\n});\n\nvar $PrefillAddressModel = exports.$PrefillAddressModel = _squid.$Model.extend('$PrefillAddressModel', {\n api: new _squid.$Api({\n uri: '/api/address/prefill'\n })\n});\n\nvar $ValidateAddressModel = exports.$ValidateAddressModel = _squid.$Model.extend('$ValidateAddressModel', {\n api: new _squid.$Api({\n uri: '/api/address/validate'\n })\n});\n\nangular.value(\"$AddressNormalizationModel\", $AddressNormalizationModel);\nangular.value(\"$PrefillAddressModel\", $PrefillAddressModel);\nangular.value(\"$ValidateAddressModel\", $ValidateAddressModel);\n_squid.$Model;\n\n_squid.$Api;\n\n/***/ }),\n\n/***/ \"../node_modules/xo-models/src/checkoutIncentive/index.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\nexports.$GetPSBOffersModel = exports.$GetOfferProgramModel = exports.$CreateOfferModel = exports.$EvaluateCheckoutOfferEligibilityModel = undefined;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar $EvaluateCheckoutOfferEligibilityModel = exports.$EvaluateCheckoutOfferEligibilityModel = _squid.$Model.extend('$EvaluateCheckoutOfferEligibilityModel', {\n api: new _squid.$Api({\n uri: '/api/checkout/offers/evaluate-eligibility',\n postAttempts: 1\n }),\n\n isEligible: function isEligible() {\n return Boolean(this.eligible);\n },\n getCurrencyCode: function getCurrencyCode() {\n return this.currency_code;\n },\n getOfferProgramCode: function getOfferProgramCode() {\n return this.offer_program_code;\n },\n getOfferProgramID: function getOfferProgramID() {\n return this.offer_program_id;\n },\n\n\n // This is of the form $5.00\n getOfferValue: function getOfferValue() {\n return this.offer_value;\n }\n});\n\nvar $CreateOfferModel = exports.$CreateOfferModel = _squid.$Model.extend('$CreateOfferModel', {\n api: new _squid.$Api({\n uri: '/api/checkout/offers/new',\n postAttempts: 1\n }),\n\n createdOffer: function createdOffer() {\n return Boolean(this.offer_id);\n },\n getOfferAmountLowestDenom: function getOfferAmountLowestDenom() {\n if (!this.createdOffer() || !this.computation_rules) {\n return;\n }\n\n return _squid.$util.getProperty(this.computation_rules[0], 'offer_value.value');\n },\n getTxnMinimumLowestDenom: function getTxnMinimumLowestDenom() {\n if (!this.createdOffer()) {\n return;\n }\n\n return _squid.$util.getProperty(this, 'offer_program_info.applicability_rule.cart_rule.min_cart_total');\n }\n});\n\nvar $GetOfferProgramModel = exports.$GetOfferProgramModel = _squid.$Model.extend('$GetOfferProgramModel', {\n api: new _squid.$Api({\n uri: '/api/checkout/offers/program'\n }),\n\n getOfferCurrencyCode: function getOfferCurrencyCode() {\n return _squid.$util.getProperty(this, 'currency_code');\n },\n\n\n // NOTE this is in the lowest denominator of the currency\n // For example, $5.00 USD would be returned as 500\n getOfferValueLowestDenom: function getOfferValueLowestDenom() {\n return _squid.$util.getProperty(this.computation_rules[0], 'offer_value.value') || 0;\n },\n getMinCartTotalLowestDenom: function getMinCartTotalLowestDenom() {\n return _squid.$util.getProperty(this, 'applicability_rule.cart_rule.min_cart_total') || 0;\n },\n isUserInApplicableCountry: function isUserInApplicableCountry(userCountry) {\n if (!userCountry) {\n return false;\n }\n\n var applicableCountries = _squid.$util.getProperty(this, 'applicability_rule.user_rule.user_countries') || [];\n\n return applicableCountries ? applicableCountries.indexOf(userCountry) >= 0 : false;\n }\n});\n\nvar $GetPSBOffersModel = exports.$GetPSBOffersModel = _squid.$Model.extend('$GetPSBOffersModel', {\n api: new _squid.$Api({\n uri: '/api/checkout/offers/offers'\n }),\n\n // If an offer is returned in the resource_list, it is active; in this\n // case we do not want to give the user another incentive\n hasActiveOffer: function hasActiveOffer() {\n return Boolean(this.resource_list && this.resource_list.length);\n },\n\n\n // Check if the user has an offer belonging to this specific offer program\n hasActiveCheckoutIncentive: function hasActiveCheckoutIncentive(offer_program_id) {\n return offer_program_id && this.hasActiveOffer() && this.resource_list.some(function (offer) {\n return offer.offer_program_id === offer_program_id;\n });\n },\n\n\n // Check if the user has an offer with the passed in redemption code\n // NOTE this is necessary because planning does not return which program\n // an incentive is from if the incentive is being used in the transaction.\n // The only identifier is the redemption code\n hasOfferWithRedemptionCode: function hasOfferWithRedemptionCode(redemption_code) {\n return redemption_code && this.hasActiveOffer() && this.resource_list.some(function (offer) {\n return offer.redemption_code === redemption_code;\n });\n }\n});\n\nangular.value(\"$EvaluateCheckoutOfferEligibilityModel\", $EvaluateCheckoutOfferEligibilityModel);\nangular.value(\"$CreateOfferModel\", $CreateOfferModel);\nangular.value(\"$GetOfferProgramModel\", $GetOfferProgramModel);\nangular.value(\"$GetPSBOffersModel\", $GetPSBOffersModel);\n_squid.$Model;\n\n_squid.$Api;\n\n_squid.$util;\n\n/***/ }),\n\n/***/ \"../node_modules/xo-page-components/src/aside-header/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nvar _uiRouter = __webpack_require__(\"../node_modules/angular-ui-router/release/angular-ui-router.min.js\");\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _angular2 = _interopRequireDefault(_angular);\n\nvar _template = __webpack_require__(\"../node_modules/xo-page-components/src/aside-header/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n_angular2['default'].module().directive('xoAsideHeader', function () {\n return {\n template: _template2['default'],\n restrict: 'E',\n scope: {\n hdrtype: '@?',\n heading: '@?',\n subHead: '@?',\n addLink: '@?',\n backUrl: '@?',\n closeUrl: '@?',\n hidex: '@?',\n headerLeftLink: '=?',\n headerLeft: '@?',\n headerLeftIcon: '@?',\n headerRightLink: '=?',\n headerRight: '@?',\n headerRightIcon: '@?',\n subHeaderLeftLink: '@?',\n subHeaderLeft: '@?',\n subHeaderLeftIcon: '@?',\n subHeaderRightLink: '@?',\n subHeaderRight: '@?',\n subHeaderRightIcon: '@?',\n showDualFi: '=?'\n },\n controller: ['$scope', '$element', function ($scope, $element) {\n (0, _angular.$timeout)(function () {\n // Explicitly select `x` button and `<` buttons from manage wallet\n // and add card pages\n // See: https://engineering.paypalcorp.com/jira/browse/PPPLMER-64007\n // See: https://engineering.paypalcorp.com/jira/browse/PPPLMER-64008\n $element.find('a.focusableIcon').focus();\n });\n\n if (_angular2['default'].isUndefined($scope.closeUrl)) {\n $scope.closeUrl = 'checkout.review';\n }\n\n if ($scope.addLink) {\n $scope.subHeaderRight = 'asideHeader.add';\n $scope.subHeaderRightLink = $scope.addLink;\n }\n\n $scope.onClickLink = function (event, target, showDualFi) {\n event.preventDefault();\n if (showDualFi) {\n $scope.showFiOptions = true;\n } else if (_angular2['default'].isFunction(target)) {\n target();\n } else {\n _uiRouter.$state.go(target);\n }\n };\n }]\n };\n});\n\n_uiRouter.$state;\n\n/***/ }),\n\n/***/ \"../node_modules/xo-page-components/src/aside-header/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n
\\n

{{ content(heading) }}

\\n {{ content('common.back') }}\\n \\n \\n {{ content(headerLeft) }}\\n \\n {{ content('common.back') }}\\n \\n \\n {{ content(headerRight) }}\\n \\n
\\n\\n
\\n

{{ content(subHead) }}

\\n \\n \\n {{ content(subHeaderLeft) }}\\n \\n \\n \\n {{ content(subHeaderRight) }}\\n \\n
\\n
\\n
\\n \\n
\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-tray-height/dist/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function($) {\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _logger = __webpack_require__(\"../node_modules/xo-beaver/dist/logger.js\");\n\n/** Name: Tray height helper */\nangular.module().directive('xoTrayHeight', function () {\n return {\n restrict: 'A',\n link: function link($scope, element, attrs) {\n // Check to see if we can use the safer full height approach\n // or if we need to fallback to calculating the height using\n // math and relying on the \"right\" timing.\n var topClass = 'xo-sidebar-wrapper';\n var topSelector = '.' + topClass;\n var topElem = document.querySelector(topSelector);\n var inScope = topElem && topElem.querySelector('[xo-tray-height]');\n var useNewFlow = topElem && inScope;\n\n /**\n * NOTE:\n * The following code, despite being the \"new\" flow, is still\n * a stopgap solution until such time as the markup and or\n * CSS undergo an overhaul. It relies on the more stable\n * cascading relative/absolute positioning and 100% height\n * *and* the fact that the code is an instance of xo-tray-height\n * within the xo-sidebar-wrapper.\n */\n function calculate() {\n var curElem = element[0];\n\n while (!~curElem.className.indexOf(topClass)) {\n var style = getComputedStyle(curElem, null);\n\n if (style.position !== 'absolute') {\n curElem.style.position = 'relative';\n }\n curElem.style.height = '100%';\n curElem = curElem.parentNode;\n }\n }\n\n /**\n * NOTE:\n * The following DEPRECATED version of the calculate method\n * relies on calculating the heights using math. This heavy\n * handed approach is fine if it is called at the right times\n * and often enough; however, this criteria is hard to achieve.\n *\n * A markup and styles overhaul is recommended to do away with\n * both of these methods.\n */\n function deprecatedCalculate() {\n // DEPRECATED\n _logger.$logger.warn('xo-tray-height-fallback', {\n message: 'Using the fallback sidebar height calculation. ' + 'height may not be 100%. You should not be here!'\n });\n var height;\n var headerHeight;\n var mainHeight;\n var trayMinheight = 400;\n var asideContentHeight;\n var $aside = $(element).parents('aside:visible');\n var $asideContent = $aside.find('.asideContent');\n\n if (!$aside || !$asideContent) {\n return;\n }\n\n // Updates the tray height to the section height\n headerHeight = $aside.find('.header').outerHeight(true);\n mainHeight = $('#main').outerHeight(true);\n\n height = mainHeight - headerHeight;\n asideContentHeight = $asideContent.outerHeight(true);\n if ($scope.miniBrowser) {\n $aside.find('.aside').css('height', '534px');\n var minHeight = 534 - headerHeight;\n\n $asideContent.css('height', minHeight);\n } else if (asideContentHeight > height) {\n $asideContent.css('height', height);\n $aside.find('aside:visible').addClass('hasScroll');\n } else {\n height = height > trayMinheight ? height : trayMinheight;\n $asideContent.css('height', height);\n $aside.removeClass('hasScroll');\n }\n }\n\n if (useNewFlow) {\n calculate();\n } else {\n (0, _angular.$timeout)(deprecatedCalculate, 1);\n\n $scope.$on('SidebarError', function () {\n deprecatedCalculate();\n });\n }\n }\n };\n});\n\n/* grab the logger so we can warn about being in the fallback mode */\n\n\n_angular.$timeout;\n\n_logger.$logger;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-ui-components/src/address-box/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _logger = __webpack_require__(\"../node_modules/xo-beaver/dist/logger.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-ui-components/src/address-box/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/address-box/styles.less\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n(0, _squid.$registerDirective)('xo-address-box', function () {\n return {\n template: _template2['default'],\n scope: {\n header: '=?',\n fullname: '=?',\n addresses: '=?',\n changeFn: '=?'\n },\n lifecycle: {\n enter: function enter() {\n _logger.$logger.info('xo-address-box_enter');\n }\n },\n controller: ['$scope', function ($scope) {\n var addressList = $scope.addresses && $scope.addresses.addresses || [];\n\n $scope.address = addressList[0] || {};\n $scope.line3 = $scope.address.city + ', ' + $scope.address.state + ' ' + $scope.address.postal_code;\n $scope.updateType = addressList.length > 1 ? _squid.$locale.content.get('common.change') : _squid.$locale.content.get('common.edit');\n $scope.updateFn = function () {\n return $scope.changeFn($scope.updateType);\n };\n $scope.fullname = $scope.fullname;\n if ($scope.fullname) {\n $scope.name = $scope.fullname.first_name + ' ' + $scope.fullname.last_name;\n }\n }]\n };\n});\n\n_squid.$registerDirective;\n\n_squid.$locale;\n\n_logger.$logger;\n\n/***/ }),\n\n/***/ \"../node_modules/xo-ui-components/src/address-box/styles.less\":\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ \"../node_modules/xo-ui-components/src/address-box/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\n\\n
\\n
{{header}}
\\n \\n
\\n
\\n

{{name}}

\\n

{{address.line1}}

\\n

{{address.line2}}

\\n

{{line3}}

\\n
\\n
\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-ui-components/src/dropdown-multiline/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(\"../node_modules/squid/dist/index.js\"), __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (squid, $) {\n squid.module('xo-dropdown-multiline.directive', ['squid']).directive('xoDropdownMultiline', ['$timeout', function ($timeout) {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function link($scope, $select, attrs, ngModel) {\n var isListVisible = false;\n var listCreated = false;\n\n $select = $($select);\n\n var $span = $('
');\n var $container = $('
');\n var $list = void 0;\n\n function updateCover() {\n $timeout(function () {\n $span.find('span span').html($select.find('[selected]').text().replace(/\\\\n/gi, '
').trim());\n }, 10);\n }\n\n function createList($options) {\n if ($options.length < 2) {\n return;\n }\n\n function getModel() {\n var modelName = void 0;\n var model = void 0;\n var subParts = void 0;\n\n if ($select.attr('ng-options')) {\n modelName = $select.attr('ng-options').substring($select.attr('ng-options').indexOf('in ') + 3, $select.attr('ng-options').length);\n } else {\n var $option = $($select.find('[ng-repeat]')[0]);\n\n modelName = $option.attr('ng-repeat').substring($option.attr('ng-repeat').indexOf('in ') + 3, $option.attr('ng-repeat').length);\n }\n\n // This is to handle cases like card.billingAddress\n if (modelName.indexOf('.') !== -1) {\n subParts = modelName.split('.');\n model = $scope;\n\n for (var i = 0; i < subParts.length; i++) {\n model = model[subParts[i]];\n }\n } else {\n // And this is to handle straightforward model names\n model = $scope[modelName];\n }\n\n return model;\n }\n\n function hideList(event) {\n $list.hide();\n $container.append($list);\n isListVisible = false;\n $container.removeClass('open');\n }\n\n function positionList() {\n $list.css('left', $container.offset().left + 'px');\n $list.css('top', $container.offset().top + $container.height() + 'px');\n $list.css('width', $container.width() + 'px');\n }\n\n function setFocusOnSelected() {\n var $selected = $select.find('[selected]');\n\n if ($selected.length) {\n var $item = $list.find('[data-value=\"' + $selected.attr('value') + '\"]');\n\n $item.focus();\n } else {\n $list.find('li')[0].focus();\n }\n }\n\n function showList() {\n $('body').append($list);\n $container.addClass('open');\n $list.show();\n positionList();\n isListVisible = true;\n setFocusOnSelected();\n }\n\n function processContainerKeypress(event) {\n var keyCode = event && event.keyCode;\n\n if (keyCode === 13 || keyCode === 40) {\n // enter or down arrow\n if (!isListVisible) {\n showList();\n } else {\n hideList();\n $container.focus();\n }\n } else if (keyCode === 27) {\n // escape\n if (isListVisible) {\n hideList();\n $container.focus();\n }\n }\n }\n\n if ($list) {\n $list.remove();\n }\n\n $list = $('');\n\n Array.prototype.forEach.call($options, function (option) {\n var $option = $(option);\n var value = $option.attr('value');\n var text = option.innerHTML.replace(/\\\\n/gi, '
');\n\n if (text.indexOf('content(') !== -1) {\n text = $scope.content(text.substring(text.indexOf('(\\'') + 2, text.indexOf('\\')')));\n }\n\n var html = '
  • ' + text + '
  • ';\n $list.append($(html));\n });\n\n $container.append($list);\n $list.hide();\n\n $($list.find('li')).click(function (event) {\n var $target = $(event.target);\n var value = $target.data('value');\n\n if (typeof value !== 'undefined') {\n $select.find('option').removeAttr('selected');\n $select.find('option[value=\"' + value + '\"]').attr('selected', 'selected');\n $select.find('option').removeProp('selected');\n $select.find('option[value=\"' + value + '\"]').prop('selected', 'selected');\n } else {\n value = $target.html().replace(/\\//gi, '\\\\n');\n $select.val(value);\n }\n\n if ($select.attr('ng-model')) {\n if ($select.attr('ng-options') || $select.find('[ng-repeat]').length) {\n /* This parses the 'ng-options' directive and returns the options model.\n For example: If you have: ng-options='opt as opt.label for opt in options'\n Here it will parse this attribute and return 'options */\n var model = getModel();\n\n ngModel.$setViewValue(model[value]);\n } else {\n ngModel.$setViewValue(value);\n }\n }\n updateCover();\n hideList();\n });\n\n var $innerContainer = $container.find('.innerContainer');\n\n $container.click(function () {\n if (isListVisible) {\n hideList();\n $container.focus();\n } else {\n showList();\n }\n });\n\n $container.keydown(function (event) {\n return processContainerKeypress(event);\n });\n $innerContainer.keydown(function (event) {\n return processContainerKeypress(event);\n });\n\n $list.find('li').keydown(function (event) {\n var keyCode = event && event.keyCode;\n var $target = $(event.target);\n\n if (keyCode === 13) {\n // enter\n $target.click();\n event.stopPropagation();\n } else if (keyCode === 27) {\n // escape\n if (isListVisible) {\n hideList();\n $container.focus();\n event.stopPropagation();\n }\n } else if (keyCode === 40) {\n // down arrow\n if (!$target.is(':last-of-type')) {\n $target.next().focus();\n event.preventDefault();\n event.stopPropagation();\n }\n } else if (keyCode === 38) {\n // up arrow\n if (!$target.is(':first-of-type')) {\n $target.prev().focus();\n }\n event.preventDefault();\n event.stopPropagation();\n }\n });\n\n $(window).resize(function () {\n if (isListVisible) {\n positionList();\n }\n });\n\n $(window).bind('hashchange', function () {\n if (isListVisible) {\n hideList();\n }\n });\n\n $(document).click(function (event) {\n var $target = $(event.target);\n\n if (!($target.is($container) || $.contains($container.get()[0], $target.get()[0])) && isListVisible) {\n hideList();\n }\n });\n\n $container.blur(function (event) {\n // The setTimeout here is to ensure activeElement is set before our function executes\n $timeout(function () {\n var $newTarget = $(event.explicitOriginalTarget || document.activeElement);\n\n if (!($.contains($container.get()[0], $newTarget.get()[0]) || $.contains($list.get()[0], $newTarget.get()[0]))) {\n hideList(event);\n }\n }, 1);\n });\n\n listCreated = true;\n updateCover();\n }\n\n function render() {\n var options = $select.find('option');\n\n if (!listCreated) {\n createList(options);\n }\n }\n\n $select.wrap($container);\n $container = $select.parent();\n\n // Change class names to enable styling of hover/focus states\n $select.bind('mouseenter focus', function () {\n return $span.addClass('active');\n });\n // Change class names to enable styling of hover/focus states\n $select.bind('mouseleave blur', function () {\n return $span.removeClass('active');\n });\n $select.after($span);\n $select.addClass('replaced');\n $select.attr('tabindex', '-1');\n\n if (attrs['default']) {\n var defaultOption = document.createElement('option');\n\n defaultOption.innerText = attrs['default'];\n $select.append(defaultOption);\n }\n\n if ($select.attr('ng-options')) {\n $scope.$watch(attrs.ngModel, function () {\n render();\n });\n } else {\n $timeout(function () {\n return $scope.$broadcast('pageRendered');\n });\n }\n\n $scope.$on('pageRendered', function () {\n return render();\n });\n }\n };\n }]);\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n/***/ }),\n\n/***/ \"../node_modules/xo-ui-components/src/dropdown/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(console) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(\"../node_modules/squid/dist/index.js\"), __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (squid, $) {\n $.fn.dropdown = function () {\n console.warn('Dropdown deprecated');\n };\n squid.module('xo-dropdown.directive', ['squid']).directive('xoDropdown', ['$parse', '$window', '$timeout', '$util', '$compile', function ($parse, $window, $timeout, $util, $compile) {\n var userAgent = ($window.navigator || {}).userAgent;\n var isWinOS = Boolean(userAgent.match(/\\(win/i));\n\n return {\n restrict: 'A',\n scope: {\n dropdownTextBindVar: '=?'\n },\n link: function link($scope, $element, attrs) {\n var $parentScope = $scope.$parent;\n var $select = $($element);\n // TODO: This html should be refactored out into a template.\n var $span = $('');\n var selectInitialValue = '';\n var ngChange = '';\n\n $select.parent().addClass('custom-select-container');\n // Change class names to enable styling of hover/focus states\n $select.bind('mouseenter', function () {\n return $span.addClass('active');\n });\n $select.bind('mouseleave', function () {\n return $span.removeClass('active');\n });\n // Change class names to enable styling of hover/focus states\n $select.bind('focus', function () {\n selectInitialValue = $parse(attrs.ngModel)($parentScope);\n $span.addClass('active');\n });\n\n function executeSelectChange() {\n // setTimeout here is to ensure activeElement is set before our function executes\n $timeout(function () {\n var val = $parse(attrs.ngModel)($parentScope);\n\n if (selectInitialValue !== val) {\n if (ngChange) {\n ngChange($parentScope);\n }\n selectInitialValue = val;\n }\n }, 5);\n }\n\n if (isWinOS) {\n if (attrs['ngChange']) {\n ngChange = $parse(attrs.ngChange);\n attrs['ngChange'] = '';\n }\n\n $select.bind('blur', function () {\n executeSelectChange();\n $span.removeClass('active');\n });\n $select.bind('click', function () {\n return executeSelectChange();\n });\n } else {\n $select.bind('blur', function () {\n return $span.removeClass('active');\n });\n }\n\n $select.after($span);\n $select.addClass('replaced');\n\n if (attrs['default']) {\n var defaultOption = document.createElement('option');\n\n defaultOption.innerText = attrs['default'];\n $select.append(defaultOption);\n }\n\n var match = (attrs.ngOptions || '').match(/in ([\\w\\.]+)/);\n // Text Update Method 1(new): ng-bind on variable passed in directive and that is updated in parent/sibling scope\n if (angular.isDefined($scope.dropdownTextBindVar)) {\n var selectTextElement = $span.find('span span');\n\n if (selectTextElement.length) {\n $(selectTextElement).attr('ng-bind', 'dropdownTextBindVar');\n $(selectTextElement).html($compile(selectTextElement[0])($scope));\n }\n\n $scope.$watch('dropdownTextBindVar', function (newVal) {\n if (document.documentElement.getAttribute('dir') === 'rtl') {\n $span.toggleClass('ltrOverride', !$util.hasRTL(newVal));\n }\n });\n }\n // Text Update Method 2(old): jQuery text update on various conditions (not as reliable for me, ran into timing edge cases)\n else {\n var updateCover = function updateCover() {\n $timeout(function () {\n var text = $select.find(':selected').text().trim();\n\n $span.find('span span').text(text);\n if (document.documentElement.getAttribute('dir') === 'rtl') {\n $span.toggleClass('ltrOverride', !$util.hasRTL(text));\n }\n }, 5);\n };\n\n $parentScope.$watch(attrs.ngModel, updateCover);\n $scope.$on('contentChange', updateCover);\n if (match) {\n $parentScope.$watch(match[1], updateCover);\n }\n // Update cover on arrow key press, for case where menu is not open\n // but user is interacting with dropdown (eg. Firefox)\n $select.bind('keyup', function (event) {\n // Arrow keys are 37 - 40\n if (event.which >= 37 || event.which <= 40) {\n updateCover();\n }\n });\n }\n\n toggleOptionsLTROverride();\n if (match) {\n $parentScope.$watch(match[1], function (newVal) {\n toggleOptionsLTROverride();\n });\n }\n\n function toggleOptionsLTROverride() {\n if (document.documentElement.getAttribute('dir') === 'rtl') {\n $timeout(function () {\n var options = $select.find('option');\n\n for (var i = 0; i < options.length; i++) {\n $(options.get(i)).toggleClass('ltrOverride', !$util.hasRTL(options.get(i).text));\n }\n });\n }\n }\n }\n };\n }]);\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/console-browserify/index.js\")))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-ui-components/src/expired-fi-panel/factory.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module, __dirname, __filename) {\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _logger = __webpack_require__(\"../node_modules/xo-beaver/dist/logger.js\");\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$ExpiredFiPanelFactory', [function () {\n\n var disallowedContentMap = {\n 'INSTRUMENT_VERIFICATION_FAILED': 'wallet.disallowedDueToPreAuth',\n 'unsupportedGeneric': 'wallet.unsupportedDueToRisk',\n 'unsupportedByProduct': 'wallet.unsupportedDueToReceiverPreference',\n 'unsupportedDueToExpiration': 'wallet.unsupportedDueToExpiration'\n };\n var disallowedExp = {\n resourceName: 'xo_preauth_disallowed_instruments',\n control: 'xo_preauth_disallowed_instruments_control',\n disallowedFi: 'xo_preauth_disallowed_instruments_disallowed_fi',\n preAuth: 'xo_preauth_disallowed_instruments_preauth'\n };\n\n var getPxpResult = function getPxpResult(models) {\n var schedule = models.cart && models.cart.isBilling() ? 'BILLING' : 'ONE_TIME_PAYMENT';\n var approval_type = models.cart && models.cart.isPurchase() ? 'PURCHASE' : 'NOT_PURCHASE';\n var solution = _squid.$integration.isFlow('WPS') ? 'WEBSITE_PAYMENTS_STANDARD' : 'EXPRESS_CHECKOUT';\n\n return (0, _squid.$elmo)(disallowedExp.resourceName, { 'ctx.country': _squid.$locale.country, 'ctx.flow': 'HERMES', 'ctx.schedule': schedule, 'ctx.approval_type': approval_type, 'ctx.solution': solution }, disallowedExp.resourceName + '(.*)').then(function (result) {\n return result && result.treatment_name;\n });\n };\n\n var filterInstrumentsFromDisallowed = function filterInstrumentsFromDisallowed(instrument, fundingOptions) {\n var match = fundingOptions.find(function (fundingInstrument) {\n return fundingInstrument.id === instrument.id;\n });\n return match === undefined;\n };\n\n var disallowedDueToPreAuth = function disallowedDueToPreAuth(disallowedFi, fundingOptions) {\n return disallowedFi.filter(function (i) {\n return i.declineReason === 'INSTRUMENT_VERIFICATION_FAILED' && i.isPreferred !== true && filterInstrumentsFromDisallowed(i, fundingOptions);\n });\n };\n\n var disallowedDueToOther = function disallowedDueToOther(disallowedFi, fundingOptions) {\n return disallowedFi.filter(function (i) {\n return i.type && i.type !== 'REWARDS' && i.declineReason !== 'INSTRUMENT_VERIFICATION_FAILED' && i.isPreferred !== true && filterInstrumentsFromDisallowed(i, fundingOptions);\n });\n };\n\n var mapDisallowedContent = function mapDisallowedContent(disallowed, token) {\n if (disallowed.type === 'CARD') {\n disallowed.message = disallowedContentMap[disallowed.declineReason] ? disallowedContentMap[disallowed.declineReason] : disallowedContentMap['unsupportedGeneric'];\n logInstrumentToFpti(disallowed, token);\n return disallowed;\n } else {\n disallowed.message = disallowedContentMap['unsupportedGeneric'];\n logInstrumentToFpti(disallowed, token);\n return disallowed;\n }\n };\n\n var logInstrumentToFpti = function logInstrumentToFpti(instrument, token) {\n var fptiPayload = {\n 'from': 'POST_PLANNING',\n 'to': 'exception_disallowed_fi',\n 'context_type': _squid.$integration.isFlow('WPS') ? 'WEBSITE_PAYMENTS_STANDARD' : 'EXPRESS_CHECKOUT',\n 'context_id': token,\n 'fi_id': instrument.id,\n 'disallowed_reason': instrument.declineReason,\n 'message': instrument.message\n };\n _logger.$logger.info('checkout_fpti', fptiPayload);\n };\n\n var getAllInstruments = function getAllInstruments(models) {\n var instruments = [].concat(models.checkoutSession.get('fundingOptions').getDisplayInstruments());\n var token = models.checkoutSession.get('id');\n\n return getPxpResult(models).then(function (result) {\n if (result === disallowedExp.control) {\n return _squid.$promise.resolve(instruments);\n } else if (result === disallowedExp.disallowedFi || result === disallowedExp.preAuth) {\n var disallowedFi = models.checkoutSession.getDisallowedInstruments();\n\n if (!disallowedFi) {\n return _squid.$promise.resolve(instruments);\n }\n var fundingOption = models.checkoutSession.get('fundingOptions.instruments');\n var disallowedPreAuth = disallowedDueToPreAuth(disallowedFi, fundingOption);\n var disallowedPreferred = models.checkoutSession.getDisallowedPreferred();\n var disallowedOther = disallowedDueToOther(disallowedFi, fundingOption);\n\n if (disallowedPreferred) {\n instruments.push(mapDisallowedContent(disallowedPreferred, token));\n }\n if (disallowedPreAuth && disallowedPreAuth.length) {\n _squid.$util.forEach(disallowedPreAuth, function (instrument) {\n instruments.push(mapDisallowedContent(instrument, token));\n });\n }\n if (disallowedOther && disallowedOther.length) {\n _squid.$util.forEach(disallowedOther, function (instrument) {\n instruments.push(mapDisallowedContent(instrument, token));\n });\n }\n }\n return _squid.$promise.resolve(instruments);\n });\n };\n\n return {\n getPxpResult: getPxpResult,\n getAllInstruments: getAllInstruments,\n disallowedExp: disallowedExp\n };\n}]);\n\n_squid.$util;\n\n_squid.$locale;\n\n_squid.$promise;\n\n_squid.$elmo;\n\n_squid.$integration;\n\n_logger.$logger;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/webpack/buildin/module.js\")(module), \"../node_modules/xo-ui-components/src/expired-fi-panel\", \"../node_modules/xo-ui-components/src/expired-fi-panel/factory.js\"))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-ui-components/src/floating-label/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/floating-label/styles.less\");\n\nvar treatmentType = void 0;\nvar newLocale = void 0;\nvar oldLocale = void 0;\n\nfunction getTreatment() {\n if (treatmentType !== undefined) {\n return treatmentType;\n }\n if ((0, _squid.$feature)('floatingLabels')) {\n return true;\n }\n var token = _angular.$rootScope.token;\n var throttle = _squid.$config['floatingLabelLocales'] && _squid.$config['floatingLabelLocales'][_squid.$locale.country] && _squid.$config['floatingLabelLocales'][_squid.$locale.country][_squid.$locale.lang];\n var id = _squid.$locale.lang + '_' + _squid.$locale.country + token;\n\n treatmentType = throttle && (0, _squid.$experiment)('floating_label_exp', throttle, id, {}) ? true : false;\n return treatmentType;\n}\n\n(0, _squid.$registerDirective)('floating-label', function () {\n return {\n restrict: 'A',\n link: function link(scope, element, attrs) {\n scope.$on('localeChange', function () {\n newLocale = _squid.$locale.country + '_' + _squid.$locale.lang;\n\n if (oldLocale !== newLocale) {\n treatmentType = undefined;\n oldLocale = newLocale;\n }\n scope.showFloatingLabels = getTreatment();\n });\n\n (0, _angular.$timeout)(function () {\n scope.showFloatingLabels = getTreatment();\n\n scope.$watch('showFloatingLabels', function (val) {\n // remove else block after experimentation is complete\n if (val) {\n element.addClass('floatingLabel');\n element.removeClass('noFloatingLabel');\n } else {\n element.removeClass('floatingLabel');\n element.addClass('noFloatingLabel');\n }\n });\n\n var input = element.find('input');\n\n if (input.attr('placeholder')) {\n input.addClass('hasPlaceholder');\n }\n\n // To hide the placeholder labels for pre-populated input fields\n scope.$watch(input.attr('ng-model'), function (value) {\n input.toggleClass('focused', !!value);\n });\n\n // We're using this as an alternative to watching 'ng-model' since this properly triggers the focused CSS property on email input.\n input.on('keyup', function (event) {\n var val = event.target.value;\n\n input.toggleClass('focused', !!val);\n });\n\n input.on('focus blur click', function (event) {\n if (scope.showFloatingLabels) {\n input.toggleClass('focused', event.type === 'focus' || this.value.length > 0);\n }\n });\n\n if (!('disableAutoblur' in attrs)) {\n input.trigger('blur');\n }\n });\n }\n };\n});\n\n(0, _squid.$registerDirective)('floating-label-dropdown', function () {\n return {\n restrict: 'A',\n link: function link(scope, element, attrs) {\n scope.$on('localeChange', function () {\n newLocale = _squid.$locale.country + '_' + _squid.$locale.lang;\n\n if (oldLocale !== newLocale) {\n treatmentType = undefined;\n oldLocale = newLocale;\n }\n scope.showFloatingLabels = getTreatment();\n });\n\n (0, _angular.$timeout)(function () {\n scope.showFloatingLabels = getTreatment();\n scope.$watch('showFloatingLabels', function (val) {\n // remove else block after experimentation is complete\n if (val) {\n element.addClass('floatingLabel');\n element.removeClass('noFloatingLabel');\n } else {\n element.removeClass('floatingLabel');\n element.addClass('noFloatingLabel');\n }\n });\n\n var select = element.find('select');\n var label = element.find('label');\n var flSpan = element.find('.custom-select span span');\n\n select.on('change mouseenter mouseleave blur', function (event) {\n var value = event.currentTarget.value;\n\n select.toggleClass('focused', event.type === 'change' || value.length > 0);\n flSpan.toggleClass('noValue', value.length < 1);\n label.toggleClass('hide', value.length < 1);\n }).trigger('mouseleave');\n });\n }\n };\n});\n\n_angular.$timeout;\n\n_angular.$rootScope;\n\n_squid.$locale;\n\n_squid.$experiment;\n\n_squid.$config;\n\n_squid.$feature;\n\n_squid.$registerDirective;\n\n/***/ }),\n\n/***/ \"../node_modules/xo-ui-components/src/floating-label/styles.less\":\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ \"../node_modules/xo-ui-components/src/prefix-attrs-with/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nexports['default'] = (0, _squid.$registerDirective)('prefix-attrs-with', function () {\n return {\n restrict: 'A',\n link: function link(scope, elem, attrs) {\n var prefix = attrs.prefixAttrsWith;\n\n if (prefix && prefix.length) {\n ['id', 'for', 'name'].forEach(function (attrName) {\n var base = attrs[attrName];\n\n if (base) {\n elem.attr(attrName, _squid.$util.dasherizeToCamel(prefix + '-' + base));\n }\n });\n }\n }\n };\n});\n\n\n_squid.$util;\n\n_squid.$registerDirective;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"../node_modules/xo-ui-components/src/spinner-button/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(\"../node_modules/angular/angular.min.js\"), __webpack_require__(\"../node_modules/noop-loader/index.js!../node_modules/xo-ui-components/src/spinner-button/template.html\")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (angular, template) {\n return angular.module('xo-spinner-button.directive', []).directive('xoSpinnerButton', [function () {\n return {\n template: template,\n scope: {\n token: '=?',\n track: '@?',\n onClick: '=?',\n buttonText: '@?',\n isProcessing: '=?',\n validate: '=?'\n },\n controller: ['$scope', function ($scope) {\n\n $scope.submit = function () {\n if ($scope.onClick) {\n $scope.onClick();\n } else {\n $scope.validate = true;\n }\n };\n }]\n };\n }]);\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/addCep/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\n__webpack_require__(\"../node_modules/xo-angular-ui-utils/ui-utils.min.js\");\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-form-components/src/zipcode/directive.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/addCep/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoAddCep', function () {\n return {\n template: _template2['default'],\n scope: {\n token: '=?',\n sidebar: '=?',\n prefillAddress: '=?',\n doneFn: '=?'\n },\n controller: ['$scope', function ($scope) {\n $scope.country = _squid.$locale.country;\n $scope.address = {};\n $scope.onSubmit = function () {\n $scope.prefillAddress.address = {\n country: _squid.$locale.country,\n postal_code: $scope.address.postal_code\n };\n return $scope.prefillAddress.save({\n data: $scope.prefillAddress,\n success: function success(result) {\n $scope.prefillAddress.address = result;\n $scope.doneFn();\n }\n });\n };\n }]\n };\n});\n\n_squid.$locale;\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/addCep/route.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module, __dirname, __filename) {\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/addCep/directive.js\");\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$AddCepRoute', function () {\n return _squid.$ComponentRoute.extend('AddCepRoute', {\n name: 'addCep',\n directive: 'xo-add-cep',\n titleContent: 'addBillingAddress.title',\n loginRequired: true,\n children: []\n });\n});\n\n_squid.$ComponentRoute;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/webpack/buildin/module.js\")(module), \"../node_modules/xo-wallet-components/src/add-card/addCep\", \"../node_modules/xo-wallet-components/src/add-card/addCep/route.js\"))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/addCep/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\n\\n

    {{ content('addBillingAddress.title') }}

    \\n\\n
    \\n
    \\n \\n
    \\n \\n
    \\n
    \\n
    \\n\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/addbilling/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function($) {\n\n__webpack_require__(\"../node_modules/xo-angular-ui-utils/ui-utils.min.js\");\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _uiRouter = __webpack_require__(\"../node_modules/angular-ui-router/release/angular-ui-router.min.js\");\n\nvar _logger = __webpack_require__(\"../node_modules/xo-beaver/dist/logger.js\");\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _address = __webpack_require__(\"../node_modules/xo-models/src/address/index.js\");\n\nvar _checkout = __webpack_require__(\"../node_modules/xo-models/src/checkout/index.js\");\n\nvar _fi = __webpack_require__(\"../node_modules/xo-models/src/fi/index.js\");\n\n__webpack_require__(\"../node_modules/xo-page-components/src/aside-header/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/accessibility/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/error-tooltip/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-address-components/src/add-address/directive.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/addbilling/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoAddBilling', function () {\n return {\n template: _template2['default'],\n scope: {\n auth: '=?',\n token: '=?',\n doneFn: '=?',\n parentCallbacks: '=?',\n sidebar: '=?',\n showmeftsection: '=?',\n hideparenthead: '=?',\n billingaddressupdated: '=?',\n prefillAddress: '=?'\n },\n controller: ['$scope', '$element', function ($scope, $element) {\n var country = _squid.$locale.getCountryCodeISO();\n\n $scope.billing = true; // to denote its billing address page still\n $scope.normalize = (0, _squid.$feature)('addressNormalization');\n $scope.country = country;\n var $el = $($element);\n\n if ($scope.showmeftsection) {\n $scope.showmeftsection.toggle = false;\n }\n\n if ($scope.hideparenthead) {\n $scope.hideparenthead.toggle = true;\n }\n\n function isUserInputtedAddress(address) {\n return address && address.id === '0';\n }\n\n // Label fields has having error if needed to, and focus the first error if needed\n function handleValidation(res) {\n if (res && res.fields && res.fields.length) {\n res.fields.forEach(function (field) {\n if (field.field) {\n var $field = $($el.find('[name=\"' + field.field + '\"]'));\n\n if ($field.length === 0 && field.field === 'zip') {\n $field = $($el.find('[ng-model=\"address.postal_code\"], [ng-model=\"zipCode\"]'));\n }\n $field.addClass('backendError');\n $field.attr('aria-invalid', true);\n }\n });\n }\n\n $el.find('form').find('.backendError, .ng-invalid').first().focus();\n }\n\n var prefilledAddress = $scope.prefillAddress && $scope.prefillAddress.address;\n\n if (prefilledAddress) {\n $scope.prefilled = true;\n }\n\n $scope.address = $scope.address || prefilledAddress || { country: country };\n\n var editFlow = function editFlow() {\n _logger.$logger.info('xo-billing_editFlow_check', {\n 'flow_type': _uiRouter.$stateParams.flow_type\n });\n if (_uiRouter.$stateParams.flow_type === 'edit') {\n $scope.address = $scope.billingAddresses.addresses[0];\n }\n };\n\n (0, _squid.$populate)($scope, {\n billingAddresses: _fi.$BillingAddressesModel.instance(),\n flowEligibility: _checkout.$FlowEligibilityModel.instance($scope.token).retrieve({\n params: {\n geolocation: _squid.$meta.geolocation,\n localeCountry: _squid.$locale.country\n }\n })\n }).then(function () {\n editFlow();\n $scope.debitCardFlow = angular.isArray($scope.flowEligibility.paymentCardProductClass) && $scope.flowEligibility.paymentCardProductClass.length === 1 && $scope.flowEligibility.paymentCardProductClass[0] === 'DEBIT';\n\n $scope.cancelFn = function () {\n $scope.done();\n };\n\n $scope.done = function (target) {\n var el = $('.tokenization #sidepageAddCard');\n\n if (el) {\n el.removeClass('slideLeft');\n }\n target = target || '^.addCard';\n _uiRouter.$state.go(target);\n };\n\n $scope.onSubmit = function () {\n $scope.updateAddress();\n };\n\n $scope.prefill = function () {\n $scope.address.country = $scope.country;\n $scope.prefillAddress = new _address.$PrefillAddressModel({\n id: $scope.token,\n address: $scope.address\n });\n\n return $scope.prefillAddress.save({\n data: $scope.prefillAddress,\n success: function success(result) {\n $scope.address = result;\n $scope.prefilled = true;\n $scope.showAddressFields = true;\n\n (0, _angular.$timeout)(function () {\n var value = $scope.address && $scope.address.state;\n var $option = $el.find('[value=\"' + value + '\"]');\n\n $option.prop('selected', 'selected');\n $option.trigger('change');\n value = $option.attr('label');\n }, 500);\n }\n });\n };\n\n $scope.updateAddress = function () {\n var newBilling = new _fi.$BillingAddressModel({\n line1: $scope.address.line1,\n line2: $scope.address.line2,\n city: $scope.address.city,\n state: $scope.address.state,\n postal_code: $scope.address.postal_code,\n normalization_status: $scope.address.normalization_status,\n country: country,\n id: '0'\n });\n\n return newBilling.save({\n data: $scope.billingAddress,\n success: function success() {\n if ($scope.normalize) {\n // set to false so that html related to billing address is hidden when child is shown\n $scope.billing = false;\n $scope.address.full_address = newBilling.full_address;\n _uiRouter.$state.go('.addressNormalization');\n } else {\n $scope.updateBillingAddressAndReturn('^.addCard', newBilling);\n }\n },\n validation: function validation(res) {\n return handleValidation(res);\n }\n });\n };\n\n $scope.uponNormalization = function (normalizedAddress, isBack) {\n if (isBack) {\n $scope.billing = true;\n _uiRouter.$state.go('^');\n } else {\n $scope.updateBillingAddressAndReturn('^.^.addCard', normalizedAddress);\n }\n };\n\n $scope.updateBillingAddressAndReturn = function (target, address) {\n var newBillingAddress = void 0;\n\n if (address && address instanceof _fi.$BillingAddressModel) {\n newBillingAddress = address;\n } else {\n newBillingAddress = new _fi.$BillingAddressModel({\n line1: address.line1,\n line2: address.line2,\n city: address.city,\n state: address.state,\n postal_code: address.postal_code,\n normalization_status: address.normalization_status,\n country: address.country || $scope.country,\n full_address: address.full_address || $scope.address.full_address,\n id: '0'\n });\n }\n\n var addresses = $scope.billingAddresses && $scope.billingAddresses.addresses;\n\n if (!isUserInputtedAddress(addresses[0])) {\n addresses.unshift(newBillingAddress);\n } else {\n addresses[0] = newBillingAddress;\n }\n $scope.billingaddressupdated.value = true;\n $scope.done(target);\n };\n\n // page transition after the page is loaded\n var el = $('.tokenization #sidepageAddCard');\n\n if (el) {\n el.addClass('slideLeft');\n }\n });\n }]\n };\n});\n\n_angular.$timeout;\n\n_uiRouter.$state;\n\n_uiRouter.$stateParams;\n\n_logger.$logger;\n\n_squid.$feature;\n\n_squid.$locale;\n\n_squid.$meta;\n\n_squid.$populate;\n\n_address.$PrefillAddressModel;\n\n_checkout.$FlowEligibilityModel;\n\n_fi.$BillingAddressesModel;\n\n_fi.$BillingAddressModel;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/addbilling/route.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module, __dirname, __filename) {\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-address-components/src/add-address/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-address-components/src/address-normalization/route.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/addbilling/directive.js\");\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$AddBillingRoute', function () {\n return _squid.$ComponentRoute.extend('AddBillingRoute', {\n name: 'addBilling',\n directive: 'xo-add-billing',\n titleContent: 'addBillingAddress.title',\n query: ['flow_type'],\n trackingData: {\n fptiState: 'edit_billing'\n },\n loginRequired: true,\n children: [{\n name: '$AddressNormalizationRoute',\n attributes: {\n id: 'token',\n sidebar: 'sidebar',\n address: 'address',\n 'done-fn': 'uponNormalization'\n }\n }]\n });\n});\n\n_squid.$ComponentRoute;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/webpack/buildin/module.js\")(module), \"../node_modules/xo-wallet-components/src/add-card/addbilling\", \"../node_modules/xo-wallet-components/src/add-card/addbilling/route.js\"))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/addbilling/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
    \\n \\n\\n \\n\\n

    {{ content('addBillingAddress.title') }}

    \\n\\n
    \\n
    \\n
    \\n \\n
    \\n\\n \\n
    \\n
    \\n
    \\n
    \\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/addcard/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function($) {\n\n__webpack_require__(\"../node_modules/xo-angular-ui-utils/ui-utils.min.js\");\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _uiRouter = __webpack_require__(\"../node_modules/angular-ui-router/release/angular-ui-router.min.js\");\n\nvar _logger = __webpack_require__(\"../node_modules/xo-beaver/dist/logger.js\");\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _auth = __webpack_require__(\"../node_modules/xo-models/src/auth/index.js\");\n\nvar _choice = __webpack_require__(\"../node_modules/xo-models/src/choice/index.js\");\n\nvar _newMember = __webpack_require__(\"../node_modules/xo-models/src/newMember/index.js\");\n\nvar _index = __webpack_require__(\"../node_modules/xo-models/src/app/index.js\");\n\nvar _fi = __webpack_require__(\"../node_modules/xo-models/src/fi/index.js\");\n\nvar _index2 = __webpack_require__(\"../node_modules/xo-models/src/checkout/index.js\");\n\nvar _checkoutIncentive = __webpack_require__(\"../node_modules/xo-models/src/checkoutIncentive/index.js\");\n\n__webpack_require__(\"../node_modules/xo-page-components/src/aside-header/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-page-components/src/notYou/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-tray-height/dist/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/accessibility/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/address-box/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/banner/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/dropdown/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/error-tooltip/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/message/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/user-assist-banner/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-form-components/src/phone/phoneInput/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/creditcard-input/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/three-ds/directive.js\");\n\nvar _util = __webpack_require__(\"../node_modules/xo-wallet-components/src/fi-contingency-list/util.js\");\n\nvar _cardMetaData = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cardMetaData/index.js\");\n\nvar _factory = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/addcard/factory.js\");\n\nvar _factory2 = __webpack_require__(\"../node_modules/xo-member-components/src/no-balance/factory.js\");\n\nvar _constants = __webpack_require__(\"../node_modules/xo-wallet-components/src/three-ds/constants.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/addcard/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoAddCard', function () {\n return {\n template: _template2['default'],\n scope: {\n token: '=?',\n done: '=?',\n messagetitle: '=?',\n message: '=?',\n pagetitle: '=?',\n sidebar: '=?',\n showmeftsection: '=?',\n hideparenthead: '=?',\n billingaddressupdated: '=?',\n cardmodel: '=?',\n parentCallbacks: '=?',\n selectedPromotionCardType: '=?',\n promotion: '=?',\n pageLevel: '=?',\n logout: '=?',\n phone: '=?',\n manageCardFlow: '=?',\n showCancel: '=?',\n showSetPreferredFi: '=?',\n onSuccess: '=?',\n backUri: '=?',\n showIncentive: '=?',\n incentiveAmount: '=?',\n updateCardCpa: '=?',\n cause: '=?'\n },\n controller: ['$scope', '$element', function ($scope, $element) {\n\n $scope.isCPAEligible = $scope.cause === 'cpa';\n $scope.address_box = {\n changeFn: function changeFn(type) {\n _logger.$logger.info('xo-address-box_changeFn - ' + type);\n _uiRouter.$state.go('^.addBilling', {\n flow_type: 'edit'\n });\n }\n };\n\n // Ensure no incentive-related actions are taken unless\n // explicityly passed 'true' from the xo-add-card page\n // Also ensure there are no duplicate titles\n $scope.showIncentive = Boolean($scope.showIncentive);\n var isNoBalanceEligible = _factory2.$NoBalanceFactory.get().eligible;\n\n $scope.showPageTitle = Boolean($scope.pagetitle && !($scope.isNmjDesign2 || $scope.isNmjDesign3) && !isNoBalanceEligible);\n $scope.showMessageTitle = Boolean($scope.messagetitle);\n $scope.showMessageBanner = !$scope.sidebar && !$scope.showIncentive && !isNoBalanceEligible;\n $scope.showNoBalanceHeaderAndNoFiContingency = isNoBalanceEligible && _uiRouter.$stateParams.message === 'NEED_CREDIT_CARD';\n\n (0, _squid.$populate)($scope, {\n cart: _index2.$CheckoutCartModel.instance($scope.token),\n auth: _auth.$AuthModel.instance(),\n billingAddresses: _fi.$BillingAddressesModel.instance(),\n checkoutSession: _index2.$CheckoutSessionModel.instance($scope.token).retrieve({\n contingencies: {\n NEED_CREDIT_CARD: angular.noop,\n EXPIRED_CREDIT_CARD: angular.noop\n }\n }),\n flowEligibility: _index2.$FlowEligibilityModel.instance($scope.token).retrieve({\n params: {\n geolocation: _squid.$meta.geolocation,\n localeCountry: _squid.$locale.country\n }\n }),\n tokenizedWalletInfoModel: _index.$TokenizedWalletInfoModel.instance($scope.token).retrieve(),\n checkoutAppData: _index2.$CheckoutAppDataModel.instance($scope.token).retrieve()\n }).then(function () {\n if ($scope.auth) {\n $scope.formattedNameInformal = (0, _squid.formatNameInformal)({\n first_name: $scope.auth.first_name,\n last_name: $scope.auth.last_name\n }) || $scope.auth.email;\n }\n\n $scope.isIndiaAndBilling = _squid.$locale.country === 'IN' && $scope.cart.isBilling() && $scope.checkoutAppData.get('merchant.merchant_country', 'US') === 'IN';\n\n var isCreditDisallowedForMerchant = $scope.checkoutSession && $scope.checkoutSession.isCreditDisallowedForMerchant;\n if (!$scope.sidebar && isCreditDisallowedForMerchant) {\n $scope.pagetitle = _squid.$locale.content.get('addCard.addBankDebitCard');\n $scope.showPageTitle = true;\n }\n\n $scope.headingTextKey = function () {\n if ($scope.updateCardCpa) {\n return 'addCard.updateCardCPA';\n } else if (isCreditDisallowedForMerchant) {\n return 'addCard.addBankDebitCard';\n } else if ($scope.cart.isConsumerCountry('IN') && $scope.cart.isBilling()) {\n\n if ($scope.cart.isRecurringPayment() || $scope.checkoutAppData.is_wps_flow()) {\n return 'asideHeader.not.immediate.addCreditCard';\n } else if ($scope.cart.isReferenceTransaction()) {\n\n if ($scope.checkoutAppData.isMerchantCountry('IN')) {\n if ($scope.cart.isChargePatternImmediateOrDeferred()) {\n return 'asideHeader.immediate.addCard';\n } else {\n return 'asideHeader.not.immediate.addCreditCard';\n }\n } else {\n return 'asideHeader.not.immediate.addCreditCard';\n }\n }\n }\n\n return 'asideHeader.addCard';\n };\n\n _newMember.$NewMemberEligibility.instance().getVariant($scope.token).then(function (variant) {\n $scope.isNmj = !$scope.sidebar && variant && (variant === 'one_page' || variant === 'design_2' || variant === 'design_3');\n $scope.isNmjDesign1 = !$scope.sidebar && variant && variant === 'one_page';\n $scope.isNmjDesign2 = !$scope.sidebar && variant && variant === 'design_2';\n $scope.isNmjDesign3 = !$scope.sidebar && variant && variant === 'design_3';\n\n $scope.isGreyHeader = $scope.isNmjDesign2 || $scope.isNmjDesign3;\n\n if ($scope.isGreyHeader && $scope.message && $scope.message.msgs[0] && $scope.message.msgs[0].key === 'creditcard.errorExpiredCard') {\n $scope.message.msgs = null;\n $scope.isExpiredCard = true;\n }\n\n if ($scope.isNmj) {\n // Set Up AddBank Link\n $scope.disallowedInstruments = $scope.checkoutSession.get('fundingOptions').get('disallowedInstruments');\n var hasDisallowedBank = $scope.disallowedInstruments && $scope.disallowedInstruments.some(function (fi) {\n return fi.type === 'BANK';\n });\n $scope.showAddBank = (0, _squid.$feature)('enableExternalAddBank') && (!hasDisallowedBank || !$scope.disallowedInstruments);\n $scope.addBankUri = '/webapps/hermes/add-bank?token=' + $scope.token;\n _logger.$logger.info('external_addbank_' + ($scope.showAddBank ? 'enabled' : 'disabled'));\n }\n\n if ($scope.isNmjDesign1) {\n\n var contentKey = {\n header: '',\n body: ''\n };\n\n if ($scope.disallowedInstruments && $scope.disallowedInstruments.length === 1) {\n contentKey.header = 'addCard.assistHeaderHasDisallowedFi';\n contentKey.body = 'addCard.assistBodySingleDisallowedFi';\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_single_disallowed_FI_addcard_msg'\n });\n } else if ($scope.disallowedInstruments && $scope.disallowedInstruments.length > 1) {\n contentKey.header = 'addCard.assistHeaderHasDisallowedFi';\n contentKey.body = 'addCard.assistBodyMultiDisallowedFi';\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_multi_disallowed_FI_addcard_msg'\n });\n } else {\n contentKey.header = 'addCard.assistHeader';\n contentKey.body = 'addCard.assistBody';\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_has_no_FI_addcard_msg'\n });\n }\n\n $scope.contentKey = contentKey;\n }\n\n if ($scope.isNmjDesign2 || $scope.isNmjDesign3) {\n var headerMsg = void 0;\n var userName = $scope.auth.first_name ? $scope.auth.first_name : $scope.auth.email;\n\n if ($scope.isExpiredCard) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgExpiredCard', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_expired_card_addcard_msg'\n });\n } else if ($scope.disallowedInstruments && $scope.disallowedInstruments.length === 1 && $scope.showAddBank) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgHasDisallowedShowBankLink', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_single_disallowed_FI_show_addbank_link_addcard_msg'\n });\n } else if ($scope.disallowedInstruments && $scope.disallowedInstruments.length === 1 && !$scope.showAddBank) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgHasDisallowedHideBankLink', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_single_disallowed_FI_hide_addbank_link_addcard_msg'\n });\n } else if ($scope.disallowedInstruments && $scope.disallowedInstruments.length > 1 && $scope.showAddBank) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgHasMultiDisallowedShowBankLink', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_multi_disallowed_FI_show_addbank_link_addcard_msg'\n });\n } else if ($scope.disallowedInstruments && $scope.disallowedInstruments.length > 1 && !$scope.showAddBank) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgHasMultiDisallowedHideBankLink', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_multi_disallowed_FI_hide_addbank_link_addcard_msg'\n });\n } else if ($scope.showAddBank) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgNoFiShowAddBank', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_has_no_FI_show_addbank_link_addcard_msg'\n });\n } else {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgNoFiHideAddBank', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_has_no_FI_hide_addbank_link_addcard_msg'\n });\n }\n $scope.headerMsg = headerMsg;\n }\n });\n\n return _choice.$ChoiceEligibility.instance().getVariant($scope.token).then(function (variant) {\n var multipleFiVariants = _squid.$config.choiceExperiment && _squid.$config.choiceExperiment.multipleFi || [];\n\n if (multipleFiVariants.indexOf(variant) !== -1) {\n $scope.showMultipleFI = true;\n }\n });\n }).then(function () {\n\n var logObj = {\n 'from': 'ADD_CARD',\n 'to': 'prepare_ADD_CARD',\n 'context_id': $scope.token,\n 'contingency_type': _uiRouter.$stateParams.message ? 'system_intiated' : 'user_intiated'\n };\n\n if ($scope.cart.isWalletTokenization()) {\n Object.assign(logObj, {\n 'context_type': 'BA-Token',\n 'ba_token': _squid.$meta.baToken\n });\n }\n\n _logger.$logger.info('checkout_fpti', logObj);\n\n $scope.debitCardFlow = angular.isArray($scope.flowEligibility.paymentCardProductClass) && $scope.flowEligibility.paymentCardProductClass.length === 1 && $scope.flowEligibility.paymentCardProductClass[0] === 'DEBIT';\n\n if ($scope.showmeftsection) {\n $scope.showmeftsection.toggle = true;\n }\n\n if ($scope.hideparenthead) {\n $scope.hideparenthead.toggle = false;\n }\n\n $scope.manageCardFlow = $scope.sidebar && $scope.cardmodel.card.isExisting();\n\n var type = $scope.selectedPromotionCardType && $scope.selectedPromotionCardType.type;\n\n if ($scope.checkoutSession.plccOffer && !type && $scope.promotion) {\n _uiRouter.$state.go('^.selectCard');\n }\n\n $scope.showplcc = type === 'plcc';\n $scope.country = _squid.$locale.country;\n\n $scope.showNotYou = $scope.auth.is_auth_api_call && _squid.$util.param('source') !== 'consumerApp';\n\n $scope.showHiMsg = Boolean($scope.messagetitle);\n\n $scope.cardmodel.cardType = 'creditCard';\n\n if ($scope.checkoutSession.plccOffer && $scope.showplcc) {\n $scope.cardmodel.cardType = 'privateLabel';\n $scope.cardmodel.sponsor_id = $scope.checkoutSession.plccOffer.sponsor_id;\n }\n\n $scope.cardmodel.user = {\n first_name: $scope.auth.first_name,\n last_name: $scope.auth.last_name\n };\n\n $scope.cardmodel.address = $scope.billingAddresses.addresses[0];\n\n if ($scope.billingaddressupdated.value) {\n $scope.billingaddressupdated = {\n msgs: [_squid.$locale.content.get('editCard.newAddressAdded')],\n type: 'success',\n value: true\n };\n }\n\n $scope.showSidebarBackArrow = $scope.sidebar && !$scope.debitCardFlow && !$scope.checkoutSession.plccOffer && !$scope.cardmodel.card.isExisting();\n $scope.backUri = $scope.backUri || ($scope.showMultipleFI ? 'checkout.review' : 'checkout.review.sidebar.wallet');\n $scope.manageCardFlowBackUri = $scope.backUri || ($scope.showMultipeFI ? 'checkout.review.sidebar.sidebarManageWallet' : 'checkout.review.sidebar.wallet');\n _factory.$AddCardFactory.shouldDisplayAddressBox($scope.isNmjDesign1, $scope.cardmodel, false).then(function (result) {\n $scope.displayAddressBox = result;\n });\n\n $scope.gotoBilling = function (address) {\n if ($scope.pageLevel) {\n $scope.pageLevel.message = null;\n }\n if (!address) {\n if (_squid.$locale.country === 'BR') {\n $scope.parentCallbacks.showCep();\n } else {\n // page transition\n var el = $('.tokenization #sidepageAddCard');\n\n if (el) {\n el.addClass('slideLeft');\n }\n _uiRouter.$state.go('^.addBilling');\n }\n }\n };\n\n $scope.isUPOP = function () {\n /*\n * we do have a BIN lookup for C2 country to FIMS\n * if that fails\n * a) buyer selects card type from dropdown and it could be CUP\n * b) and we are not going to get isUpop from FIMS , but C2 CUP is always upop card\n * if that success\n * a) card can be of type VISA or CUP for dual cards\n * b) and we need to show dropdown for buyer to choose the card, eventhough we default to VISA\n * c) even though VISA selected , it is UPOP card\n * if that success\n * a) card be of type CUP and AMEX for dual cards\n * b) we don't show dropdown but default to CUP\n * c) here both CUP and UPOP is true\n *\n * so checking either CUP or UPOP (for VISA)\n * and yes only for OTP enabled country (C2 for now)\n */\n var needOTPForAddCard = (0, _squid.$feature)('needOTPForAddCard');\n var isCUP = $scope.cardmodel.card && $scope.cardmodel.card.type && $scope.cardmodel.card.type === 'CUP';\n var isUpop = $scope.cardmodel.card && $scope.cardmodel.card.isUpop;\n return needOTPForAddCard && isCUP && isUpop;\n };\n\n $scope.isUpdateDebitCard = function () {\n return _uiRouter.$stateParams.message === 'EXPIRED_DEBIT_CARD';\n };\n\n $scope.flag = function (field) {\n // pass country to decide card for a country\n return _cardMetaData.$CardMetaData.getMetaData($scope.cardmodel.card, field, _squid.$locale.country);\n };\n\n $scope.buttonText = function () {\n if ($scope.updateCardCpa) {\n return 'creditcard.updateBtn';\n }\n if ($scope.debitCardFlow) {\n return 'creditcard.saveBtn';\n }\n\n var contentString = 'creditcard.addBtn';\n\n if ($scope.cardmodel.card.isExisting()) {\n contentString = 'creditcard.updateBtn';\n } else if ($scope.isUPOP()) {\n contentString = 'creditcard.continuetext';\n }\n return contentString;\n };\n\n $scope.cardTypeChanged = function () {\n $scope.phone.phoneType = $scope.flag('phoneType');\n };\n\n function addErrorMessage(contentKey) {\n if (contentKey) {\n contentKey = angular.isArray(contentKey) ? contentKey[0] : contentKey;\n var message = _squid.$locale.content.get('creditcard.' + contentKey);\n\n $scope.message.msgs.push(message);\n }\n }\n\n function handleContingencies(result, contentBundle, defaultErrorKey, prop) {\n var errorData = void 0;\n\n if (result.errorCodes) {\n errorData = result;\n } else {\n errorData = {\n errorCodes: result && [result['0']]\n };\n }\n $scope.message = _util.$fiErrorUtil.addPageErrors(errorData, contentBundle, prop, defaultErrorKey);\n\n if (window.scrollTo) {\n window.scrollTo(0, 0);\n }\n }\n\n var handleFIContingency = function handleFIContingency(contingency, body) {\n var contingencyName = body.contingencyName,\n errorDetails = body.errorDetails;\n\n var errorProperty = void 0;\n var invalidModels = [];\n var defaultError = 'INTERNAL_ERROR';\n\n if ($scope.sidebar) {\n $scope.$emit('SidebarError');\n }\n\n // for certain contingencies the error message is specific to the type of Checkout flow\n switch (contingencyName) {\n case 'CARD_BRAND_NOT_SUPPORTED':\n case 'CARD_NOT_ALLOWED':\n case 'CARD_NUMBER_WITH_BAD_BIN':\n case 'CUP_CARD_NOT_ALLOWED':\n var flowType = _squid.$config.checkoutFlowType;\n errorProperty = contingencyName + '_' + flowType;\n break;\n case 'VALIDATION_ERROR':\n defaultError = 'VALIDATION_ERROR_GENERIC';\n\n // highlight the fields mentioned in the validation_error response as invalid\n var _$fiErrorUtil$mapVali = _util.$fiErrorUtil.mapValidationErrorToModel(errorDetails.invalidFields);\n\n errorProperty = _$fiErrorUtil$mapVali.errorProperty;\n invalidModels = _$fiErrorUtil$mapVali.invalidModels;\n _util.$fiErrorUtil.highlightInvalidFields(invalidModels, $element);\n break;\n default:\n errorProperty = contingencyName;\n break;\n }\n\n $scope.billingaddressupdated.value = false;\n $scope.message = _util.$fiErrorUtil.addPageErrorByErrorName('addCardFIErrors', errorProperty, defaultError);\n\n var fpti_payload = {\n 'from': 'ADD_CARD',\n 'to': 'process_ADD_CARD',\n 'context_id': $scope.token,\n 'int_error_code': errorProperty,\n 'int_error_description': errorDetails,\n 'error_source': 'filifecycleserv'\n };\n\n if ($scope.cart.isWalletTokenization()) {\n Object.assign(fpti_payload, {\n 'context_type': 'BA-Token',\n 'ba_token': _squid.$meta.baToken\n });\n }\n\n _logger.$logger.info('checkout_fpti', fpti_payload);\n\n if (window.scrollTo) {\n window.scrollTo(0, 0);\n }\n\n if (errorDetails && errorDetails.invalidFields && errorDetails.invalidFields[0] === 'BILLING_ADDRESS') {\n return _factory.$AddCardFactory.shouldDisplayAddressBox($scope.isNmjDesign1, $scope.cardmodel, true).then(function (result) {\n $scope.displayAddressBox = result;\n });\n }\n };\n\n $scope.cancelFn = function () {\n // Use callback provided by parent route if there\n if ($scope.parentCallbacks.cancel) {\n return $scope.parentCallbacks.cancel();\n }\n\n // For multiple FI variant, route back to review page\n if ($scope.showMultipleFI) {\n if ($scope.manageCardFlow) {\n return _uiRouter.$state.go('checkout.review.sidebar.sidebarManageWallet');\n }\n return _uiRouter.$state.go('checkout.review');\n }\n\n if ($scope.sidebar) {\n if (!$scope.checkoutSession.plccOffer) {\n return _uiRouter.$state.go('checkout.review.sidebar.wallet');\n } else {\n return _uiRouter.$state.go('^.selectCard');\n }\n }\n $scope.done();\n };\n\n function initiateOTP() {\n var resolveOTP = new _fi.$ResolveOTP({ id: $scope.cardmodel.id });\n\n return resolveOTP.action('init', {\n data: {\n phone: {\n country_code: $scope.phone.IntDialingCountryCode,\n number: $scope.phone.telephone\n }\n },\n resultModel: {},\n success: function success() {\n return _uiRouter.$state.go('.confirmUpop');\n },\n error: function error() {\n return handleContingencies({}, 'confirmUpop', 'declineMessage');\n },\n contingencies: {\n INIT_OTP_CONTINGENCY: function INIT_OTP_CONTINGENCY(name, result) {\n // prop for last 4 digits of card in error message\n var prop = {\n number: $scope.cardmodel && $scope.cardmodel.card && $scope.cardmodel.card.last4()\n };\n\n handleContingencies(result, 'confirmUpop', 'declineMessage', prop);\n _util.$fiErrorUtil.addFieldErrors(result, $element);\n },\n DEFAULT: function DEFAULT() {\n return handleContingencies({}, 'confirmUpop', 'declineMessage');\n }\n }\n });\n }\n\n function handleCheckoutSession(result, isNewCard) {\n if ($scope.cardmodel && $scope.cardmodel.cardType === 'privateLabel') {\n delete $scope.checkoutSession.plccOffer;\n }\n\n delete $scope.checkoutSession.errorData;\n\n var cardAdded = $scope.cardmodel && $scope.cardmodel.card;\n var numberAdded = void 0;\n var cardTypeAdded = void 0;\n\n if (cardAdded) {\n numberAdded = angular.isString(cardAdded.number) && cardAdded.number.replace(/\\s/g, '');\n cardTypeAdded = cardAdded.type;\n }\n\n var last4Added = angular.isString(numberAdded) && numberAdded.substr(numberAdded.length - 4);\n var cvvData = $scope.checkoutSession && $scope.checkoutSession.cvvData;\n var last4ToUse = void 0;\n var cardTypeToUse = void 0;\n\n if (cvvData) {\n last4ToUse = cvvData.number;\n cardTypeToUse = cvvData.type;\n }\n\n if (last4ToUse === last4Added && cardTypeAdded === cardTypeToUse) {\n $scope.checkoutSession.set('cvvData.security_code', $scope.cardmodel.get('card.security_code'));\n $scope.checkoutSession.set('cvvData.lastAddedCard', true);\n }\n\n var updateCardSidebarMessage = (0, _squid.$renderContent)('wallet.cardUpdated', {\n type: cardTypeAdded,\n number: last4Added\n });\n var updateCardPageMessage = (0, _squid.$renderContent)('smallToolTip.cardUpdated');\n var addCardMessage = (0, _squid.$renderContent)($scope.updateCardCpa ? 'addCard.updateCardCPASuccess' : 'smallToolTip.cardAdded');\n var msgs = [addCardMessage];\n var createdOffer = Boolean($scope.createOfferModel && $scope.createOfferModel.createdOffer());\n\n if (createdOffer) {\n var createdOfferMessage = (0, _squid.$renderContent)('smallToolTip.incentiveCreated', {\n incentiveAmount: $scope.incentiveAmount\n });\n\n msgs = [createdOfferMessage];\n } else if (!isNewCard) {\n msgs = $scope.manageCardFlow ? [updateCardSidebarMessage] : [updateCardPageMessage];\n }\n\n $scope.checkoutSession.message = {\n type: 'success',\n msgs: msgs\n };\n // in case user saw No Balance banner and added card successfully - prevent showing the same banner on the review page\n _factory2.$NoBalanceFactory.markAsAlreadyShown();\n $scope.done();\n }\n\n var is3DSRequried = function is3DSRequried(result) {\n return result && result.confirmation && result.confirmation.is3DSrequired || false;\n };\n\n var initiate3DS = function initiate3DS(data) {\n var confirmation = data && data.confirmation && data.confirmation.three_ds_confirmation_details;\n\n var supplement = confirmation.supplemental_data_details;\n\n $scope.threeDSData = {\n cardBin: supplement.bank_identification_number,\n networkLogo: supplement.network_logo,\n ddsUrl: supplement.device_data_collection_url,\n jwtInfo: {\n jwtIssuer: supplement.jwt_issuer,\n jwtOrgUnitId: supplement.jwt_org_unit_id,\n jwtDuration: supplement.jwt_duration\n },\n initiate3dsData: {\n fundingId: $scope.cardmodel.id,\n confirmationMethod: 'ONLINE_SECURE_AUTHENTICATION',\n bypassConfirmationProcess: false,\n referenceId: confirmation.reference_id,\n cvv: $scope.cardmodel.get('card.security_code')\n },\n integrationType: 'ADD_CARD'\n };\n $scope.showThreedsPopup = true;\n };\n\n $scope.hideModal = function () {\n $scope.oncomplete3ds('USER_CANCELED');\n };\n\n // call on submit and on resolving contingency 3ds\n // default threeDSStatus as false, this is required to pass the addCard 3DS resolution data to symphony,\n // symphony will then inform about the status to risk to avoid 3DS contingency again during planning\n var onCardSaveSuccess = function onCardSaveSuccess() {\n var threeDSStatus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var isNewCard = $scope.isNewCard;\n if ($scope.cart.isWalletTokenization()) {\n var fpti_payload = {\n 'from': 'ADD_DEBIT_CARD',\n 'to': 'process_ADD_debit_card',\n 'context_id': $scope.token,\n 'context_type': 'BA-Token',\n 'ba_token': _squid.$meta.baToken,\n 'fi_id': $scope.cardmodel.id\n };\n var handleNotifyChangeContingency = function handleNotifyChangeContingency(name) {\n fpti_payload.int_error_desc = name + '_addedButCannotUse';\n fpti_payload.error_source = 'paymentapiplatformserv';\n fpti_payload.int_error_code = name;\n _logger.$logger.info('tokenized_wallet', fpti_payload);\n if ($scope.message) {\n $scope.message.msgs = [];\n $scope.message.type = 'info';\n }\n addErrorMessage('addedButCannotUse');\n };\n\n $scope.checkoutSession.fundingOptions.action('notifyChange', {\n resultModel: $scope.checkoutSession,\n data: {\n planId: $scope.cardmodel.id,\n operation: 'ADDED'\n },\n success: function success(result) {\n _logger.$logger.info('tokenized_wallet', fpti_payload);\n handleCheckoutSession(result, isNewCard);\n },\n contingencies: {\n NOTIFY_CHANGE_FUNDING_CONTINGENCY: handleNotifyChangeContingency\n }\n });\n } else {\n var _fpti_payload = {\n 'from': 'ADD_CARD',\n 'to': 'process_ADD_CARD',\n 'context_id': $scope.token,\n 'context_type': _squid.$integration.isFlow('WPS') ? 'WPS-token' : 'EC-token',\n 'fi_id': $scope.cardmodel.id\n };\n\n _logger.$logger.info('checkout_fpti', _fpti_payload);\n\n return _angular.$q.when().then(function () {\n // setPreferredFI checkbox is checked\n if ($scope.showSetPreferredFi && $('#makeFiPreferred').is(':checked')) {\n _logger.$logger.info('set_preferredFI_checked');\n\n // set preferred FI before updating\n var preferredFi = new _fi.$PreferredFi({\n preferred: [$scope.cardmodel.id]\n });\n\n return preferredFi.save({\n success: function success() {\n _logger.$logger.info('SET_PREFERREDFI_SUCCESS', {\n preferred: [$scope.cardmodel.id]\n });\n },\n transientError: true,\n error: function error(err) {\n return _logger.$logger.error('SET_PREFERREDFI_ERROR', { error: err });\n }, // log the error but fails silently because card is added\n contingencies: {\n DEFAULT: function DEFAULT(name, contingency) {\n return _logger.$logger.info('SET_PREFERREDFI_CONTINGENCY', name);\n }\n }\n });\n }\n }).then(function () {\n return (0, _angular.$q)(function (resolve, reject) {\n if ($scope.showIncentive) {\n var fptiData = {\n from: 'FI_addCardAccount',\n to: 'process_FI_addCardAccount_incentive',\n add_incentive: 0,\n context_id: $scope.token,\n add_incentive_reason: ''\n };\n\n (0, _squid.$populate)($scope, {\n evaluateCheckoutOfferEligibilityModel: _checkoutIncentive.$EvaluateCheckoutOfferEligibilityModel.instance().retrieve(),\n getOfferProgramModel: _checkoutIncentive.$GetOfferProgramModel.instance().retrieve()\n }).then(function () {\n var createOfferData = {\n payer_id: $scope.auth.buyer_id,\n offer_program_id: $scope.evaluateCheckoutOfferEligibilityModel.getOfferProgramID(),\n value_issued: $scope.getOfferProgramModel.getOfferValueLowestDenom(),\n currency_code: $scope.evaluateCheckoutOfferEligibilityModel.getCurrencyCode()\n };\n\n $scope.createOfferModel = _checkoutIncentive.$CreateOfferModel.instance();\n\n return $scope.createOfferModel.save({\n data: createOfferData,\n success: function success() {\n if ($scope.createOfferModel.createdOffer()) {\n fptiData.incentive_added = 1;\n _logger.$logger.info('checkout_fpti', fptiData);\n resolve('Incentive created');\n } else {\n fptiData.add_incentive_reason = 'Offerserv_User_Not_Eligible';\n _logger.$logger.info('checkout_fpti', fptiData);\n resolve('Incentive not created');\n }\n },\n validation: function validation(_validation) {\n fptiData.add_incentive_reason = 'Validation_Error';\n _logger.$logger.info('checkout_fpti', fptiData);\n resolve('Validation error encountered creating incentive');\n },\n contingencies: {\n DEFAULT: function DEFAULT(msg, contingency) {\n fptiData.add_incentive_reason = msg;\n _logger.$logger.info('checkout_fpti', fptiData);\n resolve('Contingency encountered creating incentive');\n }\n },\n error: function error() {\n fptiData.add_incentive_reason = 'Offerserv_Error';\n _logger.$logger.info('checkout_fpti', fptiData);\n resolve('Error encountered creating incentive');\n }\n });\n });\n } else {\n resolve('Not eligible for incentive');\n }\n });\n }).then(function () {\n if ($scope.isUPOP()) {\n initiateOTP();\n } else {\n return $scope.checkoutSession.fundingOptions.action('update', {\n resultModel: $scope.checkoutSession,\n data: {\n planId: $scope.cardmodel.id,\n threeDSResolved: threeDSStatus\n },\n success: function success(result) {\n return handleCheckoutSession(result, isNewCard);\n }\n });\n }\n });\n }\n };\n\n /**\n threeDS.usercanceled=Confirmation canceled. Try again later or choose another way to pay.\n threeDS.authentionFailed=Your Bank wasn’t able to confirm your {cardType}-{last4}. Try a different card or contact your card issuer.\n threeDS.lookupFailed=Your card issuer wasn’t able to confirm your card. Try again later or choose another way to pay.\n threeDS.systemError=Sorry, we weren’t able to add this card. Try a different card or contact your card issuer.\n */\n $scope.oncomplete3ds = function (status) {\n $scope.showThreedsPopup = false;\n if (status === _constants.STATUS_SUCCESS) {\n onCardSaveSuccess(true);\n } else if (status === _constants.STATUS_API_ERROR || status === _constants.STATUS_DECLINE) {\n var key = 'threeDS.memberDecline';\n var card4 = $scope.cardmodel && $scope.cardmodel.card && $scope.cardmodel.card.last4();\n var cardType = $scope.cardmodel && $scope.cardmodel.card.type;\n\n $scope.message = {\n type: 'warning',\n msgs: []\n };\n\n $scope.message.msgs.push((0, _squid.$renderContent)(key, {\n cardType: cardType,\n last4: card4\n }));\n }\n };\n\n $scope.onSubmit = function () {\n if ($scope.pageLevel) {\n $scope.pageLevel.message = null;\n }\n $scope.isNewCard = !$scope.cardmodel.card.isExisting();\n\n if ($scope.isNewCard) {\n delete $scope.cardmodel.id;\n }\n\n if ($('#plccAgree').is(':checked')) {\n $scope.cardmodel.preference = true;\n }\n\n // Only initiateOTP needs to be called for unconfirmed CUP contingency. Add card call does not need to be made.\n if ($scope.isUPOP() && $scope.cardmodel.id && ($scope.checkoutSession.get('errorData.cause') === 'NEED_AUTHENTICATED_CARD' || $scope.checkoutSession.get('errorData.cause') === 'EXPIRED_CREDIT_CARD')) {\n\n initiateOTP();\n } else {\n $scope.cardmodel.save({\n success: function success(result) {\n if (is3DSRequried(result)) {\n initiate3DS(result);\n } else {\n onCardSaveSuccess();\n }\n },\n contingencies: {\n DEFAULT: handleFIContingency\n },\n error: function error() {\n return handleContingencies({}, 'creditcard', 'errorInternalError');\n }\n });\n }\n };\n });\n }]\n };\n});\n_angular.$q;\n\n_uiRouter.$state;\n\n_uiRouter.$stateParams;\n\n_logger.$logger;\n\n_squid.$config;\n\n_squid.$feature;\n\n_squid.$locale;\n\n_squid.$meta;\n\n_squid.$populate;\n\n_squid.$renderContent;\n\n_squid.$util;\n\n_squid.formatNameInformal;\n\n_squid.$integration;\n\n_auth.$AuthModel;\n\n_choice.$ChoiceEligibility;\n\n_newMember.$NewMemberEligibility;\n\n_index.$TokenizedWalletInfoModel;\n\n_fi.$BillingAddressesModel;\n\n_fi.$PreferredFi;\n\n_fi.$ResolveOTP;\n\n_index2.$CheckoutAppDataModel;\n\n_index2.$CheckoutCartModel;\n\n_index2.$CheckoutSessionModel;\n\n_index2.$FlowEligibilityModel;\n\n_checkoutIncentive.$CreateOfferModel;\n\n_checkoutIncentive.$EvaluateCheckoutOfferEligibilityModel;\n\n_checkoutIncentive.$GetOfferProgramModel;\n\n_util.$fiErrorUtil;\n\n_cardMetaData.$CardMetaData;\n\n_factory.$AddCardFactory;\n\n_factory2.$NoBalanceFactory;\n\n_constants.STATUS_SUCCESS;\n\n_constants.STATUS_API_ERROR;\n\n_constants.STATUS_DECLINE;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/addcard/route.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module, __dirname, __filename) {\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _route = __webpack_require__(\"../node_modules/xo-wallet-components/src/confirm-upop/route.js\");\n\nvar _route2 = _interopRequireDefault(_route);\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/addcard/directive.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$AddCardRoute', function () {\n return _squid.$ComponentRoute.extend('AddCardRoute', {\n name: 'addCard',\n directive: 'xo-add-card',\n titleContent: 'asideHeader.addCard',\n\n trackingData: {\n fptiState: 'add_or_update_cc'\n },\n loginRequired: true,\n children: [{\n route: _route2['default'],\n attributes: {\n token: 'token',\n phone: 'phone',\n cardmodel: 'cardmodel',\n 'on-success': 'onSuccess',\n 'show-incentive': 'showIncentive',\n 'incentive-amount': 'incentiveAmount'\n }\n }]\n });\n});\n\n_squid.$ComponentRoute;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/webpack/buildin/module.js\")(module), \"../node_modules/xo-wallet-components/src/add-card/addcard\", \"../node_modules/xo-wallet-components/src/add-card/addcard/route.js\"))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/addcard/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\n
    \\n \\n
    \\n

    {{ content('asideHeader.updateCard', {type: cardmodel.card.name, number: cardmodel.card.lastDigits}) }}

    \\n \\n {{ content('common.back') }}\\n \\n
    \\n \\n

    \\n {{ content('creditcard.hi', {userName: auth.first_name ? auth.first_name : auth.email}) }}\\n \\n \\n \\n

    \\n

    {{ messagetitle }}

    \\n
    \\n \\n

    \\n {{ content('memberReview.hiUser_welcome', {userName: formattedNameInformal}) }}\\n \\n \\n \\n

    \\n
    \\n \\n \\n
    \\n
    \\n \\n

    \\n {{ headerMsg }}\\n \\n \\n \\n

    \\n
    \\n
    \\n \\n\\n \\n\\n \\n

    {{ pagetitle }}

    \\n\\n \\n
    \\n

    {{ content('asideHeader.selectCard') }}

    \\n

    {{ content('creditcard.noFIContingency') }}

    \\n
    \\n\\n
    \\n
    \\n
    \\n

    \\n {{ content('addCard.commonAddTopupDebitCard', { type: tokenizedWalletInfoModel.brandName() }) }}\\n

    \\n \\n \\n \\n\\n \\n\\n \\n \\n\\n
    \\n \\n
    \\n \\n
    \\n
    \\n\\n
    \\n
    \\n \\n
    \\n\\n \\n\\n
    \\n
    \\n \\n \\n
    \\n
    {{content('addCard.plccLegal', { merchant: promotion.name})}}
    \\n
    \\n\\n
    \\n
    \\n \\n \\n
    \\n
    {{content('addCard.makeFiPreferredLegal')}}\\n \\n
    \\n
    \\n\\n
    \\n \\n
    \\n\\n \\n
    \\n
    \\n
    \\n \\n \\n \\n \\n \\n \\n
    \\n
    \\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/cardExpiry/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function($) {\n\nexports.__esModule = true;\nexports.$xoCardExpiryDirective = undefined;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/tooltip/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/error-tooltip/directive.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cardExpiry/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar $xoCardExpiryDirective = exports.$xoCardExpiryDirective = _squid.$Component.extend('$xoCardExpiryDirective', {\n tag: 'xo-card-expiry',\n template: _template2['default'],\n props: {\n expiryMonth: {\n type: 'var',\n required: false\n },\n expiryYear: {\n type: 'var',\n required: false\n }\n },\n lifecycle: {\n enter: function enter() {\n var _this = this;\n\n var format = (0, _squid.$feature)('ccExpiryDateFormat', 'MMYY', _squid.$locale.country);\n var regexPattern = format === 'MMYY' ? /(0\\d|1[0-2])\\/(\\d{2})/ : /(0\\d|1[0-2])\\/(\\d{4})/;\n\n var init = function init() {\n if (_this.expiryMonth && _this.expiryYear) {\n _this.expiryDate = format === 'MMYY' ? _this.expiryMonth + '/' + _this.expiryYear.substring(2, 4) : _this.expiryMonth + '/' + _this.expiryYear;\n }\n };\n init();\n this.$watch('[expiryMonth, expiryYear]', function (expiryInfo) {\n if (expiryInfo && expiryInfo[0] && expiryInfo[1]) {\n _this.expiryMonth = expiryInfo[0];\n _this.expiryYear = expiryInfo[1];\n init();\n }\n });\n\n $('#expiry_value').mask(format === 'MMYY' ? '00/00' : '00/0000');\n\n this.validate = function (expiryDate) {\n if (!expiryDate) {\n return false;\n }\n\n var regexMatch = regexPattern.exec(expiryDate);\n if (!regexMatch) {\n return false;\n }\n\n var today = new Date();\n var currentYear = today.getFullYear();\n var expMonth = Number(regexMatch[1]);\n var expYear = Number(regexMatch[2]);\n\n if (format === 'MMYY') {\n // convert year from YY to YYYY format e.g currentYear = 2017, expYear = 20,\n // result should be (2020) = (2017 - 17 + 20)\n expYear = currentYear - currentYear % 100 + expYear;\n }\n\n var expDate = new Date(expYear, expMonth - 1);\n\n if (expDate < today) {\n return false;\n }\n\n _this.expiryYear = expYear.toString();\n\n // expiryMonth need to have leading 0 for single digit month\n _this.expiryMonth = expMonth < 10 ? '0' + expMonth : expMonth.toString();\n\n return true;\n };\n }\n }\n});\n\nangular.value(\"$xoCardExpiryDirective\", $xoCardExpiryDirective);\n_squid.$Component;\n\n_squid.$locale;\n\n_squid.$feature;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/cardExpiry/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
    \\n \\n
    \\n \\n \\n
    \\n
    \\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/cardIssueDate/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function($) {\n\nexports.__esModule = true;\nexports.$xoCardIssueDateDirective = undefined;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/tooltip/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/error-tooltip/directive.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cardIssueDate/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar $xoCardIssueDateDirective = exports.$xoCardIssueDateDirective = _squid.$Component.extend('$xoCardIssueDateDirective', {\n tag: 'xo-card-issue-date',\n template: _template2['default'],\n props: {\n issueMonth: {\n type: 'var',\n required: false\n },\n issueYear: {\n type: 'var',\n required: false\n }\n },\n lifecycle: {\n enter: function enter() {\n var _this = this;\n\n this.dateFormat = (0, _squid.$feature)('ccIssueDateDateFormat', 'MMYY', _squid.$locale.country);\n\n if (this.dateFormat === 'MMYY') {\n this.maxlength = 5;\n this.mask = '99/99';\n } else if (this.dateFormat === 'MMYYYY') {\n this.maxlength = 7;\n this.mask = '99/9999';\n }\n\n this.formatIssueDate = function (event) {\n var key = event.keyCode || event.charCode;\n var $el = $(event.target);\n var val = $el.val().replace(/[^0-9\\/]/gi, '');\n var strokes = val.length;\n\n // Ignore delete keys\n if (key === 8 || key === 46) {\n return;\n }\n\n // after two characters add a slash char\n if (strokes === 2) {\n val += '/';\n }\n\n _this.issueDate = val;\n $el.mask(_this.mask);\n };\n\n var currentYear = new Date().getFullYear();\n var validMonths = _squid.$util.map(_squid.$util.range(1, 13), function (num) {\n return ('0' + num).substr(-2);\n });\n var validYears = _squid.$util.map(_squid.$util.range(currentYear - 10, currentYear + 1), function (y) {\n return y.toString();\n });\n\n this.validate = function (issueDate) {\n if (!issueDate) {\n return;\n }\n\n var month = void 0,\n year = void 0,\n unformatted = void 0;\n var isValid = false;\n\n unformatted = issueDate.replace(/[^0-9]/gi, '');\n if (unformatted.length > 3) {\n month = unformatted.substring(0, 2);\n if (_this.dateFormat === 'MMYY') {\n year = currentYear.toString().substring(0, 2) + unformatted.substring(2, 4);\n } else if (_this.dateFormat === 'MMYYYY') {\n year = unformatted.substring(2, 6);\n }\n\n isValid = validMonths.indexOf(month) > -1 && validYears.indexOf(year) > -1;\n\n if (isValid) {\n var date = new Date(year, parseInt(month, 10) - 1);\n var today = new Date();\n isValid = date < today;\n }\n }\n\n _this.issueYear = year;\n _this.issueMonth = month;\n\n return isValid;\n };\n }\n }\n});\n\nangular.value(\"$xoCardIssueDateDirective\", $xoCardIssueDateDirective);\n_squid.$Component;\n\n_squid.$locale;\n\n_squid.$feature;\n\n_squid.$util;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/cardIssueDate/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
    \\n \\n \\n
    \\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/creditcard-input/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function($) {\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _logger = __webpack_require__(\"../node_modules/xo-beaver/dist/logger.js\");\n\nvar _checkout = __webpack_require__(\"../node_modules/xo-models/src/checkout/index.js\");\n\nvar _fi = __webpack_require__(\"../node_modules/xo-models/src/fi/index.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/directionality/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/error-tooltip/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/tooltip/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-form-components/src/name-input/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cardExpiry/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cardIssueDate/directive.js\");\n\nvar _cardMetaData = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cardMetaData/index.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cvv/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/dob/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-angular-ui-utils/ui-utils.min.js\");\n\nvar _index = __webpack_require__(\"../node_modules/xo-device-info/dist/index.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/creditcard-input/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('scrollToTop', function () {\n return {\n link: function link(scope, element, attr) {\n $(element).on('focus', function () {\n if ($('#mxCardTitle').is(':visible')) {\n $('#creditCardForm').scrollTop($(element).offset().top);\n }\n });\n }\n };\n}).directive('xoCreditCard', function () {\n return {\n template: _template2['default'],\n restrict: 'E',\n scope: {\n token: '=?',\n card: '=?',\n user: '=?',\n selectedPromotionCardType: '=?',\n promotion: '=?',\n cardTypeChanged: '=?',\n cardNumberChanged: '=?',\n manageCardFlow: '=?'\n },\n controller: ['$scope', function ($scope) {\n $scope.cardLengthValid = function (number) {\n if ($scope.card && $scope.card.isExisting()) {\n return true;\n }\n\n number = (number || '').replace(/[^0-9]+/g, '');\n\n return number.length >= $scope.flag('length.min') && number.length <= $scope.flag('length.max');\n };\n\n $scope.cardLuhnValid = function (input) {\n if (!$scope.flag('luhn')) {\n return true;\n }\n\n if ($scope.card && $scope.card.isExisting()) {\n return true;\n }\n\n input = (input || '').replace(/[^0-9]+/g, '');\n\n var numdigits = input.length;\n var parity = numdigits % 2;\n var sum = 0;\n var i = 0;\n var digit = void 0;\n\n for (; i < numdigits; i++) {\n digit = parseInt(input.charAt(i), 10);\n\n if (i % 2 === parity) {\n digit *= 2;\n }\n\n if (digit > 9) {\n digit -= 9;\n }\n\n sum += digit;\n }\n\n return sum % 10 === 0;\n };\n\n $scope.cardProductValid = function () {\n return $scope.debitCardFlow ? $scope.card.productType === 'DEBIT' : true;\n };\n\n $scope.isPlcc = $scope.selectedPromotionCardType && $scope.selectedPromotionCardType.type === 'plcc';\n\n $scope.flag = function (field) {\n if ($scope.isPlcc && !$scope.card.type) {\n $scope.card.type = 'PLCC';\n }\n // passing country to differentiate CUP for C2 and ROW\n return _cardMetaData.$CardMetaData.getMetaData($scope.card, field, _squid.$locale.country);\n };\n\n $scope.maxLength = function () {\n if ($scope.card && $scope.card.isExisting()) {\n return 30;\n }\n\n return $scope.flag('length.max') + $scope.flag('spaces.length');\n };\n\n (0, _squid.$populate)($scope, {\n flowEligibility: _checkout.$FlowEligibilityModel.instance($scope.token).retrieve({\n params: {\n geolocation: _squid.$meta.geolocation,\n localeCountry: _squid.$locale.country\n }\n })\n }).then(function () {\n $scope.debitCardFlow = angular.isArray($scope.flowEligibility.paymentCardProductClass) && $scope.flowEligibility.paymentCardProductClass.length === 1 && $scope.flowEligibility.paymentCardProductClass[0] === 'DEBIT';\n\n $scope.locale = _squid.$locale;\n $scope.country = $scope.locale.country;\n var cardTypeServiceCall = (0, _squid.$feature)('cardTypeServiceCallRequired', false, $scope.country);\n\n // For APay provisioning flow, we use service call once we have the minimum number of digits\n // for the card.\n $scope.tokenizedWalletCardTypeServiceCall = false;\n\n var isUnsupportedCard = void 0;\n var lastVerifiedBin = '';\n var lastRequestedBin = void 0; // bin requested to service to fetch card type and pending response.\n\n $scope.mxDebitCards = ['BANAMEX', 'BANCOARFACA', 'BBVA', 'BANORTE', 'HSBC', 'INBURSA', 'SANTANDER'];\n\n if ($scope.card && $scope.card.number) {\n $scope.unformattedCardNumber = ($scope.card.number || '').replace(/[^0-9]+/g, '').slice(0, $scope.maxLength());\n }\n\n $scope.showMXCardLogos = function () {\n return _squid.$locale.country === 'MX';\n };\n\n (0, _squid.$populate)($scope, {\n cardTypes: _fi.$CardTypesModel.instance($scope.token + ':' + _squid.$locale.country, {\n token: $scope.token,\n country: _squid.$locale.country\n })\n }).then(function () {\n var scanCardExperimentEligibility = function scanCardExperimentEligibility() {\n if (!_index.$DeviceInfo.isSafariiOSBrowserView()) {\n return _squid.$promise.resolve(false);\n }\n // Scan credit card feature is only available in iosVersion 8+\n if (_index.$DeviceInfo.isSafariiOSBrowserView() && _index.$DeviceInfo.getiOSVersion()[0] < 8) {\n return _squid.$promise.resolve(false);\n }\n\n return (0, _squid.$elmo)('xo_hermes_addcard_camera_icon_member', { 'ctx.COUNTRY': _squid.$locale.country }, 'xo_hermes_addcard_camera_icon_member_show');\n };\n\n scanCardExperimentEligibility().then(function (result) {\n $scope.showScanCardExperiment = result || false;\n });\n\n $scope.debitCardFlow = angular.isArray($scope.flowEligibility.paymentCardProductClass) && $scope.flowEligibility.paymentCardProductClass.length === 1 && $scope.flowEligibility.paymentCardProductClass[0] === 'DEBIT';\n var forceDropDown = false;\n\n $scope.supportedCardNamesCommaSeparated = $scope.cardTypes.supportedNames().join(', ');\n\n $scope.$on('localeChange', function () {\n $scope.cardTypes = _fi.$CardTypesModel.instance($scope.token + ':' + _squid.$locale.country, {\n token: $scope.token,\n country: _squid.$locale.country\n });\n\n $scope.cardTypes.retrieve().then(function () {\n if ($scope.card.type && $scope.cardTypes.allowed.indexOf($scope.card.type) === -1) {\n delete $scope.card.type;\n forceDropDown = false;\n $scope.changeCardNumber(true);\n }\n });\n\n $scope.country = _squid.$locale.country;\n });\n\n $scope.cvvShown = function () {\n if ($scope.card.type === 'CETELEM' && $scope.locale.country === 'FR') {\n return false;\n }\n\n if ($scope.card.type === 'CUP' && $scope.card.productType === 'DEBITCARD') {\n return false;\n }\n\n if ($scope.isPlcc && $scope.card.type) {\n return true;\n }\n\n return $scope.flag('fields.cvv');\n };\n\n $scope.expiryShown = function () {\n if ($scope.isPlcc && $scope.card.type) {\n return true;\n }\n if ($scope.card.type === 'CUP' && $scope.card.productType === 'DEBITCARD') {\n return false;\n }\n\n return $scope.flag('fields.expiry');\n };\n\n $scope.enableDropDown = function () {\n // for VISA CUP dual card, force show dropdown for buyer to choose card type\n return Boolean(['ES', 'FR', 'GB', 'IT'].indexOf($scope.locale.country) > -1) || forceDropDown || $scope.card && $scope.card.type === 'VISA' && $scope.card && $scope.card.dualType === 'CUP';\n };\n\n $scope.showDropDown = function () {\n if ($scope.enableDropDown()) {\n return true;\n }\n\n if (!$scope.card.type && $scope.card.number && $scope.card.number.length >= 4 && !(cardTypeServiceCall || $scope.tokenizedWalletCardTypeServiceCall) && !$scope.isPlcc) {\n return true;\n }\n\n if (!$scope.card.type && $scope.card.number && $scope.card.number.length >= 7 && (cardTypeServiceCall || $scope.tokenizedWalletCardTypeServiceCall) && isUnsupportedCard) {\n return true;\n }\n\n return false;\n };\n\n $scope.showAcceptedCardLogos = function () {\n return !$scope.showDropDown() && (0, _squid.$feature)('showAcceptedCardLogos', false, $scope.country);\n };\n\n $scope.getCardTypeByNumber = function (types, number) {\n if ($scope.isPlcc && number.length > 6 || !$scope.isPlcc) {\n return _cardMetaData.$CardMetaData.getCardType(types, number);\n }\n };\n\n function formatCardNumber(number) {\n var spaces = $scope.flag('spaces');\n var formatted = [];\n\n for (var i = 0; i < number.length; i++) {\n if (spaces.indexOf(i) > -1) {\n formatted.push(' ');\n }\n\n formatted.push(number.charAt(i));\n }\n\n number = formatted.join('');\n return number;\n }\n\n $scope.$watch('card.type', function () {\n if ($scope.cardTypeChanged) {\n $scope.cardTypeChanged();\n }\n });\n\n /**\n * Hit Callback(unformatted cc no) when user gets out of the cardNumber field.\n */\n $scope.ccOnBlur = function () {\n if ($scope.cardNumberChanged) {\n $scope.cardNumberChanged($scope.unformattedCardNumber);\n }\n };\n\n // e.g for a dual brand = ['CUP' ,'VISA'], select VISA or CUP based\n // on regex defined for card type. If not regex was defined, pick one\n // of the allowed card type.\n function selectCardTypeForDualBrands(result) {\n var dualCardTypes = (0, _squid.$feature)('dualCardTypes', {});\n var match = void 0;\n\n Object.keys(dualCardTypes).some(function (key) {\n return result.some(function (cardType) {\n if (cardType.type === key) {\n match = key;\n return true;\n }\n });\n });\n\n if (match) {\n var regex = new RegExp(dualCardTypes[match]);\n var selected = _squid.$util.find(result, function (cardType) {\n if (regex.test(cardType.type)) {\n return true;\n }\n });\n\n // if selected card based on regexp is CUP\n // then we can test for AMEX as subtype (a dualType card)\n if (selected && selected.type === 'CUP') {\n _squid.$util.some(result, function (cardType) {\n if (/^AMEX$/.test(cardType.type)) {\n selected.dualType = cardType.type;\n return true;\n }\n });\n }\n\n // if selected card based on regexp is VISA\n // then we can test for CUP as subtype (a dualType card)\n if (selected && selected.type === 'VISA') {\n _squid.$util.some(result, function (cardType) {\n if (/^CUP$/.test(cardType.type)) {\n selected.dualType = cardType.type;\n return true;\n }\n });\n }\n\n return selected;\n } else {\n return _squid.$util.find(result, function (cardType) {\n return $scope.cardTypes.allowed.indexOf(cardType.type) > -1;\n });\n }\n }\n\n function selectCardType(result) {\n if (angular.isArray(result)) {\n if (result.length >= 2) {\n result = selectCardTypeForDualBrands(result);\n } else {\n result = result[0];\n }\n }\n\n return result || {};\n }\n\n function clearCardType() {\n $scope.card.type = '';\n $scope.card.dualType = '';\n $scope.card.productType = '';\n }\n\n function getCardTypeByNumberServiceCall(number) {\n if (number.length >= 6) {\n var bin = number;\n\n // Don't limit to 6 digits for APay flow as some cards require more than 6 digit\n // BIN to detect if it is a debit card.\n if (!$scope.debitCardFlow) {\n bin = bin.slice(0, 6);\n }\n\n if (lastVerifiedBin) {\n if (lastVerifiedBin.bin === bin) {\n $scope.card.type = lastVerifiedBin.type;\n $scope.card.dualType = lastVerifiedBin.dualType;\n $scope.card.productType = lastVerifiedBin.productType;\n return;\n }\n // For APay flow, if product type has been identified,\n // we don't need to make another call\n else if ($scope.debitCardFlow && bin.startsWith(lastVerifiedBin.bin) && lastVerifiedBin.productType) {\n $scope.card.type = lastVerifiedBin.type;\n $scope.card.dualType = lastVerifiedBin.dualType;\n $scope.card.productType = lastVerifiedBin.productType;\n return;\n }\n }\n\n // For APay, if there is a pending request, then do nothing.\n if (isUnsupportedCard === bin || bin === lastRequestedBin || $scope.debitCardFlow && lastRequestedBin) {\n return;\n }\n\n lastRequestedBin = bin;\n\n _fi.$CardTypeFromBinModel.instance().save({\n data: {\n user_country: $scope.country,\n bin: bin\n },\n silent: true,\n success: function success(result) {\n result = selectCardType(result);\n var type = result.type;\n lastRequestedBin = undefined;\n\n var disallowedCard = false;\n if ($scope.cardTypes.allowed.indexOf(type) === -1) {\n disallowedCard = true;\n }\n\n // if we get upop in the response from BIN lookup\n // set into the cardModel to trigger OTP\n // this should not only be set if dropdown is not shown\n $scope.card.isUpop = result.isUpop;\n\n if (disallowedCard) {\n clearCardType();\n isUnsupportedCard = bin;\n $scope.allowedCardsTooltip = true;\n return;\n }\n\n isUnsupportedCard = undefined;\n forceDropDown = false;\n if (!$scope.showDropDown()) {\n $scope.card.type = type;\n $scope.card.dualType = result.dualType;\n $scope.card.productType = result.productType;\n }\n\n lastVerifiedBin = {\n bin: bin,\n type: type,\n dualType: result.dualType,\n productType: result.productType\n };\n\n // This logic is to handle copy paste case when all numbers are entered at once\n if ($scope.card.type && number.length >= $scope.flag('length.min')) {\n if (/android/i.test(navigator.userAgent)) {\n return;\n }\n\n var ccNumber = ($scope.card.number || '').replace(/[^0-9]+/g, '').slice(0, $scope.maxLength());\n\n if (ccNumber.indexOf(number) >= 0) {\n $scope.card.number = formatCardNumber(ccNumber);\n }\n }\n\n return;\n },\n contingencies: {\n GET_FI_ISSUER_DETAILS_ERR: function GET_FI_ISSUER_DETAILS_ERR(name, result) {\n clearCardType();\n isUnsupportedCard = bin;\n lastRequestedBin = undefined;\n }\n },\n error: function error() {\n clearCardType();\n isUnsupportedCard = bin;\n lastRequestedBin = undefined;\n }\n });\n } else {\n isUnsupportedCard = undefined;\n lastRequestedBin = undefined;\n forceDropDown = false;\n clearCardType();\n }\n }\n\n $scope.getAllowedCardTypeByNumber = function (number) {\n return $scope.getCardTypeByNumber($scope.cardTypes.allowed, number);\n };\n\n $scope.getDisallowedCardTypeByNumber = function (number) {\n return $scope.getCardTypeByNumber($scope.cardTypes.disallowed, number);\n };\n\n $scope.enableAddMode = function () {\n if ($scope.card.isExisting()) {\n $scope.card.number = '';\n }\n };\n\n $scope.changeType = function () {\n forceDropDown = true;\n\n $scope.changeCardNumber(true);\n\n // Blank out unsupported fields\n\n if (!$scope.flag('fields.expiry')) {\n delete $scope.card.expiry_month;\n delete $scope.card.expiry_year;\n }\n\n if (!$scope.flag('fields.issue')) {\n delete $scope.card.start_month;\n delete $scope.card.start_year;\n delete $scope.card.issue_number;\n }\n\n if (!$scope.flag('fields.dob')) {\n delete $scope.card.dob_day;\n delete $scope.card.dob_month;\n delete $scope.card.dob_year;\n }\n\n if (!$scope.flag('fields.cvv')) {\n delete $scope.card.security_code;\n }\n };\n\n $scope.changeCardNumber = function (isCardTypeChanged) {\n // If buyer tries to modify an update card number. We remove the whole string\n // so buyer can add a card instead.\n $scope.enableAddMode();\n $scope.allowedCardsTooltip = false;\n var regex = /[0-9]/;\n\n if ((0, _squid.$feature)('disableFullWidthCharacters') && regex.test($scope.card.number)) {\n _logger.$logger.info('checkout_fpti', {\n 'is_fullwidth_character': true\n });\n }\n\n var number = ($scope.card.number || '').replace(/[^0-9]+/g, '').slice(0, $scope.maxLength());\n var formattedNumber = void 0;\n\n $scope.unformattedCardNumber = number;\n\n // Attempt to determine the card type\n var cardType = void 0;\n\n if ($scope.debitCardFlow) {\n if (number.length >= $scope.flag('length.min')) {\n $scope.tokenizedWalletCardTypeServiceCall = true;\n } else {\n $scope.tokenizedWalletCardTypeServiceCall = false;\n lastVerifiedBin = '';\n }\n }\n\n if (cardTypeServiceCall || $scope.tokenizedWalletCardTypeServiceCall) {\n if (!isCardTypeChanged) {\n getCardTypeByNumberServiceCall(number);\n }\n\n if (isUnsupportedCard) {\n $scope.allowedCardsTooltip = true;\n }\n } else {\n if (!isCardTypeChanged) {\n // Hide dropdown and trigger bin matching when the cc number is < 4 digits\n if (number.length < 4) {\n forceDropDown = false;\n }\n\n if (!$scope.enableDropDown()) {\n cardType = $scope.getAllowedCardTypeByNumber(number);\n $scope.card.type = cardType.type;\n $scope.card.subType = cardType.subType;\n }\n }\n\n if ($scope.isPlcc && $scope.card.type) {\n $scope.cvvShown();\n $scope.expiryShown();\n }\n\n if (!$scope.card.type && !$scope.isPlcc && (number.length >= 4 || $scope.getDisallowedCardTypeByNumber(number).type)) {\n $scope.allowedCardsTooltip = true;\n }\n }\n\n /*\n * PPPLMER-1563 commented out to fix this bug\n if (/android/i.test(navigator.userAgent)) {\n return;\n }\n */\n // Format the card number\n formattedNumber = formatCardNumber(number);\n\n // If the card is already formatted correctly, we can leave the user to continue in peace.\n if ($scope.card.number === formattedNumber) {\n return;\n }\n\n // Wait for the user's input to be reflected on the page (necessary for safari 5 otherwise selectionStart is incorrect)\n (0, _angular.$timeout)(function () {\n // re-formatting the number, since the card type may not have resolved before the first call\n $scope.card.number = formatCardNumber(number);\n // Save the current cursor positions\n var ccField = document.getElementById('cc');\n\n if (!ccField) {\n return;\n }\n\n var inputLength = ccField.value.length;\n var cursorStart = ccField.selectionStart;\n\n // Wait for the formatted card to be reflected on the page\n (0, _angular.$timeout)(function () {\n // If the cursor was at the end of the input field, keep it at the end\n if (cursorStart === inputLength) {\n ccField.selectionStart = ccField.selectionEnd = ccField.value.length;\n // Otherwise place the cursor to the position it was in before we replaced with the formatted number\n } else {\n ccField.selectionStart = ccField.selectionEnd = cursorStart;\n }\n });\n });\n };\n });\n });\n }]\n };\n});\n\n_angular.$timeout;\n\n_squid.$feature;\n\n_squid.$locale;\n\n_squid.$meta;\n\n_squid.$populate;\n\n_squid.$util;\n\n_logger.$logger;\n\n_checkout.$FlowEligibilityModel;\n\n_fi.$CardTypeFromBinModel;\n\n_fi.$CardTypesModel;\n\n_cardMetaData.$CardMetaData;\n\n_index.$DeviceInfo;\n\n_squid.$promise;\n\n_squid.$elmo;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/creditcard-input/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
    \\n \\n \\n \\n\\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n\\n
    \\n

    {{content('creditcard.cardIconTitle')}}

    \\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n\\n
    {{content('addCard.plccAddCard', { merchant: promotion.name})}}
    \\n\\n
    \\n \\n \\n
    \\n\\n
    \\n \\n\\n \\n\\n \\n
    \\n {{ !debitCardFlow ? content('creditcard.acceptableCards') : content('creditcard.acceptDebitCardOnly') }}\\n \\n {{supportedCardNamesCommaSeparated}}\\n \\n
    \\n
    \\n\\n {{card.type}}\\n
    \\n\\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n\\n
    \\n \\n\\n \\n
    \\n {{ content('creditcard.issueNoLabelToolTip') }}\\n
    \\n
    \\n
    \\n
    \\n
    \\n\\n
    \\n \\n \\n
    \\n\\n \\n \\n
    \\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _uiRouter = __webpack_require__(\"../node_modules/angular-ui-router/release/angular-ui-router.min.js\");\n\nvar _index = __webpack_require__(\"../node_modules/xo-models/src/address/index.js\");\n\nvar _index2 = __webpack_require__(\"../node_modules/xo-models/src/checkout/index.js\");\n\nvar _index3 = __webpack_require__(\"../node_modules/xo-models/src/fi/index.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoAddCardFlow', function () {\n return {\n template: _template2['default'],\n\n scope: {\n token: '=?',\n parentCallbacks: '=?',\n messagetitle: '=?',\n message: '=?',\n pagetitle: '=?',\n sidebar: '=?',\n showmeftsection: '=?',\n hideparenthead: '=?',\n promotion: '=?',\n pageLevel: '=?',\n logout: '=?',\n phone: '=?',\n fundingid: '=?',\n showCancel: '=?',\n showSetPreferredFi: '=?',\n onSuccess: '=?',\n backUri: '=?',\n showIncentive: '=?',\n incentiveAmount: '=?',\n cardmodel: '=?',\n updateCardCpa: '=?',\n cause: '=?'\n },\n\n controller: ['$scope', function ($scope) {\n\n $scope.addCCDone = function () {\n $scope.parentCallbacks.finish();\n };\n\n $scope.callbacks = {\n done: $scope.parentCallbacks.finish,\n cancel: $scope.parentCallbacks.cancel,\n showCep: function showCep() {\n $scope.prefillAddress = new _index.$PrefillAddressModel({\n id: $scope.token\n });\n\n _uiRouter.$state.go('^.addCep');\n },\n\n cardTypeSelected: function cardTypeSelected(type) {\n $scope.selectedPromotionCardType = {\n type: type\n };\n _uiRouter.$state.go('^.addCard');\n }\n };\n\n $scope.cepDone = function () {\n _uiRouter.$state.go('^.addBilling');\n };\n\n $scope.selectedPromotionCardType = {\n type: $scope.promotion && $scope.promotion.type\n };\n\n if ($scope.promotion) {\n $scope.promotion.type = null;\n }\n\n $scope.billingaddressupdated = {\n value: false\n };\n\n $scope.phone = {\n hide_type: true\n };\n\n if (!$scope.cardmodel) {\n $scope.cardmodel = new _index3.$AddCardModel({\n card: new _index3.$CardModel()\n });\n }\n\n (0, _squid.$populate)($scope, {\n checkoutSession: _index2.$CheckoutSessionModel.instance($scope.token).retrieve({\n contingencies: {\n NEED_CREDIT_CARD: angular.noop,\n EXPIRED_CREDIT_CARD: angular.noop\n }\n })\n }).then(function () {\n\n if ($scope.checkoutSession.errorData && $scope.checkoutSession.errorData.resolution) {\n var card = $scope.checkoutSession.errorData.resolution.data;\n\n if (card.fundingId && card.fi && card.fi.type) {\n $scope.cardmodel.id = card.fundingId;\n $scope.cardmodel.card = new _index3.$CardModel({\n number: 'xxxx-xxxx-xxxx-' + card.fi.number,\n type: card.fi.type.toUpperCase(),\n productType: card.fi.productType\n });\n }\n }\n if ($scope.fundingid) {\n var fundingSource = _squid.$util.find($scope.checkoutSession.fundingOptions.instruments, function (funding) {\n if (funding && funding.id === $scope.fundingid) {\n return funding;\n }\n });\n if (!fundingSource) {\n fundingSource = _squid.$util.find($scope.checkoutSession.fundingOptions.disallowedInstruments, function (funding) {\n if (funding && funding.id === $scope.fundingid) {\n return funding;\n }\n });\n }\n\n if (fundingSource) {\n $scope.cardmodel.id = fundingSource.id;\n $scope.cardmodel.card = new _index3.$CardModel({\n number: 'xxxx-xxxx-xxxx-' + fundingSource.lastDigits,\n lastDigits: fundingSource.lastDigits,\n type: fundingSource.name.toUpperCase(),\n name: (0, _squid.$renderContent)('fsMappings.' + fundingSource.name)\n });\n }\n }\n });\n }]\n };\n});\n\n_squid.$populate;\n\n_squid.$renderContent;\n\n_squid.$util;\n\n_uiRouter.$state;\n\n_index.$PrefillAddressModel;\n\n_index2.$CheckoutSessionModel;\n\n_index3.$AddCardModel;\n\n_index3.$CardModel;\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/dob/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/dob/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/dropdown/directive.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoDobCardInputDirective', {\n tag: 'xo-dob-card-input',\n template: _template2['default'],\n\n props: {\n user: {\n type: 'var',\n required: false\n }\n },\n\n lifecycle: {\n enter: function enter() {\n function pad() {\n var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2;\n\n return function (num) {\n return (new Array(length + 1).join('0') + num).substr(-length);\n };\n }\n\n var year = new Date().getFullYear();\n this.days = _squid.$util.map(_squid.$util.range(1, 32), pad());\n this.months = _squid.$util.map(_squid.$util.range(1, 13), pad());\n this.years = _squid.$util.map(_squid.$util.range(year - 100, year), pad(4)).reverse();\n }\n }\n});\n\n\n_squid.$Component;\n\n_squid.$util;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/dob/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
    \\n \\n\\n
    \\n \\n
    \\n\\n
    \\n \\n
    \\n\\n
    \\n \\n
    \\n
    \\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/index.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\n\nvar _directive = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cardExpiry/directive.js\");\n\nObject.keys(_directive).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _directive[key];\n }\n });\n});\n\nvar _cardMetaData = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cardMetaData/index.js\");\n\nObject.keys(_cardMetaData).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _cardMetaData[key];\n }\n });\n});\n\nvar _directive2 = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cvv/directive.js\");\n\nObject.keys(_directive2).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _directive2[key];\n }\n });\n});\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/route.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module, __dirname, __filename) {\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/addcard/route.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/selectcard/route.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/addbilling/route.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/addCep/route.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/confirm-upop/route.js\");\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$AddCardFlowRoute', function () {\n\n return _squid.$ComponentRoute.extend('CardRoute', {\n\n name: 'addCardFlow',\n directive: 'xo-add-card-flow',\n titleContent: 'asideHeader.addCard',\n children: [{\n name: '$AddCardRoute',\n attributes: {\n token: 'token',\n cardmodel: 'cardmodel',\n done: 'addCCDone',\n messagetitle: 'messagetitle',\n message: 'message',\n pagetitle: 'pagetitle',\n sidebar: 'sidebar',\n showmeftsection: 'showmeftsection',\n hideparenthead: 'hideparenthead',\n billingaddressupdated: 'billingaddressupdated',\n isupdatecard: 'isupdatecard',\n 'parent-callbacks': 'callbacks',\n 'selected-promotion-card-type': 'selectedPromotionCardType',\n promotion: 'promotion',\n 'page-level': 'pageLevel',\n logout: 'logout',\n phone: 'phone',\n 'show-cancel': 'showCancel',\n 'show-set-preferred-fi': 'showSetPreferredFi',\n 'on-success': 'onSuccess',\n 'back-uri': 'backUri',\n 'show-incentive': 'showIncentive',\n 'incentive-amount': 'incentiveAmount',\n 'update-card-cpa': 'updateCardCpa',\n cause: 'cause'\n }\n\n }, {\n name: '$SelectCardRoute',\n attributes: {\n token: 'token',\n 'parent-callbacks': 'callbacks',\n message: 'message',\n pagetitle: 'pagetitle',\n sidebar: 'sidebar',\n 'selected-promotion-card-type': 'selectedPromotionCardType',\n promotion: 'promotion'\n }\n }, {\n name: '$AddBillingRoute',\n attributes: {\n token: 'token',\n sidebar: 'sidebar',\n showmeftsection: 'showmeftsection',\n 'parent-callbacks': 'callbacks',\n hideparenthead: 'hideparenthead',\n billingaddressupdated: 'billingaddressupdated',\n 'prefill-address': 'prefillAddress'\n }\n }, {\n name: '$AddCepRoute',\n attributes: {\n token: 'token',\n sidebar: 'sidebar',\n 'done-fn': 'cepDone',\n 'prefill-address': 'prefillAddress'\n }\n }]\n });\n});\n\n_squid.$ComponentRoute;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/webpack/buildin/module.js\")(module), \"../node_modules/xo-wallet-components/src/add-card\", \"../node_modules/xo-wallet-components/src/add-card/route.js\"))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/selectcard/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _index = __webpack_require__(\"../node_modules/xo-models/src/checkout/index.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/selectcard/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoSelectCard', function () {\n return {\n template: _template2['default'],\n\n scope: {\n parentCallbacks: '=?',\n token: '=?',\n promotion: '=?'\n },\n\n controller: ['$scope', function ($scope) {\n\n (0, _squid.$populate)($scope, {\n checkoutSession: _index.$CheckoutSessionModel.instance($scope.token)\n }).then(function () {\n $scope.selectCardType = function (type) {\n // card type is either 'cc' or 'plcc'\n $scope.parentCallbacks.cardTypeSelected(type);\n };\n });\n }]\n };\n});\n\n_squid.$populate;\n\n_index.$CheckoutSessionModel;\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/selectcard/route.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module, __dirname, __filename) {\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/selectcard/directive.js\");\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$SelectCardRoute', function () {\n return _squid.$ComponentRoute.extend('SelectCardRoute', {\n\n name: 'selectCard',\n directive: 'xo-select-card',\n titleContent: 'asideHeader.selectCard',\n children: []\n });\n});\n\n_squid.$ComponentRoute;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/webpack/buildin/module.js\")(module), \"../node_modules/xo-wallet-components/src/add-card/selectcard\", \"../node_modules/xo-wallet-components/src/add-card/selectcard/route.js\"))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/selectcard/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"\\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/add-card/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
    \"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/confirm-upop/confirm/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function($) {\n\nexports.__esModule = true;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _angular2 = _interopRequireDefault(_angular);\n\nvar _util = __webpack_require__(\"../node_modules/xo-wallet-components/src/fi-contingency-list/util.js\");\n\nvar _index = __webpack_require__(\"../node_modules/xo-models/src/fi/index.js\");\n\nvar _index2 = __webpack_require__(\"../node_modules/xo-models/src/checkout/index.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/spinner-button/directive.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/confirm-upop/confirm/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar VERIFICATION_CODE_COUNTDOWN_IN_SECS = 180; // 3 minutes\nvar RESEND_CODE_LINK_TIMEOUT_MILLI_SECS = 60000; // 1 minute\nvar ONE_MINUTE_IN_SECS = 60;\n\nexports['default'] = _squid.$Component.extend('$xoConfirmOtpDirective', {\n tag: 'xo-confirm-otp',\n template: _template2['default'],\n props: {\n token: {\n type: 'var',\n required: false\n },\n phone: {\n type: 'var',\n required: false\n },\n cardmodel: {\n type: 'var',\n required: false\n },\n onSuccess: {\n type: 'var',\n required: false\n },\n message: {\n type: 'var',\n required: false\n }\n },\n resolve: {\n models: function models() {\n return {\n checkoutSession: _index2.$CheckoutSessionModel.instance(this.props.token).retrieve()\n };\n }\n },\n actions: {\n addMessage: function addMessage(type, contentKey) {\n if (contentKey) {\n this.message({\n msgKeys: [_angular2['default'].isArray(contentKey) ? contentKey[0] : contentKey],\n type: type || 'error'\n });\n }\n },\n stopConfirmCodeTimer: function stopConfirmCodeTimer() {\n if (this.confirmCodeTimer) {\n _angular.$interval.cancel(this.confirmCodeTimer);\n }\n this.countdown = 0;\n },\n stopResendCodeTimer: function stopResendCodeTimer() {\n if (this.resendCodeTimer) {\n _angular.$timeout.cancel(this.resendCodeTimer);\n }\n this.showResendLink = false;\n },\n updateCountdown: function updateCountdown() {\n if (this.countdown > 0) {\n this.countdown--;\n this.timer = Math.floor(this.countdown / ONE_MINUTE_IN_SECS) + ':' + ('0' + this.countdown % ONE_MINUTE_IN_SECS).slice(-2);\n } else {\n if (!this.isConfirmProcessing) {\n this.actions.addMessage('warning', 'confirmUpop.codeExpired');\n }\n this.actions.stopConfirmCodeTimer();\n this.actions.stopResendCodeTimer();\n }\n },\n startCountdown: function startCountdown(resetTimer) {\n var _this = this;\n\n if (resetTimer) {\n this.actions.stopConfirmCodeTimer();\n this.countdown = VERIFICATION_CODE_COUNTDOWN_IN_SECS;\n this.actions.updateCountdown();\n this.confirmCodeTimer = (0, _angular.$interval)(this.actions.updateCountdown, 1000);\n }\n\n this.actions.stopResendCodeTimer();\n this.showResendLink = false;\n this.resendCodeTimer = (0, _angular.$timeout)(function () {\n _this.showResendLink = true;\n }, RESEND_CODE_LINK_TIMEOUT_MILLI_SECS);\n this.actions.addMessage('success', 'confirmUpop.codeSent');\n },\n processed: function processed() {\n if (!this.countdown && this.isConfirmProcessing) {\n this.actions.addMessage('warning', 'confirmUpop.codeExpired');\n }\n this.isProcessing = this.isConfirmProcessing = false;\n },\n handleContingencies: function handleContingencies() {\n var result = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var prop = arguments[1];\n\n var errorData = void 0;\n if (result.errorCodes) {\n errorData = result;\n } else {\n errorData = {\n errorCodes: [result['0'] || 'ISSUER_DECLINE']\n };\n }\n\n this.message(_util.$fiErrorUtil.addPageErrors(errorData, 'confirmUpop', prop, 'error'));\n\n if (window.scrollTo) {\n window.scrollTo(0, 0);\n }\n },\n sendNewCode: function sendNewCode() {\n // reset the code field.\n if (this.cardmodel && this.cardmodel.card) {\n this.cardmodel.card.otp_code = '';\n }\n this.actions.resendCode(true);\n },\n resendCode: function resendCode(resetTimer) {\n var _this2 = this;\n\n this.isProcessing = true;\n this.resolveOTP.action('init', {\n silent: true,\n data: {\n phone: {\n country_code: this.phone.IntDialingCountryCode,\n number: this.phone.telephone\n }\n },\n resultModel: {},\n success: function success() {\n _this2.actions.startCountdown(resetTimer);\n },\n error: function error() {\n _this2.actions.handleContingencies();\n },\n contingencies: {\n INIT_OTP_CONTINGENCY: function INIT_OTP_CONTINGENCY(name, result) {\n // prop for last 4 digits of card in error message\n var prop = {\n number: _this2.cardLast4\n };\n\n _this2.actions.handleContingencies(result, prop);\n _util.$fiErrorUtil.addFieldErrors(result, _this2.$element);\n },\n DEFAULT: function DEFAULT() {\n _this2.actions.handleContingencies();\n }\n }\n })['finally'](this.actions.processed);\n },\n confirmOTP: function confirmOTP() {\n var _this3 = this;\n\n this.isProcessing = this.isConfirmProcessing = true;\n\n this.resolveOTP.action('complete', {\n silent: true,\n data: {\n code: this.cardmodel.card.otp_code,\n phone: {\n country_code: this.phone.IntDialingCountryCode,\n number: this.phone.telephone\n },\n card_data: {\n expiration_time: {\n month: this.cardmodel.card.expiry_month,\n year: this.cardmodel.card.expiry_year\n },\n card_verification_code: this.cardmodel.card.security_code\n }\n },\n success: this.onSuccess,\n error: function error() {\n _this3.actions.handleContingencies({}, 'confirmUpop');\n _this3.actions.processed();\n },\n contingencies: {\n COMPLETE_OTP_CONTINGENCY: function COMPLETE_OTP_CONTINGENCY(name, result) {\n // prop for last 4 digits of card in error message\n var prop = {\n number: _this3.cardLast4\n };\n\n _this3.actions.handleContingencies(result, prop);\n _util.$fiErrorUtil.addFieldErrors(result, _this3.$element);\n _this3.actions.processed();\n }\n }\n })['catch'](function () {\n _this3.actions.handleContingencies();\n _this3.actions.processed();\n });\n }\n },\n lifecycle: {\n enter: function enter() {\n var _this4 = this;\n\n this.resolveOTP = new _index.$ResolveOTP({ id: this.cardmodel.id });\n this.isProcessing = this.showResendLink = false;\n this.cardLast4 = this.cardmodel.card.number.slice(-4);\n this.phoneLast4 = this.phone && this.phone.telephone && this.phone.telephone.slice(-4);\n this.actions.startCountdown(true);\n\n this.$watch('isProcessing', function (isProcessing) {\n if (isProcessing) {\n _this4.$element.addClass('processing');\n } else {\n _this4.$element.removeClass('processing');\n }\n });\n $('#upopConfirmation .modalContainer').focus();\n }\n }\n});\n\n\n_squid.$Component;\n\n_util.$fiErrorUtil;\n\n_index.$ResolveOTP;\n\n_index2.$CheckoutSessionModel;\nmodule.exports = exports['default'];\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/confirm-upop/confirm/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
    \\n
    \\n\\n
    \\n {{content('confirmUpop.timeRemaining')}}\\n {{timer}} {{content('confirmUpop.minutes')}}\\n {{content('confirmUpop.resendCode')}}\\n
    \\n\\n
    \\n\\n
    \\n
    \\n \\n\\n
    \\n \\n
    \\n
    \\n
    \\n \\n
    \\n
    \\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/confirm-upop/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _uiRouter = __webpack_require__(\"../node_modules/angular-ui-router/release/angular-ui-router.min.js\");\n\nvar _addCard = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/index.js\");\n\nvar _logger = __webpack_require__(\"../node_modules/xo-beaver/dist/logger.js\");\n\nvar _jquery = __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\");\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/message/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/confirm-upop/init/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/confirm-upop/confirm/directive.js\");\n\nvar _index = __webpack_require__(\"../node_modules/xo-models/src/checkout/index.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/confirm-upop/styles.less\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/confirm-upop/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoConfirmUpopDirective', {\n tag: 'xo-confirm-upop',\n template: _template2['default'],\n props: {\n token: {\n type: 'var',\n required: false\n },\n phone: {\n type: 'var',\n required: false\n },\n cardmodel: {\n type: 'var',\n required: false\n },\n onSuccess: {\n type: 'var',\n required: false\n },\n onCancel: {\n type: 'var',\n required: false\n }\n },\n resolve: {\n models: function models() {\n return {\n checkoutSession: _index.$CheckoutSessionModel.instance(this.props.token).retrieve()\n };\n }\n },\n lifecycle: {\n enter: function enter() {\n var _this = this;\n\n // Card model should be required. However, because this is a route, a user could potentially refresh the page and land on this directive.\n // So, we need to check if parent directive has passed in cardmodel and return if not\n if (!this.cardmodel) {\n _logger.$logger.warn('card_model_missing');\n return this.goto('^'); // Return to parent route\n }\n\n this.phone = this.props.phone || {};\n\n var cardNumber = this.cardmodel.card && this.cardmodel.card.number;\n\n this.cardLast4 = cardNumber && cardNumber.slice(-4);\n this.fromLoginOverlay = _uiRouter.$stateParams.fromLoginOverlay;\n\n (0, _angular.$timeout)(function () {\n (0, _jquery2['default'])('#upopConfirmation .upopConfirm').addClass('upopOpen');\n if (_this.fromLoginOverlay) {\n (0, _angular.$timeout)(function () {\n (0, _jquery2['default'])('#upopConfirmation .modalWrapper').addClass('modalWrapperAnimation');\n });\n }\n });\n\n var hideModal = function hideModal() {\n (0, _jquery2['default'])('#upopConfirmation .upopConfirm').removeClass('upopOpen');\n };\n\n var done = function done(handler, target) {\n hideModal();\n (0, _angular.$timeout)(function () {\n return handler ? handler() : _this.goto(target);\n }, 200);\n };\n\n var _success = function _success() {\n done(_this.props.onSuccess, 'checkout.review');\n };\n\n this.closeModal = function (event) {\n if (event) {\n event.preventDefault();\n }\n\n done(_this.props.onCancel, '^');\n };\n\n this.initSuccess = function () {\n _this.collectOtpInput = false;\n };\n\n this.confirmed = function () {\n if (_this.props.onSuccess) {\n return _success();\n }\n\n return _this.models.checkoutSession.fundingOptions.action('update', {\n resultModel: _this.models.checkoutSession,\n silent: true,\n data: {\n planId: _this.cardmodel.id\n },\n success: function success() {\n if (_this.models.checkoutSession.cvvData) {\n _this.models.checkoutSession.set('cvvData.security_code', _this.cardmodel.get('card.security_code'));\n }\n var isNewCard = !_this.cardmodel.card.isExisting();\n var msg = isNewCard ? ['smallToolTip.cardAddedConfirmed'] : ['smallToolTip.cardConfirmed'];\n\n _this.models.checkoutSession.message = {\n type: 'success',\n msgKeys: msg\n };\n _success();\n }\n });\n };\n\n this.flag = function (field) {\n // passing country to differentiate CUP for C2 and ROW\n return _addCard.$CardMetaData.getMetaData(_this.cardmodel.card, field, _squid.$locale.country);\n };\n\n this.setMessage = function (message) {\n _this.message = message;\n };\n\n this.collectOtpInput = this.flag('fields.expiry') && !this.cardmodel.get('card.expiry_month') || this.flag('fields.cvv') && !this.cardmodel.get('card.expiry_month') || this.flag('fields.phone') && !(this.phone && this.phone.telephone);\n }\n }\n});\n\n\n_angular.$timeout;\n\n_squid.$Component;\n\n_squid.$locale;\n\n_uiRouter.$stateParams;\n\n_addCard.$CardMetaData;\n\n_logger.$logger;\n\n_index.$CheckoutSessionModel;\nmodule.exports = exports['default'];\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/confirm-upop/init/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function($) {\n\nexports.__esModule = true;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _util = __webpack_require__(\"../node_modules/xo-wallet-components/src/fi-contingency-list/util.js\");\n\nvar _index = __webpack_require__(\"../node_modules/xo-models/src/fi/index.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/spinner-button/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-form-components/src/phone/phoneInput/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cardExpiry/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/cvv/directive.js\");\n\nvar _template = __webpack_require__(\"../node_modules/xo-wallet-components/src/confirm-upop/init/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoInitOtpDirective', {\n tag: 'xo-init-otp',\n template: _template2['default'],\n props: {\n token: {\n type: 'var',\n required: false\n },\n phone: {\n type: 'var',\n required: false\n },\n cardmodel: {\n type: 'var',\n required: false\n },\n onSuccess: {\n type: 'var',\n required: false\n },\n flag: {\n type: 'var',\n required: false\n },\n message: {\n type: 'var',\n required: false\n }\n },\n actions: {\n initOtp: function initOtp() {\n var _this = this;\n\n var handleContingencies = function handleContingencies() {\n var result = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var prop = arguments[1];\n\n var errorData = void 0;\n if (result.errorCodes) {\n errorData = result;\n } else {\n errorData = {\n errorCodes: [result['0'] || 'ISSUER_DECLINE']\n };\n }\n\n _this.message(_util.$fiErrorUtil.addPageErrors(errorData, 'confirmUpop', prop, 'error'));\n\n if (window.scrollTo) {\n window.scrollTo(0, 0);\n }\n };\n\n this.isProcessing = true;\n\n var resolveOTP = new _index.$ResolveOTP({ id: this.cardmodel.id });\n\n resolveOTP.action('init', {\n silent: true,\n data: {\n phone: {\n country_code: this.phone.IntDialingCountryCode,\n number: this.phone.telephone\n }\n },\n resultModel: {},\n success: function success() {\n _this.onSuccess();\n },\n\n error: function error() {\n handleContingencies();\n },\n\n contingencies: {\n INIT_OTP_CONTINGENCY: function INIT_OTP_CONTINGENCY(name, result) {\n // prop for last 4 digits of card in error message\n var prop = {\n number: _this.cardmodel.card.number.slice(-4)\n };\n\n handleContingencies(result, prop);\n _util.$fiErrorUtil.addFieldErrors(result, _this.$element);\n },\n DEFAULT: function DEFAULT() {\n handleContingencies();\n }\n }\n })['finally'](function () {\n _this.isProcessing = false;\n });\n }\n },\n\n lifecycle: {\n enter: function enter() {\n var _this2 = this;\n\n this.$watch('isProcessing', function (isProcessing) {\n if (isProcessing) {\n _this2.$element.addClass('processing');\n } else {\n _this2.$element.removeClass('processing');\n }\n });\n $('#upopConfirmation .modalContainer').focus();\n }\n }\n});\n\n\n_squid.$Component;\n\n_util.$fiErrorUtil;\n\n_index.$ResolveOTP;\nmodule.exports = exports['default'];\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")))\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/confirm-upop/init/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
    \\n
    \\n\\n
    \\n
    \\n \\n \\n
    \\n \\n\\n \\n
    \\n
    \\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/confirm-upop/route.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\nexports.$xoConfirmUpopRoute = undefined;\n\nvar _index = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _directive = __webpack_require__(\"../node_modules/xo-wallet-components/src/confirm-upop/directive.js\");\n\nvar _directive2 = _interopRequireDefault(_directive);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar $xoConfirmUpopRoute = exports.$xoConfirmUpopRoute = _index.$Route.extend('$xoConfirmUpopRoute', {\n path: 'confirmUpop',\n directive: _directive2['default'],\n titleContent: 'confirmUpop.confirm',\n trackingData: {\n fptiState: 'confirm_upop'\n },\n query: ['fromLoginOverlay'],\n loginRequired: true,\n pageOnOverlay: true,\n children: []\n});\n\nexports['default'] = $xoConfirmUpopRoute;\n\nangular.value(\"$xoConfirmUpopRoute\", $xoConfirmUpopRoute);\n_index.$Route;\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/confirm-upop/styles.less\":\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/confirm-upop/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n\\n \\n \\n
    \\n
    \\n
    \\n
    \\n
    \\n
    \\n\"\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/fi-contingency-list/contingencies.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n\n var contingencyList = {\n INSTRUMENT_COUNT_EXCEEDED: 'errorInstrumentCountExceeded',\n INSTRUMENT_COUNT_EXCEEDED_VERIFIED: 'errorInstrumentCountExceeded',\n INSTRUMENT_COUNT_LIMIT_EXCEEDED: 'errorInstrumentCountExceeded',\n INSTRUMENT_COUNT_LIMIT_EXCEEDED_VERIFIED: 'errorInstrumentCountExceeded',\n INSTRUMENT_UNAVAILABLE: 'errorInstrumentUnavailable',\n INSTRUMENT_REFUSED_DUE_TO_MAX_LIMIT: 'errorInstrumentRefused',\n INSTRUMENT_REFUSED_DUE_TO_MAX_SHARED_INSTRUMENT_LIMIT: ['errorInstrumentUnavailable', 'errorInstrumentRefused'],\n INSTRUMENT_SHARING_LIMIT_EXCEEDED: ['errorInstrumentUnavailable', 'errorInstrumentRefused'],\n INSTRUMENT_ALREADY_EXISTS: 'errorInstrumentAlreadyExists',\n INSTRUMENT_BILLING_ADDRESS_NOT_ACCEPTED: 'errorInstrumentBillingAddressNotAccepted',\n BILLING_ADDRESS1: 'errorInstrumentBillingAddressNotAccepted',\n BILLING_CITY: 'errorInstrumentBillingAddressNotAccepted',\n BILLING_COUNTRY: 'errorInstrumentBillingAddressNotAccepted',\n BILLING_DIFFERENT_COUNTRY: ['errorInstrumentBillingAddressUnavailableIntl', 'errorInstrumentBillingAddressNotAccepted'],\n INSTRUMENT_UPDATE_NO_CHANGE: 'errorInstrumentUpdateNoChange',\n INSTRUMENT_DUPLICATE_LIMIT_REACHED: 'errorInstrumentRefused',\n NOT_ELIGIBLE_TO_EDIT_CARD: 'notEligibleToEditCard',\n INTERNAL_ERROR: 'errorInternalError',\n INSTRUMENT_REFUSED: 'errorInstrumentRefused',\n INSTRUMENT_INTERNATIONAL: 'errorIssuerRejectIntl',\n REJECT_REFUSED: ['errorIssuerReject', 'errorInstrumentRefused'],\n PAYPAL_DEBIT_CARD_REFUSED: ['errorPaypalDebitRefused', 'errorGeneral'],\n PAYPAL_CREDIT_CARD_REFUSED: ['errorPaypalCreditRefused', 'errorGeneral'],\n PAYPAL_CARD_REFUSED: ['errorPaypalRefused', 'errorGeneral'],\n EXCESSIVE_REJECTIONS: ['errorExcessiveRejectGuest', 'errorInstrumentRefused'],\n CC_INVALID_CSC: ['errorCheckDigits', 'errorGeneral'],\n INVALID_EXPIRATION_DATE: 'errorInvalidExpirationDate',\n CHECK_DIGITS_NOT_PRESENT: ['errorCheckDigitsNotPresent', 'errorGeneral'],\n REJECT_UNKNOWN: ['errorIssuerReject', 'errorInstrumentRefused'],\n SETTLEMENT_DENIED: 'errorInstrumentRefused',\n MAX_AMOUNT_EXCEEDED: ['errorMaxAmountExceeded', 'errorInstrumentRefused'],\n ISSUER_ERROR: ['errorIssuerDenied', 'errorInstrumentRefused'],\n MISSING_FIELD: ['errorInvalidData', 'errorGeneral'],\n INVALID_PARAMETERS: ['errorInvalidData', 'errorGeneral'],\n INVALID_DATA: ['errorInvalidData', 'errorGeneral'],\n INVALID_ACCOUNT: ['errorInvalidAccount', 'errorGeneral'],\n INVALID_INSTRUMENT_ID: ['errorInvalidAccount', 'errorGeneral'],\n ACCOUNT_RESTRICTED: ['errorAccountRestricted', 'errorGeneral'],\n ISSUER_RESTRICTED: ['errorIssuerReject', 'errorGeneral'],\n ISSUER_REJECTED: ['errorIssuerReject', 'errorGeneral'],\n ADDRESS_MISMATCH: 'errorInstrumentBillingAddressNotMatch',\n CHECK_DIGITS_NOT_PROC: ['errorCheckDigitsNotPresent', 'errorGeneral'],\n CHECK_DIGITS_UNSUPPORTED: ['errorCheckDigits', 'errorGeneral'],\n CHECK_DIGITS_UNAVAILABLE: ['errorCheckDigits', 'errorGeneral'],\n BILL_ADDR_UNAVAILABLE: ['errorInstrumentBillingAddressUnavailable', 'errorInstrumentBillingAddressNotAccepted'],\n BILL_ADDR_UNSUPPORTED: ['errorInstrumentBillingAddressUnsupported', 'errorInstrumentBillingAddressNotAccepted'],\n BILL_ADDR_UNAVAILABLE_GLOBAL: ['errorInstrumentBillingAddressUnavailableIntl', 'errorInstrumentBillingAddressNotAccepted'],\n BILL_ADDR_NOT_ALLOWED: ['errorInstrumentBillingAddressNotAccepted', 'errorAddressNotAllowed'],\n BILL_ADDR_UNAVAILABLE_INTL: ['errorInstrumentBillingAddressUnavailableIntl', 'errorInstrumentBillingAddressNotAccepted'],\n INSTRUMENT_DISABLED: 'errorInstrumentRefused',\n PI_TYPE_NOT_SUPPORTED: 'errorInvalidCCNumberOrType_global',\n REJECT_AMEX_ADULT: ['errorAmexAdult', 'errorGeneral'],\n INVALID_BANK_ROUTING_NUMBER: 'invalidRoutingNumber',\n BANK_ROUTING_NUMBER_IS_EMPTY: 'invalidPINumber',\n INVALID_BANK_ACCOUNT_NUMBER: 'invalidPINumber',\n BANK_ACCOUNT_NUMBER_IS_EMPTY: 'invalidPINumber',\n INVALID_BANK_IBAN: 'invalidPINumber',\n INVALID_IBAN_CODE: 'invalidPINumber',\n INVALID_BANK_IBAN_CONVERSION_ERROR: 'invalidPINumber',\n INVALID_BENEFICIARY_FIRST_NAME: 'errorInvalidFirstName',\n INVALID_BENEFICIARY_NAME: 'errorInvalidFirstName',\n INVALID_BANK_BENEFICIARY_NUMBER: 'errorGeneral',\n INVALID_BANK_ADDRESS: 'errorGeneral',\n INVALID_CARD_NUMBER: 'errorInvalidCCNumberOrType',\n INVALID_CARD_TYPE: 'errorInvalidCCNumberOrType',\n INVALID_SECURITY_CODE: 'errorInvalidCSC',\n INVALID_FIRST_NAME: 'errorInvalidFirstName',\n INVALID_LAST_NAME: 'errorInvalidLastName',\n INVALID_EXPIRY: 'errorInvalidExpirationDate',\n INVALID_PHONE: 'errorInvalidPhone',\n BANK_ADDRESS_IS_EMPTY: 'errorGeneral',\n INVALID_BANK_BRANCH_NUMBER: 'errorGeneral',\n ADD_REFUSED_DUE_TO_EXCEEDING_MAX_DUPLICATE_INSTRUMENT_LIMIT: 'errorInstrumentUnavailable',\n EMPTY_DATA: 'errorGeneral',\n ISSUER_DECLINE: 'errorIssuerReject',\n WRONG_CONFIRMATION_VALUES: 'wrongConfirmationValue',\n CONFIRMATION_RESEND_COUNT_EXCEEDED: 'resendValExceeded',\n FREQUENT_REQUEST_VERIFICATION_CODE: 'frequentVerificationCodeReq',\n TRANSACTION_TIMEOUT: 'transactionTimeout',\n NOT_CONFIRMED: 'notConfirmed',\n CONTACT_CARD_ISSUER_TO_VERIFY: 'issuerVerify',\n CARD_NOT_ACTIVATED_FOR_UPOP: 'cardNotActivatedUpop',\n RESTRICTED_CARD: 'cardRestricted',\n INVALID_ONE_TIME_PASSWORD: 'errorInvalidOtpCode',\n DUPLICATED_TRANSACTION: 'duplicateTransaction'\n\n };\n\n return contingencyList;\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n/***/ }),\n\n/***/ \"../node_modules/xo-wallet-components/src/fi-contingency-list/util.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n/* WEBPACK VAR INJECTION */(function(module, __dirname, __filename, $) {\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _logger = __webpack_require__(\"../node_modules/xo-beaver/dist/logger.js\");\n\nvar _contingencies = __webpack_require__(\"../node_modules/xo-wallet-components/src/fi-contingency-list/contingencies.js\");\n\nvar _contingencies2 = _interopRequireDefault(_contingencies);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n// FI error fields and xo frontend models map\nvar FIELD_TO_MODEL_MAPPING = {\n ACTOR: [],\n BILLING_ADDRESS: ['cardmodel.address'],\n BIN: ['card.type', 'card.number'],\n CARD: ['card.type', 'card.number'],\n CUP_CARD: ['card.type', 'card.number'],\n CVV: ['card.security_code'],\n DOB: ['dob.value', 'user.dob_day', 'user.dob_month', 'user.dob_year'],\n EXPIRY: ['expiryDate', 'card.expiry_month', 'card.expiry_year']\n};\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$fiErrorUtil', function () {\n return {\n addPageErrors: function addPageErrors(errorData, contentBundle, prop, defaultKey) {\n // error handling for filifecycle and fimanagement.\n if (!errorData.errorCodes) {\n errorData.errorCodes = errorData && [errorData['0']];\n }\n\n var messages = [];\n\n if (errorData.errorCodes && errorData.errorCodes.length) {\n errorData.errorCodes.forEach(function (errorCode) {\n var contentKey = _contingencies2['default'][errorCode] || defaultKey || 'errorGeneral';\n var message = void 0;\n\n if (angular.isArray(contentKey)) {\n for (var i = 0; i < contentKey.length; i++) {\n message = (0, _squid.$renderContent)(contentBundle + '.' + contentKey[i], prop);\n if (message) {\n break;\n }\n }\n } else {\n message = (0, _squid.$renderContent)(contentBundle + '.' + contentKey, prop);\n }\n messages.push(message);\n });\n } else {\n messages.push((0, _squid.$renderContent)(contentBundle + '.' + 'errorGeneral', prop));\n }\n\n return {\n msgs: messages,\n type: 'error'\n };\n },\n\n highlightInvalidFields: function highlightInvalidFields(invalidFields, $element) {\n for (var _iterator = invalidFields, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n var model = _ref;\n\n var $field = $($element).find('[ng-model=\"' + model + '\"]');\n\n $field.addClass('backendError');\n $field.attr('aria-invalid', true);\n }\n\n $($element).find('.backendError').first().focus();\n },\n\n mapValidationErrorToModel: function mapValidationErrorToModel() {\n var invalidFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n var errorProperty = 'VALIDATION_ERROR_';\n\n // if there is only one invalid field then fetch the corresponding error message else return the\n // generic validation error message\n if (invalidFields.length === 1) {\n return {\n invalidModels: FIELD_TO_MODEL_MAPPING[invalidFields[0]],\n errorProperty: errorProperty + invalidFields[0]\n };\n }\n return {\n invalidModels: [],\n errorProperty: errorProperty + 'GENERIC'\n };\n },\n\n addPageErrorByErrorName: function addPageErrorByErrorName(contentBundle, prop) {\n var defaultKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'INTERNAL_ERROR';\n\n var message = (0, _squid.$renderContent)(contentBundle + '.' + prop);\n\n if (!message || !message.toString()) {\n // log content not found\n _logger.$logger.error('fi_content_missing', {\n prop: prop\n });\n message = (0, _squid.$renderContent)(contentBundle + '.' + defaultKey);\n }\n\n return {\n msgs: [message],\n type: 'error'\n };\n },\n\n /**\n * Highlight the Error Fields by ng-model\n * @param errorData\n * @param element\n * @param modelPrefix\n */\n addFieldErrors: function addFieldErrors(errorData, element, modelPrefix) {\n if (errorData.fields && errorData.fields.length) {\n errorData.fields.forEach(function (field) {\n var $field = $(element).find('[ng-model=\"' + (modelPrefix ? modelPrefix : '') + field.field + '\"]');\n\n $field.addClass('backendError');\n $field.attr('aria-invalid', true);\n });\n }\n $(element).find('.backendError:first').focus();\n },\n\n /**\n * Highlight the Error Fields by element name\n * @param errorData\n * @param element\n * @param modelPrefix\n */\n addFieldErrorsByName: function addFieldErrorsByName(errorData, element, modelPrefix) {\n if (errorData.fields && errorData.fields.length) {\n errorData.fields.forEach(function (field) {\n var fieldName = void 0;\n\n if (modelPrefix && field.field && field.field.length > 0) {\n // Add prefix with CamelCase of field name\n fieldName = modelPrefix + field.field[0].toUpperCase() + field.field.substring(1);\n } else {\n fieldName = field.field;\n }\n var $field = $(element).find('[name=\"' + fieldName + '\"]');\n\n $field.addClass('backendError');\n $field.attr('aria-invalid', true);\n });\n }\n $(element).find('.backendError:first').focus();\n }\n };\n});\n\n_squid.$renderContent;\n\n_logger.$logger;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(\"../node_modules/webpack/buildin/module.js\")(module), \"../node_modules/xo-wallet-components/src/fi-contingency-list\", \"../node_modules/xo-wallet-components/src/fi-contingency-list/util.js\", __webpack_require__(\"../node_modules/jquery/dist/jquery.min.js\")))\n\n/***/ }),\n\n/***/ \"./pages/xo-add-card/directive.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\nexports.$xoPageAddCardPageComponent = undefined;\n\nvar _angular = __webpack_require__(\"../node_modules/angular/angular.min.js\");\n\nvar _uiRouter = __webpack_require__(\"../node_modules/angular-ui-router/release/angular-ui-router.min.js\");\n\nvar _logger = __webpack_require__(\"../node_modules/xo-beaver/dist/logger.js\");\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\nvar _factory = __webpack_require__(\"../node_modules/xo-member-components/src/no-balance/factory.js\");\n\nvar _factory2 = __webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/addcard/factory.js\");\n\nvar _auth = __webpack_require__(\"../node_modules/xo-models/src/auth/index.js\");\n\nvar _fi = __webpack_require__(\"../node_modules/xo-models/src/fi/index.js\");\n\nvar _choice = __webpack_require__(\"../node_modules/xo-models/src/choice/index.js\");\n\nvar _app = __webpack_require__(\"../node_modules/xo-models/src/app/index.js\");\n\nvar _fiMessages = __webpack_require__(\"../node_modules/xo-models/src/fi/lib/fiMessages.js\");\n\nvar _index = __webpack_require__(\"../node_modules/xo-models/src/fiMeta/index.js\");\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _newMember = __webpack_require__(\"../node_modules/xo-models/src/newMember/index.js\");\n\nvar _checkoutIncentive = __webpack_require__(\"../node_modules/xo-models/src/checkoutIncentive/index.js\");\n\nvar _checkout = __webpack_require__(\"../node_modules/xo-models/src/checkout/index.js\");\n\n__webpack_require__(\"../node_modules/xo-page-components/src/notYou/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-page-components/src/value-props/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/dropdown/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/modal/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-ui-components/src/tooltip/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-validation/dist/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/directive.js\");\n\n__webpack_require__(\"../node_modules/xo-member-components/src/no-balance/directive.js\");\n\nvar _factory3 = __webpack_require__(\"../node_modules/xo-ui-components/src/expired-fi-panel/factory.js\");\n\nvar _template = __webpack_require__(\"./pages/xo-add-card/template.html\");\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _sharedUtil = __webpack_require__(\"./pages/services/shared-util/index.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar disallowedExp = _factory3.$ExpiredFiPanelFactory.disallowedExp;\nvar $xoPageAddCardPageComponent = exports.$xoPageAddCardPageComponent = _squid.$Component.extend('$xoPageAddCardPageComponent', {\n tag: 'xo-page-add-card-page',\n template: _template2['default'],\n scope: {},\n controller: ['$scope', function ($scope) {\n if (_uiRouter.$stateParams.cause === 'cpa') {\n $scope.cause = _uiRouter.$stateParams.cause;\n }\n $scope.locale = _squid.$locale;\n $scope.token = _angular.$rootScope.token;\n $scope.showIncentive = false; // Assume we won't show an incentive\n $scope.isProcessorDeclineExperiment = false;\n var models = {};\n\n $scope.callbacks = {\n finish: function finish() {\n if (models.cart.isWalletTokenization() && models.walletPinModel.isSetupEligible()) {\n _logger.$logger.debug('pinSetup_required');\n _uiRouter.$state.go('checkout.pinSetup');\n } else {\n _uiRouter.$state.go('checkout.review');\n }\n },\n cancel: function cancel(routeTo) {\n var goTo = routeTo || $scope.parentState || '';\n\n _logger.$logger.debug('xoAddCard_cancel', { goTo: goTo });\n if (goTo) {\n _uiRouter.$state.go(goTo);\n }\n }\n };\n\n (0, _squid.$populate)(models, {\n checkoutSession: _checkout.$CheckoutSessionModel.instance($scope.token).retrieve({\n contingencies: {\n NEED_CREDIT_CARD: angular.noop,\n EXPIRED_CREDIT_CARD: angular.noop,\n NEED_DEBIT_CARD: angular.noop,\n EXPIRED_DEBIT_CARD: angular.noop\n }\n }),\n unavailableCard: _fi.$UnavailableCardModel.instance(),\n payee: _checkout.$CheckoutPayeeModel.instance($scope.token),\n cart: _checkout.$CheckoutCartModel.instance($scope.token),\n auth: _auth.$AuthModel.instance().retrieve(),\n checkoutAppData: _checkout.$CheckoutAppDataModel.instance($scope.token).retrieve(),\n noBalanceFactoryState: _factory.$NoBalanceFactory.decideEligibility(),\n fiMeta: _index2['default'].instance(_angular.$rootScope.token).fetch()['catch'](_angular.noop)\n }).then(function () {\n $scope.noBalanceFactoryState = _factory.$NoBalanceFactory.get();\n // Resolve additional information needed\n var getWalletPinModel = function getWalletPinModel() {\n if (models.cart.isWalletTokenization()) {\n return (0, _squid.$populate)(models, {\n walletPinModel: _app.$TokenizedWalletPinModel.instance($scope.token)\n });\n }\n };\n\n var getCheckoutIncentiveEligibility = function getCheckoutIncentiveEligibility() {\n return (0, _angular.$q)(function (resolve, reject) {\n var fptiData = {\n from: 'FI_addCardAccount',\n to: 'prepare_FI_addCardAccount',\n context_id: $scope.token,\n eligibility_reason: ''\n };\n\n if (models.cart.isWalletTokenization()) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Wallet_Tokenization';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n if (models.payee.isGambling()) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Gambling_Merchant';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n var country_code = _squid.$locale.getCountryCodeISO();\n\n var offerEligibilityData = {\n payer_id: models.auth.buyer_id,\n country_code: country_code,\n language: _squid.$locale.getLocaleCode(),\n touchpoint_code: 'CHECKOUT_INCENTIVE' // TODO don't hardcode this?\n };\n\n $scope.evaluateCheckoutOfferEligibilityModel = _checkoutIncentive.$EvaluateCheckoutOfferEligibilityModel.instance();\n\n $scope.evaluateCheckoutOfferEligibilityModel.save({\n data: offerEligibilityData,\n success: function success() {\n\n if (!$scope.evaluateCheckoutOfferEligibilityModel.isEligible()) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Not_In_MORS_Segment';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n $scope.getOfferProgramModel = _checkoutIncentive.$GetOfferProgramModel.instance();\n var offer_program_code = $scope.evaluateCheckoutOfferEligibilityModel.getOfferProgramCode();\n\n $scope.getOfferProgramModel.retrieve({\n params: { offer_program_code: offer_program_code },\n success: function success() {\n var offerCurrencyCode = $scope.getOfferProgramModel.getOfferCurrencyCode();\n var cartCurrencyCode = models.cart.getCartCurrencyCode();\n\n if (cartCurrencyCode !== offerCurrencyCode) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Cart_Currency_Not_Offer_Currency';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n var txnMinimumLowestDenom = $scope.getOfferProgramModel.getMinCartTotalLowestDenom();\n var precisionDigits = _squid.$locale.metadata.currency.digits[offerCurrencyCode];\n var txnMinimum = txnMinimumLowestDenom;\n\n if (precisionDigits) {\n txnMinimum = (txnMinimumLowestDenom / Math.pow(10, precisionDigits)).toFixed(precisionDigits);\n }\n\n var txnAmt = models.cart.getPurchaseAmount();\n var isTxnWorthEnough = txnAmt >= txnMinimum;\n\n if (!isTxnWorthEnough) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Transaction_Not_Worth_Enough';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n var isUserInApplicableCountry = $scope.getOfferProgramModel.isUserInApplicableCountry(country_code);\n\n if (!isUserInApplicableCountry) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Country_Ineligible';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n fptiData.eligibility_reason = 'Incentive_Eligible';\n _logger.$logger.info('checkout_fpti', fptiData);\n\n var pxpFptiData = {\n state_name: 'FI_addCardAccount',\n transition_name: 'prepare_FI_addCardAccount_incentive',\n incentive_name: ''\n };\n\n return _factory2.$AddCardFactory.getCheckoutIncentivePxpResult().then(function (result) {\n if (result === 'xo_hermes_checkout_incentive_show') {\n pxpFptiData.incentive_name = $scope.getOfferProgramModel.offer_program_code;\n _logger.$logger.info('checkout_fpti', pxpFptiData);\n return resolve(true);\n }\n\n _logger.$logger.info('checkout_fpti', pxpFptiData);\n return resolve(false);\n })['catch'](function () {\n _logger.$logger.info('checkout_fpti', pxpFptiData);\n return resolve(false);\n });\n },\n contingencies: {\n DEFAULT: function DEFAULT(msg, contingency) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_' + msg;\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n },\n error: function error() {\n fptiData.eligibility_reason = 'Get_Program_Error';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n });\n },\n contingencies: {\n DEFAULT: function DEFAULT(msg, contingency) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_' + msg;\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n },\n error: function error() {\n fptiData.eligibility_reason = 'MORS_Error';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n });\n });\n };\n\n var getHideControlMsg = function getHideControlMsg() {\n return _newMember.$NewMemberEligibility.instance().isNmj($scope.token);\n };\n\n var getSelectFiVariant = function getSelectFiVariant() {\n return _choice.$ChoiceEligibility.instance().getVariant($scope.token).then(function (variant) {\n var selectFiVariants = _squid.$config.choiceExperiment && _squid.$config.choiceExperiment.selectFi || [];\n\n if (selectFiVariants.indexOf(variant) !== -1) {\n return true;\n }\n\n return false;\n });\n };\n\n // Return the reason for disallowed in the wallet, due to preauth or bank\n var checkDeclineReason = function checkDeclineReason() {\n var disallowedInstruments = models.checkoutSession.get('fundingOptions').get('disallowedInstruments');\n var disallowedPreAuth = _squid.$util.filter(disallowedInstruments, function (instrument) {\n return instrument.declineReason === 'INSTRUMENT_VERIFICATION_FAILED';\n });\n\n if (!disallowedInstruments) {\n return;\n }\n\n if (disallowedPreAuth && disallowedPreAuth.length > 0) {\n return 'PREAUTH';\n }\n\n var disallowedNonBankInstruments = _squid.$util.filter(disallowedInstruments, function (disallowedInstrument) {\n return disallowedInstrument.type !== 'BANK';\n });\n\n if (disallowedNonBankInstruments && disallowedNonBankInstruments.length >= 1) {\n return;\n }\n\n return 'BANK';\n };\n\n var checkProcessorDeclineIssuerExperiment = function checkProcessorDeclineIssuerExperiment() {\n var declinedInstruments = models.checkoutSession.get('declinedInstruments', []);\n if (declinedInstruments && declinedInstruments.length > 0) {\n return _factory2.$AddCardFactory.getIssuerDeclineElmoResult();\n }\n return '';\n };\n\n var getInformalName = function getInformalName() {\n var formattedNameInformal = void 0;\n if (models.auth) {\n formattedNameInformal = (0, _squid.formatNameInformal)({\n first_name: models.auth.first_name,\n last_name: models.auth.last_name\n }) || models.auth.email;\n }\n return formattedNameInformal;\n };\n\n _sharedUtil.$SharedUtil.checkCpaEligibility(models.checkoutSession).then(function (inCpaElmoTreatment) {\n $scope.isCPAEligible = inCpaElmoTreatment || false;\n });\n\n return _squid.$promise.hash({\n walletPinModel: getWalletPinModel(),\n hideControlMsg: getHideControlMsg(),\n checkoutIncentiveEligibility: getCheckoutIncentiveEligibility(),\n selectFiVariant: getSelectFiVariant(),\n checkDeclineReason: checkDeclineReason(),\n addCardContingency: _factory3.$ExpiredFiPanelFactory.getPxpResult(models),\n issuerDeclineTreatment: checkProcessorDeclineIssuerExperiment(),\n formattedNameInformal: getInformalName()\n\n });\n }).then(function (_ref) {\n var hideControlMsg = _ref.hideControlMsg,\n selectFiVariant = _ref.selectFiVariant,\n checkDeclineReason = _ref.checkDeclineReason,\n checkoutIncentiveEligibility = _ref.checkoutIncentiveEligibility,\n addCardContingency = _ref.addCardContingency,\n issuerDeclineTreatment = _ref.issuerDeclineTreatment,\n formattedNameInformal = _ref.formattedNameInformal;\n\n\n var message = void 0;\n\n // smartDollarAuthFailed is true when smart $x auth check fails on 'authorize'\n if (models.checkoutSession.smartDollarAuthFailed) {\n message = {\n type: 'error',\n msg: (0, _squid.$renderContent)('payment.authFailureSingleFI')\n };\n } else {\n if (issuerDeclineTreatment === 'Trmt_xo_hermesnodeweb_issuer_decline_1') {\n $scope.isProcessorDeclineExperiment = true;\n }\n message = _fiMessages.$fiMessages.processorDeclinedMsg(models.checkoutSession, false, issuerDeclineTreatment, models.auth, models.fiMeta.wallet, formattedNameInformal);\n }\n\n var isCreditDisallowedForMerchant = models.checkoutSession.isCreditDisallowedForMerchant;\n if (isCreditDisallowedForMerchant) {\n $scope.creditDisallowedMessage = {\n type: 'warning',\n msgs: [_squid.$locale.content.get('addCard.creditCardNotAllowed')]\n };\n }\n var redirectFromXoon = _squid.$util.param('redirectToHermes') ? true : false;\n var retry = _squid.$util.param('addFIContingency') === 'retry' ? true : false;\n var avsRetry = _squid.$util.param('avsRetry') ? true : false;\n\n var getContingencyDeclineMessage = function getContingencyDeclineMessage(declineReason, _ref2) {\n var disallowedInstruments = _ref2.disallowedInstruments;\n\n switch (declineReason) {\n case 'BANK':\n message = _fiMessages.$fiMessages.getAddBankTreatmentMsg();\n break;\n case 'PREAUTH':\n var disallowed = _squid.$util.filter(disallowedInstruments, function (instrument) {\n return instrument.declineReason === 'INSTRUMENT_VERIFICATION_FAILED';\n });\n\n message = _fiMessages.$fiMessages.getPreAuthTreatmentMsg(disallowed);\n break;\n default:\n message = _fiMessages.$fiMessages.getAddCardTreatmentMsg(models.checkoutSession);\n break;\n }\n };\n\n // If no processor decline, get the message when contingency is anything but NEED_DEBIT_CARD\n if (!message && models.checkoutSession.get('errorData.cause') && _uiRouter.$stateParams.message !== 'NEED_DEBIT_CARD') {\n if (models.payee.isGambling()) {\n message = _fiMessages.$fiMessages.getGamblingMsg();\n } else if (!hideControlMsg && addCardContingency && (addCardContingency === disallowedExp.disallowedFi || addCardContingency === disallowedExp.preAuth)) {\n getContingencyDeclineMessage(checkDeclineReason, models.checkoutSession.get('fundingOptions'));\n } else {\n message = _fiMessages.$fiMessages.getAddCardMsg(models.unavailableCard, { retry: retry, avsRetry: avsRetry, redirectFromXoon: redirectFromXoon }, models.checkoutSession);\n var noBillingFIContingencyIndia = (0, _squid.$renderContent)('creditcard.noBillingFIContingency');\n\n // Content changes for change card for indian billing start\n if (models.cart.isConsumerCountry('IN') && models.cart.isBilling()) {\n if (models.cart.isRecurringPayment() || models.checkoutAppData.is_wps_flow()) {\n noBillingFIContingencyIndia = (0, _squid.$renderContent)('creditcard.not.immediate.noBillingFIContingency');\n } else if (models.cart.isReferenceTransaction()) {\n\n if (models.checkoutAppData.isMerchantCountry('IN')) {\n if (models.cart.isChargePatternImmediateOrDeferred()) {\n noBillingFIContingencyIndia = (0, _squid.$renderContent)('creditcard.immediate.noBillingFIContingency');\n } else {\n noBillingFIContingencyIndia = (0, _squid.$renderContent)('creditcard.not.immediate.noBillingFIContingency');\n }\n } else {\n noBillingFIContingencyIndia = (0, _squid.$renderContent)('creditcard.not.immediate.noBillingFIContingency');\n }\n }\n }\n // Content changes for change card for indian billing end\n\n if (models.cart.isBilling() && noBillingFIContingencyIndia && _squid.$locale.country === 'IN') {\n message.msg = noBillingFIContingencyIndia;\n message.type = 'info';\n }\n }\n }\n\n if (message) {\n $scope.message = {\n type: message.type,\n msgs: [message.msg]\n };\n if (message.title) {\n $scope.messagetitle = _squid.$locale.content.get(message.title.key);\n }\n }\n // Reset the message if it is CPA flow for single FI contingency.\n if ($scope.cause === 'cpa' && _uiRouter.$stateParams.message === 'NEED_CREDIT_CARD' || $scope.isCPAEligible) {\n $scope.message = null;\n $scope.messagetitle = null;\n }\n\n $scope.cart = models.cart;\n $scope.auth = models.auth;\n\n // Show this message if this is the first page the user sees (these cases usually have a message).\n // Do not show if entering from another page, like the select-fi page\n if (!hideControlMsg) {\n $scope.showHiMsg = message || !selectFiVariant;\n $scope.showNotYou = $scope.auth && $scope.auth.showNotYou();\n }\n\n // Render the incentive banner if eligible\n $scope.showIncentive = checkoutIncentiveEligibility;\n\n if ($scope.showIncentive) {\n // This is of the form '$5.00'\n var offerValue = $scope.evaluateCheckoutOfferEligibilityModel.getOfferValue();\n\n $scope.incentiveAmount = offerValue;\n\n var currencyCode = $scope.evaluateCheckoutOfferEligibilityModel.getCurrencyCode();\n var precisionDigits = _squid.$locale.metadata.currency.digits[currencyCode];\n\n if (precisionDigits) {\n var decimalDigitsStr = offerValue.substring(offerValue.length - precisionDigits);\n var areAllDecimalDigitsZeroes = /^0*$/.test(decimalDigitsStr);\n\n if (areAllDecimalDigitsZeroes) {\n // Remove trailing decimals and punctuation\n $scope.incentiveAmount = offerValue.substring(0, offerValue.length - precisionDigits - 1);\n }\n }\n\n // Don't show incentive terms by default\n $scope.showIncentiveTerms = false;\n\n $scope.toggleShowIncentiveTerms = function () {\n $scope.showIncentiveTerms = !$scope.showIncentiveTerms;\n };\n }\n\n // Show selectFi features if no contingency\n if (selectFiVariant && !message) {\n $scope.showCancel = true;\n $scope.parentState = 'checkout.selectFi';\n $scope.pagetitle = _squid.$locale.content.get('addCard.addACard');\n }\n });\n\n $scope.isAddCardContingency = function () {\n return _uiRouter.$stateParams.message === 'NEED_CREDIT_CARD';\n };\n\n $scope.isUpdateDebitCard = function () {\n return _uiRouter.$stateParams.message === 'EXPIRED_DEBIT_CARD';\n };\n }]\n});\n\nangular.value(\"$xoPageAddCardPageComponent\", $xoPageAddCardPageComponent);\n_angular.$q;\n\n_angular.$rootScope;\n\n_angular.noop;\n\n_uiRouter.$state;\n\n_uiRouter.$stateParams;\n\n_logger.$logger;\n\n_squid.$Component;\n\n_squid.$config;\n\n_squid.$locale;\n\n_squid.$populate;\n\n_squid.$promise;\n\n_squid.$renderContent;\n\n_squid.$util;\n\n_squid.formatNameInformal;\n\n_factory.$NoBalanceFactory;\n\n_factory2.$AddCardFactory;\n\n_auth.$AuthModel;\n\n_fi.$UnavailableCardModel;\n\n_choice.$ChoiceEligibility;\n\n_app.$TokenizedWalletPinModel;\n\n_fiMessages.$fiMessages;\n\n_newMember.$NewMemberEligibility;\n\n_checkoutIncentive.$EvaluateCheckoutOfferEligibilityModel;\n\n_checkoutIncentive.$GetOfferProgramModel;\n\n_checkout.$CheckoutAppDataModel;\n\n_checkout.$CheckoutCartModel;\n\n_checkout.$CheckoutPayeeModel;\n\n_checkout.$CheckoutSessionModel;\n\n_factory3.$ExpiredFiPanelFactory;\n\n_sharedUtil.$SharedUtil;\n\n/***/ }),\n\n/***/ \"./pages/xo-add-card/route.js\":\n/***/ (function(module, exports, __webpack_require__) {\n\n\n\nexports.__esModule = true;\nexports.$AddCardPageRoute = undefined;\n\nvar _squid = __webpack_require__(\"../node_modules/squid/dist/index.js\");\n\n__webpack_require__(\"../node_modules/xo-wallet-components/src/add-card/route.js\");\n\n__webpack_require__(\"./pages/xo-add-card/directive.js\");\n\nvar $AddCardPageRoute = exports.$AddCardPageRoute = _squid.$ComponentRoute.extend('$AddCardPageRoute', {\n path: 'pageAddCard',\n directive: 'xo-page-add-card-page',\n titleContent: 'asideHeader.addCard',\n query: ['cause', 'message'],\n trackingData: {\n templateName: 'addCard.dust',\n pageGoal: 'Add Card',\n buzname: {\n 'fullpage': {\n 'pagename': '%::fullpage-add-cc',\n 'pagename2': '%::fullpage-add-cc:member:hermes:',\n 'version': 'member:%:'\n // More page qualifiers come here...\n } }\n },\n children: [{\n name: '$AddCardFlowRoute',\n attributes: {\n token: 'token',\n messagetitle: 'messagetitle',\n message: 'message',\n pagetitle: 'pagetitle',\n 'parent-callbacks': 'callbacks',\n logout: 'logout',\n 'show-cancel': 'showCancel',\n 'show-incentive': 'showIncentive',\n 'incentive-amount': 'incentiveAmount',\n cause: 'cause'\n }\n }]\n});\n\nangular.value(\"$AddCardPageRoute\", $AddCardPageRoute);\n_squid.$ComponentRoute;\n\n/***/ }),\n\n/***/ \"./pages/xo-add-card/template.html\":\n/***/ (function(module, exports) {\n\nmodule.exports = \"
    \\n \\n\\n

    {{ content('checkoutIncentive.termsHeader') }}

    \\n
    {{ content('checkoutIncentive.termsH1') }}
    \\n

    {{ content('checkoutIncentive.termsP1') }}

    \\n
    {{ content('checkoutIncentive.termsH2') }}
    \\n

    {{ content('checkoutIncentive.termsP2') }}

    \\n
    {{ content('checkoutIncentive.termsH3') }}
    \\n

    \\n
    {{ content('checkoutIncentive.termsH4') }}
    \\n

    {{ content('checkoutIncentive.termsP4') }}

    \\n
    {{ content('checkoutIncentive.termsH5') }}
    \\n

    {{ content('checkoutIncentive.termsP5') }}

    \\n
    {{ content('checkoutIncentive.termsH6') }}
    \\n

    {{ content('checkoutIncentive.termsP6') }}

    \\n\\n
    \\n \\n\\n
    \\n
    \\n \\n \\n
    \\n

    \\n {{ content('creditcard.hi', {userName: auth.first_name ? auth.first_name : auth.email}) }}\\n \\n \\n \\n

    \\n
    \\n
    \\n
    \\n

    \\n {{ content('checkoutIncentive.header', {incentiveAmount: incentiveAmount}) }}\\n
    \\n {{ content('checkoutIncentive.body') }}\\n

    \\n \\n {{ content('offers.seeTermsText') }}\\n \\n
    \\n
    \\n
    \\n\\n

    \\n {{ content('creditcard.hi', {userName: auth.first_name ? auth.first_name : auth.email}) }}\\n \\n \\n \\n

    \\n \\n
    \\n\\n
    \\n \\n
    \\n\\n
    \\n \\n
    \\n
    \\n
    \\n
    \\n \\n
    \\n \\n
    \\n
    \\n
    \\n
    \\n\"\n\n/***/ })\n\n});\n\n\n// WEBPACK FOOTER //\n// js/0.113329050bef597b9cba.js","module.exports = \"
    \\n \\n
    \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/noop-loader!../node_modules/xo-ui-components/src/spinner-button/template.html\n// module id = ../node_modules/noop-loader/index.js!../node_modules/xo-ui-components/src/spinner-button/template.html\n// module chunks = 0 1 8 9 10 11 38 39 40 41","\n\nexports.__esModule = true;\nexports.$xoAddAddressComponent = undefined;\n\nvar _angular = require('angular');\n\nvar _squid = require('squid');\n\nrequire('xo-ui-components/src/dropdown/directive');\n\nrequire('xo-ui-components/src/dropdown-multiline/directive');\n\nrequire('xo-ui-components/src/error-tooltip/directive');\n\nrequire('xo-ui-components/src/prefix-attrs-with/directive');\n\nrequire('xo-form-components/src/name-input/directive');\n\nvar _index = require('xo-models/src/address/index');\n\nrequire('xo-form-components/src/zipcode/directive');\n\nrequire('xo-models/src/shippingMethod/index');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _logger = require('xo-beaver/dist/logger');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar $xoAddAddressComponent = exports.$xoAddAddressComponent = _squid.$Component.extend('$xoAddAddressComponent', {\n tag: 'xo-add-address',\n template: _template2['default'],\n props: {\n address: {\n type: 'var',\n required: false\n },\n isShipping: {\n type: 'var',\n required: false\n },\n country: {\n type: 'var',\n required: false\n },\n metadata: {\n type: 'str',\n required: false\n },\n hideButtonHandler: {\n type: 'var',\n required: false\n },\n hideCep: {\n type: 'var',\n required: false\n },\n hideAddPreferred: {\n type: 'var',\n required: false\n },\n hideName: {\n type: 'var',\n required: false\n },\n triggerZipCodeBlur: {\n type: 'var',\n required: false\n },\n triggerZipCodeKeyPress: {\n type: 'var',\n required: false\n },\n renderBillingAddCheckbox: {\n type: 'var',\n required: false\n }\n },\n controller: ['$scope', '$populate', '$CheckoutAppDataModel', '$ShippingRuleSummaryModel', '$CheckoutPayeeModel', '$CheckoutCartModel', function ($scope, $populate, $CheckoutAppDataModel, $ShippingRuleSummaryModel, $CheckoutPayeeModel, $CheckoutCartModel) {\n // eslint-disable-line max-statements\n\n $scope.token = _angular.$rootScope.token;\n\n $populate($scope, {\n checkoutCart: $CheckoutCartModel.instance($scope.token).retrieve(),\n checkoutAppData: $CheckoutAppDataModel.instance($scope.token).retrieve(),\n checkoutPayee: $CheckoutPayeeModel.instance($scope.token).retrieve()\n }).then(function () {\n // Snt Flow check\n if ($scope.checkoutAppData.is_snt_supported()) {\n $populate($scope, {\n profileRulesSummary: $ShippingRuleSummaryModel.instance($scope.token).retrieve({\n params: {\n merchant_id: $scope.checkoutPayee.merchant.id,\n currency_code: $scope.checkoutCart.purchase.amounts.total.currency_code\n }\n })\n }).then(function () {\n // Variable to determine the county is optional or required for GB SNT and CALLBACK flows.\n // with out being the county required, shipping methods won't populate.\n // JIRA ID : PPPLMER-71514\n _logger.$logger.info('setting_snt_or_callback_flow_for_snt');\n $scope.snt_or_callback_flow = !!($scope.profileRulesSummary && $scope.profileRulesSummary.isSnTEnabled);\n });\n } else if ($scope.checkoutCart.instantUpdateIntegration) {\n _logger.$logger.info('setting_snt_or_callback_flow_for_callback');\n $scope.snt_or_callback_flow = true;\n }\n });\n\n var sortStates = void 0;\n var country = $scope.country || $scope.address && $scope.address.country;\n\n $scope.country = country;\n $scope.locale = _squid.$locale;\n $scope.metadata = _squid.$MetadataModel.create();\n\n // If the user changes their shipping/billing address country, fetch that metadata (if needed) and re-render.\n $scope.$watch('country', function () {\n $scope.metadata.choose($scope.country, $scope.locale.lang);\n onCountryChange();\n });\n\n function onCountryChange() {\n sortStates = (0, _squid.$feature)('sortStatesForAddress', false, $scope.country);\n\n if (sortStates) {\n getSortedStateList();\n }\n }\n\n onCountryChange();\n\n // If the user changes languagle toggle, fetch that metadata (if needed) and re-render.\n $scope.$on('contentChange', function () {\n $scope.metadata.choose($scope.country, $scope.locale.lang);\n });\n\n /**\n * Prefix to use for `id`, `name`, and `for` attributes. This is needed because Xoon will sometimes display both billing\n * and shipping address forms on the same page and without a prefix there will be duplicte `id`s and `name`s on the page.\n */\n $scope.attrPrefix = $scope.isShipping ? 'shipping' : 'billing';\n\n $scope.$watch('address.state', function () {\n _angular.$rootScope.$emit($scope.attrPrefix + 'AddressStateChange', $scope.address);\n });\n\n $scope.normalizeCountry = function (countryCode) {\n return (0, _squid.$feature)('AddressFormat', countryCode, countryCode) || countryCode;\n };\n\n $scope.isAddPreferred = (0, _squid.$feature)('preferredShipping', false, $scope.country) && $scope.isShipping;\n $scope.isAddressLookupEnabled = (0, _squid.$feature)('addressLookup', false, $scope.country);\n $scope.isShowLookupFields = $scope.isAddressLookupEnabled;\n\n if ($scope.isShowLookupFields) {\n // Show the Address Lookup Fields only when the hideButtonHandler function is passed by the caller.\n if ($scope.hideButtonHandler) {\n $scope.hideButtonHandler(true);\n } else {\n $scope.isShowLookupFields = false;\n }\n }\n\n function getSortedStateList() {\n var states = _squid.$locale.content.get(sortStates, {});\n var statesList = [];\n\n angular.forEach(states, function (key, value) {\n statesList.push({ code: value, sname: key });\n });\n statesList.sort(function (a, b) {\n return a.sname.localeCompare(b.sname);\n });\n\n $scope.sortedStatesList = statesList;\n }\n\n $scope.formatZip = function () {\n var unformatted = $scope.address.postal_code && $scope.address.postal_code.replace(/[^0-9]/gi, '');\n var formatted = [['', unformatted.slice(0, 3)], ['-', unformatted.slice(3)]].map(function (x) {\n return x[1] && x[0] + x[1] || '';\n }).join('');\n\n $scope.address.postal_code = formatted;\n };\n\n function getAddress(address) {\n var COMMA = ', ';\n var SPACE = ' ';\n var line1 = void 0;\n var line2 = void 0;\n\n function prefix(str, prefixStr) {\n if (str) {\n return (prefixStr ? prefixStr : '') + str;\n }\n return '';\n }\n\n if (!address.deliveryAddresses || angular.isArray(address.deliveryAddresses) && address.deliveryAddresses.length === 0) {\n // if deliveryAddresses is not an array or is empty\n // line would be empty, hence return to caller.\n return;\n }\n\n var array = address.deliveryAddresses;\n\n if (array.length > 1) {\n // populate line2 from the last element\n line2 = array.pop();\n }\n line1 = array.join(COMMA);\n\n var displayLine1 = line1 + prefix(line2, COMMA);\n var displayLine2 = prefix(address.city) + prefix(address.state, COMMA) + prefix(address.postal_code, SPACE);\n var displayLine3 = prefix(address.country);\n\n return {\n line1: line1,\n line2: line2,\n city: address.city,\n state: address.state,\n postal_code: address.postal_code,\n country: address.country,\n displayLine1: displayLine1,\n displayLine2: displayLine2,\n displayLine3: displayLine3,\n dropDownAddress: displayLine1 + prefix(displayLine2, ' \\\\n ') + prefix(displayLine3, ' \\\\n ')\n };\n }\n\n function populateAddressFormFields(address) {\n $scope.address.line1 = address.line1;\n $scope.address.line2 = address.line2;\n $scope.address.city = address.city;\n $scope.address.state = address.state;\n $scope.address.postal_code = address.postal_code;\n $scope.address.neighborhood = address.neighborhood;\n }\n\n /**\n * Show error message and display the full-address fields\n */\n function populateErrorMessage() {\n var messages = [];\n\n messages.push($scope.locale.content.get('addressBook.lookupError'));\n $scope.lookupFailureMessage = {\n msgs: messages,\n type: 'warning'\n };\n $scope.isShowLookupFields = false;\n $scope.isLookupFailure = true;\n }\n\n function processLookupResult(list) {\n if (list.length > 1) {\n // Show drop-down list of all addresses\n $scope.isLookupSuccess = true;\n $scope.isShowLookupDropDown = true;\n $scope.lookupAddressList = list.map(function (addr) {\n return getAddress(addr);\n });\n } else if (list.length === 1) {\n // Show single address component\n $scope.isLookupSuccess = true;\n $scope.isShowLookupDropDown = false;\n\n var address = getAddress(list[0]);\n\n $scope.singleAddress = address;\n populateAddressFormFields(address);\n } else {\n populateErrorMessage();\n }\n }\n\n if ($scope.address) {\n $scope.lastPrefilledZip = $scope.address.postal_code;\n }\n\n $scope.prefill = function () {\n var cepPattern = /^(\\d{5}-\\d{3}|\\d{5}|\\d{8})$/;\n var first_name = void 0;\n var last_name = void 0;\n\n if ($scope.lastPrefilledZip === $scope.address.postal_code || !cepPattern.test($scope.address.postal_code)) {\n return;\n }\n\n if ($scope.isShipping) {\n first_name = $scope.address.first_name;\n last_name = $scope.address.last_name;\n }\n\n $scope.prefillAddress = new _index.$PrefillAddressModel({\n id: $scope.token,\n address: {\n country: $scope.address.country,\n postal_code: $scope.address.postal_code\n }\n });\n\n return $scope.prefillAddress.save({\n data: $scope.prefillAddress,\n success: function success(result) {\n if (result) {\n populateAddressFormFields(result);\n $scope.lastPrefilledZip = $scope.address.postal_code;\n if ($scope.isShipping) {\n $scope.address.first_name = first_name;\n $scope.address.last_name = last_name;\n }\n }\n }\n });\n };\n\n $scope.findAddress = function () {\n $scope.lookupAddress = _index.$PrefillAddressModel.create($scope.token, {\n address: {\n country: $scope.address.country,\n postal_code: $scope.address.postal_code,\n house_number: $scope.address.house_number,\n building_name: $scope.address.building_name\n }\n });\n\n if (document.querySelector('#lookupZip.ng-invalid')) {\n document.querySelector('#addressLookupFields').classList.add('validated');\n } else {\n $scope.isLookupProcessing = true;\n $scope.lookupAddress.save({\n data: $scope.lookupAddress,\n silent: true,\n success: function success(result) {\n processLookupResult(result);\n $scope.hideButtonHandler(false);\n },\n contingencies: {\n INTERNAL_ERROR: populateErrorMessage\n }\n });\n }\n };\n\n $scope.changeAddressDropDown = function () {\n populateAddressFormFields($scope.address.selectedAddress);\n };\n\n $scope.showFullAddress = function () {\n $scope.isShowLookupFields = false;\n $scope.hideButtonHandler(false);\n };\n\n /**\n * Pass an array of group names to retrieve the list of states\n * e.g. ['england', 'northernIreland', 'scotland', 'wales', 'ukOffshoreDependencies']\n */\n var stateNamesInGroup = [];\n\n $scope.retrieveStateNamesInGroup = function (groups) {\n if (stateNamesInGroup.length) {\n // Angular keeps watching for this method as its used in ng-model, hence return cached data.\n return stateNamesInGroup;\n }\n var content = _squid.$locale.content;\n\n angular.forEach(groups, function (group) {\n var groupName = content.common[group];\n var statesList = content[group];\n\n angular.forEach(statesList, function (value, key) {\n stateNamesInGroup.push({\n key: key,\n value: value,\n group: groupName\n });\n });\n });\n return stateNamesInGroup;\n };\n\n $scope.zipCodeBlur = function () {\n if ($scope.triggerZipCodeBlur) {\n _angular.$rootScope.$emit('zip_code_blur');\n }\n };\n\n $scope.zipCodeKeyPress = function (event) {\n if ($scope.triggerZipCodeKeyPress) {\n _angular.$rootScope.$emit('zip_code_keypress', { event: event });\n }\n };\n }]\n});\n\nangular.value(\"$xoAddAddressComponent\", $xoAddAddressComponent);\n_angular.$rootScope;\n\n_squid.$Component;\n\n_squid.$feature;\n\n_squid.$locale;\n\n_squid.$MetadataModel;\n\n_index.$PrefillAddressModel;\n\n_logger.$logger;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-address-components/src/add-address/directive.js\n// module id = ../node_modules/xo-address-components/src/add-address/directive.js\n// module chunks = 0 8 9 10 11 12 13 14 15 16 38 39 40 42 43 44 45 47","module.exports = \"
    \\n \\n
    \\n
    \\n \\n\\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \\n\\n
    \\n \\n
    \\n
    \\n
    \\n {{ content('addressBook.address') }}\\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n \\n \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n {{ content('addBillingAddress.lookupTitle') }}\\n {{ content('addressBook.enterFullAddress') }}\\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n \\n \\n
    \\n \\n
    \\n
    \\n
    \\n {{ content('addressBook.address') }}\\n \\n {{ content('common.change') }}\\n \\n
    \\n
    \\n\\n \\n
    \\n
    \\n {{ singleAddress.displayLine1 }}
    \\n {{ singleAddress.displayLine2 }}
    \\n {{ singleAddress.displayLine3 }}\\n
    \\n
    \\n
    \\n \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n \\n
    \\n \\n \\n
    \\n
    \\n \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \\n \\n\\n
    \\n \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n \\n
    \\n \\n \\n
    \\n
    \\n
    \\n \\n
    \\n
    \\n \\n
    \\n
    \\n \\n \\n
    \\n\\n
    \\n \\n \\n
    \\n\\n
    \\n \\n \\n
    \\n\\n
    \\n \\n \\n
    \\n
    \\n
    \\n
    \\n\\n
    \\n \\n \\n
    \\n\\n
    \\n \\n \\n
    \\n
    \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-address-components/src/add-address/template.html\n// module id = ../node_modules/xo-address-components/src/add-address/template.html\n// module chunks = 0 8 9 10 11 12 13 14 15 16 38 39 40 42 43 44 45 47","\n\nvar _angular = require('angular');\n\nvar _squid = require('squid');\n\nvar _index = require('xo-models/src/address/index');\n\nrequire('xo-page-components/src/aside-header/directive');\n\nrequire('xo-tray-height/dist/directive');\n\nrequire('./styles');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoAddressNormalization', function () {\n return {\n template: _template2['default'],\n scope: {\n id: '=?',\n address: '=?',\n doneFn: '=?',\n sidebar: '=?',\n hideBackButton: '=?'\n },\n\n controller: ['$scope', function ($scope) {\n _squid.$util.assert($scope.address, 'Original Address cannot be empty');\n\n $scope.showNormalization = false;\n\n var normalize = (0, _squid.$feature)('addressNormalization', false, $scope.address.country);\n if (!normalize) {\n $scope.doneFn($scope.address, false);\n return;\n }\n\n var userEnteredAddress;\n var addrFormat = (0, _squid.$feature)('FormatAddressForNormalization', $scope.address.country, $scope.address.country);\n\n $scope.addressSelected = 'normalizedAddress';\n $scope.transitionName = 'address_normalization_normalizedAddress';\n\n // Brazil specific format\n if (addrFormat === 'AddressBR') {\n userEnteredAddress = angular.fromJson(angular.toJson($scope.address));\n userEnteredAddress.line1 = $scope.address.line1 + ' ' + $scope.address.streetNumber;\n userEnteredAddress.line2 = $scope.address.neighborhood;\n }\n\n $scope.servAddress = userEnteredAddress ? userEnteredAddress : $scope.address;\n $scope.servAddress.normalization_status = 'UNNORMALIZED_USER_PREFERRED';\n\n $scope.addressNormalization = new _index.$AddressNormalizationModel({\n id: $scope.id,\n address: $scope.servAddress\n });\n\n function centerLightBox() {\n var element = $('#lbox');\n if (!element.length) {\n return;\n }\n\n var windowElement = $(window);\n var lboxContainerElem = $('#lboxContainer');\n element.css('top', Math.max(0, (windowElement.height() - element.outerHeight()) / 2) + 'px');\n element.css('width', '65%');\n var computedLeft = (windowElement.width() - element.outerWidth()) / 2;\n var leftBound = lboxContainerElem.offset().left + lboxContainerElem.width() * 0.1;\n var elementLeft = computedLeft < leftBound ? leftBound : computedLeft;\n if (computedLeft < leftBound) {\n element.css('width', lboxContainerElem.width() * 0.8);\n }\n element.css('left', Math.max(0, elementLeft) + 'px');\n return element;\n }\n\n function trinityResponseCallback() {\n $scope.showNormalization = true;\n\n // default behavior of $timeout with no 2nd param is to wait for dom to finish rendering before executing callback\n (0, _angular.$timeout)(function () {\n centerLightBox();\n $(window).resize(centerLightBox);\n });\n }\n\n $scope.addressNormalization.save({\n data: $scope.addressNormalization,\n\n contingencies: {\n VALIDATION_ERROR: function VALIDATION_ERROR() {\n trinityResponseCallback();\n $scope.transitionName = 'address_normalization_enteredAddress';\n return;\n }\n },\n\n success: function success(result) {\n trinityResponseCallback();\n if (result === false) {\n // trinity doesn't find any match\n $scope.transitionName = 'address_normalization_enteredAddress';\n return;\n }\n $scope.normalizedAddress = result;\n $scope.normalizedAddress.normalization_status = 'NORMALIZED';\n\n if (addrFormat === 'AddressBR') {\n $scope.normalizedAddress.line1 = $scope.normalizedAddress.streetName + ' ' + $scope.normalizedAddress.streetNumber;\n $scope.normalizedAddress.line2 = $scope.normalizedAddress.neighborhood;\n }\n\n // if the two addresses equal, no need to show the panel\n if ($scope.isEqual($scope.normalizedAddress, $scope.servAddress)) {\n if ($scope.servAddress.preferred_address) {\n $scope.normalizedAddress.preferred_address = true;\n }\n\n if (addrFormat === 'AddressBR' && $scope.address.line2) {\n $scope.normalizedAddress.line1 = $scope.normalizedAddress.line1 + ' ' + $scope.address.line2;\n }\n $scope.callback($scope.normalizedAddress, false);\n } else if (addrFormat === 'AddressBR' && $scope.address.line2) {\n $scope.normalizedAddress.line1 = $scope.normalizedAddress.line1 + ' ' + $scope.address.line2;\n }\n },\n\n error: trinityResponseCallback\n });\n\n // make space and case insensitive. sub empty vals for undefined.\n function desensitizedAddress(addr) {\n for (var key in addr) {\n var val = addr[key];\n if (addr.hasOwnProperty(key)) {\n if (val && val.length) {\n addr[key] = val.trim().toLowerCase();\n } else {\n addr[key] = undefined;\n }\n }\n }\n return addr;\n }\n\n // check if the two address are the same\n $scope.isEqual = function (address1, address2) {\n var addressOne = desensitizedAddress(JSON.parse(JSON.stringify(address1)));\n var addressTwo = desensitizedAddress(JSON.parse(JSON.stringify(address2)));\n\n if (!addressOne || !addressTwo) {\n return false;\n }\n\n return addressOne.line1 === addressTwo.line1 && addressOne.line2 === addressTwo.line2 && addressOne.city === addressTwo.city && addressOne.state === addressTwo.state && addressOne.postal_code === addressTwo.postal_code && addressOne.country === addressTwo.country;\n };\n\n // Australia displays address line2 first\n $scope.isLine2First = function () {\n return $scope.address.country === 'AU';\n };\n\n $scope.onBack = function () {\n $scope.callback($scope.address, true);\n };\n\n $scope.selection = function (value) {\n $scope.transitionName = 'address_normalization_' + value;\n };\n\n $scope.onContinue = function () {\n $scope.addressSelected = this.addressNormalizationForm.addressSelected;\n\n if ($scope.addressSelected && $scope.addressSelected.$modelValue === 'normalizedAddress') {\n if ($scope.servAddress.preferred_address) {\n $scope.normalizedAddress.preferred_address = true;\n }\n $scope.callback($scope.normalizedAddress, false);\n } else {\n $scope.servAddress.normalization_status = 'UNNORMALIZED_USER_PREFERRED';\n if (addrFormat === 'AddressBR' && $scope.address.line2) {\n $scope.servAddress.line1 = $scope.servAddress.line1 + ' ' + $scope.address.line2;\n }\n $scope.callback($scope.servAddress, false);\n }\n };\n\n $scope.callback = function (address, isBack) {\n $scope.doneFn(address, isBack);\n };\n }]\n };\n});\n\n_angular.$timeout;\n\n_squid.$feature;\n\n_squid.$util;\n\n_index.$AddressNormalizationModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-address-components/src/address-normalization/directive.js\n// module id = ../node_modules/xo-address-components/src/address-normalization/directive.js\n// module chunks = 0 8 9 10 11 14 16 38 39 40 42 44 45","\n\nexports.__esModule = true;\nexports.$AddressNormalizationRoute = undefined;\n\nvar _squid = require('squid');\n\nrequire('./directive');\n\nvar $AddressNormalizationRoute = exports.$AddressNormalizationRoute = _squid.$ComponentRoute.extend('AddressNormalizationRoute', {\n name: 'addressNormalization',\n titleContent: 'addressNormalization.addressmatch',\n directive: 'xo-address-normalization',\n trackingData: {\n fptiState: 'address_normalization',\n buzname: {\n 'fullpage': {\n 'pagename': '%::address_normalization',\n 'pagename2': '%::address_normalization:member:hermes:',\n 'version': 'member:%:'\n }\n }\n },\n loginRequired: true,\n\n children: []\n});\n\nangular.value(\"$AddressNormalizationRoute\", $AddressNormalizationRoute);\n_squid.$ComponentRoute;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-address-components/src/address-normalization/route.js\n// module id = ../node_modules/xo-address-components/src/address-normalization/route.js\n// module chunks = 0 8 9 10 11 14 16 38 39 40 42 44 45","module.exports = \"
    \\n \\n
    \\n
    \\n
    \\n

    {{ content('addressNormalization.title') }}

    \\n

    {{ content('addressNormalization.intro') }}

    \\n
    \\n

    \\n \\n
    \\n
    \\n

    \\n\\n \\n
    \\n
    \\n
    \\n

    {{ content('addressNormalization.noaddressmatchTitle') }}

    \\n

    {{ content('addressNormalization.noaddressmatchMsg') }}

    \\n \\n
    \\n

    {{ content('addressNormalization.addressyouenter') }}

    \\n
    \\n
    \\n {{servAddress.line2}} {{servAddress.line1}},\\n
    \\n
    \\n
    {{servAddress.line1}}, {{address.line2}}, {{servAddress.line2}}
    \\n
    {{servAddress.line1}}, {{servAddress.line2}}
    \\n
    \\n
    \\n {{servAddress.city}}, {{servAddress.state}}\\n {{servAddress.postal_code}}, {{content('countryList.'+servAddress.country)}}\\n
    \\n
    \\n
    \\n
    \\n
    \\n \\n \\n
    \\n
    \\n \\n
    \\n
    \\n
    \\n
    \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-address-components/src/address-normalization/template.html\n// module id = ../node_modules/xo-address-components/src/address-normalization/template.html\n// module chunks = 0 8 9 10 11 14 16 38 39 40 42 44 45","\n\nexports.__esModule = true;\n\nvar _squid = require('squid');\n\nrequire('xo-ui-components/src/error-tooltip/directive');\n\nrequire('xo-ui-components/src/floating-label/directive');\n\nrequire('xo-ui-components/src/prefix-attrs-with/directive');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoNameInput', {\n tag: 'xo-name-input',\n\n template: _template2['default'],\n\n props: {\n attrPrefix: {\n required: false,\n type: 'var'\n },\n country: {\n required: false,\n type: 'str'\n },\n user: {\n required: false,\n type: 'var'\n }\n },\n\n lifecycle: {\n enter: function enter() {\n var _this = this;\n\n this.locale = _squid.$locale;\n this.metadata = _squid.$MetadataModel.create();\n\n var handleCountryChange = function handleCountryChange() {\n _this.metadata.choose(_this.country || _squid.$locale.country, _squid.$locale.lang);\n };\n\n this.$watch('country', handleCountryChange);\n }\n }\n});\n\n\n_squid.$Component;\n\n_squid.$locale;\n\n_squid.$MetadataModel;\nmodule.exports = exports['default'];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-form-components/src/name-input/directive.js\n// module id = ../node_modules/xo-form-components/src/name-input/directive.js\n// module chunks = 0 8 9 10 11 12 13 14 15 16 38 39 40 42 43 44 45 47","module.exports = \"
    \\n
    \\n \\n
    \\n
    \\n \\n \\n
    \\n
    \\n\\n \\n
    \\n
    \\n \\n \\n
    \\n
    \\n
    \\n\\n
    \\n \\n
    \\n \\n \\n
    \\n\\n \\n
    \\n \\n \\n
    \\n
    \\n
    \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-form-components/src/name-input/template.html\n// module id = ../node_modules/xo-form-components/src/name-input/template.html\n// module chunks = 0 8 9 10 11 12 13 14 15 16 38 39 40 42 43 44 45 47","\n\ndefine([], function () {\n return {\n 'AC': {\n 'status': 'reserved',\n 'phoneCountryCode': '247',\n 'showCountryCodeList': false\n },\n 'AD': {\n 'status': 'assigned',\n 'phoneCountryCode': '376',\n 'showCountryCodeList': false\n },\n 'AE': {\n 'status': 'assigned',\n 'phoneCountryCode': '971',\n 'showCountryCodeList': false\n },\n 'AF': {\n 'status': 'assigned',\n 'phoneCountryCode': '93',\n 'showCountryCodeList': false\n },\n 'AG': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'AI': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'AL': {\n 'status': 'assigned',\n 'phoneCountryCode': '355',\n 'showCountryCodeList': false\n },\n 'AM': {\n 'status': 'assigned',\n 'phoneCountryCode': '374',\n 'showCountryCodeList': false\n },\n 'AN': {\n 'status': 'assigned',\n 'phoneCountryCode': '599',\n 'showCountryCodeList': false\n },\n 'AO': {\n 'status': 'assigned',\n 'phoneCountryCode': '244',\n 'showCountryCodeList': false\n },\n 'AQ': {\n 'status': 'assigned',\n 'phoneCountryCode': '672',\n 'showCountryCodeList': false\n },\n 'AR': {\n 'status': 'assigned',\n 'phoneCountryCode': '54',\n 'showCountryCodeList': false\n },\n 'AS': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'AT': {\n 'status': 'assigned',\n 'phoneCountryCode': '43',\n 'showCountryCodeList': true\n },\n 'AU': {\n 'status': 'assigned',\n 'phoneCountryCode': '61',\n 'showCountryCodeList': true\n },\n 'AW': {\n 'status': 'assigned',\n 'phoneCountryCode': '297',\n 'showCountryCodeList': false\n },\n 'AZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '994',\n 'showCountryCodeList': false\n },\n 'BA': {\n 'status': 'assigned',\n 'phoneCountryCode': '387',\n 'showCountryCodeList': false\n },\n 'BB': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'BD': {\n 'status': 'assigned',\n 'phoneCountryCode': '880',\n 'showCountryCodeList': false\n },\n 'BE': {\n 'status': 'assigned',\n 'phoneCountryCode': '32',\n 'showCountryCodeList': true\n },\n 'BF': {\n 'status': 'assigned',\n 'phoneCountryCode': '226',\n 'showCountryCodeList': false\n },\n 'BG': {\n 'status': 'assigned',\n 'phoneCountryCode': '359',\n 'showCountryCodeList': false\n },\n 'BH': {\n 'status': 'assigned',\n 'phoneCountryCode': '973',\n 'showCountryCodeList': false\n },\n 'BI': {\n 'status': 'assigned',\n 'phoneCountryCode': '257',\n 'showCountryCodeList': false\n },\n 'BJ': {\n 'status': 'assigned',\n 'phoneCountryCode': '229',\n 'showCountryCodeList': false\n },\n 'BL': {\n 'status': 'assigned',\n 'phoneCountryCode': '590',\n 'showCountryCodeList': false\n },\n 'BM': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'BN': {\n 'status': 'assigned',\n 'phoneCountryCode': '673',\n 'showCountryCodeList': false\n },\n 'BO': {\n 'status': 'assigned',\n 'phoneCountryCode': '591',\n 'showCountryCodeList': false\n },\n 'BQ': {\n 'status': 'assigned',\n 'phoneCountryCode': '599',\n 'showCountryCodeList': false\n },\n 'BR': {\n 'status': 'assigned',\n 'phoneCountryCode': '55',\n 'showCountryCodeList': false\n },\n 'BS': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'BT': {\n 'status': 'assigned',\n 'phoneCountryCode': '975',\n 'showCountryCodeList': false\n },\n 'BV': {\n 'status': 'assigned'\n },\n 'BW': {\n 'status': 'assigned',\n 'phoneCountryCode': '267',\n 'showCountryCodeList': false\n },\n 'BY': {\n 'status': 'assigned',\n 'phoneCountryCode': '375',\n 'showCountryCodeList': false\n },\n 'BZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '501',\n 'showCountryCodeList': false\n },\n 'C2': {\n 'status': 'assigned',\n 'phoneCountryCode': '86',\n 'showCountryCodeList': false\n },\n 'CA': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'CC': {\n 'status': 'assigned',\n 'phoneCountryCode': '61',\n 'showCountryCodeList': false\n },\n 'CD': {\n 'status': 'assigned',\n 'phoneCountryCode': '243',\n 'showCountryCodeList': false\n },\n 'CF': {\n 'status': 'assigned',\n 'phoneCountryCode': '236',\n 'showCountryCodeList': false\n },\n 'CG': {\n 'status': 'assigned',\n 'phoneCountryCode': '242',\n 'showCountryCodeList': false\n },\n 'CH': {\n 'status': 'assigned',\n 'phoneCountryCode': '41',\n 'showCountryCodeList': true\n },\n 'CI': {\n 'status': 'assigned',\n 'phoneCountryCode': '225',\n 'showCountryCodeList': false\n },\n 'CK': {\n 'status': 'assigned',\n 'phoneCountryCode': '682',\n 'showCountryCodeList': false\n },\n 'CL': {\n 'status': 'assigned',\n 'phoneCountryCode': '56',\n 'showCountryCodeList': false\n },\n 'CM': {\n 'status': 'assigned',\n 'phoneCountryCode': '237',\n 'showCountryCodeList': false\n },\n 'CN': {\n 'status': 'assigned',\n 'phoneCountryCode': '86',\n 'showCountryCodeList': false\n },\n 'CO': {\n 'status': 'assigned',\n 'phoneCountryCode': '57',\n 'showCountryCodeList': false\n },\n 'CR': {\n 'status': 'assigned',\n 'phoneCountryCode': '506',\n 'showCountryCodeList': false\n },\n 'CU': {\n 'status': 'assigned',\n 'phoneCountryCode': '53',\n 'showCountryCodeList': false\n },\n 'CV': {\n 'status': 'assigned',\n 'phoneCountryCode': '238',\n 'showCountryCodeList': false\n },\n 'CW': {\n 'status': 'assigned',\n 'phoneCountryCode': '599',\n 'showCountryCodeList': false\n },\n 'CX': {\n 'status': 'assigned',\n 'phoneCountryCode': '61',\n 'showCountryCodeList': false\n },\n 'CY': {\n 'status': 'assigned',\n 'phoneCountryCode': '357',\n 'showCountryCodeList': false\n },\n 'CZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '420',\n 'showCountryCodeList': false\n },\n 'DE': {\n 'status': 'assigned',\n 'phoneCountryCode': '49',\n 'showCountryCodeList': false\n },\n 'DJ': {\n 'status': 'assigned',\n 'phoneCountryCode': '253',\n 'showCountryCodeList': false\n },\n 'DK': {\n 'status': 'assigned',\n 'phoneCountryCode': '45',\n 'showCountryCodeList': true\n },\n 'DM': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'DO': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'DZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '213',\n 'showCountryCodeList': false\n },\n 'EC': {\n 'status': 'assigned',\n 'phoneCountryCode': '593',\n 'showCountryCodeList': false\n },\n 'EE': {\n 'status': 'assigned',\n 'phoneCountryCode': '372',\n 'showCountryCodeList': false\n },\n 'EG': {\n 'status': 'assigned',\n 'phoneCountryCode': '20',\n 'showCountryCodeList': false\n },\n 'EH': {\n 'status': 'assigned',\n 'phoneCountryCode': '212',\n 'showCountryCodeList': false\n },\n 'ER': {\n 'status': 'assigned',\n 'phoneCountryCode': '291',\n 'showCountryCodeList': false\n },\n 'ES': {\n 'status': 'assigned',\n 'phoneCountryCode': '34',\n 'showCountryCodeList': false\n },\n 'ET': {\n 'status': 'assigned',\n 'phoneCountryCode': '251',\n 'showCountryCodeList': false\n },\n 'FI': {\n 'status': 'assigned',\n 'phoneCountryCode': '358',\n 'showCountryCodeList': false\n },\n 'FJ': {\n 'status': 'assigned',\n 'phoneCountryCode': '679',\n 'showCountryCodeList': false\n },\n 'FK': {\n 'status': 'assigned',\n 'phoneCountryCode': '500',\n 'showCountryCodeList': false\n },\n 'FM': {\n 'status': 'assigned',\n 'phoneCountryCode': '691',\n 'showCountryCodeList': false\n },\n 'FO': {\n 'status': 'assigned',\n 'phoneCountryCode': '298',\n 'showCountryCodeList': false\n },\n 'FR': {\n 'status': 'assigned',\n 'phoneCountryCode': '33',\n 'showCountryCodeList': false\n },\n 'GA': {\n 'status': 'assigned',\n 'phoneCountryCode': '241',\n 'showCountryCodeList': false\n },\n 'GB': {\n 'status': 'assigned',\n 'phoneCountryCode': '44',\n 'showCountryCodeList': false\n },\n 'GD': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'GE': {\n 'status': 'assigned',\n 'phoneCountryCode': '995',\n 'showCountryCodeList': false\n },\n 'GF': {\n 'status': 'assigned',\n 'phoneCountryCode': '594',\n 'showCountryCodeList': false\n },\n 'GG': {\n 'status': 'assigned',\n 'phoneCountryCode': '44',\n 'showCountryCodeList': false\n },\n 'GH': {\n 'status': 'assigned',\n 'phoneCountryCode': '233',\n 'showCountryCodeList': false\n },\n 'GI': {\n 'status': 'assigned',\n 'phoneCountryCode': '350',\n 'showCountryCodeList': false\n },\n 'GL': {\n 'status': 'assigned',\n 'phoneCountryCode': '299',\n 'showCountryCodeList': false\n },\n 'GM': {\n 'status': 'assigned',\n 'phoneCountryCode': '220',\n 'showCountryCodeList': false\n },\n 'GN': {\n 'status': 'assigned',\n 'phoneCountryCode': '224',\n 'showCountryCodeList': false\n },\n 'GP': {\n 'status': 'assigned',\n 'phoneCountryCode': '590',\n 'showCountryCodeList': false\n },\n 'GQ': {\n 'status': 'assigned',\n 'phoneCountryCode': '240',\n 'showCountryCodeList': false\n },\n 'GR': {\n 'status': 'assigned',\n 'phoneCountryCode': '30',\n 'showCountryCodeList': false\n },\n 'GS': {\n 'status': 'assigned',\n 'phoneCountryCode': '500',\n 'showCountryCodeList': false\n },\n 'GT': {\n 'status': 'assigned',\n 'phoneCountryCode': '502',\n 'showCountryCodeList': false\n },\n 'GU': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'GW': {\n 'status': 'assigned',\n 'phoneCountryCode': '245',\n 'showCountryCodeList': false\n },\n 'GY': {\n 'status': 'assigned',\n 'phoneCountryCode': '592',\n 'showCountryCodeList': false\n },\n 'HK': {\n 'status': 'assigned',\n 'phoneCountryCode': '852',\n 'showCountryCodeList': true\n },\n 'HM': {\n 'status': 'assigned'\n },\n 'HN': {\n 'status': 'assigned',\n 'phoneCountryCode': '504',\n 'showCountryCodeList': false\n },\n 'HR': {\n 'status': 'assigned',\n 'phoneCountryCode': '385',\n 'showCountryCodeList': false\n },\n 'HT': {\n 'status': 'assigned',\n 'phoneCountryCode': '509',\n 'showCountryCodeList': false\n },\n 'HU': {\n 'status': 'assigned',\n 'phoneCountryCode': '36',\n 'showCountryCodeList': false\n },\n 'ID': {\n 'status': 'assigned',\n 'phoneCountryCode': '62',\n 'showCountryCodeList': false\n },\n 'IE': {\n 'status': 'assigned',\n 'phoneCountryCode': '353',\n 'showCountryCodeList': false\n },\n 'IL': {\n 'status': 'assigned',\n 'phoneCountryCode': '972',\n 'showCountryCodeList': false\n },\n 'IM': {\n 'status': 'assigned',\n 'phoneCountryCode': '44',\n 'showCountryCodeList': false\n },\n 'IN': {\n 'status': 'assigned',\n 'phoneCountryCode': '91',\n 'showCountryCodeList': false\n },\n 'IO': {\n 'status': 'assigned',\n 'phoneCountryCode': '246',\n 'showCountryCodeList': false\n },\n 'IQ': {\n 'status': 'assigned',\n 'phoneCountryCode': '964',\n 'showCountryCodeList': false\n },\n 'IR': {\n 'status': 'assigned',\n 'phoneCountryCode': '98',\n 'showCountryCodeList': false\n },\n 'IS': {\n 'status': 'assigned',\n 'phoneCountryCode': '354',\n 'showCountryCodeList': false\n },\n 'IT': {\n 'status': 'assigned',\n 'phoneCountryCode': '39',\n 'showCountryCodeList': false\n },\n 'JE': {\n 'status': 'assigned',\n 'phoneCountryCode': '44',\n 'showCountryCodeList': false\n },\n 'JM': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'JO': {\n 'status': 'assigned',\n 'phoneCountryCode': '962',\n 'showCountryCodeList': false\n },\n 'JP': {\n 'status': 'assigned',\n 'phoneCountryCode': '81',\n 'showCountryCodeList': false\n },\n 'KE': {\n 'status': 'assigned',\n 'phoneCountryCode': '254',\n 'showCountryCodeList': false\n },\n 'KG': {\n 'status': 'assigned',\n 'phoneCountryCode': '996',\n 'showCountryCodeList': false\n },\n 'KH': {\n 'status': 'assigned',\n 'phoneCountryCode': '855',\n 'showCountryCodeList': false\n },\n 'KI': {\n 'status': 'assigned',\n 'phoneCountryCode': '686',\n 'showCountryCodeList': false\n },\n 'KM': {\n 'status': 'assigned',\n 'phoneCountryCode': '269',\n 'showCountryCodeList': false\n },\n 'KN': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'KP': {\n 'status': 'assigned',\n 'phoneCountryCode': '850',\n 'showCountryCodeList': false\n },\n 'KR': {\n 'status': 'assigned',\n 'phoneCountryCode': '82',\n 'showCountryCodeList': false\n },\n 'KW': {\n 'status': 'assigned',\n 'phoneCountryCode': '965',\n 'showCountryCodeList': false\n },\n 'KY': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'KZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '7',\n 'showCountryCodeList': false\n },\n 'LA': {\n 'status': 'assigned',\n 'phoneCountryCode': '856',\n 'showCountryCodeList': true\n },\n 'LB': {\n 'status': 'assigned',\n 'phoneCountryCode': '961',\n 'showCountryCodeList': false\n },\n 'LC': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'LI': {\n 'status': 'assigned',\n 'phoneCountryCode': '423',\n 'showCountryCodeList': false\n },\n 'LK': {\n 'status': 'assigned',\n 'phoneCountryCode': '94',\n 'showCountryCodeList': false\n },\n 'LR': {\n 'status': 'assigned',\n 'phoneCountryCode': '231',\n 'showCountryCodeList': false\n },\n 'LS': {\n 'status': 'assigned',\n 'phoneCountryCode': '266',\n 'showCountryCodeList': false\n },\n 'LT': {\n 'status': 'assigned',\n 'phoneCountryCode': '370',\n 'showCountryCodeList': false\n },\n 'LU': {\n 'status': 'assigned',\n 'phoneCountryCode': '352',\n 'showCountryCodeList': false\n },\n 'LV': {\n 'status': 'assigned',\n 'phoneCountryCode': '371',\n 'showCountryCodeList': false\n },\n 'LY': {\n 'status': 'assigned',\n 'phoneCountryCode': '218',\n 'showCountryCodeList': false\n },\n 'MA': {\n 'status': 'assigned',\n 'phoneCountryCode': '212',\n 'showCountryCodeList': false\n },\n 'MC': {\n 'status': 'assigned',\n 'phoneCountryCode': '377',\n 'showCountryCodeList': false\n },\n 'MD': {\n 'status': 'assigned',\n 'phoneCountryCode': '373',\n 'showCountryCodeList': false\n },\n 'ME': {\n 'status': 'assigned',\n 'phoneCountryCode': '382',\n 'showCountryCodeList': false\n },\n 'MF': {\n 'status': 'assigned',\n 'phoneCountryCode': '590',\n 'showCountryCodeList': false\n },\n 'MG': {\n 'status': 'assigned',\n 'phoneCountryCode': '261',\n 'showCountryCodeList': false\n },\n 'MH': {\n 'status': 'assigned',\n 'phoneCountryCode': '692',\n 'showCountryCodeList': false\n },\n 'MK': {\n 'status': 'assigned',\n 'phoneCountryCode': '389',\n 'showCountryCodeList': false\n },\n 'ML': {\n 'status': 'assigned',\n 'phoneCountryCode': '223',\n 'showCountryCodeList': false\n },\n 'MM': {\n 'status': 'assigned',\n 'phoneCountryCode': '95',\n 'showCountryCodeList': false\n },\n 'MN': {\n 'status': 'assigned',\n 'phoneCountryCode': '976',\n 'showCountryCodeList': false\n },\n 'MO': {\n 'status': 'assigned',\n 'phoneCountryCode': '853',\n 'showCountryCodeList': false\n },\n 'MP': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'MQ': {\n 'status': 'assigned',\n 'phoneCountryCode': '596',\n 'showCountryCodeList': false\n },\n 'MR': {\n 'status': 'assigned',\n 'phoneCountryCode': '222',\n 'showCountryCodeList': false\n },\n 'MS': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'MT': {\n 'status': 'assigned',\n 'phoneCountryCode': '356',\n 'showCountryCodeList': false\n },\n 'MU': {\n 'status': 'assigned',\n 'phoneCountryCode': '230',\n 'showCountryCodeList': false\n },\n 'MV': {\n 'status': 'assigned',\n 'phoneCountryCode': '960',\n 'showCountryCodeList': false\n },\n 'MW': {\n 'status': 'assigned',\n 'phoneCountryCode': '265',\n 'showCountryCodeList': false\n },\n 'MX': {\n 'status': 'assigned',\n 'phoneCountryCode': '52',\n 'showCountryCodeList': false\n },\n 'MY': {\n 'status': 'assigned',\n 'phoneCountryCode': '60',\n 'showCountryCodeList': false\n },\n 'MZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '258',\n 'showCountryCodeList': false\n },\n 'NA': {\n 'status': 'assigned',\n 'phoneCountryCode': '264',\n 'showCountryCodeList': false\n },\n 'NC': {\n 'status': 'assigned',\n 'phoneCountryCode': '687',\n 'showCountryCodeList': false\n },\n 'NE': {\n 'status': 'assigned',\n 'phoneCountryCode': '227',\n 'showCountryCodeList': false\n },\n 'NF': {\n 'status': 'assigned',\n 'phoneCountryCode': '672',\n 'showCountryCodeList': false\n },\n 'NG': {\n 'status': 'assigned',\n 'phoneCountryCode': '234',\n 'showCountryCodeList': false\n },\n 'NI': {\n 'status': 'assigned',\n 'phoneCountryCode': '505',\n 'showCountryCodeList': false\n },\n 'NL': {\n 'status': 'assigned',\n 'phoneCountryCode': '31',\n 'showCountryCodeList': true\n },\n 'NO': {\n 'status': 'assigned',\n 'phoneCountryCode': '47',\n 'showCountryCodeList': true\n },\n 'NP': {\n 'status': 'assigned',\n 'phoneCountryCode': '977',\n 'showCountryCodeList': false\n },\n 'NR': {\n 'status': 'assigned',\n 'phoneCountryCode': '674',\n 'showCountryCodeList': false\n },\n 'NU': {\n 'status': 'assigned',\n 'phoneCountryCode': '683',\n 'showCountryCodeList': false\n },\n 'NZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '64',\n 'showCountryCodeList': false\n },\n 'OM': {\n 'status': 'assigned',\n 'phoneCountryCode': '968',\n 'showCountryCodeList': false\n },\n 'PA': {\n 'status': 'assigned',\n 'phoneCountryCode': '507',\n 'showCountryCodeList': false\n },\n 'PE': {\n 'status': 'assigned',\n 'phoneCountryCode': '51',\n 'showCountryCodeList': false\n },\n 'PF': {\n 'status': 'assigned',\n 'phoneCountryCode': '689',\n 'showCountryCodeList': false\n },\n 'PG': {\n 'status': 'assigned',\n 'phoneCountryCode': '675',\n 'showCountryCodeList': false\n },\n 'PH': {\n 'status': 'assigned',\n 'phoneCountryCode': '63',\n 'showCountryCodeList': false\n },\n 'PK': {\n 'status': 'assigned',\n 'phoneCountryCode': '92',\n 'showCountryCodeList': false\n },\n 'PL': {\n 'status': 'assigned',\n 'phoneCountryCode': '48',\n 'showCountryCodeList': true\n },\n 'PM': {\n 'status': 'assigned',\n 'phoneCountryCode': '508',\n 'showCountryCodeList': false\n },\n 'PN': {\n 'status': 'assigned',\n 'phoneCountryCode': '870',\n 'showCountryCodeList': false\n },\n 'PR': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'PS': {\n 'status': 'assigned',\n 'phoneCountryCode': '970',\n 'showCountryCodeList': false\n },\n 'PT': {\n 'status': 'assigned',\n 'phoneCountryCode': '351',\n 'showCountryCodeList': false\n },\n 'PW': {\n 'status': 'assigned',\n 'phoneCountryCode': '680',\n 'showCountryCodeList': false\n },\n 'PY': {\n 'status': 'assigned',\n 'phoneCountryCode': '595',\n 'showCountryCodeList': false\n },\n 'QA': {\n 'status': 'assigned',\n 'phoneCountryCode': '974',\n 'showCountryCodeList': false\n },\n 'RE': {\n 'status': 'assigned',\n 'phoneCountryCode': '262',\n 'showCountryCodeList': false\n },\n 'RO': {\n 'status': 'assigned',\n 'phoneCountryCode': '40',\n 'showCountryCodeList': false\n },\n 'RS': {\n 'status': 'assigned',\n 'phoneCountryCode': '381',\n 'showCountryCodeList': false\n },\n 'RU': {\n 'status': 'assigned',\n 'phoneCountryCode': '7',\n 'showCountryCodeList': false\n },\n 'RW': {\n 'status': 'assigned',\n 'phoneCountryCode': '250',\n 'showCountryCodeList': false\n },\n 'SA': {\n 'status': 'assigned',\n 'phoneCountryCode': '966',\n 'showCountryCodeList': false\n },\n 'SB': {\n 'status': 'assigned',\n 'phoneCountryCode': '677',\n 'showCountryCodeList': false\n },\n 'SC': {\n 'status': 'assigned',\n 'phoneCountryCode': '248',\n 'showCountryCodeList': false\n },\n 'SD': {\n 'status': 'assigned',\n 'phoneCountryCode': '249',\n 'showCountryCodeList': false\n },\n 'SE': {\n 'status': 'assigned',\n 'phoneCountryCode': '46',\n 'showCountryCodeList': true\n },\n 'SG': {\n 'status': 'assigned',\n 'phoneCountryCode': '65',\n 'showCountryCodeList': true\n },\n 'SH': {\n 'status': 'assigned',\n 'phoneCountryCode': '290',\n 'showCountryCodeList': false\n },\n 'SI': {\n 'status': 'assigned',\n 'phoneCountryCode': '386',\n 'showCountryCodeList': false\n },\n 'SJ': {\n 'status': 'assigned',\n 'phoneCountryCode': '47',\n 'showCountryCodeList': false\n },\n 'SK': {\n 'status': 'assigned',\n 'phoneCountryCode': '421',\n 'showCountryCodeList': false\n },\n 'SL': {\n 'status': 'assigned',\n 'phoneCountryCode': '232',\n 'showCountryCodeList': false\n },\n 'SM': {\n 'status': 'assigned',\n 'phoneCountryCode': '378',\n 'showCountryCodeList': false\n },\n 'SN': {\n 'status': 'assigned',\n 'phoneCountryCode': '221',\n 'showCountryCodeList': false\n },\n 'SO': {\n 'status': 'assigned',\n 'phoneCountryCode': '252',\n 'showCountryCodeList': false\n },\n 'SR': {\n 'status': 'assigned',\n 'phoneCountryCode': '597',\n 'showCountryCodeList': false\n },\n 'SS': {\n 'status': 'assigned',\n 'phoneCountryCode': '211',\n 'showCountryCodeList': false\n },\n 'ST': {\n 'status': 'assigned',\n 'phoneCountryCode': '239',\n 'showCountryCodeList': false\n },\n 'SV': {\n 'status': 'assigned',\n 'phoneCountryCode': '503',\n 'showCountryCodeList': false\n },\n 'SX': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'SY': {\n 'status': 'assigned',\n 'phoneCountryCode': '963',\n 'showCountryCodeList': false\n },\n 'SZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '268',\n 'showCountryCodeList': false\n },\n 'TC': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'TD': {\n 'status': 'assigned',\n 'phoneCountryCode': '235',\n 'showCountryCodeList': false\n },\n 'TF': {\n 'status': 'assigned',\n 'phoneCountryCode': '262',\n 'showCountryCodeList': false\n },\n 'TG': {\n 'status': 'assigned',\n 'phoneCountryCode': '228',\n 'showCountryCodeList': false\n },\n 'TH': {\n 'status': 'assigned',\n 'phoneCountryCode': '66',\n 'showCountryCodeList': false\n },\n 'TJ': {\n 'status': 'assigned',\n 'phoneCountryCode': '992',\n 'showCountryCodeList': false\n },\n 'TK': {\n 'status': 'assigned',\n 'phoneCountryCode': '690',\n 'showCountryCodeList': false\n },\n 'TL': {\n 'status': 'assigned',\n 'phoneCountryCode': '670',\n 'showCountryCodeList': false\n },\n 'TM': {\n 'status': 'assigned',\n 'phoneCountryCode': '993',\n 'showCountryCodeList': false\n },\n 'TN': {\n 'status': 'assigned',\n 'phoneCountryCode': '216',\n 'showCountryCodeList': false\n },\n 'TO': {\n 'status': 'assigned',\n 'phoneCountryCode': '676',\n 'showCountryCodeList': false\n },\n 'TR': {\n 'status': 'assigned',\n 'phoneCountryCode': '90',\n 'showCountryCodeList': true\n },\n 'TT': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'TV': {\n 'status': 'assigned',\n 'phoneCountryCode': '688',\n 'showCountryCodeList': false\n },\n 'TW': {\n 'status': 'assigned',\n 'phoneCountryCode': '886',\n 'showCountryCodeList': true\n },\n 'TZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '255',\n 'showCountryCodeList': false\n },\n 'UA': {\n 'status': 'assigned',\n 'phoneCountryCode': '380',\n 'showCountryCodeList': false\n },\n 'UG': {\n 'status': 'assigned',\n 'phoneCountryCode': '256',\n 'showCountryCodeList': false\n },\n 'UM': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'US': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false,\n 'hideInOtherCountries': true\n },\n 'UY': {\n 'status': 'assigned',\n 'phoneCountryCode': '598',\n 'showCountryCodeList': false\n },\n 'UZ': {\n 'status': 'assigned',\n 'phoneCountryCode': '998',\n 'showCountryCodeList': false\n },\n 'VA': {\n 'status': 'assigned',\n 'phoneCountryCode': '39',\n 'showCountryCodeList': false\n },\n 'VC': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'VE': {\n 'status': 'assigned',\n 'phoneCountryCode': '58',\n 'showCountryCodeList': false\n },\n 'VG': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'VI': {\n 'status': 'assigned',\n 'phoneCountryCode': '1',\n 'showCountryCodeList': false\n },\n 'VN': {\n 'status': 'assigned',\n 'phoneCountryCode': '84',\n 'showCountryCodeList': false\n },\n 'VU': {\n 'status': 'assigned',\n 'phoneCountryCode': '678',\n 'showCountryCodeList': false\n },\n 'WF': {\n 'status': 'assigned',\n 'phoneCountryCode': '681',\n 'showCountryCodeList': false\n },\n 'WS': {\n 'status': 'assigned',\n 'phoneCountryCode': '685',\n 'showCountryCodeList': false\n },\n 'YE': {\n 'status': 'assigned',\n 'phoneCountryCode': '967',\n 'showCountryCodeList': false\n },\n 'YT': {\n 'status': 'assigned',\n 'phoneCountryCode': '262',\n 'showCountryCodeList': false\n },\n 'ZA': {\n 'status': 'assigned',\n 'phoneCountryCode': '27',\n 'showCountryCodeList': false\n },\n 'ZM': {\n 'status': 'assigned',\n 'phoneCountryCode': '260',\n 'showCountryCodeList': false\n },\n 'ZW': {\n 'status': 'assigned',\n 'phoneCountryCode': '263',\n 'showCountryCodeList': false\n }\n };\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-form-components/src/phone/lib/territoriesByCode.js\n// module id = ../node_modules/xo-form-components/src/phone/lib/territoriesByCode.js\n// module chunks = 0 1 8 9 10 11 12 13 15 17 38 39 40 41","\n\nexports.__esModule = true;\n\nvar _angular = require('angular');\n\nvar _squid = require('squid');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nrequire('../phoneInputB/directive.js');\n\nrequire('../phoneInputA/directive.js');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoPhoneInput', {\n tag: 'xo-phone-input',\n template: _template2['default'],\n\n props: {\n phone: {\n type: 'var',\n reqiured: false\n },\n\n showPhoneType: {\n type: 'var',\n optional: true,\n 'default': true\n },\n\n hideWork: {\n type: 'var',\n optional: true,\n 'default': false\n },\n\n token: {\n type: 'var',\n optional: true\n },\n\n exclude: {\n type: 'var',\n optional: true\n },\n\n hidePhoneType: {\n type: 'var',\n optional: true,\n 'default': false\n },\n\n country: {\n type: 'var',\n optional: true\n }\n },\n\n lifecycle: {\n enter: function enter() {\n var _this = this;\n\n var getTreatment = function getTreatment() {\n\n if ((0, _squid.$feature)('showNewPhoneDesign', false, _squid.$locale.country)) {\n return true;\n }\n\n var throttle = void 0;\n\n if (_squid.$config['newPhoneDesignThrottle']) {\n\n throttle = _squid.$config['newPhoneDesignThrottle']['DEFAULT'];\n\n if (_squid.$config['newPhoneDesignThrottle'][_squid.$locale.country] >= 0) {\n throttle = _squid.$config['newPhoneDesignThrottle'][_squid.$locale.country];\n }\n }\n\n var id = _squid.$locale.country + _angular.$rootScope.token;\n\n return throttle !== undefined && (0, _squid.$experiment)('new_phone_design_exp', throttle, id, {}) ? true : false;\n };\n\n this.treatment = getTreatment();\n\n this.$watch('showPhoneType', function () {\n _this.hidePhoneType = _this.showPhoneType === false;\n }, true);\n }\n }\n\n});\n\n\n_angular.$rootScope;\n\n_squid.$Component;\n\n_squid.$locale;\n\n_squid.$experiment;\n\n_squid.$config;\n\n_squid.$feature;\nmodule.exports = exports['default'];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-form-components/src/phone/phoneInput/directive.js\n// module id = ../node_modules/xo-form-components/src/phone/phoneInput/directive.js\n// module chunks = 0 1 8 9 10 11 12 13 15 17 38 39 40 41","module.exports = \"\\n\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-form-components/src/phone/phoneInput/template.html\n// module id = ../node_modules/xo-form-components/src/phone/phoneInput/template.html\n// module chunks = 0 1 8 9 10 11 12 13 15 17 38 39 40 41","\n\nvar _squid = require('squid');\n\nrequire('xo-ui-components/src/directionality/directive');\n\nrequire('xo-ui-components/src/dropdown/directive');\n\nrequire('xo-ui-components/src/error-tooltip/directive');\n\nrequire('xo-ui-components/src/floating-label/directive');\n\nvar _territoriesByCode = require('../lib/territoriesByCode');\n\nvar _territoriesByCode2 = _interopRequireDefault(_territoriesByCode);\n\nrequire('./styles');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoPhoneInputA', function () {\n return {\n template: _template2['default'],\n scope: {\n phone: '=?',\n showPhoneType: '=?',\n exclude: '@?',\n country: '=?'\n },\n\n link: function link(scope, element, attr, controller) {\n element.on('keyup', function (event) {\n element.find('.telephone').mask(scope.mask, {\n 'translation': {\n 0: { pattern: /[0-9]/ }\n }\n });\n });\n },\n\n controller: ['$scope', function ($scope) {\n $scope.locale = _squid.$locale;\n $scope.IntDialingCodes = _territoriesByCode2['default'];\n $scope.defaultCountryPhoneCode = _territoriesByCode2['default'][_squid.$locale.country];\n $scope.showPhoneType = (0, _squid.$feature)('phoneType', true, $scope.country) && $scope.showPhoneType !== false;\n\n // dont display countries that are tagged with hideInOtherCountries flag in territoriesByCode.js.\n // if localeCountry and dropdown country are same ignore hideInOtherCountries and display the countrycode.\n $scope.hideCountry = function (dropdownCountry, hideInOtherCountries) {\n return _squid.$locale.country !== dropdownCountry && hideInOtherCountries;\n };\n\n $scope.phone = $scope.phone || {};\n $scope.phone.phoneType = $scope.phone.phoneType || 'Mobile';\n $scope.phone.IntDialingCountryCode = $scope.defaultCountryPhoneCode.phoneCountryCode;\n\n angular.extend($scope.phone, {\n phoneCountryCode: _squid.$locale.country\n });\n\n function getPhoneMask(phoneType, phoneEntry) {\n var defaultMask = '0000000000000000';\n var masks = phoneEntry && phoneEntry.masks;\n var mobileMask = masks && masks.MOBILE ? masks.MOBILE : defaultMask;\n var fixedLineMask = masks && masks.FIXED_LINE ? masks.FIXED_LINE : defaultMask;\n\n return phoneType === 'Mobile' ? mobileMask : fixedLineMask;\n }\n\n function getPhonePattern(phoneEntry) {\n var defaultPattern = '^[0-9]+$';\n var patterns = phoneEntry && phoneEntry.patterns;\n // less stric regex validation in place for now, just use general regex to match mobile AND fixed-line formats\n // for now we use less strict regex validation because we are not ready for this more strict validation\n\n if (patterns) {\n return patterns.GENERAL ? patterns.GENERAL : defaultPattern;\n }\n return defaultPattern;\n\n // more strict regex validaiton based on phone type is found commented below\n // var ret;\n // switch ($scope.phone.phoneType) {\n // case 'Mobile':\n // ret = patterns.MOBILE;\n // break;\n // case 'Home':\n // case 'Work':\n // ret = patterns.FIXED_LINE;\n // break;\n // default:\n // ret = patterns.GENERAL;\n // break;\n // }\n // return ret ? ret : defaultPattern;\n }\n\n function populatePhoneMetadata() {\n if (!$scope.metadata || $scope.metadata.country !== _squid.$locale.metadata.country) {\n $scope.metadata = angular.copy(_squid.$locale.metadata);\n }\n var phoneEntry = $scope.metadata.phoneEntry;\n\n $scope.mask = getPhoneMask($scope.phone.phoneType, phoneEntry);\n $scope.pattern = getPhonePattern(phoneEntry);\n }\n\n populatePhoneMetadata();\n\n // Reset the phone number mask from according to the phone type\n $scope.phoneTypeChanged = function () {\n $scope.mask = getPhoneMask($scope.phone.phoneType, $scope.metadata.phoneEntry);\n $scope.pattern = getPhonePattern($scope.metadata.phoneEntry);\n $('.telephone').mask($scope.mask);\n };\n\n $scope.$watch('phone.phoneCountryCode', function (newValue) {\n $scope.phone.IntDialingCountryCode = _territoriesByCode2['default'][newValue].phoneCountryCode;\n });\n\n $scope.$on('localeChange', function () {\n $scope.defaultCountryPhoneCode = _territoriesByCode2['default'][_squid.$locale.country];\n $scope.phone.phoneCountryCode = _squid.$locale.country;\n if (!$scope.metadata || $scope.metadata.country !== _squid.$locale.metadata.country) {\n populatePhoneMetadata();\n $('.telephone').mask($scope.mask);\n }\n });\n\n $scope.$watch('country', function (newVal) {\n if (newVal) {\n $scope.defaultCountryPhoneCode = _territoriesByCode2['default'][$scope.country];\n $scope.phone.phoneCountryCode = $scope.country;\n\n if (!$scope.metadata || $scope.metadata.country !== $scope.country) {\n\n $scope.metadata = _squid.$MetadataModel.create();\n $scope.metadata.choose($scope.country, _squid.$locale.lang).then(function () {\n\n var phoneEntry = $scope.metadata.phoneEntry;\n\n $scope.mask = getPhoneMask($scope.phone.phoneType, phoneEntry);\n $scope.pattern = getPhonePattern(phoneEntry);\n\n $('.telephone').mask($scope.mask);\n });\n }\n }\n });\n\n $scope.showWork = $scope.exclude === 'WORK';\n }]\n };\n});\n\n_squid.$feature;\n\n_squid.$locale;\n\n_squid.$MetadataModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-form-components/src/phone/phoneInputA/directive.js\n// module id = ../node_modules/xo-form-components/src/phone/phoneInputA/directive.js\n// module chunks = 0 1 8 9 10 11 12 13 15 17 38 39 40 41","module.exports = \"
    \\n
    \\n \\n \\n
    \\n\\n
    \\n \\n \\n
    \\n\\n
    \\n\\n \\n \\n
    \\n
    \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-form-components/src/phone/phoneInputA/template.html\n// module id = ../node_modules/xo-form-components/src/phone/phoneInputA/template.html\n// module chunks = 0 1 8 9 10 11 12 13 15 17 38 39 40 41","\n\nexports.__esModule = true;\n\nvar _angular = require('angular');\n\nvar _jquery = require('jquery');\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nvar _squid = require('squid');\n\nvar _logger = require('xo-beaver/dist/logger');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nrequire('./styles');\n\nrequire('jqueryMask');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar MOBILE = 'Mobile';\nvar KEYS = {\n ENTER: 13,\n UP: 38,\n DOWN: 40,\n TAB: 9,\n ESC: 27,\n A: 65,\n Z: 90,\n SPACE: 32\n};\n\nvar query = '';\nvar queryTimer = null;\n\nexports['default'] = _squid.$Component.extend('$xoPhoneInputB', {\n tag: 'xo-phone-input-b',\n template: _template2['default'],\n\n props: {\n phone: {\n type: 'var',\n required: false\n },\n\n hidePhoneType: {\n type: 'var',\n required: false\n },\n\n hideWork: {\n type: 'var',\n required: false,\n 'default': false\n }\n },\n\n actions: {\n\n // return the phonePattern\n getPhonePattern: function getPhonePattern(phoneEntry) {\n var DEFAULT_PATTERN = '^[0-9]+$';\n var patterns = phoneEntry && phoneEntry.patterns;\n // less strict regex validation in place for now, just use general regex to match mobile AND fixed-line\n // formats\n // for now we use less strict regex validation because we are not ready for this more strict validation\n\n return patterns && patterns.GENERAL ? patterns.GENERAL : DEFAULT_PATTERN;\n },\n\n\n // return phoneMask based on phone Type\n getPhoneMask: function getPhoneMask(phoneType, phoneEntry) {\n var DEFAULT_MASK = '0000000000000000';\n var masks = phoneEntry && phoneEntry.masks;\n\n if (phoneType === MOBILE) {\n return masks && masks.MOBILE ? masks.MOBILE : DEFAULT_MASK;\n } else {\n return masks && masks.FIXED_LINE ? masks.FIXED_LINE : DEFAULT_MASK;\n }\n },\n\n\n // set the phone number mask and pattern\n updatePhoneMaskAndPattern: function updatePhoneMaskAndPattern() {\n var country = this.metadata.localization.country;\n // If phoneCountry does not match the country the metadata is from then\n // we set phoneEntry to a falsey value so the default pattern and mask are\n // used for the phone input.\n\n var phoneEntry = this.phoneCountry === country && this.metadata.phoneEntry;\n\n this.mask = this.actions.getPhoneMask(this.phone.phoneType, phoneEntry);\n this.pattern = this.actions.getPhonePattern(phoneEntry);\n this.actions.applyMaskOnPhoneInput();\n },\n getPhoneDialingCode: function getPhoneDialingCode(territory, state) {\n var overrides = this.metadata.regionalOverrides;\n\n if (state && overrides && overrides.hasOwnProperty(state) && overrides[state].props.internationalDialingCode) {\n return overrides[state].props.internationalDialingCode;\n }\n\n return territory.internationalDialingCode;\n },\n\n\n // fetch the passed country's international dialing code\n updateDialingCodeAndCountry: function updateDialingCodeAndCountry() {\n var territory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var state = arguments[1];\n\n this.phoneCountry = territory.code;\n this.phone.IntDialingCountryCode = this.actions.getPhoneDialingCode(territory, state);\n (0, _jquery2['default'])('.fixedCode').text('+' + this.phone.IntDialingCountryCode);\n },\n\n\n /* if user chooses a different dialing code -\n -. fetch the new country's metadata\n -. update phone Country and dialing code\n -. update the phone number mask and pattern (no explicit call as it happens when metadata updates)\n -. close the dropdown if open\n */\n updatePhoneFieldMetadata: function updatePhoneFieldMetadata() {\n var territory = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var state = arguments[1];\n\n // create a local copy of metadata (only happens on initial load)\n if (!this.metadata) {\n this.metadata = _squid.$MetadataModel.instance(0, {\n 'noBroadcast': true\n });\n }\n\n this.metadata.choose(territory.code);\n\n this.actions.updateDialingCodeAndCountry(territory, state);\n // Whenever metadata is updated that is promise returns then the metadata listener will update the mask\n // and pattern so not calling it here. Moving on...\n\n // close the dropdown if open\n if (this.listVisible) {\n this.actions.collapseListAndFocusOnParent();\n }\n\n _logger.$logger.info('phone_country_code_updated', {\n territory: territory.code\n });\n },\n getTerritoryDataFromMetadata: function getTerritoryDataFromMetadata(country) {\n return _squid.$util.find(this.dialingCodeList, function (_ref) {\n var code = _ref.code;\n return code === country;\n });\n },\n\n\n // set the stage on first load or on locale change\n init: function init(country) {\n this.hidePhoneType = this.hidePhoneType || (0, _squid.$feature)('hidePhoneType', false, country);\n\n this.showDialingCodeContainer = (0, _squid.$feature)('showDialingCodeContainer', false, country);\n\n this.listVisible = false;\n\n // default the phone type to Mobile if not specified\n // Note: this.phone is not optional\n this.phone = this.phone || {};\n\n this.phone.phoneType = this.phone.phoneType || 'Mobile';\n\n // populate the dialing code list/options\n var _$locale$metadata = _squid.$locale.metadata,\n _$locale$metadata$ter = _$locale$metadata.territory,\n territory = _$locale$metadata$ter === undefined ? [] : _$locale$metadata$ter,\n _$locale$metadata$add = _$locale$metadata.additionalDialingCodes,\n additionalDialingCodes = _$locale$metadata$add === undefined ? [] : _$locale$metadata$add;\n var _$config$dialingCodeB = _squid.$config.dialingCodeBlacklist,\n dialingCodeBlacklist = _$config$dialingCodeB === undefined ? [] : _$config$dialingCodeB;\n\n // Merge dialing codes from supported countries with dialing codes from\n // assigned countries and then filtering countries that are blacklisted\n\n this.dialingCodeList = territory.concat(additionalDialingCodes).filter(function (_ref2) {\n var code = _ref2.code;\n return !dialingCodeBlacklist.includes(code);\n }).sort(function (a, b) {\n return a.name.localeCompare(b.name);\n });\n var territoryData = this.actions.getTerritoryDataFromMetadata(this.phone.phoneCountry || country);\n\n this.actions.updatePhoneFieldMetadata(territoryData);\n },\n\n\n // helper to show the options list and focus on the selected phone country option\n expandList: function expandList() {\n (0, _jquery2['default'])('.country-list').show();\n this.listVisible = true;\n (0, _jquery2['default'])('.country-list .country.selected').focus();\n },\n\n\n // helper to collapse the options\n collapseList: function collapseList() {\n this.listVisible = false;\n (0, _jquery2['default'])('.country-list').hide();\n },\n\n\n // helper to collapse the options and xfer focus back to the parent dropdown\n collapseListAndFocusOnParent: function collapseListAndFocusOnParent() {\n this.actions.collapseList();\n (0, _jquery2['default'])('#dialingCodeContainer div.selected-flag').focus();\n },\n\n\n // helper to toggle the dropdown list\n toggleList: function toggleList() {\n if (this.listVisible) {\n this.actions.collapseListAndFocusOnParent();\n } else {\n this.actions.expandList();\n }\n },\n\n\n // remove highlighting from other list items and highlight the given item\n highlightListItem: function highlightListItem(listItem) {\n (0, _jquery2['default'])('li.country').removeClass('highlight');\n listItem.addClass('highlight');\n listItem.focus();\n },\n\n // select the given item and update the phone field metadata\n selectListItem: function selectListItem(listItem) {\n var country = listItem.attr('data-country-code');\n var territory = this.actions.getTerritoryDataFromMetadata(country);\n\n this.actions.updatePhoneFieldMetadata(territory);\n },\n\n // find the first list item whose name starts with the query string\n searchForCountry: function searchForCountry(queryString) {\n for (var i = 0; i < this.dialingCodeList.length; i++) {\n if (this.actions.startsWith(this.dialingCodeList[i].name, queryString)) {\n\n var listItem = (0, _jquery2['default'])('.country-list').find('[data-country-code=\"' + this.dialingCodeList[i].code + '\"]');\n // update highlighting and scroll\n\n this.actions.highlightListItem(listItem);\n break;\n }\n }\n },\n\n // check if (uppercase) string a starts with string b\n startsWith: function startsWith(a, b) {\n return a.substr(0, b.length).toUpperCase() === b;\n },\n\n // When Switching between double Byte -> Single Byte character\n // angular model is not properly updated by jquery-mask (PPPLMER-52127)\n // re-update the model with entered value.\n updateAngularModel: function updateAngularModel() {\n if (this.phone.ispreFill) {\n // We set the flag to false once the prefill is completed.\n // This helps to update angular model properly upon next keyUp()\n this.phone.ispreFill = false;\n } else {\n this.phone.telephone = this.$element.find('.telephone').val();\n }\n },\n\n // format the phone number\n applyMaskOnPhoneInput: function applyMaskOnPhoneInput() {\n // If `this.mask` is `undefined` and we try to mask this field\n // jQuery mask will throw a type error when it tries to access\n // `mask.length` during a for loop.\n if (!this.mask) {\n return;\n }\n\n this.actions.updateAngularModel();\n\n this.$element.find('.telephone').mask(this.mask, {\n 'translation': {\n 0: { pattern: /[0-9]/ }\n }\n });\n },\n\n // highlight the event target\n handleListMouseover: function handleListMouseover($event) {\n this.actions.highlightListItem((0, _jquery2['default'])($event.target));\n },\n\n // expand the list when down arrow is pressed\n handleKeyboardInputForDropdown: function handleKeyboardInputForDropdown($event) {\n\n var key = $event.which;\n\n if (key === KEYS.DOWN || key === KEYS.UP || key === KEYS.SPACE) {\n $event.stopPropagation();\n $event.preventDefault();\n this.actions.expandList();\n } else {\n this.actions.collapseList();\n }\n },\n\n /*\n navigating list using the keyboard\n up, down, esc, enter and letter keys\n */\n handleKeyboardInputForList: function handleKeyboardInputForList($event) {\n var $listItems = (0, _jquery2['default'])('li.country');\n var key = $event.which;\n var $selected = (0, _jquery2['default'])($event.target);\n var $current = void 0;\n\n $event.stopPropagation();\n $event.preventDefault();\n\n // if user types in an input, focus on the first country starting with that query\n // upper case letters (since keyup/keydown only return upper case letters)\n if (key >= KEYS.A && key <= KEYS.Z) {\n if (queryTimer) {\n _angular.$timeout.cancel(queryTimer);\n }\n\n query += String.fromCharCode(key);\n this.actions.searchForCountry(query);\n\n queryTimer = (0, _angular.$timeout)(function () {\n query = '';\n }, 1e3);\n\n return;\n }\n\n // ignore other keys\n if (key !== KEYS.DOWN && key !== KEYS.UP && key !== KEYS.ENTER && key !== KEYS.ESC) {\n return;\n }\n\n // select the the new phone country when user hits enter\n if (key === KEYS.ENTER) {\n this.actions.selectListItem($selected);\n return;\n }\n\n // close the list if escape is pressed\n if (key === KEYS.ESC) {\n this.actions.collapseListAndFocusOnParent();\n return;\n }\n\n // highlight the next/prev element when arrow key is pressed\n if (key === KEYS.DOWN) // Down key\n {\n if (!$selected.length || $selected.is(':last-child')) {\n $current = $listItems.eq(0);\n } else {\n $current = $selected.next();\n }\n }\n\n // Up key\n if (key === KEYS.UP) {\n if (!$selected.length || $selected.is(':first-child')) {\n $current = $listItems.last();\n } else {\n $current = $selected.prev();\n }\n }\n\n this.actions.highlightListItem($current);\n }\n },\n\n lifecycle: {\n enter: function enter() {\n this.actions.init(_squid.$locale.country);\n },\n populate: function populate() {\n var _this = this;\n\n this.$on('localeChange', function () {\n _this.actions.init(_squid.$locale.country);\n });\n\n // update the phone mask and pattern when metadata is changed\n this.$watch('metadata', function () {\n _this.actions.updatePhoneMaskAndPattern();\n }, true);\n\n // update the mask when .telephone val changes either programatically or via user action\n this.$watch('this.phone.telephone', function (newVal) {\n if (newVal) {\n _this.$element.find('.telephone').val(newVal).trigger('input');\n }\n }, true);\n\n var addressChangeEvent = _angular.$rootScope.$on('billingAddressStateChange', function (e, address) {\n var territory = _this.actions.getTerritoryDataFromMetadata(_this.metadata.country);\n\n _this.actions.updatePhoneFieldMetadata(territory, address.state);\n });\n\n this.$on('$destroy', addressChangeEvent);\n\n // hide the dropdown list if a click occurs anywhere else on the page\n (0, _jquery2['default'])('*').on('click', function (event) {\n if (!(0, _jquery2['default'])('#dialingCodeContainer div.selected-flag').is((0, _jquery2['default'])(event.target))) {\n _this.actions.collapseList();\n }\n });\n }\n }\n});\n\n\n_angular.$rootScope;\n\n_angular.$timeout;\n\n_squid.$Component;\n\n_squid.$locale;\n\n_squid.$feature;\n\n_squid.$util;\n\n_squid.$MetadataModel;\n\n_squid.$config;\n\n_logger.$logger;\nmodule.exports = exports['default'];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-form-components/src/phone/phoneInputB/directive.js\n// module id = ../node_modules/xo-form-components/src/phone/phoneInputB/directive.js\n// module chunks = 0 1 8 9 10 11 12 13 15 17 38 39 40 41","module.exports = \"
    \\n
    \\n\\n \\n\\n \\n
    \\n\\n\\n
    \\n\\n
    \\n
    \\n
    \\n
    \\n
    \\n\\n
      \\n
    • \\n\\n
      \\n
      \\n
      \\n\\n {{ value.name }}\\n\\n +{{ value.internationalDialingCode }}\\n
    • \\n
    \\n
    \\n\\n \\n
    \\n\\n\\n
    \\n\\n +{{ phone.IntDialingCountryCode }}\\n \\n \\n
    \\n\\n\\n
    \\n\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-form-components/src/phone/phoneInputB/template.html\n// module id = ../node_modules/xo-form-components/src/phone/phoneInputB/template.html\n// module chunks = 0 1 8 9 10 11 12 13 15 17 38 39 40 41","\n\nexports.__esModule = true;\n\nvar _squid = require('squid');\n\nrequire('xo-ui-components/src/error-tooltip/directive');\n\nrequire('xo-ui-components/src/prefix-attrs-with/directive');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoZipcode', {\n tag: 'xo-zipcode',\n\n template: _template2['default'],\n\n props: {\n address: {\n reqiured: false,\n type: 'var'\n },\n attrPrefix: {\n required: false,\n type: 'var'\n },\n country: {\n required: false,\n type: 'str'\n },\n doneFn: {\n required: false,\n type: 'var'\n },\n keyPressFn: {\n required: false,\n type: 'var'\n },\n maxLength: {\n required: false,\n type: 'var'\n },\n postalCodeLabel: {\n required: false,\n type: 'var'\n },\n zipEntry: {\n required: false,\n type: 'var'\n },\n zipErrorKey: {\n required: false,\n type: 'str'\n },\n zipLabel: {\n required: false,\n type: 'str'\n },\n zipRequired: {\n reqiured: false,\n type: 'var'\n }\n },\n\n lifecycle: {\n enter: function enter() {\n this.formatRegex = undefined;\n this.inputParams = (0, _squid.$feature)('zipcodeInputParams', undefined, this.country);\n\n if (this.inputParams) {\n this.minLength = this.inputParams.minLength;\n this.maxLength = this.inputParams.maxLength;\n\n if (this.inputParams.formatPattern) {\n this.formatRegex = new RegExp(this.inputParams.formatPattern, 'g');\n }\n }\n\n this.formatZipWithDash = function (zipcode, index) {\n if (zipcode.length > index) {\n zipcode = zipcode.slice(0, index) + '-' + zipcode.slice(index);\n }\n\n return zipcode;\n };\n }\n },\n\n actions: {\n changeZip: function changeZip(zipcode) {\n if (zipcode) {\n\n if (this.formatRegex) {\n zipcode = zipcode.replace(this.formatRegex, '');\n }\n\n if (this.inputParams && this.inputParams.formatZip) {\n zipcode = this.formatZipWithDash(zipcode, this.inputParams.minLength);\n }\n\n this.address.postal_code = zipcode;\n }\n },\n doneFunction: function doneFunction() {\n if (this.doneFn) {\n this.doneFn();\n }\n },\n keyPressHandler: function keyPressHandler(event) {\n if (this.keyPressFn) {\n this.keyPressFn(event);\n }\n }\n }\n});\n\n\n_squid.$Component;\n\n_squid.$feature;\nmodule.exports = exports['default'];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-form-components/src/zipcode/directive.js\n// module id = ../node_modules/xo-form-components/src/zipcode/directive.js\n// module chunks = 0 8 9 10 11 12 13 14 15 16 38 39 40 42 43 44 45 47","module.exports = \"
    \\n \\n \\n
    \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-form-components/src/zipcode/template.html\n// module id = ../node_modules/xo-form-components/src/zipcode/template.html\n// module chunks = 0 8 9 10 11 12 13 14 15 16 38 39 40 42 43 44 45 47","\n\nexports.__esModule = true;\nexports.$ValidateAddressModel = exports.$PrefillAddressModel = exports.$AddressNormalizationModel = undefined;\n\nvar _squid = require('squid');\n\nvar $AddressNormalizationModel = exports.$AddressNormalizationModel = _squid.$Model.extend('$AddressNormalizationModel', {\n api: new _squid.$Api({\n uri: '/api/address/normalize'\n })\n});\n\nvar $PrefillAddressModel = exports.$PrefillAddressModel = _squid.$Model.extend('$PrefillAddressModel', {\n api: new _squid.$Api({\n uri: '/api/address/prefill'\n })\n});\n\nvar $ValidateAddressModel = exports.$ValidateAddressModel = _squid.$Model.extend('$ValidateAddressModel', {\n api: new _squid.$Api({\n uri: '/api/address/validate'\n })\n});\n\nangular.value(\"$AddressNormalizationModel\", $AddressNormalizationModel);\nangular.value(\"$PrefillAddressModel\", $PrefillAddressModel);\nangular.value(\"$ValidateAddressModel\", $ValidateAddressModel);\n_squid.$Model;\n\n_squid.$Api;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-models/src/address/index.js\n// module id = ../node_modules/xo-models/src/address/index.js\n// module chunks = 0 8 9 10 11 12 13 14 15 16 38 39 40 42 43 44 45 47","\n\nexports.__esModule = true;\nexports.$GetPSBOffersModel = exports.$GetOfferProgramModel = exports.$CreateOfferModel = exports.$EvaluateCheckoutOfferEligibilityModel = undefined;\n\nvar _squid = require('squid');\n\nvar $EvaluateCheckoutOfferEligibilityModel = exports.$EvaluateCheckoutOfferEligibilityModel = _squid.$Model.extend('$EvaluateCheckoutOfferEligibilityModel', {\n api: new _squid.$Api({\n uri: '/api/checkout/offers/evaluate-eligibility',\n postAttempts: 1\n }),\n\n isEligible: function isEligible() {\n return Boolean(this.eligible);\n },\n getCurrencyCode: function getCurrencyCode() {\n return this.currency_code;\n },\n getOfferProgramCode: function getOfferProgramCode() {\n return this.offer_program_code;\n },\n getOfferProgramID: function getOfferProgramID() {\n return this.offer_program_id;\n },\n\n\n // This is of the form $5.00\n getOfferValue: function getOfferValue() {\n return this.offer_value;\n }\n});\n\nvar $CreateOfferModel = exports.$CreateOfferModel = _squid.$Model.extend('$CreateOfferModel', {\n api: new _squid.$Api({\n uri: '/api/checkout/offers/new',\n postAttempts: 1\n }),\n\n createdOffer: function createdOffer() {\n return Boolean(this.offer_id);\n },\n getOfferAmountLowestDenom: function getOfferAmountLowestDenom() {\n if (!this.createdOffer() || !this.computation_rules) {\n return;\n }\n\n return _squid.$util.getProperty(this.computation_rules[0], 'offer_value.value');\n },\n getTxnMinimumLowestDenom: function getTxnMinimumLowestDenom() {\n if (!this.createdOffer()) {\n return;\n }\n\n return _squid.$util.getProperty(this, 'offer_program_info.applicability_rule.cart_rule.min_cart_total');\n }\n});\n\nvar $GetOfferProgramModel = exports.$GetOfferProgramModel = _squid.$Model.extend('$GetOfferProgramModel', {\n api: new _squid.$Api({\n uri: '/api/checkout/offers/program'\n }),\n\n getOfferCurrencyCode: function getOfferCurrencyCode() {\n return _squid.$util.getProperty(this, 'currency_code');\n },\n\n\n // NOTE this is in the lowest denominator of the currency\n // For example, $5.00 USD would be returned as 500\n getOfferValueLowestDenom: function getOfferValueLowestDenom() {\n return _squid.$util.getProperty(this.computation_rules[0], 'offer_value.value') || 0;\n },\n getMinCartTotalLowestDenom: function getMinCartTotalLowestDenom() {\n return _squid.$util.getProperty(this, 'applicability_rule.cart_rule.min_cart_total') || 0;\n },\n isUserInApplicableCountry: function isUserInApplicableCountry(userCountry) {\n if (!userCountry) {\n return false;\n }\n\n var applicableCountries = _squid.$util.getProperty(this, 'applicability_rule.user_rule.user_countries') || [];\n\n return applicableCountries ? applicableCountries.indexOf(userCountry) >= 0 : false;\n }\n});\n\nvar $GetPSBOffersModel = exports.$GetPSBOffersModel = _squid.$Model.extend('$GetPSBOffersModel', {\n api: new _squid.$Api({\n uri: '/api/checkout/offers/offers'\n }),\n\n // If an offer is returned in the resource_list, it is active; in this\n // case we do not want to give the user another incentive\n hasActiveOffer: function hasActiveOffer() {\n return Boolean(this.resource_list && this.resource_list.length);\n },\n\n\n // Check if the user has an offer belonging to this specific offer program\n hasActiveCheckoutIncentive: function hasActiveCheckoutIncentive(offer_program_id) {\n return offer_program_id && this.hasActiveOffer() && this.resource_list.some(function (offer) {\n return offer.offer_program_id === offer_program_id;\n });\n },\n\n\n // Check if the user has an offer with the passed in redemption code\n // NOTE this is necessary because planning does not return which program\n // an incentive is from if the incentive is being used in the transaction.\n // The only identifier is the redemption code\n hasOfferWithRedemptionCode: function hasOfferWithRedemptionCode(redemption_code) {\n return redemption_code && this.hasActiveOffer() && this.resource_list.some(function (offer) {\n return offer.redemption_code === redemption_code;\n });\n }\n});\n\nangular.value(\"$EvaluateCheckoutOfferEligibilityModel\", $EvaluateCheckoutOfferEligibilityModel);\nangular.value(\"$CreateOfferModel\", $CreateOfferModel);\nangular.value(\"$GetOfferProgramModel\", $GetOfferProgramModel);\nangular.value(\"$GetPSBOffersModel\", $GetPSBOffersModel);\n_squid.$Model;\n\n_squid.$Api;\n\n_squid.$util;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-models/src/checkoutIncentive/index.js\n// module id = ../node_modules/xo-models/src/checkoutIncentive/index.js\n// module chunks = 0 8 9 10 11 38 39 40","\n\nvar _uiRouter = require('uiRouter');\n\nvar _angular = require('angular');\n\nvar _angular2 = _interopRequireDefault(_angular);\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n_angular2['default'].module().directive('xoAsideHeader', function () {\n return {\n template: _template2['default'],\n restrict: 'E',\n scope: {\n hdrtype: '@?',\n heading: '@?',\n subHead: '@?',\n addLink: '@?',\n backUrl: '@?',\n closeUrl: '@?',\n hidex: '@?',\n headerLeftLink: '=?',\n headerLeft: '@?',\n headerLeftIcon: '@?',\n headerRightLink: '=?',\n headerRight: '@?',\n headerRightIcon: '@?',\n subHeaderLeftLink: '@?',\n subHeaderLeft: '@?',\n subHeaderLeftIcon: '@?',\n subHeaderRightLink: '@?',\n subHeaderRight: '@?',\n subHeaderRightIcon: '@?',\n showDualFi: '=?'\n },\n controller: ['$scope', '$element', function ($scope, $element) {\n (0, _angular.$timeout)(function () {\n // Explicitly select `x` button and `<` buttons from manage wallet\n // and add card pages\n // See: https://engineering.paypalcorp.com/jira/browse/PPPLMER-64007\n // See: https://engineering.paypalcorp.com/jira/browse/PPPLMER-64008\n $element.find('a.focusableIcon').focus();\n });\n\n if (_angular2['default'].isUndefined($scope.closeUrl)) {\n $scope.closeUrl = 'checkout.review';\n }\n\n if ($scope.addLink) {\n $scope.subHeaderRight = 'asideHeader.add';\n $scope.subHeaderRightLink = $scope.addLink;\n }\n\n $scope.onClickLink = function (event, target, showDualFi) {\n event.preventDefault();\n if (showDualFi) {\n $scope.showFiOptions = true;\n } else if (_angular2['default'].isFunction(target)) {\n target();\n } else {\n _uiRouter.$state.go(target);\n }\n };\n }]\n };\n});\n\n_uiRouter.$state;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-page-components/src/aside-header/directive.js\n// module id = ../node_modules/xo-page-components/src/aside-header/directive.js\n// module chunks = 0 8 9 10 11 12 14 16 38 39 40 41 42 43 44 45 46 48 49 50 51 52","module.exports = \"\\n\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-page-components/src/aside-header/template.html\n// module id = ../node_modules/xo-page-components/src/aside-header/template.html\n// module chunks = 0 8 9 10 11 12 14 16 38 39 40 41 42 43 44 45 46 48 49 50 51 52","\n\nvar _angular = require('angular');\n\nvar _logger = require('xo-beaver/dist/logger');\n\n/** Name: Tray height helper */\nangular.module().directive('xoTrayHeight', function () {\n return {\n restrict: 'A',\n link: function link($scope, element, attrs) {\n // Check to see if we can use the safer full height approach\n // or if we need to fallback to calculating the height using\n // math and relying on the \"right\" timing.\n var topClass = 'xo-sidebar-wrapper';\n var topSelector = '.' + topClass;\n var topElem = document.querySelector(topSelector);\n var inScope = topElem && topElem.querySelector('[xo-tray-height]');\n var useNewFlow = topElem && inScope;\n\n /**\n * NOTE:\n * The following code, despite being the \"new\" flow, is still\n * a stopgap solution until such time as the markup and or\n * CSS undergo an overhaul. It relies on the more stable\n * cascading relative/absolute positioning and 100% height\n * *and* the fact that the code is an instance of xo-tray-height\n * within the xo-sidebar-wrapper.\n */\n function calculate() {\n var curElem = element[0];\n\n while (!~curElem.className.indexOf(topClass)) {\n var style = getComputedStyle(curElem, null);\n\n if (style.position !== 'absolute') {\n curElem.style.position = 'relative';\n }\n curElem.style.height = '100%';\n curElem = curElem.parentNode;\n }\n }\n\n /**\n * NOTE:\n * The following DEPRECATED version of the calculate method\n * relies on calculating the heights using math. This heavy\n * handed approach is fine if it is called at the right times\n * and often enough; however, this criteria is hard to achieve.\n *\n * A markup and styles overhaul is recommended to do away with\n * both of these methods.\n */\n function deprecatedCalculate() {\n // DEPRECATED\n _logger.$logger.warn('xo-tray-height-fallback', {\n message: 'Using the fallback sidebar height calculation. ' + 'height may not be 100%. You should not be here!'\n });\n var height;\n var headerHeight;\n var mainHeight;\n var trayMinheight = 400;\n var asideContentHeight;\n var $aside = $(element).parents('aside:visible');\n var $asideContent = $aside.find('.asideContent');\n\n if (!$aside || !$asideContent) {\n return;\n }\n\n // Updates the tray height to the section height\n headerHeight = $aside.find('.header').outerHeight(true);\n mainHeight = $('#main').outerHeight(true);\n\n height = mainHeight - headerHeight;\n asideContentHeight = $asideContent.outerHeight(true);\n if ($scope.miniBrowser) {\n $aside.find('.aside').css('height', '534px');\n var minHeight = 534 - headerHeight;\n\n $asideContent.css('height', minHeight);\n } else if (asideContentHeight > height) {\n $asideContent.css('height', height);\n $aside.find('aside:visible').addClass('hasScroll');\n } else {\n height = height > trayMinheight ? height : trayMinheight;\n $asideContent.css('height', height);\n $aside.removeClass('hasScroll');\n }\n }\n\n if (useNewFlow) {\n calculate();\n } else {\n (0, _angular.$timeout)(deprecatedCalculate, 1);\n\n $scope.$on('SidebarError', function () {\n deprecatedCalculate();\n });\n }\n }\n };\n});\n\n/* grab the logger so we can warn about being in the fallback mode */\n\n\n_angular.$timeout;\n\n_logger.$logger;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-tray-height/dist/directive.js\n// module id = ../node_modules/xo-tray-height/dist/directive.js\n// module chunks = 0 8 9 10 11 14 16 38 39 40 41 42 43 44 45 46 47 48 49 50 52","\n\nvar _squid = require('squid');\n\nvar _logger = require('xo-beaver/dist/logger');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nrequire('./styles');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n(0, _squid.$registerDirective)('xo-address-box', function () {\n return {\n template: _template2['default'],\n scope: {\n header: '=?',\n fullname: '=?',\n addresses: '=?',\n changeFn: '=?'\n },\n lifecycle: {\n enter: function enter() {\n _logger.$logger.info('xo-address-box_enter');\n }\n },\n controller: ['$scope', function ($scope) {\n var addressList = $scope.addresses && $scope.addresses.addresses || [];\n\n $scope.address = addressList[0] || {};\n $scope.line3 = $scope.address.city + ', ' + $scope.address.state + ' ' + $scope.address.postal_code;\n $scope.updateType = addressList.length > 1 ? _squid.$locale.content.get('common.change') : _squid.$locale.content.get('common.edit');\n $scope.updateFn = function () {\n return $scope.changeFn($scope.updateType);\n };\n $scope.fullname = $scope.fullname;\n if ($scope.fullname) {\n $scope.name = $scope.fullname.first_name + ' ' + $scope.fullname.last_name;\n }\n }]\n };\n});\n\n_squid.$registerDirective;\n\n_squid.$locale;\n\n_logger.$logger;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-ui-components/src/address-box/directive.js\n// module id = ../node_modules/xo-ui-components/src/address-box/directive.js\n// module chunks = 0 8 9 10 11 38 39 40","module.exports = \"
    \\n\\n
    \\n
    {{header}}
    \\n \\n
    \\n
    \\n

    {{name}}

    \\n

    {{address.line1}}

    \\n

    {{address.line2}}

    \\n

    {{line3}}

    \\n
    \\n
    \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-ui-components/src/address-box/template.html\n// module id = ../node_modules/xo-ui-components/src/address-box/template.html\n// module chunks = 0 8 9 10 11 38 39 40","\n\ndefine(['squid/index', 'jquery'], function (squid, $) {\n squid.module('xo-dropdown-multiline.directive', ['squid']).directive('xoDropdownMultiline', ['$timeout', function ($timeout) {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function link($scope, $select, attrs, ngModel) {\n var isListVisible = false;\n var listCreated = false;\n\n $select = $($select);\n\n var $span = $('
    ');\n var $container = $('
    ');\n var $list = void 0;\n\n function updateCover() {\n $timeout(function () {\n $span.find('span span').html($select.find('[selected]').text().replace(/\\\\n/gi, '
    ').trim());\n }, 10);\n }\n\n function createList($options) {\n if ($options.length < 2) {\n return;\n }\n\n function getModel() {\n var modelName = void 0;\n var model = void 0;\n var subParts = void 0;\n\n if ($select.attr('ng-options')) {\n modelName = $select.attr('ng-options').substring($select.attr('ng-options').indexOf('in ') + 3, $select.attr('ng-options').length);\n } else {\n var $option = $($select.find('[ng-repeat]')[0]);\n\n modelName = $option.attr('ng-repeat').substring($option.attr('ng-repeat').indexOf('in ') + 3, $option.attr('ng-repeat').length);\n }\n\n // This is to handle cases like card.billingAddress\n if (modelName.indexOf('.') !== -1) {\n subParts = modelName.split('.');\n model = $scope;\n\n for (var i = 0; i < subParts.length; i++) {\n model = model[subParts[i]];\n }\n } else {\n // And this is to handle straightforward model names\n model = $scope[modelName];\n }\n\n return model;\n }\n\n function hideList(event) {\n $list.hide();\n $container.append($list);\n isListVisible = false;\n $container.removeClass('open');\n }\n\n function positionList() {\n $list.css('left', $container.offset().left + 'px');\n $list.css('top', $container.offset().top + $container.height() + 'px');\n $list.css('width', $container.width() + 'px');\n }\n\n function setFocusOnSelected() {\n var $selected = $select.find('[selected]');\n\n if ($selected.length) {\n var $item = $list.find('[data-value=\"' + $selected.attr('value') + '\"]');\n\n $item.focus();\n } else {\n $list.find('li')[0].focus();\n }\n }\n\n function showList() {\n $('body').append($list);\n $container.addClass('open');\n $list.show();\n positionList();\n isListVisible = true;\n setFocusOnSelected();\n }\n\n function processContainerKeypress(event) {\n var keyCode = event && event.keyCode;\n\n if (keyCode === 13 || keyCode === 40) {\n // enter or down arrow\n if (!isListVisible) {\n showList();\n } else {\n hideList();\n $container.focus();\n }\n } else if (keyCode === 27) {\n // escape\n if (isListVisible) {\n hideList();\n $container.focus();\n }\n }\n }\n\n if ($list) {\n $list.remove();\n }\n\n $list = $('
      ');\n\n Array.prototype.forEach.call($options, function (option) {\n var $option = $(option);\n var value = $option.attr('value');\n var text = option.innerHTML.replace(/\\\\n/gi, '
      ');\n\n if (text.indexOf('content(') !== -1) {\n text = $scope.content(text.substring(text.indexOf('(\\'') + 2, text.indexOf('\\')')));\n }\n\n var html = '
    • ' + text + '
    • ';\n $list.append($(html));\n });\n\n $container.append($list);\n $list.hide();\n\n $($list.find('li')).click(function (event) {\n var $target = $(event.target);\n var value = $target.data('value');\n\n if (typeof value !== 'undefined') {\n $select.find('option').removeAttr('selected');\n $select.find('option[value=\"' + value + '\"]').attr('selected', 'selected');\n $select.find('option').removeProp('selected');\n $select.find('option[value=\"' + value + '\"]').prop('selected', 'selected');\n } else {\n value = $target.html().replace(/\\//gi, '\\\\n');\n $select.val(value);\n }\n\n if ($select.attr('ng-model')) {\n if ($select.attr('ng-options') || $select.find('[ng-repeat]').length) {\n /* This parses the 'ng-options' directive and returns the options model.\n For example: If you have: ng-options='opt as opt.label for opt in options'\n Here it will parse this attribute and return 'options */\n var model = getModel();\n\n ngModel.$setViewValue(model[value]);\n } else {\n ngModel.$setViewValue(value);\n }\n }\n updateCover();\n hideList();\n });\n\n var $innerContainer = $container.find('.innerContainer');\n\n $container.click(function () {\n if (isListVisible) {\n hideList();\n $container.focus();\n } else {\n showList();\n }\n });\n\n $container.keydown(function (event) {\n return processContainerKeypress(event);\n });\n $innerContainer.keydown(function (event) {\n return processContainerKeypress(event);\n });\n\n $list.find('li').keydown(function (event) {\n var keyCode = event && event.keyCode;\n var $target = $(event.target);\n\n if (keyCode === 13) {\n // enter\n $target.click();\n event.stopPropagation();\n } else if (keyCode === 27) {\n // escape\n if (isListVisible) {\n hideList();\n $container.focus();\n event.stopPropagation();\n }\n } else if (keyCode === 40) {\n // down arrow\n if (!$target.is(':last-of-type')) {\n $target.next().focus();\n event.preventDefault();\n event.stopPropagation();\n }\n } else if (keyCode === 38) {\n // up arrow\n if (!$target.is(':first-of-type')) {\n $target.prev().focus();\n }\n event.preventDefault();\n event.stopPropagation();\n }\n });\n\n $(window).resize(function () {\n if (isListVisible) {\n positionList();\n }\n });\n\n $(window).bind('hashchange', function () {\n if (isListVisible) {\n hideList();\n }\n });\n\n $(document).click(function (event) {\n var $target = $(event.target);\n\n if (!($target.is($container) || $.contains($container.get()[0], $target.get()[0])) && isListVisible) {\n hideList();\n }\n });\n\n $container.blur(function (event) {\n // The setTimeout here is to ensure activeElement is set before our function executes\n $timeout(function () {\n var $newTarget = $(event.explicitOriginalTarget || document.activeElement);\n\n if (!($.contains($container.get()[0], $newTarget.get()[0]) || $.contains($list.get()[0], $newTarget.get()[0]))) {\n hideList(event);\n }\n }, 1);\n });\n\n listCreated = true;\n updateCover();\n }\n\n function render() {\n var options = $select.find('option');\n\n if (!listCreated) {\n createList(options);\n }\n }\n\n $select.wrap($container);\n $container = $select.parent();\n\n // Change class names to enable styling of hover/focus states\n $select.bind('mouseenter focus', function () {\n return $span.addClass('active');\n });\n // Change class names to enable styling of hover/focus states\n $select.bind('mouseleave blur', function () {\n return $span.removeClass('active');\n });\n $select.after($span);\n $select.addClass('replaced');\n $select.attr('tabindex', '-1');\n\n if (attrs['default']) {\n var defaultOption = document.createElement('option');\n\n defaultOption.innerText = attrs['default'];\n $select.append(defaultOption);\n }\n\n if ($select.attr('ng-options')) {\n $scope.$watch(attrs.ngModel, function () {\n render();\n });\n } else {\n $timeout(function () {\n return $scope.$broadcast('pageRendered');\n });\n }\n\n $scope.$on('pageRendered', function () {\n return render();\n });\n }\n };\n }]);\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-ui-components/src/dropdown-multiline/directive.js\n// module id = ../node_modules/xo-ui-components/src/dropdown-multiline/directive.js\n// module chunks = 0 8 9 10 11 12 13 14 15 16 38 39 40 42 43 44 45 47","\n\ndefine(['squid/index', 'jquery'], function (squid, $) {\n $.fn.dropdown = function () {\n console.warn('Dropdown deprecated');\n };\n squid.module('xo-dropdown.directive', ['squid']).directive('xoDropdown', ['$parse', '$window', '$timeout', '$util', '$compile', function ($parse, $window, $timeout, $util, $compile) {\n var userAgent = ($window.navigator || {}).userAgent;\n var isWinOS = Boolean(userAgent.match(/\\(win/i));\n\n return {\n restrict: 'A',\n scope: {\n dropdownTextBindVar: '=?'\n },\n link: function link($scope, $element, attrs) {\n var $parentScope = $scope.$parent;\n var $select = $($element);\n // TODO: This html should be refactored out into a template.\n var $span = $('');\n var selectInitialValue = '';\n var ngChange = '';\n\n $select.parent().addClass('custom-select-container');\n // Change class names to enable styling of hover/focus states\n $select.bind('mouseenter', function () {\n return $span.addClass('active');\n });\n $select.bind('mouseleave', function () {\n return $span.removeClass('active');\n });\n // Change class names to enable styling of hover/focus states\n $select.bind('focus', function () {\n selectInitialValue = $parse(attrs.ngModel)($parentScope);\n $span.addClass('active');\n });\n\n function executeSelectChange() {\n // setTimeout here is to ensure activeElement is set before our function executes\n $timeout(function () {\n var val = $parse(attrs.ngModel)($parentScope);\n\n if (selectInitialValue !== val) {\n if (ngChange) {\n ngChange($parentScope);\n }\n selectInitialValue = val;\n }\n }, 5);\n }\n\n if (isWinOS) {\n if (attrs['ngChange']) {\n ngChange = $parse(attrs.ngChange);\n attrs['ngChange'] = '';\n }\n\n $select.bind('blur', function () {\n executeSelectChange();\n $span.removeClass('active');\n });\n $select.bind('click', function () {\n return executeSelectChange();\n });\n } else {\n $select.bind('blur', function () {\n return $span.removeClass('active');\n });\n }\n\n $select.after($span);\n $select.addClass('replaced');\n\n if (attrs['default']) {\n var defaultOption = document.createElement('option');\n\n defaultOption.innerText = attrs['default'];\n $select.append(defaultOption);\n }\n\n var match = (attrs.ngOptions || '').match(/in ([\\w\\.]+)/);\n // Text Update Method 1(new): ng-bind on variable passed in directive and that is updated in parent/sibling scope\n if (angular.isDefined($scope.dropdownTextBindVar)) {\n var selectTextElement = $span.find('span span');\n\n if (selectTextElement.length) {\n $(selectTextElement).attr('ng-bind', 'dropdownTextBindVar');\n $(selectTextElement).html($compile(selectTextElement[0])($scope));\n }\n\n $scope.$watch('dropdownTextBindVar', function (newVal) {\n if (document.documentElement.getAttribute('dir') === 'rtl') {\n $span.toggleClass('ltrOverride', !$util.hasRTL(newVal));\n }\n });\n }\n // Text Update Method 2(old): jQuery text update on various conditions (not as reliable for me, ran into timing edge cases)\n else {\n var updateCover = function updateCover() {\n $timeout(function () {\n var text = $select.find(':selected').text().trim();\n\n $span.find('span span').text(text);\n if (document.documentElement.getAttribute('dir') === 'rtl') {\n $span.toggleClass('ltrOverride', !$util.hasRTL(text));\n }\n }, 5);\n };\n\n $parentScope.$watch(attrs.ngModel, updateCover);\n $scope.$on('contentChange', updateCover);\n if (match) {\n $parentScope.$watch(match[1], updateCover);\n }\n // Update cover on arrow key press, for case where menu is not open\n // but user is interacting with dropdown (eg. Firefox)\n $select.bind('keyup', function (event) {\n // Arrow keys are 37 - 40\n if (event.which >= 37 || event.which <= 40) {\n updateCover();\n }\n });\n }\n\n toggleOptionsLTROverride();\n if (match) {\n $parentScope.$watch(match[1], function (newVal) {\n toggleOptionsLTROverride();\n });\n }\n\n function toggleOptionsLTROverride() {\n if (document.documentElement.getAttribute('dir') === 'rtl') {\n $timeout(function () {\n var options = $select.find('option');\n\n for (var i = 0; i < options.length; i++) {\n $(options.get(i)).toggleClass('ltrOverride', !$util.hasRTL(options.get(i).text));\n }\n });\n }\n }\n }\n };\n }]);\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-ui-components/src/dropdown/directive.js\n// module id = ../node_modules/xo-ui-components/src/dropdown/directive.js\n// module chunks = 0 1 8 9 10 11 12 13 14 15 16 17 19 38 39 40 41 42 43 44 45 46 47 48","\n\nvar _squid = require('squid');\n\nvar _logger = require('xo-beaver/dist/logger');\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$ExpiredFiPanelFactory', [function () {\n\n var disallowedContentMap = {\n 'INSTRUMENT_VERIFICATION_FAILED': 'wallet.disallowedDueToPreAuth',\n 'unsupportedGeneric': 'wallet.unsupportedDueToRisk',\n 'unsupportedByProduct': 'wallet.unsupportedDueToReceiverPreference',\n 'unsupportedDueToExpiration': 'wallet.unsupportedDueToExpiration'\n };\n var disallowedExp = {\n resourceName: 'xo_preauth_disallowed_instruments',\n control: 'xo_preauth_disallowed_instruments_control',\n disallowedFi: 'xo_preauth_disallowed_instruments_disallowed_fi',\n preAuth: 'xo_preauth_disallowed_instruments_preauth'\n };\n\n var getPxpResult = function getPxpResult(models) {\n var schedule = models.cart && models.cart.isBilling() ? 'BILLING' : 'ONE_TIME_PAYMENT';\n var approval_type = models.cart && models.cart.isPurchase() ? 'PURCHASE' : 'NOT_PURCHASE';\n var solution = _squid.$integration.isFlow('WPS') ? 'WEBSITE_PAYMENTS_STANDARD' : 'EXPRESS_CHECKOUT';\n\n return (0, _squid.$elmo)(disallowedExp.resourceName, { 'ctx.country': _squid.$locale.country, 'ctx.flow': 'HERMES', 'ctx.schedule': schedule, 'ctx.approval_type': approval_type, 'ctx.solution': solution }, disallowedExp.resourceName + '(.*)').then(function (result) {\n return result && result.treatment_name;\n });\n };\n\n var filterInstrumentsFromDisallowed = function filterInstrumentsFromDisallowed(instrument, fundingOptions) {\n var match = fundingOptions.find(function (fundingInstrument) {\n return fundingInstrument.id === instrument.id;\n });\n return match === undefined;\n };\n\n var disallowedDueToPreAuth = function disallowedDueToPreAuth(disallowedFi, fundingOptions) {\n return disallowedFi.filter(function (i) {\n return i.declineReason === 'INSTRUMENT_VERIFICATION_FAILED' && i.isPreferred !== true && filterInstrumentsFromDisallowed(i, fundingOptions);\n });\n };\n\n var disallowedDueToOther = function disallowedDueToOther(disallowedFi, fundingOptions) {\n return disallowedFi.filter(function (i) {\n return i.type && i.type !== 'REWARDS' && i.declineReason !== 'INSTRUMENT_VERIFICATION_FAILED' && i.isPreferred !== true && filterInstrumentsFromDisallowed(i, fundingOptions);\n });\n };\n\n var mapDisallowedContent = function mapDisallowedContent(disallowed, token) {\n if (disallowed.type === 'CARD') {\n disallowed.message = disallowedContentMap[disallowed.declineReason] ? disallowedContentMap[disallowed.declineReason] : disallowedContentMap['unsupportedGeneric'];\n logInstrumentToFpti(disallowed, token);\n return disallowed;\n } else {\n disallowed.message = disallowedContentMap['unsupportedGeneric'];\n logInstrumentToFpti(disallowed, token);\n return disallowed;\n }\n };\n\n var logInstrumentToFpti = function logInstrumentToFpti(instrument, token) {\n var fptiPayload = {\n 'from': 'POST_PLANNING',\n 'to': 'exception_disallowed_fi',\n 'context_type': _squid.$integration.isFlow('WPS') ? 'WEBSITE_PAYMENTS_STANDARD' : 'EXPRESS_CHECKOUT',\n 'context_id': token,\n 'fi_id': instrument.id,\n 'disallowed_reason': instrument.declineReason,\n 'message': instrument.message\n };\n _logger.$logger.info('checkout_fpti', fptiPayload);\n };\n\n var getAllInstruments = function getAllInstruments(models) {\n var instruments = [].concat(models.checkoutSession.get('fundingOptions').getDisplayInstruments());\n var token = models.checkoutSession.get('id');\n\n return getPxpResult(models).then(function (result) {\n if (result === disallowedExp.control) {\n return _squid.$promise.resolve(instruments);\n } else if (result === disallowedExp.disallowedFi || result === disallowedExp.preAuth) {\n var disallowedFi = models.checkoutSession.getDisallowedInstruments();\n\n if (!disallowedFi) {\n return _squid.$promise.resolve(instruments);\n }\n var fundingOption = models.checkoutSession.get('fundingOptions.instruments');\n var disallowedPreAuth = disallowedDueToPreAuth(disallowedFi, fundingOption);\n var disallowedPreferred = models.checkoutSession.getDisallowedPreferred();\n var disallowedOther = disallowedDueToOther(disallowedFi, fundingOption);\n\n if (disallowedPreferred) {\n instruments.push(mapDisallowedContent(disallowedPreferred, token));\n }\n if (disallowedPreAuth && disallowedPreAuth.length) {\n _squid.$util.forEach(disallowedPreAuth, function (instrument) {\n instruments.push(mapDisallowedContent(instrument, token));\n });\n }\n if (disallowedOther && disallowedOther.length) {\n _squid.$util.forEach(disallowedOther, function (instrument) {\n instruments.push(mapDisallowedContent(instrument, token));\n });\n }\n }\n return _squid.$promise.resolve(instruments);\n });\n };\n\n return {\n getPxpResult: getPxpResult,\n getAllInstruments: getAllInstruments,\n disallowedExp: disallowedExp\n };\n}]);\n\n_squid.$util;\n\n_squid.$locale;\n\n_squid.$promise;\n\n_squid.$elmo;\n\n_squid.$integration;\n\n_logger.$logger;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-ui-components/src/expired-fi-panel/factory.js\n// module id = ../node_modules/xo-ui-components/src/expired-fi-panel/factory.js\n// module chunks = 0 41 49","\n\nvar _angular = require('angular');\n\nvar _squid = require('squid');\n\nrequire('./styles');\n\nvar treatmentType = void 0;\nvar newLocale = void 0;\nvar oldLocale = void 0;\n\nfunction getTreatment() {\n if (treatmentType !== undefined) {\n return treatmentType;\n }\n if ((0, _squid.$feature)('floatingLabels')) {\n return true;\n }\n var token = _angular.$rootScope.token;\n var throttle = _squid.$config['floatingLabelLocales'] && _squid.$config['floatingLabelLocales'][_squid.$locale.country] && _squid.$config['floatingLabelLocales'][_squid.$locale.country][_squid.$locale.lang];\n var id = _squid.$locale.lang + '_' + _squid.$locale.country + token;\n\n treatmentType = throttle && (0, _squid.$experiment)('floating_label_exp', throttle, id, {}) ? true : false;\n return treatmentType;\n}\n\n(0, _squid.$registerDirective)('floating-label', function () {\n return {\n restrict: 'A',\n link: function link(scope, element, attrs) {\n scope.$on('localeChange', function () {\n newLocale = _squid.$locale.country + '_' + _squid.$locale.lang;\n\n if (oldLocale !== newLocale) {\n treatmentType = undefined;\n oldLocale = newLocale;\n }\n scope.showFloatingLabels = getTreatment();\n });\n\n (0, _angular.$timeout)(function () {\n scope.showFloatingLabels = getTreatment();\n\n scope.$watch('showFloatingLabels', function (val) {\n // remove else block after experimentation is complete\n if (val) {\n element.addClass('floatingLabel');\n element.removeClass('noFloatingLabel');\n } else {\n element.removeClass('floatingLabel');\n element.addClass('noFloatingLabel');\n }\n });\n\n var input = element.find('input');\n\n if (input.attr('placeholder')) {\n input.addClass('hasPlaceholder');\n }\n\n // To hide the placeholder labels for pre-populated input fields\n scope.$watch(input.attr('ng-model'), function (value) {\n input.toggleClass('focused', !!value);\n });\n\n // We're using this as an alternative to watching 'ng-model' since this properly triggers the focused CSS property on email input.\n input.on('keyup', function (event) {\n var val = event.target.value;\n\n input.toggleClass('focused', !!val);\n });\n\n input.on('focus blur click', function (event) {\n if (scope.showFloatingLabels) {\n input.toggleClass('focused', event.type === 'focus' || this.value.length > 0);\n }\n });\n\n if (!('disableAutoblur' in attrs)) {\n input.trigger('blur');\n }\n });\n }\n };\n});\n\n(0, _squid.$registerDirective)('floating-label-dropdown', function () {\n return {\n restrict: 'A',\n link: function link(scope, element, attrs) {\n scope.$on('localeChange', function () {\n newLocale = _squid.$locale.country + '_' + _squid.$locale.lang;\n\n if (oldLocale !== newLocale) {\n treatmentType = undefined;\n oldLocale = newLocale;\n }\n scope.showFloatingLabels = getTreatment();\n });\n\n (0, _angular.$timeout)(function () {\n scope.showFloatingLabels = getTreatment();\n scope.$watch('showFloatingLabels', function (val) {\n // remove else block after experimentation is complete\n if (val) {\n element.addClass('floatingLabel');\n element.removeClass('noFloatingLabel');\n } else {\n element.removeClass('floatingLabel');\n element.addClass('noFloatingLabel');\n }\n });\n\n var select = element.find('select');\n var label = element.find('label');\n var flSpan = element.find('.custom-select span span');\n\n select.on('change mouseenter mouseleave blur', function (event) {\n var value = event.currentTarget.value;\n\n select.toggleClass('focused', event.type === 'change' || value.length > 0);\n flSpan.toggleClass('noValue', value.length < 1);\n label.toggleClass('hide', value.length < 1);\n }).trigger('mouseleave');\n });\n }\n };\n});\n\n_angular.$timeout;\n\n_angular.$rootScope;\n\n_squid.$locale;\n\n_squid.$experiment;\n\n_squid.$config;\n\n_squid.$feature;\n\n_squid.$registerDirective;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-ui-components/src/floating-label/directive.js\n// module id = ../node_modules/xo-ui-components/src/floating-label/directive.js\n// module chunks = 0 1 8 9 10 11 12 13 14 15 16 17 38 39 40 41 42 43 44 45 47","\n\nexports.__esModule = true;\n\nvar _squid = require('squid');\n\nexports['default'] = (0, _squid.$registerDirective)('prefix-attrs-with', function () {\n return {\n restrict: 'A',\n link: function link(scope, elem, attrs) {\n var prefix = attrs.prefixAttrsWith;\n\n if (prefix && prefix.length) {\n ['id', 'for', 'name'].forEach(function (attrName) {\n var base = attrs[attrName];\n\n if (base) {\n elem.attr(attrName, _squid.$util.dasherizeToCamel(prefix + '-' + base));\n }\n });\n }\n }\n };\n});\n\n\n_squid.$util;\n\n_squid.$registerDirective;\nmodule.exports = exports['default'];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-ui-components/src/prefix-attrs-with/directive.js\n// module id = ../node_modules/xo-ui-components/src/prefix-attrs-with/directive.js\n// module chunks = 0 8 9 10 11 12 13 14 15 16 38 39 40 42 43 44 45 47","\n\ndefine(['angular', 'text!./template.html'], function (angular, template) {\n return angular.module('xo-spinner-button.directive', []).directive('xoSpinnerButton', [function () {\n return {\n template: template,\n scope: {\n token: '=?',\n track: '@?',\n onClick: '=?',\n buttonText: '@?',\n isProcessing: '=?',\n validate: '=?'\n },\n controller: ['$scope', function ($scope) {\n\n $scope.submit = function () {\n if ($scope.onClick) {\n $scope.onClick();\n } else {\n $scope.validate = true;\n }\n };\n }]\n };\n }]);\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-ui-components/src/spinner-button/directive.js\n// module id = ../node_modules/xo-ui-components/src/spinner-button/directive.js\n// module chunks = 0 1 8 9 10 11 38 39 40 41","\n\nrequire('uiUtils');\n\nvar _squid = require('squid');\n\nrequire('xo-form-components/src/zipcode/directive');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoAddCep', function () {\n return {\n template: _template2['default'],\n scope: {\n token: '=?',\n sidebar: '=?',\n prefillAddress: '=?',\n doneFn: '=?'\n },\n controller: ['$scope', function ($scope) {\n $scope.country = _squid.$locale.country;\n $scope.address = {};\n $scope.onSubmit = function () {\n $scope.prefillAddress.address = {\n country: _squid.$locale.country,\n postal_code: $scope.address.postal_code\n };\n return $scope.prefillAddress.save({\n data: $scope.prefillAddress,\n success: function success(result) {\n $scope.prefillAddress.address = result;\n $scope.doneFn();\n }\n });\n };\n }]\n };\n});\n\n_squid.$locale;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/addCep/directive.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/addCep/directive.js\n// module chunks = 0 8 9 10 11 38 39 40","\n\nvar _squid = require('squid');\n\nrequire('./directive');\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$AddCepRoute', function () {\n return _squid.$ComponentRoute.extend('AddCepRoute', {\n name: 'addCep',\n directive: 'xo-add-cep',\n titleContent: 'addBillingAddress.title',\n loginRequired: true,\n children: []\n });\n});\n\n_squid.$ComponentRoute;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/addCep/route.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/addCep/route.js\n// module chunks = 0 8 9 10 11 38 39 40","module.exports = \"\\n\\n

      {{ content('addBillingAddress.title') }}

      \\n\\n
      \\n
      \\n \\n
      \\n \\n
      \\n
      \\n
      \\n\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/addCep/template.html\n// module id = ../node_modules/xo-wallet-components/src/add-card/addCep/template.html\n// module chunks = 0 8 9 10 11 38 39 40","\n\nrequire('uiUtils');\n\nvar _angular = require('angular');\n\nvar _uiRouter = require('uiRouter');\n\nvar _logger = require('xo-beaver/dist/logger');\n\nvar _squid = require('squid');\n\nvar _address = require('xo-models/src/address');\n\nvar _checkout = require('xo-models/src/checkout');\n\nvar _fi = require('xo-models/src/fi');\n\nrequire('xo-page-components/src/aside-header/directive');\n\nrequire('xo-ui-components/src/accessibility/directive');\n\nrequire('xo-ui-components/src/error-tooltip/directive');\n\nrequire('xo-address-components/src/add-address/directive');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoAddBilling', function () {\n return {\n template: _template2['default'],\n scope: {\n auth: '=?',\n token: '=?',\n doneFn: '=?',\n parentCallbacks: '=?',\n sidebar: '=?',\n showmeftsection: '=?',\n hideparenthead: '=?',\n billingaddressupdated: '=?',\n prefillAddress: '=?'\n },\n controller: ['$scope', '$element', function ($scope, $element) {\n var country = _squid.$locale.getCountryCodeISO();\n\n $scope.billing = true; // to denote its billing address page still\n $scope.normalize = (0, _squid.$feature)('addressNormalization');\n $scope.country = country;\n var $el = $($element);\n\n if ($scope.showmeftsection) {\n $scope.showmeftsection.toggle = false;\n }\n\n if ($scope.hideparenthead) {\n $scope.hideparenthead.toggle = true;\n }\n\n function isUserInputtedAddress(address) {\n return address && address.id === '0';\n }\n\n // Label fields has having error if needed to, and focus the first error if needed\n function handleValidation(res) {\n if (res && res.fields && res.fields.length) {\n res.fields.forEach(function (field) {\n if (field.field) {\n var $field = $($el.find('[name=\"' + field.field + '\"]'));\n\n if ($field.length === 0 && field.field === 'zip') {\n $field = $($el.find('[ng-model=\"address.postal_code\"], [ng-model=\"zipCode\"]'));\n }\n $field.addClass('backendError');\n $field.attr('aria-invalid', true);\n }\n });\n }\n\n $el.find('form').find('.backendError, .ng-invalid').first().focus();\n }\n\n var prefilledAddress = $scope.prefillAddress && $scope.prefillAddress.address;\n\n if (prefilledAddress) {\n $scope.prefilled = true;\n }\n\n $scope.address = $scope.address || prefilledAddress || { country: country };\n\n var editFlow = function editFlow() {\n _logger.$logger.info('xo-billing_editFlow_check', {\n 'flow_type': _uiRouter.$stateParams.flow_type\n });\n if (_uiRouter.$stateParams.flow_type === 'edit') {\n $scope.address = $scope.billingAddresses.addresses[0];\n }\n };\n\n (0, _squid.$populate)($scope, {\n billingAddresses: _fi.$BillingAddressesModel.instance(),\n flowEligibility: _checkout.$FlowEligibilityModel.instance($scope.token).retrieve({\n params: {\n geolocation: _squid.$meta.geolocation,\n localeCountry: _squid.$locale.country\n }\n })\n }).then(function () {\n editFlow();\n $scope.debitCardFlow = angular.isArray($scope.flowEligibility.paymentCardProductClass) && $scope.flowEligibility.paymentCardProductClass.length === 1 && $scope.flowEligibility.paymentCardProductClass[0] === 'DEBIT';\n\n $scope.cancelFn = function () {\n $scope.done();\n };\n\n $scope.done = function (target) {\n var el = $('.tokenization #sidepageAddCard');\n\n if (el) {\n el.removeClass('slideLeft');\n }\n target = target || '^.addCard';\n _uiRouter.$state.go(target);\n };\n\n $scope.onSubmit = function () {\n $scope.updateAddress();\n };\n\n $scope.prefill = function () {\n $scope.address.country = $scope.country;\n $scope.prefillAddress = new _address.$PrefillAddressModel({\n id: $scope.token,\n address: $scope.address\n });\n\n return $scope.prefillAddress.save({\n data: $scope.prefillAddress,\n success: function success(result) {\n $scope.address = result;\n $scope.prefilled = true;\n $scope.showAddressFields = true;\n\n (0, _angular.$timeout)(function () {\n var value = $scope.address && $scope.address.state;\n var $option = $el.find('[value=\"' + value + '\"]');\n\n $option.prop('selected', 'selected');\n $option.trigger('change');\n value = $option.attr('label');\n }, 500);\n }\n });\n };\n\n $scope.updateAddress = function () {\n var newBilling = new _fi.$BillingAddressModel({\n line1: $scope.address.line1,\n line2: $scope.address.line2,\n city: $scope.address.city,\n state: $scope.address.state,\n postal_code: $scope.address.postal_code,\n normalization_status: $scope.address.normalization_status,\n country: country,\n id: '0'\n });\n\n return newBilling.save({\n data: $scope.billingAddress,\n success: function success() {\n if ($scope.normalize) {\n // set to false so that html related to billing address is hidden when child is shown\n $scope.billing = false;\n $scope.address.full_address = newBilling.full_address;\n _uiRouter.$state.go('.addressNormalization');\n } else {\n $scope.updateBillingAddressAndReturn('^.addCard', newBilling);\n }\n },\n validation: function validation(res) {\n return handleValidation(res);\n }\n });\n };\n\n $scope.uponNormalization = function (normalizedAddress, isBack) {\n if (isBack) {\n $scope.billing = true;\n _uiRouter.$state.go('^');\n } else {\n $scope.updateBillingAddressAndReturn('^.^.addCard', normalizedAddress);\n }\n };\n\n $scope.updateBillingAddressAndReturn = function (target, address) {\n var newBillingAddress = void 0;\n\n if (address && address instanceof _fi.$BillingAddressModel) {\n newBillingAddress = address;\n } else {\n newBillingAddress = new _fi.$BillingAddressModel({\n line1: address.line1,\n line2: address.line2,\n city: address.city,\n state: address.state,\n postal_code: address.postal_code,\n normalization_status: address.normalization_status,\n country: address.country || $scope.country,\n full_address: address.full_address || $scope.address.full_address,\n id: '0'\n });\n }\n\n var addresses = $scope.billingAddresses && $scope.billingAddresses.addresses;\n\n if (!isUserInputtedAddress(addresses[0])) {\n addresses.unshift(newBillingAddress);\n } else {\n addresses[0] = newBillingAddress;\n }\n $scope.billingaddressupdated.value = true;\n $scope.done(target);\n };\n\n // page transition after the page is loaded\n var el = $('.tokenization #sidepageAddCard');\n\n if (el) {\n el.addClass('slideLeft');\n }\n });\n }]\n };\n});\n\n_angular.$timeout;\n\n_uiRouter.$state;\n\n_uiRouter.$stateParams;\n\n_logger.$logger;\n\n_squid.$feature;\n\n_squid.$locale;\n\n_squid.$meta;\n\n_squid.$populate;\n\n_address.$PrefillAddressModel;\n\n_checkout.$FlowEligibilityModel;\n\n_fi.$BillingAddressesModel;\n\n_fi.$BillingAddressModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/addbilling/directive.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/addbilling/directive.js\n// module chunks = 0 8 9 10 11 38 39 40","\n\nvar _squid = require('squid');\n\nrequire('xo-address-components/src/add-address/directive');\n\nrequire('xo-address-components/src/address-normalization/route');\n\nrequire('./directive');\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$AddBillingRoute', function () {\n return _squid.$ComponentRoute.extend('AddBillingRoute', {\n name: 'addBilling',\n directive: 'xo-add-billing',\n titleContent: 'addBillingAddress.title',\n query: ['flow_type'],\n trackingData: {\n fptiState: 'edit_billing'\n },\n loginRequired: true,\n children: [{\n name: '$AddressNormalizationRoute',\n attributes: {\n id: 'token',\n sidebar: 'sidebar',\n address: 'address',\n 'done-fn': 'uponNormalization'\n }\n }]\n });\n});\n\n_squid.$ComponentRoute;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/addbilling/route.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/addbilling/route.js\n// module chunks = 0 8 9 10 11 38 39 40","module.exports = \"
      \\n \\n\\n \\n\\n

      {{ content('addBillingAddress.title') }}

      \\n\\n
      \\n
      \\n
      \\n \\n
      \\n\\n \\n
      \\n
      \\n
      \\n
      \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/addbilling/template.html\n// module id = ../node_modules/xo-wallet-components/src/add-card/addbilling/template.html\n// module chunks = 0 8 9 10 11 38 39 40","\n\nrequire('uiUtils');\n\nvar _angular = require('angular');\n\nvar _uiRouter = require('uiRouter');\n\nvar _logger = require('xo-beaver/dist/logger');\n\nvar _squid = require('squid');\n\nvar _auth = require('xo-models/src/auth');\n\nvar _choice = require('xo-models/src/choice');\n\nvar _newMember = require('xo-models/src/newMember');\n\nvar _index = require('xo-models/src/app/index');\n\nvar _fi = require('xo-models/src/fi');\n\nvar _index2 = require('xo-models/src/checkout/index');\n\nvar _checkoutIncentive = require('xo-models/src/checkoutIncentive');\n\nrequire('xo-page-components/src/aside-header/directive');\n\nrequire('xo-page-components/src/notYou/directive');\n\nrequire('xo-tray-height/dist/directive');\n\nrequire('xo-ui-components/src/accessibility/directive');\n\nrequire('xo-ui-components/src/address-box/directive');\n\nrequire('xo-ui-components/src/banner/directive');\n\nrequire('xo-ui-components/src/dropdown/directive');\n\nrequire('xo-ui-components/src/error-tooltip/directive');\n\nrequire('xo-ui-components/src/message/directive');\n\nrequire('xo-ui-components/src/user-assist-banner/directive');\n\nrequire('xo-form-components/src/phone/phoneInput/directive');\n\nrequire('../creditcard-input/directive');\n\nrequire('../../three-ds/directive');\n\nvar _util = require('../../fi-contingency-list/util');\n\nvar _cardMetaData = require('../cardMetaData');\n\nvar _factory = require('./factory');\n\nvar _factory2 = require('xo-member-components/src/no-balance/factory');\n\nvar _constants = require('../../three-ds/constants');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoAddCard', function () {\n return {\n template: _template2['default'],\n scope: {\n token: '=?',\n done: '=?',\n messagetitle: '=?',\n message: '=?',\n pagetitle: '=?',\n sidebar: '=?',\n showmeftsection: '=?',\n hideparenthead: '=?',\n billingaddressupdated: '=?',\n cardmodel: '=?',\n parentCallbacks: '=?',\n selectedPromotionCardType: '=?',\n promotion: '=?',\n pageLevel: '=?',\n logout: '=?',\n phone: '=?',\n manageCardFlow: '=?',\n showCancel: '=?',\n showSetPreferredFi: '=?',\n onSuccess: '=?',\n backUri: '=?',\n showIncentive: '=?',\n incentiveAmount: '=?',\n updateCardCpa: '=?',\n cause: '=?'\n },\n controller: ['$scope', '$element', function ($scope, $element) {\n\n $scope.isCPAEligible = $scope.cause === 'cpa';\n $scope.address_box = {\n changeFn: function changeFn(type) {\n _logger.$logger.info('xo-address-box_changeFn - ' + type);\n _uiRouter.$state.go('^.addBilling', {\n flow_type: 'edit'\n });\n }\n };\n\n // Ensure no incentive-related actions are taken unless\n // explicityly passed 'true' from the xo-add-card page\n // Also ensure there are no duplicate titles\n $scope.showIncentive = Boolean($scope.showIncentive);\n var isNoBalanceEligible = _factory2.$NoBalanceFactory.get().eligible;\n\n $scope.showPageTitle = Boolean($scope.pagetitle && !($scope.isNmjDesign2 || $scope.isNmjDesign3) && !isNoBalanceEligible);\n $scope.showMessageTitle = Boolean($scope.messagetitle);\n $scope.showMessageBanner = !$scope.sidebar && !$scope.showIncentive && !isNoBalanceEligible;\n $scope.showNoBalanceHeaderAndNoFiContingency = isNoBalanceEligible && _uiRouter.$stateParams.message === 'NEED_CREDIT_CARD';\n\n (0, _squid.$populate)($scope, {\n cart: _index2.$CheckoutCartModel.instance($scope.token),\n auth: _auth.$AuthModel.instance(),\n billingAddresses: _fi.$BillingAddressesModel.instance(),\n checkoutSession: _index2.$CheckoutSessionModel.instance($scope.token).retrieve({\n contingencies: {\n NEED_CREDIT_CARD: angular.noop,\n EXPIRED_CREDIT_CARD: angular.noop\n }\n }),\n flowEligibility: _index2.$FlowEligibilityModel.instance($scope.token).retrieve({\n params: {\n geolocation: _squid.$meta.geolocation,\n localeCountry: _squid.$locale.country\n }\n }),\n tokenizedWalletInfoModel: _index.$TokenizedWalletInfoModel.instance($scope.token).retrieve(),\n checkoutAppData: _index2.$CheckoutAppDataModel.instance($scope.token).retrieve()\n }).then(function () {\n if ($scope.auth) {\n $scope.formattedNameInformal = (0, _squid.formatNameInformal)({\n first_name: $scope.auth.first_name,\n last_name: $scope.auth.last_name\n }) || $scope.auth.email;\n }\n\n $scope.isIndiaAndBilling = _squid.$locale.country === 'IN' && $scope.cart.isBilling() && $scope.checkoutAppData.get('merchant.merchant_country', 'US') === 'IN';\n\n var isCreditDisallowedForMerchant = $scope.checkoutSession && $scope.checkoutSession.isCreditDisallowedForMerchant;\n if (!$scope.sidebar && isCreditDisallowedForMerchant) {\n $scope.pagetitle = _squid.$locale.content.get('addCard.addBankDebitCard');\n $scope.showPageTitle = true;\n }\n\n $scope.headingTextKey = function () {\n if ($scope.updateCardCpa) {\n return 'addCard.updateCardCPA';\n } else if (isCreditDisallowedForMerchant) {\n return 'addCard.addBankDebitCard';\n } else if ($scope.cart.isConsumerCountry('IN') && $scope.cart.isBilling()) {\n\n if ($scope.cart.isRecurringPayment() || $scope.checkoutAppData.is_wps_flow()) {\n return 'asideHeader.not.immediate.addCreditCard';\n } else if ($scope.cart.isReferenceTransaction()) {\n\n if ($scope.checkoutAppData.isMerchantCountry('IN')) {\n if ($scope.cart.isChargePatternImmediateOrDeferred()) {\n return 'asideHeader.immediate.addCard';\n } else {\n return 'asideHeader.not.immediate.addCreditCard';\n }\n } else {\n return 'asideHeader.not.immediate.addCreditCard';\n }\n }\n }\n\n return 'asideHeader.addCard';\n };\n\n _newMember.$NewMemberEligibility.instance().getVariant($scope.token).then(function (variant) {\n $scope.isNmj = !$scope.sidebar && variant && (variant === 'one_page' || variant === 'design_2' || variant === 'design_3');\n $scope.isNmjDesign1 = !$scope.sidebar && variant && variant === 'one_page';\n $scope.isNmjDesign2 = !$scope.sidebar && variant && variant === 'design_2';\n $scope.isNmjDesign3 = !$scope.sidebar && variant && variant === 'design_3';\n\n $scope.isGreyHeader = $scope.isNmjDesign2 || $scope.isNmjDesign3;\n\n if ($scope.isGreyHeader && $scope.message && $scope.message.msgs[0] && $scope.message.msgs[0].key === 'creditcard.errorExpiredCard') {\n $scope.message.msgs = null;\n $scope.isExpiredCard = true;\n }\n\n if ($scope.isNmj) {\n // Set Up AddBank Link\n $scope.disallowedInstruments = $scope.checkoutSession.get('fundingOptions').get('disallowedInstruments');\n var hasDisallowedBank = $scope.disallowedInstruments && $scope.disallowedInstruments.some(function (fi) {\n return fi.type === 'BANK';\n });\n $scope.showAddBank = (0, _squid.$feature)('enableExternalAddBank') && (!hasDisallowedBank || !$scope.disallowedInstruments);\n $scope.addBankUri = '/webapps/hermes/add-bank?token=' + $scope.token;\n _logger.$logger.info('external_addbank_' + ($scope.showAddBank ? 'enabled' : 'disabled'));\n }\n\n if ($scope.isNmjDesign1) {\n\n var contentKey = {\n header: '',\n body: ''\n };\n\n if ($scope.disallowedInstruments && $scope.disallowedInstruments.length === 1) {\n contentKey.header = 'addCard.assistHeaderHasDisallowedFi';\n contentKey.body = 'addCard.assistBodySingleDisallowedFi';\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_single_disallowed_FI_addcard_msg'\n });\n } else if ($scope.disallowedInstruments && $scope.disallowedInstruments.length > 1) {\n contentKey.header = 'addCard.assistHeaderHasDisallowedFi';\n contentKey.body = 'addCard.assistBodyMultiDisallowedFi';\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_multi_disallowed_FI_addcard_msg'\n });\n } else {\n contentKey.header = 'addCard.assistHeader';\n contentKey.body = 'addCard.assistBody';\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_has_no_FI_addcard_msg'\n });\n }\n\n $scope.contentKey = contentKey;\n }\n\n if ($scope.isNmjDesign2 || $scope.isNmjDesign3) {\n var headerMsg = void 0;\n var userName = $scope.auth.first_name ? $scope.auth.first_name : $scope.auth.email;\n\n if ($scope.isExpiredCard) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgExpiredCard', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_expired_card_addcard_msg'\n });\n } else if ($scope.disallowedInstruments && $scope.disallowedInstruments.length === 1 && $scope.showAddBank) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgHasDisallowedShowBankLink', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_single_disallowed_FI_show_addbank_link_addcard_msg'\n });\n } else if ($scope.disallowedInstruments && $scope.disallowedInstruments.length === 1 && !$scope.showAddBank) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgHasDisallowedHideBankLink', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_single_disallowed_FI_hide_addbank_link_addcard_msg'\n });\n } else if ($scope.disallowedInstruments && $scope.disallowedInstruments.length > 1 && $scope.showAddBank) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgHasMultiDisallowedShowBankLink', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_multi_disallowed_FI_show_addbank_link_addcard_msg'\n });\n } else if ($scope.disallowedInstruments && $scope.disallowedInstruments.length > 1 && !$scope.showAddBank) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgHasMultiDisallowedHideBankLink', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_multi_disallowed_FI_hide_addbank_link_addcard_msg'\n });\n } else if ($scope.showAddBank) {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgNoFiShowAddBank', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_has_no_FI_show_addbank_link_addcard_msg'\n });\n } else {\n headerMsg = (0, _squid.$renderContent)('addCard.nmjHeaderMsgNoFiHideAddBank', { userName: userName });\n\n _logger.$logger.info('checkout_fpti', {\n 'int_error_description': 'nmj_has_no_FI_hide_addbank_link_addcard_msg'\n });\n }\n $scope.headerMsg = headerMsg;\n }\n });\n\n return _choice.$ChoiceEligibility.instance().getVariant($scope.token).then(function (variant) {\n var multipleFiVariants = _squid.$config.choiceExperiment && _squid.$config.choiceExperiment.multipleFi || [];\n\n if (multipleFiVariants.indexOf(variant) !== -1) {\n $scope.showMultipleFI = true;\n }\n });\n }).then(function () {\n\n var logObj = {\n 'from': 'ADD_CARD',\n 'to': 'prepare_ADD_CARD',\n 'context_id': $scope.token,\n 'contingency_type': _uiRouter.$stateParams.message ? 'system_intiated' : 'user_intiated'\n };\n\n if ($scope.cart.isWalletTokenization()) {\n Object.assign(logObj, {\n 'context_type': 'BA-Token',\n 'ba_token': _squid.$meta.baToken\n });\n }\n\n _logger.$logger.info('checkout_fpti', logObj);\n\n $scope.debitCardFlow = angular.isArray($scope.flowEligibility.paymentCardProductClass) && $scope.flowEligibility.paymentCardProductClass.length === 1 && $scope.flowEligibility.paymentCardProductClass[0] === 'DEBIT';\n\n if ($scope.showmeftsection) {\n $scope.showmeftsection.toggle = true;\n }\n\n if ($scope.hideparenthead) {\n $scope.hideparenthead.toggle = false;\n }\n\n $scope.manageCardFlow = $scope.sidebar && $scope.cardmodel.card.isExisting();\n\n var type = $scope.selectedPromotionCardType && $scope.selectedPromotionCardType.type;\n\n if ($scope.checkoutSession.plccOffer && !type && $scope.promotion) {\n _uiRouter.$state.go('^.selectCard');\n }\n\n $scope.showplcc = type === 'plcc';\n $scope.country = _squid.$locale.country;\n\n $scope.showNotYou = $scope.auth.is_auth_api_call && _squid.$util.param('source') !== 'consumerApp';\n\n $scope.showHiMsg = Boolean($scope.messagetitle);\n\n $scope.cardmodel.cardType = 'creditCard';\n\n if ($scope.checkoutSession.plccOffer && $scope.showplcc) {\n $scope.cardmodel.cardType = 'privateLabel';\n $scope.cardmodel.sponsor_id = $scope.checkoutSession.plccOffer.sponsor_id;\n }\n\n $scope.cardmodel.user = {\n first_name: $scope.auth.first_name,\n last_name: $scope.auth.last_name\n };\n\n $scope.cardmodel.address = $scope.billingAddresses.addresses[0];\n\n if ($scope.billingaddressupdated.value) {\n $scope.billingaddressupdated = {\n msgs: [_squid.$locale.content.get('editCard.newAddressAdded')],\n type: 'success',\n value: true\n };\n }\n\n $scope.showSidebarBackArrow = $scope.sidebar && !$scope.debitCardFlow && !$scope.checkoutSession.plccOffer && !$scope.cardmodel.card.isExisting();\n $scope.backUri = $scope.backUri || ($scope.showMultipleFI ? 'checkout.review' : 'checkout.review.sidebar.wallet');\n $scope.manageCardFlowBackUri = $scope.backUri || ($scope.showMultipeFI ? 'checkout.review.sidebar.sidebarManageWallet' : 'checkout.review.sidebar.wallet');\n _factory.$AddCardFactory.shouldDisplayAddressBox($scope.isNmjDesign1, $scope.cardmodel, false).then(function (result) {\n $scope.displayAddressBox = result;\n });\n\n $scope.gotoBilling = function (address) {\n if ($scope.pageLevel) {\n $scope.pageLevel.message = null;\n }\n if (!address) {\n if (_squid.$locale.country === 'BR') {\n $scope.parentCallbacks.showCep();\n } else {\n // page transition\n var el = $('.tokenization #sidepageAddCard');\n\n if (el) {\n el.addClass('slideLeft');\n }\n _uiRouter.$state.go('^.addBilling');\n }\n }\n };\n\n $scope.isUPOP = function () {\n /*\n * we do have a BIN lookup for C2 country to FIMS\n * if that fails\n * a) buyer selects card type from dropdown and it could be CUP\n * b) and we are not going to get isUpop from FIMS , but C2 CUP is always upop card\n * if that success\n * a) card can be of type VISA or CUP for dual cards\n * b) and we need to show dropdown for buyer to choose the card, eventhough we default to VISA\n * c) even though VISA selected , it is UPOP card\n * if that success\n * a) card be of type CUP and AMEX for dual cards\n * b) we don't show dropdown but default to CUP\n * c) here both CUP and UPOP is true\n *\n * so checking either CUP or UPOP (for VISA)\n * and yes only for OTP enabled country (C2 for now)\n */\n var needOTPForAddCard = (0, _squid.$feature)('needOTPForAddCard');\n var isCUP = $scope.cardmodel.card && $scope.cardmodel.card.type && $scope.cardmodel.card.type === 'CUP';\n var isUpop = $scope.cardmodel.card && $scope.cardmodel.card.isUpop;\n return needOTPForAddCard && isCUP && isUpop;\n };\n\n $scope.isUpdateDebitCard = function () {\n return _uiRouter.$stateParams.message === 'EXPIRED_DEBIT_CARD';\n };\n\n $scope.flag = function (field) {\n // pass country to decide card for a country\n return _cardMetaData.$CardMetaData.getMetaData($scope.cardmodel.card, field, _squid.$locale.country);\n };\n\n $scope.buttonText = function () {\n if ($scope.updateCardCpa) {\n return 'creditcard.updateBtn';\n }\n if ($scope.debitCardFlow) {\n return 'creditcard.saveBtn';\n }\n\n var contentString = 'creditcard.addBtn';\n\n if ($scope.cardmodel.card.isExisting()) {\n contentString = 'creditcard.updateBtn';\n } else if ($scope.isUPOP()) {\n contentString = 'creditcard.continuetext';\n }\n return contentString;\n };\n\n $scope.cardTypeChanged = function () {\n $scope.phone.phoneType = $scope.flag('phoneType');\n };\n\n function addErrorMessage(contentKey) {\n if (contentKey) {\n contentKey = angular.isArray(contentKey) ? contentKey[0] : contentKey;\n var message = _squid.$locale.content.get('creditcard.' + contentKey);\n\n $scope.message.msgs.push(message);\n }\n }\n\n function handleContingencies(result, contentBundle, defaultErrorKey, prop) {\n var errorData = void 0;\n\n if (result.errorCodes) {\n errorData = result;\n } else {\n errorData = {\n errorCodes: result && [result['0']]\n };\n }\n $scope.message = _util.$fiErrorUtil.addPageErrors(errorData, contentBundle, prop, defaultErrorKey);\n\n if (window.scrollTo) {\n window.scrollTo(0, 0);\n }\n }\n\n var handleFIContingency = function handleFIContingency(contingency, body) {\n var contingencyName = body.contingencyName,\n errorDetails = body.errorDetails;\n\n var errorProperty = void 0;\n var invalidModels = [];\n var defaultError = 'INTERNAL_ERROR';\n\n if ($scope.sidebar) {\n $scope.$emit('SidebarError');\n }\n\n // for certain contingencies the error message is specific to the type of Checkout flow\n switch (contingencyName) {\n case 'CARD_BRAND_NOT_SUPPORTED':\n case 'CARD_NOT_ALLOWED':\n case 'CARD_NUMBER_WITH_BAD_BIN':\n case 'CUP_CARD_NOT_ALLOWED':\n var flowType = _squid.$config.checkoutFlowType;\n errorProperty = contingencyName + '_' + flowType;\n break;\n case 'VALIDATION_ERROR':\n defaultError = 'VALIDATION_ERROR_GENERIC';\n\n // highlight the fields mentioned in the validation_error response as invalid\n var _$fiErrorUtil$mapVali = _util.$fiErrorUtil.mapValidationErrorToModel(errorDetails.invalidFields);\n\n errorProperty = _$fiErrorUtil$mapVali.errorProperty;\n invalidModels = _$fiErrorUtil$mapVali.invalidModels;\n _util.$fiErrorUtil.highlightInvalidFields(invalidModels, $element);\n break;\n default:\n errorProperty = contingencyName;\n break;\n }\n\n $scope.billingaddressupdated.value = false;\n $scope.message = _util.$fiErrorUtil.addPageErrorByErrorName('addCardFIErrors', errorProperty, defaultError);\n\n var fpti_payload = {\n 'from': 'ADD_CARD',\n 'to': 'process_ADD_CARD',\n 'context_id': $scope.token,\n 'int_error_code': errorProperty,\n 'int_error_description': errorDetails,\n 'error_source': 'filifecycleserv'\n };\n\n if ($scope.cart.isWalletTokenization()) {\n Object.assign(fpti_payload, {\n 'context_type': 'BA-Token',\n 'ba_token': _squid.$meta.baToken\n });\n }\n\n _logger.$logger.info('checkout_fpti', fpti_payload);\n\n if (window.scrollTo) {\n window.scrollTo(0, 0);\n }\n\n if (errorDetails && errorDetails.invalidFields && errorDetails.invalidFields[0] === 'BILLING_ADDRESS') {\n return _factory.$AddCardFactory.shouldDisplayAddressBox($scope.isNmjDesign1, $scope.cardmodel, true).then(function (result) {\n $scope.displayAddressBox = result;\n });\n }\n };\n\n $scope.cancelFn = function () {\n // Use callback provided by parent route if there\n if ($scope.parentCallbacks.cancel) {\n return $scope.parentCallbacks.cancel();\n }\n\n // For multiple FI variant, route back to review page\n if ($scope.showMultipleFI) {\n if ($scope.manageCardFlow) {\n return _uiRouter.$state.go('checkout.review.sidebar.sidebarManageWallet');\n }\n return _uiRouter.$state.go('checkout.review');\n }\n\n if ($scope.sidebar) {\n if (!$scope.checkoutSession.plccOffer) {\n return _uiRouter.$state.go('checkout.review.sidebar.wallet');\n } else {\n return _uiRouter.$state.go('^.selectCard');\n }\n }\n $scope.done();\n };\n\n function initiateOTP() {\n var resolveOTP = new _fi.$ResolveOTP({ id: $scope.cardmodel.id });\n\n return resolveOTP.action('init', {\n data: {\n phone: {\n country_code: $scope.phone.IntDialingCountryCode,\n number: $scope.phone.telephone\n }\n },\n resultModel: {},\n success: function success() {\n return _uiRouter.$state.go('.confirmUpop');\n },\n error: function error() {\n return handleContingencies({}, 'confirmUpop', 'declineMessage');\n },\n contingencies: {\n INIT_OTP_CONTINGENCY: function INIT_OTP_CONTINGENCY(name, result) {\n // prop for last 4 digits of card in error message\n var prop = {\n number: $scope.cardmodel && $scope.cardmodel.card && $scope.cardmodel.card.last4()\n };\n\n handleContingencies(result, 'confirmUpop', 'declineMessage', prop);\n _util.$fiErrorUtil.addFieldErrors(result, $element);\n },\n DEFAULT: function DEFAULT() {\n return handleContingencies({}, 'confirmUpop', 'declineMessage');\n }\n }\n });\n }\n\n function handleCheckoutSession(result, isNewCard) {\n if ($scope.cardmodel && $scope.cardmodel.cardType === 'privateLabel') {\n delete $scope.checkoutSession.plccOffer;\n }\n\n delete $scope.checkoutSession.errorData;\n\n var cardAdded = $scope.cardmodel && $scope.cardmodel.card;\n var numberAdded = void 0;\n var cardTypeAdded = void 0;\n\n if (cardAdded) {\n numberAdded = angular.isString(cardAdded.number) && cardAdded.number.replace(/\\s/g, '');\n cardTypeAdded = cardAdded.type;\n }\n\n var last4Added = angular.isString(numberAdded) && numberAdded.substr(numberAdded.length - 4);\n var cvvData = $scope.checkoutSession && $scope.checkoutSession.cvvData;\n var last4ToUse = void 0;\n var cardTypeToUse = void 0;\n\n if (cvvData) {\n last4ToUse = cvvData.number;\n cardTypeToUse = cvvData.type;\n }\n\n if (last4ToUse === last4Added && cardTypeAdded === cardTypeToUse) {\n $scope.checkoutSession.set('cvvData.security_code', $scope.cardmodel.get('card.security_code'));\n $scope.checkoutSession.set('cvvData.lastAddedCard', true);\n }\n\n var updateCardSidebarMessage = (0, _squid.$renderContent)('wallet.cardUpdated', {\n type: cardTypeAdded,\n number: last4Added\n });\n var updateCardPageMessage = (0, _squid.$renderContent)('smallToolTip.cardUpdated');\n var addCardMessage = (0, _squid.$renderContent)($scope.updateCardCpa ? 'addCard.updateCardCPASuccess' : 'smallToolTip.cardAdded');\n var msgs = [addCardMessage];\n var createdOffer = Boolean($scope.createOfferModel && $scope.createOfferModel.createdOffer());\n\n if (createdOffer) {\n var createdOfferMessage = (0, _squid.$renderContent)('smallToolTip.incentiveCreated', {\n incentiveAmount: $scope.incentiveAmount\n });\n\n msgs = [createdOfferMessage];\n } else if (!isNewCard) {\n msgs = $scope.manageCardFlow ? [updateCardSidebarMessage] : [updateCardPageMessage];\n }\n\n $scope.checkoutSession.message = {\n type: 'success',\n msgs: msgs\n };\n // in case user saw No Balance banner and added card successfully - prevent showing the same banner on the review page\n _factory2.$NoBalanceFactory.markAsAlreadyShown();\n $scope.done();\n }\n\n var is3DSRequried = function is3DSRequried(result) {\n return result && result.confirmation && result.confirmation.is3DSrequired || false;\n };\n\n var initiate3DS = function initiate3DS(data) {\n var confirmation = data && data.confirmation && data.confirmation.three_ds_confirmation_details;\n\n var supplement = confirmation.supplemental_data_details;\n\n $scope.threeDSData = {\n cardBin: supplement.bank_identification_number,\n networkLogo: supplement.network_logo,\n ddsUrl: supplement.device_data_collection_url,\n jwtInfo: {\n jwtIssuer: supplement.jwt_issuer,\n jwtOrgUnitId: supplement.jwt_org_unit_id,\n jwtDuration: supplement.jwt_duration\n },\n initiate3dsData: {\n fundingId: $scope.cardmodel.id,\n confirmationMethod: 'ONLINE_SECURE_AUTHENTICATION',\n bypassConfirmationProcess: false,\n referenceId: confirmation.reference_id,\n cvv: $scope.cardmodel.get('card.security_code')\n },\n integrationType: 'ADD_CARD'\n };\n $scope.showThreedsPopup = true;\n };\n\n $scope.hideModal = function () {\n $scope.oncomplete3ds('USER_CANCELED');\n };\n\n // call on submit and on resolving contingency 3ds\n // default threeDSStatus as false, this is required to pass the addCard 3DS resolution data to symphony,\n // symphony will then inform about the status to risk to avoid 3DS contingency again during planning\n var onCardSaveSuccess = function onCardSaveSuccess() {\n var threeDSStatus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n var isNewCard = $scope.isNewCard;\n if ($scope.cart.isWalletTokenization()) {\n var fpti_payload = {\n 'from': 'ADD_DEBIT_CARD',\n 'to': 'process_ADD_debit_card',\n 'context_id': $scope.token,\n 'context_type': 'BA-Token',\n 'ba_token': _squid.$meta.baToken,\n 'fi_id': $scope.cardmodel.id\n };\n var handleNotifyChangeContingency = function handleNotifyChangeContingency(name) {\n fpti_payload.int_error_desc = name + '_addedButCannotUse';\n fpti_payload.error_source = 'paymentapiplatformserv';\n fpti_payload.int_error_code = name;\n _logger.$logger.info('tokenized_wallet', fpti_payload);\n if ($scope.message) {\n $scope.message.msgs = [];\n $scope.message.type = 'info';\n }\n addErrorMessage('addedButCannotUse');\n };\n\n $scope.checkoutSession.fundingOptions.action('notifyChange', {\n resultModel: $scope.checkoutSession,\n data: {\n planId: $scope.cardmodel.id,\n operation: 'ADDED'\n },\n success: function success(result) {\n _logger.$logger.info('tokenized_wallet', fpti_payload);\n handleCheckoutSession(result, isNewCard);\n },\n contingencies: {\n NOTIFY_CHANGE_FUNDING_CONTINGENCY: handleNotifyChangeContingency\n }\n });\n } else {\n var _fpti_payload = {\n 'from': 'ADD_CARD',\n 'to': 'process_ADD_CARD',\n 'context_id': $scope.token,\n 'context_type': _squid.$integration.isFlow('WPS') ? 'WPS-token' : 'EC-token',\n 'fi_id': $scope.cardmodel.id\n };\n\n _logger.$logger.info('checkout_fpti', _fpti_payload);\n\n return _angular.$q.when().then(function () {\n // setPreferredFI checkbox is checked\n if ($scope.showSetPreferredFi && $('#makeFiPreferred').is(':checked')) {\n _logger.$logger.info('set_preferredFI_checked');\n\n // set preferred FI before updating\n var preferredFi = new _fi.$PreferredFi({\n preferred: [$scope.cardmodel.id]\n });\n\n return preferredFi.save({\n success: function success() {\n _logger.$logger.info('SET_PREFERREDFI_SUCCESS', {\n preferred: [$scope.cardmodel.id]\n });\n },\n transientError: true,\n error: function error(err) {\n return _logger.$logger.error('SET_PREFERREDFI_ERROR', { error: err });\n }, // log the error but fails silently because card is added\n contingencies: {\n DEFAULT: function DEFAULT(name, contingency) {\n return _logger.$logger.info('SET_PREFERREDFI_CONTINGENCY', name);\n }\n }\n });\n }\n }).then(function () {\n return (0, _angular.$q)(function (resolve, reject) {\n if ($scope.showIncentive) {\n var fptiData = {\n from: 'FI_addCardAccount',\n to: 'process_FI_addCardAccount_incentive',\n add_incentive: 0,\n context_id: $scope.token,\n add_incentive_reason: ''\n };\n\n (0, _squid.$populate)($scope, {\n evaluateCheckoutOfferEligibilityModel: _checkoutIncentive.$EvaluateCheckoutOfferEligibilityModel.instance().retrieve(),\n getOfferProgramModel: _checkoutIncentive.$GetOfferProgramModel.instance().retrieve()\n }).then(function () {\n var createOfferData = {\n payer_id: $scope.auth.buyer_id,\n offer_program_id: $scope.evaluateCheckoutOfferEligibilityModel.getOfferProgramID(),\n value_issued: $scope.getOfferProgramModel.getOfferValueLowestDenom(),\n currency_code: $scope.evaluateCheckoutOfferEligibilityModel.getCurrencyCode()\n };\n\n $scope.createOfferModel = _checkoutIncentive.$CreateOfferModel.instance();\n\n return $scope.createOfferModel.save({\n data: createOfferData,\n success: function success() {\n if ($scope.createOfferModel.createdOffer()) {\n fptiData.incentive_added = 1;\n _logger.$logger.info('checkout_fpti', fptiData);\n resolve('Incentive created');\n } else {\n fptiData.add_incentive_reason = 'Offerserv_User_Not_Eligible';\n _logger.$logger.info('checkout_fpti', fptiData);\n resolve('Incentive not created');\n }\n },\n validation: function validation(_validation) {\n fptiData.add_incentive_reason = 'Validation_Error';\n _logger.$logger.info('checkout_fpti', fptiData);\n resolve('Validation error encountered creating incentive');\n },\n contingencies: {\n DEFAULT: function DEFAULT(msg, contingency) {\n fptiData.add_incentive_reason = msg;\n _logger.$logger.info('checkout_fpti', fptiData);\n resolve('Contingency encountered creating incentive');\n }\n },\n error: function error() {\n fptiData.add_incentive_reason = 'Offerserv_Error';\n _logger.$logger.info('checkout_fpti', fptiData);\n resolve('Error encountered creating incentive');\n }\n });\n });\n } else {\n resolve('Not eligible for incentive');\n }\n });\n }).then(function () {\n if ($scope.isUPOP()) {\n initiateOTP();\n } else {\n return $scope.checkoutSession.fundingOptions.action('update', {\n resultModel: $scope.checkoutSession,\n data: {\n planId: $scope.cardmodel.id,\n threeDSResolved: threeDSStatus\n },\n success: function success(result) {\n return handleCheckoutSession(result, isNewCard);\n }\n });\n }\n });\n }\n };\n\n /**\n threeDS.usercanceled=Confirmation canceled. Try again later or choose another way to pay.\n threeDS.authentionFailed=Your Bank wasn’t able to confirm your {cardType}-{last4}. Try a different card or contact your card issuer.\n threeDS.lookupFailed=Your card issuer wasn’t able to confirm your card. Try again later or choose another way to pay.\n threeDS.systemError=Sorry, we weren’t able to add this card. Try a different card or contact your card issuer.\n */\n $scope.oncomplete3ds = function (status) {\n $scope.showThreedsPopup = false;\n if (status === _constants.STATUS_SUCCESS) {\n onCardSaveSuccess(true);\n } else if (status === _constants.STATUS_API_ERROR || status === _constants.STATUS_DECLINE) {\n var key = 'threeDS.memberDecline';\n var card4 = $scope.cardmodel && $scope.cardmodel.card && $scope.cardmodel.card.last4();\n var cardType = $scope.cardmodel && $scope.cardmodel.card.type;\n\n $scope.message = {\n type: 'warning',\n msgs: []\n };\n\n $scope.message.msgs.push((0, _squid.$renderContent)(key, {\n cardType: cardType,\n last4: card4\n }));\n }\n };\n\n $scope.onSubmit = function () {\n if ($scope.pageLevel) {\n $scope.pageLevel.message = null;\n }\n $scope.isNewCard = !$scope.cardmodel.card.isExisting();\n\n if ($scope.isNewCard) {\n delete $scope.cardmodel.id;\n }\n\n if ($('#plccAgree').is(':checked')) {\n $scope.cardmodel.preference = true;\n }\n\n // Only initiateOTP needs to be called for unconfirmed CUP contingency. Add card call does not need to be made.\n if ($scope.isUPOP() && $scope.cardmodel.id && ($scope.checkoutSession.get('errorData.cause') === 'NEED_AUTHENTICATED_CARD' || $scope.checkoutSession.get('errorData.cause') === 'EXPIRED_CREDIT_CARD')) {\n\n initiateOTP();\n } else {\n $scope.cardmodel.save({\n success: function success(result) {\n if (is3DSRequried(result)) {\n initiate3DS(result);\n } else {\n onCardSaveSuccess();\n }\n },\n contingencies: {\n DEFAULT: handleFIContingency\n },\n error: function error() {\n return handleContingencies({}, 'creditcard', 'errorInternalError');\n }\n });\n }\n };\n });\n }]\n };\n});\n_angular.$q;\n\n_uiRouter.$state;\n\n_uiRouter.$stateParams;\n\n_logger.$logger;\n\n_squid.$config;\n\n_squid.$feature;\n\n_squid.$locale;\n\n_squid.$meta;\n\n_squid.$populate;\n\n_squid.$renderContent;\n\n_squid.$util;\n\n_squid.formatNameInformal;\n\n_squid.$integration;\n\n_auth.$AuthModel;\n\n_choice.$ChoiceEligibility;\n\n_newMember.$NewMemberEligibility;\n\n_index.$TokenizedWalletInfoModel;\n\n_fi.$BillingAddressesModel;\n\n_fi.$PreferredFi;\n\n_fi.$ResolveOTP;\n\n_index2.$CheckoutAppDataModel;\n\n_index2.$CheckoutCartModel;\n\n_index2.$CheckoutSessionModel;\n\n_index2.$FlowEligibilityModel;\n\n_checkoutIncentive.$CreateOfferModel;\n\n_checkoutIncentive.$EvaluateCheckoutOfferEligibilityModel;\n\n_checkoutIncentive.$GetOfferProgramModel;\n\n_util.$fiErrorUtil;\n\n_cardMetaData.$CardMetaData;\n\n_factory.$AddCardFactory;\n\n_factory2.$NoBalanceFactory;\n\n_constants.STATUS_SUCCESS;\n\n_constants.STATUS_API_ERROR;\n\n_constants.STATUS_DECLINE;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/addcard/directive.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/addcard/directive.js\n// module chunks = 0 8 9 10 11 38 39 40","\n\nvar _squid = require('squid');\n\nvar _route = require('../../confirm-upop/route');\n\nvar _route2 = _interopRequireDefault(_route);\n\nrequire('./directive');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$AddCardRoute', function () {\n return _squid.$ComponentRoute.extend('AddCardRoute', {\n name: 'addCard',\n directive: 'xo-add-card',\n titleContent: 'asideHeader.addCard',\n\n trackingData: {\n fptiState: 'add_or_update_cc'\n },\n loginRequired: true,\n children: [{\n route: _route2['default'],\n attributes: {\n token: 'token',\n phone: 'phone',\n cardmodel: 'cardmodel',\n 'on-success': 'onSuccess',\n 'show-incentive': 'showIncentive',\n 'incentive-amount': 'incentiveAmount'\n }\n }]\n });\n});\n\n_squid.$ComponentRoute;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/addcard/route.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/addcard/route.js\n// module chunks = 0 8 9 10 11 38 39 40","module.exports = \"\\n
      \\n \\n
      \\n

      {{ content('asideHeader.updateCard', {type: cardmodel.card.name, number: cardmodel.card.lastDigits}) }}

      \\n \\n {{ content('common.back') }}\\n \\n
      \\n \\n

      \\n {{ content('creditcard.hi', {userName: auth.first_name ? auth.first_name : auth.email}) }}\\n \\n \\n \\n

      \\n

      {{ messagetitle }}

      \\n
      \\n \\n

      \\n {{ content('memberReview.hiUser_welcome', {userName: formattedNameInformal}) }}\\n \\n \\n \\n

      \\n
      \\n \\n \\n
      \\n
      \\n \\n

      \\n {{ headerMsg }}\\n \\n \\n \\n

      \\n
      \\n
      \\n \\n\\n \\n\\n \\n

      {{ pagetitle }}

      \\n\\n \\n
      \\n

      {{ content('asideHeader.selectCard') }}

      \\n

      {{ content('creditcard.noFIContingency') }}

      \\n
      \\n\\n
      \\n
      \\n
      \\n

      \\n {{ content('addCard.commonAddTopupDebitCard', { type: tokenizedWalletInfoModel.brandName() }) }}\\n

      \\n \\n \\n \\n\\n \\n\\n \\n \\n\\n
      \\n \\n
      \\n \\n
      \\n
      \\n\\n
      \\n
      \\n \\n
      \\n\\n \\n\\n
      \\n
      \\n \\n \\n
      \\n
      {{content('addCard.plccLegal', { merchant: promotion.name})}}
      \\n
      \\n\\n
      \\n
      \\n \\n \\n
      \\n
      {{content('addCard.makeFiPreferredLegal')}}\\n \\n
      \\n
      \\n\\n
      \\n \\n
      \\n\\n \\n
      \\n
      \\n
      \\n \\n \\n \\n \\n \\n \\n
      \\n
      \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/addcard/template.html\n// module id = ../node_modules/xo-wallet-components/src/add-card/addcard/template.html\n// module chunks = 0 8 9 10 11 38 39 40","\n\nexports.__esModule = true;\nexports.$xoCardExpiryDirective = undefined;\n\nvar _squid = require('squid');\n\nrequire('xo-ui-components/src/tooltip/directive');\n\nrequire('xo-ui-components/src/error-tooltip/directive');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar $xoCardExpiryDirective = exports.$xoCardExpiryDirective = _squid.$Component.extend('$xoCardExpiryDirective', {\n tag: 'xo-card-expiry',\n template: _template2['default'],\n props: {\n expiryMonth: {\n type: 'var',\n required: false\n },\n expiryYear: {\n type: 'var',\n required: false\n }\n },\n lifecycle: {\n enter: function enter() {\n var _this = this;\n\n var format = (0, _squid.$feature)('ccExpiryDateFormat', 'MMYY', _squid.$locale.country);\n var regexPattern = format === 'MMYY' ? /(0\\d|1[0-2])\\/(\\d{2})/ : /(0\\d|1[0-2])\\/(\\d{4})/;\n\n var init = function init() {\n if (_this.expiryMonth && _this.expiryYear) {\n _this.expiryDate = format === 'MMYY' ? _this.expiryMonth + '/' + _this.expiryYear.substring(2, 4) : _this.expiryMonth + '/' + _this.expiryYear;\n }\n };\n init();\n this.$watch('[expiryMonth, expiryYear]', function (expiryInfo) {\n if (expiryInfo && expiryInfo[0] && expiryInfo[1]) {\n _this.expiryMonth = expiryInfo[0];\n _this.expiryYear = expiryInfo[1];\n init();\n }\n });\n\n $('#expiry_value').mask(format === 'MMYY' ? '00/00' : '00/0000');\n\n this.validate = function (expiryDate) {\n if (!expiryDate) {\n return false;\n }\n\n var regexMatch = regexPattern.exec(expiryDate);\n if (!regexMatch) {\n return false;\n }\n\n var today = new Date();\n var currentYear = today.getFullYear();\n var expMonth = Number(regexMatch[1]);\n var expYear = Number(regexMatch[2]);\n\n if (format === 'MMYY') {\n // convert year from YY to YYYY format e.g currentYear = 2017, expYear = 20,\n // result should be (2020) = (2017 - 17 + 20)\n expYear = currentYear - currentYear % 100 + expYear;\n }\n\n var expDate = new Date(expYear, expMonth - 1);\n\n if (expDate < today) {\n return false;\n }\n\n _this.expiryYear = expYear.toString();\n\n // expiryMonth need to have leading 0 for single digit month\n _this.expiryMonth = expMonth < 10 ? '0' + expMonth : expMonth.toString();\n\n return true;\n };\n }\n }\n});\n\nangular.value(\"$xoCardExpiryDirective\", $xoCardExpiryDirective);\n_squid.$Component;\n\n_squid.$locale;\n\n_squid.$feature;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/cardExpiry/directive.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/cardExpiry/directive.js\n// module chunks = 0 1 8 9 10 11 38 39 40 41","module.exports = \"
      \\n \\n
      \\n \\n \\n
      \\n
      \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/cardExpiry/template.html\n// module id = ../node_modules/xo-wallet-components/src/add-card/cardExpiry/template.html\n// module chunks = 0 1 8 9 10 11 38 39 40 41","\n\nexports.__esModule = true;\nexports.$xoCardIssueDateDirective = undefined;\n\nvar _squid = require('squid');\n\nrequire('xo-ui-components/src/tooltip/directive');\n\nrequire('xo-ui-components/src/error-tooltip/directive');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar $xoCardIssueDateDirective = exports.$xoCardIssueDateDirective = _squid.$Component.extend('$xoCardIssueDateDirective', {\n tag: 'xo-card-issue-date',\n template: _template2['default'],\n props: {\n issueMonth: {\n type: 'var',\n required: false\n },\n issueYear: {\n type: 'var',\n required: false\n }\n },\n lifecycle: {\n enter: function enter() {\n var _this = this;\n\n this.dateFormat = (0, _squid.$feature)('ccIssueDateDateFormat', 'MMYY', _squid.$locale.country);\n\n if (this.dateFormat === 'MMYY') {\n this.maxlength = 5;\n this.mask = '99/99';\n } else if (this.dateFormat === 'MMYYYY') {\n this.maxlength = 7;\n this.mask = '99/9999';\n }\n\n this.formatIssueDate = function (event) {\n var key = event.keyCode || event.charCode;\n var $el = $(event.target);\n var val = $el.val().replace(/[^0-9\\/]/gi, '');\n var strokes = val.length;\n\n // Ignore delete keys\n if (key === 8 || key === 46) {\n return;\n }\n\n // after two characters add a slash char\n if (strokes === 2) {\n val += '/';\n }\n\n _this.issueDate = val;\n $el.mask(_this.mask);\n };\n\n var currentYear = new Date().getFullYear();\n var validMonths = _squid.$util.map(_squid.$util.range(1, 13), function (num) {\n return ('0' + num).substr(-2);\n });\n var validYears = _squid.$util.map(_squid.$util.range(currentYear - 10, currentYear + 1), function (y) {\n return y.toString();\n });\n\n this.validate = function (issueDate) {\n if (!issueDate) {\n return;\n }\n\n var month = void 0,\n year = void 0,\n unformatted = void 0;\n var isValid = false;\n\n unformatted = issueDate.replace(/[^0-9]/gi, '');\n if (unformatted.length > 3) {\n month = unformatted.substring(0, 2);\n if (_this.dateFormat === 'MMYY') {\n year = currentYear.toString().substring(0, 2) + unformatted.substring(2, 4);\n } else if (_this.dateFormat === 'MMYYYY') {\n year = unformatted.substring(2, 6);\n }\n\n isValid = validMonths.indexOf(month) > -1 && validYears.indexOf(year) > -1;\n\n if (isValid) {\n var date = new Date(year, parseInt(month, 10) - 1);\n var today = new Date();\n isValid = date < today;\n }\n }\n\n _this.issueYear = year;\n _this.issueMonth = month;\n\n return isValid;\n };\n }\n }\n});\n\nangular.value(\"$xoCardIssueDateDirective\", $xoCardIssueDateDirective);\n_squid.$Component;\n\n_squid.$locale;\n\n_squid.$feature;\n\n_squid.$util;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/cardIssueDate/directive.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/cardIssueDate/directive.js\n// module chunks = 0 8 9 10 11 38 39 40","module.exports = \"
      \\n \\n \\n
      \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/cardIssueDate/template.html\n// module id = ../node_modules/xo-wallet-components/src/add-card/cardIssueDate/template.html\n// module chunks = 0 8 9 10 11 38 39 40","\n\nvar _angular = require('angular');\n\nvar _squid = require('squid');\n\nvar _logger = require('xo-beaver/dist/logger');\n\nvar _checkout = require('xo-models/src/checkout');\n\nvar _fi = require('xo-models/src/fi');\n\nrequire('xo-ui-components/src/directionality/directive');\n\nrequire('xo-ui-components/src/error-tooltip/directive');\n\nrequire('xo-ui-components/src/tooltip/directive');\n\nrequire('xo-form-components/src/name-input/directive');\n\nrequire('../cardExpiry/directive');\n\nrequire('../cardIssueDate/directive');\n\nvar _cardMetaData = require('../cardMetaData');\n\nrequire('../cvv/directive');\n\nrequire('../dob/directive');\n\nrequire('uiUtils');\n\nvar _index = require('xo-device-info/dist/index');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('scrollToTop', function () {\n return {\n link: function link(scope, element, attr) {\n $(element).on('focus', function () {\n if ($('#mxCardTitle').is(':visible')) {\n $('#creditCardForm').scrollTop($(element).offset().top);\n }\n });\n }\n };\n}).directive('xoCreditCard', function () {\n return {\n template: _template2['default'],\n restrict: 'E',\n scope: {\n token: '=?',\n card: '=?',\n user: '=?',\n selectedPromotionCardType: '=?',\n promotion: '=?',\n cardTypeChanged: '=?',\n cardNumberChanged: '=?',\n manageCardFlow: '=?'\n },\n controller: ['$scope', function ($scope) {\n $scope.cardLengthValid = function (number) {\n if ($scope.card && $scope.card.isExisting()) {\n return true;\n }\n\n number = (number || '').replace(/[^0-9]+/g, '');\n\n return number.length >= $scope.flag('length.min') && number.length <= $scope.flag('length.max');\n };\n\n $scope.cardLuhnValid = function (input) {\n if (!$scope.flag('luhn')) {\n return true;\n }\n\n if ($scope.card && $scope.card.isExisting()) {\n return true;\n }\n\n input = (input || '').replace(/[^0-9]+/g, '');\n\n var numdigits = input.length;\n var parity = numdigits % 2;\n var sum = 0;\n var i = 0;\n var digit = void 0;\n\n for (; i < numdigits; i++) {\n digit = parseInt(input.charAt(i), 10);\n\n if (i % 2 === parity) {\n digit *= 2;\n }\n\n if (digit > 9) {\n digit -= 9;\n }\n\n sum += digit;\n }\n\n return sum % 10 === 0;\n };\n\n $scope.cardProductValid = function () {\n return $scope.debitCardFlow ? $scope.card.productType === 'DEBIT' : true;\n };\n\n $scope.isPlcc = $scope.selectedPromotionCardType && $scope.selectedPromotionCardType.type === 'plcc';\n\n $scope.flag = function (field) {\n if ($scope.isPlcc && !$scope.card.type) {\n $scope.card.type = 'PLCC';\n }\n // passing country to differentiate CUP for C2 and ROW\n return _cardMetaData.$CardMetaData.getMetaData($scope.card, field, _squid.$locale.country);\n };\n\n $scope.maxLength = function () {\n if ($scope.card && $scope.card.isExisting()) {\n return 30;\n }\n\n return $scope.flag('length.max') + $scope.flag('spaces.length');\n };\n\n (0, _squid.$populate)($scope, {\n flowEligibility: _checkout.$FlowEligibilityModel.instance($scope.token).retrieve({\n params: {\n geolocation: _squid.$meta.geolocation,\n localeCountry: _squid.$locale.country\n }\n })\n }).then(function () {\n $scope.debitCardFlow = angular.isArray($scope.flowEligibility.paymentCardProductClass) && $scope.flowEligibility.paymentCardProductClass.length === 1 && $scope.flowEligibility.paymentCardProductClass[0] === 'DEBIT';\n\n $scope.locale = _squid.$locale;\n $scope.country = $scope.locale.country;\n var cardTypeServiceCall = (0, _squid.$feature)('cardTypeServiceCallRequired', false, $scope.country);\n\n // For APay provisioning flow, we use service call once we have the minimum number of digits\n // for the card.\n $scope.tokenizedWalletCardTypeServiceCall = false;\n\n var isUnsupportedCard = void 0;\n var lastVerifiedBin = '';\n var lastRequestedBin = void 0; // bin requested to service to fetch card type and pending response.\n\n $scope.mxDebitCards = ['BANAMEX', 'BANCOARFACA', 'BBVA', 'BANORTE', 'HSBC', 'INBURSA', 'SANTANDER'];\n\n if ($scope.card && $scope.card.number) {\n $scope.unformattedCardNumber = ($scope.card.number || '').replace(/[^0-9]+/g, '').slice(0, $scope.maxLength());\n }\n\n $scope.showMXCardLogos = function () {\n return _squid.$locale.country === 'MX';\n };\n\n (0, _squid.$populate)($scope, {\n cardTypes: _fi.$CardTypesModel.instance($scope.token + ':' + _squid.$locale.country, {\n token: $scope.token,\n country: _squid.$locale.country\n })\n }).then(function () {\n var scanCardExperimentEligibility = function scanCardExperimentEligibility() {\n if (!_index.$DeviceInfo.isSafariiOSBrowserView()) {\n return _squid.$promise.resolve(false);\n }\n // Scan credit card feature is only available in iosVersion 8+\n if (_index.$DeviceInfo.isSafariiOSBrowserView() && _index.$DeviceInfo.getiOSVersion()[0] < 8) {\n return _squid.$promise.resolve(false);\n }\n\n return (0, _squid.$elmo)('xo_hermes_addcard_camera_icon_member', { 'ctx.COUNTRY': _squid.$locale.country }, 'xo_hermes_addcard_camera_icon_member_show');\n };\n\n scanCardExperimentEligibility().then(function (result) {\n $scope.showScanCardExperiment = result || false;\n });\n\n $scope.debitCardFlow = angular.isArray($scope.flowEligibility.paymentCardProductClass) && $scope.flowEligibility.paymentCardProductClass.length === 1 && $scope.flowEligibility.paymentCardProductClass[0] === 'DEBIT';\n var forceDropDown = false;\n\n $scope.supportedCardNamesCommaSeparated = $scope.cardTypes.supportedNames().join(', ');\n\n $scope.$on('localeChange', function () {\n $scope.cardTypes = _fi.$CardTypesModel.instance($scope.token + ':' + _squid.$locale.country, {\n token: $scope.token,\n country: _squid.$locale.country\n });\n\n $scope.cardTypes.retrieve().then(function () {\n if ($scope.card.type && $scope.cardTypes.allowed.indexOf($scope.card.type) === -1) {\n delete $scope.card.type;\n forceDropDown = false;\n $scope.changeCardNumber(true);\n }\n });\n\n $scope.country = _squid.$locale.country;\n });\n\n $scope.cvvShown = function () {\n if ($scope.card.type === 'CETELEM' && $scope.locale.country === 'FR') {\n return false;\n }\n\n if ($scope.card.type === 'CUP' && $scope.card.productType === 'DEBITCARD') {\n return false;\n }\n\n if ($scope.isPlcc && $scope.card.type) {\n return true;\n }\n\n return $scope.flag('fields.cvv');\n };\n\n $scope.expiryShown = function () {\n if ($scope.isPlcc && $scope.card.type) {\n return true;\n }\n if ($scope.card.type === 'CUP' && $scope.card.productType === 'DEBITCARD') {\n return false;\n }\n\n return $scope.flag('fields.expiry');\n };\n\n $scope.enableDropDown = function () {\n // for VISA CUP dual card, force show dropdown for buyer to choose card type\n return Boolean(['ES', 'FR', 'GB', 'IT'].indexOf($scope.locale.country) > -1) || forceDropDown || $scope.card && $scope.card.type === 'VISA' && $scope.card && $scope.card.dualType === 'CUP';\n };\n\n $scope.showDropDown = function () {\n if ($scope.enableDropDown()) {\n return true;\n }\n\n if (!$scope.card.type && $scope.card.number && $scope.card.number.length >= 4 && !(cardTypeServiceCall || $scope.tokenizedWalletCardTypeServiceCall) && !$scope.isPlcc) {\n return true;\n }\n\n if (!$scope.card.type && $scope.card.number && $scope.card.number.length >= 7 && (cardTypeServiceCall || $scope.tokenizedWalletCardTypeServiceCall) && isUnsupportedCard) {\n return true;\n }\n\n return false;\n };\n\n $scope.showAcceptedCardLogos = function () {\n return !$scope.showDropDown() && (0, _squid.$feature)('showAcceptedCardLogos', false, $scope.country);\n };\n\n $scope.getCardTypeByNumber = function (types, number) {\n if ($scope.isPlcc && number.length > 6 || !$scope.isPlcc) {\n return _cardMetaData.$CardMetaData.getCardType(types, number);\n }\n };\n\n function formatCardNumber(number) {\n var spaces = $scope.flag('spaces');\n var formatted = [];\n\n for (var i = 0; i < number.length; i++) {\n if (spaces.indexOf(i) > -1) {\n formatted.push(' ');\n }\n\n formatted.push(number.charAt(i));\n }\n\n number = formatted.join('');\n return number;\n }\n\n $scope.$watch('card.type', function () {\n if ($scope.cardTypeChanged) {\n $scope.cardTypeChanged();\n }\n });\n\n /**\n * Hit Callback(unformatted cc no) when user gets out of the cardNumber field.\n */\n $scope.ccOnBlur = function () {\n if ($scope.cardNumberChanged) {\n $scope.cardNumberChanged($scope.unformattedCardNumber);\n }\n };\n\n // e.g for a dual brand = ['CUP' ,'VISA'], select VISA or CUP based\n // on regex defined for card type. If not regex was defined, pick one\n // of the allowed card type.\n function selectCardTypeForDualBrands(result) {\n var dualCardTypes = (0, _squid.$feature)('dualCardTypes', {});\n var match = void 0;\n\n Object.keys(dualCardTypes).some(function (key) {\n return result.some(function (cardType) {\n if (cardType.type === key) {\n match = key;\n return true;\n }\n });\n });\n\n if (match) {\n var regex = new RegExp(dualCardTypes[match]);\n var selected = _squid.$util.find(result, function (cardType) {\n if (regex.test(cardType.type)) {\n return true;\n }\n });\n\n // if selected card based on regexp is CUP\n // then we can test for AMEX as subtype (a dualType card)\n if (selected && selected.type === 'CUP') {\n _squid.$util.some(result, function (cardType) {\n if (/^AMEX$/.test(cardType.type)) {\n selected.dualType = cardType.type;\n return true;\n }\n });\n }\n\n // if selected card based on regexp is VISA\n // then we can test for CUP as subtype (a dualType card)\n if (selected && selected.type === 'VISA') {\n _squid.$util.some(result, function (cardType) {\n if (/^CUP$/.test(cardType.type)) {\n selected.dualType = cardType.type;\n return true;\n }\n });\n }\n\n return selected;\n } else {\n return _squid.$util.find(result, function (cardType) {\n return $scope.cardTypes.allowed.indexOf(cardType.type) > -1;\n });\n }\n }\n\n function selectCardType(result) {\n if (angular.isArray(result)) {\n if (result.length >= 2) {\n result = selectCardTypeForDualBrands(result);\n } else {\n result = result[0];\n }\n }\n\n return result || {};\n }\n\n function clearCardType() {\n $scope.card.type = '';\n $scope.card.dualType = '';\n $scope.card.productType = '';\n }\n\n function getCardTypeByNumberServiceCall(number) {\n if (number.length >= 6) {\n var bin = number;\n\n // Don't limit to 6 digits for APay flow as some cards require more than 6 digit\n // BIN to detect if it is a debit card.\n if (!$scope.debitCardFlow) {\n bin = bin.slice(0, 6);\n }\n\n if (lastVerifiedBin) {\n if (lastVerifiedBin.bin === bin) {\n $scope.card.type = lastVerifiedBin.type;\n $scope.card.dualType = lastVerifiedBin.dualType;\n $scope.card.productType = lastVerifiedBin.productType;\n return;\n }\n // For APay flow, if product type has been identified,\n // we don't need to make another call\n else if ($scope.debitCardFlow && bin.startsWith(lastVerifiedBin.bin) && lastVerifiedBin.productType) {\n $scope.card.type = lastVerifiedBin.type;\n $scope.card.dualType = lastVerifiedBin.dualType;\n $scope.card.productType = lastVerifiedBin.productType;\n return;\n }\n }\n\n // For APay, if there is a pending request, then do nothing.\n if (isUnsupportedCard === bin || bin === lastRequestedBin || $scope.debitCardFlow && lastRequestedBin) {\n return;\n }\n\n lastRequestedBin = bin;\n\n _fi.$CardTypeFromBinModel.instance().save({\n data: {\n user_country: $scope.country,\n bin: bin\n },\n silent: true,\n success: function success(result) {\n result = selectCardType(result);\n var type = result.type;\n lastRequestedBin = undefined;\n\n var disallowedCard = false;\n if ($scope.cardTypes.allowed.indexOf(type) === -1) {\n disallowedCard = true;\n }\n\n // if we get upop in the response from BIN lookup\n // set into the cardModel to trigger OTP\n // this should not only be set if dropdown is not shown\n $scope.card.isUpop = result.isUpop;\n\n if (disallowedCard) {\n clearCardType();\n isUnsupportedCard = bin;\n $scope.allowedCardsTooltip = true;\n return;\n }\n\n isUnsupportedCard = undefined;\n forceDropDown = false;\n if (!$scope.showDropDown()) {\n $scope.card.type = type;\n $scope.card.dualType = result.dualType;\n $scope.card.productType = result.productType;\n }\n\n lastVerifiedBin = {\n bin: bin,\n type: type,\n dualType: result.dualType,\n productType: result.productType\n };\n\n // This logic is to handle copy paste case when all numbers are entered at once\n if ($scope.card.type && number.length >= $scope.flag('length.min')) {\n if (/android/i.test(navigator.userAgent)) {\n return;\n }\n\n var ccNumber = ($scope.card.number || '').replace(/[^0-9]+/g, '').slice(0, $scope.maxLength());\n\n if (ccNumber.indexOf(number) >= 0) {\n $scope.card.number = formatCardNumber(ccNumber);\n }\n }\n\n return;\n },\n contingencies: {\n GET_FI_ISSUER_DETAILS_ERR: function GET_FI_ISSUER_DETAILS_ERR(name, result) {\n clearCardType();\n isUnsupportedCard = bin;\n lastRequestedBin = undefined;\n }\n },\n error: function error() {\n clearCardType();\n isUnsupportedCard = bin;\n lastRequestedBin = undefined;\n }\n });\n } else {\n isUnsupportedCard = undefined;\n lastRequestedBin = undefined;\n forceDropDown = false;\n clearCardType();\n }\n }\n\n $scope.getAllowedCardTypeByNumber = function (number) {\n return $scope.getCardTypeByNumber($scope.cardTypes.allowed, number);\n };\n\n $scope.getDisallowedCardTypeByNumber = function (number) {\n return $scope.getCardTypeByNumber($scope.cardTypes.disallowed, number);\n };\n\n $scope.enableAddMode = function () {\n if ($scope.card.isExisting()) {\n $scope.card.number = '';\n }\n };\n\n $scope.changeType = function () {\n forceDropDown = true;\n\n $scope.changeCardNumber(true);\n\n // Blank out unsupported fields\n\n if (!$scope.flag('fields.expiry')) {\n delete $scope.card.expiry_month;\n delete $scope.card.expiry_year;\n }\n\n if (!$scope.flag('fields.issue')) {\n delete $scope.card.start_month;\n delete $scope.card.start_year;\n delete $scope.card.issue_number;\n }\n\n if (!$scope.flag('fields.dob')) {\n delete $scope.card.dob_day;\n delete $scope.card.dob_month;\n delete $scope.card.dob_year;\n }\n\n if (!$scope.flag('fields.cvv')) {\n delete $scope.card.security_code;\n }\n };\n\n $scope.changeCardNumber = function (isCardTypeChanged) {\n // If buyer tries to modify an update card number. We remove the whole string\n // so buyer can add a card instead.\n $scope.enableAddMode();\n $scope.allowedCardsTooltip = false;\n var regex = /[0-9]/;\n\n if ((0, _squid.$feature)('disableFullWidthCharacters') && regex.test($scope.card.number)) {\n _logger.$logger.info('checkout_fpti', {\n 'is_fullwidth_character': true\n });\n }\n\n var number = ($scope.card.number || '').replace(/[^0-9]+/g, '').slice(0, $scope.maxLength());\n var formattedNumber = void 0;\n\n $scope.unformattedCardNumber = number;\n\n // Attempt to determine the card type\n var cardType = void 0;\n\n if ($scope.debitCardFlow) {\n if (number.length >= $scope.flag('length.min')) {\n $scope.tokenizedWalletCardTypeServiceCall = true;\n } else {\n $scope.tokenizedWalletCardTypeServiceCall = false;\n lastVerifiedBin = '';\n }\n }\n\n if (cardTypeServiceCall || $scope.tokenizedWalletCardTypeServiceCall) {\n if (!isCardTypeChanged) {\n getCardTypeByNumberServiceCall(number);\n }\n\n if (isUnsupportedCard) {\n $scope.allowedCardsTooltip = true;\n }\n } else {\n if (!isCardTypeChanged) {\n // Hide dropdown and trigger bin matching when the cc number is < 4 digits\n if (number.length < 4) {\n forceDropDown = false;\n }\n\n if (!$scope.enableDropDown()) {\n cardType = $scope.getAllowedCardTypeByNumber(number);\n $scope.card.type = cardType.type;\n $scope.card.subType = cardType.subType;\n }\n }\n\n if ($scope.isPlcc && $scope.card.type) {\n $scope.cvvShown();\n $scope.expiryShown();\n }\n\n if (!$scope.card.type && !$scope.isPlcc && (number.length >= 4 || $scope.getDisallowedCardTypeByNumber(number).type)) {\n $scope.allowedCardsTooltip = true;\n }\n }\n\n /*\n * PPPLMER-1563 commented out to fix this bug\n if (/android/i.test(navigator.userAgent)) {\n return;\n }\n */\n // Format the card number\n formattedNumber = formatCardNumber(number);\n\n // If the card is already formatted correctly, we can leave the user to continue in peace.\n if ($scope.card.number === formattedNumber) {\n return;\n }\n\n // Wait for the user's input to be reflected on the page (necessary for safari 5 otherwise selectionStart is incorrect)\n (0, _angular.$timeout)(function () {\n // re-formatting the number, since the card type may not have resolved before the first call\n $scope.card.number = formatCardNumber(number);\n // Save the current cursor positions\n var ccField = document.getElementById('cc');\n\n if (!ccField) {\n return;\n }\n\n var inputLength = ccField.value.length;\n var cursorStart = ccField.selectionStart;\n\n // Wait for the formatted card to be reflected on the page\n (0, _angular.$timeout)(function () {\n // If the cursor was at the end of the input field, keep it at the end\n if (cursorStart === inputLength) {\n ccField.selectionStart = ccField.selectionEnd = ccField.value.length;\n // Otherwise place the cursor to the position it was in before we replaced with the formatted number\n } else {\n ccField.selectionStart = ccField.selectionEnd = cursorStart;\n }\n });\n });\n };\n });\n });\n }]\n };\n});\n\n_angular.$timeout;\n\n_squid.$feature;\n\n_squid.$locale;\n\n_squid.$meta;\n\n_squid.$populate;\n\n_squid.$util;\n\n_logger.$logger;\n\n_checkout.$FlowEligibilityModel;\n\n_fi.$CardTypeFromBinModel;\n\n_fi.$CardTypesModel;\n\n_cardMetaData.$CardMetaData;\n\n_index.$DeviceInfo;\n\n_squid.$promise;\n\n_squid.$elmo;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/creditcard-input/directive.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/creditcard-input/directive.js\n// module chunks = 0 8 9 10 11 38 39 40","module.exports = \"
      \\n \\n \\n \\n\\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n\\n
      \\n

      {{content('creditcard.cardIconTitle')}}

      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n\\n
      {{content('addCard.plccAddCard', { merchant: promotion.name})}}
      \\n\\n
      \\n \\n \\n
      \\n\\n
      \\n \\n\\n \\n\\n \\n
      \\n {{ !debitCardFlow ? content('creditcard.acceptableCards') : content('creditcard.acceptDebitCardOnly') }}\\n \\n {{supportedCardNamesCommaSeparated}}\\n \\n
      \\n
      \\n\\n {{card.type}}\\n
      \\n\\n \\n
      \\n
      \\n
      \\n \\n \\n
      \\n\\n
      \\n \\n\\n \\n
      \\n {{ content('creditcard.issueNoLabelToolTip') }}\\n
      \\n
      \\n
      \\n
      \\n
      \\n\\n
      \\n \\n \\n
      \\n\\n \\n \\n
      \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/creditcard-input/template.html\n// module id = ../node_modules/xo-wallet-components/src/add-card/creditcard-input/template.html\n// module chunks = 0 8 9 10 11 38 39 40","\n\nvar _squid = require('squid');\n\nvar _uiRouter = require('uiRouter');\n\nvar _index = require('xo-models/src/address/index');\n\nvar _index2 = require('xo-models/src/checkout/index');\n\nvar _index3 = require('xo-models/src/fi/index');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoAddCardFlow', function () {\n return {\n template: _template2['default'],\n\n scope: {\n token: '=?',\n parentCallbacks: '=?',\n messagetitle: '=?',\n message: '=?',\n pagetitle: '=?',\n sidebar: '=?',\n showmeftsection: '=?',\n hideparenthead: '=?',\n promotion: '=?',\n pageLevel: '=?',\n logout: '=?',\n phone: '=?',\n fundingid: '=?',\n showCancel: '=?',\n showSetPreferredFi: '=?',\n onSuccess: '=?',\n backUri: '=?',\n showIncentive: '=?',\n incentiveAmount: '=?',\n cardmodel: '=?',\n updateCardCpa: '=?',\n cause: '=?'\n },\n\n controller: ['$scope', function ($scope) {\n\n $scope.addCCDone = function () {\n $scope.parentCallbacks.finish();\n };\n\n $scope.callbacks = {\n done: $scope.parentCallbacks.finish,\n cancel: $scope.parentCallbacks.cancel,\n showCep: function showCep() {\n $scope.prefillAddress = new _index.$PrefillAddressModel({\n id: $scope.token\n });\n\n _uiRouter.$state.go('^.addCep');\n },\n\n cardTypeSelected: function cardTypeSelected(type) {\n $scope.selectedPromotionCardType = {\n type: type\n };\n _uiRouter.$state.go('^.addCard');\n }\n };\n\n $scope.cepDone = function () {\n _uiRouter.$state.go('^.addBilling');\n };\n\n $scope.selectedPromotionCardType = {\n type: $scope.promotion && $scope.promotion.type\n };\n\n if ($scope.promotion) {\n $scope.promotion.type = null;\n }\n\n $scope.billingaddressupdated = {\n value: false\n };\n\n $scope.phone = {\n hide_type: true\n };\n\n if (!$scope.cardmodel) {\n $scope.cardmodel = new _index3.$AddCardModel({\n card: new _index3.$CardModel()\n });\n }\n\n (0, _squid.$populate)($scope, {\n checkoutSession: _index2.$CheckoutSessionModel.instance($scope.token).retrieve({\n contingencies: {\n NEED_CREDIT_CARD: angular.noop,\n EXPIRED_CREDIT_CARD: angular.noop\n }\n })\n }).then(function () {\n\n if ($scope.checkoutSession.errorData && $scope.checkoutSession.errorData.resolution) {\n var card = $scope.checkoutSession.errorData.resolution.data;\n\n if (card.fundingId && card.fi && card.fi.type) {\n $scope.cardmodel.id = card.fundingId;\n $scope.cardmodel.card = new _index3.$CardModel({\n number: 'xxxx-xxxx-xxxx-' + card.fi.number,\n type: card.fi.type.toUpperCase(),\n productType: card.fi.productType\n });\n }\n }\n if ($scope.fundingid) {\n var fundingSource = _squid.$util.find($scope.checkoutSession.fundingOptions.instruments, function (funding) {\n if (funding && funding.id === $scope.fundingid) {\n return funding;\n }\n });\n if (!fundingSource) {\n fundingSource = _squid.$util.find($scope.checkoutSession.fundingOptions.disallowedInstruments, function (funding) {\n if (funding && funding.id === $scope.fundingid) {\n return funding;\n }\n });\n }\n\n if (fundingSource) {\n $scope.cardmodel.id = fundingSource.id;\n $scope.cardmodel.card = new _index3.$CardModel({\n number: 'xxxx-xxxx-xxxx-' + fundingSource.lastDigits,\n lastDigits: fundingSource.lastDigits,\n type: fundingSource.name.toUpperCase(),\n name: (0, _squid.$renderContent)('fsMappings.' + fundingSource.name)\n });\n }\n }\n });\n }]\n };\n});\n\n_squid.$populate;\n\n_squid.$renderContent;\n\n_squid.$util;\n\n_uiRouter.$state;\n\n_index.$PrefillAddressModel;\n\n_index2.$CheckoutSessionModel;\n\n_index3.$AddCardModel;\n\n_index3.$CardModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/directive.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/directive.js\n// module chunks = 0 8 9 10 11 38 39 40","\n\nexports.__esModule = true;\n\nvar _squid = require('squid');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nrequire('xo-ui-components/src/dropdown/directive');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoDobCardInputDirective', {\n tag: 'xo-dob-card-input',\n template: _template2['default'],\n\n props: {\n user: {\n type: 'var',\n required: false\n }\n },\n\n lifecycle: {\n enter: function enter() {\n function pad() {\n var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2;\n\n return function (num) {\n return (new Array(length + 1).join('0') + num).substr(-length);\n };\n }\n\n var year = new Date().getFullYear();\n this.days = _squid.$util.map(_squid.$util.range(1, 32), pad());\n this.months = _squid.$util.map(_squid.$util.range(1, 13), pad());\n this.years = _squid.$util.map(_squid.$util.range(year - 100, year), pad(4)).reverse();\n }\n }\n});\n\n\n_squid.$Component;\n\n_squid.$util;\nmodule.exports = exports['default'];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/dob/directive.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/dob/directive.js\n// module chunks = 0 8 9 10 11 38 39 40","module.exports = \"
      \\n \\n\\n
      \\n \\n
      \\n\\n
      \\n \\n
      \\n\\n
      \\n \\n
      \\n
      \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/dob/template.html\n// module id = ../node_modules/xo-wallet-components/src/add-card/dob/template.html\n// module chunks = 0 8 9 10 11 38 39 40","\n\nexports.__esModule = true;\n\nvar _directive = require('./cardExpiry/directive');\n\nObject.keys(_directive).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _directive[key];\n }\n });\n});\n\nvar _cardMetaData = require('./cardMetaData');\n\nObject.keys(_cardMetaData).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _cardMetaData[key];\n }\n });\n});\n\nvar _directive2 = require('./cvv/directive');\n\nObject.keys(_directive2).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _directive2[key];\n }\n });\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/index.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/index.js\n// module chunks = 0 1 8 9 10 11 38 39 40 41","\n\nvar _squid = require('squid');\n\nrequire('./directive');\n\nrequire('./addcard/route');\n\nrequire('./selectcard/route');\n\nrequire('./addbilling/route');\n\nrequire('./addCep/route');\n\nrequire('../confirm-upop/route');\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$AddCardFlowRoute', function () {\n\n return _squid.$ComponentRoute.extend('CardRoute', {\n\n name: 'addCardFlow',\n directive: 'xo-add-card-flow',\n titleContent: 'asideHeader.addCard',\n children: [{\n name: '$AddCardRoute',\n attributes: {\n token: 'token',\n cardmodel: 'cardmodel',\n done: 'addCCDone',\n messagetitle: 'messagetitle',\n message: 'message',\n pagetitle: 'pagetitle',\n sidebar: 'sidebar',\n showmeftsection: 'showmeftsection',\n hideparenthead: 'hideparenthead',\n billingaddressupdated: 'billingaddressupdated',\n isupdatecard: 'isupdatecard',\n 'parent-callbacks': 'callbacks',\n 'selected-promotion-card-type': 'selectedPromotionCardType',\n promotion: 'promotion',\n 'page-level': 'pageLevel',\n logout: 'logout',\n phone: 'phone',\n 'show-cancel': 'showCancel',\n 'show-set-preferred-fi': 'showSetPreferredFi',\n 'on-success': 'onSuccess',\n 'back-uri': 'backUri',\n 'show-incentive': 'showIncentive',\n 'incentive-amount': 'incentiveAmount',\n 'update-card-cpa': 'updateCardCpa',\n cause: 'cause'\n }\n\n }, {\n name: '$SelectCardRoute',\n attributes: {\n token: 'token',\n 'parent-callbacks': 'callbacks',\n message: 'message',\n pagetitle: 'pagetitle',\n sidebar: 'sidebar',\n 'selected-promotion-card-type': 'selectedPromotionCardType',\n promotion: 'promotion'\n }\n }, {\n name: '$AddBillingRoute',\n attributes: {\n token: 'token',\n sidebar: 'sidebar',\n showmeftsection: 'showmeftsection',\n 'parent-callbacks': 'callbacks',\n hideparenthead: 'hideparenthead',\n billingaddressupdated: 'billingaddressupdated',\n 'prefill-address': 'prefillAddress'\n }\n }, {\n name: '$AddCepRoute',\n attributes: {\n token: 'token',\n sidebar: 'sidebar',\n 'done-fn': 'cepDone',\n 'prefill-address': 'prefillAddress'\n }\n }]\n });\n});\n\n_squid.$ComponentRoute;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/route.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/route.js\n// module chunks = 0 8 9 10 11 38 39 40","\n\nvar _squid = require('squid');\n\nvar _index = require('xo-models/src/checkout/index');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nangular.module().directive('xoSelectCard', function () {\n return {\n template: _template2['default'],\n\n scope: {\n parentCallbacks: '=?',\n token: '=?',\n promotion: '=?'\n },\n\n controller: ['$scope', function ($scope) {\n\n (0, _squid.$populate)($scope, {\n checkoutSession: _index.$CheckoutSessionModel.instance($scope.token)\n }).then(function () {\n $scope.selectCardType = function (type) {\n // card type is either 'cc' or 'plcc'\n $scope.parentCallbacks.cardTypeSelected(type);\n };\n });\n }]\n };\n});\n\n_squid.$populate;\n\n_index.$CheckoutSessionModel;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/selectcard/directive.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/selectcard/directive.js\n// module chunks = 0 8 9 10 11 38 39 40","\n\nrequire('./directive');\n\nvar _squid = require('squid');\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$SelectCardRoute', function () {\n return _squid.$ComponentRoute.extend('SelectCardRoute', {\n\n name: 'selectCard',\n directive: 'xo-select-card',\n titleContent: 'asideHeader.selectCard',\n children: []\n });\n});\n\n_squid.$ComponentRoute;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/selectcard/route.js\n// module id = ../node_modules/xo-wallet-components/src/add-card/selectcard/route.js\n// module chunks = 0 8 9 10 11 38 39 40","module.exports = \"\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/selectcard/template.html\n// module id = ../node_modules/xo-wallet-components/src/add-card/selectcard/template.html\n// module chunks = 0 8 9 10 11 38 39 40","module.exports = \"
      \"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/add-card/template.html\n// module id = ../node_modules/xo-wallet-components/src/add-card/template.html\n// module chunks = 0 8 9 10 11 38 39 40","\n\nexports.__esModule = true;\n\nvar _squid = require('squid');\n\nvar _angular = require('angular');\n\nvar _angular2 = _interopRequireDefault(_angular);\n\nvar _util = require('../../fi-contingency-list/util');\n\nvar _index = require('xo-models/src/fi/index');\n\nvar _index2 = require('xo-models/src/checkout/index');\n\nrequire('xo-ui-components/src/spinner-button/directive');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar VERIFICATION_CODE_COUNTDOWN_IN_SECS = 180; // 3 minutes\nvar RESEND_CODE_LINK_TIMEOUT_MILLI_SECS = 60000; // 1 minute\nvar ONE_MINUTE_IN_SECS = 60;\n\nexports['default'] = _squid.$Component.extend('$xoConfirmOtpDirective', {\n tag: 'xo-confirm-otp',\n template: _template2['default'],\n props: {\n token: {\n type: 'var',\n required: false\n },\n phone: {\n type: 'var',\n required: false\n },\n cardmodel: {\n type: 'var',\n required: false\n },\n onSuccess: {\n type: 'var',\n required: false\n },\n message: {\n type: 'var',\n required: false\n }\n },\n resolve: {\n models: function models() {\n return {\n checkoutSession: _index2.$CheckoutSessionModel.instance(this.props.token).retrieve()\n };\n }\n },\n actions: {\n addMessage: function addMessage(type, contentKey) {\n if (contentKey) {\n this.message({\n msgKeys: [_angular2['default'].isArray(contentKey) ? contentKey[0] : contentKey],\n type: type || 'error'\n });\n }\n },\n stopConfirmCodeTimer: function stopConfirmCodeTimer() {\n if (this.confirmCodeTimer) {\n _angular.$interval.cancel(this.confirmCodeTimer);\n }\n this.countdown = 0;\n },\n stopResendCodeTimer: function stopResendCodeTimer() {\n if (this.resendCodeTimer) {\n _angular.$timeout.cancel(this.resendCodeTimer);\n }\n this.showResendLink = false;\n },\n updateCountdown: function updateCountdown() {\n if (this.countdown > 0) {\n this.countdown--;\n this.timer = Math.floor(this.countdown / ONE_MINUTE_IN_SECS) + ':' + ('0' + this.countdown % ONE_MINUTE_IN_SECS).slice(-2);\n } else {\n if (!this.isConfirmProcessing) {\n this.actions.addMessage('warning', 'confirmUpop.codeExpired');\n }\n this.actions.stopConfirmCodeTimer();\n this.actions.stopResendCodeTimer();\n }\n },\n startCountdown: function startCountdown(resetTimer) {\n var _this = this;\n\n if (resetTimer) {\n this.actions.stopConfirmCodeTimer();\n this.countdown = VERIFICATION_CODE_COUNTDOWN_IN_SECS;\n this.actions.updateCountdown();\n this.confirmCodeTimer = (0, _angular.$interval)(this.actions.updateCountdown, 1000);\n }\n\n this.actions.stopResendCodeTimer();\n this.showResendLink = false;\n this.resendCodeTimer = (0, _angular.$timeout)(function () {\n _this.showResendLink = true;\n }, RESEND_CODE_LINK_TIMEOUT_MILLI_SECS);\n this.actions.addMessage('success', 'confirmUpop.codeSent');\n },\n processed: function processed() {\n if (!this.countdown && this.isConfirmProcessing) {\n this.actions.addMessage('warning', 'confirmUpop.codeExpired');\n }\n this.isProcessing = this.isConfirmProcessing = false;\n },\n handleContingencies: function handleContingencies() {\n var result = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var prop = arguments[1];\n\n var errorData = void 0;\n if (result.errorCodes) {\n errorData = result;\n } else {\n errorData = {\n errorCodes: [result['0'] || 'ISSUER_DECLINE']\n };\n }\n\n this.message(_util.$fiErrorUtil.addPageErrors(errorData, 'confirmUpop', prop, 'error'));\n\n if (window.scrollTo) {\n window.scrollTo(0, 0);\n }\n },\n sendNewCode: function sendNewCode() {\n // reset the code field.\n if (this.cardmodel && this.cardmodel.card) {\n this.cardmodel.card.otp_code = '';\n }\n this.actions.resendCode(true);\n },\n resendCode: function resendCode(resetTimer) {\n var _this2 = this;\n\n this.isProcessing = true;\n this.resolveOTP.action('init', {\n silent: true,\n data: {\n phone: {\n country_code: this.phone.IntDialingCountryCode,\n number: this.phone.telephone\n }\n },\n resultModel: {},\n success: function success() {\n _this2.actions.startCountdown(resetTimer);\n },\n error: function error() {\n _this2.actions.handleContingencies();\n },\n contingencies: {\n INIT_OTP_CONTINGENCY: function INIT_OTP_CONTINGENCY(name, result) {\n // prop for last 4 digits of card in error message\n var prop = {\n number: _this2.cardLast4\n };\n\n _this2.actions.handleContingencies(result, prop);\n _util.$fiErrorUtil.addFieldErrors(result, _this2.$element);\n },\n DEFAULT: function DEFAULT() {\n _this2.actions.handleContingencies();\n }\n }\n })['finally'](this.actions.processed);\n },\n confirmOTP: function confirmOTP() {\n var _this3 = this;\n\n this.isProcessing = this.isConfirmProcessing = true;\n\n this.resolveOTP.action('complete', {\n silent: true,\n data: {\n code: this.cardmodel.card.otp_code,\n phone: {\n country_code: this.phone.IntDialingCountryCode,\n number: this.phone.telephone\n },\n card_data: {\n expiration_time: {\n month: this.cardmodel.card.expiry_month,\n year: this.cardmodel.card.expiry_year\n },\n card_verification_code: this.cardmodel.card.security_code\n }\n },\n success: this.onSuccess,\n error: function error() {\n _this3.actions.handleContingencies({}, 'confirmUpop');\n _this3.actions.processed();\n },\n contingencies: {\n COMPLETE_OTP_CONTINGENCY: function COMPLETE_OTP_CONTINGENCY(name, result) {\n // prop for last 4 digits of card in error message\n var prop = {\n number: _this3.cardLast4\n };\n\n _this3.actions.handleContingencies(result, prop);\n _util.$fiErrorUtil.addFieldErrors(result, _this3.$element);\n _this3.actions.processed();\n }\n }\n })['catch'](function () {\n _this3.actions.handleContingencies();\n _this3.actions.processed();\n });\n }\n },\n lifecycle: {\n enter: function enter() {\n var _this4 = this;\n\n this.resolveOTP = new _index.$ResolveOTP({ id: this.cardmodel.id });\n this.isProcessing = this.showResendLink = false;\n this.cardLast4 = this.cardmodel.card.number.slice(-4);\n this.phoneLast4 = this.phone && this.phone.telephone && this.phone.telephone.slice(-4);\n this.actions.startCountdown(true);\n\n this.$watch('isProcessing', function (isProcessing) {\n if (isProcessing) {\n _this4.$element.addClass('processing');\n } else {\n _this4.$element.removeClass('processing');\n }\n });\n $('#upopConfirmation .modalContainer').focus();\n }\n }\n});\n\n\n_squid.$Component;\n\n_util.$fiErrorUtil;\n\n_index.$ResolveOTP;\n\n_index2.$CheckoutSessionModel;\nmodule.exports = exports['default'];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/confirm-upop/confirm/directive.js\n// module id = ../node_modules/xo-wallet-components/src/confirm-upop/confirm/directive.js\n// module chunks = 0 1 8 9 10 11 38 39 40 41","module.exports = \"
      \\n
      \\n\\n
      \\n {{content('confirmUpop.timeRemaining')}}\\n {{timer}} {{content('confirmUpop.minutes')}}\\n {{content('confirmUpop.resendCode')}}\\n
      \\n\\n
      \\n\\n
      \\n
      \\n \\n\\n
      \\n \\n
      \\n
      \\n
      \\n \\n
      \\n
      \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/confirm-upop/confirm/template.html\n// module id = ../node_modules/xo-wallet-components/src/confirm-upop/confirm/template.html\n// module chunks = 0 1 8 9 10 11 38 39 40 41","\n\nexports.__esModule = true;\n\nvar _angular = require('angular');\n\nvar _squid = require('squid');\n\nvar _uiRouter = require('uiRouter');\n\nvar _addCard = require('../add-card');\n\nvar _logger = require('xo-beaver/dist/logger');\n\nvar _jquery = require('jquery');\n\nvar _jquery2 = _interopRequireDefault(_jquery);\n\nrequire('xo-ui-components/src/message/directive');\n\nrequire('./init/directive');\n\nrequire('./confirm/directive');\n\nvar _index = require('xo-models/src/checkout/index');\n\nrequire('./styles');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoConfirmUpopDirective', {\n tag: 'xo-confirm-upop',\n template: _template2['default'],\n props: {\n token: {\n type: 'var',\n required: false\n },\n phone: {\n type: 'var',\n required: false\n },\n cardmodel: {\n type: 'var',\n required: false\n },\n onSuccess: {\n type: 'var',\n required: false\n },\n onCancel: {\n type: 'var',\n required: false\n }\n },\n resolve: {\n models: function models() {\n return {\n checkoutSession: _index.$CheckoutSessionModel.instance(this.props.token).retrieve()\n };\n }\n },\n lifecycle: {\n enter: function enter() {\n var _this = this;\n\n // Card model should be required. However, because this is a route, a user could potentially refresh the page and land on this directive.\n // So, we need to check if parent directive has passed in cardmodel and return if not\n if (!this.cardmodel) {\n _logger.$logger.warn('card_model_missing');\n return this.goto('^'); // Return to parent route\n }\n\n this.phone = this.props.phone || {};\n\n var cardNumber = this.cardmodel.card && this.cardmodel.card.number;\n\n this.cardLast4 = cardNumber && cardNumber.slice(-4);\n this.fromLoginOverlay = _uiRouter.$stateParams.fromLoginOverlay;\n\n (0, _angular.$timeout)(function () {\n (0, _jquery2['default'])('#upopConfirmation .upopConfirm').addClass('upopOpen');\n if (_this.fromLoginOverlay) {\n (0, _angular.$timeout)(function () {\n (0, _jquery2['default'])('#upopConfirmation .modalWrapper').addClass('modalWrapperAnimation');\n });\n }\n });\n\n var hideModal = function hideModal() {\n (0, _jquery2['default'])('#upopConfirmation .upopConfirm').removeClass('upopOpen');\n };\n\n var done = function done(handler, target) {\n hideModal();\n (0, _angular.$timeout)(function () {\n return handler ? handler() : _this.goto(target);\n }, 200);\n };\n\n var _success = function _success() {\n done(_this.props.onSuccess, 'checkout.review');\n };\n\n this.closeModal = function (event) {\n if (event) {\n event.preventDefault();\n }\n\n done(_this.props.onCancel, '^');\n };\n\n this.initSuccess = function () {\n _this.collectOtpInput = false;\n };\n\n this.confirmed = function () {\n if (_this.props.onSuccess) {\n return _success();\n }\n\n return _this.models.checkoutSession.fundingOptions.action('update', {\n resultModel: _this.models.checkoutSession,\n silent: true,\n data: {\n planId: _this.cardmodel.id\n },\n success: function success() {\n if (_this.models.checkoutSession.cvvData) {\n _this.models.checkoutSession.set('cvvData.security_code', _this.cardmodel.get('card.security_code'));\n }\n var isNewCard = !_this.cardmodel.card.isExisting();\n var msg = isNewCard ? ['smallToolTip.cardAddedConfirmed'] : ['smallToolTip.cardConfirmed'];\n\n _this.models.checkoutSession.message = {\n type: 'success',\n msgKeys: msg\n };\n _success();\n }\n });\n };\n\n this.flag = function (field) {\n // passing country to differentiate CUP for C2 and ROW\n return _addCard.$CardMetaData.getMetaData(_this.cardmodel.card, field, _squid.$locale.country);\n };\n\n this.setMessage = function (message) {\n _this.message = message;\n };\n\n this.collectOtpInput = this.flag('fields.expiry') && !this.cardmodel.get('card.expiry_month') || this.flag('fields.cvv') && !this.cardmodel.get('card.expiry_month') || this.flag('fields.phone') && !(this.phone && this.phone.telephone);\n }\n }\n});\n\n\n_angular.$timeout;\n\n_squid.$Component;\n\n_squid.$locale;\n\n_uiRouter.$stateParams;\n\n_addCard.$CardMetaData;\n\n_logger.$logger;\n\n_index.$CheckoutSessionModel;\nmodule.exports = exports['default'];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/confirm-upop/directive.js\n// module id = ../node_modules/xo-wallet-components/src/confirm-upop/directive.js\n// module chunks = 0 1 8 9 10 11 38 39 40 41","\n\nexports.__esModule = true;\n\nvar _squid = require('squid');\n\nvar _util = require('../../fi-contingency-list/util');\n\nvar _index = require('xo-models/src/fi/index');\n\nrequire('xo-ui-components/src/spinner-button/directive');\n\nrequire('xo-form-components/src/phone/phoneInput/directive');\n\nrequire('../../add-card/cardExpiry/directive');\n\nrequire('../../add-card/cvv/directive');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = _squid.$Component.extend('$xoInitOtpDirective', {\n tag: 'xo-init-otp',\n template: _template2['default'],\n props: {\n token: {\n type: 'var',\n required: false\n },\n phone: {\n type: 'var',\n required: false\n },\n cardmodel: {\n type: 'var',\n required: false\n },\n onSuccess: {\n type: 'var',\n required: false\n },\n flag: {\n type: 'var',\n required: false\n },\n message: {\n type: 'var',\n required: false\n }\n },\n actions: {\n initOtp: function initOtp() {\n var _this = this;\n\n var handleContingencies = function handleContingencies() {\n var result = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var prop = arguments[1];\n\n var errorData = void 0;\n if (result.errorCodes) {\n errorData = result;\n } else {\n errorData = {\n errorCodes: [result['0'] || 'ISSUER_DECLINE']\n };\n }\n\n _this.message(_util.$fiErrorUtil.addPageErrors(errorData, 'confirmUpop', prop, 'error'));\n\n if (window.scrollTo) {\n window.scrollTo(0, 0);\n }\n };\n\n this.isProcessing = true;\n\n var resolveOTP = new _index.$ResolveOTP({ id: this.cardmodel.id });\n\n resolveOTP.action('init', {\n silent: true,\n data: {\n phone: {\n country_code: this.phone.IntDialingCountryCode,\n number: this.phone.telephone\n }\n },\n resultModel: {},\n success: function success() {\n _this.onSuccess();\n },\n\n error: function error() {\n handleContingencies();\n },\n\n contingencies: {\n INIT_OTP_CONTINGENCY: function INIT_OTP_CONTINGENCY(name, result) {\n // prop for last 4 digits of card in error message\n var prop = {\n number: _this.cardmodel.card.number.slice(-4)\n };\n\n handleContingencies(result, prop);\n _util.$fiErrorUtil.addFieldErrors(result, _this.$element);\n },\n DEFAULT: function DEFAULT() {\n handleContingencies();\n }\n }\n })['finally'](function () {\n _this.isProcessing = false;\n });\n }\n },\n\n lifecycle: {\n enter: function enter() {\n var _this2 = this;\n\n this.$watch('isProcessing', function (isProcessing) {\n if (isProcessing) {\n _this2.$element.addClass('processing');\n } else {\n _this2.$element.removeClass('processing');\n }\n });\n $('#upopConfirmation .modalContainer').focus();\n }\n }\n});\n\n\n_squid.$Component;\n\n_util.$fiErrorUtil;\n\n_index.$ResolveOTP;\nmodule.exports = exports['default'];\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/confirm-upop/init/directive.js\n// module id = ../node_modules/xo-wallet-components/src/confirm-upop/init/directive.js\n// module chunks = 0 1 8 9 10 11 38 39 40 41","module.exports = \"
      \\n
      \\n\\n
      \\n
      \\n \\n \\n
      \\n \\n\\n \\n
      \\n
      \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/confirm-upop/init/template.html\n// module id = ../node_modules/xo-wallet-components/src/confirm-upop/init/template.html\n// module chunks = 0 1 8 9 10 11 38 39 40 41","\n\nexports.__esModule = true;\nexports.$xoConfirmUpopRoute = undefined;\n\nvar _index = require('squid/index');\n\nvar _directive = require('./directive');\n\nvar _directive2 = _interopRequireDefault(_directive);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar $xoConfirmUpopRoute = exports.$xoConfirmUpopRoute = _index.$Route.extend('$xoConfirmUpopRoute', {\n path: 'confirmUpop',\n directive: _directive2['default'],\n titleContent: 'confirmUpop.confirm',\n trackingData: {\n fptiState: 'confirm_upop'\n },\n query: ['fromLoginOverlay'],\n loginRequired: true,\n pageOnOverlay: true,\n children: []\n});\n\nexports['default'] = $xoConfirmUpopRoute;\n\nangular.value(\"$xoConfirmUpopRoute\", $xoConfirmUpopRoute);\n_index.$Route;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/confirm-upop/route.js\n// module id = ../node_modules/xo-wallet-components/src/confirm-upop/route.js\n// module chunks = 0 1 8 9 10 11 38 39 40 41","module.exports = \"
      \\n
      \\n
      \\n
      \\n
      \\n \\n \\n
      \\n\\n \\n \\n
      \\n
      \\n
      \\n
      \\n
      \\n
      \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/confirm-upop/template.html\n// module id = ../node_modules/xo-wallet-components/src/confirm-upop/template.html\n// module chunks = 0 1 8 9 10 11 38 39 40 41","\n\ndefine([], function () {\n\n var contingencyList = {\n INSTRUMENT_COUNT_EXCEEDED: 'errorInstrumentCountExceeded',\n INSTRUMENT_COUNT_EXCEEDED_VERIFIED: 'errorInstrumentCountExceeded',\n INSTRUMENT_COUNT_LIMIT_EXCEEDED: 'errorInstrumentCountExceeded',\n INSTRUMENT_COUNT_LIMIT_EXCEEDED_VERIFIED: 'errorInstrumentCountExceeded',\n INSTRUMENT_UNAVAILABLE: 'errorInstrumentUnavailable',\n INSTRUMENT_REFUSED_DUE_TO_MAX_LIMIT: 'errorInstrumentRefused',\n INSTRUMENT_REFUSED_DUE_TO_MAX_SHARED_INSTRUMENT_LIMIT: ['errorInstrumentUnavailable', 'errorInstrumentRefused'],\n INSTRUMENT_SHARING_LIMIT_EXCEEDED: ['errorInstrumentUnavailable', 'errorInstrumentRefused'],\n INSTRUMENT_ALREADY_EXISTS: 'errorInstrumentAlreadyExists',\n INSTRUMENT_BILLING_ADDRESS_NOT_ACCEPTED: 'errorInstrumentBillingAddressNotAccepted',\n BILLING_ADDRESS1: 'errorInstrumentBillingAddressNotAccepted',\n BILLING_CITY: 'errorInstrumentBillingAddressNotAccepted',\n BILLING_COUNTRY: 'errorInstrumentBillingAddressNotAccepted',\n BILLING_DIFFERENT_COUNTRY: ['errorInstrumentBillingAddressUnavailableIntl', 'errorInstrumentBillingAddressNotAccepted'],\n INSTRUMENT_UPDATE_NO_CHANGE: 'errorInstrumentUpdateNoChange',\n INSTRUMENT_DUPLICATE_LIMIT_REACHED: 'errorInstrumentRefused',\n NOT_ELIGIBLE_TO_EDIT_CARD: 'notEligibleToEditCard',\n INTERNAL_ERROR: 'errorInternalError',\n INSTRUMENT_REFUSED: 'errorInstrumentRefused',\n INSTRUMENT_INTERNATIONAL: 'errorIssuerRejectIntl',\n REJECT_REFUSED: ['errorIssuerReject', 'errorInstrumentRefused'],\n PAYPAL_DEBIT_CARD_REFUSED: ['errorPaypalDebitRefused', 'errorGeneral'],\n PAYPAL_CREDIT_CARD_REFUSED: ['errorPaypalCreditRefused', 'errorGeneral'],\n PAYPAL_CARD_REFUSED: ['errorPaypalRefused', 'errorGeneral'],\n EXCESSIVE_REJECTIONS: ['errorExcessiveRejectGuest', 'errorInstrumentRefused'],\n CC_INVALID_CSC: ['errorCheckDigits', 'errorGeneral'],\n INVALID_EXPIRATION_DATE: 'errorInvalidExpirationDate',\n CHECK_DIGITS_NOT_PRESENT: ['errorCheckDigitsNotPresent', 'errorGeneral'],\n REJECT_UNKNOWN: ['errorIssuerReject', 'errorInstrumentRefused'],\n SETTLEMENT_DENIED: 'errorInstrumentRefused',\n MAX_AMOUNT_EXCEEDED: ['errorMaxAmountExceeded', 'errorInstrumentRefused'],\n ISSUER_ERROR: ['errorIssuerDenied', 'errorInstrumentRefused'],\n MISSING_FIELD: ['errorInvalidData', 'errorGeneral'],\n INVALID_PARAMETERS: ['errorInvalidData', 'errorGeneral'],\n INVALID_DATA: ['errorInvalidData', 'errorGeneral'],\n INVALID_ACCOUNT: ['errorInvalidAccount', 'errorGeneral'],\n INVALID_INSTRUMENT_ID: ['errorInvalidAccount', 'errorGeneral'],\n ACCOUNT_RESTRICTED: ['errorAccountRestricted', 'errorGeneral'],\n ISSUER_RESTRICTED: ['errorIssuerReject', 'errorGeneral'],\n ISSUER_REJECTED: ['errorIssuerReject', 'errorGeneral'],\n ADDRESS_MISMATCH: 'errorInstrumentBillingAddressNotMatch',\n CHECK_DIGITS_NOT_PROC: ['errorCheckDigitsNotPresent', 'errorGeneral'],\n CHECK_DIGITS_UNSUPPORTED: ['errorCheckDigits', 'errorGeneral'],\n CHECK_DIGITS_UNAVAILABLE: ['errorCheckDigits', 'errorGeneral'],\n BILL_ADDR_UNAVAILABLE: ['errorInstrumentBillingAddressUnavailable', 'errorInstrumentBillingAddressNotAccepted'],\n BILL_ADDR_UNSUPPORTED: ['errorInstrumentBillingAddressUnsupported', 'errorInstrumentBillingAddressNotAccepted'],\n BILL_ADDR_UNAVAILABLE_GLOBAL: ['errorInstrumentBillingAddressUnavailableIntl', 'errorInstrumentBillingAddressNotAccepted'],\n BILL_ADDR_NOT_ALLOWED: ['errorInstrumentBillingAddressNotAccepted', 'errorAddressNotAllowed'],\n BILL_ADDR_UNAVAILABLE_INTL: ['errorInstrumentBillingAddressUnavailableIntl', 'errorInstrumentBillingAddressNotAccepted'],\n INSTRUMENT_DISABLED: 'errorInstrumentRefused',\n PI_TYPE_NOT_SUPPORTED: 'errorInvalidCCNumberOrType_global',\n REJECT_AMEX_ADULT: ['errorAmexAdult', 'errorGeneral'],\n INVALID_BANK_ROUTING_NUMBER: 'invalidRoutingNumber',\n BANK_ROUTING_NUMBER_IS_EMPTY: 'invalidPINumber',\n INVALID_BANK_ACCOUNT_NUMBER: 'invalidPINumber',\n BANK_ACCOUNT_NUMBER_IS_EMPTY: 'invalidPINumber',\n INVALID_BANK_IBAN: 'invalidPINumber',\n INVALID_IBAN_CODE: 'invalidPINumber',\n INVALID_BANK_IBAN_CONVERSION_ERROR: 'invalidPINumber',\n INVALID_BENEFICIARY_FIRST_NAME: 'errorInvalidFirstName',\n INVALID_BENEFICIARY_NAME: 'errorInvalidFirstName',\n INVALID_BANK_BENEFICIARY_NUMBER: 'errorGeneral',\n INVALID_BANK_ADDRESS: 'errorGeneral',\n INVALID_CARD_NUMBER: 'errorInvalidCCNumberOrType',\n INVALID_CARD_TYPE: 'errorInvalidCCNumberOrType',\n INVALID_SECURITY_CODE: 'errorInvalidCSC',\n INVALID_FIRST_NAME: 'errorInvalidFirstName',\n INVALID_LAST_NAME: 'errorInvalidLastName',\n INVALID_EXPIRY: 'errorInvalidExpirationDate',\n INVALID_PHONE: 'errorInvalidPhone',\n BANK_ADDRESS_IS_EMPTY: 'errorGeneral',\n INVALID_BANK_BRANCH_NUMBER: 'errorGeneral',\n ADD_REFUSED_DUE_TO_EXCEEDING_MAX_DUPLICATE_INSTRUMENT_LIMIT: 'errorInstrumentUnavailable',\n EMPTY_DATA: 'errorGeneral',\n ISSUER_DECLINE: 'errorIssuerReject',\n WRONG_CONFIRMATION_VALUES: 'wrongConfirmationValue',\n CONFIRMATION_RESEND_COUNT_EXCEEDED: 'resendValExceeded',\n FREQUENT_REQUEST_VERIFICATION_CODE: 'frequentVerificationCodeReq',\n TRANSACTION_TIMEOUT: 'transactionTimeout',\n NOT_CONFIRMED: 'notConfirmed',\n CONTACT_CARD_ISSUER_TO_VERIFY: 'issuerVerify',\n CARD_NOT_ACTIVATED_FOR_UPOP: 'cardNotActivatedUpop',\n RESTRICTED_CARD: 'cardRestricted',\n INVALID_ONE_TIME_PASSWORD: 'errorInvalidOtpCode',\n DUPLICATED_TRANSACTION: 'duplicateTransaction'\n\n };\n\n return contingencyList;\n});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/fi-contingency-list/contingencies.js\n// module id = ../node_modules/xo-wallet-components/src/fi-contingency-list/contingencies.js\n// module chunks = 0 1 8 9 10 11 38 39 40 41 46 48","\n\nvar _squid = require('squid');\n\nvar _logger = require('xo-beaver/dist/logger');\n\nvar _contingencies = require('./contingencies');\n\nvar _contingencies2 = _interopRequireDefault(_contingencies);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n// FI error fields and xo frontend models map\nvar FIELD_TO_MODEL_MAPPING = {\n ACTOR: [],\n BILLING_ADDRESS: ['cardmodel.address'],\n BIN: ['card.type', 'card.number'],\n CARD: ['card.type', 'card.number'],\n CUP_CARD: ['card.type', 'card.number'],\n CVV: ['card.security_code'],\n DOB: ['dob.value', 'user.dob_day', 'user.dob_month', 'user.dob_year'],\n EXPIRY: ['expiryDate', 'card.expiry_month', 'card.expiry_year']\n};\n\n(function exportProviders(angular) {\n angular && angular.exportProviders(module, exports, __dirname, __filename);\n})(window.angular);\n\nangular.module().factory('$fiErrorUtil', function () {\n return {\n addPageErrors: function addPageErrors(errorData, contentBundle, prop, defaultKey) {\n // error handling for filifecycle and fimanagement.\n if (!errorData.errorCodes) {\n errorData.errorCodes = errorData && [errorData['0']];\n }\n\n var messages = [];\n\n if (errorData.errorCodes && errorData.errorCodes.length) {\n errorData.errorCodes.forEach(function (errorCode) {\n var contentKey = _contingencies2['default'][errorCode] || defaultKey || 'errorGeneral';\n var message = void 0;\n\n if (angular.isArray(contentKey)) {\n for (var i = 0; i < contentKey.length; i++) {\n message = (0, _squid.$renderContent)(contentBundle + '.' + contentKey[i], prop);\n if (message) {\n break;\n }\n }\n } else {\n message = (0, _squid.$renderContent)(contentBundle + '.' + contentKey, prop);\n }\n messages.push(message);\n });\n } else {\n messages.push((0, _squid.$renderContent)(contentBundle + '.' + 'errorGeneral', prop));\n }\n\n return {\n msgs: messages,\n type: 'error'\n };\n },\n\n highlightInvalidFields: function highlightInvalidFields(invalidFields, $element) {\n for (var _iterator = invalidFields, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n var model = _ref;\n\n var $field = $($element).find('[ng-model=\"' + model + '\"]');\n\n $field.addClass('backendError');\n $field.attr('aria-invalid', true);\n }\n\n $($element).find('.backendError').first().focus();\n },\n\n mapValidationErrorToModel: function mapValidationErrorToModel() {\n var invalidFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n var errorProperty = 'VALIDATION_ERROR_';\n\n // if there is only one invalid field then fetch the corresponding error message else return the\n // generic validation error message\n if (invalidFields.length === 1) {\n return {\n invalidModels: FIELD_TO_MODEL_MAPPING[invalidFields[0]],\n errorProperty: errorProperty + invalidFields[0]\n };\n }\n return {\n invalidModels: [],\n errorProperty: errorProperty + 'GENERIC'\n };\n },\n\n addPageErrorByErrorName: function addPageErrorByErrorName(contentBundle, prop) {\n var defaultKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'INTERNAL_ERROR';\n\n var message = (0, _squid.$renderContent)(contentBundle + '.' + prop);\n\n if (!message || !message.toString()) {\n // log content not found\n _logger.$logger.error('fi_content_missing', {\n prop: prop\n });\n message = (0, _squid.$renderContent)(contentBundle + '.' + defaultKey);\n }\n\n return {\n msgs: [message],\n type: 'error'\n };\n },\n\n /**\n * Highlight the Error Fields by ng-model\n * @param errorData\n * @param element\n * @param modelPrefix\n */\n addFieldErrors: function addFieldErrors(errorData, element, modelPrefix) {\n if (errorData.fields && errorData.fields.length) {\n errorData.fields.forEach(function (field) {\n var $field = $(element).find('[ng-model=\"' + (modelPrefix ? modelPrefix : '') + field.field + '\"]');\n\n $field.addClass('backendError');\n $field.attr('aria-invalid', true);\n });\n }\n $(element).find('.backendError:first').focus();\n },\n\n /**\n * Highlight the Error Fields by element name\n * @param errorData\n * @param element\n * @param modelPrefix\n */\n addFieldErrorsByName: function addFieldErrorsByName(errorData, element, modelPrefix) {\n if (errorData.fields && errorData.fields.length) {\n errorData.fields.forEach(function (field) {\n var fieldName = void 0;\n\n if (modelPrefix && field.field && field.field.length > 0) {\n // Add prefix with CamelCase of field name\n fieldName = modelPrefix + field.field[0].toUpperCase() + field.field.substring(1);\n } else {\n fieldName = field.field;\n }\n var $field = $(element).find('[name=\"' + fieldName + '\"]');\n\n $field.addClass('backendError');\n $field.attr('aria-invalid', true);\n });\n }\n $(element).find('.backendError:first').focus();\n }\n };\n});\n\n_squid.$renderContent;\n\n_logger.$logger;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/xo-wallet-components/src/fi-contingency-list/util.js\n// module id = ../node_modules/xo-wallet-components/src/fi-contingency-list/util.js\n// module chunks = 0 1 8 9 10 11 38 39 40 41 46 48","\n\nexports.__esModule = true;\nexports.$xoPageAddCardPageComponent = undefined;\n\nvar _angular = require('angular');\n\nvar _uiRouter = require('uiRouter');\n\nvar _logger = require('xo-beaver/dist/logger');\n\nvar _squid = require('squid');\n\nvar _factory = require('xo-member-components/src/no-balance/factory');\n\nvar _factory2 = require('xo-wallet-components/src/add-card/addcard/factory');\n\nvar _auth = require('xo-models/src/auth');\n\nvar _fi = require('xo-models/src/fi');\n\nvar _choice = require('xo-models/src/choice');\n\nvar _app = require('xo-models/src/app');\n\nvar _fiMessages = require('xo-models/src/fi/lib/fiMessages');\n\nvar _index = require('xo-models/src/fiMeta/index');\n\nvar _index2 = _interopRequireDefault(_index);\n\nvar _newMember = require('xo-models/src/newMember');\n\nvar _checkoutIncentive = require('xo-models/src/checkoutIncentive');\n\nvar _checkout = require('xo-models/src/checkout');\n\nrequire('xo-page-components/src/notYou/directive');\n\nrequire('xo-page-components/src/value-props/directive');\n\nrequire('xo-ui-components/src/dropdown/directive');\n\nrequire('xo-ui-components/src/modal/directive');\n\nrequire('xo-ui-components/src/tooltip/directive');\n\nrequire('xo-validation/dist/directive');\n\nrequire('xo-wallet-components/src/add-card/directive');\n\nrequire('xo-member-components/src/no-balance/directive');\n\nvar _factory3 = require('xo-ui-components/src/expired-fi-panel/factory');\n\nvar _template = require('./template');\n\nvar _template2 = _interopRequireDefault(_template);\n\nvar _sharedUtil = require('../services/shared-util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar disallowedExp = _factory3.$ExpiredFiPanelFactory.disallowedExp;\nvar $xoPageAddCardPageComponent = exports.$xoPageAddCardPageComponent = _squid.$Component.extend('$xoPageAddCardPageComponent', {\n tag: 'xo-page-add-card-page',\n template: _template2['default'],\n scope: {},\n controller: ['$scope', function ($scope) {\n if (_uiRouter.$stateParams.cause === 'cpa') {\n $scope.cause = _uiRouter.$stateParams.cause;\n }\n $scope.locale = _squid.$locale;\n $scope.token = _angular.$rootScope.token;\n $scope.showIncentive = false; // Assume we won't show an incentive\n $scope.isProcessorDeclineExperiment = false;\n var models = {};\n\n $scope.callbacks = {\n finish: function finish() {\n if (models.cart.isWalletTokenization() && models.walletPinModel.isSetupEligible()) {\n _logger.$logger.debug('pinSetup_required');\n _uiRouter.$state.go('checkout.pinSetup');\n } else {\n _uiRouter.$state.go('checkout.review');\n }\n },\n cancel: function cancel(routeTo) {\n var goTo = routeTo || $scope.parentState || '';\n\n _logger.$logger.debug('xoAddCard_cancel', { goTo: goTo });\n if (goTo) {\n _uiRouter.$state.go(goTo);\n }\n }\n };\n\n (0, _squid.$populate)(models, {\n checkoutSession: _checkout.$CheckoutSessionModel.instance($scope.token).retrieve({\n contingencies: {\n NEED_CREDIT_CARD: angular.noop,\n EXPIRED_CREDIT_CARD: angular.noop,\n NEED_DEBIT_CARD: angular.noop,\n EXPIRED_DEBIT_CARD: angular.noop\n }\n }),\n unavailableCard: _fi.$UnavailableCardModel.instance(),\n payee: _checkout.$CheckoutPayeeModel.instance($scope.token),\n cart: _checkout.$CheckoutCartModel.instance($scope.token),\n auth: _auth.$AuthModel.instance().retrieve(),\n checkoutAppData: _checkout.$CheckoutAppDataModel.instance($scope.token).retrieve(),\n noBalanceFactoryState: _factory.$NoBalanceFactory.decideEligibility(),\n fiMeta: _index2['default'].instance(_angular.$rootScope.token).fetch()['catch'](_angular.noop)\n }).then(function () {\n $scope.noBalanceFactoryState = _factory.$NoBalanceFactory.get();\n // Resolve additional information needed\n var getWalletPinModel = function getWalletPinModel() {\n if (models.cart.isWalletTokenization()) {\n return (0, _squid.$populate)(models, {\n walletPinModel: _app.$TokenizedWalletPinModel.instance($scope.token)\n });\n }\n };\n\n var getCheckoutIncentiveEligibility = function getCheckoutIncentiveEligibility() {\n return (0, _angular.$q)(function (resolve, reject) {\n var fptiData = {\n from: 'FI_addCardAccount',\n to: 'prepare_FI_addCardAccount',\n context_id: $scope.token,\n eligibility_reason: ''\n };\n\n if (models.cart.isWalletTokenization()) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Wallet_Tokenization';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n if (models.payee.isGambling()) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Gambling_Merchant';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n var country_code = _squid.$locale.getCountryCodeISO();\n\n var offerEligibilityData = {\n payer_id: models.auth.buyer_id,\n country_code: country_code,\n language: _squid.$locale.getLocaleCode(),\n touchpoint_code: 'CHECKOUT_INCENTIVE' // TODO don't hardcode this?\n };\n\n $scope.evaluateCheckoutOfferEligibilityModel = _checkoutIncentive.$EvaluateCheckoutOfferEligibilityModel.instance();\n\n $scope.evaluateCheckoutOfferEligibilityModel.save({\n data: offerEligibilityData,\n success: function success() {\n\n if (!$scope.evaluateCheckoutOfferEligibilityModel.isEligible()) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Not_In_MORS_Segment';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n $scope.getOfferProgramModel = _checkoutIncentive.$GetOfferProgramModel.instance();\n var offer_program_code = $scope.evaluateCheckoutOfferEligibilityModel.getOfferProgramCode();\n\n $scope.getOfferProgramModel.retrieve({\n params: { offer_program_code: offer_program_code },\n success: function success() {\n var offerCurrencyCode = $scope.getOfferProgramModel.getOfferCurrencyCode();\n var cartCurrencyCode = models.cart.getCartCurrencyCode();\n\n if (cartCurrencyCode !== offerCurrencyCode) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Cart_Currency_Not_Offer_Currency';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n var txnMinimumLowestDenom = $scope.getOfferProgramModel.getMinCartTotalLowestDenom();\n var precisionDigits = _squid.$locale.metadata.currency.digits[offerCurrencyCode];\n var txnMinimum = txnMinimumLowestDenom;\n\n if (precisionDigits) {\n txnMinimum = (txnMinimumLowestDenom / Math.pow(10, precisionDigits)).toFixed(precisionDigits);\n }\n\n var txnAmt = models.cart.getPurchaseAmount();\n var isTxnWorthEnough = txnAmt >= txnMinimum;\n\n if (!isTxnWorthEnough) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Transaction_Not_Worth_Enough';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n var isUserInApplicableCountry = $scope.getOfferProgramModel.isUserInApplicableCountry(country_code);\n\n if (!isUserInApplicableCountry) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_Country_Ineligible';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n\n fptiData.eligibility_reason = 'Incentive_Eligible';\n _logger.$logger.info('checkout_fpti', fptiData);\n\n var pxpFptiData = {\n state_name: 'FI_addCardAccount',\n transition_name: 'prepare_FI_addCardAccount_incentive',\n incentive_name: ''\n };\n\n return _factory2.$AddCardFactory.getCheckoutIncentivePxpResult().then(function (result) {\n if (result === 'xo_hermes_checkout_incentive_show') {\n pxpFptiData.incentive_name = $scope.getOfferProgramModel.offer_program_code;\n _logger.$logger.info('checkout_fpti', pxpFptiData);\n return resolve(true);\n }\n\n _logger.$logger.info('checkout_fpti', pxpFptiData);\n return resolve(false);\n })['catch'](function () {\n _logger.$logger.info('checkout_fpti', pxpFptiData);\n return resolve(false);\n });\n },\n contingencies: {\n DEFAULT: function DEFAULT(msg, contingency) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_' + msg;\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n },\n error: function error() {\n fptiData.eligibility_reason = 'Get_Program_Error';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n });\n },\n contingencies: {\n DEFAULT: function DEFAULT(msg, contingency) {\n fptiData.eligibility_reason = 'Incentive_Ineligible_' + msg;\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n },\n error: function error() {\n fptiData.eligibility_reason = 'MORS_Error';\n _logger.$logger.info('checkout_fpti', fptiData);\n return resolve(false);\n }\n });\n });\n };\n\n var getHideControlMsg = function getHideControlMsg() {\n return _newMember.$NewMemberEligibility.instance().isNmj($scope.token);\n };\n\n var getSelectFiVariant = function getSelectFiVariant() {\n return _choice.$ChoiceEligibility.instance().getVariant($scope.token).then(function (variant) {\n var selectFiVariants = _squid.$config.choiceExperiment && _squid.$config.choiceExperiment.selectFi || [];\n\n if (selectFiVariants.indexOf(variant) !== -1) {\n return true;\n }\n\n return false;\n });\n };\n\n // Return the reason for disallowed in the wallet, due to preauth or bank\n var checkDeclineReason = function checkDeclineReason() {\n var disallowedInstruments = models.checkoutSession.get('fundingOptions').get('disallowedInstruments');\n var disallowedPreAuth = _squid.$util.filter(disallowedInstruments, function (instrument) {\n return instrument.declineReason === 'INSTRUMENT_VERIFICATION_FAILED';\n });\n\n if (!disallowedInstruments) {\n return;\n }\n\n if (disallowedPreAuth && disallowedPreAuth.length > 0) {\n return 'PREAUTH';\n }\n\n var disallowedNonBankInstruments = _squid.$util.filter(disallowedInstruments, function (disallowedInstrument) {\n return disallowedInstrument.type !== 'BANK';\n });\n\n if (disallowedNonBankInstruments && disallowedNonBankInstruments.length >= 1) {\n return;\n }\n\n return 'BANK';\n };\n\n var checkProcessorDeclineIssuerExperiment = function checkProcessorDeclineIssuerExperiment() {\n var declinedInstruments = models.checkoutSession.get('declinedInstruments', []);\n if (declinedInstruments && declinedInstruments.length > 0) {\n return _factory2.$AddCardFactory.getIssuerDeclineElmoResult();\n }\n return '';\n };\n\n var getInformalName = function getInformalName() {\n var formattedNameInformal = void 0;\n if (models.auth) {\n formattedNameInformal = (0, _squid.formatNameInformal)({\n first_name: models.auth.first_name,\n last_name: models.auth.last_name\n }) || models.auth.email;\n }\n return formattedNameInformal;\n };\n\n _sharedUtil.$SharedUtil.checkCpaEligibility(models.checkoutSession).then(function (inCpaElmoTreatment) {\n $scope.isCPAEligible = inCpaElmoTreatment || false;\n });\n\n return _squid.$promise.hash({\n walletPinModel: getWalletPinModel(),\n hideControlMsg: getHideControlMsg(),\n checkoutIncentiveEligibility: getCheckoutIncentiveEligibility(),\n selectFiVariant: getSelectFiVariant(),\n checkDeclineReason: checkDeclineReason(),\n addCardContingency: _factory3.$ExpiredFiPanelFactory.getPxpResult(models),\n issuerDeclineTreatment: checkProcessorDeclineIssuerExperiment(),\n formattedNameInformal: getInformalName()\n\n });\n }).then(function (_ref) {\n var hideControlMsg = _ref.hideControlMsg,\n selectFiVariant = _ref.selectFiVariant,\n checkDeclineReason = _ref.checkDeclineReason,\n checkoutIncentiveEligibility = _ref.checkoutIncentiveEligibility,\n addCardContingency = _ref.addCardContingency,\n issuerDeclineTreatment = _ref.issuerDeclineTreatment,\n formattedNameInformal = _ref.formattedNameInformal;\n\n\n var message = void 0;\n\n // smartDollarAuthFailed is true when smart $x auth check fails on 'authorize'\n if (models.checkoutSession.smartDollarAuthFailed) {\n message = {\n type: 'error',\n msg: (0, _squid.$renderContent)('payment.authFailureSingleFI')\n };\n } else {\n if (issuerDeclineTreatment === 'Trmt_xo_hermesnodeweb_issuer_decline_1') {\n $scope.isProcessorDeclineExperiment = true;\n }\n message = _fiMessages.$fiMessages.processorDeclinedMsg(models.checkoutSession, false, issuerDeclineTreatment, models.auth, models.fiMeta.wallet, formattedNameInformal);\n }\n\n var isCreditDisallowedForMerchant = models.checkoutSession.isCreditDisallowedForMerchant;\n if (isCreditDisallowedForMerchant) {\n $scope.creditDisallowedMessage = {\n type: 'warning',\n msgs: [_squid.$locale.content.get('addCard.creditCardNotAllowed')]\n };\n }\n var redirectFromXoon = _squid.$util.param('redirectToHermes') ? true : false;\n var retry = _squid.$util.param('addFIContingency') === 'retry' ? true : false;\n var avsRetry = _squid.$util.param('avsRetry') ? true : false;\n\n var getContingencyDeclineMessage = function getContingencyDeclineMessage(declineReason, _ref2) {\n var disallowedInstruments = _ref2.disallowedInstruments;\n\n switch (declineReason) {\n case 'BANK':\n message = _fiMessages.$fiMessages.getAddBankTreatmentMsg();\n break;\n case 'PREAUTH':\n var disallowed = _squid.$util.filter(disallowedInstruments, function (instrument) {\n return instrument.declineReason === 'INSTRUMENT_VERIFICATION_FAILED';\n });\n\n message = _fiMessages.$fiMessages.getPreAuthTreatmentMsg(disallowed);\n break;\n default:\n message = _fiMessages.$fiMessages.getAddCardTreatmentMsg(models.checkoutSession);\n break;\n }\n };\n\n // If no processor decline, get the message when contingency is anything but NEED_DEBIT_CARD\n if (!message && models.checkoutSession.get('errorData.cause') && _uiRouter.$stateParams.message !== 'NEED_DEBIT_CARD') {\n if (models.payee.isGambling()) {\n message = _fiMessages.$fiMessages.getGamblingMsg();\n } else if (!hideControlMsg && addCardContingency && (addCardContingency === disallowedExp.disallowedFi || addCardContingency === disallowedExp.preAuth)) {\n getContingencyDeclineMessage(checkDeclineReason, models.checkoutSession.get('fundingOptions'));\n } else {\n message = _fiMessages.$fiMessages.getAddCardMsg(models.unavailableCard, { retry: retry, avsRetry: avsRetry, redirectFromXoon: redirectFromXoon }, models.checkoutSession);\n var noBillingFIContingencyIndia = (0, _squid.$renderContent)('creditcard.noBillingFIContingency');\n\n // Content changes for change card for indian billing start\n if (models.cart.isConsumerCountry('IN') && models.cart.isBilling()) {\n if (models.cart.isRecurringPayment() || models.checkoutAppData.is_wps_flow()) {\n noBillingFIContingencyIndia = (0, _squid.$renderContent)('creditcard.not.immediate.noBillingFIContingency');\n } else if (models.cart.isReferenceTransaction()) {\n\n if (models.checkoutAppData.isMerchantCountry('IN')) {\n if (models.cart.isChargePatternImmediateOrDeferred()) {\n noBillingFIContingencyIndia = (0, _squid.$renderContent)('creditcard.immediate.noBillingFIContingency');\n } else {\n noBillingFIContingencyIndia = (0, _squid.$renderContent)('creditcard.not.immediate.noBillingFIContingency');\n }\n } else {\n noBillingFIContingencyIndia = (0, _squid.$renderContent)('creditcard.not.immediate.noBillingFIContingency');\n }\n }\n }\n // Content changes for change card for indian billing end\n\n if (models.cart.isBilling() && noBillingFIContingencyIndia && _squid.$locale.country === 'IN') {\n message.msg = noBillingFIContingencyIndia;\n message.type = 'info';\n }\n }\n }\n\n if (message) {\n $scope.message = {\n type: message.type,\n msgs: [message.msg]\n };\n if (message.title) {\n $scope.messagetitle = _squid.$locale.content.get(message.title.key);\n }\n }\n // Reset the message if it is CPA flow for single FI contingency.\n if ($scope.cause === 'cpa' && _uiRouter.$stateParams.message === 'NEED_CREDIT_CARD' || $scope.isCPAEligible) {\n $scope.message = null;\n $scope.messagetitle = null;\n }\n\n $scope.cart = models.cart;\n $scope.auth = models.auth;\n\n // Show this message if this is the first page the user sees (these cases usually have a message).\n // Do not show if entering from another page, like the select-fi page\n if (!hideControlMsg) {\n $scope.showHiMsg = message || !selectFiVariant;\n $scope.showNotYou = $scope.auth && $scope.auth.showNotYou();\n }\n\n // Render the incentive banner if eligible\n $scope.showIncentive = checkoutIncentiveEligibility;\n\n if ($scope.showIncentive) {\n // This is of the form '$5.00'\n var offerValue = $scope.evaluateCheckoutOfferEligibilityModel.getOfferValue();\n\n $scope.incentiveAmount = offerValue;\n\n var currencyCode = $scope.evaluateCheckoutOfferEligibilityModel.getCurrencyCode();\n var precisionDigits = _squid.$locale.metadata.currency.digits[currencyCode];\n\n if (precisionDigits) {\n var decimalDigitsStr = offerValue.substring(offerValue.length - precisionDigits);\n var areAllDecimalDigitsZeroes = /^0*$/.test(decimalDigitsStr);\n\n if (areAllDecimalDigitsZeroes) {\n // Remove trailing decimals and punctuation\n $scope.incentiveAmount = offerValue.substring(0, offerValue.length - precisionDigits - 1);\n }\n }\n\n // Don't show incentive terms by default\n $scope.showIncentiveTerms = false;\n\n $scope.toggleShowIncentiveTerms = function () {\n $scope.showIncentiveTerms = !$scope.showIncentiveTerms;\n };\n }\n\n // Show selectFi features if no contingency\n if (selectFiVariant && !message) {\n $scope.showCancel = true;\n $scope.parentState = 'checkout.selectFi';\n $scope.pagetitle = _squid.$locale.content.get('addCard.addACard');\n }\n });\n\n $scope.isAddCardContingency = function () {\n return _uiRouter.$stateParams.message === 'NEED_CREDIT_CARD';\n };\n\n $scope.isUpdateDebitCard = function () {\n return _uiRouter.$stateParams.message === 'EXPIRED_DEBIT_CARD';\n };\n }]\n});\n\nangular.value(\"$xoPageAddCardPageComponent\", $xoPageAddCardPageComponent);\n_angular.$q;\n\n_angular.$rootScope;\n\n_angular.noop;\n\n_uiRouter.$state;\n\n_uiRouter.$stateParams;\n\n_logger.$logger;\n\n_squid.$Component;\n\n_squid.$config;\n\n_squid.$locale;\n\n_squid.$populate;\n\n_squid.$promise;\n\n_squid.$renderContent;\n\n_squid.$util;\n\n_squid.formatNameInformal;\n\n_factory.$NoBalanceFactory;\n\n_factory2.$AddCardFactory;\n\n_auth.$AuthModel;\n\n_fi.$UnavailableCardModel;\n\n_choice.$ChoiceEligibility;\n\n_app.$TokenizedWalletPinModel;\n\n_fiMessages.$fiMessages;\n\n_newMember.$NewMemberEligibility;\n\n_checkoutIncentive.$EvaluateCheckoutOfferEligibilityModel;\n\n_checkoutIncentive.$GetOfferProgramModel;\n\n_checkout.$CheckoutAppDataModel;\n\n_checkout.$CheckoutCartModel;\n\n_checkout.$CheckoutPayeeModel;\n\n_checkout.$CheckoutSessionModel;\n\n_factory3.$ExpiredFiPanelFactory;\n\n_sharedUtil.$SharedUtil;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./pages/xo-add-card/directive.js\n// module id = ./pages/xo-add-card/directive.js\n// module chunks = 0","\n\nexports.__esModule = true;\nexports.$AddCardPageRoute = undefined;\n\nvar _squid = require('squid');\n\nrequire('xo-wallet-components/src/add-card/route');\n\nrequire('./directive');\n\nvar $AddCardPageRoute = exports.$AddCardPageRoute = _squid.$ComponentRoute.extend('$AddCardPageRoute', {\n path: 'pageAddCard',\n directive: 'xo-page-add-card-page',\n titleContent: 'asideHeader.addCard',\n query: ['cause', 'message'],\n trackingData: {\n templateName: 'addCard.dust',\n pageGoal: 'Add Card',\n buzname: {\n 'fullpage': {\n 'pagename': '%::fullpage-add-cc',\n 'pagename2': '%::fullpage-add-cc:member:hermes:',\n 'version': 'member:%:'\n // More page qualifiers come here...\n } }\n },\n children: [{\n name: '$AddCardFlowRoute',\n attributes: {\n token: 'token',\n messagetitle: 'messagetitle',\n message: 'message',\n pagetitle: 'pagetitle',\n 'parent-callbacks': 'callbacks',\n logout: 'logout',\n 'show-cancel': 'showCancel',\n 'show-incentive': 'showIncentive',\n 'incentive-amount': 'incentiveAmount',\n cause: 'cause'\n }\n }]\n});\n\nangular.value(\"$AddCardPageRoute\", $AddCardPageRoute);\n_squid.$ComponentRoute;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./pages/xo-add-card/route.js\n// module id = ./pages/xo-add-card/route.js\n// module chunks = 0","module.exports = \"
      \\n \\n\\n

      {{ content('checkoutIncentive.termsHeader') }}

      \\n
      {{ content('checkoutIncentive.termsH1') }}
      \\n

      {{ content('checkoutIncentive.termsP1') }}

      \\n
      {{ content('checkoutIncentive.termsH2') }}
      \\n

      {{ content('checkoutIncentive.termsP2') }}

      \\n
      {{ content('checkoutIncentive.termsH3') }}
      \\n

      \\n
      {{ content('checkoutIncentive.termsH4') }}
      \\n

      {{ content('checkoutIncentive.termsP4') }}

      \\n
      {{ content('checkoutIncentive.termsH5') }}
      \\n

      {{ content('checkoutIncentive.termsP5') }}

      \\n
      {{ content('checkoutIncentive.termsH6') }}
      \\n

      {{ content('checkoutIncentive.termsP6') }}

      \\n\\n
      \\n \\n\\n
      \\n
      \\n \\n \\n
      \\n

      \\n {{ content('creditcard.hi', {userName: auth.first_name ? auth.first_name : auth.email}) }}\\n \\n \\n \\n

      \\n
      \\n
      \\n
      \\n

      \\n {{ content('checkoutIncentive.header', {incentiveAmount: incentiveAmount}) }}\\n
      \\n {{ content('checkoutIncentive.body') }}\\n

      \\n \\n {{ content('offers.seeTermsText') }}\\n \\n
      \\n
      \\n
      \\n\\n

      \\n {{ content('creditcard.hi', {userName: auth.first_name ? auth.first_name : auth.email}) }}\\n \\n \\n \\n

      \\n \\n
      \\n\\n
      \\n \\n
      \\n\\n
      \\n \\n
      \\n
      \\n
      \\n
      \\n \\n
      \\n \\n
      \\n
      \\n
      \\n
      \\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./pages/xo-add-card/template.html\n// module id = ./pages/xo-add-card/template.html\n// module chunks = 0"],"sourceRoot":""}