!function(e){function t(t){for(var n,a,o=t[0],i=t[1],c=0,u=[];c1&&void 0!==arguments[1]?arguments[1]:[];return{type:"valid",value:e,warnings:t}},h=function(e){return{error:e,errorType:"full",type:"error"}},b=function(e,t,n){var r=new i.a(m(e,t,n));return h(r)},y=function(e,t,n){return{expected:e,actual:String(t),options:n,errorType:"mismatch",type:"error"}},v=function(e,t){return Object(o.a)(Object(o.a)({},e),{},{path:[].concat(Object(a.a)(e.path),[t])})},g=function(e){return function(t,n){return void 0===t?_(t):e(t,n)}},O=function(e){return function(t,n){return null===t?_(t):e(t,n)}},j=function(e,t){return function(n,r){var a=function(e){var t=e.options.path.join(".")||"value";return{error:"".concat(t," should be ").concat(e.expected),actual:"".concat(t," as ").concat(e.actual)}},o=function(e,t,n){return h(new i.a("Invalid value for ".concat(e,": ").concat(t,". You specified ").concat(n,".")))},c=e(n,r),s=t(n,r);if("error"===c.type&&"error"===s.type){if("mismatch"===c.errorType&&"mismatch"===s.errorType){var u=a(c),l=u.error,p=u.actual,d=a(s),f=d.error,m=d.actual;return o(r.label,l===f?l:"".concat(l," or ").concat(f),p===m?p:"".concat(p," and ").concat(m))}if("mismatch"===c.errorType){var _=a(c),b=_.error,y=_.actual;return o(r.label,b,y)}if("mismatch"===s.errorType){var v=a(s),g=v.error,O=v.actual;return o(r.label,g,O)}return h(c.error)}return"valid"===c.type?c:s}},E=function(e,t){return function(n,r){return n instanceof e?_(n):y("a ".concat(t," instance"),n,r)}},w=function(e,t){return function(n,r){var a=Object(s.a)(e,(function(e){return e===n}));if(void 0===a){var o=t?"a recognized string.":"one of the following strings: ".concat(e.join(", "));return y(o,n,r)}return _(a)}},k=function(e){return function(t,n){return"string"==typeof t&&0===t.indexOf(e)?_(t):y("a string starting with ".concat(e),t,n)}},P=function(e,t){return function(n,r){return"string"==typeof n&&n.length>=e&&n.length<=t?_(n):y(e===t?"a string of ".concat(e," characters"):"a string with ".concat(e," to ").concat(t," characters"),n,r)}},S=function(){for(var e=arguments.length,t=new Array(e),n=0;ne?_(t):y("a number greater than ".concat(e),t,n)}},D=function(e){return function(t,n){return"number"==typeof t&&t===parseInt(t,10)&&(!e||t>=0)?_(t):y(e?"a positive amount in the currency's subunit":"an amount in the currency's subunit",t,n)}},q=function(e,t){return D(!1)(e,t)},B=function(e,t){return D(!0)(e,t)},F=function(e,t){return e&&"object"==typeof e?_(e):y("an object",e,t)},U=function(e){return function(t,n){return Array.isArray(t)?t.map((function(t,r){return e(t,v(n,String(r)))})).reduce((function(e,t){return"error"===e.type?e:"error"===t.type?t:_([].concat(Object(a.a)(e.value),[t.value]),[].concat(Object(a.a)(e.warnings),Object(a.a)(t.warnings)))}),_([])):y("array",t,n)}},Y=function(e){return function(t){return function(n,r){if(Array.isArray(n)){var a=t(n,r);if("valid"===a.type)for(var o={},c=0;c-1})):e.indexOf(t)>-1}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return u}));var r,a=n(6),o=n(4),i={alipay:"alipay",affirm:"affirm",afterpay_clearpay:"afterpay_clearpay",au_becs_debit:"au_becs_debit",acss_debit:"acss_debit",bacs_debit:"bacs_debit",bancontact:"bancontact",blik:"blik",boleto:"boleto",card:"card",customer_balance:"customer_balance",eps:"eps",fpx:"fpx",giropay:"giropay",grabpay:"grabpay",ideal:"ideal",klarna:"klarna",konbini:"konbini",nz_bank_account:"nz_bank_account",oxxo:"oxxo",p24:"p24",paypal:"paypal",sepa_debit:"sepa_debit",sofort:"sofort",three_d_secure:"three_d_secure",upi:"upi",us_bank_account:"us_bank_account",wechat_pay:"wechat_pay",paynow:"paynow",pix:"pix",promptpay:"promptpay",netbanking:"netbanking",id_bank_transfer:"id_bank_transfer",link:"link",apple_pay:"apple_pay",google_pay:"google_pay"},c=(r={},Object(a.a)(r,o.b.auBankAccount,i.au_becs_debit),Object(a.a)(r,o.b.card,i.card),Object(a.a)(r,o.b.cardNumber,i.card),Object(a.a)(r,o.b.cardExpiry,i.card),Object(a.a)(r,o.b.cardCvc,i.card),Object(a.a)(r,o.b.postalCode,i.card),Object(a.a)(r,o.b.iban,i.sepa_debit),Object(a.a)(r,o.b.idealBank,i.ideal),Object(a.a)(r,o.b.fpxBank,i.fpx),Object(a.a)(r,o.b.p24Bank,i.p24),Object(a.a)(r,o.b.netbankingBank,i.netbanking),Object(a.a)(r,o.b.epsBank,i.eps),r),s=function(e){return-1===o.m.indexOf(e)},u=function(e,t){return null!=t?t:s(e)?null:c[e]||null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(46);var a=n(48),o=n(41);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(a.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"absurd";throw new Error(t)}},function(e,t,n){"use strict";n.d(t,"e",(function(){return o})),n.d(t,"f",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return u})),n.d(t,"a",(function(){return l}));var r=n(1),a=n(9),o=(n(4),function(e,t){switch(e.type){case"object":return{paymentIntent:e.object};case"error":var n=t?{payment_intent:t}:{};return{error:Object(r.a)(Object(r.a)({},n),e.error)};default:return Object(a.a)(e)}}),i=function(e,t){switch(e.type){case"error":return{error:Object(r.a)(Object(r.a)({},t?{setup_intent:t}:{}),e.error)};case"object":return{setupIntent:e.object};default:return Object(a.a)(e)}},c=function(e){var t=e.trim().match(/^((seti|pi)_[^_]+)_secret_[^-]+$/);return t?"pi"===t[2]?{id:t[1],clientSecret:t[0],type:"PAYMENT_INTENT"}:{id:t[1],clientSecret:t[0],type:"SETUP_INTENT"}:null},s=function(e){return"payment_intent"===e.object?{id:e.id,clientSecret:e.client_secret,type:"PAYMENT_INTENT"}:{id:e.id,clientSecret:e.client_secret,type:"SETUP_INTENT"}},u=function(e){return"requires_source_action"===e||"requires_action"===e},l=function(e){return"requires_source_action"===e.status||"requires_action"===e.status?e.next_action:null}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"h",(function(){return l})),n.d(t,"i",(function(){return p})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return m})),n.d(t,"j",(function(){return _})),n.d(t,"d",(function(){return h})),n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return y})),n.d(t,"c",(function(){return v}));var r=n(22),a=n(0),o=n(29),i=n(3),c=n(7),s=n(19),u=function(e){var t=e.split(/(?=[A-Z])/).join("-").toLowerCase();return"https://stripe.com/docs/stripe-js/reference#stripe-".concat(t)},l=function(e,t){return Object(a.E)(s.g,e,"stripe.".concat(t," intent secret")).value},p=function(e,t){return Object(a.E)(s.h,e,"stripe.".concat(t," intent secret")).value},d=function(e){if(!e||!e.payment_method||!e.payment_method.type||"string"!=typeof e.payment_method.type)return null;var t=e.payment_method.type;return c.b[t]||null},f=function(e,t){return Object(a.E)(s.b,t,e).value},m=function(e,t,n,r){if("valid"===Object(a.F)(o.c,n,t).type)throw new i.a("Do not pass an Element to stripe.".concat(t,"() directly.\n")+"For more information: ".concat(u(t)));var c=Object(a.E)(Object(s.c)(e,t),n,t).value,l=c.source,p=c.paymentMethodData,d=c.paymentMethodOptions,f=c.paymentMethod,m=c.otherParams;if(null!=l&&(null!=p||null!=f))throw new i.a("".concat(t,": Expected either source or payment_method, but not both."));if(p){if(p.element)return{mode:{tag:"paymentMethod-from-element",type:e,elementName:p.element._componentName,frameId:p.element._implementation._frame.id,data:p.data,options:d,intentSecret:r},otherParams:m};if(e)return{mode:{tag:"paymentMethod-from-data",type:e,data:p.data,options:d,intentSecret:r},otherParams:m}}else{if(f)return{mode:{tag:"paymentMethod",paymentMethod:f,options:d,intentSecret:r},otherParams:m};if(l)return{mode:{tag:"source",source:l,intentSecret:r},otherParams:m}}return{mode:{tag:"none",intentSecret:r},otherParams:m}},_=function(e,t){if("object"==typeof e&&null!==e&&void 0!==e.handleActions)throw new i.a("stripe.".concat(t," does not support a handleActions option. For more information, see ").concat(u(t)))},h=function(e,t){var n=e.split("#"),a=Object(r.a)(n,2),o=a[0],i=a[1],c=o.split("?"),s=Object(r.a)(c,2),u=s[0],l=s[1],p="?",d="payment_intent"===t.object?["payment_intent","payment_intent_client_secret","redirect_status"]:["setup_intent","setup_intent_client_secret","redirect_status"];(l||"").split("&").forEach((function(e,t){var n=e.split("="),a=Object(r.a)(n,1)[0];-1===d.indexOf(a)&&(p+="".concat("?"===p?"":"&").concat(e))}));var f="payment_intent"===t.object?"payment":"setup";p+="".concat("?"===p?"":"&").concat(f,"_intent=").concat(t.id),p+="&".concat(f,"_intent_client_secret=").concat(t.client_secret);var m=u+(p+="&redirect_status=succeeded");return i?"".concat(m,"#").concat(i):m},b={type:"validation_error",code:"incomplete_payment_details"},y={type:"instant_verification_error",code:"instant_verification"},v={type:"validation_error",code:"unexpected"}},function(e,t,n){"use strict";t.a=function(e){return"".concat("https://js.stripe.com/v3/").concat(e||"")}},function(e,t,n){"use strict";var r={card:"card",cardNumber:"cardNumber",cardExpiry:"cardExpiry",cardCvc:"cardCvc",postalCode:"postalCode",iban:"iban",idealBank:"idealBank",p24Bank:"p24Bank",paymentRequestButton:"paymentRequestButton",auBankAccount:"auBankAccount",fpxBank:"fpxBank",netbankingBank:"netbankingBank",epsBank:"epsBank",affirmMessage:"affirmMessage",afterpayClearpayMessage:"afterpayClearpayMessage",linkAuthentication:"linkAuthentication",payment:"payment",shippingAddress:"shippingAddress",idealBankSecondary:"idealBankSecondary",p24BankSecondary:"p24BankSecondary",auBankAccountNumber:"auBankAccountNumber",auBsb:"auBsb",fpxBankSecondary:"fpxBankSecondary",netbankingBankSecondary:"netbankingBankSecondary",issuingCardNumberDisplay:"issuingCardNumberDisplay",issuingCardCopyButton:"issuingCardCopyButton",issuingCardCvcDisplay:"issuingCardCvcDisplay",issuingCardExpiryDisplay:"issuingCardExpiryDisplay",epsBankSecondary:"epsBankSecondary",affirmMessageModal:"affirmMessageModal",afterpayClearpayMessageModal:"afterpayClearpayMessageModal"};t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(11),a=n(20),o=Date.now?function(){return Date.now()}:function(){return(new Date).getTime()},i=o(),c=window.performance&&window.performance.now?function(){return window.performance.now()}:function(){return o()-i},s=function(){function e(t){Object(r.a)(this,e),this.timestampValue=null!=t?t:c()}return Object(a.a)(e,[{key:"getAsPosixTime",value:function(){return o()-this.getElapsedTime()}},{key:"getElapsedTime",value:function(e){return Math.round((e?e.timestampValue:c())-this.timestampValue)}},{key:"valueOf",value:function(){return Math.round(this.timestampValue)}}],[{key:"fromPosixTime",value:function(t){return new e(t-o()+c())}}]),e}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t element.");return document.body},f=function(e){return requestAnimationFrame((function(){requestAnimationFrame(e)}))},m=function(e,t){return!!e.documentElement&&e.documentElement.contains(t)},_="isConnected"in window.Node.prototype?function(e,t){return t.isConnected&&t.ownerDocument===e}:m,h=function(e,t){return!m(e,t)&&_(e,t)}},function(e,t,n){"use strict";n.d(t,"f",(function(){return m})),n.d(t,"g",(function(){return _})),n.d(t,"h",(function(){return h})),n.d(t,"e",(function(){return b})),n.d(t,"d",(function(){return y})),n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return g})),n.d(t,"c",(function(){return O}));var r=n(1),a=n(8),o=n(38);function i(e){var t=function(e,t){if("object"!==Object(o.a)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Object(o.a)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Object(o.a)(t)?t:String(t)}var c=n(12),s=n(3),u=n(0),l=n(29),p=n(4),d=n(7),f=n(10),m=function(e,t){if("string"!=typeof e)return Object(u.i)("a client_secret string",e,t);var n=Object(f.b)(e);return null===n?Object(u.i)("a client secret of the form ${id}_secret_${secret}",e,t):Object(u.D)(n,[])},_=function(e,t){var n=m(e,t);return"error"===n.type?n:n.value.type===p.g.SETUP_INTENT?Object(u.f)(new s.a(Object(u.B)("a PaymentIntent client secret","a SetupIntent client secret",t))):Object(u.D)(n.value,[])},h=function(e,t){var n=m(e,t);return"error"===n.type?n:n.value.type===p.g.PAYMENT_INTENT?Object(u.f)(new s.a(Object(u.B)("a SetupIntent client secret","a PaymentIntent client secret",t))):Object(u.D)(n.value,[])},b=function(e,t){if(null===e)return Object(u.g)("object","null",t);if("object"!=typeof e)return Object(u.g)("object",typeof e,t);var n=e.client_secret,r=e.status,a=e.next_action,o=m(n,Object(u.e)(t,"client_secret"));if("error"===o.type)return o;if("string"!=typeof r)return Object(u.g)("string",typeof r,Object(u.e)(t,"status"));if(("requires_source_action"===r||"requires_action"===r)&&"object"!=typeof a)return Object(u.g)("object",typeof a,Object(u.e)(t,"next_action"));if("payment_intent"===e.object){var i=e;return Object(u.D)(i,[])}var c=e;return Object(u.D)(c,[])},y=function(e){return function(t,n){if("object"!=typeof t)return Object(u.g)("object",typeof t,n);if(null===t)return Object(u.g)("object","null",n);var r,o=t.type,p=Object(c.a)(t,["type"]);if(null===e){if("string"!=typeof o)return Object(u.g)("a string such as 'card', 'ideal', or 'sepa_debit'",typeof o,Object(u.e)(n,"type"));r=o}else{if(void 0!==o&&o!==e)return"string"!=typeof o?Object(u.g)("a string such as 'card', 'ideal', or 'sepa_debit'",typeof o,Object(u.e)(n,"type")):Object(u.g)('"'.concat(o,'"'),'"'.concat(e,'"'),Object(u.e)(n,"type"));r=e}var f=p[r],m=(p[r],Object(c.a)(p,[r].map(i)));if(-1!==["acss_debit","affirm","afterpay_clearpay","alipay","bancontact","customer_balance","eps","giropay","grabpay","klarna","konbini","oxxo","p24","paynow","paypal","us_bank_account","wechat_pay","paynow","promptpay"].indexOf(r)&&void 0===f&&(f={}),"object"!=typeof f)return Object(u.g)("an object or element",typeof t[r],Object(u.e)(n,r));if(null===f)return Object(u.g)("an object or element","null",Object(u.e)(n,r));var _=Object(l.a)(f);if(_){var h=_._componentName;if(d.a[h]!==r){var b=[].concat(Object(a.a)(n.path),[r]).join("."),y=n.label,v=new s.a("Invalid value for ".concat(y,": ").concat(b," was `").concat(h,"` Element, which cannot be used to create ").concat(r," PaymentMethods."));return Object(u.f)(v)}return Object(u.D)({type:r,element:_,data:m})}return Object(u.D)({type:r,element:null,data:p})}},v=Object(u.G)(Object(u.u)({handleActions:Object(u.G)(u.b,(function(){return!0}))}),(function(){return{handleActions:!0}})),g=function(e){return function(t,n){return"object"!=typeof t?Object(u.g)("object",typeof t,n):null===t?Object(u.g)("object","null",n):Object(u.D)({type:"".concat(e),billing_details:t.billing_details})}},O=function(e,t){return function(n,o){if(void 0===n)return Object(u.D)({paymentMethodData:null,paymentMethodOptions:null,source:null,paymentMethod:null,otherParams:{}});if("object"!=typeof n)return Object(u.g)("object",typeof n,o);if(null===n)return Object(u.g)("object","null",o);var i=n.source,d=n.source_data,f=n.payment_method_data,m=n.payment_method_options,_=n.payment_method,h=Object(c.a)(n,["source","source_data","payment_method_data","payment_method_options","payment_method"]);if(null!=d)throw new s.a("".concat(t,": Expected payment_method, or source, not source_data."));if(null!=f)throw new s.a("".concat(t,": Expected payment_method, or source, not payment_method_data."));if(null!=i&&null!=_)throw new s.a("".concat(t,": Expected either payment_method or source, but not both."));if(null===e&&null!=_&&"string"!=typeof _)throw new s.a("".concat(t,": Expected payment_method[type] to be set if payment_method is passed."));if(null!=i){if("string"!=typeof i)return Object(u.g)("string",typeof i,Object(u.e)(o,"source"));if("updatePaymentIntent"===t)throw new s.a("".concat(t,": Expected payment_method, not source to be passed."));return Object(u.D)({source:i,paymentMethodData:null,paymentMethodOptions:null,paymentMethod:null,otherParams:h})}if(null!=_&&"string"!=typeof _&&"object"!=typeof _)return Object(u.g)("string or object",typeof _,Object(u.e)(o,"payment_method"));var b,v=Object(u.F)((b=e,function(e,t){if(null==e)return Object(u.D)(null);if("object"!=typeof e)return Object(u.g)("object",typeof e,t);var n=e.card,a=Object(c.a)(e,["card"]);if(!n||"object"!=typeof n)return Object(u.D)(e);var o=n.cvc,i=Object(c.a)(n,["cvc"]);if(null==o)return Object(u.D)(e);var s=Object(l.a)(o),d=s?s._componentName:"";return p.b.cardCvc!==d?Object(u.g)("`".concat(p.b.cardCvc,"` Element"),d?"`".concat(d,"` Element"):typeof o,Object(u.e)(t,"".concat(b||"card",".cvc"))):Object(u.D)(Object(r.a)(Object(r.a)({},a),{},{card:Object(r.a)(Object(r.a)({},i),{},{cvc:s})}))}),m,t,{path:[].concat(Object(a.a)(o.path),["payment_method_options"])});if("error"===v.type)return v;if("string"==typeof _)return Object(u.D)({source:null,paymentMethodData:null,paymentMethodOptions:v.value,paymentMethod:_,otherParams:h});if("object"==typeof _&&null!==_){var g=Object(u.F)(y(e),_,t,{path:[].concat(Object(a.a)(o.path),["payment_method"])});if("error"===g.type)return g;var O=g.value;return Object(u.D)({source:null,paymentMethod:null,paymentMethodOptions:v.value,paymentMethodData:O,otherParams:h})}return Object(u.D)({source:null,paymentMethodData:null,paymentMethodOptions:null,paymentMethod:null,otherParams:h})}}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=0},o=Object.keys(r)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i}));var r=n(28),a=function(e,t){var n=Object(r.d)(e),a=Object(r.d)(t);return!(!n||!a)&&n.origin===a.origin},o=function(e){return a(e,"https://js.stripe.com/v3/")},i=function(e){return o(e)||function(e){var t=Object(r.d)(e),n=t?t.host:"";return"stripe.com"===n||!!n.match(/\.stripe\.(com|me)$/)}(e)}},function(e,t,n){"use strict";var r=n(8);t.a=function e(t,n){var a=[];return Object.keys(t).forEach((function(o){var i=t[o],c=n?"".concat(n,"[").concat(o,"]"):o;if(i&&"object"==typeof i){var s=e(i,c);""!==s&&(a=[].concat(Object(r.a)(a),[s]))}else null!=i&&(a=[].concat(Object(r.a)(a),["".concat(c,"=").concat(encodeURIComponent(String(i)))]))})),a.join("&").replace(/%20/g,"+")}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return u}));var r=n(33),a=n(21),o=n(43),i=function(){return Array.prototype.slice.call(document.querySelectorAll("a[href], area[href], input:not([disabled]),\n select:not([disabled]), textarea:not([disabled]), button:not([disabled]),\n object, embed, *[tabindex], *[contenteditable]")).filter((function(e){var t=e.getAttribute("tabindex"),n=!t||parseInt(t,10)>=0,r=e.getBoundingClientRect(),a=Object(o.a)(e),i=r.width>0&&r.height>0&&a&&"hidden"!==a.getPropertyValue("visibility");return n&&i}))},c=function(e,t){var n=i();return n[Object(a.b)(n,(function(t){return t===e||e.contains(t)}))+("previous"===t?-1:1)]},s=function(e,t){return e.then((function(){return Object(a.d)(t,(function(e){var t=e.element,n=e.tabIndex;""===n?t.removeAttribute("tabindex"):t.setAttribute("tabindex",n)}))}))},u=function(e){var t=[],n=Object(a.d)(document.querySelectorAll("*"),(function(n){var r=n.getAttribute("tabindex")||"";e!==n&&(n.tabIndex=-1),t.push({element:n,tabIndex:r})})),o=Object(r.c)((function(){s(n,t)}));return{lockedPromise:n,lockedElements:t,restoreFocus:o}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r={margin:"0",padding:"0",border:"none",display:"block",background:"transparent",position:"relative",opacity:"1"},a={border:"none",display:"block",position:"absolute",height:"1px",top:"-1px",left:"0",padding:"0",margin:"0",width:"100%",opacity:"0",background:"transparent","pointer-events":"none","font-size":"16px"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(46);function a(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=function(e,t){return e?window.getComputedStyle(e,t):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(30),a=n(42);var o=n(49);function i(e,t,n){return(i=Object(o.a)()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Object(a.a)(o,n.prototype),o}).apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return i(e,arguments,Object(r.a)(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(a.a)(o,e)})(e)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return c}));var r=n(1),a=(n(9),n(4)),o=n(18),i=function(e){var t,n=e.controllerId,i=e.frameId,c=e.targetOrigin,s=e.type,u=c;"controller"===s?t=Object(o.e)(i):"group"===s?t=Object(o.e)(n):"outer"===s||"hosted"===s?t=window.frames[i]:"inner"===s&&(u=u||"*",t=window.parent),u=u||a.k,t&&"function"==typeof t.postMessage&&t.postMessage(JSON.stringify(Object(r.a)(Object(r.a)({},e),{},{__stripeJsV3:!0})),u)},c=function(e){try{var t="string"==typeof e?JSON.parse(e):e;return t.__stripeJsV3?t:null}catch(e){return null}}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1)throw new m.a("stripe.redirectToCheckout: Do not provide other parameters when providing sessionId. Specify all parameters on your server when creating the CheckoutSession.");if(!/^cs_/.test(l))throw new m.a("stripe.redirectToCheckout: Invalid value for sessionId. You specified '".concat(l,"'."));if("live"===n&&/^cs_test_/.test(l))throw new m.a("stripe.redirectToCheckout: the provided sessionId is for a test mode Checkout Session, whereas Stripe.js was initialized with a live mode publishable key.");if("test"===n&&/^cs_live_/.test(l))throw new m.a("stripe.redirectToCheckout: the provided sessionId is for a live mode Checkout Session, whereas Stripe.js was initialized with a test mode publishable key.");return{tag:"session",sessionId:l}}c.sessionId,c.sku,c.plan;var d=c.items,f=c.lineItems,_=c.successUrl,b=c.cancelUrl,y=c.mode,v=Object(r.a)(c,["sessionId","sku","plan","items","lineItems","successUrl","cancelUrl","mode"]);if(!f&&!d)throw new m.a("stripe.redirectToCheckout: You must provide one of lineItems, items, or sessionId.");if(!_||!b)throw new m.a("stripe.redirectToCheckout: You must provide successUrl and cancelUrl.");return Object(a.a)({tag:"no-session",items:d,lineItems:f,successUrl:_,cancelUrl:b,mode:y},v)},g=function(e,t,n){var r=v(e,t,n);if("no-session"===r.tag){var a=r.successUrl,o=r.cancelUrl;if(!Object(_.b)(a))throw new m.a("stripe.redirectToCheckout: successUrl must start with either http:// or https://.");if(!Object(_.b)(o))throw new m.a("stripe.redirectToCheckout: cancelUrl must start with either http:// or https://.");return r}return r},O=function(e,t){return"session"===t.tag||null==e||t.locale||-1===["auto"].concat(Object(o.a)(s)).indexOf(e)?t:Object(a.a)(Object(a.a)({},t),{},{locale:e})},j=function(e,t,n){var r=Object(d.a)(l.b,(function(t){return Object(f.d)(e,t)}));if(t&&t.lineItems&&r)throw new m.a("Prices cannot be used with ".concat(r));if("string"==typeof t&&b.test(t))throw new m.a("stripe.redirectToCheckout: Checkout Session IDs must be passed in as an object with a key of `sessionId` and the Session ID as the value.");switch(r){case"checkout_beta_2":return y(0,t);case"checkout_beta_3":return v(e,t,n);case"checkout_beta_4":default:return g(e,t,n)}};t.a=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unknown";return O(t,j(e,n,r))}},function(e,t,n){e.exports=n(77)},function(e,t,n){"use strict";(function(t){function n(e){a.length||(r(),!0),a[a.length]=e}e.exports=n;var r,a=[],o=0;function i(){for(;o1024){for(var t=0,n=a.length-o;t1)for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:"";return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"00000000-0000-4000-8000-000000000000".replace(/[08]/g,e)},b=n(24),y=n(25),v=n(37),g=n(45),O=n(3),j=(n(71),/https?:\/\/([^/]*)\/[^:]*/g),E=function(e,t,n,r){var a,o,i,c=e._isUserError||"IntegrationError"===e.name;throw t&&!c&&t.report("fatal.uncaught_error",{iframe:!1,name:e.name,element:"outer",message:e.message||e.description,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,stack:e.stack&&(a=e.stack,o=a.match(j),i=a,o&&o.forEach((function(e){-1===e.indexOf("https://js.stripe.com")&&(i=i.replace(e,""))})),i.substring(0,1e3)),inPromise:n,apiMethodName:r}),e},w=function(e,t,n){return function(r){try{return e.call(this,r)}catch(e){return E(e,t||this&&this._controller,!1,n)}}},k=function(e,t,n){return function(r,a){try{return e.call(this,r,a)}catch(e){return E(e,t||this&&this._controller,!1,n)}}},P=function(e,t,n){return function(r){var a=this;try{return e.call(this,r).catch((function(e){return E(e,t||a&&a._controller,!0,n)}))}catch(e){return E(e,t||this&&this._controller,!1,n)}}},S=function(e,t,n){return function(r,a){var o=this;try{return e.call(this,r,a).catch((function(e){return E(e,t||o&&o._controller,!0,n)}))}catch(e){return E(e,t||this&&this._controller,!1,n)}}},A=function(e,t,n){return function(r,a,o){var i=this;try{return e.call(this,r,a,o).catch((function(e){return E(e,t||i&&i._controller,!0,n)}))}catch(e){return E(e,t||this&&this._controller,!1,n)}}},T=function e(){var t=this;Object(o.a)(this,e),this._emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a0},this._off=function(e,n){if(n){for(var r,a=t._callbacks[e],o=0;o element.");this.autoload&&(this.loaded=!0)}},{key:"_createIFrame",value:function(e,t,r){var a=R(Object(N.a)(n.prototype),"_createIFrame",this).call(this,e,t,r);return a.setAttribute("aria-hidden","true"),a.setAttribute("tabIndex","-1"),Object(x.c)(a),a}}]),n}(I),L=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"_generateId",value:function(){return this._controllerId}}]),n}(M),D=function(e){return/Edge\//i.test(e)},q=function(e){return/Edg\//i.test(e)},B=function(e){return/(MSIE ([0-9]{1,}[.0-9]{0,})|Trident\/)/i.test(e)},F=function(e){return/SamsungBrowser/.test(e)},U=function(e){return/iPad|iPhone/i.test(e)&&!B(e)},Y=function(e){return/^((?!chrome|android).)*safari/i.test(e)&&!F(e)},G=function(e){return/Android/i.test(e)&&!B(e)},H=window.navigator.userAgent,z=D(H),W=q(H),K=(/Edge\/((1[0-6]\.)|0\.)/i.test(H),B(H)),V=(function(e){/MSIE ([0-9]{1,}[.0-9]{0,})/i.test(e)}(H),U(H)),J=(function(e){/iPad/i.test(e)&&B(e)}(H),function(e){U(e)||G(e)}(H),G(H)),$=(function(e){/Android 4\./i.test(e)&&!/Chrome/i.test(e)&&G(e)}(H),Y(H)),Z=(function(e){Y(e)&&U(e)}(H),function(e){return/Firefox\//i.test(e)}(H)),X=(function(e){/Firefox\/(50|51|[0-4]?\d)([^\d]|$)/i.test(e)}(H),F(H)),Q=function(e){return/Chrome\//i.test(e)}(H),ee=(function(e){/Chrome\/(6[6-9]|[7-9]\d+|[1-9]\d{2,})/i.test(e)}(H),function(e){return/AppleWebKit/i.test(e)&&!/Chrome/i.test(e)&&!D(e)&&!B(e)}(H)),te=function(e){return/Chrome/i.test(e)&&!D(e)}(H),ne=(function(e){/CriOS/i.test(e)}(H),$&&"download"in document.createElement("a")),re=(!!window.navigator.brave&&window.navigator.brave.isBrave,{border:"none",margin:"0",padding:"0",width:"1px","min-width":"100%",overflow:"hidden",display:"block","user-select":"none",transform:"translate(0)"}),ae=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e){var r;return Object(o.a)(this,n),r=t.call(this,e),$&&r._listenerRegistry.addEventListener(document,"transitionstart",(function(e){switch(e.propertyName){case"opacity":case"transform":case"visibility":var t=e.target;r._isMounted()&&t.contains(r._iframe)&&r._forceRepaint()}}),{passive:!0}),r}return Object(i.a)(n,[{key:"update",value:function(e){this.send({action:"stripe-user-update",payload:e})}},{key:"updateStyle",value:function(e){var t=this;Object.keys(e).forEach((function(n){t._iframe.style[n]=e[n]}))}},{key:"focus",value:function(){this.loaded&&($?this._iframe.focus():this.send({action:"stripe-user-focus",payload:{}}))}},{key:"blur",value:function(){this.loaded&&(this._iframe.contentWindow.blur(),this._iframe.blur(),document.activeElement===this._iframe&&(window.focus(),document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()))}},{key:"clear",value:function(){this.send({action:"stripe-user-clear",payload:{}})}},{key:"collapse",value:function(){this.send({action:"stripe-user-collapse",payload:{}})}},{key:"_createIFrame",value:function(e,t,r){var a=R(Object(N.a)(n.prototype),"_createIFrame",this).call(this,e,t,r);return a.setAttribute("title","Secure payment input frame"),Object(x.d)(a,re),a}},{key:"_forceRepaint",value:function(){var e=this._iframe,t=e.style.display;e.style.display="none";var n=e.offsetHeight;return e.style.display=t,n}}]),n}(I),oe=n(53),ie=n(39),ce={display:"block",position:"fixed","z-index":"2147483647",background:"rgba(40,40,40,0)",transition:"background 400ms ease","will-change":"background",top:"0",left:"0",right:"0",bottom:"0"},se=Object(r.a)(Object(r.a)({},ce),{},{background:"rgba(40,40,40,0.75)"}),ue=function e(t){var n=this,r=t.lockScrolling,a=t.lockFocus,i=t.lockFocusOn,c=t.listenerRegistry;Object(o.a)(this,e),this.domElement=document.createElement("div"),this._runOnHide=[],this.mount=function(){var e=Object(x.a)();n.domElement.style.display="none",e.contains(n.domElement)||e.insertBefore(n.domElement,e.firstChild)},this.show=function(){if(Object(x.d)(n.domElement,ce),n._lockScrolling){var e=Object(oe.a)();n._runOnHide.push(e)}if(n._lockFocus){var t=Object(ie.a)(n._lockFocusOn).restoreFocus;n._runOnHide.push(t)}},this.fadeIn=function(){setTimeout((function(){Object(x.d)(n.domElement,se)}))},this.fadeOut=function(){return new u.a((function(e){Object(x.d)(n.domElement,ce),setTimeout(e,500),n._listenerRegistry.addEventListener(n.domElement,"transitionend",e)})).then((function(){for(n.domElement.style.display="none";n._runOnHide.length;)n._runOnHide.pop()()}))},this.unmount=function(){Object(x.a)().removeChild(n.domElement)},this._lockScrolling=!!r,this._lockFocus=!!a,this._lockFocusOn=i||null,this._listenerRegistry=c},le={position:"absolute",left:"0",top:"0",height:"100%",width:"100%"},pe=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e){var r,a,i,c=e.type,s=e.controllerId,u=e.listenerRegistry,l=e.options;return Object(o.a)(this,n),(i=t.call(this,{type:c,controllerId:s,listenerRegistry:u,appParams:l}))._autoMount=function(){i.appendTo(i._backdrop.domElement),i._backdrop.mount()},i.show=function(){i._backdrop.show(),Object(x.d)(i._iframe,le),i.isVisible=!0},i.fadeInBackdrop=function(){i._backdrop.fadeIn()},i._backdropFadeoutPromise=null,i.fadeOutBackdrop=function(){return i._backdropFadeoutPromise||(i._backdropFadeoutPromise=i._backdrop.fadeOut()),i._backdropFadeoutPromise.then((function(){i._backdropFadeoutPromise=null}))},i.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=i.fadeOutBackdrop().then((function(){i._backdrop.unmount(),e||R((r=Object(C.a)(i),Object(N.a)(n.prototype)),"destroy",r).call(r)}));return e&&R((a=Object(C.a)(i),Object(N.a)(n.prototype)),"destroy",a).call(a),i.isVisible=!1,t},i._backdrop=new ue({lockScrolling:!0,lockFocus:!0,lockFocusOn:i._iframe,listenerRegistry:u}),i._autoMount(),i.isVisible=!1,i}return n}(I),de={display:"block",position:"absolute","z-index":"1000",width:"1px","min-width":"100%",margin:"2px 0 0 0",padding:"0",border:"none",overflow:"hidden"},fe=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"updateStyle",value:function(e){var t=this;Object.keys(e).forEach((function(n){t._iframe.style[n]=e[n]}))}},{key:"update",value:function(e){this.send({action:"stripe-user-update",payload:e})}},{key:"_createIFrame",value:function(e,t,a){var o=R(Object(N.a)(n.prototype),"_createIFrame",this).call(this,e,t,a&&"object"==typeof a?Object(r.a)(Object(r.a)({},a),{},{isSecondaryFrame:!0}):a);return Object(x.d)(o,de),o.style.height="0",o}}]),n}(I),me=n(36),_e=["button","checkbox","file","hidden","image","submit","radio","reset"],he=function(e){var t=e.tagName;if(e.isContentEditable||"TEXTAREA"===t)return!0;if("INPUT"!==t)return!1;var n=e.getAttribute("type");return-1===_e.indexOf(n)},be=n(21),ye=function(e){var t=e.name,n=e.value,r=e.expiresIn,a=e.path,o=e.domain,i=e.protocol,c=e.sameSite,s=void 0===c?"Lax":c,u=new Date,l=r||31536e6;u.setTime(u.getTime()+l);var p=a||"/",d=(n||"").replace(/[^!#-+\--:<-[\]-~]/g,encodeURIComponent),f="".concat(encodeURIComponent(t),"=").concat(d,";expires=").concat(u.toGMTString(),";path=").concat(p,";SameSite=").concat(s);return o&&(f+=";domain=".concat(o)),"https:"===i&&(f+=";secure"),document.cookie=f,f},ve=function(e){var t=Object(be.a)(document.cookie.split("; "),(function(t){var n=t.indexOf("=");return decodeURIComponent(t.substr(0,n))===e}));if(t){var n=t.indexOf("=");return decodeURIComponent(t.substr(n+1))}return null},ge=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Oe=function(e){var t={};return e.replace(/\+/g," ").split("&").forEach((function(e,n){var r,a=e.split("="),o=decodeURIComponent(a[0]),i=t,c=0,s=o.split("]["),u=s.length-1;if(/\[/.test(s[0])&&/\]$/.test(s[u])?(s[u]=s[u].replace(/\]$/,""),u=(s=s.shift().split("[").concat(s)).length-1):u=0,!(s.indexOf("__proto__")>=0))if(2===a.length)if(r=decodeURIComponent(a[1]),u)for(;c<=u;c++){if(o=""===s[c]?i.length:s[c],!ge(i,o)&&i[o])return;i[o]=c0&&void 0!==arguments[0]?arguments[0]:{};if(Object(o.a)(this,e),this._controllerFrame=null,this._latencies=[],this._handleMessage=function(e){return function(n){var r=n.data,a=n.origin;if(Object(me.c)(a)&&"string"==typeof r)try{var o=JSON.parse(r),i=o.originatingScript,c=o.payload;if("m2"===i){var s=c.guid,u=c.muid,l=c.sid;t._guid=s,t._muid=t._getID(De,u),t._sid=t._getID(qe,l),e()}}catch(e){}}},n.checkoutIds){var r=n.checkoutIds,a=r.muid,i=r.sid;this._guid=Be,this._muid=a,this._sid=i,this._doNotPersist="NA"!==a&&"NA"!==i}else this._guid=Be,this._muid=this._getID(De),this._sid=this._getID(qe),this._doNotPersist=!1;this._listenerRegistry=Object(Me.a)(),this._idsPromise=new u.a((function(e){t._establishMessageChannel(e)})),this._id=_(Le),Re&&(this._controllerFrame=new L({type:p.c.METRICS_CONTROLLER,controllerId:this._id,listenerRegistry:this._listenerRegistry,autoload:!0,appParams:this._buildFrameQueryString()}),this._startIntervalCheck(),setTimeout(this._testLatency.bind(this),2e3+500*Math.random()))}return Object(i.a)(e,[{key:"ids",value:function(){return{guid:this._guid,muid:this._muid,sid:this._sid}}},{key:"idsPromise",value:function(){var e=this;return this._idsPromise.then((function(){return e.ids()}))}},{key:"_establishMessageChannel",value:function(e){if(!Re)return this._guid=h(),void e();this._listenerRegistry.addEventListener(window,"message",this._handleMessage(e))}},{key:"_startIntervalCheck",value:function(){var e=this,t=window.location.href;setInterval((function(){var n=window.location.href;n!==t&&(e.send((function(e){return{action:"ping",payload:{sid:e.sid,muid:e.muid,title:document.title,referrer:document.referrer,url:document.location.href,version:6}}})),t=n)}),5e3)}},{key:"report",value:function(e,t){this.send((function(n){return{action:"track",payload:{sid:n.sid,muid:n.muid,url:document.location.href,source:e,data:t,version:6}}}))}},{key:"send",value:function(e){var t=this;this._idsPromise.then((function(){try{t._controllerFrame&&t._controllerFrame.send(e(t.ids()))}catch(e){}}))}},{key:"_testLatency",value:function(){var e=this,t=new Date;this._listenerRegistry.addEventListener(document,"mousemove",(function n(){try{var r=new Date;e._latencies.push(r-t),e._latencies.length>=10&&(e.report("mouse-timings-10",e._latencies),e._listenerRegistry.removeEventListener(document,"mousemove",n)),t=r}catch(e){}}))}},{key:"_extractMetaReferrerPolicy",value:function(){var e=document.querySelector("meta[name=referrer]");return null!=e&&e instanceof HTMLMetaElement?e.content.toLowerCase():null}},{key:"_extractUrl",value:function(e){var t=document.location.href;switch(e){case"origin":case"strict-origin":case"origin-when-cross-origin":case"strict-origin-when-cross-origin":return document.location.origin;case"unsafe-url":return t.split("#")[0];default:return t}}},{key:"_buildFrameQueryString",value:function(){var e=this._extractMetaReferrerPolicy(),t=this._extractUrl(e),n={url:t,title:document.title,referrer:document.referrer,muid:this._muid,sid:this._sid,version:6,preview:Object(me.c)(t)};return null!=e&&(n.metaReferrerPolicy=e),Object.keys(n).map((function(e){return null!=n[e]?"".concat(e,"=").concat(encodeURIComponent(n[e].toString())):null})).join("&")}},{key:"_getID",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Be;switch(e){case De:if(this._doNotPersist)return Ue(this._muid,t,Re);try{var n="__stripe_mid",r=Ue(ve(n),t,Re);return Fe(r)&&ye({name:n,value:r,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict"}),r}catch(e){return Be}case qe:if(this._doNotPersist)return Ue(this._sid,t,Re);try{var a="__stripe_sid",o=Ue(ve(a),t,Re);return Fe(o)&&ye({name:a,value:o,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict",expiresIn:18e5}),o}catch(e){return Be}default:throw new Error("Invalid ID type specified: ".concat(e))}}}]),e}(),Ge=null,He=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ge=new Ye(e)},ze=!1,We=function(){var e=Ge;e&&(ze||(ze=!0,e.send((function(e){return{action:"ping",payload:{v2:2,sid:e.sid,muid:e.muid,title:document.title,referrer:document.referrer,url:document.location.href,version:6}}})),e.send((function(t){return{action:"track",payload:{sid:t.sid,muid:t.muid,url:document.location.href,source:"mouse-timings-10-v2",data:e._latencies,version:6}}}))))},Ke=n(16),Ve=!1,Je=function(e){Ve||"null"===(null!=e?e:window.origin)&&(Ve=!0,console.error("Stripe.js requires 'allow-same-origin' if sandboxed."))},$e=n(34),Ze=!1,Xe={},Qe=function(e,t){return document.activeElement===e._iframe||e._iframe.parentElement&&document.activeElement===t},et=function(e){return"object"==typeof e&&null!==e&&"IntegrationError"===e.name?new O.a("string"==typeof e.message?e.message:""):e},tt=function(){function e(t){var n=this;Object(o.a)(this,e),this._sendCAReq=function(e){var t=_(e.tag);return new u.a((function(r,a){n._requests[t]={resolve:r,reject:a},n._controllerFrame.send({action:"stripe-safe-controller-action-request",payload:{nonce:t,caReq:e}})}))},this.keyMode=function(){return Object(d.c)(n._apiKey)},this.action={retrievePaymentIntent:function(e){return n._sendCAReq({tag:"RETRIEVE_PAYMENT_INTENT",value:e})},confirmPaymentIntent:function(e){return n._sendCAReq({tag:"CONFIRM_PAYMENT_INTENT",value:e})},createConsumerPaymentDetails:function(e){return n._sendCAReq({tag:"CREATE_CONSUMER_PAYMENT_DETAILS",value:e})},completeLinkPayment:function(e){return n._sendCAReq({tag:"COMPLETE_LINK_PAYMENT",value:e})},completeLinkSetup:function(e){return n._sendCAReq({tag:"COMPLETE_LINK_SETUP",value:e})},createBankPaymentDetails:function(e){return n._sendCAReq({tag:"CREATE_BANK_PAYMENT_DETAILS",value:e})},cancelPaymentIntentSource:function(e){return n._sendCAReq({tag:"CANCEL_PAYMENT_INTENT_SOURCE",value:e})},confirmSetupIntent:function(e){return n._sendCAReq({tag:"CONFIRM_SETUP_INTENT",value:e})},retrieveSetupIntent:function(e){return n._sendCAReq({tag:"RETRIEVE_SETUP_INTENT",value:e})},cancelSetupIntentSource:function(e){return n._sendCAReq({tag:"CANCEL_SETUP_INTENT_SOURCE",value:e})},lookupLocale:function(e){return n._sendCAReq({tag:"LOOKUP_LOCALE",value:e})},fetchLocale:function(e){return n._sendCAReq({tag:"FETCH_LOCALE",value:e})},updateCSSFonts:function(e){return n._sendCAReq({tag:"UPDATE_CSS_FONTS",value:e})},createApplePaySession:function(e){return n._sendCAReq({tag:"CREATE_APPLE_PAY_SESSION",value:e})},retrieveSource:function(e){return n._sendCAReq({tag:"RETRIEVE_SOURCE",value:e})},tokenizeWithElement:function(e){return n._sendCAReq({tag:"TOKENIZE_WITH_ELEMENT",value:e})},tokenizeCvcUpdate:function(e){return n._sendCAReq({tag:"TOKENIZE_CVC_UPDATE",value:e})},tokenizeWithData:function(e){return n._sendCAReq({tag:"TOKENIZE_WITH_DATA",value:e})},createSourceWithElement:function(e){return n._sendCAReq({tag:"CREATE_SOURCE_WITH_ELEMENT",value:e})},createSourceWithData:function(e){return n._sendCAReq({tag:"CREATE_SOURCE_WITH_DATA",value:e})},createPaymentMethodWithElement:function(e){return n._sendCAReq({tag:"CREATE_PAYMENT_METHOD_WITH_ELEMENT",value:e})},createPaymentMethodWithData:function(e){return n._sendCAReq({tag:"CREATE_PAYMENT_METHOD_WITH_DATA",value:e})},createPaymentPage:function(e){return n._sendCAReq({tag:"CREATE_PAYMENT_PAGE",value:e})},createPaymentPageWithSession:function(e){return n._sendCAReq({tag:"CREATE_PAYMENT_PAGE_WITH_SESSION",value:e})},createRadarSession:function(e){return n._sendCAReq({tag:"CREATE_RADAR_SESSION",value:e})},authenticate3DS2:function(e){return n._sendCAReq({tag:"AUTHENTICATE_3DS2",value:e})},verifyMicrodepositsForPayment:function(e){return n._sendCAReq({tag:"VERIFY_MICRODEPOSITS_FOR_PAYMENT",value:e})},verifyMicrodepositsForSetup:function(e){return n._sendCAReq({tag:"VERIFY_MICRODEPOSITS_FOR_SETUP",value:e})},retrieveIssuingCardWithoutNonce:function(e){return n._sendCAReq({tag:"RETRIEVE_ISSUING_CARD_WITHOUT_NONCE",value:e})},retrieveIssuingCard:function(e){return n._sendCAReq({tag:"RETRIEVE_ISSUING_CARD",value:e})},createEphemeralKeyNonce:function(e){return n._sendCAReq({tag:"CREATE_EPHEMERAL_KEY_NONCE",value:e})},updatePaymentIntent:function(e){return n._sendCAReq({tag:"UPDATE_PAYMENT_INTENT",value:e})},createAcssDebitSession:function(e){return n._sendCAReq({tag:"CREATE_ACSS_DEBIT_SESSION",value:e})},confirmReturnIntent:function(e){return n._sendCAReq({tag:"CONFIRM_RETURN_INTENT",value:e})},refreshPaymentIntent:function(e){return n._sendCAReq({tag:"REFRESH_PAYMENT_INTENT",value:e})},refreshSetupIntent:function(e){return n._sendCAReq({tag:"REFRESH_SETUP_INTENT",value:e})},attachLinkAccountSessionForPayment:function(e){return n._sendCAReq({tag:"ATTACH_LINK_ACCOUNT_SESSION_FOR_PAYMENT",value:e})},attachLinkAccountSessionForSetup:function(e){return n._sendCAReq({tag:"ATTACH_LINK_ACCOUNT_SESSION_FOR_SETUP",value:e})},localizeError:function(e){return n._sendCAReq({tag:"LOCALIZE_ERROR",value:e})},retrieveElementsSession:function(e){return n._sendCAReq({tag:"RETRIEVE_ELEMENTS_SESSION",value:e})},updateElementsOptions:function(e){return n._sendCAReq({tag:"UPDATE_ELEMENTS_OPTIONS",value:e})},completeWalletConfirm:function(e){return n._sendCAReq({tag:"COMPLETE_WALLET_CONFIRM",value:e})}},this.createElementFrame=function(e,t,a,o){var i=n._betas,c=new ae({type:e,betas:i,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:Object(r.a)(Object(r.a)({},o),{},{componentName:t,keyMode:Object(d.c)(n._apiKey),apiKey:n._apiKey})});return n._setupFrame(c,e,a)},this.createSecondaryElementFrame=function(e,t,a,o,i){var c=n._betas,s=new fe({type:e,betas:c,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:Object(r.a)(Object(r.a)({},i),{},{componentName:t,primaryElementType:a,keyMode:Object(d.c)(n._apiKey)})});return n._setupFrame(s,e,o)},this.createHiddenFrame=function(e,t){var r=new M({type:e,betas:n._betas,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:t});return n._setupFrame(r,e)},this.getCredentials=function(){return{publishableKey:n._apiKey,stripeAccount:n._stripeAccount,apiVersion:n._apiVersion}},this.createLightboxFrame=function(e){var t=e.type,a=e.options,o=new pe({type:t,controllerId:n._id,listenerRegistry:n._listenerRegistry,options:Object(r.a)(Object(r.a)({},a),{},{betas:n._betas})}),i="LINK_AUTOFILL_MODAL"===e.type?e.groupId:null;return n._setupFrame(o,t,i)},this._setupFrame=function(e,t,r){return n._frames[e.id]=e,n._controllerFrame.sendPersistent({action:"stripe-user-createframe",payload:{newFrameId:e.id,frameType:t,groupId:r}}),e._on("unload",(function(){n._controllerFrame.sendPersistent({action:"stripe-frame-unload",payload:{unloadedFrameId:e.id}})})),e._on("destroy",(function(){delete n._frames[e.id],n._controllerFrame.sendPersistent({action:"stripe-frame-destroy",payload:{destroyedFrameId:e.id}})})),e._on("load",(function(){n._controllerFrame.sendPersistent({action:"stripe-frame-load",payload:{loadedFrameId:e.id}}),n._controllerFrame.loaded&&e.send({action:"stripe-controller-load",payload:{}})})),e},this.report=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n._controllerFrame.send({action:"stripe-controller-report",payload:{event:e,data:t}})},this.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:ht,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bt,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",r=yt(n);if("string"==typeof e&&/^[0-9.]+px$/.test(e)){var a=parseFloat(e.toString().replace(/[^0-9.]/g,""));return"".concat(a+r,"px")}var o,i=parseFloat(e.toString().replace(/[^0-9.]/g,"")),c=parseFloat(bt.replace(/[^0-9.]/g,"")),s=parseFloat(t.toString().replace(/[^0-9.]/g,""));if("string"==typeof t&&/^(\d+|\d*\.\d+)px$/.test(t))o=s;else if("string"==typeof t&&/^(\d+|\d*\.\d+)em$/.test(t))o=s*c;else if("string"==typeof t&&/^(\d+|\d*\.\d+)%$/.test(t))o=s/100*c;else{if("string"!=typeof t||!/^[\d.]+$/.test(t)&&!/^\d*\.(px|em|%)$/.test(t))return"100%";o=c}var u=i*o+r,l="".concat(u,"px");return/^[0-9.]+px$/.test(l)?l:"100%"},gt=n(43),Ot=function(e,t){return e.reduce((function(e,n){return e.then((function(e){return"SATISFIED"===e.type?e:n().then((function(e){return t(e)?{type:"SATISFIED",value:e}:{type:"UNSATISFIED"}}))}))}),u.a.resolve({type:"UNSATISFIED"}))},jt="40px",Et={success:"success",fail:"fail",invalid_shipping_address:"invalid_shipping_address"},wt={shipping:"shipping",delivery:"delivery",pickup:"pickup"},kt=Object(r.a)({success:"success"},{fail:"fail",invalid_payer_name:"invalid_payer_name",invalid_payer_email:"invalid_payer_email",invalid_payer_phone:"invalid_payer_phone",invalid_shipping_address:"invalid_shipping_address"}),Pt={merchantCapabilities:["supports3DS"],displayItems:[]},St=Object(l.u)({amount:l.k,label:l.x,pending:Object(l.s)(l.b)}),At=Object(l.u)({amount:l.c,label:l.x,pending:Object(l.s)(l.b)}),Tt=Object(l.u)({amount:l.c,label:l.x,pending:Object(l.s)(l.b),id:Object(l.G)(l.x,(function(){return _("shippingOption")})),detail:Object(l.G)(l.x,(function(){return""}))}),It=l.q.apply(void 0,Object(a.a)(Object.keys(wt))),Ct=Object(l.u)({origin:l.x,name:l.x}),Nt=Object(l.u)({displayItems:Object(l.s)(Object(l.a)(At)),shippingOptions:Object(l.s)(Object(l.C)("id")(Object(l.a)(Tt))),wallets:Object(l.s)(Object(l.a)(l.A)),disableWallets:Object(l.s)(Object(l.a)(l.A)),total:St,requestShipping:Object(l.s)(l.b),requestPayerName:Object(l.s)(l.b),requestPayerEmail:Object(l.s)(l.b),requestPayerPhone:Object(l.s)(l.b),shippingType:Object(l.s)(It),currency:l.z,country:l.y,jcbEnabled:Object(l.s)(l.b),__billingDetailsEmailOverride:Object(l.s)(l.x),__minApplePayVersion:Object(l.s)(l.n),__merchantDetails:Object(l.s)(Ct),__isCheckout:Object(l.s)(l.b),__betas:Object(l.s)(Object(l.a)(l.r.apply(void 0,Object(a.a)(ot.c))))}),Rt=Object(l.d)({currency:Object(l.s)(l.z),displayItems:Object(l.s)(Object(l.a)(At)),shippingOptions:Object(l.s)(Object(l.C)("id")(Object(l.a)(Tt))),total:Object(l.s)(St)}),xt=Object(l.u)({displayItems:Object(l.s)(Object(l.a)(At)),shippingOptions:Object(l.s)(Object(l.C)("id")(Object(l.a)(Tt))),total:Object(l.s)(St),status:function(e,t){return l.q.apply(void 0,Object(a.a)(Object.keys(Et)))(-1!==["invalid_payer_name","invalid_payer_email","invalid_payer_phone"].indexOf(e)?"fail":e,t)}}),Mt=l.q.apply(void 0,Object(a.a)(Object.keys(kt))),Lt=n(35),Dt=function(){return window.ApplePaySession?["APPLE_PAY"]:["GOOGLE_PAY","BROWSER"]},qt=function(e){var t=[];return window.ApplePaySession?Object(Lt.b)(e,Lt.a.applePay)&&t.push("APPLE_PAY"):(Object(Lt.b)(e,Lt.a.googlePay)&&(t.push("GOOGLE_PAY"),J&&t.push("BROWSER")),Object(Lt.b)(e,Lt.a.browserCard)&&-1===t.indexOf("BROWSER")&&t.push("BROWSER")),t},Bt=n(33),Ft=function(){try{return window.location.origin===window.top.location.origin}catch(e){return!1}},Ut=Object(Bt.b)((function(e){return window.ApplePaySession.canMakePaymentsWithActiveCard(e)})),Yt=function(){return u.a.resolve(window.ApplePaySession.canMakePayments())},Gt=function(e){if(!window.ApplePaySession)return!1;try{return window.ApplePaySession.supportsVersion(e)}catch(e){return!1}},Ht=["mastercard","visa"],zt=["AT","AU","BE","CA","CH","DE","DK","EE","ES","FI","FR","GB","GR","HK","IE","IT","JP","LT","LU","LV","MX","NL","NO","NZ","PL","PT","SE","SG","US"],Wt=function(e,t){var n="US"===e||t?["discover","diners","jcb"].concat(Ht):Ht;return-1!==zt.indexOf(e)?["amex"].concat(Object(a.a)(n)):n},Kt={bif:1,clp:1,djf:1,gnf:1,jpy:1,kmf:1,krw:1,mga:1,pyg:1,rwf:1,vnd:1,vuv:1,xaf:1,xof:1,xpf:1,bhd:1e3,jod:1e3,kwd:1e3,omr:1e3,tnd:1e3},Vt=function(e,t){var n=function(e){var t=Kt[e.toLowerCase()]||100;return{unitSize:1/t,fractionDigits:Math.ceil(Math.log(t)/Math.log(10))}}(t),r=n.unitSize,a=n.fractionDigits;return(e*r).toFixed(a)},Jt=function(e,t){return{amount:Vt(e.amount,t.currency),label:e.label,type:e.pending?"pending":"final"}},$t=function(e,t){return new window.ApplePayError(e,t)},Zt=function(e){return function(t){return t[e]&&"string"==typeof t[e]?t[e].toUpperCase():null}},Xt=(Se={},Object(c.a)(Se,kt.success,0),Object(c.a)(Se,kt.fail,1),Object(c.a)(Se,kt.invalid_payer_name,2),Object(c.a)(Se,kt.invalid_shipping_address,3),Object(c.a)(Se,kt.invalid_payer_phone,4),Object(c.a)(Se,kt.invalid_payer_email,4),Se),Qt=(Ae={},Object(c.a)(Ae,kt.success,(function(){return null})),Object(c.a)(Ae,kt.fail,(function(){return null})),Object(c.a)(Ae,kt.invalid_payer_name,(function(){return $t("billingContactInvalid","name")})),Object(c.a)(Ae,kt.invalid_shipping_address,(function(){return $t("shippingContactInvalid","postalAddress")})),Object(c.a)(Ae,kt.invalid_payer_phone,(function(){return $t("shippingContactInvalid","phoneNumber")})),Object(c.a)(Ae,kt.invalid_payer_email,(function(){return $t("shippingContactInvalid","emailAddress")})),Ae),en=(Te={},Object(c.a)(Te,wt.pickup,"storePickup"),Object(c.a)(Te,wt.shipping,"shipping"),Object(c.a)(Te,wt.delivery,"delivery"),Te),tn={total:function(e){return Jt(e.total,e)},lineItems:function(e){return e.displayItems?e.displayItems.map((function(t){return Jt(t,e)})):[]},shippingMethods:function(e){return e.shippingOptions?e.shippingOptions.map((function(t){return function(e,t){return{amount:Vt(e.amount,t.currency),label:e.label,detail:e.detail,identifier:e.id}}(t,e)})):[]},applicationData:function(e){return e.applicationData||null}},nn={shippingType:function(e){var t=e.shippingType;if(!t)return null;var n=en[t];if(void 0!==n)return n;throw new O.a("Invalid value for shippingType: ".concat(t))},requiredBillingContactFields:function(e){return e.requestPayerName?["postalAddress"]:null},requiredShippingContactFields:function(e){var t=[];return e.requestShipping&&t.push("postalAddress"),e.requestPayerEmail&&t.push("email"),e.requestPayerPhone&&t.push("phone"),t.length?t:null},countryCode:Zt("country"),currencyCode:Zt("currency"),merchantCapabilities:function(e){var t=e.merchantCapabilities||Pt.merchantCapabilities;return e.__betas&&Object(ot.d)(e.__betas,"cup_apple_pay_beta_1")&&t.push("supportsEMV"),t},supportedNetworks:function(e){var t,n,r=(t=e.country,n=e.jcbEnabled||!1,Wt(t,n).reduce((function(e,t){return"mastercard"===t?[].concat(Object(a.a)(e),["masterCard"]):"diners"===t?e:[].concat(Object(a.a)(e),[t])}),[]));return Gt(4)&&r.push("maestro"),e.__betas&&Object(ot.d)(e.__betas,"cup_apple_pay_beta_1")&&r.push("chinaUnionPay"),r}},rn={status:function(e){var t=Xt[e.status];return Gt(3)&&t>1?1:t},error:function(e){return Gt(3)?Qt[e.status]():null}},an=Object(r.a)(Object(r.a)({},tn),nn),on=Object(r.a)(Object(r.a)({},tn),rn),cn=function(e){return Object.keys(on).reduce((function(t,n){var a=(0,on[n])(e);return null!==a?Object(r.a)(Object(r.a)({},t),{},Object(c.a)({},n,a)):t}),{})},sn=function(e){return"string"==typeof e?e:null},un=function(e){return e?sn(e.phoneNumber):null},ln=function(e){return e?sn(e.emailAddress):null},pn=function(e){return e?[e.givenName,e.familyName].filter((function(e){return e&&"string"==typeof e})).join(" "):null},dn=function(e){var t=e.addressLines,n=e.countryCode,r=e.postalCode,o=e.administrativeArea,i=e.locality,c=e.phoneNumber,s=sn(n);return{addressLine:Array.isArray(t)?t.reduce((function(e,t){return"string"==typeof t?[].concat(Object(a.a)(e),[t]):e}),[]):[],country:s?s.toUpperCase():"",postalCode:sn(r)||"",recipient:pn(e)||"",region:sn(o)||"",city:sn(i)||"",phone:sn(c)||"",sortingCode:"",dependentLocality:"",organization:""}},fn=function(e,t){var n=e.identifier,r=e.label;return t.filter((function(e){return e.id===n&&e.label===r}))[0]},mn=function(e,t){var n=e.shippingContact,r=e.shippingMethod,a=e.billingContact;return{shippingOption:r&&t.shippingOptions&&t.shippingOptions.length?fn(r,t.shippingOptions):null,shippingAddress:n?dn(n):null,payerEmail:ln(n),payerPhone:un(n),payerName:pn(a),walletName:"applePay",methodName:"apple-pay"}},_n={austria:"AT",sterreich:"AT",csterreich:"AT",au:"AU",australia:"AU",belgium:"BE",br:"BR",brasil:"BR",brazil:"BR",ca:"CA",canada:"CA",ch:"CH",schweiz:"CH",switzerland:"CH",china:"CN",czechrepublic:"CZ",de:"DE",deutschland:"DE",germany:"DE",danmark:"DK",denmark:"DK",es:"ES",espaa:"ES",spain:"ES",finland:"FI",suomi:"FI",fr:"FR",hk:"HK",hongkong:"HK",england:"GB",gb:"GB",uk:"GB",unitedkingdom:"GB",scotland:"GB",wales:"GB",it:"IT",italy:"IT",italia:"IT",japan:"JP",lietuva:"LT",luxembourg:"LU",netherlands:"NL",nederland:"NL",norway:"NO",poland:"PL",polska:"PL",russia:"RU",saudiarabia:"SA",se:"SE",sweden:"SE",sverige:"SE",singapore:"SG",us:"US",usa:"US",unitedstatesofamerica:"US",unitedstates:"US",estadosunidos:"US"},hn=function(e,t){return e&&"object"==typeof e?t(e):null},bn=function(){function e(t){var n=this;Object(o.a)(this,e),this._onEvent=function(){},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(e){var t=e.skipEnrollmentChecks;return function(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,o=arguments.length>5?arguments[5]:void 0,i=Math.max(2,a);if(window.ApplePaySession){if(Ft()){if(window.ApplePaySession.supportsVersion(i)){var c="merchant.".concat((t?[e,t]:[e]).join("."),".stripe");return o?Yt():Ut(c).then((function(a){if(r("pr.apple_pay.can_make_payment_native_response",{available:a}),n&&!a&&window.console){var o=t?"or stripeAccount parameter (".concat(t,") "):"";window.console.warn("Either you do not have a card saved to your Wallet or the current domain (".concat(e,") ").concat(o,"is not registered for Apple Pay. Visit https://dashboard.stripe.com/account/apple_pay to register this domain."))}return a}))}return n&&window.console&&window.console.warn("This version of Safari does not support ApplePay JS version ".concat(i,".")),u.a.resolve(!1)}return u.a.resolve(!1)}return u.a.resolve(!1)}(window.location.hostname,n._authentication.accountId,Object(d.c)(n._authentication.apiKey)===d.a.test,n._report,n._minimumVersion,t)},this.update=function(e){n._initialPaymentRequest=Object(we.d)(n._paymentRequestOptions,e),n._initializeSessionState()},this.show=function(){var e,t,a;n._initializeSessionState();try{e=new window.ApplePaySession(n._minimumVersion,(t=n._paymentRequestOptions,a=Object(r.a)(Object(r.a)({},Pt),t),Object.keys(an).reduce((function(e,t){var n=(0,an[t])(a);return null!==n?Object(r.a)(Object(r.a)({},e),{},Object(c.a)({},t,n)):e}),{})))}catch(e){throw"Must create a new ApplePaySession from a user gesture handler."===e.message?new O.a("show() must be called from a user gesture handler (such as a click handler, after the user clicks a button)."):e}n._privateSession=e,n._setupSession(e,n._usesButtonElement()),e.begin(),n._isShowing=!0},this.abort=function(){n._privateSession&&n._privateSession.abort()},this._warn=function(e){},this._report=function(e,t){n._controller.report(e,Object(r.a)(Object(r.a)({},t),{},{backingLibrary:"APPLE_PAY",usesButtonElement:n._usesButtonElement()}))},this._validateMerchant=function(e,t){return function(r){n._controller.action.createApplePaySession({data:{validation_url:r.validationURL,domain_name:window.location.hostname,display_name:n._paymentRequestOptions.total.label},usesButtonElement:t}).then((function(t){if(n._isShowing)switch(t.type){case"object":e.completeMerchantValidation(JSON.parse(t.object.session));break;case"error":n._handleValidationError(e)(t.error);break;default:Object(_t.a)(t)}}),n._handleValidationError(e))}},this._handleValidationError=function(e){return function(t){n._report("error.pr.apple_pay.session_creation_failed",{error:t}),e.abort();var r=t.message;"string"==typeof r&&n._controller.warn(r)}},this._paymentAuthorized=function(e){return function(t){var a=t.payment,o=n._usesButtonElement()?p.b.paymentRequestButton:null;n._controller.action.tokenizeWithData({type:"apple_pay",elementName:o,tokenData:Object(r.a)(Object(r.a)({},a),{},{billingContact:hn(a.billingContact,n._normalizeContact)}),mids:n._mids}).then((function(t){if("error"===t.type)e.completePayment(window.ApplePaySession.STATUS_FAILURE),n._report("error.pr.create_token_failed",{error:t.error});else{var o=hn(a.shippingContact,n._normalizeContact),i=hn(a.billingContact,n._normalizeContact);o&&n._paymentRequestOptions.requestShipping&&!o.countryCode&&e.completePayment(window.ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS);var c=mn({shippingContact:o,billingContact:i},n._paymentRequestOptions);n._onToken(e)(Object(r.a)(Object(r.a)({},c),{},{shippingOption:n._privateShippingOption,token:t.object}))}}))}},this._normalizeContact=function(e){if(e.country&&"string"==typeof e.country){var t,a=e.country.toLowerCase().replace(/[^a-z]+/g,"");return e.countryCode?"string"==typeof e.countryCode&&(t=e.countryCode.toUpperCase()):(t=_n[a])||n._report("warn.pr.apple_pay.missing_country_code",{country:e.country}),Object(r.a)(Object(r.a)({},e),{},{countryCode:t})}return e},this._onToken=function(e){return function(t){n._onEvent({type:"paymentresponse",payload:Object(r.a)(Object(r.a)({},t),{},{complete:w(n._completePayment(e))})})}},this._completePayment=function(e){return function(t){n._paymentRequestOptions=Object(we.d)(n._paymentRequestOptions,{status:t});var r=cn(n._paymentRequestOptions),a=r.status,o=r.error;n._isShowing&&(o?e.completePayment({status:a,errors:[o]}):e.completePayment(a)),(0===a||1===a&&null==o)&&(n._isShowing=!1,n._onEvent&&n._onEvent({type:"close"}))}},this._shippingContactSelected=function(e){return function(t){n._onEvent({type:"shippingaddresschange",payload:{shippingAddress:dn(n._normalizeContact(t.shippingContact)),updateWith:w(n._completeShippingContactSelection(e))}})}},this._completeShippingContactSelection=function(e){return function(t){var r;n._paymentRequestOptions=Object(we.d)(n._paymentRequestOptions,t),(null===(r=n._paymentRequestOptions.shippingOptions)||void 0===r?void 0:r.length)&&(n._privateShippingOption=n._paymentRequestOptions.shippingOptions[0]);var a=cn(n._paymentRequestOptions),o=a.status,i=a.shippingMethods,c=a.total,s=a.lineItems;e.completeShippingContactSelection(o,i,c,s)}},this._shippingMethodSelected=function(e){return function(t){if(n._paymentRequestOptions.shippingOptions){var r=fn(t.shippingMethod,n._paymentRequestOptions.shippingOptions);n._privateShippingOption=r,n._onEvent({type:"shippingoptionchange",payload:{shippingOption:r,updateWith:w(n._completeShippingMethodSelection(e))}})}}},this._completeShippingMethodSelection=function(e){return function(t){n._paymentRequestOptions=Object(we.d)(n._paymentRequestOptions,t);var r=cn(n._paymentRequestOptions),a=r.status,o=r.total,i=r.lineItems;e.completeShippingMethodSelection(a,o,i)}};var a=t.controller,i=t.authentication,s=t.mids,l=t.options,f=t.usesButtonElement,m=t.listenerRegistry;this._controller=a,this._authentication=i,this._mids=s,this._minimumVersion=l.__minApplePayVersion||2,this._usesButtonElement=f,this._listenerRegistry=m,this._initialPaymentRequest=l,this._isShowing=!1,this._initializeSessionState()}return Object(i.a)(e,[{key:"_initializeSessionState",value:function(){var e=btoa(this._authentication.accountId?"".concat(this._authentication.apiKey,":").concat(this._authentication.accountId):this._authentication.apiKey);this._paymentRequestOptions=Object(r.a)(Object(r.a)(Object(r.a)({},Pt),this._initialPaymentRequest),{},{status:kt.success,applicationData:e}),this._privateSession=null,this._privateShippingOption=null;var t=this._paymentRequestOptions.shippingOptions;(null==t?void 0:t.length)&&(this._privateShippingOption=t[0])}},{key:"_setupSession",value:function(e,t){var n=this;this._listenerRegistry.addEventListener(e,"validatemerchant",w(this._validateMerchant(e,t))),this._listenerRegistry.addEventListener(e,"paymentauthorized",w(this._paymentAuthorized(e))),this._listenerRegistry.addEventListener(e,"cancel",w((function(){n._isShowing=!1,n._onEvent({type:"cancel"}),n._onEvent({type:"close"})}))),this._listenerRegistry.addEventListener(e,"shippingcontactselected",w(this._shippingContactSelected(e))),this._listenerRegistry.addEventListener(e,"shippingmethodselected",w(this._shippingMethodSelected(e)))}}]),e}(),yn=null;var vn,gn=function(e){return null!==yn?u.a.resolve(yn):e().then((function(e){return yn=e}))},On=function(e){return!(!ee&&!te)&&(!W&&(!(!e.isCheckout&&!window.PaymentRequest)&&!(!e.isCheckout&&J)))},jn=function e(t){var n=this;Object(o.a)(this,e),this._mids=null,this._frame=null,this._initFrame=function(e){var t=n._controller.createHiddenFrame(p.c.PAYMENT_REQUEST_GOOGLE_PAY,{authentication:n._authentication,mids:n._mids,origin:n._origin});t.send({action:"stripe-pr-initialize",payload:{data:e}}),n._initFrameEventHandlers(t),n._frame=t},this._initFrameEventHandlers=function(e){e._on("pr-cancel",(function(){n._onEvent({type:"cancel"})})),e._on("pr-close",(function(){n._backdrop.fadeOut().then((function(){n._backdrop.unmount()})),n._onEvent({type:"close"})})),e._on("pr-error",(function(e){n._onEvent({type:"error",payload:{errorMessage:e.errorMessage,errorCode:e.errorCode}})})),e._on("pr-callback",(function(t){var r=t.event,a=t.options,o=t.nonce;switch(r){case"paymentresponse":n._handlePaymentResponse(e,a,o);break;case"shippingaddresschange":n._handleShippingAddressChange(e,a,o);break;case"shippingoptionchange":n._handleShippingOptionChange(e,a,o);break;default:throw new Error("Unexpected event name: ".concat(r))}}))},this._handlePaymentResponse=function(e,t,a){n._onEvent({type:"paymentresponse",payload:Object(r.a)(Object(r.a)({},t),{},{complete:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:a,data:{status:t}}})}})})},this._handleShippingAddressChange=function(e,t,a){n._onEvent({type:"shippingaddresschange",payload:Object(r.a)(Object(r.a)({},t),{},{updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:a,data:t}})}})})},this._handleShippingOptionChange=function(e,t,a){n._onEvent({type:"shippingoptionchange",payload:Object(r.a)(Object(r.a)({},t),{},{updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:a,data:t}})}})})},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{skipEnrollmentChecks:!1},t=e.skipEnrollmentChecks;if(!On({isCheckout:n._isCheckout}))return u.a.resolve(!1);if(!n._frame)throw new Error("Frame not initialized.");var r=n._frame;return gn((function(){return r.action.checkCanMakePayment({skipEnrollmentChecks:t}).then((function(e){return!0===e.available}))}))},this.show=function(){n._frame&&(n._frame.send({action:"stripe-pr-show",payload:{data:{usesButtonElement:n._usesButtonElement()}}}),n._backdrop.mount(),n._backdrop.show(),n._backdrop.fadeIn())},this.update=function(e){n._frame&&n._frame.send({action:"stripe-pr-update",payload:{data:e}})},this.abort=function(){n._frame&&n._frame.send({action:"stripe-pr-abort",payload:{}})},this._controller=t.controller,this._authentication=t.authentication,this._mids=t.mids,this._origin=t.origin,this._usesButtonElement=t.usesButtonElement,this._backdrop=new ue({lockScrolling:!1,lockFocus:!0,lockFocusOn:null,listenerRegistry:t.listenerRegistry}),this._isCheckout=!!t.options.__isCheckout,On({isCheckout:this._isCheckout})&&this._controller&&(this._controller.action.fetchLocale({locale:"auto"}),this._initFrame(t.options))},En=function(){if(!window.PaymentRequest)return null;if(/CriOS\/59/.test(navigator.userAgent))return null;if(/.*\(.*; wv\).*Chrome\/(?:53|54)\.\d.*/g.test(navigator.userAgent))return null;if(X)return null;var e=window.PaymentRequest;return e.prototype.canMakePayment||(e.prototype.canMakePayment=function(){return u.a.resolve(!1)}),e}(),wn=null,kn=function e(t){var n=this;Object(o.a)(this,e),this._onEvent=function(){},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(e){var t=e.skipEnrollmentChecks;return function(e,t,n){return null!==wn?u.a.resolve(wn):En&&e?e.action.checkCanMakePayment({skipEnrollmentChecks:n}).then((function(e){var t=e.available;return wn=!0===t})):u.a.resolve(!1)}(n._prFrame,(Object(d.c)(n._authentication.apiKey),d.a.test),t)},this.update=function(e){var t=n._prFrame;t&&t.send({action:"stripe-pr-update",payload:{data:e}})},this.show=function(){if(!n._prFrame)throw new O.a("Payment Request is not available in this browser.");n._prFrame.send({action:"stripe-pr-show",payload:{data:{usesButtonElement:n._usesButtonElement()}}})},this.abort=function(){n._prFrame&&n._prFrame.send({action:"stripe-pr-abort",payload:{}})},this._setupPrFrame=function(e,t){e.send({action:"stripe-pr-initialize",payload:{data:t}}),e._on("pr-cancel",(function(){n._onEvent({type:"cancel"})})),e._on("pr-close",(function(){n._onEvent({type:"close"})})),e._on("pr-error",(function(e){n._onEvent({type:"error",payload:{errorMessage:e.message||"",errorCode:e.code||""}})})),e._on("pr-callback",(function(t){var a=t.event,o=t.nonce,i=t.options;switch(a){case"token":n._onEvent({type:"paymentresponse",payload:Object(r.a)(Object(r.a)({},i),{},{complete:function(t){e.send({action:"stripe-pr-callback-complete",payload:{data:{status:t},nonce:o}})}})});break;case"shippingaddresschange":n._onEvent({type:"shippingaddresschange",payload:{shippingAddress:i.shippingAddress,updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:o,data:t}})}}});break;case"shippingoptionchange":n._onEvent({type:"shippingoptionchange",payload:{shippingOption:i.shippingOption,updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:o,data:t}})}}});break;default:throw new Error("Unexpected event from PaymentRequest inner: ".concat(a))}}))};var a=t.authentication,i=t.controller,c=t.mids,s=t.origin,l=t.usesButtonElement,f=t.options;if(this._authentication=a,this._controller=i,this._usesButtonElement=l,En&&"https:"===window.location.protocol){this._controller.action.fetchLocale({locale:"auto"});var m=this._controller.createHiddenFrame(p.c.PAYMENT_REQUEST_BROWSER,{authentication:a,mids:c,origin:s});this._setupPrFrame(m,f),this._prFrame=m}else this._prFrame=null},Pn=!1,Sn=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e){var a;Object(o.a)(this,n),(a=t.call(this))._usedByButtonElement=null,a._showCalledByButtonElement=!1,a._isShowing=!1,a._backingLibraries={APPLE_PAY:null,GOOGLE_PAY:null,BROWSER:null},a._activeBackingLibraryName=null,a._buttonTypeName=null,a._activeBackingLibrary=null,a._canMakePaymentAvailability={APPLE_PAY:null,GOOGLE_PAY:null,BROWSER:null},a._canMakePaymentResolved=!1,a._validateUserOn=function(e,t){"string"==typeof e&&("source"===e&&a._hasRegisteredListener("paymentmethod")||"paymentmethod"===e&&a._hasRegisteredListener("source"))&&(a._report("pr.double_callback_registration"),a._controller.warn("Do not register event listeners for both `source` or `paymentmethod`. Only one of them will succeed."))},a._report=function(e,t){a._controller.report(e,Object(r.a)(Object(r.a)({},t),{},{activeBackingLibrary:a._activeBackingLibraryName,usesButtonElement:a._usedByButtonElement||!1}))},a._warn=function(e){a._controller.warn(e)},a._registerElement=function(){a._usedByButtonElement=!0},a._elementShow=function(){a._showCalledByButtonElement=!0,a.show()},a._initBackingLibraries=function(e){a._queryStrategy.forEach((function(t){var n={controller:a._controller,authentication:a._authentication,mids:a._mids,origin:window.location.origin,options:e,usesButtonElement:function(){return!0===a._usedByButtonElement},listenerRegistry:a._listenerRegistry};switch(t){case"APPLE_PAY":a._backingLibraries.APPLE_PAY=new bn(n),a._backingLibraries.APPLE_PAY.setEventHandler(a._handleInternalEvent);break;case"GOOGLE_PAY":a._backingLibraries.GOOGLE_PAY=new jn(n),a._backingLibraries.GOOGLE_PAY.setEventHandler(a._handleInternalEvent);break;case"BROWSER":a._backingLibraries.BROWSER=new kn(n),a._backingLibraries.BROWSER.setEventHandler(a._handleInternalEvent);break;default:Object(_t.a)(t)}}))},a._handleInternalEvent=function(e){switch(e.type){case"paymentresponse":a._emitPaymentResponse(e.payload);break;case"error":a._report("error.pr.internal_error",{error:e.payload});break;case"close":a._isShowing=!1;break;default:a._emitExternalEvent(e)}},a._emitExternalEvent=function(e){switch(e.type){case"cancel":a._emit("cancel");break;case"shippingoptionchange":case"shippingaddresschange":var t=e.type,n=e.payload,o=null,i=!1,c=!1,u=function(r){if(c&&i)return a._report("pr.update_with_called_after_timeout",{event:t}),void a._controller.warn("Call to updateWith() was ignored because it has already timed out. Please ensure that updateWith is called within 30 seconds.");if(i)return a._report("pr.update_with_double_call",{event:t}),void a._controller.warn("Call to updateWith() was ignored because it has already been called. Do not call updateWith more than once.");o&&clearTimeout(o),i=!0,a._report("pr.update_with",{event:t});var u=Object(l.E)(xt,r||{},"".concat(t," callback")),p=u.value;u.warnings.forEach((function(e){return a._controller.warn(e)}));var d=p,f=!1;if(a._initialOptions.__isCheckout&&"APPLE_PAY"===a._activeBackingLibraryName&&p.shippingOptions&&1===p.shippingOptions.length&&0===p.shippingOptions[0].amount){p.shippingOptions;d=Object(s.a)(p,["shippingOptions"]),f=!0}var m=p.shippingOptions||a._initialOptions.shippingOptions;if(!(f||"shippingaddresschange"!==e.type||p.status!==kt.success||m&&m.length))throw new O.a("When requesting shipping information, you must specify shippingOptions once a shipping address is selected.\nEither provide shippingOptions in stripe.paymentRequest(...) or listen for the shippingaddresschange event and provide shippingOptions to the updateWith callback there.");n.updateWith(d)};a._hasRegisteredListener(e.type)?(o=setTimeout((function(){c=!0,a._report("pr.update_with_timed_out",{event:t}),a._controller.warn('Timed out waiting for a call to updateWith(). If you listen to "'.concat(e.type,'" events, then you must call event.updateWith in the "').concat(e.type,'" handler within 30 seconds.')),u({status:"fail"})}),29900),a._emit(t,Object(r.a)(Object(r.a)({},n),{},{updateWith:u}))):u({status:"success"});break;case"token":case"source":case"paymentmethod":var p=e.type,d=e.payload,f=null,m=!1,_=!1,h=function(e){if(m&&_)return a._report("pr.complete_called_after_timeout"),void a._controller.warn("Call to complete() was ignored because it has already timed out. Please ensure that complete is called within 30 seconds.");if(_)return a._report("pr.complete_double_call"),void a._controller.warn("Call to complete() was ignored because it has already been called. Do not call complete more than once.");f&&clearTimeout(f),_=!0;var t=Object(l.E)(Mt,e,"status for PaymentRequest completion"),n=t.value;t.warnings.forEach((function(e){return a._controller.warn(e)})),d.complete(n)};f=setTimeout((function(){m=!0,a._report("pr.complete_timed_out"),a._controller.warn('Timed out waiting for a call to complete(). Once you have processed the payment in the "'.concat(e.type,'" handler, you must call event.complete within 30 seconds.')),h("fail")}),29900),a._emit(p,Object(r.a)(Object(r.a)({},d),{},{complete:h}));break;default:Object(_t.a)(e)}},a._maybeEmitPaymentResponse=function(e){a._isShowing&&a._emitExternalEvent(e)},a._emitPaymentResponse=function(e){a._report("pr.payment_authorized");var t=e.token,n=Object(s.a)(e,["token"]),o=n.payerEmail,i=n.payerPhone,c=n.complete,u=a._showCalledByButtonElement?p.b.paymentRequestButton:null;a._hasRegisteredListener("token")&&a._maybeEmitPaymentResponse({type:"token",payload:e}),a._hasRegisteredListener("source")&&a._controller.action.createSourceWithData({elementName:u,type:"card",sourceData:{token:t.id,owner:{email:a._initialOptions.__billingDetailsEmailOverride||o,phone:i}},mids:null}).then((function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?c("invalid_payer_email"):(a._report("fatal.pr.token_to_source_failed",{error:e.error,token:t.id}),c("fail")):a._maybeEmitPaymentResponse({type:"source",payload:Object(r.a)(Object(r.a)({},n),{},{source:e.object})})})),a._hasRegisteredListener("paymentmethod")&&a._controller.action.createPaymentMethodWithData({elementName:u,type:"card",paymentMethodData:{card:{token:t.id},billing_details:{email:a._initialOptions.__billingDetailsEmailOverride||o,phone:i}},mids:null}).then((function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?c("invalid_payer_email"):(a._report("fatal.pr.token_to_payment_method_failed",{error:e.error,token:t.id}),c("fail")):a._maybeEmitPaymentResponse({type:"paymentmethod",payload:Object(r.a)(Object(r.a)({},n),{},{paymentMethod:e.object})})}))},a._canMakePaymentForBackingLibrary=function(e,t){var n=a._backingLibraries[e];if(!n)throw new Error("Unexpectedly calling canMakePayment on uninitialized backing library.");return u.a.race([new u.a((function(e){return setTimeout(e,1e4)})).then((function(){return!1})),n.canMakePayment({skipEnrollmentChecks:t}).then((function(e){return!!e}))]).then((function(t){return a._canMakePaymentAvailability=Object(r.a)(Object(r.a)({},a._canMakePaymentAvailability),{},Object(c.a)({},e,t)),{backingLibraryName:e,available:t}}))},a._isGooglePayOnAndroid=function(){var e=a._initialOptions.wallets,t=e&&-1===e.indexOf("googlePay");return J&&!t},a._constructCanMakePaymentResponse=function(){var e=a._isGooglePayOnAndroid()&&!!a._canMakePaymentAvailability.BROWSER;return{applePay:!!a._canMakePaymentAvailability.APPLE_PAY,googlePay:!!a._canMakePaymentAvailability.GOOGLE_PAY||e}},a.canMakePayment=w((function(e){var t=Boolean(null==e?void 0:e.skipEnrollmentChecks);if(a._report("pr.can_make_payment"),a._canMakePaymentResolved){var n=null!==a._activeBackingLibrary?a._constructCanMakePaymentResponse():null;return a._report("pr.can_make_payment_response",{response:n,cached:!0}),u.a.resolve(n)}if("https:"!==window.location.protocol)return Pn||(a._controller.warn("If you are testing Apple Pay or Google Pay, you must serve this page over HTTPS as it will not work over HTTP. Please read https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-prerequisites for more details."),Pn=!0),a._canMakePaymentResolved=!0,u.a.resolve(null);var r=a._queryStrategy.map((function(e){return function(){return a._canMakePaymentForBackingLibrary(e,!!a._initialOptions.__isCheckout&&t)}})),o=new Ke.a;return Ot(r,(function(e){var t=e.backingLibraryName,n=e.available;return n&&(a._activeBackingLibraryName=t,a._activeBackingLibrary=a._backingLibraries[t],a._buttonTypeName=a._activeBackingLibraryName,a._isGooglePayOnAndroid()&&(a._buttonTypeName="GOOGLE_PAY")),n})).then((function(e){var t=new Ke.a;a._canMakePaymentResolved=!0;var n=null;return"SATISFIED"===e.type&&(n=a._constructCanMakePaymentResponse()),a._report("pr.can_make_payment_response",{response:n,cached:!1,duration:o.getElapsedTime(t)}),n}))})),a.update=w((function(e){if(a._isShowing)throw a._report("pr.update_called_while_showing"),new O.a("You cannot update Payment Request options while the payment sheet is showing.");var t=Object(l.E)(Rt,e,"PaymentRequest update()"),n=t.value,r=t.warnings;a._report("pr.update"),r.forEach((function(e){return a._warn(e)})),Object(we.g)(a._backingLibraries).forEach((function(e){e&&e.update(n)}))})),a.show=w((function(){if(a._usedByButtonElement&&!a._showCalledByButtonElement&&(a._report("pr.show_called_with_button"),a._warn("Do not call show() yourself if you are using the paymentRequestButton Element. The Element handles showing the payment sheet.")),!a._canMakePaymentResolved)throw a._report("pr.show_called_before_can_make_payment"),new O.a("You must first check the Payment Request API's availability using paymentRequest.canMakePayment() before calling show().");if(!a._activeBackingLibrary)throw a._report("pr.show_called_with_can_make_payment_false"),new O.a("Payment Request is not available in this browser.");var e=a._activeBackingLibrary;a._report("pr.show",{listeners:Object.keys(a._callbacks).sort()}),a._isShowing=!0,e.show()})),a.abort=w((function(){if(a._activeBackingLibrary){var e=a._activeBackingLibrary;a._report("pr.abort"),e.abort()}})),a.isShowing=function(){return a._isShowing},a._controller=e.controller,a._authentication=e.authentication,a._mids=e.mids,a._listenerRegistry=e.listenerRegistry;var i=Object(l.E)(Nt,e.rawOptions||{},"paymentRequest()"),d=i.value,f=i.warnings;if(a._report("pr.options",{options:Object(we.e)(d,["country","currency","jcbEnabled","requestPayerEmail","requestPayerName","requestPayerPhone","requestShipping","disableWallets","wallets"])}),f.forEach((function(e){return a._warn(e)})),d.__billingDetailsEmailOverride&&d.requestPayerEmail)throw new O.a("When providing `__billingDetailsEmailOverride`, `requestPayerEmail` has to be `false` so that the customer is not prompted for their email in the payment sheet.");var m=d.disableWallets,_=m?Lt.c.filter((function(e){return-1===m.indexOf(e)})):d.wallets;return a._queryStrategy=_?qt(_):e.queryStrategyOverride||Dt(),a._report("pr.query_strategy",{queryStrategy:a._queryStrategy}),a._initialOptions=Object(r.a)(Object(r.a)({},d),{},{__betas:e.betas,wallets:_}),a._initBackingLibraries(a._initialOptions),a}return n}(T),An={base:Object(l.s)(l.p),complete:Object(l.s)(l.p),empty:Object(l.s)(l.p),invalid:Object(l.s)(l.p),paymentRequestButton:Object(l.s)(l.p)},Tn={classes:Object(l.s)(Object(l.u)({base:Object(l.s)(l.x),complete:Object(l.s)(l.x),empty:Object(l.s)(l.x),focus:Object(l.s)(l.x),invalid:Object(l.s)(l.x),webkitAutofill:Object(l.s)(l.x)})),hidePostalCode:Object(l.s)(l.b),hideIcon:Object(l.s)(l.b),showIcon:Object(l.s)(l.b),style:Object(l.s)(Object(l.u)(An)),iconStyle:Object(l.s)(Object(l.q)("solid","default")),value:Object(l.s)(Object(l.t)(l.x,l.p)),__privateCvcOptional:Object(l.s)(l.b),__privateValue:Object(l.s)(Object(l.t)(l.x,l.p)),__privateEmitIbanValue:Object(l.s)(l.b),error:Object(l.s)(Object(l.u)({type:l.x,code:Object(l.s)(l.x),decline_code:Object(l.s)(l.x),param:Object(l.s)(l.x)})),locale:Object(l.j)("elements()"),fonts:Object(l.j)("elements()"),placeholder:Object(l.s)(l.x),disabled:Object(l.s)(l.b),placeholderCountry:Object(l.s)(l.x),paymentRequest:Object(l.s)(Object(l.h)(Sn,"stripe.paymentRequest(...)")),supportedCountries:Object(l.s)(Object(l.a)(l.x)),accountHolderType:Object(l.s)(Object(l.q)("individual","company")),issuingCard:Object(l.s)(l.x),toCopy:Object(l.s)(Object(l.q)("number","cvc","expiry"))},In=Object(l.u)(Tn),Cn=n(15),Nn=n(23),Rn=(vn={},Object(c.a)(vn,Cn.a.card,Nn.a.CARD_ELEMENT),Object(c.a)(vn,Cn.a.cardNumber,Nn.a.CARD_ELEMENT),Object(c.a)(vn,Cn.a.cardExpiry,Nn.a.CARD_ELEMENT),Object(c.a)(vn,Cn.a.cardCvc,Nn.a.CARD_ELEMENT),Object(c.a)(vn,Cn.a.postalCode,Nn.a.CARD_ELEMENT),Object(c.a)(vn,Cn.a.paymentRequestButton,Nn.a.PAYMENT_REQUEST_ELEMENT),Object(c.a)(vn,Cn.a.iban,Nn.a.IBAN_ELEMENT),Object(c.a)(vn,Cn.a.idealBank,Nn.a.IDEAL_BANK_ELEMENT),Object(c.a)(vn,Cn.a.p24Bank,Nn.a.P24_BANK_ELEMENT),Object(c.a)(vn,Cn.a.auBankAccount,Nn.a.AU_BANK_ACCOUNT_ELEMENT),Object(c.a)(vn,Cn.a.fpxBank,Nn.a.FPX_BANK_ELEMENT),Object(c.a)(vn,Cn.a.issuingCardNumberDisplay,Nn.a.ISSUING_CARD_NUMBER_DISPLAY_ELEMENT),Object(c.a)(vn,Cn.a.issuingCardCopyButton,Nn.a.ISSUING_CARD_COPY_BUTTON_ELEMENT),Object(c.a)(vn,Cn.a.issuingCardCvcDisplay,Nn.a.ISSUING_CARD_CVC_DISPLAY_ELEMENT),Object(c.a)(vn,Cn.a.issuingCardExpiryDisplay,Nn.a.ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT),Object(c.a)(vn,Cn.a.epsBank,Nn.a.EPS_BANK_ELEMENT),Object(c.a)(vn,Cn.a.netbankingBank,Nn.a.NETBANKING_BANK_ELEMENT),Object(c.a)(vn,Cn.a.afterpayClearpayMessageModal,Nn.a.AFTERPAY_MESSAGE_MODAL_ELEMENT),vn),xn=function(e){var t=Object(gt.a)(e,null);return!!t&&"rtl"===t.getPropertyValue("direction")},Mn=n(40),Ln=function(e){var t=document.createElement("input");return t.className=e,t.setAttribute("aria-hidden","true"),t.setAttribute("aria-label"," "),t.setAttribute("autocomplete","false"),t.maxLength=1,t.disabled=!0,Object(x.d)(t,Mn.b),t},Dn=["test_id"],qn=function(e){switch(e.type){case"object":return Dn.push(e.object.id),{issuingCard:e.object};case"error":return{error:e.error};default:return Object(_t.a)(e)}},Bn=function(e){switch(e.type){case"object":return{nonce:e.object.public_nonce};case"error":return{error:e.error};default:return Object(_t.a)(e)}},Fn={base:"StripeElement",focus:"StripeElement--focus",invalid:"StripeElement--invalid",complete:"StripeElement--complete",empty:"StripeElement--empty",webkitAutofill:"StripeElement--webkit-autofill"},Un="#faffbd",Yn=function(e){return parseFloat(e.toFixed(1))},Gn=function(e){return/^\d+(\.\d*)?px$/.test(e)},Hn=function(){function e(t){var n=this;Object(o.a)(this,e),this.focus=function(){if(n._isIssuingDisplayElement())throw new O.a("Cannot call focus() on an ".concat(n._componentName," Element."));document.activeElement&&document.activeElement.blur&&document.activeElement.blur(),n._fakeInput.focus()},this._formSubmit=function(){for(var e=n._component.parentElement;e&&"FORM"!==e.nodeName;)e=e.parentElement;if(e){var t=document.createEvent("Event");t.initEvent("submit",!0,!0),e.dispatchEvent(t)}};var r=t.options,a=t.component,i=t.listenerRegistry,c=t.elementTimings,s=t.emitEvent,u=t.getParent,p=r.controller,d=r.componentName,f=r.publicOptions;this._componentName=d,this._component=a,this._controller=p,this._listenerRegistry=i,this._emitEvent=s,this._getParent=u;var m=Object(l.E)(In,f||{},"create()"),_=m.value;m.warnings.forEach((function(e){return n._controller.warn(e)}));var h,b=_.paymentRequest,y=_.classes,v=_.issuingCard,g="paymentRequestButton"===this._componentName;if(g){if(!b)throw new O.a("You must pass in a stripe.paymentRequest object in order to use this Element.");this._paymentRequest=b,this._paymentRequest._registerElement()}if(this._isIssuingDisplayElement()){if(!v)throw new Error("You must pass in an ID to the issuingCard option in order to use this Element.");if(h=v,-1===Dn.indexOf(h))throw new Error("Issuing card ".concat(v," has not been retrieved."))}this._createElement(r,_,c),this._classes=Fn,this._computeCustomClasses(y||{}),this._lastBackgroundColor="",this._focused=!1,this._empty=!g,this._invalid=!1,this._complete=!1,this._autofilled=!1,this._lastSubmittedAt=null}return Object(i.a)(e,[{key:"update",value:function(e){var t=this,n=Object(l.E)(In,e||{},"element.update()"),r=n.value;if(n.warnings.forEach((function(e){return t._controller.warn(e)})),r){var a=r.classes,o=Object(s.a)(r,["classes"]);a&&(this._removeClasses(),this._computeCustomClasses(a),this._updateClasses()),this._updateFrameHeight(r),Object.keys(o).length&&(this._frame.update(o),this._secondaryFrame&&this._secondaryFrame.update(o))}}},{key:"blur",value:function(){if(this._isIssuingDisplayElement())throw new O.a("Cannot call blur() on an ".concat(this._componentName," Element."));this._frame.blur(),this._fakeInput.blur()}},{key:"clear",value:function(){this._frame.clear()}},{key:"unmount",value:function(){var e=this._getParent(),t=this._label;e&&(this._listenerRegistry.removeEventListener(e,"click",this.focus),this._removeClasses()),t&&(this._listenerRegistry.removeEventListener(t,"click",this.focus),this._label=null),this._secondaryFrame&&(this._secondaryFrame.unmount(),this._listenerRegistry.removeEventListener(window,"click",this._handleOutsideClick)),this._fakeInput.disabled=!0,this._frame.unmount()}},{key:"mount",value:function(){if(Object(x.b)(document,this._component)){this._controller.report("user_error.shadow_dom_mount",{element:this._componentName});var e=function(){throw new O.a("Elements cannot be mounted in a ShadowRoot. Please mount in the Light DOM.")};"test"===this._controller.keyMode()?e():setTimeout(e,0)}if(this._paymentRequest){if(!this._paymentRequest._canMakePaymentResolved)throw new O.a("For the paymentRequestButton Element, you must first check availability using paymentRequest.canMakePayment() before mounting the Element.");if(!this._paymentRequest._activeBackingLibraryName)throw new O.a("The paymentRequestButton Element is not available in the current environment.")}this._mountTimestamp=new Ke.a,this._findPossibleLabel(),this._updateClasses()}},{key:"_isIssuingDisplayElement",value:function(){return"issuingCardNumberDisplay"===this._componentName||"issuingCardCvcDisplay"===this._componentName||"issuingCardExpiryDisplay"===this._componentName}},{key:"_updateClasses",value:function(){var e=this._getParent();e&&Object(x.f)(e,[[this._classes.base,!0],[this._classes.empty,this._empty],[this._classes.focus,this._focused],[this._classes.invalid,this._invalid],[this._classes.complete,this._complete],[this._classes.webkitAutofill,this._autofilled]])}},{key:"_removeClasses",value:function(){var e=this._getParent();e&&Object(x.f)(e,[[this._classes.base,!1],[this._classes.empty,!1],[this._classes.focus,!1],[this._classes.invalid,!1],[this._classes.complete,!1],[this._classes.webkitAutofill,!1]])}},{key:"_findPossibleLabel",value:function(){var e=this._getParent();if(e){var t,n=e.getAttribute("id");if(n&&(t=document.querySelector("label[for='".concat(n,"']"))),t)this._listenerRegistry.addEventListener(e,"click",this.focus);else for(t=t||e.parentElement;t&&"LABEL"!==t.nodeName;)t=t.parentElement;t?(this._label=t,this._listenerRegistry.addEventListener(t,"click",this.focus)):this._listenerRegistry.addEventListener(e,"click",this.focus)}}},{key:"_computeCustomClasses",value:function(e){var t={};return Object.keys(e).forEach((function(n){if(!Fn[n])throw new O.a("".concat(n," is not a customizable class name.\nYou can customize: ").concat(Object.keys(Fn).join(", ")));var r=e[n]||Fn[n];t[n]=r.replace(/\./g," ")})),this._classes=Object(r.a)(Object(r.a)({},this._classes),t),this}},{key:"_setupEvents",value:function(e){var t=this,n=e.stripeJsLoadTimestamp,r=(e.stripeCreateTimestamp,e.groupCreateTimestamp),o=e.createTimestamp,i=0,c=0,s={stripeJsLoad:n.getAsPosixTime(),stripeCreate:o.getAsPosixTime(),groupCreate:r.getAsPosixTime(),create:o.getAsPosixTime()};if(this._frame._on("load",(function(e){var n=e.source;i++;var r=t._getParent(),a=xn(r),o=t._paymentRequest?t._paymentRequest._buttonTypeName:null;t._mountTimestamp&&(s.mount=t._mountTimestamp.getAsPosixTime()),t._frame.send({action:"stripe-user-mount",payload:{timestamps:s,loadCount:i,matchFrame:n===t._frame._iframe.contentWindow,rtl:a,paymentRequestButtonType:o}})})),this._secondaryFrame){var u=this._secondaryFrame;u._on("load",(function(e){var n=e.source;c++,t._mountTimestamp&&(s.mount=t._mountTimestamp.getAsPosixTime()),u.send({action:"stripe-user-mount",payload:{timestamps:s,loadCount:c,matchFrame:n===u._iframe.contentWindow,rtl:!1,paymentRequestButtonType:null}})}))}this._frame._on("redirectfocus",(function(e){var n=e.focusDirection,r=Object(ie.b)(t._component,n);r&&r.focus()})),this._frame._on("focus",(function(){t._focused=!0,t._updateClasses()})),this._frame._on("blur",(function(){t._focused=!1,t._updateClasses(),t._lastSubmittedAt&&"paymentRequestButton"===t._componentName&&(t._controller.report("payment_request_button.sheet_visible",{latency:t._lastSubmittedAt.getElapsedTime()}),t._lastSubmittedAt=null)})),this._frame._on("submit",(function(){if("paymentRequestButton"===t._componentName){t._lastSubmittedAt=new Ke.a;var e=!1,n=!1;We(),t._emitEvent("click",{preventDefault:function(){t._controller.report("payment_request_button.default_prevented"),e&&t._controller.warn("event.preventDefault() was called after the payment sheet was shown. Make sure to call it synchronously when handling the `click` event."),n=!0}}),!n&&t._paymentRequest&&(t._paymentRequest._elementShow(),e=!0)}else t._emitEvent("submit"),t._formSubmit()})),["ready","focus","blur","escape","click"].forEach((function(e){t._frame._on(e,(function(){t._emitEvent(e)}))})),this._frame._on("change",(function(e){We();var n={},r=ft.a[t._componentName]||[];["error","value","empty","complete"].concat(Object(a.a)(r)).forEach((function(t){return n[t]=e[t]})),t._emitEvent("change",n),t._empty=n.empty,t._invalid=!!n.error,t._complete=n.complete,t._updateClasses()})),this._frame._on("__privateIntegrationError",(function(e){var n=e.message;t._emitEvent("__privateIntegrationError",{message:n})})),this._frame._on("dimensions",(function(e){var n=t._getParent();if(n){var r=Object(gt.a)(n,null);if(r){var a=parseFloat(r.getPropertyValue("height")),o=e.height;if("border-box"===r.getPropertyValue("box-sizing")){var i=parseFloat(r.getPropertyValue("padding-top")),c=parseFloat(r.getPropertyValue("padding-bottom"));a=a-parseFloat(r.getPropertyValue("border-top"))-parseFloat(r.getPropertyValue("border-bottom"))-i-c}var s=Yn(a),u=Yn(o);0!==a&&s1&&void 0!==arguments[1]&&arguments[1],n=e.style;if("paymentRequestButton"===this._componentName){var r=n&&n.paymentRequestButton||{},a=r.height,o="string"==typeof a?a:void 0;(t||o)&&(this._frame.updateStyle({height:o||this._lastHeight||jt}),this._lastHeight=o||this._lastHeight)}else{var i=n&&n.base||{},c=i.lineHeight,s=i.fontSize,u=i.padding,l="string"!=typeof c||isNaN(parseFloat(c))?void 0:c,d="string"==typeof s?s:void 0,f="string"==typeof u?u:void 0;if(d&&!Gn(d)&&this._controller.warn("The fontSize style you specified (".concat(d,") is not in px. We do not recommend using relative css units, as they will be calculated relative to our iframe's styles rather than your site's.")),t||l||d){var m=-1===p.l.indexOf(this._componentName)?void 0:f||this._lastPadding,_=vt(l||this._lastHeight,d||this._lastFontSize,m);this._frame.updateStyle({height:_}),this._lastFontSize=d||this._lastFontSize,this._lastHeight=l||this._lastHeight,this._lastPadding=m}}}},{key:"_createElement",value:function(e,t,n){var a=this,o=(e.controller,e.publicOptions,e.componentName),i=e.groupId,c=Object(s.a)(e,["controller","publicOptions","componentName","groupId"]),u=(t.classes,t.paymentRequest,Object(s.a)(t,["classes","paymentRequest"])),l=this._component,d=Ln($e.c);Object(x.d)(l,Mn.a);var f=xn(document.body),m=Rn[o],_=Object(r.a)(Object(r.a)(Object(r.a)({},c),u),{},{rtl:f}),h=this._controller.createElementFrame(m,o,i,_);if(h._on("load",(function(){d.disabled=!1})),this._listenerRegistry.addEventListener(d,"focus",(function(){h.focus()})),h.appendTo(l),ft.c[o]){var b=ft.c[o].secondary,y=this._controller.createSecondaryElementFrame(m,b,o,i,_);y&&y.on&&y.on("height-change",(function(e){y.updateStyle({height:"".concat(e.height,"px")})})),this._secondaryFrame=y,y.appendTo(l),this._listenerRegistry.addEventListener(window,"click",(function(){return a._handleOutsideClick()}))}if(l.appendChild(d),V&&o!==p.b.paymentRequestButton){var v=function(){var e=Ln($e.d);return e.setAttribute("tabindex","-1"),e}();l.appendChild(v)}this._frame=h,this._fakeInput=d,this._setupEvents(n),this._updateFrameHeight(t,!0)}}]),e}(),zn=n(22),Wn={amount:l.n,currency:Object(l.q)("USD"),logoColor:Object(l.s)(Object(l.q)("primary","black","white")),fontColor:Object(l.s)(l.x),fontSize:Object(l.s)(l.x),stripeMerchantId:Object(l.s)(l.x)},Kn=Object(l.u)(Wn),Vn=function(e){var t=!1;window.Promise||(t=!0,window.Promise=u.a);var n=e();return t&&window.Promise===u.a&&delete window.Promise,n},Jn=function(e){var t,o=e.options,i=Object(s.a)(e,["options"]),c=e.emitEvent,p=e.listenerRegistry,d=o.controller,f=o.componentName,m=o.publicOptions,_=o.groupId,h=new Ke.a,b=function(e){var t=Object(l.E)(Kn,e||{},"create()"),n=t.value,r=t.warnings;if(!Math.floor(n.amount)===n.amount)throw new O.a("'Amount' must be a whole integer number that represents the lowest denomination (cents).");return r.forEach((function(e){return d.warn(e)})),n},y=b(m),v=function(e,n){return e.apply(void 0,[t].concat(Object(a.a)(n)))},g=[],j=function(e){return function(){for(var n=arguments.length,r=new Array(n),a=0;a0)if(t===d.a.test){var a="- ".concat(r.join("\n- "));n.warn("The following payment method types are not activated:\n\n".concat(a,"\n\nThey will be displayed in test mode, but hidden in live mode. Please activate the payment method types in your dashboard (https://dashboard.stripe.com/settings/payment_methods) and ensure your account is enabled for any preview features that you are trying to use."))}else e.orderedPaymentMethodTypes=e.orderedPaymentMethodTypes.filter((function(e){return-1===r.indexOf(e)})),e.orderedPaymentMethodTypesAndWallets=e.orderedPaymentMethodTypesAndWallets.filter((function(e){return-1===r.indexOf(e)}))}(e,c.controller.keyMode(),c.controller),"shippingAddress"===c.componentName&&Object(ot.d)(c.betas,"shipping_address_element_beta_1")){var t=gr(c.controller,p);p._on("get-google-maps-predictions",(function(e){t._emit("get-google-maps-predictions",e)})),p._on("get-google-maps-details",(function(e){t._emit("get-google-maps-details",e)}))}if("payment"===c.componentName){var r,a,o=c.publicOptions,u=e.paymentIntent||e.setupIntent,f=function(e,t){if(e.payment_method_types.every((function(e){return-1===tr.indexOf(e)}))){var n=tr.join(", ");return{type:"validation_error",code:"unsupported_parameter",param:"payment_method_types",message:"The PaymentIntent you passed doesn't have any payment_method_types that are supported by the Payment Element. Please use a PaymentIntent with a least one of the following payment_method_types: ".concat(n)}}var r=-1!==e.payment_method_types.indexOf("card");return-1===e.payment_method_types.indexOf("link")||r?null:{type:"validation_error",code:"unsupported_parameter",param:"payment_method_types",message:"The PaymentIntent you passed has 'link' in the payment_method_types but not 'card'. To use 'link' with the PaymentElement, please pass both 'link' and 'card'"}}(u,c.publicOptions);f&&(i("loaderror",{error:f}),s());-1!==u.payment_method_types.indexOf(pr.b.afterpay_clearpay)&&(b=Xn().then((function(e){var t=e.mountModal,n=e.unmountModal;return l.push((function(){n()})),t})),p._on("mount-afterpay-modal",(function(e){var t=e.locale,r=e.modalTheme;b.then((function(e){e({controller:c.controller,listenerRegistry:n,locale:t,modalTheme:r})}))})));var m="never"===(null===(r=o.wallets)||void 0===r?void 0:r.applePay),_="never"===(null===(a=o.wallets)||void 0===a?void 0:a.googlePay),h=Object(ot.d)(c.betas,"payment_element_beta_1")&&!Object(ot.d)(c.betas,"payment_element_apple_pay_beta_1");h||m||"unknown"!==e.applePayPreference&&"enabled"!==e.applePayPreference||vr(e,c,n,p,"applePay"),h||_||"unknown"!==e.googlePayPreference&&"enabled"!==e.googlePayPreference||vr(e,c,n,p,"googlePay");-1!==u.payment_method_types.indexOf(pr.b.link)&&p._on("link-launch",(function(e){var t,n,r,a,o=e.consumerClientSecret;(t=u.client_secret,n=u.id,r=c.controller,a=o,br({linkAccountSessionCreatorClientSecret:t,linkAccountSessionCreatorType:"link_payment_intent",linkAccountSessionCreatorId:n,controller:r,consumerSessionSecret:a})).then((function(e){!e.error&&e.linkAccountSession.paymentAccount&&c.controller.action.createBankPaymentDetails({bankAccount:e.linkAccountSession.paymentAccount.id,groupId:c.groupId})}))}))}var b}}));Object(x.d)(t,Mn.a),p.appendTo(t),p.updateStyle(function(e){switch(e){case"linkAuthentication":case"payment":case"shippingAddress":return{height:"2px"};default:return Object(_t.a)(e)}}(c.componentName)),p._on("load",(function(){p.send({action:"stripe-user-mount",payload:{timestamps:{stripeJsLoad:a.stripeJsLoadTimestamp.getAsPosixTime(),stripeCreate:a.stripeCreateTimestamp.getAsPosixTime(),groupCreate:a.groupCreateTimestamp.getAsPosixTime(),create:a.createTimestamp.getAsPosixTime(),mount:u?u.getAsPosixTime():0},rtl:xn(o())}})})),$e.e.forEach((function(e){p._on(e,(function(t){return i(e,t)}))})),p._on("set_styles",(function(e){p.updateStyle(e)})),p._on("redirectfocus",(function(e){var n,r=e.focusDirection;null===(n=Object(ie.b)(t,r))||void 0===n||n.focus()}));return{update:function(e){p.update(e)},focus:function(){document.activeElement&&document.activeElement.blur&&document.activeElement.blur(),p.focus(),p.send({action:"stripe-user-focus",payload:{}})},blur:function(){p.blur()},clear:function(){p.clear()},mount:function(){f.then((function(e){e&&p.send({action:"stripe-intent-retrieved",payload:e})})),u=new Ke.a;var e=o();e&&(Object(x.f)(e,[[$e.a,!0]]),l.push((function(){Object(x.f)(e,[[$e.a,!1]])})))},unmount:function(){for(;l.length;)l.pop()();p.unmount()},collapse:function(){p.collapse()},_frame:p,__setupDonePromise:m}},Er=function(e){var t=e.options,n=Object(s.a)(e,["options"]),a=t.controller,o=t.componentName,i=t.publicOptions,c=Object(s.a)(t,["controller","componentName","publicOptions"]),u=function(e){switch(e){case"linkAuthentication":case"payment":case"shippingAddress":return e;default:throw new Error("Unexpected element type for implementation")}}(o),l=lr(u,i||{},"elements.create('".concat(u,"')"),!1,t.betas);l.warnings.forEach((function(e){return a.warn(e)}));var p=jr(Object(r.a)(Object(r.a)({},n),{},{options:Object(r.a)(Object(r.a)({},c),{},{controller:a,componentName:u,publicOptions:l.value})})),d=p.update,f=Object(s.a)(p,["update"]);return Object(r.a)({update:function(e){var n=lr(u,e||{},"".concat(u,".update()"),!0,t.betas);n.warnings.forEach((function(e){return a.warn(e)})),d(n.value)}},f)},wr=function(e,t){var n=function(e){if(!ft.b[e])throw new Error("Unexpected Element type: ".concat(e,"."));return ft.b[e].implementation}(e);switch(n){case"legacy":return new Hn(t);case"affirm_message":return Jn(t);case"afterpay_message":return Qn(t);case"frame":return Er(t);default:return Object(_t.a)(n,"Unexpected implementation type: ".concat(n,"."))}},kr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(we.e)(e,["business","fields","paymentMethodOrder","readOnly","terms","wallets","accountHolderType","disabled","hideIcon","hidePostalCode","iconStyle","placeholderCountry","rtl","showIcon","supportedCountries","betas","componentName","groupId","locale"])},Pr=function(e){Object(b.a)(n,e);var t=Object(y.a)(n);function n(e,a,i){var c;Object(o.a)(this,n),(c=t.call(this)).mount=w((function(e){var t;if(c._checkDestroyed(),!e)throw new O.a("Missing argument. Make sure to call mount() with a valid DOM element or selector.");if("string"==typeof e){var n=document.querySelectorAll(e);if(n.length>1&&c._controller.warn("The selector you specified (".concat(e,") applies to ").concat(n.length," DOM elements that are currently on the page.\nThe Stripe Element will be mounted to the first one.")),!n.length)throw new O.a("The selector you specified (".concat(e,") applies to no DOM elements that are currently on the page.\nMake sure the element exists on the page before calling mount()."));t=n[0]}else{if(!e.appendChild)throw new O.a("Invalid DOM element. Make sure to call mount() with a valid DOM element or selector.");t=e}if("INPUT"===t.nodeName)throw new O.a("Stripe Elements must be mounted in a DOM element that\ncan contain child nodes. `input` elements are not permitted to have child\nnodes. Try using a `div` element instead.");t.children.length&&c._controller.warn("This Element will be mounted to a DOM element that contains child nodes."),c._mountToParent(t)})),c.update=w((function(e){return c._controller.report("update",{options:kr(e),element:c._componentName}),c._checkDestroyed(),c._implementation.update(e),Object(C.a)(c)})),c.focus=w((function(e){return c._checkDestroyed(),e&&e.preventDefault(),c._implementation.focus(),Object(C.a)(c)})),c.blur=w((function(){return c._checkDestroyed(),c._implementation.blur(),Object(C.a)(c)})),c.clear=w((function(){return c._checkDestroyed(),c._implementation.clear(),Object(C.a)(c)})),c.collapse=w((function(){if(c._checkDestroyed(),!c._implementation.collapse)throw new O.a("Collapse is not supported by the ".concat(c._componentName," Element."));return c._implementation.collapse(),Object(C.a)(c)})),c.unmount=w((function(){return c._checkDestroyed(),c._unmount(),Object(C.a)(c)})),c.destroy=w((function(){return c._checkDestroyed(),c.unmount(),c._destroyed=!0,c._emitEvent("destroy"),Object(C.a)(c)})),c._getParent=function(){return c._parent},c._emitEvent=function(e,t){return"loaderror"!==e||c._hasRegisteredListener("loaderror")||c._controller.keyMode()!==d.a.test||console.error("Unhandled ".concat(c._componentName," Element loaderror"),t),c._emit(e,Object(r.a)({elementType:c._componentName},t))};var s=e.controller,u=e.componentName,l=e.groupId,p=e.locale,f=e.betas,m=e.mids;c._controller=s,c._componentName=u,c._destroyed=!1,c._mids=m;var _=document.createElement("div");return _.className=ft.d,c._component=_,s.report("create",{options:kr(Object(r.a)({componentName:u,groupId:l,locale:p,betas:f},e.publicOptions)),element:u}),c._implementation=wr(c._componentName,{options:e,component:_,listenerRegistry:a,elementTimings:i,emitEvent:c._emitEvent,getParent:c._getParent,selfDestruct:function(){c.destroy()}}),c}return Object(i.a)(n,[{key:"_checkDestroyed",value:function(){if(this._destroyed)throw new O.a("This Element has already been destroyed. Please create a new one.")}},{key:"_isMounted",value:function(){return!!document.body&&document.body.contains(this._component)}},{key:"_unmount",value:function(){var e=this._component.parentElement;e&&e.removeChild(this._component),this._implementation.unmount(),this._parent=null}},{key:"_mountToParent",value:function(e){var t=this._component.parentElement,n=this._isMounted();if(e===t){if(n)return;this.unmount(),this._mountTo(e)}else if(t){if(n)throw new O.a("This Element is already mounted. Use `unmount()` to unmount the Element before re-mounting.");this.unmount(),this._mountTo(e)}else this._mountTo(e)}},{key:"_mountTo",value:function(e){for(this._parent=e;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(this._component),this._controller.report("mount",{element:this._componentName}),this._implementation.mount()}}]),n}(T),Sr=function(e,t){e._controller.report("legacy_private_property_used",{prop:t,componentName:e._componentName})};["_autofilled","_classes","_complete","_empty","_fakeInput","_focused","_frame","_invalid","_lastBackgroundColor","_lastFontSize","_lastHeight","_lastPadding","_lastSubmittedAt","_listenerRegistry","_paymentRequest"].forEach((function(e){Object.defineProperty(Pr.prototype,e,{enumerable:!1,get:function(){return Sr(this,e),this._implementation[e]}})}));["_formSubmit","_isIssuingDisplayElement"].forEach((function(e){Object.defineProperty(Pr.prototype,e,{enumerable:!1,writable:!1,value:function(){return Sr(this,e),this._implementation[e]()}})}));var Ar=Pr,Tr=Object(l.u)({locale:Object(l.s)(l.x),appearance:Object(l.s)(l.p)}),Ir=function e(t,n,i,c,u,p){var d=this;Object(o.a)(this,e),this.getElement=w((function(e){var t,n=(null!=(t=e)&&t.__elementType&&"string"==typeof t.__elementType&&"function"==typeof t?t.__elementType:null)||e;return mt(n,d._betas),Object(we.a)(d._elements,(function(e){return e._componentName===n}))||null})),this.update=w((function(e){var t=Object(l.E)(Tr,e||{},"elements.update()"),n=t.value;t.warnings.forEach((function(e){return d._controller.warn(e)}));var r=n.locale,a=n.appearance,o=void 0===a?void 0:a,i=dt(r,d._betas);i&&d._controller.action.fetchLocale({locale:i}),(o||i)&&d._controller.action.updateElementsOptions({locale:i,appearance:o,groupId:d._id})})),this.create=k((function(e,t){var n=new Ke.a;!function(e,t,n){if(mt(e,n),ft.b[e].unique&&-1!==t.indexOf(e))throw new O.a("Can only create one Element of type ".concat(e,"."));var r=ft.b[e].conflict,a=Object(we.f)(t,r);if(a.length){var o=a[0];throw new O.a("Cannot create an Element of type ".concat(e," after an Element of type ").concat(o," has already been created."))}}(e,d._elements.map((function(e){return e._componentName})),d._betas);var o=Object(r.a)(Object(r.a)(Object(r.a)({},t),d._commonOptions),{},{componentName:e,groupId:d._id}),i=(o.paymentRequest,Object(s.a)(o,["paymentRequest"])),c=(z||K)&&Object(v.a)(i).length>2e3,u=!!d._pendingFonts||c,l=new Ar(Object(r.a)(Object(r.a)({publicOptions:t},d._commonOptions),{},{elementsSessionPromise:d._elementsSessionPromise,componentName:e,groupId:d._id,fonts:c?null:d._commonOptions.fonts,controller:d._controller,wait:u,mids:d._mids}),d._listenerRegistry,Object(r.a)(Object(r.a)({},d._timings),{},{createTimestamp:n}));return d._elements=[].concat(Object(a.a)(d._elements),[l]),l._on("destroy",(function(){d._elements=d._elements.filter((function(t){return t._componentName!==e}))})),c&&l._implementation.update({fonts:d._commonOptions.fonts}),l}));var f,m=new Ke.a,h=Object(l.E)(function(e){var t={locale:Object(l.s)(l.x),fonts:Object(l.s)(Object(l.a)(l.p)),appearance:Object(l.s)(l.p),clientSecret:Object(l.s)(er.f)};return Object(ot.d)(e,ot.a.elements_customers_beta_1)?Object(l.u)(Object(r.a)(Object(r.a)({},t),{},{customerOptions:Object(l.s)(Object(l.u)({customer:l.x,ephemeralKey:l.x}))})):Object(l.u)(t)}(c),p||{},"elements()"),b=h.value;h.warnings.forEach((function(e){return t.warn(e)})),f=t.warn,rt("width=device-width")||f('Elements requires "width=device-width" be set in your page\'s viewport meta tag.\n For more information: https://stripe.com/docs/js/appendix/viewport_meta_requirements'),t.report("elements",{options:b});var y=b.fonts,g=void 0===y?[]:y,j=b.locale,E=b.customerOptions,P=void 0===E?null:E,S=Object(s.a)(b,["fonts","locale","customerOptions"]),A=b.appearance?b.appearance:{};this._elements=[],this._id=_("elements"),this._timings=Object(r.a)(Object(r.a)({},i),{},{groupCreateTimestamp:m}),this._controller=t,this._betas=c,this._listenerRegistry=n,this._mids=u;var T=dt(j,c);this._controller.action.fetchLocale({locale:T||"auto"});var I=g.filter((function(e){return!e.cssSrc||"string"!=typeof e.cssSrc})).map((function(e){return Object(r.a)(Object(r.a)({},e),{},{__resolveFontRelativeTo:window.location.href})})),C=g.map((function(e){return e.cssSrc})).reduce((function(e,t){return"string"==typeof t?[].concat(Object(a.a)(e),[t]):e}),[]).map((function(e){return Object(at.b)(e)?e:Object(at.c)(window.location.href,e)}));return this._pendingFonts=C.length,this._elementsSessionPromise=S.clientSecret&&t.action.retrieveElementsSession({intentSecret:S.clientSecret,customerOptions:P,locale:j}),this._commonOptions=Object(r.a)(Object(r.a)({},S),{},{betas:c,appearance:A,locale:T,fonts:I}),C.forEach((function(e){if("string"==typeof e){var t=new Ke.a;pt(e).then((function(n){d._controller.report("font.loaded",{load_time:t.getElapsedTime(),font_count:n.length,css_src:e});var o=n.map((function(t){return Object(r.a)(Object(r.a)({},t),{},{__resolveFontRelativeTo:e})}));d._controller.action.updateCSSFonts({fonts:o,groupId:d._id}),d._commonOptions=Object(r.a)(Object(r.a)({},d._commonOptions),{},{fonts:[].concat(Object(a.a)(d._commonOptions.fonts?d._commonOptions.fonts:[]),Object(a.a)(o))})})).catch((function(n){d._controller.report("error.font.not_loaded",{load_time:t.getElapsedTime(),message:n&&n.message&&n.message,css_src:e}),d._controller.warn("Failed to load CSS file at ".concat(e,"."))}))}})),this},Cr=function(e,t,n,r,a,o,i){return new Sn({controller:e,authentication:t,mids:n,rawOptions:r,betas:a,queryStrategyOverride:o,listenerRegistry:i})},Nr=Object(l.u)({name:Object(l.q)("react-stripe-js","stripe-js","react-stripe-elements"),version:Object(l.m)(l.x),startTime:Object(l.s)(l.n)}),Rr=Object(l.d)({name:Object(l.v)(1,30),partner_id:Object(l.s)(Object(l.w)("pp_partner_")),version:Object(l.s)(Object(l.v)(5,15)),url:Object(l.s)(Object(l.v)(4,60))}),xr="publishable",Mr="secret",Lr="ephemeral",Dr="restricted",qr="unknown",Br=function(e){if(""===e)throw new O.a("Please call Stripe() with your publishable key. You used an empty string.");switch(function(e){switch(e.split("_",1)[0]){case"pk":return xr;case"sk":return Mr;case"ek":return Lr;case"rk":return Dr;default:return qr}}(e)){case Mr:throw new O.a("You should not use your secret key with Stripe.js.\n Please pass a publishable key instead.");case Lr:throw new O.a("You should not use an ephemeral key with Stripe.js.\n Please pass a publishable key instead.");case Dr:throw new O.a("You should not use a restricted key with Stripe.js.\n Please pass a publishable key instead.")}},Fr=["elements","createToken","createPaymentMethod"],Ur=["elements","createSource","createToken","createPaymentMethod"],Yr=function(){function e(t){var n=this;Object(o.a)(this,e),this._gets=[],this._didDetect=!1,this._onDetection=function(e){n._didDetect=!0,t(e)},window.Stripe&&window.Stripe.__cachedInstances&&this._onDetection("react-stripe-elements")}return Object(i.a)(e,[{key:"got",value:function(e){this._didDetect||("elements"===e?this._gets=["elements"]:this._gets.push(e),this._checkForWrapper())}},{key:"called",value:function(e){this._didDetect||(this._gets=this._gets.filter((function(t){return t!==e})))}},{key:"_checkForWrapper",value:function(){Object(we.b)(this._gets,Fr)?this._onDetection("react-stripe-js"):Object(we.b)(this._gets,Ur)&&this._onDetection("react-stripe-elements")}}]),e}(),Gr=function(e){if(!e||"object"!=typeof e)return null;var t=e.type;return{type:"string"==typeof t?t:null,data:Object(s.a)(e,["type"])}},Hr=function(e){switch(e.type){case"object":return{source:e.object};case"error":return{error:e.error};default:return Object(_t.a)(e)}},zr={source:Object(l.u)({id:Object(l.w)("src_"),client_secret:Object(l.w)("src_client_secret_")})},Wr=Object(l.u)(zr),Kr=function(e){switch(e.type){case"object":return{paymentMethod:e.object};case"error":return{error:e.error};default:return Object(_t.a)(e)}},Vr=n(29),Jr=function(e,t,n,r,a){if("string"==typeof n)return function(e,t,n,r,a){var o=Object(Vr.a)(r),i=Gr(o?a:r),c=i||{type:null,data:{}},s=c.type,l=c.data;if(s&&n!==s)return u.a.reject(new O.a("The type supplied in payment_method_data is not consistent."));if(o){var p=o._implementation._frame.id,d=o._componentName;return e.action.createPaymentMethodWithElement({frameId:p,elementName:d,type:n,paymentMethodData:l,mids:t}).then(Kr)}return i?e.action.createPaymentMethodWithData({elementName:null,type:n,paymentMethodData:l,mids:t}).then(Kr):u.a.reject(new O.a("Please provide either an Element or PaymentMethod creation parameters to createPaymentMethod."))}(e,t,n,r,a);try{var o=(f=n,Object(l.E)(Object(er.d)(null),f,"createPaymentMethod").value),i=o.element,c=o.type,s=o.data;if(i){var p=i._implementation._frame.id,d=i._componentName;return e.action.createPaymentMethodWithElement({frameId:p,elementName:d,type:c,paymentMethodData:s,mids:t}).then(Kr)}return e.action.createPaymentMethodWithData({elementName:null,type:c,paymentMethodData:s,mids:t}).then(Kr)}catch(e){return u.a.reject(e)}var f},$r=n(10),Zr=n(13),Xr=function(e,t){var n={skipFingerprint:!1,sandboxFingerprintFrame:!1,sandboxChallengeFrame:!1};return-1!==e.indexOf("Y")&&(t.report("3ds2.optimization.Y"),n.skipFingerprint=!0),-1!==e.indexOf("k")&&(t.report("3ds2.optimization.k"),n.sandboxFingerprintFrame=!0),-1!==e.indexOf("5")&&(t.report("3ds2.optimization.5"),n.sandboxChallengeFrame=!0),n},Qr=function(e){return e?{amount:e.amount,instrument:{cardBrand:e.instrument.card_brand,cardName:e.instrument.card_name,cardLast4:e.instrument.card_last4},merchant:{name:e.merchant.name,origin:e.merchant.origin},credentials:e.credentials,authenticationChallenge:e.authentication_challenge,configuration:e.configuration,layout:e.layout}:null},ea=function(e){return{american_express:"amex",visa:"visa",mastercard:"mastercard",discover:"discover",unionpay:"unionpay"}[e]||"unknown"},ta=function(e,t,n){if(!e)return null;if("use_stripe_sdk"===e.type){var r=e.use_stripe_sdk;switch(r.type){case"intent_cardimageverification_challenge":return{type:"cardimageverification-challenge",civId:r.stripe_js.card_image_verification_id,civClientSecret:r.stripe_js.card_image_verification_client_secret,previousScanFailed:r.stripe_js.previous_scan_failed};case"intent_confirmation_challenge":return{type:"captcha-challenge",site_key:r.stripe_js.site_key,verification_url:r.stripe_js.verification_url};case"stripe_3ds2_fingerprint":return{type:"3ds2-fingerprint",threeDS2Source:r.three_d_secure_2_source,merchant:r.merchant,cardBrand:ea(r.directory_server_name),transactionId:r.server_transaction_id,optimizations:Xr(r.three_ds_optimizations,n),methodUrl:r.three_ds_method_url,oneClickAuthn:Qr(r.one_click_authn)};case"stripe_3ds2_challenge":return{type:"3ds2-challenge",threeDS2Source:r.stripe_js.three_d_secure_2_source,cardBrand:ea(r.stripe_js.directory_server_name),transactionId:r.stripe_js.server_transaction_id,optimizations:Xr(r.stripe_js.three_ds_optimizations,n),acsTransactionId:r.stripe_js.acs_transaction_id,acsUrl:r.stripe_js.acs_url,oneClickAuthn:Qr(r.stripe_js.one_click_authn),creq:r.stripe_js.creq};case"three_d_secure_redirect":return{type:"3ds1-modal",url:r.stripe_js,source:r.source}}}if("redirect_to_url"===e.type)return{type:"redirect",redirectUrl:e.redirect_to_url.url};if("alipay_handle_redirect"===e.type)return{type:"redirect",redirectUrl:e.alipay_handle_redirect.url};if("blik_authorize"===e.type)return{type:"blik_authorize"};if("boleto_display_details"===e.type)return{type:"boleto-display",hostedVoucherUrl:e.boleto_display_details.hosted_voucher_url};if("display_oxxo_details"===e.type)return{type:"oxxo-display",hostedVoucherUrl:e.display_oxxo_details.hosted_voucher_url};if("konbini_display_details"===e.type)return{type:"konbini-display",hostedVoucherUrl:e.konbini_display_details.hosted_voucher_url};if("oxxo_display_details"===e.type)return{type:"oxxo-display",hostedVoucherUrl:e.oxxo_display_details.hosted_voucher_url};if("authorize_with_url"===e.type){n.report("unexpected_action_type",{action:"authorize_with_url"});var a=e.authorize_with_url.url;if(!t)return{type:"redirect",redirectUrl:a};switch(t){case pr.b.card:return{type:"3ds1-modal",url:a,source:null};case pr.b.ideal:return{type:"redirect",redirectUrl:a}}}return"upi_await_notification"===e.type?{type:"upi_await_notification"}:"verify_with_linked_account"===e.type?{type:"us_bank_account_link"}:"link_authenticate_account"===e.type?{type:"link_authenticate_account"}:"wechat_pay_display_qr_code"===e.type?{type:"wechat_pay_display_qr_code",qrCodeUrl:e.wechat_pay_display_qr_code.image_data_url}:"paynow_display_qr_code"===e.type?{type:"paynow_display_qr_code",qrCodeUrl:e.paynow_display_qr_code.image_data_url}:"pix_display_qr_code"===e.type?{type:"pix_display_qr_code",qrCodeUrl:e.pix_display_qr_code.image_data_url}:"promptpay_display_qr_code"===e.type?{type:"promptpay_display_qr_code",qrCodeUrl:e.promptpay_display_qr_code.image_url}:null},na=function(e){switch(e.type){case"error":return{error:e.error};case"object":switch(e.object.object){case"payment_intent":return{paymentIntent:e.object};case"setup_intent":return{setupIntent:e.object};default:return Object(_t.a)(e.object)}default:return Object(_t.a)(e)}},ra=function(e,t,n,r,a){return t===p.g.PAYMENT_INTENT?n.action.retrievePaymentIntent({hosted:false,intentSecret:e,locale:r,asErrorIfNotSucceeded:true,expandParam:a||[]}).then(na):n.action.retrieveSetupIntent({hosted:false,intentSecret:e,locale:r,asErrorIfNotSucceeded:true,expandParam:a||[]}).then(na)},aa=function(e,t,n,r,a){return t===p.g.PAYMENT_INTENT?n.action.cancelPaymentIntentSource({intentSecret:e,locale:a,sourceId:r}).then(na):n.action.cancelSetupIntentSource({intentSecret:e,locale:a,sourceId:r}).then(na)},oa=function(e){return(e.error?e.error.payment_intent||e.error.setup_intent:e.paymentIntent||e.setupIntent)||null},ia=function(e,t,n,a,o,i){var c=nt(),s=new Ke.a,l=function(e,t,n,a,o){return e.createLightboxFrame({type:p.c.AUTHORIZE_WITH_URL,options:Object(r.a)({url:t,locale:o,intentId:n},a?{source:a}:{})})}(a,e.url,t.id,e.source,o);return l.show(),a.report("authorize_with_url.loading",{viewport:c,intentId:t.id}),l._on("load",(function(){a.report("authorize_with_url.loaded",{loadDuration:s.getElapsedTime(),intentId:t.id}),l.fadeInBackdrop()})),l._on("challenge_complete",(function(){l.fadeOutBackdrop()})),new u.a((function(r,c){var p=e.source;p&&l._once("cancel",(function(){u.a.all([aa(t,n,a,p,o),l.destroy()]).then((function(e){var t=Object(zn.a)(e,1)[0];return r(t)}))})),l._once("authorize_with_url_done",(function(){var e=l.destroy();!function(e,t,n,r,a,o){var i,c=!0,s=3,u=0;(function l(){u+=1,ra(e,t,n,r,a).then((function(e){if(c){var t=oa(e);if(null!==t)switch(s=3,t.status){case"requires_action":case"requires_source_action":return void(i=setTimeout(l,5e3));case"processing":return void(i=setTimeout(l,1e3));default:o(e,u)}else if(s>0){var n=500*Math.pow(2,3-s);i=setTimeout(l,n),s-=1}else o(e,u)}}))})()}(t,n,a,o,i,(function(n,o){e.then((function(){a.report("authorize_with_url.done",{shownDuration:s.getElapsedTime(),success:!("error"in n),intentId:t.id,iterations:o}),r(n)}))}))}))}))},ca=n(14),sa=function(e,t){var n=t.intentSecret,r=t.controller,a=t.locale,o=t.hosted,i=r.createLightboxFrame({type:p.c.STRIPE_3DS2_CHALLENGE,options:{intentId:n.id,hosted:o,locale:a}});r.report("3ds2.challenge_frame.loading",{intentId:n.id,hosted:o}),i._on("challenge_complete",(function(){i.fadeOutBackdrop()}));var c=function(e){return new u.a((function(t){e._on("load",(function(){return t(e)}))}))}(i);return c.then((function(){return r.report("3ds2.challenge_frame.loaded",{intentId:n.id,hosted:o})})),o&&(i.show(),i.action.show3DS2Spinner({cardBrand:e.cardBrand})),c},ua=function(e,t,n){var a=n.oneClickAuthnDeviceSupport,o=n.challengeFrame,i=t.controller,c=t.intentSecret,l=t.intentType,p=t.locale;return new u.a((function(t){o.then((function(n){n._once("cancel",(function(){n.fadeOutBackdrop(),aa(c,l,i,e.threeDS2Source,p).then(t)})),n.isVisible||(n.show(),n.fadeInBackdrop());e.type;var o=e.optimizations,u=(e.oneClickAuthn,Object(s.a)(e,["type","optimizations","oneClickAuthn"]));n.action.perform3DS2Challenge(Object(r.a)(Object(r.a)({},u),{},{shouldSandbox:o.sandboxChallengeFrame,oneClickAuthnDeviceSupport:a,oneClickWebauthnEnrollmentAppUrl:Object(ca.a)("one-click-webauthn-enrollment-21208fc1f8af2538c8fb99337c3d3a74.html")})).then((function(){return t()}))}))}))},la=function(e){if(!e||"object"!=typeof e||!e.type&&!e.code)return e;var t=function(t){return e[t]&&"string"==typeof e[t]?Object(c.a)({},"".concat(t,"_id"),e[t]):e[t]&&"object"==typeof e[t]&&"string"==typeof e[t].id?Object(c.a)({},"".concat(t,"_id"),e[t].id):null};return Object(r.a)(Object(r.a)(Object(r.a)(Object(r.a)({type:e.type,code:e.code,param:e.param},t("payment_intent")),t("setup_intent")),t("payment_method")),t("source"))},pa=function(e,t,n){var a=t.existingPayload,o=t.challengeFrame,i=t.startTimestamp,c=e.intentSecret,s=e.intentType,l=e.controller,p=e.locale,d=e.hosted,f=a?u.a.resolve(a):ra(c,s,l,p,n);return u.a.all([f,o.then((function(e){return e.destroy()}))]).then((function(e){var t=Object(zn.a)(e,1)[0];return l.report("3ds2.done",Object(r.a)({intentId:c.id,hosted:d,totalDuration:i.getElapsedTime()},t.error?{error:la(t.error),success:!1}:{success:!0})),t}))},da=function(e){var t=e.intentSecret,n=e.controller,r=e.hosted,a=e.locale,o=n.createHiddenFrame(p.c.STRIPE_3DS2_FINGERPRINT,{intentId:t.id,locale:a,hosted:r});n.report("3ds2.fingerprint_frame.loading",{hosted:r,intentId:t.id});var i=function(e){return new u.a((function(t){e._on("load",(function(){return t(e)}))}))}(o);return i.then((function(){n.report("3ds2.fingerprint_frame.loaded",{hosted:r,intentId:t.id})})),i},fa=function(e,t){var n=t.intentSecret,r=t.controller,a=t.hosted;return e.optimizations.skipFingerprint?u.a.resolve({fingerprintAttempted:!1,fingerprintData:null}):""===e.methodUrl?(r.report("3ds2.fingerprint.no_method_url",{hosted:a,intentId:n.id}),u.a.resolve({fingerprintAttempted:!1,fingerprintData:null})):da(t).then((function(t){return t.action.perform3DS2Fingerprint({threeDS2Source:e.threeDS2Source,merchant:e.merchant,transactionId:e.transactionId,methodUrl:e.methodUrl,shouldSandbox:e.optimizations.sandboxFingerprintFrame}).then((function(e){return t.destroy(),e}))}))},ma=function(){return void 0===window.PublicKeyCredential||function(){if(!/CrOS/i.test(window.navigator.userAgent))return!1;var e=window.navigator.userAgent.match(/Chrome\/\d+\.\d+\.(\d+)\.(\d+)/)||[],t=Number(e[1]),n=Number(e[2]);return!(4389===t&&n>=82||4430===t&&n>=11||t>=4431)}()?u.a.resolve(!1):window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable().catch((function(){return!1}))},_a=n(58),ha=n.n(_a),ba=n(59),ya=n.n(ba),va=n(60),ga=n.n(va),Oa=n(61),ja=n.n(Oa),Ea=n(62),wa=n.n(Ea),ka=n(63),Pa=n.n(ka),Sa=n(64),Aa=n.n(Sa),Ta=function(e,t){switch(e){case"visa":return{logo:ha.a,icon:wa.a}[t];case"amex":return{logo:ya.a,icon:Pa.a}[t];case"mastercard":return{logo:ga.a,icon:Aa.a}[t];case"unionpay":return{logo:ja.a,icon:null}[t];case"discover":case"jcb":case"diners":case"unknown":case"elo":return null;default:return Object(_t.a)(e)}},Ia=function(){if(void 0===window.PaymentRequest)return u.a.resolve(!1);if(!/Chrome\/(9[5-9]|[1-9]\d\d)/.test(window.navigator.userAgent))return u.a.resolve(!1);try{var e=[{supportedMethods:"secure-payment-confirmation",data:{action:"authenticate",credentialIds:[new Uint8Array(1)],challenge:new Uint8Array(1),fallbackUrl:window.location,payeeOrigin:"https://stripe.com",instrument:{displayName:"Mock ····1234",icon:Ta("visa","icon")}}}];return new window.PaymentRequest(e,{total:{label:"Total",amount:{currency:"USD",value:"0"}}}).canMakePayment().catch((function(){return!1}))}catch(e){return u.a.resolve(!1)}},Ca="stripe-js-one-click-authn",Na=function(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},Ra=function(e){return atob(e.replace(/-/g,"+").replace(/_/g,"/"))},xa=function(e){var t=Ra(e);return Uint8Array.from(t,(function(e){return e.charCodeAt(0)}))},Ma=function(e,t,n){var a=e.threeDS2Source,o=e.oneClickAuthn,i=t.controller,c=n.startTimestamp;if(!o)return u.a.resolve(null);var s=o.credentials.filter((function(e){return"spc"===e.type}));if(0===s.length)return i.report("one_click_authn.request_spc_authn.empty_credentials_list",{client_id:Ca,source:a}),u.a.resolve(null);try{var l=o.merchant.origin;return l?new window.PaymentRequest(function(e,t,n){var r=n.authenticationChallenge,a=n.instrument,o=a.cardBrand,i=a.cardName,c=a.cardLast4;return n.merchant,[{supportedMethods:"secure-payment-confirmation",data:{action:"authenticate",credentialIds:e.map((function(e){return xa(e.id)})),challenge:xa(r),timeout:6e4,fallbackUrl:window.location.toString(),instrument:{displayName:"".concat(i," ····").concat(c),icon:Ta(o,"icon")},payeeOrigin:t}}]}(s,l,o),{total:{label:"Total",amount:o.amount}}).show().then((function(e){var t;return e.complete("success"),i.report("one_click_authn.request_spc_authn.completed",{client_id:Ca,source:a,timeToComplete:c.getElapsedTime()}),{type:"spc",assertion:(t=e.details,{type:"public-key",id:t.id,raw_id:t.id,response:{authenticator_data:Na(t.response.authenticatorData),client_data_json:Na(t.response.clientDataJSON),signature:Na(t.response.signature)}}),payment_data:{merchant_data:{merchant_origin:l,total:o.amount},network_data:o.authenticationChallenge}}})).catch((function(e){var t={AbortError:"request_aborted",InvalidStateError:"payment_already_shown",NotSupportedError:"payment_method_not_supported",SecurityError:"security_error"}[e.name]||"unexpected_error";return i.report("one_click_authn.request_spc_authn.error",{reason:t,client_id:Ca,source:a,timeToError:c.getElapsedTime(),error:Object(r.a)({name:e.name,message:e.message},e)}),null})):(i.report("one_click_authn.request_spc_authn.empty_merchant_origin",{client_id:Ca,source:a}),u.a.resolve(null))}catch(e){i.report("one_click_authn.request_spc_authn.error",{client_id:Ca,reason:"unexpected_error",source:a,timeToError:c.getElapsedTime(),error:Object(r.a)({name:e.name,message:e.message},e)})}return u.a.resolve(null)},La=function(e,t){var n=e.threeDS2Source,a=e.oneClickAuthn,o=t.controller,i={spc:!1,webauthn:!1};if(a){try{var c=$?"safari":Z?"firefox":Q?J?"chrome_android":"chrome":z||W?"edge":null;if(c){var s=new URLSearchParams(Ra(a.configuration)).get(c)||"";i.spc=-1!==s.indexOf("S"),i.webauthn=-1!==s.indexOf("W")}else o.report("one_click_authn.configuration.error",{client_id:Ca,reason:"browser_not_found",source:n})}catch(e){o.report("one_click_authn.configuration.error",{client_id:Ca,reason:"unexpected_error",source:n,error:Object(r.a)({name:e.name,message:e.message},e)})}}return i},Da=function(){var e=document.featurePolicy;if(!e)return!1;try{return-1!==e.allowedFeatures().indexOf("publickey-credentials-get")}catch(e){return!1}},qa=function(e,t){var n=La(e,t);return u.a.all([Ia(),ma()]).then((function(e){var t=Object(zn.a)(e,2),r=t[0],a=t[1];return{spcEligible:r,webauthnEligible:a,publickeyCredentialsGetAllowed:Da(),spcTypeEnabled:n.spc&&r,webauthnTypeEnabled:n.webauthn&&a}}))},Ba=function(e,t,n){var r=n.challengeFrame,a=n.startTimestamp;return qa(e,t).then((function(n){return n.spcTypeEnabled?Ma(e,t,{startTimestamp:a}).then((function(e){return{deviceSupport:n,authenticationAPIParam:e}})):n.webauthnTypeEnabled?function(e,t,n){var r=t.controller,a=n.deviceSupport,o=n.challengeFrame,i=n.startTimestamp,c=e.oneClickAuthn;return c?c.credentials.some((function(e){return"webauthn"===e.type}))?o.then((function(t){return t.isVisible||(t.show(),t.fadeInBackdrop()),t.action.performOneClickWebauthnAuthentication({threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,appUrl:Object(ca.a)("one-click-webauthn-authentication-77f557fe34cc31fc39fa3cf7adc99455.html"),deviceSupport:a,requestData:c,startPosixTime:i.getAsPosixTime()})})):(r.report("one_click_authn.request_webauthn_authn.empty_credentials_list",{client_id:Ca,source:e.threeDS2Source}),u.a.resolve(null)):u.a.resolve(null)}(e,t,{deviceSupport:n,challengeFrame:r,startTimestamp:a}).then((function(e){return{deviceSupport:n,authenticationAPIParam:e}})):{deviceSupport:n,authenticationAPIParam:null}}))},Fa=function(e,t,n){var r=new Ke.a,a=sa(e,t);switch(e.type){case"3ds2-challenge":return qa(e,t).then((function(o){return ua(e,t,{oneClickAuthnDeviceSupport:o,challengeFrame:a}).then((function(e){return pa(t,{existingPayload:e,challengeFrame:a,startTimestamp:r},n)}))}));case"3ds2-fingerprint":return u.a.all([fa(e,t),Ba(e,t,{challengeFrame:a,startTimestamp:r})]).then((function(n){var r=Object(zn.a)(n,2),o=r[0],i=r[1];return function(e,t,n){var r=n.fingerprintResult,a=n.oneClickAuthn,o=t.controller,i=t.hosted,c=t.intentSecret;return o.report("3ds2.authenticate",{hosted:i,intentId:c.id}),o.action.authenticate3DS2({threeDS2Source:e.threeDS2Source,outerWindowWidth:window.innerWidth,hosted:i,fingerprintResult:r,oneClickAuthnDeviceSupportAPIParam:{spc_eligible:a.deviceSupport.spcEligible,webauthn_eligible:a.deviceSupport.webauthnEligible},oneClickAuthnAuthenticationAPIParam:a.authenticationAPIParam}).then((function(e){return"error"===e.type?o.report("3ds2.authenticate.error",{error:e.error,hosted:i,intentId:c.id}):o.report("3ds2.authenticate.success",{hosted:i,intentId:c.id}),e}))}(e,t,{fingerprintResult:o,oneClickAuthn:i}).then((function(n){return function(e,t,n){var r=n.authenticateResponse,a=n.oneClickAuthnDeviceSupport,o=n.challengeFrame,i=t.controller,c=t.hosted,s=t.intentSecret;if("error"===r.type)return u.a.resolve();var l=r.object,p=l.state,d=l.ares,f=l.creq;return"delegated"===p||null===d?u.a.resolve():"C"!==d.transStatus||null==f?(i.report("3ds2.frictionless",{hosted:c,intentId:s.id}),u.a.resolve()):ua({type:"3ds2-challenge",threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,transactionId:e.transactionId,acsUrl:d.acsURL,acsTransactionId:d.acsTransID,optimizations:e.optimizations,oneClickAuthn:e.oneClickAuthn,creq:f},t,{oneClickAuthnDeviceSupport:a,challengeFrame:o})}(e,t,{authenticateResponse:n,oneClickAuthnDeviceSupport:i.deviceSupport,challengeFrame:a})}))})).then((function(e){return pa(t,{existingPayload:e,challengeFrame:a,startTimestamp:r},n)}));default:return Object(_t.a)(e)}},Ua=function(e,t){var n=e.createLightboxFrame({type:p.c.LIGHTBOX_APP,options:t});return n.show(),n._on("nested-frame-loaded",(function(){n.fadeInBackdrop(),setTimeout((function(){n.action.openLightboxFrame()}),200)})),n},Ya=function(e){return e.action.closeLightboxFrame(),e.destroy()};var Ga=function(e){return e?"payment_intent"===e.object?e.last_payment_error:e.last_setup_error:null},Ha=function(e,t,n,r){return new u.a((function(a,o){var i=new Ke.a,c=n.createLightboxFrame({type:p.c.HCAPTCHA_APP,options:{intentId:t.id,clientSecret:t.client_secret,locale:r,sitekey:e.site_key,verifyUrl:e.verification_url,startTime:i.getAsPosixTime()}}),s=function(e){var t=Zr.c;return null!=e&&(t=e),n.action.localizeError(t).then((function(e){return{error:e}}))};n.report("intent_confirmation_challenge.start"),c._on("load",(function(){n.report("intent_confirmation_challenge.stripe_js_frame_loaded",{duration_since_start_ms:i.getElapsedTime()}),c.fadeInBackdrop()})),c.show(),c._on("request-cancel",(function(e){c.fadeOutBackdrop(),c.destroy(!0),n.report("intent_confirmation_challenge.cancel"),a(s(Ga(null==e?void 0:e.intent)))})),c._on("request-close",(function(e){c.fadeOutBackdrop(),c.destroy(!0);var t=null==e?void 0:e.intent;if(t){var r=Ga(t);r?/Captcha/.test(r.message||"")?(n.report("intent_confirmation_challenge.verification_failed"),a(s(r))):(n.report("intent_confirmation_challenge.success"),a(s(r))):(n.report("intent_confirmation_challenge.success"),function(e,t){"payment_intent"===t.object?e({paymentIntent:t}):e({setupIntent:t})}(a,t))}else n.report("intent_confirmation_challenge.verification_error"),a(s(Zr.c))}))}))},za=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:250;return new u.a((function(a,o){t().then(a).catch((function(i){1===n?o(i):setTimeout((function(){e(t,n-1,r).then(a,o)}),r)}))}))},Wa=function(e){var t=e.controller,n=e.intentSecret,r=e.intentType,a=(e.locale,function(e){return t.action.localizeError(e).then((function(e){return u.a.resolve({error:e})}))}),o=function(e,t){switch(t){case"requires_action":return e;case"requires_payment_method":return a(Zr.a);default:return e}};return"PAYMENT_INTENT"===r?function(e,t,n){return br({linkAccountSessionCreatorClientSecret:e,linkAccountSessionCreatorType:"payment_intent",linkAccountSessionCreatorId:t,controller:n})}(n.clientSecret,n.id,t).then((function(e){return e.error?a(Zr.b):za((function(){return t.action.refreshPaymentIntent({intentSecret:n}).then((function(e){if("error"===e.type&&429===e.error.status)return u.a.reject(new Error(e.error.message));var t=Object($r.e)(e);return t.paymentIntent?o(t,t.paymentIntent.status):t}))}),5,500)})):function(e,t,n){return br({linkAccountSessionCreatorClientSecret:e,linkAccountSessionCreatorType:"setup_intent",linkAccountSessionCreatorId:t,controller:n})}(n.clientSecret,n.id,t).then((function(e){return e.error?a(Zr.b):za((function(){return t.action.refreshSetupIntent({intentSecret:n}).then((function(e){if("error"===e.type&&429===e.error.status)return u.a.reject(new Error(e.error.message));var t=Object($r.f)(e);return t.setupIntent?o(t,t.setupIntent.status):t}))}),5,500)}))},Ka=function(e){var t=e.controller,n=e.intentSecret,r=e.intentType,a=e.locale;return new u.a((function(e,o){setTimeout((function o(){ra(n,r,t,a).then((function(n){var r,a=oa(n);null!==a?"requires_action"!==a.status||"blik_authorize"!==a.next_action.type?e(n):setTimeout(o,5e3):e((r=Zr.c,t.action.localizeError(r).then((function(e){return{error:e}}))))}))}),8e3)}))},Va=function(e){switch(e.type){case"error":var t=e.error;if("payment_intent_unexpected_state"===t.code&&"object"==typeof t.payment_intent&&null!=t.payment_intent&&"string"==typeof t.payment_intent.status&&Object($r.d)(t.payment_intent.status)){var n=t.payment_intent;return{type:"object",locale:e.locale,object:n}}return e;case"object":return e;default:return Object(_t.a)(e)}},Ja=function(e,t,r,a,o,i){var c=ta(Object($r.a)(t),r,e),s=Object($r.c)(t);if(!c)return u.a.resolve({paymentIntent:t});switch(c.type){case"cardimageverification-challenge":return n.e(5).then(n.bind(null,80)).then((function(n){return(0,n.performCardImageVerification)(c,t,e,a)}));case"captcha-challenge":return Ha(c,t,e,a);case"3ds1-modal":return ia(c,s,p.g.PAYMENT_INTENT,e,a,i);case"3ds2-fingerprint":case"3ds2-challenge":return Fa(c,{intentSecret:s,intentType:p.g.PAYMENT_INTENT,controller:e,locale:a,hosted:o},i);case"redirect":return function(e,t,n){return Object(dr.a)(t).then((function(t){return Object(dr.b)(n,"next_action redirect",t),Object($r.e)(t,e)}))}(t,c.redirectUrl,e);case"blik_authorize":return Ka({controller:e,intentSecret:s,intentType:p.g.PAYMENT_INTENT,locale:a});case"boleto-display":if(void 0===c.hostedVoucherUrl)throw new O.a("Expect `next_action.boleto_display_details.hosted_voucher_url` of `PaymentIntent` to be not undefined. Please refer to \n\nhttps://stripe.com/docs/api/payment_intents/object#payment_intent_object-next_action-boleto_display_details-hosted_voucher_url");return function(e){var t=e.controller,n=e.url,r=e.intent,a=e.locale,o=Ua(t,{url:n,size:"600x700",locale:a,frameTitle:"boleto.voucher_frame_title",useLightboxHostedCloseButton:!1});return new u.a((function(e){o._on("request-close",(function(){Ya(o).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:a,url:c.hostedVoucherUrl,intent:t});case"konbini-display":if(void 0===c.hostedVoucherUrl)throw new O.a("Expected option `handleActions` to be `false`. The Konbini pilot does not handle the next actions for you automatically yet (e.g. displaying Konbini payment details). Please refer to the Stripe Konbini integration guide for more info: \n\nhttps://stripe.com/docs/payments/konbini");return function(e){var t=e.controller,n=e.url,r=e.intent,a=e.locale,o=Ua(t,{url:n,size:"600x900",locale:a,frameTitle:"konbini.voucher_frame_title",useLightboxHostedCloseButton:!1});return new u.a((function(e){o._on("request-close",(function(){Ya(o).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:a,url:c.hostedVoucherUrl,intent:t});case"oxxo-display":if(void 0===c.hostedVoucherUrl)throw new O.a("To handle the next actions automatically, set the API version to oxxo_beta=v2. Please refer to the Stripe OXXO integration guide for more info: \n\nhttps://stripe.com/docs/payments/oxxo");return function(e){var t=e.controller,n=e.url,r=e.intent,a=e.locale,o=Ua(t,{url:n,size:"600x700",locale:a,frameTitle:"oxxo.voucher_frame_title",useLightboxHostedCloseButton:!1});return new u.a((function(e){o._on("request-close",(function(){Ya(o).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:a,url:c.hostedVoucherUrl,intent:t});case"upi_await_notification":return function(e){var t=e.controller,n=e.intentSecret,r=e.intentType,a=e.locale;return new u.a((function(e){setTimeout((function o(){ra(n,r,t,a).then((function(t){var n=oa(t);if(null!==n)switch(n.status){case"requires_action":return void setTimeout(o,1e4);default:e(t)}}))}),5e3)}))}({controller:e,intentSecret:s,intentType:p.g.PAYMENT_INTENT,locale:a});case"us_bank_account_link":return Wa({controller:e,intentSecret:s,intentType:p.g.PAYMENT_INTENT,locale:a});case"link_authenticate_account":return e.action.completeLinkPayment({intentSecret:t.client_secret,intentId:t.id,expandParam:i}).then((function(e){return e?u.a.resolve(Object($r.e)(e)):u.a.resolve({paymentIntent:t})}));case"wechat_pay_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.intentType,a=e.intentSecret,o=e.locale,i=Object($r.a)(n);if(!i||"wechat_pay_display_qr_code"!==i.type)throw new Error("Expected next_action.wechat_pay_display_qr_code");var c=t.createLightboxFrame({type:p.c.WECHAT_PAY_INNER,options:{qrCodeImageDataUrl:i.wechat_pay_display_qr_code.image_data_url,qrCodeUrl:i.wechat_pay_display_qr_code.data,locale:o}}),s=null;return new u.a((function(e,i){c._on("load",(function(){c.show(),c.fadeInBackdrop()})),c._once("request-close",(function(){Ya(c).then((function(){s&&clearTimeout(s),e({paymentIntent:n})}))})),c._on("complete",(function(t){Ya(c).then((function(){s&&clearTimeout(s),e(t)}))})),s=setTimeout((function n(){ra(a,r,t,o).then((function(t){var r=oa(t);if(null!==r)switch(r.status){case"requires_action":return void(s=setTimeout(n,2e3));default:c.destroy(!0).then((function(){"payment_intent"===r.object?e({paymentIntent:r}):e({setupIntent:r})}))}}))}),5e3)}))}({controller:e,locale:a,intent:t,intentSecret:s,intentType:p.g.PAYMENT_INTENT});case"paynow_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.intentType,a=e.intentSecret,o=e.locale,i=Object($r.a)(n);if(!i||"paynow_display_qr_code"!==i.type)throw new Error("Expected next_action.paynow_display_qr_code");var c=t.createLightboxFrame({type:p.c.PAYNOW_INNER,options:{qrCodeImageDataUrl:i.paynow_display_qr_code.image_data_url,qrCodeUrl:i.paynow_display_qr_code.data,locale:o}}),s=null;return new u.a((function(e,i){c._on("load",(function(){c.show(),c.fadeInBackdrop()})),c._once("request-close",(function(){Ya(c).then((function(){s&&clearTimeout(s),e({paymentIntent:n})}))})),c._on("complete",(function(t){Ya(c).then((function(){s&&clearTimeout(s),e(t)}))})),s=setTimeout((function n(){ra(a,r,t,o).then((function(t){var r=oa(t);if(null!==r)switch(r.status){case"requires_action":return void(s=setTimeout(n,2e3));default:c.destroy(!0).then((function(){"payment_intent"===r.object?e({paymentIntent:r}):e({setupIntent:r})}))}}))}),5e3)}))}({controller:e,locale:a,intent:t,intentSecret:s,intentType:p.g.PAYMENT_INTENT});case"pix_display_qr_code":throw new O.a("Expected option `handleActions` to be `false`. The Pix pilot does not handle the next action for you automatically yet (e.g. displaying Pix QR Code). Please refer to the Stripe Pix integration guide for more info: \n\nhttps://stripe.com/docs/payments/pix");case"promptpay_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.intentType,a=e.intentSecret,o=e.locale,i=Object($r.a)(n);if(!i||"promptpay_display_qr_code"!==i.type)throw new Error("Expected next_action.promptpay_display_qr_code");var c=t.createLightboxFrame({type:p.c.PROMPTPAY_INNER,options:{qrCodeImageDataUrl:i.promptpay_display_qr_code.image_url,qrCodeUrl:i.promptpay_display_qr_code.data,locale:o}}),s=null;return new u.a((function(e,i){c._on("load",(function(){c.show(),c.fadeInBackdrop()})),c._once("request-close",(function(){Ya(c).then((function(){s&&clearTimeout(s),e({paymentIntent:n})}))})),c._on("complete",(function(t){Ya(c).then((function(){s&&clearTimeout(s),e(t)}))})),s=setTimeout((function n(){ra(a,r,t,o).then((function(t){var r=oa(t);if(null!==r)switch(r.status){case"requires_action":return void(s=setTimeout(n,2e3));default:c.destroy(!0).then((function(){"payment_intent"===r.object?e({paymentIntent:r}):e({setupIntent:r})}))}}))}),5e3)}))}({controller:e,locale:a,intent:t,intentSecret:s,intentType:p.g.PAYMENT_INTENT});default:return u.a.resolve({paymentIntent:t})}},$a=function e(t,n,r,a,o,i){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;if(p.i6&&void 0!==arguments[6]?arguments[6]:0;if(p.i-1?t.push(ot.a[e]):n.push(e)})),n.length>0){var r="The following betas are unrecognized for Stripe() parameter:\n\n- ".concat(n.join("\n- "),"\n\n They are either invalid or expired betas, please remove these beta flags to prevent future integration issues.");return{validBetas:t,betaWarning:r}}return{validBetas:t}}(s.betas||null),E=j.validBetas,A=j.betaWarning;A&&p.push(A),Br(f),(null==y?void 0:y.mids)&&(e._ec=He({checkoutIds:y.mids})),this._apiKey=f.trim(),this._keyMode=Object(d.c)(this._apiKey),this._betas=E,this._locale=dt(h,this._betas)||null,this._stripeAccount=m||null,this._isCheckout=!!y,this._attachControllerGetter(_,b,m,i),p.forEach((function(e){return a._controller.warn(e)})),Je(),this._ensureHTTPS(),this._ensureStripeHosted(n),this._attachPaymentIntentMethods(this._betas,!!v),this._attachLegacyPaymentIntentMethods(this._betas),this._attachCheckoutMethods(this._betas),this._attachPrivateMethodsForCheckout(this._isCheckout),this._attachPrivateMethodsForConsumer(xe),this._attachCreateRadarSession(g||!1),this._attachGetters(),this._attachIssuingCardMethods(this._betas),this._attachIdentityMethods(this._betas),this._attachLinkedAccounts(this._betas),this._attachAppInfo()}return Object(i.a)(e,[{key:"_attachCreateRadarSession",value:function(e){var t,n,r,a=this;e&&(this.createRadarSession=(t=function(){return a._midsPromise().then((function(e){return t=a._controller,n=e,t.action.createRadarSession({mids:n}).then(zi);var t,n}))},function(){var e=this;try{return t.call(this).catch((function(t){return E(t,n||e&&e._controller,!0,r)}))}catch(e){return E(e,n||this&&this._controller,!1,r)}}))}},{key:"_attachPaymentIntentMethods",value:function(e,t){var n,r,a,o=this,i=function(){return o._mids()};this.createPaymentMethod=(n=function(){for(var e=arguments.length,t=new Array(e),n=0;n