import { loadScript , initStripe , LoadStripe } from './shared' ; const stripePromise = Promise . resolve ( ) . then ( ( ) => loadScript ( null ) ) ; let loadCalled = false ; stripePromise . catch ( ( err ) => { if ( ! loadCalled ) { console . warn ( err ) ; } } ) ; export const loadStripe = ( ... args ) => { loadCalled = true ; const startTime = Date . now ( ) ; return stripePromise . then ( ( maybeStripe ) => initStripe ( maybeStripe , args , startTime ) ) ; } ;