1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1211],{71211:(e,a,t)=>{t.r(a),t.d(a,{UpsellWalletPay:()=>o,default:()=>u});var n=t(95155),s=t(12115),r=t(31541),l=t(84864),i=t(44522);let o=({user:e,upsellData:a,ipData:t,sendTrackingDataAfterPurchase:o,onHideCta:u,onShowCta:c,onWalletPayReady:d,onPaymentSuccess:p})=>{let[y,m]=(0,s.useState)(!1),[b,P]=(0,s.useState)(null),[f,S]=(0,s.useState)(""),g=(0,s.useCallback)(()=>m(!0),[]),h=(0,s.useCallback)(()=>{c()},[c]);if((0,i.Q)({user:e,disableLoad:!1,onScriptsLoaded:g,onScriptsError:h}),!y)return null;let k="paypal"===a.provider?a.paymentSource?.stripe?"stripe":"safecharge":a.provider;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A,{auth:e.auth,user:e,planId:[a.planId],period:a.period,discount:a.discount||"",provider:k,billingAddress:{email:e.email,country:t?.country||"US"},totalPrice:a.price,currency:a.currency,containerId:"upsell-wallet-pay-button",setDisabledButton:()=>{},setDisabledPlanOptions:()=>{},traffic:0,onReady:()=>{u(),d&&d()},onNotAvailable:()=>{c()},onPaymentProcessing:()=>{P("loading")},onPaymentCancel:()=>{P(null)},afterPaymentActions:(e,a)=>{o(e?.transactionid||e?.transactionID||"",e?.metapixeleventid||""),P("success"),a&&a()},onPaymentErrorMessageChange:e=>{e&&(S(e),P("error"))}}),null!==b&&(0,n.jsx)(l.default,{user:e,upsellData:a,ipData:t,skipAutoPayment:!0,initialState:b,externalErrorMessage:f,closeInstance:()=>{"success"===b&&p(),P(null),S("")},onPaymentSuccess:()=>{p()}})]})},u=o}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.