!function(e){var t;"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):((t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).braintree||(t.braintree={})).threeDSecure=e()}(function(){return function n(i,o,s){function a(t,e){if(!o[t]){if(!i[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(c)return c(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},i[t][0].call(r.exports,function(e){return a(i[t][1][e]||e)},r,r.exports,n,i,o,s)}return o[t].exports}for(var c="function"==typeof require&&require,e=0;e>2&15,i=(3&i)<<6|63&s.indexOf(e.charAt(o++)),a+=String.fromCharCode((63&r)<<2|n>>4&3)+(t?String.fromCharCode(t):"")+(i?String.fromCharCode(i):""),o×
',r||(t.querySelector("[data-braintree-v1-fallback-close-button]").style.display="none"),t.querySelector("[data-braintree-v1-fallback-iframe-container]").appendChild(e),t},t.exports=i},{"./songbird":58}],55:[function(e,t,r){"use strict";var n=e("./legacy"),i=e("./cardinal-modal"),o=e("./bootstrap3-modal"),e=e("./inline-iframe");t.exports={legacy:n,"cardinal-modal":i,"bootstrap3-modal":o,"inline-iframe":e}},{"./bootstrap3-modal":53,"./cardinal-modal":54,"./inline-iframe":56,"./legacy":57}],56:[function(e,t,r){"use strict";var n=e("./songbird"),o=e("../../../lib/braintree-error"),s=e("../../shared/errors"),e=e("../../../lib/enumerate");function a(e){n.call(this,e)}a.prototype=Object.create(n.prototype,{constructor:n}),a.events=e(["AUTHENTICATION_IFRAME_AVAILABLE"],"inline-iframe-framework:"),a.prototype.setUpEventListeners=function(r){n.prototype.setUpEventListeners.call(this,r),this.on(a.events.AUTHENTICATION_IFRAME_AVAILABLE,function(e,t){r("authentication-iframe-available",e,t)})},a.prototype._createCardinalConfigurationOptions=function(e){e=n.prototype._createCardinalConfigurationOptions.call(this,e);return e.payment.framework="inline",e},a.prototype._addV1IframeToPage=function(){this._emit(a.events.AUTHENTICATION_IFRAME_AVAILABLE,{element:this._v1Modal},function(){})},a.prototype._setupFrameworkSpecificListeners=function(){this.setCardinalListener("ui.inline.setup",this._onInlineSetup.bind(this))},a.prototype._onInlineSetup=function(e,t,r,n){var i;(i=!e||!t||"CCA"!==t.paymentType||"suppress"!==t.data.mode&&"static"!==t.data.mode||i)?n(new o(s.THREEDS_INLINE_IFRAME_DETAILS_INCORRECT)):((n=document.createElement("div")).innerHTML=e,"suppress"===t.data.mode?(n.style.display="none",document.body.appendChild(n),r()):"static"===t.data.mode&&this._emit(a.events.AUTHENTICATION_IFRAME_AVAILABLE,{element:n},function(){r()}))},t.exports=a},{"../../../lib/braintree-error":35,"../../../lib/enumerate":43,"../../shared/errors":62,"./songbird":58}],57:[function(e,t,r){"use strict";var n=e("./base"),i=e("../../../lib/deferred");function o(e){n.call(this,e)}(o.prototype=Object.create(n.prototype,{constructor:o})).setUpEventListeners=function(){},o.prototype.transformV1CustomerBillingAddress=function(e){return e.billingAddress.line1=e.billingAddress.streetAddress,e.billingAddress.line2=e.billingAddress.extendedAddress,e.billingAddress.city=e.billingAddress.locality,e.billingAddress.state=e.billingAddress.region,e.billingAddress.countryCode=e.billingAddress.countryCodeAlpha2,delete e.billingAddress.streetAddress,delete e.billingAddress.extendedAddress,delete e.billingAddress.locality,delete e.billingAddress.region,delete e.billingAddress.countryCodeAlpha2,e},o.prototype._createIframe=function(t){var r=this;return this._setupV1Elements({lookupResponse:t.lookupResponse,showLoader:t.showLoader,handleAuthResponse:function(e){r._handleAuthResponse(e,t)}}),this._v1Iframe},o.prototype._handleAuthResponse=function(e,t){this._v1Bus.teardown(),t.removeFrame(),i(function(){this._handleV1AuthResponse(e)}.bind(this))()},o.prototype._checkForFrameworkSpecificVerifyCardErrors=function(e){var t;return"function"!=typeof e.addFrame?t="an addFrame function":"function"!=typeof e.removeFrame&&(t="a removeFrame function"),t},o.prototype._formatVerifyCardOptions=function(e){var t=n.prototype._formatVerifyCardOptions.call(this,e);return t.addFrame=i(e.addFrame),t.removeFrame=i(e.removeFrame),t.showLoader=!1!==e.showLoader,t},o.prototype._formatLookupData=function(t){var r=this;return n.prototype._formatLookupData.call(this,t).then(function(e){return t.customer&&t.customer.billingAddress&&(e.customer=r.transformV1CustomerBillingAddress(t.customer)),e})},o.prototype._presentChallenge=function(e,t){t.addFrame(null,this._createIframe({showLoader:t.showLoader,lookupResponse:e.lookup,removeFrame:t.removeFrame}))},t.exports=o},{"../../../lib/deferred":42,"./base":52}],58:[function(e,t,r){"use strict";var n=e("./base"),i=e("../../../lib/assign").assign,o=e("../../../lib/deferred"),s=e("../../../lib/braintree-error"),a=e("../../../lib/convert-to-braintree-error"),c=e("../../../lib/analytics"),u=e("../../../lib/assets"),l=e("../../shared/errors"),d=e("../../../lib/enumerate"),p=e("../../shared/constants"),f=e("../../../lib/promise"),h=e("@braintree/extended-promise"),_=e("../../../lib/constants").INTEGRATION_TIMEOUT_MS,m=e("../../../lib/constants").PLATFORM,E=["ui.close","ui.render","ui.renderHidden","ui.loading.close","ui.loading.render"];function y(e){n.call(this,e),this._useV1Fallback=!1,this._clientMetadata={requestedThreeDSecureVersion:"2",sdkVersion:m+"/3.76.4"},this._getDfReferenceIdPromisePlus=new h,this.setupSongbird(e),this._cardinalEvents=[]}function v(e,t,r){t[r+"Line1"]=e.streetAddress,t[r+"Line2"]=e.extendedAddress,t[r+"Line3"]=e.line3,t[r+"City"]=e.locality,t[r+"State"]=e.region,t[r+"PostalCode"]=e.postalCode,t[r+"CountryCode"]=e.countryCodeAlpha2}y.prototype=Object.create(n.prototype,{constructor:y}),y.events=d(["LOOKUP_COMPLETE","CUSTOMER_CANCELED","UI.CLOSE","UI.RENDER","UI.RENDERHIDDEN","UI.LOADING.CLOSE","UI.LOADING.RENDER"],"songbird-framework:"),y.prototype.setUpEventListeners=function(r){this.on(y.events.LOOKUP_COMPLETE,function(e,t){r("lookup-complete",e,t)}),this.on(y.events.CUSTOMER_CANCELED,function(){r("customer-canceled")}),this.on(y.events["UI.CLOSE"],function(){r("authentication-modal-close")}),this.on(y.events["UI.RENDER"],function(){r("authentication-modal-render")}),this.on(y.events["UI.RENDERHIDDEN"],function(){r("authentication-modal-render-hidden")}),this.on(y.events["UI.LOADING.CLOSE"],function(){r("authentication-modal-loader-close")}),this.on(y.events["UI.LOADING.RENDER"],function(){r("authentication-modal-loader-render")})},y.prototype.prepareLookup=function(e){var t=i({},e),r=this;return this.getDfReferenceId().then(function(e){t.dfReferenceId=e}).then(function(){return r._triggerCardinalBinProcess(e.bin)}).catch(function(){}).then(function(){return r._waitForClient()}).then(function(){return t.clientMetadata=r._clientMetadata,t.authorizationFingerprint=r._client.getConfiguration().authorizationFingerprint,t.braintreeLibraryVersion="braintree/web/3.76.4",t})},y.prototype.initializeChallengeWithLookupResponse=function(e,t){return this.setupSongbird().then(function(){return n.prototype.initializeChallengeWithLookupResponse.call(this,e,t)}.bind(this))},y.prototype._initiateV1Fallback=function(e){this._useV1Fallback=!0,c.sendEvent(this._createPromise,"three-d-secure.v1-fallback."+e),this._songbirdPromise.resolve()},y.prototype._triggerCardinalBinProcess=function(e){var t=this,r=Date.now();return e?window.Cardinal.trigger("bin.process",e).then(function(e){t._clientMetadata.issuerDeviceDataCollectionTimeElapsed=Date.now()-r,t._clientMetadata.issuerDeviceDataCollectionResult=e&&e.Status}):f.resolve()},y.prototype.transformBillingAddress=function(e,t){return t&&(v(t,e,"billing"),e.billingPhoneNumber=t.phoneNumber,e.billingGivenName=t.givenName,e.billingSurname=t.surname),e},y.prototype.transformShippingAddress=function(e){var t=e.shippingAddress;return t&&(v(t,e,"shipping"),delete e.shippingAddress),e},y.prototype._createV1IframeModalElement=function(e){var t=document.createElement("div");return t.innerHTML='
',t.querySelector('[data-braintree-v1-fallback-iframe-container="true"]').appendChild(e),t},y.prototype._createV1IframeModal=function(e){var t=this._createV1IframeModalElement(e),r=t.querySelector("[data-braintree-v1-fallback-close-button]"),e=t.querySelector("[data-braintree-v1-fallback-backdrop]"),n=this;function i(){t.parentNode.removeChild(t),n.cancelVerifyCard(l.THREEDS_CARDINAL_SDK_CANCELED),document.removeEventListener("keyup",n._onV1Keyup),n._onV1Keyup=null}return this._onV1Keyup=function(e){"Escape"===e.key&&t.parentNode&&i()},r&&r.addEventListener("click",i),e&&e.addEventListener("click",i),document.addEventListener("keyup",this._onV1Keyup),t},y.prototype._addV1IframeToPage=function(){document.body.appendChild(this._v1Modal)},y.prototype._handleAuthResponseFromV1Fallback=function(e){this._teardownV1Elements(),this._v1Modal.parentNode.removeChild(this._v1Modal),this._handleV1AuthResponse(e)},y.prototype._presentChallengeWithV1Fallback=function(e){var t=this;this._setupV1Elements({lookupResponse:e,showLoader:!0,handleAuthResponse:function(e){t._handleAuthResponseFromV1Fallback(e)}}),this._v1Modal=this._createV1IframeModal(this._v1Iframe),this._addV1IframeToPage()},y.prototype.setupSongbird=function(e){var t=this,r=Date.now();return this._songbirdPromise||(e=e||{},this._songbirdPromise=new h,this._v2SetupFailureReason="reason-unknown",t._loadCardinalScript(e).then(function(){return window.Cardinal?t._configureCardinalSdk({setupOptions:e,setupStartTime:r}):(t._v2SetupFailureReason="cardinal-global-unavailable",f.reject(new s(l.THREEDS_CARDINAL_SDK_SETUP_FAILED)))}).catch(function(e){e=a(e,{type:l.THREEDS_CARDINAL_SDK_SETUP_FAILED.type,code:l.THREEDS_CARDINAL_SDK_SETUP_FAILED.code,message:l.THREEDS_CARDINAL_SDK_SETUP_FAILED.message});t._getDfReferenceIdPromisePlus.reject(e),window.clearTimeout(t._songbirdSetupTimeoutReference),c.sendEvent(t._client,"three-d-secure.cardinal-sdk.init.setup-failed"),t._initiateV1Fallback("cardinal-sdk-setup-failed."+t._v2SetupFailureReason)}),this._songbirdPromise)},y.prototype._configureCardinalSdk=function(n){var i=this;return this._waitForClient().then(function(){var e=i._client.getConfiguration().gatewayConfiguration.threeDSecure;return e.hasOwnProperty("versionTwo")&&"cardinal"!==e.versionTwo?f.reject(new Error("cardinal-api-not-available-or-configured")):e}).then(function(e){var t=e.cardinalAuthenticationJWT,r=n.setupOptions,e=n.setupStartTime,r=i._createCardinalConfigurationOptions(r);E.forEach(function(e){i.setCardinalListener(e,function(){i._emit(y.events[e.toUpperCase()])})}),i.setCardinalListener("payments.setupComplete",i._createPaymentsSetupCompleteCallback()),i._setupFrameworkSpecificListeners(),window.Cardinal.configure(r),window.Cardinal.setup("init",{jwt:t}),i._clientMetadata.cardinalDeviceDataCollectionTimeElapsed=Date.now()-e,i.setCardinalListener("payments.validated",i._createPaymentsValidatedCallback())}).catch(function(e){return"cardinal-api-not-available-or-configured"===e.message?i._v2SetupFailureReason="cardinal-api-not-available-or-configured":i._v2SetupFailureReason="cardinal-configuration-threw-error",f.reject(e)})},y.prototype.setCardinalListener=function(e,t){this._cardinalEvents.push(e),window.Cardinal.on(e,t)},y.prototype._setupFrameworkSpecificListeners=function(){},y.prototype._createCardinalConfigurationOptions=function(e){var t=e.cardinalSDKConfig||{},r=t.payment||{};return!t.logging&&e.loggingEnabled&&(t.logging={level:"verbose"}),t.payment={},r.hasOwnProperty("displayLoading")&&(t.payment.displayLoading=r.displayLoading),r.hasOwnProperty("displayExitButton")&&(t.payment.displayExitButton=r.displayExitButton),t},y.prototype._loadCardinalScript=function(t){var r=this,n=p.CARDINAL_SCRIPT_SOURCE.sandbox;return this._waitForClient().then(function(){var e="production"===r._client.getConfiguration().gatewayConfiguration.environment;return r._songbirdSetupTimeoutReference=window.setTimeout(function(){c.sendEvent(r._client,"three-d-secure.cardinal-sdk.init.setup-timeout"),r._initiateV1Fallback("cardinal-sdk-setup-timeout")},t.timeout||_),e&&(n=p.CARDINAL_SCRIPT_SOURCE.production),u.loadScript({src:n})}).catch(function(e){return r._v2SetupFailureReason="songbird-js-failed-to-load",f.reject(a(e,l.THREEDS_CARDINAL_SDK_SCRIPT_LOAD_FAILED))})},y.prototype._createPaymentsSetupCompleteCallback=function(){var t=this;return function(e){t._getDfReferenceIdPromisePlus.resolve(e.sessionId),window.clearTimeout(t._songbirdSetupTimeoutReference),c.sendEvent(t._createPromise,"three-d-secure.cardinal-sdk.init.setup-completed"),t._songbirdPromise.resolve()}},y.prototype.getDfReferenceId=function(){return this._getDfReferenceIdPromisePlus},y.prototype._performJWTValidation=function(r,e){var n=this,t=this._lookupPaymentMethod.nonce,i="payment_methods/"+t+"/three_d_secure/authenticate_from_jwt",o=r&&r.Payment&&r.Payment.ExtendedData&&r.Payment.ExtendedData.ChallengeCancel;return o&&(c.sendEvent(this._createPromise,"three-d-secure.verification-flow.cardinal-sdk.cancel-code."+o),"01"===o&&this._emit(y.events.CUSTOMER_CANCELED)),c.sendEvent(this._createPromise,"three-d-secure.verification-flow.upgrade-payment-method.started"),this._waitForClient().then(function(){return n._client.request({method:"post",endpoint:i,data:{jwt:e,paymentMethodNonce:t}})}).then(function(e){var t=e.paymentMethod||n._lookupPaymentMethod,e=n._formatAuthResponse(t,e.threeDSecureInfo);return e.rawCardinalSDKVerificationData=r,c.sendEvent(n._client,"three-d-secure.verification-flow.upgrade-payment-method.succeeded"),f.resolve(e)}).catch(function(e){e=new s({type:l.THREEDS_JWT_AUTHENTICATION_FAILED.type,code:l.THREEDS_JWT_AUTHENTICATION_FAILED.code,message:l.THREEDS_JWT_AUTHENTICATION_FAILED.message,details:{originalError:e}});return c.sendEvent(n._client,"three-d-secure.verification-flow.upgrade-payment-method.errored"),f.reject(e)})},y.prototype._createPaymentsValidatedCallback=function(){var n=this;return function(e,t){var r;if(c.sendEvent(n._createPromise,"three-d-secure.verification-flow.cardinal-sdk.action-code."+e.ActionCode.toLowerCase()),n._verifyCardPromisePlus)switch(e.ActionCode){case"SUCCESS":case"NOACTION":case"FAILURE":n._performJWTValidation(e,t).then(function(e){n._verifyCardPromisePlus.resolve(e)}).catch(function(e){n._verifyCardPromisePlus.reject(e)});break;case"ERROR":switch(c.sendEvent(n._createPromise,"three-d-secure.verification-flow.cardinal-sdk-error."+e.ErrorNumber),e.ErrorNumber){case 10001:case 10002:r=new s(l.THREEDS_CARDINAL_SDK_SETUP_TIMEDOUT);break;case 10003:case 10007:case 10009:r=new s(l.THREEDS_CARDINAL_SDK_RESPONSE_TIMEDOUT);break;case 10005:case 10006:r=new s(l.THREEDS_CARDINAL_SDK_BAD_CONFIG);break;case 10008:case 10010:r=new s(l.THREEDS_CARDINAL_SDK_BAD_JWT);break;case 10011:c.sendEvent(n._createPromise,"three-d-secure.verification-flow.canceled"),r=new s(l.THREEDS_CARDINAL_SDK_CANCELED);break;default:r=new s(l.THREEDS_CARDINAL_SDK_ERROR)}r.details={originalError:{code:e.ErrorNumber,description:e.ErrorDescription}},n._verifyCardPromisePlus.reject(r)}else n._initiateV1Fallback("cardinal-sdk-setup-error.number-"+e.ErrorNumber)}},y.prototype._checkForVerifyCardError=function(e,t){return n.prototype._checkForVerifyCardError.call(this,e,t)},y.prototype._checkForFrameworkSpecificVerifyCardErrors=function(e,t){var r;return r="function"!=typeof e.onLookupComplete&&!t.ignoreOnLookupCompleteRequirement?"an onLookupComplete function":r},y.prototype._formatVerifyCardOptions=function(e){var t=n.prototype._formatVerifyCardOptions.call(this,e),r=t.additionalInformation||{},r=this.transformBillingAddress(r,e.billingAddress);return r=this.transformShippingAddress(r),e.onLookupComplete&&(t.onLookupComplete=o(e.onLookupComplete)),e.email&&(r.email=e.email),e.mobilePhoneNumber&&(r.mobilePhoneNumber=e.mobilePhoneNumber),t.additionalInformation=r,t},y.prototype._onLookupComplete=function(e,i){var o=this;return n.prototype._onLookupComplete.call(this,e).then(function(n){return new f(function(e,t){function r(){e(n)}n.requiresUserAuthentication=Boolean(n.lookup&&n.lookup.acsUrl),o._verifyCardPromisePlus.catch(t),i.onLookupComplete?i.onLookupComplete(n,r):o._emit(y.events.LOOKUP_COMPLETE,n,r)})})},y.prototype._presentChallenge=function(e){!this._useV1Fallback&&e.lookup.transactionId?window.Cardinal.continue("cca",{AcsUrl:e.lookup.acsUrl,Payload:e.lookup.pareq},{OrderDetails:{TransactionId:e.lookup.transactionId}}):this._presentChallengeWithV1Fallback(e.lookup)},y.prototype._formatLookupData=function(t){var r=this;return n.prototype._formatLookupData.call(this,t).then(function(e){return e.additionalInfo=t.additionalInformation,t.accountType&&(e.accountType=t.accountType),t.challengeRequested&&(e.challengeRequested=t.challengeRequested),t.dataOnlyRequested&&(e.dataOnlyRequested=t.dataOnlyRequested),t.exemptionRequested&&(e.exemptionRequested=t.exemptionRequested),t.bin&&(e.bin=t.bin),r.prepareLookup(e)})},y.prototype.cancelVerifyCard=function(t){var r=this;return n.prototype.cancelVerifyCard.call(this).then(function(e){return r._verifyCardPromisePlus&&(t=t||new s(l.THREEDS_VERIFY_CARD_CANCELED_BY_MERCHANT),r._verifyCardPromisePlus.reject(t)),e})},y.prototype.teardown=function(){return window.Cardinal&&this._cardinalEvents.forEach(function(e){window.Cardinal.off(e)}),n.prototype.teardown.call(this)},t.exports=y},{"../../../lib/analytics":31,"../../../lib/assets":32,"../../../lib/assign":33,"../../../lib/braintree-error":35,"../../../lib/constants":36,"../../../lib/convert-to-braintree-error":38,"../../../lib/deferred":42,"../../../lib/enumerate":43,"../../../lib/promise":49,"../../shared/constants":61,"../../shared/errors":62,"./base":52,"@braintree/extended-promise":5}],59:[function(e,t,r){"use strict";var n=e("@braintree/wrap-promise"),i=e("../../lib/methods"),o=e("../../lib/convert-methods-to-error"),s=e("@braintree/event-emitter"),a=e("./frameworks");function c(e){var t=this,r=a[e.framework];s.call(this),this._framework=new r(e),this._framework.setUpEventListeners(function(){t._emit.apply(t,arguments)})}s.createChild(c),c.prototype.verifyCard=function(e){var t;return this.hasListener("lookup-complete")&&(t={ignoreOnLookupCompleteRequirement:!0}),this._framework.verifyCard(e,t)},c.prototype.initializeChallengeWithLookupResponse=function(e){return"string"==typeof e&&(e=JSON.parse(e)),this._framework.initializeChallengeWithLookupResponse(e)},c.prototype.prepareLookup=function(e){return this._framework.prepareLookup(e).then(function(e){return JSON.stringify(e)})},c.prototype.cancelVerifyCard=function(){return this._framework.cancelVerifyCard()},c.prototype.teardown=function(){var e=i(c.prototype).concat(i(s.prototype));return o(this,e),this._framework.teardown()},t.exports=n.wrapPrototype(c)},{"../../lib/convert-methods-to-error":37,"../../lib/methods":48,"./frameworks":55,"@braintree/event-emitter":4,"@braintree/wrap-promise":14}],60:[function(e,t,r){"use strict";var s=e("./external/three-d-secure"),a=e("../lib/is-https").isHTTPS,i=e("../lib/basic-component-verification"),c=e("../lib/create-deferred-client"),u=e("../lib/create-assets-url"),l=e("../lib/braintree-error"),d=e("../lib/analytics"),p=e("./shared/errors"),f=e("../lib/promise"),e=e("@braintree/wrap-promise");t.exports={create:e(function(o){var n="3D Secure";return i.verify({name:n,client:o.client,authorization:o.authorization}).then(function(){var e=u.create(o.authorization),i=function(e){var t=String(e.version||"");if(!t||"1"===t)return"legacy";switch(t){case"2":case"2-cardinal-modal":return"cardinal-modal";case"2-bootstrap3-modal":return"bootstrap3-modal";case"2-inline-iframe":return"inline-iframe";default:throw new l({code:p.THREEDS_UNRECOGNIZED_VERSION.code,type:p.THREEDS_UNRECOGNIZED_VERSION.type,message:"Version `"+e.version+"` is not a recognized version. You may need to update the version of your Braintree SDK to support this version."})}}(o),t=c.create({authorization:o.authorization,client:o.client,debug:o.debug,assetsUrl:e,name:n}).then(function(e){var t,r=e.getConfiguration(),n=r.gatewayConfiguration;return o.client=e,n.threeDSecureEnabled||(t=p.THREEDS_NOT_ENABLED),"TOKENIZATION_KEY"===r.authorizationType&&(t=p.THREEDS_CAN_NOT_USE_TOKENIZATION_KEY),"production"===n.environment&&!a()&&(t=p.THREEDS_HTTPS_REQUIRED),"legacy"===i||n.threeDSecure&&n.threeDSecure.cardinalAuthenticationJWT||(d.sendEvent(o.client,"three-d-secure.initialization.failed.missing-cardinalAuthenticationJWT"),t=p.THREEDS_NOT_ENABLED_FOR_V2),t?f.reject(new l(t)):(d.sendEvent(o.client,"three-d-secure.initialized"),e)}),r=new s({client:o.client,assetsUrl:e,createPromise:t,loggingEnabled:o.loggingEnabled,cardinalSDKConfig:o.cardinalSDKConfig,framework:i});return o.client?t.then(function(){return r}):r})}),VERSION:"3.76.4"}},{"../lib/analytics":31,"../lib/basic-component-verification":34,"../lib/braintree-error":35,"../lib/create-assets-url":39,"../lib/create-deferred-client":41,"../lib/is-https":45,"../lib/promise":49,"./external/three-d-secure":59,"./shared/errors":62,"@braintree/wrap-promise":14}],61:[function(e,t,r){"use strict";t.exports={LANDING_FRAME_NAME:"braintreethreedsecurelanding",CARDINAL_SCRIPT_SOURCE:{production:"https://songbird.cardinalcommerce.com/edge/v1/songbird.js",sandbox:"https://songbirdstag.cardinalcommerce.com/edge/v1/songbird.js"}}},{}],62:[function(e,t,r){"use strict";e=e("../../lib/braintree-error");t.exports={THREEDS_NOT_ENABLED:{type:e.types.MERCHANT,code:"THREEDS_NOT_ENABLED",message:"3D Secure is not enabled for this merchant."},THREEDS_CAN_NOT_USE_TOKENIZATION_KEY:{type:e.types.MERCHANT,code:"THREEDS_CAN_NOT_USE_TOKENIZATION_KEY",message:"3D Secure can not use a tokenization key for authorization."},THREEDS_HTTPS_REQUIRED:{type:e.types.MERCHANT,code:"THREEDS_HTTPS_REQUIRED",message:"3D Secure requires HTTPS."},THREEDS_NOT_ENABLED_FOR_V2:{type:e.types.MERCHANT,code:"THREEDS_NOT_ENABLED_FOR_V2",message:"3D Secure version 2 is not enabled for this merchant. Contact Braintree Support for assistance at https://help.braintreepayments.com/"},THREEDS_UNRECOGNIZED_VERSION:{type:e.types.MERCHANT,code:"THREEDS_UNRECOGNIZED_VERSION"},THREEDS_CARDINAL_SDK_SETUP_FAILED:{type:e.types.UNKNOWN,code:"THREEDS_CARDINAL_SDK_SETUP_FAILED",message:"Something went wrong setting up Cardinal's Songbird.js library."},THREEDS_CARDINAL_SDK_SCRIPT_LOAD_FAILED:{type:e.types.NETWORK,code:"THREEDS_CARDINAL_SDK_SCRIPT_LOAD_FAILED",message:"Cardinal's Songbird.js library could not be loaded."},THREEDS_CARDINAL_SDK_SETUP_TIMEDOUT:{type:e.types.UNKNOWN,code:"THREEDS_CARDINAL_SDK_SETUP_TIMEDOUT",message:"Cardinal's Songbird.js took too long to setup."},THREEDS_CARDINAL_SDK_RESPONSE_TIMEDOUT:{type:e.types.UNKNOWN,code:"THREEDS_CARDINAL_SDK_RESPONSE_TIMEDOUT",message:"Cardinal's API took too long to respond."},THREEDS_CARDINAL_SDK_BAD_CONFIG:{type:e.types.MERCHANT,code:"THREEDS_CARDINAL_SDK_BAD_CONFIG",message:"JWT or other required field missing. Please check your setup configuration."},THREEDS_CARDINAL_SDK_BAD_JWT:{type:e.types.MERCHANT,code:"THREEDS_CARDINAL_SDK_BAD_JWT",message:"Cardinal JWT missing or malformed. Please check your setup configuration."},THREEDS_CARDINAL_SDK_ERROR:{type:e.types.UNKNOWN,code:"THREEDS_CARDINAL_SDK_ERROR",message:"A general error has occurred with Cardinal. See description for more information."},THREEDS_CARDINAL_SDK_CANCELED:{type:e.types.CUSTOMER,code:"THREEDS_CARDINAL_SDK_CANCELED",message:"Canceled by user."},THREEDS_VERIFY_CARD_CANCELED_BY_MERCHANT:{type:e.types.MERCHANT,code:"THREEDS_VERIFY_CARD_CANCELED_BY_MERCHANT",message:"3D Secure verfication canceled by merchant."},THREEDS_AUTHENTICATION_IN_PROGRESS:{type:e.types.MERCHANT,code:"THREEDS_AUTHENTICATION_IN_PROGRESS",message:"Cannot call verifyCard while existing authentication is in progress."},THREEDS_MISSING_VERIFY_CARD_OPTION:{type:e.types.MERCHANT,code:"THREEDS_MISSING_VERIFY_CARD_OPTION"},THREEDS_JWT_AUTHENTICATION_FAILED:{type:e.types.UNKNOWN,code:"THREEDS_JWT_AUTHENTICATION_FAILED",message:"Something went wrong authenticating the JWT from Cardinal"},THREEDS_LOOKUP_TOKENIZED_CARD_NOT_FOUND_ERROR:{type:e.types.MERCHANT,code:"THREEDS_LOOKUP_TOKENIZED_CARD_NOT_FOUND_ERROR",message:"Either the payment method nonce passed to `verifyCard` does not exist, or it was already consumed"},THREEDS_LOOKUP_VALIDATION_ERROR:{type:e.types.CUSTOMER,code:"THREEDS_LOOKUP_VALIDATION_ERROR",message:"The data passed in `verifyCard` did not pass validation checks. See details for more info"},THREEDS_LOOKUP_ERROR:{type:e.types.UNKNOWN,code:"THREEDS_LOOKUP_ERROR",message:"Something went wrong during the 3D Secure lookup"},THREEDS_INLINE_IFRAME_DETAILS_INCORRECT:{type:e.types.UNKNOWN,code:"THREEDS_INLINE_IFRAME_DETAILS_INCORRECT",message:"Something went wrong when attempting to add the authentication iframe to the page."},THREEDS_NO_VERIFICATION_PAYLOAD:{type:e.types.MERCHANT,code:"THREEDS_NO_VERIFICATION_PAYLOAD",message:"No verification payload available."},THREEDS_TERM_URL_REQUIRES_BRAINTREE_DOMAIN:{type:e.types.INTERNAL,code:"THREEDS_TERM_URL_REQUIRES_BRAINTREE_DOMAIN",message:"Term Url must be on a Braintree domain."},THREEDS_FRAMEWORK_METHOD_NOT_IMPLEMENTED:{type:e.types.INTERNAL,code:"THREEDS_FRAMEWORK_METHOD_NOT_IMPLEMENTED",message:"Method not implemented for this framework."}}},{"../../lib/braintree-error":35}],63:[function(e,t,r){"use strict";e=e("../../lib/enumerate");t.exports=e(["AUTHENTICATION_COMPLETE"],"threedsecure:")},{"../../lib/enumerate":43}]},{},[60])(60)});