1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="87260180-cf57-4dc1-9082-d687c800f874",e._sentryDebugIdIdentifier="sentry-dbid-87260180-cf57-4dc1-9082-d687c800f874")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8732],{79794:function(e){var t;t=function(){var e;return(function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){if(o)return o(s,!0);var c=Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){return r(t[s][1][e]||e)},u,u.exports,e,t,n,i)}return n[s].exports}for(var o=void 0,s=0;s<i.length;s++)r(i[s]);return r})({1:[function(e,t,n){"use strict";var i={};function r(e,t,n){var i=Error("".concat(e," ").concat("abort"===t?"has aborted.":"failed to load."));return i.src=e,i.failureKind=t,i.timing=performance.now()-n,i.onLine=navigator.onLine,i}function o(e){var t,n=JSON.stringify(e);if(!e.forceScriptReload&&(t=i[n]))return t;var o=document.createElement("script"),s=e.dataAttributes||{},a=e.container||document.head;return o.src=e.src,o.id=e.id||"",o.async=!0,e.type&&o.setAttribute("type","".concat(e.type)),e.crossorigin&&o.setAttribute("crossorigin","".concat(e.crossorigin)),e.integrity&&o.setAttribute("integrity","".concat(e.integrity)),Object.keys(s).forEach(function(e){o.setAttribute("data-".concat(e),"".concat(s[e]))}),t=new Promise(function(t,n){var i=performance.now();o.addEventListener("load",function(){t(o)}),o.addEventListener("error",function(){n(r(e.src,"error",i))}),o.addEventListener("abort",function(){n(r(e.src,"abort",i))}),a.appendChild(o)}),i[n]=t,t}o.clearCache=function(){i={}},t.exports=o},{}],2:[function(e,t,n){t.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,t,n){"use strict";t.exports=function(e){return e=e||window.navigator.userAgent,/Android/i.test(e)}},{}],4:[function(e,t,n){"use strict";var i=e("./is-edge"),r=e("./is-samsung"),o=e("./is-duckduckgo"),s=e("./is-opera"),a=e("./is-silk");t.exports=function(e){return(-1!==(e=e||window.navigator.userAgent).indexOf("Chrome")||-1!==e.indexOf("CriOS"))&&!i(e)&&!r(e)&&!o(e)&&!s(e)&&!a(e)}},{"./is-duckduckgo":5,"./is-edge":6,"./is-opera":13,"./is-samsung":14,"./is-silk":15}],5:[function(e,t,n){"use strict";t.exports=function(e){return -1!==(e=e||window.navigator.userAgent).indexOf("DuckDuckGo/")}},{}],6:[function(e,t,n){"use strict";t.exports=function(e){return -1!==(e=e||window.navigator.userAgent).indexOf("Edge/")||-1!==e.indexOf("Edg/")}},{}],7:[function(e,t,n){"use strict";t.exports=function(e){return e=e||window.navigator.userAgent,/FxiOS/i.test(e)}},{}],8:[function(e,t,n){"use strict";var i=e("./is-ios");t.exports=function(e){var t;return i(e=e||window.navigator.userAgent)&&(t=e,/\bGSA\b/.test(t))}},{"./is-ios":11}],9:[function(e,t,n){"use strict";var i=e("./is-ios"),r=e("./is-ios-google-search-app");t.exports=function(e){return!!i(e=e||window.navigator.userAgent)&&(!!r(e)||/.+AppleWebKit(?!.*Safari)/i.test(e))}},{"./is-ios":11,"./is-ios-google-search-app":8}],10:[function(e,t,n){"use strict";var i=e("./is-ios-webview");t.exports=function(e,t){return t=void 0!==t?t:window.statusbar.visible,i(e)&&t}},{"./is-ios-webview":9}],11:[function(e,t,n){"use strict";var i=e("./is-ipados");t.exports=function(e,t,n){void 0===t&&(t=!0),e=e||window.navigator.userAgent;var r=/iPhone|iPod|iPad/i.test(e);return t?r||i(e,n):r}},{"./is-ipados":12}],12:[function(e,t,n){"use strict";t.exports=function(e,t){return e=e||window.navigator.userAgent,t=t||window.document,/Mac|iPad/i.test(e)&&"ontouchend"in t}},{}],13:[function(e,t,n){"use strict";t.exports=function(e){return -1!==(e=e||window.navigator.userAgent).indexOf("OPR/")||-1!==e.indexOf("Opera/")||-1!==e.indexOf("OPT/")}},{}],14:[function(e,t,n){"use strict";t.exports=function(e){return e=e||window.navigator.userAgent,/SamsungBrowser/i.test(e)}},{}],15:[function(e,t,n){"use strict";t.exports=function(e){return -1!==(e=e||window.navigator.userAgent).indexOf("Silk/")}},{}],16:[function(e,t,n){"use strict";var i=e("./is-android"),r=e("./is-ios-firefox"),o=e("./is-ios-webview"),s=e("./is-chrome"),a=e("./is-samsung"),c=e("./is-duckduckgo");function u(e){return(e=e||window.navigator.userAgent).indexOf("Opera Mini")>-1}t.exports=function(e){var t,n,d;return!(o(e=e||window.navigator.userAgent)||r(e)||i(t=(t=e)||window.navigator.userAgent)&&/Version\/[\d.]+/i.test(t)&&!u(t)&&!c(t)||u(e)||(n=(e||window.navigator.userAgent).match(/CriOS\/(\d+)\./))&&48>parseInt(n[1],10)||!s(d=e)&&!a(d)&&/samsung/i.test(d))}},{"./is-android":3,"./is-chrome":4,"./is-duckduckgo":5,"./is-ios-firefox":7,"./is-ios-webview":9,"./is-samsung":14}],17:[function(e,t,n){t.exports=e("./dist/is-ios-wkwebview")},{"./dist/is-ios-wkwebview":10}],18:[function(e,t,n){t.exports=e("./dist/is-ios")},{"./dist/is-ios":11}],19:[function(e,t,n){t.exports=e("./dist/supports-popups")},{"./dist/supports-popups":16}],20:[function(e,t,n){"use strict";var i="undefined"!=typeof Promise?Promise:null,r=function(){function e(t){var n=this;if("function"==typeof t){this._promise=new e.Promise(t);return}this._promise=new e.Promise(function(e,t){n._resolveFunction=e,n._rejectFunction=t}),t=t||{}
1,this._onResolve=t.onResolve||e.defaultOnResolve,this._onReject=t.onReject||e.defaultOnReject,e.shouldCatchExceptions(t)&&this._promise.catch(function(){}),this._resetState()}return e.defaultOnResolve=function(t){return e.Promise.resolve(t)},e.defaultOnReject=function(t){return e.Promise.reject(t)},e.setPromise=function(t){e.Promise=t},e.shouldCatchExceptions=function(t){return t.hasOwnProperty("suppressUnhandledPromiseMessage")?!!t.suppressUnhandledPromiseMessage:!!e.suppressUnhandledPromiseMessage},e.all=function(t){return e.Promise.all(t)},e.allSettled=function(t){return e.Promise.allSettled(t)},e.race=function(t){return e.Promise.race(t)},e.reject=function(t){return e.Promise.reject(t)},e.resolve=function(t){return e.Promise.resolve(t)},e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.resolve=function(t){var n=this;return this.isFulfilled||(this._setResolved(),e.Promise.resolve().then(function(){return n._onResolve(t)}).then(function(e){n._resolveFunction(e)}).catch(function(e){n._resetState(),n.reject(e)})),this},e.prototype.reject=function(t){var n=this;return this.isFulfilled||(this._setRejected(),e.Promise.resolve().then(function(){return n._onReject(t)}).then(function(e){n._setResolved(),n._resolveFunction(e)}).catch(function(e){return n._rejectFunction(e)})),this},e.prototype._resetState=function(){this.isFulfilled=!1,this.isResolved=!1,this.isRejected=!1},e.prototype._setResolved=function(){this.isFulfilled=!0,this.isResolved=!0,this.isRejected=!1},e.prototype._setRejected=function(){this.isFulfilled=!0,this.isResolved=!1,this.isRejected=!0},e.Promise=i,e}();t.exports=r},{}],21:[function(e,t,n){"use strict";var i=e("./lib/set-attributes"),r=e("./lib/default-attributes"),o=e("./lib/assign");t.exports=function(e){void 0===e&&(e={});var t=document.createElement("iframe"),n=(0,o.assign)({},r.defaultAttributes,e);return n.style&&"string"!=typeof n.style&&((0,o.assign)(t.style,n.style),delete n.style),(0,i.setAttributes)(t,n),t.getAttribute("id")||(t.id=t.name),t}},{"./lib/assign":22,"./lib/default-attributes":23,"./lib/set-attributes":24}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assign=void 0,n.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach(function(t){"object"==typeof t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}},{}],23:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.defaultAttributes=void 0,n.defaultAttributes={src:"about:blank",frameBorder:0,allowtransparency:!0,scrolling:"no"}},{}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setAttributes=void 0,n.setAttributes=function(e,t){for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];null==i?e.removeAttribute(n):e.setAttribute(n,i)}}},{}],25:[function(e,t,n){"use strict";t.exports=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)try{return crypto.randomUUID()}catch(e){}if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;for(var t=Array(256),n=0;n<256;n++)t[n]=(n<16?"0":"")+n.toString(16);return t[e[0]]+t[e[1]]+t[e[2]]+t[e[3]]+"-"+t[e[4]]+t[e[5]]+"-"+t[e[6]]+t[e[7]]+"-"+t[e[8]]+t[e[9]]+"-"+t[e[10]]+t[e[11]]+t[e[12]]+t[e[13]]+t[e[14]]+t[e[15]]}throw Error("@braintree/uuid: No secure random source available")}},{}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deferred=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];setTimeout(function(){try{e.apply(void 0,t)}catch(e){console.log("Error in callback function"),console.log(e)}},1)}}},{}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.once=function(e){var t=!1;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];t||(t=!0,e.apply(void 0,n))}}},{}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.promiseOrCallback=function(e,t){if(!t)return e;e.then(function(e){return t(null,e)}).catch(function(e){return t(e)})}},{}],29:[function(e,t,n){"use strict";var i=e("./lib/deferred"),r=e("./lib/once"),o=e("./lib/promise-or-callback");function s(e){return function(){for(var t,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return"function"==typeof n[n.length-1]&&(t=n.pop(),t=r.once(i.deferred(t))),o.promiseOrCallback(e.apply(this,n),t)}}s.wrapPrototype=function(e,t){void 0===t&&(t={});var n=t.ignoreMethods||[],i=!0===t.transformPrivateMethods;return Object.getOwnPropertyNames(e.prototype).filter(function(t){var r,o="constructor"!==t&&"function"==typeof e.prototype[t],s=-1===n.indexOf(t);return r=!!i||"_"!==t.charAt(0),o&&r&&s}
1).forEach(function(t){var n=e.prototype[t];e.prototype[t]=s(n)}),e},t.exports=s},{"./lib/deferred":26,"./lib/once":27,"./lib/promise-or-callback":28}],30:[function(t,n,i){var r,o;r=this,o=function(e){"use strict";function t(e,t,n,i){return new(n||(n=Promise))(function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((i=i.apply(e,t||[])).next())})}function n(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=(r=s.trys).length>0&&r[r.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}var i,r,o={},s={};function a(e){var t,n=JSON.stringify(e);if(!e.forceScriptReload&&(t=s[n]))return t;var i=document.createElement("script"),r=e.dataAttributes||{},o=e.container||document.head;return i.src=e.src,i.id=e.id||"",i.async=!0,e.type&&i.setAttribute("type","".concat(e.type)),e.crossorigin&&i.setAttribute("crossorigin","".concat(e.crossorigin)),Object.keys(r).forEach(function(e){i.setAttribute("data-".concat(e),"".concat(r[e]))}),t=new Promise(function(t,n){i.addEventListener("load",function(){t(i)}),i.addEventListener("error",function(){n(Error("".concat(e.src," failed to load.")))}),i.addEventListener("abort",function(){n(Error("".concat(e.src," has aborted.")))}),o.appendChild(i)}),s[n]=t,t}a.clearCache=function(){s={}},Object.defineProperty(o,"__esModule",{value:!0}),o.loadStylesheet=c=o.loadScript=void 0;var c=o.loadScript=a;o.loadStylesheet=function(e){var t=document.querySelector('link[href="'.concat(e.href,'"]'));if(t)return Promise.resolve(t);t=document.createElement("link");var n=e.container||document.head;return t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",e.href),t.setAttribute("id",e.id),n.firstChild?n.insertBefore(t,n.firstChild):n.appendChild(t),Promise.resolve(t)};var u="fastlane",d="connect-boba",l={AXO_ASSET_NAME:{minified:"axo.min",unminified:"axo"},AXO_ASSET_PATH:d,LOCALE_PATH:"".concat(d,"/locales/"),CDNX_PROD:"https://www.paypalobjects.com"},p={BT:"BT",PPCP:"PPCP"};function f(){return"function"==typeof window.define&&!!window.define.amd}function h(e,i,r){var o,s;return void 0===r&&(r=!0),t(this,void 0,void 0,function(){var t,a;return n(this,function(n){if((t=null==window?void 0:window.braintree)&&t[e.module]){if(!i||(null===(o=t[e.module])||void 0===o?void 0:o.VERSION)===i)return[2,!0];throw a=null===(s=t[e.module])||void 0===s?void 0:s.VERSION,Error("".concat(e.module," already loaded with version ").concat(a," cannot load version ").concat(i))}if(!i)throw Error("Attempted to load ".concat(e.module," without specifying version"));return[2,function(e,t,n){if(void 0===n&&(n=!0),f()){var i=n?e.amdModule.minified:e.amdModule.unminified;return new Promise(function(e,t){window.require([i],e,t)})}var r=n?e.script.minified:e.script.unminified;return c({id:"".concat(e.id,"-").concat(t),src:"https://js.braintreegateway.com/web/".concat(t,"/js/").concat(r)})}(e,i,r)]})})}var _="client",m="hostedFields",y="braintree",A=((i={})[_]="client",i[m]="hosted-fields",i),g=((r={})[_]={id:"client",module:_,amdModule:{unminified:"".concat(y,"/").concat(A[_]),minified:"".concat(y,"/").concat(A[_],".min")},script:{unminified:"".concat(A[_],".js"),minified:"".concat(A[_],".min.js")}},r[m]={id:"hcf",module:m,amdModule:{unminified:"".concat(y,"/").concat(A[m]),minified:"".concat(y,"/").concat(A[m],".min")},script:{unminified:"".concat(A[m],".js"),minified:"".concat(A[m],".min.js")}},r);function v(e,t){var n;if(void 0===t&&(t=!0),f()){f()&&"function"==typeof window.requirejs&&"function"==typeof window.requirejs.config&&requirejs.config({paths:((n={})[u]=e,n)});var i="".concat(u,"/").concat(t?l.AXO_ASSET_NAME.minified:l.AXO_ASSET_NAME.unminified);return new Promise(function(e,t){window.require([i],e,t)})}return c({id:"axo-id",src:e,forceScriptReload:!0})}function P(e){var t=e.assetUrl,n=e.bundleId;return n?"https://cdn-".concat(n,".static.engineering.dev.paypalinc.com/").concat(t):"".concat(l.CDNX_PROD,"/").concat(t)}e.constants=l,e.loadAxo=function(e){return t(this,void 0,void 0,function(){var t,i,r,o;return n(this,function(n){switch(n.label){case 0:var s,a,c;if(performance.mark("pp_axo_sdk_init_invoked"),t=e.btSdkVersion,i=e.minified,a=(null==e?void 0:e.minified)!==!1?l.AXO_ASSET_NAME.minified:l.AXO_ASSET_NAME.unminified,r=P({assetUrl:f()?l.AXO_ASSET_PATH:"".concat(l.AXO_ASSET_PATH,"/").concat(a,".js"),bundleId:null===(s=null==e?void 0:e.metadata)||void 0===s?void 0:s.bundleIdOverride}),o=P({assetUrl:l.LOCALE_PATH,bundleId:null===(c=null==e?void 0:e.metadata)||void 0===c?void 0:c.bundleIdOverride}),e.platform!==p.BT)return[3,2];return[4,Promise.all([h(g.hostedFields,t,i),v(r,i)])];case 1:case 3:return n.sent(),[3,5];case 2:if(e.platform!==p.PPCP)return[3,4];return[4,Promise.all([h(g.client,t,i),h(g.hostedFields,t,i),v(r,i)])];case 4:throw Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:o}}]}})})}},"object"==typeof i&&void 0!==n?o(i):"function"==typeof e&&e.amd?e(["exports"],o):o((r="undefined"!=typeof globalThis?globalThis:r||self).loadAxo={})},{}],31:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Framebus=void 0;var i=e("./lib"),r="undefined"!=typeof window&&window.Promise,o=function(){function e(e){void 0===e&&(e={}),this.origin=e.origin||"*",this.channel=e.channel||"",this.verifyDomain=e.verifyDomain,this.targetFrames=e.targetFrames||[],this.limitBroadcastToFramesArray=!!e.targetFrames,this.isDestroyed=!1,this.listeners=[],this.hasAdditionalChecksForOnListeners=!!(this.verifyDomain||this.limitBroadcastToFramesArray)}return e.setPromise=function(t){e.Promise=t},e.target=function(t){return new e(t)},e.prototype.addTargetFrame=function(e){this.limitBroadcastToFramesArray&&this.targetFrames.push(e)},e.prototype.include=function(e){return null!=e&&null!=e.Window&&e.constructor===e.Window&&(i.childWindows.push(e),!0)},e.prototype.target=function(t){return e.target(t)},e.prototype.emit=function(e,t,n){if(this.isDestroyed)return!1;var r=this.origin;if(e=this.namespaceEvent(e),(0,i.isntString)(e)||(0,i.isntString)(r))return!1;"function"==typeof t&&(n=t,t=void 0);var o=(0,i.packagePayload)(e,r,t,n);return!!o&&(this.limitBroadcastToFramesArray?this.targetFramesAsWindows().forEac
1h(function(e){(0,i.sendMessage)(e,o,r)}):(0,i.broadcast)(o,{origin:r,frame:window.top||window.self}),!0)},e.prototype.emitAsPromise=function(t,n){var i=this;return new e.Promise(function(e,r){i.emit(t,n,function(t){e(t)})||r(Error('Listener not added for "'.concat(t,'"')))})},e.prototype.on=function(e,t){if(this.isDestroyed)return!1;var n=this,r=this.origin,o=t;return e=this.namespaceEvent(e),!(0,i.subscriptionArgsInvalid)(e,o,r)&&(this.hasAdditionalChecksForOnListeners&&(o=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];n.passesVerifyDomainCheck(this&&this.origin)&&n.hasMatchingTargetFrame(this&&this.source)&&t.apply(void 0,e)}),this.listeners.push({eventName:e,handler:o,originalHandler:t}),i.subscribers[r]=i.subscribers[r]||{},i.subscribers[r][e]=i.subscribers[r][e]||[],i.subscribers[r][e].push(o),!0)},e.prototype.off=function(e,t){var n=t;if(this.isDestroyed)return!1;if(this.hasAdditionalChecksForOnListeners)for(var r=0;r<this.listeners.length;r++){var o=this.listeners[r];o.originalHandler===t&&(n=o.handler)}e=this.namespaceEvent(e);var s=this.origin;if((0,i.subscriptionArgsInvalid)(e,n,s))return!1;var a=i.subscribers[s]&&i.subscribers[s][e];if(!a)return!1;for(var r=0;r<a.length;r++)if(a[r]===n)return a.splice(r,1),!0;return!1},e.prototype.teardown=function(){if(!this.isDestroyed){this.isDestroyed=!0;for(var e=0;e<this.listeners.length;e++){var t=this.listeners[e];this.off(t.eventName,t.handler)}this.listeners.length=0}},e.prototype.passesVerifyDomainCheck=function(e){return!this.verifyDomain||this.checkOrigin(e)},e.prototype.targetFramesAsWindows=function(){return this.limitBroadcastToFramesArray?this.targetFrames.map(function(e){return e instanceof HTMLIFrameElement?e.contentWindow:e}).filter(function(e){return e}):[]},e.prototype.hasMatchingTargetFrame=function(e){return!this.limitBroadcastToFramesArray||!!this.targetFramesAsWindows().find(function(t){return t===e})},e.prototype.checkOrigin=function(e){var t,n=document.createElement("a");return n.href=location.href,t="https:"===n.protocol?n.host.replace(/:443$/,""):"http:"===n.protocol?n.host.replace(/:80$/,""):n.host,n.protocol+"//"+t===e||!this.verifyDomain||this.verifyDomain(e)},e.prototype.namespaceEvent=function(e){return this.channel?"".concat(this.channel,":").concat(e):e},e.Promise=r,e}();n.Framebus=o},{"./lib":39}],32:[function(e,t,n){"use strict";var i=e("./lib"),r=e("./framebus");(0,i.attach)(),t.exports=r.Framebus},{"./framebus":31,"./lib":39}],33:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.detach=n.attach=void 0;var i=e("./"),r=!1;n.attach=function(){r||"undefined"==typeof window||(r=!0,window.addEventListener("message",i.onMessage,!1))},n.detach=function(){r=!1,window.removeEventListener("message",i.onMessage,!1)}},{"./":39}],34:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.broadcastToChildWindows=void 0;var i=e("./");n.broadcastToChildWindows=function(e,t,n){for(var r=i.childWindows.length-1;r>=0;r--){var o=i.childWindows[r];o.closed?i.childWindows.splice(r,1):n!==o&&(0,i.broadcast)(e,{origin:t,frame:o.top})}}},{"./":39}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.broadcast=void 0;var i=e("./");n.broadcast=function e(t,n){var r,o=0,s=n.origin,a=n.frame;try{for(a.postMessage(t,s),(0,i.hasOpener)(a)&&a.opener.top!==window.top&&e(t,{origin:s,frame:a.opener.top});r=a.frames[o];)e(t,{origin:s,frame:r}),o++}catch(e){}}},{"./":39}],36:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.subscribers=n.childWindows=n.prefix=void 0,n.prefix="/*framebus*/",n.childWindows=[],n.subscribers={}},{}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dispatch=void 0;var i=e("./");n.dispatch=function(e,t,n,r,o){if(i.subscribers[e]&&i.subscribers[e][t]){var s=[];n&&s.push(n),r&&s.push(r);for(var a=0;a<i.subscribers[e][t].length;a++)i.subscribers[e][t][a].apply(o,s)}}},{"./":39}],38:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hasOpener=void 0,n.hasOpener=function(e){return e.top===e&&null!=e.opener&&e.opener!==e&&!0!==e.opener.closed}},{}],39:[function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);
1(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),r(e("./attach"),n),r(e("./broadcast-to-child-windows"),n),r(e("./broadcast"),n),r(e("./constants"),n),r(e("./dispatch"),n),r(e("./has-opener"),n),r(e("./is-not-string"),n),r(e("./message"),n),r(e("./package-payload"),n),r(e("./send-message"),n),r(e("./subscribe-replier"),n),r(e("./subscription-args-invalid"),n),r(e("./types"),n),r(e("./unpack-payload"),n)},{"./attach":33,"./broadcast":35,"./broadcast-to-child-windows":34,"./constants":36,"./dispatch":37,"./has-opener":38,"./is-not-string":40,"./message":41,"./package-payload":42,"./send-message":43,"./subscribe-replier":44,"./subscription-args-invalid":45,"./types":46,"./unpack-payload":47}],40:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isntString=void 0,n.isntString=function(e){return"string"!=typeof e}},{}],41:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.onMessage=void 0;var i=e("./");n.onMessage=function(e){if(!(0,i.isntString)(e.data)){var t=(0,i.unpackPayload)(e);if(t){var n=t.eventData,r=t.reply;(0,i.dispatch)("*",t.event,n,r,e),(0,i.dispatch)(e.origin,t.event,n,r,e),(0,i.broadcastToChildWindows)(e.data,t.origin,e.source)}}}},{"./":39}],42:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.packagePayload=void 0;var i=e("./");n.packagePayload=function(e,t,n,r){var o,s={event:e,origin:t};"function"==typeof r&&(s.reply=(0,i.subscribeReplier)(r,t)),s.eventData=n;try{o=i.prefix+JSON.stringify(s)}catch(e){throw Error("Could not stringify event: ".concat(e.message))}return o}},{"./":39}],43:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sendMessage=void 0,n.sendMessage=function(e,t,n){try{e.postMessage(t,n)}catch(e){}}},{}],44:[function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.subscribeReplier=void 0;var r=e("../framebus"),o=i(e("@braintree/uuid"));n.subscribeReplier=function(e,t){var n=(0,o.default)();return r.Framebus.target({origin:t}).on(n,function i(o,s){e(o,s),r.Framebus.target({origin:t}).off(n,i)}),n}},{"../framebus":31,"@braintree/uuid":25}],45:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.subscriptionArgsInvalid=void 0;var i=e("./");n.subscriptionArgsInvalid=function(e,t,n){return!!(0,i.isntString)(e)||"function"!=typeof t||(0,i.isntString)(n)}},{"./":39}],46:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],47:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.unpackPayload=void 0;var i=e("./");n.unpackPayload=function(e){var t;if(e.data.slice(0,i.prefix.length)!==i.prefix)return!1;try{t=JSON.parse(e.data.slice(i.prefix.length))}catch(e){return!1}if(t.reply){var n=e.origin,r=e.source,o=t.reply;t.reply=function(e){if(r){var t=(0,i.packagePayload)(o,n,e);t&&r.postMessage(t,n)}}}return t}},{"./":39}],48:[function(e,t,n){"use strict";var i=e("./create-authorization-data"),r=e("./json-clone"),o=e("./constants");t.exports={addMetadata:function(e,t){var n,s=t?r(t):{},a=i(e.authorization).attrs,c=r(e.analyticsMetadata);for(n in s.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION,s._meta)s._meta.hasOwnProperty(n)&&(c[n]=s._meta[n]);return s._meta=c,a.tokenizationKey?s.tokenizationKey=a.tokenizationKey:s.authorizationFingerprint=a.authorizationFingerprint,s},addEventMetadata:function(e){var t=e.getConfiguration(),n=i(t.authorization).attrs,r="production"===t.gatewayConfiguration.environment,s={api_integration_type:t.analyticsMetadata.integrationType,app_id:window.location.host,c_sdk_ver:o.VERSION,component:"braintreeclientsdk",merchant_sdk_env:r?"production":"sandbox",merchant_id:t.gatewayConfiguration.merchantId,event_source:"web",platform:o.PLATFORM,platform_version:window.navigator.userAgent,session_id:t.analyticsMetadata.sessionId,client_session_id:t.analyticsMetadata.sessionId,tenant_name:"braintree",product_name:"BT_DCC",space_key:"SKDUYK"};return n.tokenizationKey?s.tokenization_key=n.tokenizationKey:s.auth_fingerprint=n.authorizationFingerprint,s}}},{"./constants":55,"./create-authorization-data":59,"./json-clone":76}],49:[function(e,t,n){"use strict";var i=e("./constants"),r=e("./add-metadata"),o=e("./assign").assign;function s(e,t,n,s){var a=Date.now();return"vault"===n.flow?n.context_type="BA_Token":"checkout"===n.flow&&(n.context_type="EC_Token"),Promise.resolve(e).then(function(e){var c,u=e._request,d=i.ANALYTICS_URL,l=i.ANALYTICS_PREFIX+t,p="production"===e.getConfiguration().gatewayConfiguration.environment,f={events:[],tracking:[]},h=r.addEventMetadata(e,f);return h.event_name=l,h.t=a,f.events=[{level:"info",event:l,payload:o({env:p?"production":"sandbox",timestamp:a},n)}],f.tracking=[h],n&&"object"==typeof n&&(f.tracking=[(Object.keys(c=o({}
1,n)).forEach(function(e){-1===i.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(e)&&delete c[e]}),o(h,c))]),u({url:d,method:"post",data:f,timeout:i.ANALYTICS_REQUEST_TIMEOUT_MS},s)}).catch(function(e){s&&s(e)})}t.exports={sendEvent:function(e,t,n){return s(e,t,{},n)},sendEventPlus:s}},{"./add-metadata":48,"./assign":52,"./constants":55}],50:[function(e,t,n){"use strict";t.exports=function(e){return{src:(e=e||{}).src,failure_kind:e.failureKind,timing:e.timing,on_line:e.onLine,description:e.message}}},{}],51:[function(e,t,n){"use strict";var i=e("@braintree/asset-loader/load-script"),r=e("@paypal/fastlane-sdk-loader");t.exports={loadScript:i,loadFastlane:r.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/fastlane-sdk-loader":30}],52:[function(e,t,n){"use strict";var i="function"==typeof Object.assign?Object.assign:r;function r(e){var t,n,i;for(t=1;t<arguments.length;t++)for(i in n=arguments[t])n.hasOwnProperty(i)&&(e[i]=n[i]);return e}t.exports={assign:i,_assign:r}},{}],53:[function(e,t,n){"use strict";var i=e("./braintree-error"),r=e("./errors"),o="3.145.0";t.exports={verify:function(e){var t,n,s;return e?(s=e.name,t=e.client,n=e.authorization,t||n)?n||t.getVersion()===o?Promise.resolve():Promise.reject(new i({type:r.INCOMPATIBLE_VERSIONS.type,code:r.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+t.getVersion()+") and "+s+" (version "+o+") components must be from the same SDK version."})):Promise.reject(new i({type:r.INSTANTIATION_OPTION_REQUIRED.type,code:r.INSTANTIATION_OPTION_REQUIRED.code,message:"options.client is required when instantiating "+s+"."})):Promise.reject(new i({type:r.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:r.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:"Options must be passed to basicComponentVerification function."}))}}},{"./braintree-error":54,"./errors":63}],54:[function(e,t,n){"use strict";var i=e("./enumerate");function r(e){if(!r.types.hasOwnProperty(e.type))throw Error(e.type+" is not a valid type.");if(!e.code)throw Error("Error code required.");if(!e.message)throw Error("Error message required.");this.name="BraintreeError",this.code=e.code,this.message=e.message,this.type=e.type,this.details=e.details}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),r.findRootError=function(e){return e instanceof r&&e.details&&e.details.originalError?r.findRootError(e.details.originalError):e},t.exports=r},{"./enumerate":62}],55:[function(e,t,n){"use strict";var i="3.145.0";t.exports={ANALYTICS_PREFIX:"web.",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:{production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},CLIENT_API_URLS:{production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:{production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"},INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:"web",BRAINTREE_LIBRARY_VERSION:"braintree/web/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type","payment_ready_button_order","payment_ready_experiment_type","payment_ready_page_type","payment_ready_session_id","button_type","connect_start_time","domain","endpoint","end_time","request_start_time","start_time"]}},{}],56:[function(e,t,n){"use strict";var i=e("./braintree-error"),r=e("./errors");t.exports=function(e,t){t.forEach(function(t){e[t]=function(){throw new i({type:r.METHOD_CALLED_AFTER_TEARDOWN.type,code:r.METHOD_CALLED_AFTER_TEARDOWN.code,message:t+" cannot be called after teardown."})}})}},{"./braintree-error":54,"./errors":63}],57:[function(e,t,n){"use strict";var i=e("./braintree-error");t.exports=function(e,t){return e instanceof i?e:new i({type:t.type,code:t.code,message:t.message,details:{originalError:e}})}},{"./braintree-error":54}],58:[function(e,t,n){"use strict";var i=e("./constants").ASSETS_URLS;t.exports={create:function(e){return i.production}}},{"./constants":55}],59:[function(e,t,n){"use strict";var i=e("../lib/vendor/polyfill").atob,r=e("../lib/constants").CLIENT_API_URLS;t.exports=function(e){var t,n,o,s,a={attrs:{},configUrl:""};return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(e)?(n=(t=e.split("_"))[0],s={merchantId:t.slice(2).join("_"),environment:n},a.environment=s.environment,a.attrs.tokenizationKey=e,a.configUrl=r[s.environment]+"/merchants/"+s.merchantId+"/client_api/v1/configuration"):(o=JSON.parse(i(e)),a.environment=o.environment,a.attrs.authorizationFingerprint=o.authorizationFingerprint,a.paymentMethodIdJwt=o.paymentMethodIdJwt,a.configUrl=o.configUrl,a.graphQL=o.graphQL),a}},{"../lib/constants":55,"../lib/vendor/polyfill":80}],60:[function(e,t,n){"use strict";var i=e("./braintree-error"),r=e("./assets"),o=e("./analytics"),s=e("./asset-load-detail"),a=e("./errors"),c="3.145.0";function u(e,t){var n={src:e};return t&&(n.forceScriptReload=!0),r.loadScript(n)}
1t.exports={create:function(e){var t,n,r=!1,d=Promise.resolve();return e.client?Promise.resolve(e.client):(window.braintree&&window.braintree.client||(d=u(n=e.assetsUrl+"/web/"+c+"/js/client.min.js",!1).catch(function(e){return r=!0,t=e,u(n,!0)}).catch(function(e){return Promise.reject(new i({type:a.CLIENT_SCRIPT_FAILED_TO_LOAD.type,code:a.CLIENT_SCRIPT_FAILED_TO_LOAD.code,message:"Braintree client script failed to load ("+(e&&e.failureKind?e.failureKind:"error")+").",details:{originalError:e}}))})),d.then(function(){return window.braintree.client.VERSION!==c?Promise.reject(new i({type:a.INCOMPATIBLE_VERSIONS.type,code:a.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+window.braintree.client.VERSION+") and "+e.name+" (version "+c+") components must be from the same SDK version."})):window.braintree.client.create({authorization:e.authorization,debug:e.debug})}).then(function(n){return r&&o.sendEventPlus(n,e.name+".deferred-client.load-recovered",s(t)),n}))}}},{"./analytics":49,"./asset-load-detail":50,"./assets":51,"./braintree-error":54,"./errors":63}],61:[function(e,t,n){"use strict";t.exports={getVisibilityChangeEventName:function(){return void 0!==window.document.hidden?"visibilitychange":void 0!==window.document.msHidden?"msvisibilitychange":void 0!==window.document.webkitHidden?"webkitvisibilitychange":"visibilitychange"},isDocumentHidden:function(){return!!(window.document.hidden||window.document.msHidden||window.document.webkitHidden)}}},{}],62:[function(e,t,n){"use strict";t.exports=function(e,t){return t=null==t?"":t,e.reduce(function(e,n){return e[n]=t+n,e},{})}},{}],63:[function(e,t,n){"use strict";var i=e("./braintree-error");t.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:i.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:i.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:i.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:i.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"},INSTANTIATION_OPTION_INVALID:{type:i.types.MERCHANT,code:"INSTANTIATION_OPTION_INVALID"}}},{"./braintree-error":54}],64:[function(e,t,n){"use strict";var i=e("./strategies/popup"),r=e("./strategies/popup-bridge"),o=e("./strategies/modal"),s=e("framebus"),a=e("../shared/events"),c=e("../shared/errors"),u=e("../shared/constants"),d=e("@braintree/uuid"),l=e("@braintree/iframer"),p=e("../../braintree-error"),f=e("../shared/browser-detection"),h=e("./../../assign").assign,_=e("../../document-visibility"),m=e("../../constants").BUS_CONFIGURATION_REQUEST_EVENT,y=e("../../is-verified-domain"),A=["name","dispatchFrameUrl","openFrameUrl"];function g(){}function v(e){(function(e){if(!e)throw Error("Valid configuration is required");if(A.forEach(function(t){if(!e.hasOwnProperty(t))throw Error("A valid frame "+t+" must be provided")}),!/^[\w_]+$/.test(e.name))throw Error("A valid frame name must be provided")})(e),this._serviceId=d().replace(/-/g,""),this._options={name:e.name+"_"+this._serviceId,dispatchFrameUrl:e.dispatchFrameUrl,openFrameUrl:e.openFrameUrl,height:e.height,width:e.width,top:e.top,left:e.left},this.state=e.state||{},this._bus=new s({channel:this._serviceId,verifyDomain:y,targetFrames:[]}),this._setBusEvents()}v.prototype.initialize=function(e){var t=(function(){e(),this._bus.off(a.DISPATCH_FRAME_READY,t)}).bind(this);this._bus.on(a.DISPATCH_FRAME_READY,t),this._writeDispatchFrame()},v.prototype._writeDispatchFrame=function(){var e=u.DISPATCH_FRAME_NAME+"_"+this._serviceId,t=this._options.dispatchFrameUrl;this._dispatchFrame=l({"aria-hidden":!0,name:e,title:e,src:t,class:u.DISPATCH_FRAME_CLASS,height:0,width:0,style:{position:"absolute",left:"-9999px"}}),document.body.appendChild(this._dispatchFrame),this._bus.addTargetFrame(this._dispatchFrame)},v.prototype._setBusEvents=function(){this._bus.on(a.DISPATCH_FRAME_REPORT,(function(e,t){this._onCompleteCallback&&this._onCompleteCallback.call(null,e.err,e.payload),this._frame.close(),this._onCompleteCallback=null,this._cleanupFrame(),t&&t()}).bind(this)),this._bus.on(m,(function(e){e(this.state)}).bind(this))},v.prototype.open=function(e,t){if(e=e||{},this._frame=this._getFrameForEnvironment(e),this._frame.initialize(t),!(this._frame instanceof r)){if(h(this.state,e.state),this._onCompleteCallback=t,this._onSuspend=e.onSuspend,this._onResume=e.onResume,this._frame.open(),this.isFrameClosed()){this._cleanupFrame(),t&&t(new p(c.FRAME_SERVICE_FRAME_OPEN_FAILED));return}this._pollForPopupClose(),this._addVisibilityListeners()}},v.prototype.redirect=function(e){this._frame&&!this.isFrameClosed()&&this._frame.redirect(e)},v.prototype.close=function(){this.isFrameClosed()||this._frame.close()}
1,v.prototype.focus=function(){this.isFrameClosed()||this._frame.focus()},v.prototype.createHandler=function(e){return e=e||{},{close:(function(){e.beforeClose&&e.beforeClose(),this.close()}).bind(this),focus:(function(){e.beforeFocus&&e.beforeFocus(),this.focus()}).bind(this)}},v.prototype.createNoopHandler=function(){return{close:g,focus:g}},v.prototype.teardown=function(){this.close(),this._dispatchFrame.parentNode.removeChild(this._dispatchFrame),this._dispatchFrame=null,this._cleanupFrame()},v.prototype.isFrameClosed=function(){return null==this._frame||this._frame.isClosed()},v.prototype._cleanupFrame=function(){this._frame=null,clearInterval(this._popupInterval),this._popupInterval=null,this._removeVisibilityListeners()},v.prototype._reportFrameClosed=function(){var e=this._onCompleteCallback;this._onCompleteCallback=null,this._cleanupFrame(),e&&e(new p(c.FRAME_SERVICE_FRAME_CLOSED))},v.prototype._pollForPopupClose=function(){return this._popupInterval=setInterval((function(){this.isFrameClosed()&&this._reportFrameClosed()}).bind(this),u.POPUP_POLL_INTERVAL),this._popupInterval},v.prototype._addVisibilityListeners=function(){var e=this;this._onVisibilityChange=function(){_.isDocumentHidden()?e._handleSuspend():e._handleResume()},this._onPageShow=function(t){t&&t.persisted&&e._handleResume()},this._visibilityInstallTimeout=setTimeout(function(){window.document.addEventListener(_.getVisibilityChangeEventName(),e._onVisibilityChange),window.addEventListener("pageshow",e._onPageShow)},u.VISIBILITY_CHANGE_LISTENER_INSTALL_DELAY)},v.prototype._removeVisibilityListeners=function(){clearTimeout(this._visibilityInstallTimeout),this._visibilityInstallTimeout=null,clearTimeout(this._resumeRecheckTimeout),this._resumeRecheckTimeout=null,this._backgrounded=!1,this._onVisibilityChange&&(window.document.removeEventListener(_.getVisibilityChangeEventName(),this._onVisibilityChange),this._onVisibilityChange=null),this._onPageShow&&(window.removeEventListener("pageshow",this._onPageShow),this._onPageShow=null)},v.prototype._handleSuspend=function(){!this._backgrounded&&(this._backgrounded=!0,this._onSuspend&&this._onSuspend())},v.prototype._handleResume=function(){var e=this;this._backgrounded&&(this._backgrounded=!1,this._onResume&&this._onResume(),clearTimeout(this._resumeRecheckTimeout),this._resumeRecheckTimeout=setTimeout(function(){e.isFrameClosed()&&e._reportFrameClosed()},u.RESUME_PROCESS_DELAY))}
1,v.prototype._getFrameForEnvironment=function(e){var t=f.supportsPopups(),n=!!window.popupBridge,s=h({},this._options,e);return n?new r(s):t?new i(s):new o(s)},t.exports=v},{"../../braintree-error":54,"../../constants":55,"../../document-visibility":61,"../../is-verified-domain":75,"../shared/browser-detection":71,"../shared/constants":72,"../shared/errors":73,"../shared/events":74,"./../../assign":52,"./strategies/modal":66,"./strategies/popup":69,"./strategies/popup-bridge":67,"@braintree/iframer":21,"@braintree/uuid":25,framebus:32}],65:[function(e,t,n){"use strict";var i=e("./frame-service");t.exports={create:function(e,t){var n=new i(e);n.initialize(function(){t(n)})}}},{"./frame-service":64}],66:[function(e,t,n){"use strict";var i=e("@braintree/iframer"),r=e("../../../assign").assign,o=e("../../shared/browser-detection"),s={position:"fixed",top:0,left:0,bottom:0,padding:0,margin:0,border:0,outline:"none",zIndex:20001,background:"#FFFFFF"};function a(){}function c(e){this._closed=null,this._frame=null,this._options=e||{},this._container=this._options.container||document.body}c.prototype.initialize=a,c.prototype.open=function(){var e={src:this._options.openFrameUrl,name:this._options.name,scrolling:"yes",height:"100%",width:"100%",style:r({},s),title:"Lightbox Frame"};o.isIos()?(o.isIosWKWebview()&&(this._lockScrolling(),e.style={}),this._el=document.createElement("div"),r(this._el.style,s,{height:"100%",width:"100%",overflow:"auto","-webkit-overflow-scrolling":"touch"}),this._frame=i(e),this._el.appendChild(this._frame)):this._el=this._frame=i(e),this._closed=!1,this._container.appendChild(this._el)},c.prototype.focus=a,c.prototype.close=function(){this._container.removeChild(this._el),this._frame=null,this._closed=!0,o.isIosWKWebview()&&this._unlockScrolling()},c.prototype.isClosed=function(){return!!this._closed},c.prototype.redirect=function(e){this._frame.src=e},c.prototype._unlockScrolling=function(){document.body.style.overflow=this._savedBodyProperties.overflowStyle,document.body.style.position=this._savedBodyProperties.positionStyle,window.scrollTo(this._savedBodyProperties.left,this._savedBodyProperties.top),delete this._savedBodyProperties},c.prototype._lockScrolling=function(){var e=document.documentElement;this._savedBodyProperties={left:(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0),top:(window.pageYOffset||e.scrollTop)-(e.clientTop||0),overflowStyle:document.body.style.overflow,positionStyle:document.body.style.position},document.body.style.overflow="hidden",document.body.style.position="fixed",window.scrollTo(0,0)},t.exports=c},{"../../../assign":52,"../../shared/browser-detection":71,"@braintree/iframer":21}],67:[function(e,t,n){"use strict";var i=e("../../../braintree-error"),r=e("../../shared/errors");function o(){}function s(e){this._closed=null,this._options=e}s.prototype.initialize=function(e){var t=this;window.popupBridge.onComplete=function(n,o){var s=!o&&!n;if(t._closed=!0,n||s){e(new i(r.FRAME_SERVICE_FRAME_CLOSED));return}e(null,o)}},s.prototype.open=function(e){var t;t=(e=e||{}).openFrameUrl||this._options.openFrameUrl,this._closed=!1,window.popupBridge.open(t)},s.prototype.focus=o,s.prototype.close=o,s.prototype.isClosed=function(){return!!this._closed},s.prototype.redirect=function(e){this.open({openFrameUrl:e})},t.exports=s},{"../../../braintree-error":54,"../../shared/errors":73}],68:[function(e,t,n){"use strict";var i=e("../../../shared/constants"),r=e("./position");function o(e,t,n){return void 0!==t?t:r[e](n)}t.exports=function(e){var t=e.height||i.DEFAULT_POPUP_HEIGHT,n=e.width||i.DEFAULT_POPUP_WIDTH,r=o("top",e.top,t),s=o("left",e.left,n);return[i.POPUP_BASE_OPTIONS,"height="+t,"width="+n,"top="+r,"left="+s].join(",")}},{"../../../shared/constants":72,"./position":70}],69:[function(e,t,n){"use strict";var i=e("./compose-options");function r(e){this._frame=null,this._options=e||{}}r.prototype.initialize=function(){},r.prototype.open=function(){this._frame=window.open(this._options.openFrameUrl,this._options.name,i(this._options))},r.prototype.focus=function(){this._frame.focus()},r.prototype.close=function(){this._frame.closed||this._frame.close()},r.prototype.isClosed=function(){return!this._frame||!!this._frame.closed},r.prototype.redirect=function(e){this._frame.location.href=e}
1,t.exports=r},{"./compose-options":68}],70:[function(e,t,n){"use strict";t.exports={top:function(e){return((window.outerHeight||document.documentElement.clientHeight)-e)/2+(null==window.screenY?window.screenTop:window.screenY)},left:function(e){return((window.outerWidth||document.documentElement.clientWidth)-e)/2+(null==window.screenX?window.screenLeft:window.screenX)},center:function(e,t,n){return(e-t)/2+n}}},{}],71:[function(e,t,n){"use strict";t.exports={isIos:e("@braintree/browser-detection/is-ios"),isIosWKWebview:e("@braintree/browser-detection/is-ios-wkwebview"),supportsPopups:e("@braintree/browser-detection/supports-popups")}},{"@braintree/browser-detection/is-ios":18,"@braintree/browser-detection/is-ios-wkwebview":17,"@braintree/browser-detection/supports-popups":19}],72:[function(e,t,n){"use strict";t.exports={DISPATCH_FRAME_NAME:"dispatch",DISPATCH_FRAME_CLASS:"braintree-dispatch-frame",POPUP_BASE_OPTIONS:"resizable,scrollbars",DEFAULT_POPUP_WIDTH:450,DEFAULT_POPUP_HEIGHT:535,POPUP_POLL_INTERVAL:100,POPUP_CLOSE_TIMEOUT:100,VISIBILITY_CHANGE_LISTENER_INSTALL_DELAY:500,RESUME_PROCESS_DELAY:1e3}},{}],73:[function(e,t,n){"use strict";var i=e("../../braintree-error");t.exports={FRAME_SERVICE_FRAME_CLOSED:{type:i.types.INTERNAL,code:"FRAME_SERVICE_FRAME_CLOSED",message:"Frame closed before tokenization could occur."},FRAME_SERVICE_FRAME_OPEN_FAILED:{type:i.types.INTERNAL,code:"FRAME_SERVICE_FRAME_OPEN_FAILED",message:"Frame failed to open."}}},{"../../braintree-error":54}],74:[function(e,t,n){"use strict";var i=e("../../enumerate");t.exports=i(["DISPATCH_FRAME_READY","DISPATCH_FRAME_REPORT"],"frameService:")},{"../../enumerate":62}],75:[function(e,t,n){"use strict";var i,r={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};t.exports=function(e){var t;return e=e.toLowerCase(),!!/^https:/.test(e)&&((i=i||document.createElement("a")).href=e,t=i.hostname.split(".").slice(-2).join("."),r.hasOwnProperty(t))}},{}],76:[function(e,t,n){"use strict";t.exports=function(e){return JSON.parse(JSON.stringify(e))}},{}],77:[function(e,t,n){"use strict";t.exports=function(e){return Object.keys(e).filter(function(t){return"function"==typeof e[t]})}},{}],78:[function(e,t,n){"use strict";function i(e){return e=e||window.location.href,/\?/.test(e)}function r(e,t){var n,i,o,s=[];for(o in e)e.hasOwnProperty(o)&&(i=e[o],n=t?e&&"object"==typeof e&&"number"==typeof e.length&&"[object Array]"===Object.prototype.toString.call(e)?t+"[]":t+"["+o+"]":o,"object"==typeof i?s.push(r(i,n)):s.push(encodeURIComponent(n)+"="+encodeURIComponent(i)));return s.join("&")}t.exports={parse:function(e){return i(e=e||window.location.href)?(e.split("?")[1]||"").replace(/#.*$/,"").split("&").reduce(function(e,t){var n=t.split("="),i=decodeURIComponent(n[0]),r=decodeURIComponent(n[1]);return e[i]=r,e},{}):{}},stringify:r,queryify:function(e,t){return e=e||"",null!=t&&"object"==typeof t&&function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!0;return!1}(t)&&(e+=-1===e.indexOf("?")?"?":"",e+=(-1!==e.indexOf("=")?"&":"")+r(t)),e},hasQueryParams:i}},{}],79:[function(e,t,n){"use strict";t.exports=function(e){return e?"":".min"}},{}],80:[function(e,t,n){"use strict";var i="function"==typeof atob?atob:r;function r(e){var t,n,i,r,o,s,a,c,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d="";if(!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$/.test(e))throw Error("Non base64 encoded input passed to window.atob polyfill");c=0;do r=u.indexOf(e.charAt(c++)),o=u.indexOf(e.charAt(c++)),s=u.indexOf(e.charAt(c++)),a=u.indexOf(e.charAt(c++)),t=(63&r)<<2|o>>4&3,n=(15&o)<<4|s>>2&15,i=(3&s)<<6|63&a,d+=String.fromCharCode(t)+(n?String.fromCharCode(n):"")+(i?String.fromCharCode(i):"");while(c<e.length);return d}t.exports={atob:function(e){return i.call(window,e)},_atob:r}},{}],81:[function(e,t,n){"use strict";var i=e("../lib/braintree-error");t.exports={PAYPAL_NOT_ENABLED:{type:i.types.MERCHANT,code:"PAYPAL_NOT_ENABLED",message:"PayPal is not enabled for this merchant."},PAYPAL_SANDBOX_ACCOUNT_NOT_LINKED:{type:i.types.MERCHANT,code:"PAYPAL_SANDBOX_ACCOUNT_NOT_LINKED",message:"A linked PayPal Sandbox account is required to use PayPal Checkout in Sandbox. See https://developer.paypal.com/braintree/docs/guides/paypal/testing-go-live#linked-paypal-testing for details on linking your PayPal sandbox with Braintree."},PAYPAL_ACCOUNT_TOKENIZATION_FAILED:{type:i.types.NETWORK,code:"PAYPAL_ACCOUNT_TOKENIZATION_FAILED",message:"Could not tokenize user's PayPal account."},PAYPAL_FLOW_FAILED:{type:i.types.NETWORK,code:"PAYPAL_FLOW_FAILED",message:"Could not initialize PayPal flow."},PAYPAL_FLOW_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"PAYPAL_FLOW_OPTION_REQUIRED",message:"PayPal flow property is invali
1d or missing."},PAYPAL_START_VAULT_INITIATED_CHECKOUT_PARAM_REQUIRED:{type:i.types.MERCHANT,code:"PAYPAL_START_VAULT_INITIATED_CHECKOUT_PARAM_REQUIRED"},PAYPAL_START_VAULT_INITIATED_CHECKOUT_SETUP_FAILED:{type:i.types.NETWORK,code:"PAYPAL_START_VAULT_INITIATED_CHECKOUT_SETUP_FAILED",message:"Something went wrong when setting up the checkout workflow."},PAYPAL_START_VAULT_INITIATED_CHECKOUT_POPUP_OPEN_FAILED:{type:i.types.MERCHANT,code:"PAYPAL_START_VAULT_INITIATED_CHECKOUT_POPUP_OPEN_FAILED",message:"PayPal popup failed to open, make sure to initiate the vault checkout in response to a user action."},PAYPAL_START_VAULT_INITIATED_CHECKOUT_CANCELED:{type:i.types.CUSTOMER,code:"PAYPAL_START_VAULT_INITIATED_CHECKOUT_CANCELED",message:"Customer closed PayPal popup before authorizing."},PAYPAL_START_VAULT_INITIATED_CHECKOUT_IN_PROGRESS:{type:i.types.MERCHANT,code:"PAYPAL_START_VAULT_INITIATED_CHECKOUT_IN_PROGRESS",message:"Vault initiated checkout already in progress."},PAYPAL_INVALID_PAYMENT_OPTION:{type:i.types.MERCHANT,code:"PAYPAL_INVALID_PAYMENT_OPTION",message:"PayPal payment options are invalid."},PAYPAL_MISSING_REQUIRED_OPTION:{type:i.types.MERCHANT,code:"PAYPAL_MISSING_REQUIRED_OPTION",message:"Missing required option."},PAYPAL_BILLING_AGREEMENT_JWT_FAILED:{type:i.types.NETWORK,code:"PAYPAL_BILLING_AGREEMENT_JWT_FAILED",message:"Could not create a billing agreement token from the payment method JWT."}}},{"../lib/braintree-error":54}],82:[function(e,t,n){"use strict";var i=e("../lib/basic-component-verification"),r=e("@braintree/wrap-promise"),o=e("./paypal-checkout");t.exports={create:r(function(e){return i.verify({name:"PayPal Checkout",client:e.client,authorization:e.authorization}).then(function(){return new o(e)._initialize(e)})}),isSupported:function(){return!0},VERSION:"3.145.0"}},{"../lib/basic-component-verification":53,"./paypal-checkout":83,"@braintree/wrap-promise":29}],83:[function(e,t,n){"use strict";var i=e("../lib/analytics"),r=e("../lib/assign").assign,o=e("../lib/create-deferred-client"),s=e("../lib/create-assets-url"),a=e("@braintree/extended-promise"),c=e("@braintree/wrap-promise"),u=e("../lib/braintree-error"),d=e("../lib/convert-to-braintree-error"),l=e("./errors"),p=e("../paypal/shared/constants"),f=e("../lib/frame-service/external"),h=e("../lib/create-authorization-data"),_=e("../lib/methods"),m=e("../lib/use-min"),y=e("../lib/convert-methods-to-error"),A=e("../lib/querystring"),g=e("../lib/constants").INTEGRATION_TIMEOUT_MS,v=["amount","currency","vaultInitiatedCheckoutPaymentMethodToken"];function P(e){this._merchantAccountId=e.merchantAccountId,this._autoSetDataUserIdToken=!!e.autoSetDataUserIdToken}a.suppressUnhandledPromiseMessage=!0,P.prototype._initialize=function(e){var t;return(e.client?(t=e.client.getConfiguration(),this._authorizationInformation={fingerprint:t.authorizationFingerprint,environment:t.gatewayConfiguration.environment}):(t=h(e.authorization),this._authorizationInformation={fingerprint:t.attrs.authorizationFingerprint,environment:t.environment}),this._clientPromise=o.create({authorization:e.authorization,client:e.client,debug:e.debug,assetsUrl:s.create(e.authorization),name:"PayPal Checkout"}).then((function(e){return(this._configuration=e.getConfiguration(),this._merchantAccountId||(this._configuration.gatewayConfiguration.paypalEnabled?!0===this._configuration.gatewayConfiguration.paypal.environmentNoNetwork&&(this._setupError=new u(l.PAYPAL_SANDBOX_ACCOUNT_NOT_LINKED)):this._setupError=new u(l.PAYPAL_NOT_ENABLED)),this._setupError)?Promise.reject(this._setupError):(i.sendEvent(e,"paypal-checkout.initialized"),this._frameServicePromise=this._setupFrameService(e),this._billingAgreementJwtPromise=this._createBillingAgreementJwt(e),e)}).bind(this)),e.client)?this._clientPromise.then((function(){return this}).bind(this)):Promise.resolve(this)},P.prototype._createBillingAgreementJwt=function(e){var t=this,n=this._configuration.paymentMethodIdJwt;return n?e.request({api:"graphQLApi",data:{query:p.CREATE_BILLING_AGREEMENT_JWT_MUTATION,variables:{input:{paymentMethodJwt:n}}}}).then(function(n){t._billingAgreementJwt=n.data.createBillingAgreementJwt.
1jwt,i.sendEvent(e,"paypal-checkout.create-billing-agreement-jwt.succeeded")}).catch(function(n){t._billingAgreementJwtError=new u({type:l.PAYPAL_BILLING_AGREEMENT_JWT_FAILED.type,code:l.PAYPAL_BILLING_AGREEMENT_JWT_FAILED.code,message:l.PAYPAL_BILLING_AGREEMENT_JWT_FAILED.message,details:{originalError:n}}),i.sendEvent(e,"paypal-checkout.create-billing-agreement-jwt.failed")}):Promise.resolve()},P.prototype._setupFrameService=function(e){var t=new a,n=e.getConfiguration(),r=setTimeout(function(){i.sendEvent(e,"paypal-checkout.frame-service.timed-out"),t.reject(new u(l.PAYPAL_START_VAULT_INITIATED_CHECKOUT_SETUP_FAILED))},g);return this._assetsUrl=n.gatewayConfiguration.paypal.assetsUrl+"/web/3.145.0",this._isDebug=n.isDebug,this._loadingFrameUrl=this._assetsUrl+"/html/paypal-landing-frame"+m(this._isDebug)+".html",f.create({name:"braintreepaypallanding",dispatchFrameUrl:this._assetsUrl+"/html/dispatch-frame"+m(this._isDebug)+".html",openFrameUrl:this._loadingFrameUrl},(function(e){this._frameService=e,clearTimeout(r),t.resolve()}).bind(this)),t},P.prototype.createPayment=function(e){var t=this;return e&&p.FLOW_ENDPOINTS.hasOwnProperty(e.flow)?(i.sendEvent(this._clientPromise,"paypal-checkout.createPayment"),this._createPaymentResource(e).then(function(n){var i;return i="checkout"===e.flow?A.parse(n.paymentResource.redirectUrl).token:n.agreementSetup.tokenId,t._contextId=i,i})):Promise.reject(new u(l.PAYPAL_FLOW_OPTION_REQUIRED))},P.prototype._createPaymentResource=function(e,t){var n=this,r="paypal_hermes/"+p.FLOW_ENDPOINTS[e.flow];return this._flow=e.flow,delete this.intentFromCreatePayment,t=t||{},!0===e.offerCredit&&i.sendEvent(this._clientPromise,"paypal-checkout.credit.offered"),this._clientPromise.then(function(e){return Promise.all([e,n._billingAgreementJwtPromise||Promise.resolve()])}).then(function(i){return i[0].request({endpoint:r,method:"post",data:n._formatPaymentResourceData(e,t)}).then(function(t){return n.intentFromCreatePayment=e.intent,t})}).catch(function(e){return n._setupError?Promise.reject(n._setupError):422===(e.details&&e.details.httpStatus)?Promise.reject(new u({type:l.PAYPAL_INVALID_PAYMENT_OPTION.type,code:l.PAYPAL_INVALID_PAYMENT_OPTION.code,message:l.PAYPAL_INVALID_PAYMENT_OPTION.message,details:{originalError:e}})):Promise.reject(d(e,{type:l.PAYPAL_FLOW_FAILED.type,code:l.PAYPAL_FLOW_FAILED.code,message:l.PAYPAL_FLOW_FAILED.message}))})},P.prototype.updatePayment=function(e){var t=this;return!e||this._hasMissingOption(e,p.REQUIRED_OPTIONS)?(i.sendEventPlus(t._clientPromise,"paypal-checkout.updatePayment.missing-options",{flow:t._flow,context_id:t._contextId}),Promise.reject(new u(l.PAYPAL_MISSING_REQUIRED_OPTION))):this._verifyConsistentCurrency(e)?(i.sendEventPlus(this._clientPromise,"paypal-checkout.updatePayment",{flow:t._flow,context_id:t._contextId}),this._clientPromise.then(function(n){return n.request({endpoint:"paypal_hermes/patch_payment_resource",method:"post",data:t._formatUpdatePaymentData(e)})}).catch(function(e){return 422===(e.details&&e.details.httpStatus)?(i.sendEventPlus(t._clientPromise,"paypal-checkout.updatePayment.invalid",{flow:t._flow,context_id:t._contextId}),Promise.reject(new u({type:l.PAYPAL_INVALID_PAYMENT_OPTION.type,code:l.PAYPAL_INVALID_PAYMENT_OPTION.code,message:l.PAYPAL_INVALID_PAYMENT_OPTION.message,details:{originalError:e}}))):(i.sendEventPlus(t._clientPromise,"paypal-checkout.updatePayment."+l.PAYPAL_FLOW_FAILED.code,{flow:t._flow,context_id:t._contextId}),Promise.reject(d(e,{type:l.PAYPAL_FLOW_FAILED.type,code:l.PAYPAL_FLOW_FAILED.code,message:l.PAYPAL_FLOW_FAILED.message})))})):(i.sendEventPlus(t._clientPromise,"paypal-checkout.updatePayment.inconsistent-currencies",{flow:t._flow,context_id:t._contextId}),Promise.reject(new u({type:l.PAYPAL_INVALID_PAYMENT_OPTION.type,code:l.PAYPAL_INVALID_PAYMENT_OPTION.code,message:l.PAYPAL_INVALID_PAYMENT_OPTION.message,details:{originalError:Error("One or more shipping option currencies differ from checkout currency.")}})))},P.prototype.startVaultInitiatedCheckout=function(e){var t,n=this;return this._vaultInitiatedCheckoutInProgress?(i.sendEventPlus(this._clientPromise,"paypal-checkout.startVaultInitiatedCheckout.error.already-in-progress",{flow:n._flow,context_id:n._contextId}),Promise.reject(new u(l.PAYPAL_START_VAULT_INITIATED_CHECKOUT_IN_PROGRESS))
1):(v.forEach(function(n){e.hasOwnProperty(n)||(t=n)}),t)?Promise.reject(new u({type:l.PAYPAL_START_VAULT_INITIATED_CHECKOUT_PARAM_REQUIRED.type,code:l.PAYPAL_START_VAULT_INITIATED_CHECKOUT_PARAM_REQUIRED.code,message:"Required param "+t+" is missing."})):(this._vaultInitiatedCheckoutInProgress=!0,this._addModalBackdrop(e),e=r({},e,{flow:"checkout"}),i.sendEventPlus(this._clientPromise,"paypal-checkout.startVaultInitiatedCheckout.started",{flow:n._flow,context_id:n._contextId}),this._waitForVaultInitiatedCheckoutDependencies().then(function(){var t=new a,r=n._createPaymentResource(e,{returnUrl:n._constructVaultCheckoutUrl("redirect-frame"),cancelUrl:n._constructVaultCheckoutUrl("cancel-frame")}).then(function(e){var i=e.paymentResource.redirectUrl;return n._frameService.redirect(i),t});return n._popupSawResume=!1,n._frameService.open({onSuspend:function(){i.sendEventPlus(n._clientPromise,"paypal-checkout.popup.suspended",{flow:n._flow,context_id:n._contextId})},onResume:function(){n._popupSawResume=!0,i.sendEventPlus(n._clientPromise,"paypal-checkout.popup.resumed",{flow:n._flow,context_id:n._contextId})}},n._createFrameServiceCallback(t)),r}).catch(function(e){return(n._vaultInitiatedCheckoutInProgress=!1,n._removeModalBackdrop(),"FRAME_SERVICE_FRAME_CLOSED"===e.code)?(i.sendEventPlus(n._clientPromise,"paypal-checkout.startVaultInitiatedCheckout.canceled.by-customer",{flow:n._flow,context_id:n._contextId}),Promise.reject(new u(l.PAYPAL_START_VAULT_INITIATED_CHECKOUT_CANCELED))):(n._frameService&&n._frameService.close(),e.code&&e.code.indexOf("FRAME_SERVICE_FRAME_OPEN_FAILED")>-1)?(i.sendEventPlus(n._clientPromise,"paypal-checkout.startVaultInitiatedCheckout.failed.popup-not-opened",{flow:n._flow,context_id:n._contextId}),Promise.reject(new u({code:l.PAYPAL_START_VAULT_INITIATED_CHECKOUT_POPUP_OPEN_FAILED.code,type:l.PAYPAL_START_VAULT_INITIATED_CHECKOUT_POPUP_OPEN_FAILED.type,message:l.PAYPAL_START_VAULT_INITIATED_CHECKOUT_POPUP_OPEN_FAILED.message,details:{originalError:e}}))):Promise.reject(e)}).then(function(e){return n._frameService.close(),n._vaultInitiatedCheckoutInProgress=!1,n._removeModalBackdrop(),i.sendEventPlus(n._clientPromise,"paypal-checkout.startVaultInitiatedCheckout.succeeded",{flow:n._flow,context_id:n._contextId}),Promise.resolve(e)}))},P.prototype._addModalBackdrop=function(e){e.optOutOfModalBackdrop||(this._modalBackdrop||(this._modalBackdrop=document.createElement("div"),this._modalBackdrop.setAttribute("data-braintree-paypal-vault-initiated-checkout-modal",!0),this._modalBackdrop.style.position="fixed",this._modalBackdrop.style.top=0,this._modalBackdrop.style.bottom=0,this._modalBackdrop.style.left=0,this._modalBackdrop.style.right=0,this._modalBackdrop.style.zIndex=9999,this._modalBackdrop.style.background="black",this._modalBackdrop.style.opacity="0.7",this._modalBackdrop.addEventListener("click",(function(){this.focusVaultInitiatedCheckoutWindow()}).bind(this))),document.body.appendChild(this._modalBackdrop))},P.prototype._removeModalBackdrop=function(){this._modalBackdrop&&this._modalBackdrop.parentNode&&this._modalBackdrop.parentNode.removeChild(this._modalBackdrop)},P.prototype.closeVaultInitiatedCheckoutWindow=function(){return this._vaultInitiatedCheckoutInProgress&&i.sendEventPlus(this._clientPromise,"paypal-checkout.startVaultInitiatedCheckout.canceled.by-merchant",{flow:this._flow,context_id:this._contextId}),this._waitForVaultInitiatedCheckoutDependencies().then((function(){this._frameService.close()}).bind(this))},P.prototype.focusVaultInitiatedCheckoutWindow=function(){return this._waitForVaultInitiatedCheckoutDependencies().then((function(){this._frameService.focus()}).bind(this))},P.prototype._createFrameServiceCallback=function(e){var t=this;return function(n,r){t._popupSawResume&&!n&&r&&i.sendEventPlus(t._clientPromise,"paypal-checkout.popup.recovered",{flow:t._flow,context_id:t._contextId}),t._popupSawResume=!1,n?e.reject(n):r&&(t._frameService.redirect(t._loadingFrameUrl),t.tokenizePayment({paymentToken:r.token,payerID:r.PayerID,paymentID:r.paymentId,orderID:r.orderId}).then(function(t){e.resolve(t)}).catch(function(t){e.reject(t)}))}},P.prototype._waitForVaultInitiatedCheckoutDependencies=function(){var e=this;return this._clientPromise.then(function(){return e._frameServicePromise})},P.prototype._constructVaultCheckoutUrl=function(e){var t=this._frameService._serviceId;return this._assetsUrl+"/html/"+e+m(this._isDebug)+".html?channel="+t},P.prototype.tokenizePayment=function(e){var t,n=this,r=!0,o={flow:this._flow,intent:e.intent||this.intentFromCreatePayment},s={ecToken:e.paymentToken,billingToken:e.billingToken,payerId:e.payerID,paymentId:e.paymentID,orderId:e.orderID,shippingOptionsId:e.shippingOptionsId};return e.hasOwnProperty("vault")&&(r=e.vault),o.vault=r,i.sendEventPlus(this._clientPromise,"paypal-checkout.tokenization.started",{flow:n._flow,context_id:n._contextId}),this._clientPromise.then(function(e){return e.request({endpoint:"payment_methods/paypal_accounts",method:"post",data:n._formatTokenizeData(o,s)})}).then(function(e){return t=n._formatTokenizePayload(e),i.sendEventPlus(n._clientPromise,"paypal-checkout.tokenization.success",{flow:n._flow,context_id:n._contextId}),t.creditFinancingOffered&&i.sendEventPlus(n._clientPromise,"paypal-checkout.credit.accepted",{flow:n._flow,context_id:n._contextId}),t}).catch(function(e){return n._setupError?Promise.reject(n._setupError):(i.sendEventPlus(n._clientPromise,"paypal-checkout.tokenization.failed",{flow:n._flow,context_id:n._contextId}),Promise.reject(d(e,{type:l.PAYPAL_ACCOUNT_TOKENIZATION_FAILED.type,code:l.PAYPAL_ACCOUNT_TOKENIZATION_FAILED.code,message:l.PAYPAL_ACCOUNT_TOKENIZATION_FAILED.message})))})},P.prototype.getClientId=function(){return this._clientPromise.then(function(e){return e.getConfiguration().gatewayConfiguration.paypal.clientId})},P.prototype.loadPayPalSDK=function(e){var t,n=new a,i=e&&e.dataAttributes||{},o=i["user-id-token"]||i["data-user-id-token"],s=o;return this._configuration&&(i["client-metadata-id"]=i["client-metadata-id"]?i["client-metadata-id"]:this._configuration.analyticsMetadata.sessionId,i["data-sdk-integration-source"]=p.BT_INTEGRATION_SOURCE),s||(s=this._authorizationInformation.fingerprint&&this._authorizationInformation.fingerprint.split("?")[0]),this._paypalScript=document.createElement("script"),e=r({},{components:"buttons"},e),delete e.dataAttributes,e.vault?e.intent=e.intent||"tokenize":(e.intent=e.intent||"authorize",e.currency=e.currency||"USD"),t=p.ENVIRONMENT[e.env]||"https://www.paypal.com/sdk/js?",delete e.env,this._paypalScript.onload=function(){n.resolve()}
1,Object.keys(i).forEach((function(e){this._paypalScript.setAttribute("data-"+e.replace(/^data\-/,""),i[e])}).bind(this)),Promise.all([e["client-id"]?Promise.resolve(e["client-id"]):this.getClientId(),this._billingAgreementJwtPromise||Promise.resolve()]).then((function(n){var r=n[0];e["client-id"]=r,this._billingAgreementJwt&&!o?this._paypalScript.setAttribute("data-user-id-token",this._billingAgreementJwt):this._autoSetDataUserIdToken&&s&&(this._paypalScript.setAttribute("data-user-id-token",s),this._attachPreloadPixel({id:r,userIdToken:s,amount:i.amount,currency:e.currency,merchantId:e["merchant-id"]})),this._paypalScript.src=A.queryify(t,e),document.head.insertBefore(this._paypalScript,document.head.firstElementChild)}).bind(this)),n.then((function(){return this}).bind(this))},P.prototype._attachPreloadPixel=function(e){var t,n=e.id,i=e.userIdToken,r=this._authorizationInformation.environment,o="https://www.{ENV}paypal.com/smart/buttons/preload".replace("{ENV}","production"===r?"":"sandbox."),s={"client-id":n,"user-id-token":i};e.amount&&(s.amount=e.amount),e.currency&&(s.currency=e.currency),e.merchantId&&(s["merchant-id"]=e.merchantId),(t=new XMLHttpRequest).open("GET",A.queryify(o,s)),t.send()},P.prototype._formatPaymentResourceData=function(e,t){var n=this._configuration.gatewayConfiguration,i={returnUrl:t.returnUrl||"https://www.paypal.com/checkoutnow/error",cancelUrl:t.cancelUrl||"https://www.paypal.com/checkoutnow/error",offerPaypalCredit:!0===e.offerCredit,merchantAccountId:this._merchantAccountId,experienceProfile:{brandName:e.displayName||n.paypal.displayName,localeCode:e.locale,noShipping:(!e.enableShippingAddress).toString(),addressOverride:!1===e.shippingAddressEditable,landingPageType:e.landingPageType},shippingOptions:e.shippingOptions,payer_email:e.userAuthenticationEmail};return e.hasOwnProperty("returnUrl")&&(i.returnUrl=e.returnUrl),e.hasOwnProperty("cancelUrl")&&(i.cancelUrl=e.cancelUrl),e.hasOwnProperty("appSwitchPreference")&&(i.appSwitchPreference=e.appSwitchPreference),e.hasOwnProperty("shippingCallbackUrl")&&(i.shippingCallbackUrl=e.shippingCallbackUrl),e.hasOwnProperty("paymentReadySessionId")&&(i.paymentReadySessionId=e.paymentReadySessionId),e.hasOwnProperty("amountBreakdown")&&(i.amountBreakdown=e.amountBreakdown),e.planType&&(i.planType=e.planType),e.planMetadata&&(i.planMetadata=this._formatPlanMetadata(e.planMetadata)),this._formatPaymentResourceCheckoutData(i,e),this._formatPaymentResourceVaultData(i,e),this._riskCorrelationId=e.riskCorrelationId,e.riskCorrelationId&&(i.correlationId=this._riskCorrelationId),i},P.prototype._formatPaymentResourceVaultData=function(e,t){"checkout"!==t.flow&&(e.shippingAddress=t.shippingAddressOverride,t.billingAgreementDescription&&(e.description=t.billingAgreementDescription),t.hasOwnProperty("userAction")&&(e.experienceProfile.userAction=t.userAction))},P.prototype._formatPaymentResourceCheckoutData=function(e,t){var n,i=t.intent;if("checkout"===t.flow){for(n in e.amount=t.amount,e.currencyIsoCode=t.currency,e.requestBillingAgreement=t.requestBillingAgreement,t.hasOwnProperty("userAction")&&(e.experienceProfile.userAction=t.userAction),i&&("capture"===i&&(i="sale"),e.intent=i),t.hasOwnProperty("lineItems")&&(e.lineItems=t.lineItems),t.hasOwnProperty("vaultInitiatedCheckoutPaymentMethodToken")&&(e.vaultInitiatedCheckoutPaymentMethodToken=t.vaultInitiatedCheckoutPaymentMethodToken),t.hasOwnProperty("shippingOptions")&&(e.shippingOptions=t.shippingOptions),t.shippingAddressOverride)t.shippingAddressOverride.hasOwnProperty(n)&&(e[n]=t.shippingAddressOverride[n]);t.contactPreference&&(e.contactPreference=t.contactPreference),t.hasOwnProperty("billingAgreementDetails")&&(e.billingAgreementDetails=t.billingAgreementDetails),!0===t.editBillingAgreement&&this._configuration.paymentMethodIdJwt&&(e.editBillingAgreementJwt=this._configuration.paymentMethodIdJwt)}},P.prototype._verifyConsistentCurrency=function(e){return!(e.currency&&e.hasOwnProperty("shippingOptions")&&Array.isArray(e.shippingOptions))||e.shippingOptions.every(function(t){return t.amount&&t.amount.currency&&e.currency.toLowerCase()===t.amount.currency.toLowerCase()})},P.prototype._hasMissingOption=function(e,t){var n,i;if(t=t||[],!e.hasOwnProperty("amount")&&!e.hasOwnProperty("lineItems"))return!0;for(n=0;n<t.length;n++)if(i=t[n],!e.hasOwnProperty(i))return!0;return!1},P.prototype._formatPlanMetadata=function(e){var t,n,i,r,o=["currencyIsoCode","name","oneTimeFeeAmount","productDescription","productPrice","productQuantity","shippingAmount","taxAmount","totalAmount"],s=["billingFrequency","billingFrequencyUnit","numberOfExecutions","sequence","startDate","trial","pricingScheme"],a={billingCycles:[]};if(e.hasOwnProperty("billingCycles"))for(t=0,a.billingCycles=[];t<e.billingCycles.length;
1t++){for(n=0,i=e.billingCycles[t],r={};n<s.length;n++)r[s[n]]=i[s[n]];a.billingCycles.push(r)}for(t=0;t<o.length;t++)a[o[t]]=e[o[t]];return a},P.prototype._formatUpdatePaymentData=function(e){var t={merchantAccountId:this._merchantAccountId,paymentId:e.paymentId||e.orderId,currencyIsoCode:e.currency};return e.hasOwnProperty("amount")&&(t.amount=e.amount),e.hasOwnProperty("lineItems")&&(t.lineItems=e.lineItems),e.hasOwnProperty("shippingOptions")&&(t.shippingOptions=e.shippingOptions),e.hasOwnProperty("amountBreakdown")&&(t.amountBreakdown=e.amountBreakdown),e.hasOwnProperty("shippingAddress")&&(i.sendEventPlus(this._clientPromise,"paypal-checkout.updatePayment.shippingAddress.provided.by-the-merchant",{flow:this._flow,context_id:this._contextId}),t.line1=e.shippingAddress.line1,e.shippingAddress.hasOwnProperty("line2")&&(t.line2=e.shippingAddress.line2),t.city=e.shippingAddress.city,t.state=e.shippingAddress.state,t.postalCode=e.shippingAddress.postalCode,t.countryCode=e.shippingAddress.countryCode,e.shippingAddress.hasOwnProperty("phone")&&(t.phone=e.shippingAddress.phone),e.shippingAddress.hasOwnProperty("recipientName")&&(t.recipientName=e.shippingAddress.recipientName)),t},P.prototype._formatTokenizeData=function(e,t){var n=this._configuration,i=n.gatewayConfiguration,r="TOKENIZATION_KEY"===n.authorizationType,o="vault"===e.flow||null==e.flow&&!t.paymentId,s={paypalAccount:{correlationId:this._riskCorrelationId||t.billingToken||t.ecToken,options:{validate:o&&!r&&e.vault}}};return o?s.paypalAccount.billingAgreementToken=t.billingToken:(s.paypalAccount.paymentToken=t.paymentId||t.orderId,s.paypalAccount.payerId=t.payerId,s.paypalAccount.unilateral=i.paypal.unvettedMerchant,e.intent&&(s.paypalAccount.intent=e.intent)),this._merchantAccountId&&(s.merchantAccountId=this._merchantAccountId),s},P.prototype._formatTokenizePayload=function(e){var t,n={};return e.paypalAccounts&&(n=e.paypalAccounts[0]),t={nonce:n.nonce,details:{},type:n.type},n.details&&n.details.payerInfo&&(t.details=n.details.payerInfo),n.details&&n.details.creditFinancingOffered&&(t.creditFinancingOffered=n.details.creditFinancingOffered),n.details&&n.details.shippingOptionId&&(t.shippingOptionId=n.details.shippingOptionId),n.details&&n.details.cobrandedCardLabel&&(t.cobrandedCardLabel=n.details.cobrandedCardLabel),t},P.prototype.teardown=function(){var e=this;return y(this,_(P.prototype)),this._paypalScript&&this._paypalScript.parentNode&&this._paypalScript.parentNode.removeChild(this._paypalScript),this._frameServicePromise.catch(function(){}).then(function(){return e._frameService?e._frameService.teardown():Promise.resolve()})},t.exports=c.wrapPrototype(P)},{"../lib/analytics":49,"../lib/assign":52,"../lib/braintree-error":54,"../lib/constants":55,"../lib/convert-methods-to-error":56,"../lib/convert-to-braintree-error":57,"../lib/create-assets-url":58,"../lib/create-authorization-data":59,"../lib/create-deferred-client":60,"../lib/frame-service/external":65,"../lib/methods":77,"../lib/querystring":78,"../lib/use-min":79,"../paypal/shared/constants":84,"./errors":81,"@braintree/extended-promise":20,"@braintree/wrap-promise":29}],84:[function(e,t,n){"use strict";t.exports={LANDING_FRAME_NAME:"braintreepaypallanding",FLOW_ENDPOINTS:{checkout:"create_payment_resource",vault:"setup_billing_agreement"},REQUIRED_OPTIONS:["paymentId","currency"],ENVIRONMENT:{stage:"https://www.msmaster.qa.paypal.com/sdk/js?",sandbox:"https://www.sandbox.paypal.com/sdk/js?",teBraintree:"https://www.braintree.stage.paypal.com/sdk/js?"},BT_INTEGRATION_SOURCE:"BRAINTREE_WEB_SDK",CREATE_BILLING_AGREEMENT_JWT_MUTATION:"mutation CreateBillingAgreementJwt($input: CreateBillingAgreementJwtInput!) { createBillingAgreementJwt(input: $input) { jwt } }"}},{}]},{},[82])(82)},e.exports=t()}}]);
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.