@paynext/sdk 0.0.126 → 0.0.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,11 +1,11 @@
1
- (function(ne,re){typeof exports=="object"&&typeof module!="undefined"?re(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],re):(ne=typeof globalThis!="undefined"?globalThis:ne||self,re(ne["PayNext SDK"]={},ne.React))})(this,function(ne,re){"use strict";var Ul=Object.defineProperty,Bl=Object.defineProperties;var zl=Object.getOwnPropertyDescriptors;var Mt=Object.getOwnPropertySymbols;var Ki=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable;var Rn=(ne,re,se)=>re in ne?Ul(ne,re,{enumerable:!0,configurable:!0,writable:!0,value:se}):ne[re]=se,U=(ne,re)=>{for(var se in re||(re={}))Ki.call(re,se)&&Rn(ne,se,re[se]);if(Mt)for(var se of Mt(re))Yi.call(re,se)&&Rn(ne,se,re[se]);return ne},J=(ne,re)=>Bl(ne,zl(re));var Ae=(ne,re)=>{var se={};for(var ve in ne)Ki.call(ne,ve)&&re.indexOf(ve)<0&&(se[ve]=ne[ve]);if(ne!=null&&Mt)for(var ve of Mt(ne))re.indexOf(ve)<0&&Yi.call(ne,ve)&&(se[ve]=ne[ve]);return se};var A=(ne,re,se)=>Rn(ne,typeof re!="symbol"?re+"":re,se);var K=(ne,re,se)=>new Promise((ve,_t)=>{var W=Te=>{try{Re(se.next(Te))}catch(ke){_t(ke)}},Je=Te=>{try{Re(se.throw(Te))}catch(ke){_t(ke)}},Re=Te=>Te.done?ve(Te.value):Promise.resolve(Te.value).then(W,Je);Re((se=se.apply(ne,re)).next())});var se=document.createElement("style");se.textContent=`._spinner_1lif3_1{height:100%;width:100%}@keyframes _spin_1lif3_1{to{transform:rotate(360deg)}}._spinner_1lif3_1{animation:_spin_1lif3_1 1s linear infinite;fill:#9ca3af;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}._spinner_1lif3_1:is(._dark_1lif3_1 *){fill:#d1d5db;--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}._spinnerContainer_1lif3_5{height:40px;width:40px}._success_1lif3_9{position:absolute;top:50%;left:50%;height:3.5rem;width:3.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));fill:#0d776e;z-index:3}._successContainer_1lif3_14{position:relative;display:grid;height:5rem;width:5rem;flex:none;place-items:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(232 250 240 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14:is(._dark_1lif3_1 *){--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14{z-index:0;animation:_containerPulse_1lif3_1 3s ease-in-out infinite}._successContainer_1lif3_14:before,._successContainer_1lif3_14:after{content:"";position:absolute;inset:0;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14:is(._dark_1lif3_1 *):before,._successContainer_1lif3_14:is(._dark_1lif3_1 *):after{--tw-bg-opacity: 1;background-color:rgb(167 233 193 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14:before,._successContainer_1lif3_14:after{animation:_ripplePulse_1lif3_1 3s cubic-bezier(.4,0,.6,1) infinite;opacity:0;z-index:1}._successContainer_1lif3_14:after{animation-delay:.5s}@keyframes _containerPulse_1lif3_1{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}@keyframes _ripplePulse_1lif3_1{0%{transform:scale(1);opacity:0}10%{transform:scale(1);opacity:.7}to{transform:scale(1.3);opacity:0}}._container_1lif3_57{width:30px;height:20px;display:flex;margin:0 1px;align-items:center;justify-content:center}._card_1lif3_66{width:28px;height:19px;display:flex;margin:0 1px;align-items:center;justify-content:center}._warning_1lif3_75{width:16px;height:16px;display:flex;align-items:center;justify-content:center}._svg_1lif3_83{width:100%;height:100%}._srOnly_1lif3_88{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}._backButton_1lif3_92{width:30px;height:30px;display:flex;margin:0 1px;align-items:center;justify-content:center;background-color:#f4f4f5;border-radius:8px}._loader_nwq3e_1{position:absolute;height:100%;top:0;left:0;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);z-index:1000;display:flex;width:100%;align-items:center;justify-content:center;border-radius:10px}._checkout_15zm1_1{padding:0 4px;overflow:hidden;z-index:0;position:relative;height:auto;min-height:60px;width:100%;max-width:640px}._hidden_15zm1_8{display:none!important}._formInitial_15zm1_12{opacity:0;transform:translateY(100px)}._cardForm_15zm1_17{opacity:1}._btnsInitial_15zm1_21{opacity:0;transform:translateY(-100px)}._buttons_qc8am_1{display:flex;flex-direction:column;gap:8px;opacity:1}._hidden_qc8am_8{display:none!important}._skeleton_qc8am_12{overflow:hidden;width:100%;height:40px;border-radius:12px;background:linear-gradient(90deg,#f0f0f0,#e0e0e0 20%,#f0f0f0 40% 100%);background-size:200% 100%;animation:_shimmer_qc8am_1 2s infinite}@keyframes _shimmer_qc8am_1{0%{background-position:-200% 0}to{background-position:200% 0}}._applePay_1wlwu_1{display:flex;flex-direction:column;gap:8px}@media (hover: hover){._applePay_1wlwu_1:hover{filter:contrast(.575) brightness(1.2)}}._hidden_1wlwu_13{display:none!important}._googlePay_17y0j_1{position:relative;display:flex;overflow:hidden;height:40px;border-radius:12px}._googlePay_17y0j_1 iframe{position:absolute;top:-1px;left:-1px;width:calc(100% + 2px)!important;height:calc(100% + 2px)!important;border:none;display:block}._hidden_17y0j_19{display:none!important}._paypal_iyh6g_1{display:flex;flex-direction:column;gap:8px}._hidden_iyh6g_7{display:none}._button_1trim_1{transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(13 118 110 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:1.5rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_1trim_1{transition-property:none}}._button_1trim_1 span{margin-left:.25rem}@media (hover: hover){._button_1trim_1:hover{opacity:.7}}._container_10ziz_2{display:flex;flex-direction:column;gap:.5rem}._venmo_10ziz_8{display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:12px;height:40px;background-color:#0088f7;width:100%;color:#fff;font-size:16px;text-align:center;cursor:pointer;transition:background-color .3s ease;svg{height:40%}@media (hover: hover){&:hover{background-color:#5683c1}}}._hidden_10ziz_35{display:none}._button_125my_1{cursor:pointer}._button_1d7ly_1{margin-top:8px;transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(13 118 110 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_1d7ly_1{transition-property:none}}._button_1d7ly_1 span{margin-left:.25rem}._disabled_1d7ly_18{opacity:.7}@media (hover: hover){._button_1d7ly_1:hover{opacity:.7}}._hidden_1d7ly_28{display:none!important}._spinner_1d7ly_32{width:24px;height:24px}._cardForm_1uc4x_1{position:relative;display:grid;min-height:250px;gap:.75rem;padding-top:0;opacity:1}._hidden_1uc4x_6{display:none!important}._topOffset_1uc4x_10{margin-top:.5rem}._wrapper_1xw0g_1{position:relative}._inputContainer_1xw0g_5{background-color:transparent;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;padding-left:.75rem;padding-right:.75rem}._inputContainer_1xw0g_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xw0g_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xw0g_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_1xw0g_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_1xw0g_12{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._inputContainer_1xw0g_5:focus-within:not(._disabled_1xw0g_23){box-shadow:0 0 0 1px #0d766eb3,0 1px 1px #00000012,0 0 0 4px #0d766e4d}._input_1xw0g_5{display:block;width:100%;height:100%;border:none;font-size:1rem;font-weight:400;outline:none;background-color:transparent;color:#1a1a1ae6}._endContent_1xw0g_39{display:flex}._errorInput_1xw0g_18{box-shadow:0 0 0 1px #dc2727,0 2px 4px #00000012,0 1px 1.5px #0000000d}._error_1xw0g_18{margin-top:4px;margin-bottom:0;padding-left:4px;font-size:12px;font-weight:400;color:#ef4444}._label_1xw0g_56{margin-bottom:3px;display:flex;justify-content:space-between;padding-left:1px;padding-right:2px;font-size:12px;font-weight:500;color:#1a1a1ab2}._labelError_1xw0g_67{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_1xw0g_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_1xw0g_75{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_1xw0g_82{display:none!important}._wrapper_41zd2_1{position:relative}._inputContainer_41zd2_5{background-color:transparent;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;padding-left:.75rem;padding-right:.75rem}._inputContainer_41zd2_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_41zd2_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_41zd2_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_41zd2_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_41zd2_12{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._inputContainer_41zd2_5:focus-within:not(._disabled_41zd2_23){box-shadow:0 0 0 1px #0d766eb3,0 1px 1px #00000012,0 0 0 4px #0d766e4d}._input_41zd2_5{display:block;width:100%;height:100%;border:none;font-size:1rem;font-weight:400;outline:none;background-color:transparent;color:#1a1a1ae6}._endContent_41zd2_39{display:flex}._errorInput_41zd2_18{box-shadow:0 0 0 1px #dc2727,0 2px 4px #00000012,0 1px 1.5px #0000000d}._error_41zd2_18{margin-top:4px;margin-bottom:0;padding-left:4px;font-size:12px;font-weight:400;color:#ef4444}._label_41zd2_56{margin-bottom:3px;display:flex;justify-content:space-between;padding-left:1px;padding-right:2px;font-size:12px;font-weight:500;color:#1a1a1ab2}._labelError_41zd2_67{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_41zd2_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_41zd2_75{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_41zd2_82{display:none!important}._securityContent_41zd2_86{display:grid;grid-column-gap:6px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,auto))}._container_79xkl_1{display:flex;min-height:292px;width:100%;flex-direction:column;align-items:center;justify-content:center}._title_79xkl_5{margin-top:.5rem;font-weight:300}._container_g3abj_1{border-radius:12px;margin-top:.5rem;display:flex;width:100%;flex-grow:1;flex-direction:row;align-items:flex-start;justify-content:flex-start;-moz-column-gap:.25rem;column-gap:.25rem;--tw-bg-opacity: 1;background-color:rgb(254 231 239 / var(--tw-bg-opacity, 1));padding:.75rem 1rem}._container_g3abj_1:is(._dark_g3abj_1 *){background-color:#fee7ef80;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}._container_g3abj_1 svg{margin-top:2px;width:16px;height:16px}._title_g3abj_12{padding:0;padding-left:.25rem;font-size:.875rem;line-height:1.25rem;font-weight:300;--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}._title_g3abj_12:is(._dark_g3abj_1 *){--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}
2
- /*$vite$:1*/`,document.head.appendChild(se);function ve(r,t){for(var e=0;e<t.length;e++){const n=t[e];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in r)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(r,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}class _t{constructor(t){A(this,"parent");A(this,"core");typeof window!="undefined"&&(this.parent=t)}mount(t){return K(this,null,function*(){if(!this.parent)return;if(!this.core){const a=(yield Promise.resolve().then(()=>_l)).Core;this.core=new a}t.styles&&this.core.state.styles.setState(t.styles),this.core.state.checkout.setState({clientToken:t.clientToken,environment:t.environment,apiVersion:t.apiVersion,errorMessageText:t.errorMessageText});const e=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(e),this.core.state.checkout.setState(t)})}unmount(){return K(this,null,function*(){!this.parent||!this.core||(this.parent.innerHTML="",this.core.clearState())})}}var W=(r=>(r.PAYPAL="PAYPAL",r.APPLE_PAY="APPLEPAY",r.GOOGLE_PAY="GPAY",r.CARD="CARD",r.VENMO="VENMO",r))(W||{}),Je=(r=>(r.PENDING="PENDING",r.FAILED="FAILED",r.AUTHORIZED="AUTHORIZED",r.SETTLING="SETTLING",r.SETTLED="SETTLED",r.DECLINED="DECLINED",r.CANCELLED="CANCELLED",r))(Je||{}),Re=(r=>(r.INSUFFICIENT_FUNDS="insufficient_funds",r.AUTHENTICATION_REQUIRED="authentication_required",r.CARD_ISSUER_DECLINE="card_issuer_decline",r.GENERIC_DECLINE="generic_decline",r.WITHDRAWAL_LIMIT_EXCEEDED="withdrawal_limit_exceeded",r.DO_NOT_HONOR="do_not_honor",r.EXPIRED_CARD="expired_card",r.SUSPECTED_FRAUD="suspected_fraud",r.INCORRECT_CVC="incorrect_cvc",r.INVALID_CARD_NUMBER="invalid_card_number",r.ISSUER_UNAVAILABLE="issuer_unavailable",r.CARD_LOST_OR_STOLEN="card_lost_or_stolen",r.CARD_DECLINED="card_declined",r))(Re||{});const Te={appIds:{develop:"app_00b96c0c3011",staging:"app_00396c84ac2b",sandbox:"app_03b1ea2b6dfa",production:"app_409cf462b6cc"},teamId:"team_f20c9e679d47"},ke=(r="sandbox")=>({develop:"https://dev-api.paynext.com",staging:"https://staging-api.paynext.com",sandbox:"https://sandbox-api.paynext.com",production:"https://api.paynext.com"})[r],Wi=[{type:W.PAYPAL,order:1,is_active:!0},{type:W.APPLE_PAY,order:2,is_active:!0},{type:W.GOOGLE_PAY,order:3,is_active:!0},{type:W.CARD,order:4,is_active:!0}],Gi=r=>r.googlePay?W.GOOGLE_PAY:r.applePay?W.APPLE_PAY:r.paypal?W.PAYPAL:r.braintree?W.VENMO:W.CARD,$i=r=>{const t=r.card;if(t)return{bin:t.firstSixDigits,bin_data:{brand:t.cardBrand,country:t.country,currency_code:t.currency,funding:t.funding,issuer:t.issuer,type:t.type},cvc:t.cvc,exp_month:Number(t.expMonth),exp_year:Number(t.expYear),last4:t.lastFourDigits,number:t.number}},qi=r=>{var e;const t=r.paypal;if((e=t==null?void 0:t.billing_agreement_token)!=null&&e.paypalId)return{billing_agreement_token:t.billing_agreement_token.paypalId}},Qi=r=>{var e,n;const t=r.googlePay;if(t!=null&&t.token)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(e=t.card)!=null&&e.expiry.month||t.token.expiry.month?Number(t.card.expiry.month||t.token.expiry.month):void 0,exp_year:(n=t.card)!=null&&n.expiry.year||t.token.expiry.year?Number(t.card.expiry.year||t.token.expiry.year):void 0,token:t.token.number,token_service_provider:t.token.tokenServiceProvider}},Xi=r=>{var e,n,a,i,s,o;const t=r.applePay;if(t)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(n=(e=t.networkToken)==null?void 0:e.expiry)!=null&&n.month?Number(t.networkToken.expiry.month):void 0,exp_year:(i=(a=t.networkToken)==null?void 0:a.expiry)!=null&&i.year?Number(t.networkToken.expiry.year):void 0,token:(s=t.networkToken)==null?void 0:s.number,token_service_provider:(o=t.networkToken)==null?void 0:o.tokenServiceProvider}},Zi=r=>{const t=r.braintree;if(t)return{payment_method_nonce:t.nonce}},kn=r=>{var n,a,i,s,o,c,l,d,u,h,p,f,m,v;const{applePay:t,googlePay:e}=r;if(!(!t&&!e))return{city:((n=t==null?void 0:t.billingContact)==null?void 0:n.locality)||((a=e==null?void 0:e.billingAddress)==null?void 0:a.locality)||void 0,country:((i=t==null?void 0:t.billingContact)==null?void 0:i.countryCode)||((s=e==null?void 0:e.billingAddress)==null?void 0:s.countryCode)||void 0,line1:((c=(o=t==null?void 0:t.billingContact)==null?void 0:o.addressLines)==null?void 0:c.at(0))||((l=e==null?void 0:e.billingAddress)==null?void 0:l.address1)||void 0,line2:((u=(d=t==null?void 0:t.billingContact)==null?void 0:d.addressLines)==null?void 0:u.at(1))||((h=e==null?void 0:e.billingAddress)==null?void 0:h.address2)||void 0,postal_code:((p=t==null?void 0:t.billingContact)==null?void 0:p.postalCode)||((f=e==null?void 0:e.billingAddress)==null?void 0:f.postalCode)||void 0,state:((m=t==null?void 0:t.billingContact)==null?void 0:m.administrativeArea)||((v=e==null?void 0:e.billingAddress)==null?void 0:v.administrativeArea)||void 0}},Sn=r=>{var a,i,s,o,c,l,d,u,h,p,f,m,v,b,w,x,O,I,L;const{card:t,googlePay:e,applePay:n}=r;if(!(!t&&!(e!=null&&e.card)&&!(n!=null&&n.card)))return{bin:t==null?void 0:t.firstSixDigits,bin_data:{brand:(t==null?void 0:t.cardBrand)||((a=e==null?void 0:e.card)==null?void 0:a.brand)||((i=n==null?void 0:n.card)==null?void 0:i.brand),country:(t==null?void 0:t.country)||((s=e==null?void 0:e.card)==null?void 0:s.country)||((o=n==null?void 0:n.card)==null?void 0:o.country),currency_code:(t==null?void 0:t.currency)||((c=e==null?void 0:e.card)==null?void 0:c.currency)||((l=n==null?void 0:n.card)==null?void 0:l.currency),funding:(t==null?void 0:t.funding)||((d=e==null?void 0:e.card)==null?void 0:d.funding)||((u=n==null?void 0:n.card)==null?void 0:u.funding),issuer:(t==null?void 0:t.issuer)||((h=e==null?void 0:e.card)==null?void 0:h.issuer)||((p=n==null?void 0:n.card)==null?void 0:p.issuer),type:(t==null?void 0:t.type)||((f=e==null?void 0:e.card)==null?void 0:f.segment)||((m=n==null?void 0:n.card)==null?void 0:m.segment)},cvc:t==null?void 0:t.cvc,exp_month:t!=null&&t.expMonth||(v=e==null?void 0:e.card)!=null&&v.expiry.month?Number((t==null?void 0:t.expMonth)||((b=e==null?void 0:e.card)==null?void 0:b.expiry.month)):void 0,exp_year:t!=null&&t.expYear||(w=e==null?void 0:e.card)!=null&&w.expiry.year?Number((t==null?void 0:t.expYear)||((x=e==null?void 0:e.card)==null?void 0:x.expiry.year)):void 0,last4:(t==null?void 0:t.lastFourDigits)||((O=e==null?void 0:e.card)==null?void 0:O.lastFour)||((I=n==null?void 0:n.card)==null?void 0:I.lastFour),number:(t==null?void 0:t.number)||((L=e==null?void 0:e.card)==null?void 0:L.number)}},Mn=r=>{var n,a;const{applePay:t,card:e}=r;return(n=t==null?void 0:t.billingContact)!=null&&n.givenName?`${t.billingContact.givenName} ${t.billingContact.familyName||""}`.trim():(a=e==null?void 0:e.metadata)==null?void 0:a.name},Ji=r=>{var n,a,i,s,o,c,l,d;const t=Gi(r),e={client_session:r.clientSession,three_ds_session_id:r.threeDsSessionId,type:t};switch(t){case W.CARD:return J(U({},e),{name:Mn(r),card:$i(r)});case W.PAYPAL:return J(U({},e),{paypal:qi(r)});case W.GOOGLE_PAY:return J(U({},e),{name:(a=(n=r.googlePay)==null?void 0:n.billingAddress)==null?void 0:a.name,phone:(c=(o=(s=(i=r.googlePay)==null?void 0:i.billingAddress)==null?void 0:s.phoneNumber)==null?void 0:o.replace(/ /g,""))==null?void 0:c.replace(/-/g,""),card:Sn(r),google_pay:Qi(r),billing_address:kn(r)});case W.APPLE_PAY:return J(U({},e),{name:Mn(r),card:Sn(r),apple_pay:Xi(r),phone:(d=(l=r.applePay)==null?void 0:l.shippingContact)==null?void 0:d.phoneNumber,billing_address:kn(r)});case W.VENMO:return J(U({},e),{venmo:Zi(r)});default:throw new Error(`Unsupported payment method: ${t}`)}},ea=(r,t,e)=>K(this,null,function*(){const n=`${ke(t)}/payments/create`,a=new Headers;a.append("Content-Type","application/json"),a.append("X-API-Version",e);const i=Ji(r);return yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify(i)})).json()}),ta=(r,t,e)=>K(this,null,function*(){const n=`${ke(t)}/payments/create/billing/agreement`,a=new Headers;return a.append("Content-Type","application/json"),a.append("X-API-Version",e),(yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify({client_session:r})})).json()).paypal_agreement_token_response.token_id||""}),na=(r,t,e)=>K(this,null,function*(){const n=new Headers;n.append("X-API-Version",e);const a=`${ke(t)}/payments/config?client_session_id=${r}`,s=yield(yield fetch(a,{headers:n})).json();return s.checkout_config||(s.checkout_config=Wi),s});let ra=class{constructor(t){A(this,"apple",null);A(this,"isAvailable",!1);A(this,"onReady");this.ev=t}init(l,d){return K(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:s,onPaymentAttempt:o},c){const u=this.ev.transactions.create(t);this.apple=this.ev.ui.applePay(u,J(U({locale:e,borderRadius:12,size:{width:"100%",height:"40px"}},c==null?void 0:c.styles),{allowedCardNetworks:["visa","masterCard"],requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(m,v)=>K(this,[m,v],function*(p,{fail:f}){o==null||o({paymentMethod:W.GOOGLE_PAY});try{i==null||i(p)}catch(b){console.error(b),f({message:"Cannot pay with payment credentials"})}})}));const h="available";this.isAvailable=h==="available",this.isAvailable||a==null||a("Apple Pay is not supported on this device"),a&&this.apple.on("error",a),s&&this.apple.on("cancel",s),this.onReady=n})}render(t){return K(this,null,function*(){var e;if(!(!this.apple||!this.isAvailable)){t.innerHTML="";try{yield this.apple.mount(t),(e=this.onReady)==null||e.call(this)}catch(n){throw console.error(n),new Error(n instanceof Error?n.message:"Failed to render Apple Pay button")}}})}},ia=class{constructor(t){A(this,"google",null);this.ev=t}init(l,d){return K(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:s,onPaymentAttempt:o},c){const u=this.ev.transactions.create(t);this.google=this.ev.ui.googlePay(u,J(U({locale:e,size:{width:"100%",height:40},borderRadius:12,billingAddress:{phoneNumber:!0}},c==null?void 0:c.styles),{allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["VISA","MASTERCARD"],process:(f,m)=>K(this,[f,m],function*(h,{fail:p}){o==null||o({paymentMethod:W.GOOGLE_PAY});try{i==null||i(h)}catch(v){console.error(v),p({message:"Cannot pay with payment credentials"})}})})),s&&this.google.on("cancel",s),n&&this.google.on("ready",n),a&&this.google.on("error",a)})}render(t){return K(this,null,function*(){this.google&&(t.innerHTML="",this.google.mount(t))})}};class de{constructor(){A(this,"listeners",[])}removeListener(t){this.listeners=this.listeners.filter(e=>e!==t)}addListener(t){return this.listeners.push(t),()=>this.removeListener(t)}emit(t){for(const e of this.listeners)e(t)}clear(){this.listeners=[]}}class aa{constructor(t){A(this,"threeDs",null);this.ev=t}init(i){return K(this,arguments,function*({threeDsId:t,onReady:e,onSuccess:n,onError:a}){this.threeDs=this.ev.ui.threeDSecure(t),this.threeDs.on("ready",()=>e==null?void 0:e()),this.threeDs.on("success",()=>n==null?void 0:n()),this.threeDs.on("failure",()=>a==null?void 0:a()),this.threeDs.on("error",()=>a==null?void 0:a())})}render(t){return K(this,null,function*(){this.threeDs&&this.threeDs.mount(t)})}}class sa{constructor(){A(this,"isReady",!1);A(this,"ev",null);A(this,"apple",null);A(this,"google",null);A(this,"threeDs",null);A(this,"events",{ready:new de})}isShouldLoad({teamId:t,appId:e}){var n,a;return((n=this.ev)==null?void 0:n.config.appId)!==e||((a=this.ev)==null?void 0:a.config.teamId)!==t}preloadEvervault(t){return K(this,null,function*(){if(!this.isShouldLoad(t))return;if(typeof window=="undefined")throw new Error("Evervault can only be initialized in browser environment");this.isReady=!1;const{loadEvervault:e}=yield Promise.resolve().then(()=>wl);this.ev=yield e(t.teamId,t.appId)})}initEv(t){return K(this,null,function*(){this.ev||(yield this.preloadEvervault(t)),this.apple=new ra(this.ev),this.google=new ia(this.ev),this.events.ready.emit(),this.isReady=!0})}initThreeDs(t){return K(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new aa(this.ev),yield this.threeDs.init(t),yield this.threeDs.render()})}initApple(t,e){return K(this,null,function*(){if(!this.apple)throw new Error("Evervault should be init before using Apple Pay");yield this.apple.init(t,e)})}initGoogle(t,e){return K(this,null,function*(){if(!this.google)throw new Error("Evervault should be init before using Google Pay");yield this.google.init(t,e)})}isAppleAvailable(){var t;return!!((t=this.apple)!=null&&t.isAvailable)}addEventListener(t,e){return this.events[t].addListener(e)}renderApple(t){return K(this,null,function*(){var e;return(e=this.apple)==null?void 0:e.render(t)})}renderGoogle(t){return K(this,null,function*(){var e;return(e=this.google)==null?void 0:e.render(t)})}getEv(){if(!this.ev)throw new Error("Evervault should be init before getting instance");return this.ev}}function Dt(r){return typeof r=="object"&&!Array.isArray(r)}function oa(r,t,e){var n;if(r instanceof EventTarget)return[r];if(typeof r=="string"){let a=document;const i=(n=e==null?void 0:e[r])!=null?n:a.querySelectorAll(r);return i?Array.from(i):[]}return Array.from(r)}function Dn(r,t,e,n){return typeof r=="string"&&Dt(t)?oa(r,e,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function ca(r,t,e){return r*(t+1)}function Vn(r,t,e,n){var a;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,r+parseFloat(t)):t==="<"?e:(a=n.get(t))!=null?a:r}const et=(r,t,e)=>r+(t-r)*e,la=(r,t,e)=>{const n=t-r;return((e-r)%n+n)%n+r},Fn=r=>Array.isArray(r)&&typeof r[0]!="number";function Un(r,t){return Fn(r)?r[la(0,r.length,t)]:r}function da(r,t){r.indexOf(t)===-1&&r.push(t)}function Bn(r,t){const e=r.indexOf(t);e>-1&&r.splice(e,1)}function ua(r,t,e){for(let n=0;n<r.length;n++){const a=r[n];a.at>t&&a.at<e&&(Bn(r,a),n--)}}function pa(r,t,e,n,a,i){ua(r,a,i);for(let s=0;s<t.length;s++)r.push({value:t[s],at:et(a,i,n[s]),easing:Un(e,s)})}function ha(r,t){for(let e=0;e<r.length;e++)r[e]=r[e]/(t+1)}function fa(r,t){return r.at===t.at?r.value===null?1:t.value===null?-1:0:r.at-t.at}const ge=r=>!!(r&&r.getVelocity),Vt=(r,t,e)=>{const n=t-r;return n===0?1:(e-r)/n};function zn(r,t){const e=r[r.length-1];for(let n=1;n<=t;n++){const a=Vt(0,t,n);r.push(et(e,1,a))}}function jn(r){const t=[0];return zn(t,r.length-1),t}function Ft(r){return typeof r=="function"&&"applyToOptions"in r}const Et=2e4;function Ut(r){let t=0;const e=50;let n=r.next(t);for(;!n.done&&t<Et;)t+=e,n=r.next(t);return t>=Et?1/0:t}const Ce=r=>r*1e3,xe=r=>r/1e3;function Hn(r,t=100,e){const n=e(J(U({},r),{keyframes:[0,t]})),a=Math.min(Ut(n),Et);return{type:"keyframes",ease:i=>n.next(a*i).value/t,duration:xe(a)}}let tt=()=>{},Oe=()=>{};process.env.NODE_ENV!=="production"&&(tt=(r,t)=>{!r&&typeof console!="undefined"&&console.warn(t)},Oe=(r,t)=>{if(!r)throw new Error(t)});const ma="easeInOut",va=20;function ga(r,i={},n,a){var s=i,{defaultTransition:t={}}=s,e=Ae(s,["defaultTransition"]);const o=t.duration||.3,c=new Map,l=new Map,d={},u=new Map;let h=0,p=0,f=0;for(let m=0;m<r.length;m++){const v=r[m];if(typeof v=="string"){u.set(v,p);continue}else if(!Array.isArray(v)){u.set(v.name,Vn(p,v.at,h,u));continue}let[b,w,x={}]=v;x.at!==void 0&&(p=Vn(p,x.at,h,u));let O=0;const I=(L,N,S,B=0,G=0)=>{const $=ba(L),D=N,{delay:F=0,times:j=jn($),type:H="keyframes",repeat:ee,repeatType:M,repeatDelay:q=0}=D,Y=Ae(D,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:E=t.ease||"easeOut",duration:g}=N;const R=typeof F=="function"?F(B,G):F,V=$.length,y=Ft(H)?H:a==null?void 0:a[H];if(V<=2&&y){let C=100;if(V===2&&Ea($)){const le=$[1]-$[0];C=Math.abs(le)}const z=U({},Y);g!==void 0&&(z.duration=Ce(g));const Z=Hn(z,C,y);E=Z.ease,g=Z.duration}g!=null||(g=o);const T=p+R;j.length===1&&j[0]===0&&(j[1]=1);const _=j.length-$.length;if(_>0&&zn(j,_),$.length===1&&$.unshift(null),ee){Oe(ee<va,"Repeat count too high, must be less than 20"),g=ca(g,ee);const C=[...$],z=[...j];E=Array.isArray(E)?[...E]:[E];const Z=[...E];for(let le=0;le<ee;le++){$.push(...C);for(let k=0;k<C.length;k++)j.push(z[k]+(le+1)),E.push(k===0?"linear":Un(Z,k-1))}ha(j,ee)}const P=T+g;pa(S,$,E,j,T,P),O=Math.max(R+g,O),f=Math.max(P,f)};if(ge(b)){const L=Kn(b,l);I(w,x,Yn("default",L))}else{const L=Dn(b,w,n,d),N=L.length;for(let S=0;S<N;S++){w=w,x=x;const B=L[S],G=Kn(B,l);for(const $ in w)I(w[$],ya(x,$),Yn($,G),S,N)}}h=p,p+=O}return l.forEach((m,v)=>{for(const b in m){const w=m[b];w.sort(fa);const x=[],O=[],I=[];for(let N=0;N<w.length;N++){const{at:S,value:B,easing:G}=w[N];x.push(B),O.push(Vt(0,f,S)),I.push(G||"easeOut")}O[0]!==0&&(O.unshift(0),x.unshift(x[0]),I.unshift(ma)),O[O.length-1]!==1&&(O.push(1),x.push(null)),c.has(v)||c.set(v,{keyframes:{},transition:{}});const L=c.get(v);L.keyframes[b]=x,L.transition[b]=U(J(U({},t),{duration:f,ease:I,times:O}),e)}}),c}function Kn(r,t){return!t.has(r)&&t.set(r,{}),t.get(r)}function Yn(r,t){return t[r]||(t[r]=[]),t[r]}function ba(r){return Array.isArray(r)?r:[r]}function ya(r,t){return r&&r[t]?U(U({},r),r[t]):U({},r)}const _a=r=>typeof r=="number",Ea=r=>r.every(_a),nt=new WeakMap,Ca=r=>Array.isArray(r);function Wn(r){const t=[{},{}];return r==null||r.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Gn(r,t,e,n){if(typeof t=="function"){const[a,i]=Wn(n);t=t(e!==void 0?e:r.custom,a,i)}if(typeof t=="string"&&(t=r.variants&&r.variants[t]),typeof t=="function"){const[a,i]=Wn(n);t=t(e!==void 0?e:r.custom,a,i)}return t}function wa(r,t,e){const n=r.getProps();return Gn(n,t,n.custom,r)}const Ct=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Aa(r,t){let e=new Set,n=new Set,a=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(d){s.has(d)&&(l.schedule(d),r()),d(o)}const l={schedule:(d,u=!1,h=!1)=>{const f=h&&a?e:n;return u&&s.add(d),f.has(d)||f.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(o=d,a){i=!0;return}a=!0,[e,n]=[n,e],e.forEach(c),e.clear(),a=!1,i&&(i=!1,l.process(d))}};return l}const Ne={},Ta=40;function Ia(r,t){let e=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>e=!0,s=Ct.reduce((x,O)=>(x[O]=Aa(i),x),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:d,update:u,preRender:h,render:p,postRender:f}=s,m=()=>{const x=Ne.useManualTiming?a.timestamp:performance.now();e=!1,Ne.useManualTiming||(a.delta=n?1e3/60:Math.max(Math.min(x-a.timestamp,Ta),1)),a.timestamp=x,a.isProcessing=!0,o.process(a),c.process(a),l.process(a),d.process(a),u.process(a),h.process(a),p.process(a),f.process(a),a.isProcessing=!1,e&&t&&(n=!1,r(m))},v=()=>{e=!0,n=!0,a.isProcessing||r(m)};return{schedule:Ct.reduce((x,O)=>{const I=s[O];return x[O]=(L,N=!1,S=!1)=>(e||v(),I.schedule(L,N,S)),x},{}),cancel:x=>{for(let O=0;O<Ct.length;O++)s[Ct[O]].cancel(x)},state:a,steps:s}}const je=r=>r,{schedule:Pe,cancel:Bt,state:wt}=Ia(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:je,!0);let At;function xa(){At=void 0}const ye={now:()=>(At===void 0&&ye.set(wt.isProcessing||Ne.useManualTiming?wt.timestamp:performance.now()),At),set:r=>{At=r,queueMicrotask(xa)}},$n=new Set;function qn(r,t,e){r||$n.has(t)||(console.warn(t),$n.add(t))}class Qn{constructor(){this.subscriptions=[]}add(t){return da(this.subscriptions,t),()=>Bn(this.subscriptions,t)}notify(t,e,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,e,n);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Xn(r,t){return t?r*(1e3/t):0}const Zn=30,Oa=r=>!isNaN(parseFloat(r));class Na{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,a=!0)=>{var s,o;const i=ye.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();a&&((o=this.events.renderRequest)==null||o.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Oa(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&qn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Qn);const n=this.events[t].add(e);return t==="change"?()=>{n(),Pe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){!e||!this.passiveEffect?this.updateAndNotify(t,e):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Zn)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Zn);return Xn(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,e;(t=this.dependents)==null||t.clear(),(e=this.events.destroy)==null||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rt(r,t){return new Na(r,t)}function Pa(r,t,e){r.hasValue(t)?r.getValue(t).set(e):r.addValue(t,rt(e))}function La(r){return Ca(r)?r[r.length-1]||0:r}function Ra(r,t){let s=wa(r,t)||{},{transitionEnd:n={},transition:a={}}=s,i=Ae(s,["transitionEnd","transition"]);i=U(U({},i),n);for(const o in i){const c=La(i[o]);Pa(r,o,c)}}function ka(r){return!!(ge(r)&&r.add)}function Sa(r,t){const e=r.getValue("willChange");if(ka(e))return e.add(t);if(!e&&Ne.WillChange){const n=new Ne.WillChange("auto");r.addValue("willChange",n),n.add(t)}}const zt=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ma="data-"+zt("framerAppearId");function Da(r){return r.props[Ma]}const Va=r=>r!==null;function Fa(r,{repeat:t,repeatType:e="loop"},n){const a=r.filter(Va),i=t&&e!=="loop"&&t%2===1?0:a.length-1;return a[i]}const He=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ke=new Set(He),Ua={type:"spring",stiffness:500,damping:25,restSpeed:10},Ba=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),za={type:"keyframes",duration:.8},ja={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ha=(r,{keyframes:t})=>t.length>2?za:Ke.has(r)?r.startsWith("scale")?Ba(t[1]):Ua:ja;function Ka(u){var h=u,{when:r,delay:t,delayChildren:e,staggerChildren:n,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:c,elapsed:l}=h,d=Ae(h,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}function Jn(r,t){var e,n;return(n=(e=r==null?void 0:r[t])!=null?e:r==null?void 0:r.default)!=null?n:r}const er=r=>t=>typeof t=="string"&&t.startsWith(r),tr=er("--"),Ya=er("var(--"),jt=r=>Ya(r)?Wa.test(r.split("/*")[0].trim()):!1,Wa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Se=(r,t,e)=>e>t?t:e<r?r:e,Ye={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},it=J(U({},Ye),{transform:r=>Se(0,1,r)}),Tt=J(U({},Ye),{default:1}),at=r=>Math.round(r*1e5)/1e5,Ht=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ga(r){return r==null}const $a=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kt=(r,t)=>e=>!!(typeof e=="string"&&$a.test(e)&&e.startsWith(r)||t&&!Ga(e)&&Object.prototype.hasOwnProperty.call(e,t)),nr=(r,t,e)=>n=>{if(typeof n!="string")return n;const[a,i,s,o]=n.match(Ht);return{[r]:parseFloat(a),[t]:parseFloat(i),[e]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},qa=r=>Se(0,255,r),Yt=J(U({},Ye),{transform:r=>Math.round(qa(r))}),Me={test:Kt("rgb","red"),parse:nr("red","green","blue"),transform:({red:r,green:t,blue:e,alpha:n=1})=>"rgba("+Yt.transform(r)+", "+Yt.transform(t)+", "+Yt.transform(e)+", "+at(it.transform(n))+")"};function Qa(r){let t="",e="",n="",a="";return r.length>5?(t=r.substring(1,3),e=r.substring(3,5),n=r.substring(5,7),a=r.substring(7,9)):(t=r.substring(1,2),e=r.substring(2,3),n=r.substring(3,4),a=r.substring(4,5),t+=t,e+=e,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const Wt={test:Kt("#"),parse:Qa,transform:Me.transform},st=r=>({test:t=>typeof t=="string"&&t.endsWith(r)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${r}`}),Le=st("deg"),We=st("%"),X=st("px"),Xa=st("vh"),Za=st("vw"),rr=J(U({},We),{parse:r=>We.parse(r)/100,transform:r=>We.transform(r*100)}),Ge={test:Kt("hsl","hue"),parse:nr("hue","saturation","lightness"),transform:({hue:r,saturation:t,lightness:e,alpha:n=1})=>"hsla("+Math.round(r)+", "+We.transform(at(t))+", "+We.transform(at(e))+", "+at(it.transform(n))+")"},fe={test:r=>Me.test(r)||Wt.test(r)||Ge.test(r),parse:r=>Me.test(r)?Me.parse(r):Ge.test(r)?Ge.parse(r):Wt.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Me.transform(r):Ge.transform(r)},Ja=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function es(r){var t,e;return isNaN(r)&&typeof r=="string"&&(((t=r.match(Ht))==null?void 0:t.length)||0)+(((e=r.match(Ja))==null?void 0:e.length)||0)>0}const ir="number",ar="color",ts="var",ns="var(",sr="${}",rs=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ot(r){const t=r.toString(),e=[],n={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(rs,c=>(fe.test(c)?(n.color.push(i),a.push(ar),e.push(fe.parse(c))):c.startsWith(ns)?(n.var.push(i),a.push(ts),e.push(c)):(n.number.push(i),a.push(ir),e.push(parseFloat(c))),++i,sr)).split(sr);return{values:e,split:o,indexes:n,types:a}}function or(r){return ot(r).values}function cr(r){const{split:t,types:e}=ot(r),n=t.length;return a=>{let i="";for(let s=0;s<n;s++)if(i+=t[s],a[s]!==void 0){const o=e[s];o===ir?i+=at(a[s]):o===ar?i+=fe.transform(a[s]):i+=a[s]}return i}}const is=r=>typeof r=="number"?0:r;function as(r){const t=or(r);return cr(r)(t.map(is))}const $e={test:es,parse:or,createTransformer:cr,getAnimatableNone:as};function Gt(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*(2/3-e)*6:r}function ss({hue:r,saturation:t,lightness:e,alpha:n}){r/=360,t/=100,e/=100;let a=0,i=0,s=0;if(!t)a=i=s=e;else{const o=e<.5?e*(1+t):e+t-e*t,c=2*e-o;a=Gt(c,o,r+1/3),i=Gt(c,o,r),s=Gt(c,o,r-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:n}}function It(r,t){return e=>e>0?t:r}const $t=(r,t,e)=>{const n=r*r,a=e*(t*t-n)+n;return a<0?0:Math.sqrt(a)},os=[Wt,Me,Ge],cs=r=>os.find(t=>t.test(r));function lr(r){const t=cs(r);if(tt(!!t,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let e=t.parse(r);return t===Ge&&(e=ss(e)),e}const dr=(r,t)=>{const e=lr(r),n=lr(t);if(!e||!n)return It(r,t);const a=U({},e);return i=>(a.red=$t(e.red,n.red,i),a.green=$t(e.green,n.green,i),a.blue=$t(e.blue,n.blue,i),a.alpha=et(e.alpha,n.alpha,i),Me.transform(a))},qt=new Set(["none","hidden"]);function ls(r,t){return qt.has(r)?e=>e<=0?r:t:e=>e>=1?t:r}const ds=(r,t)=>e=>t(r(e)),Qt=(...r)=>r.reduce(ds);function us(r,t){return e=>et(r,t,e)}function Xt(r){return typeof r=="number"?us:typeof r=="string"?jt(r)?It:fe.test(r)?dr:fs:Array.isArray(r)?ur:typeof r=="object"?fe.test(r)?dr:ps:It}function ur(r,t){const e=[...r],n=e.length,a=r.map((i,s)=>Xt(i)(i,t[s]));return i=>{for(let s=0;s<n;s++)e[s]=a[s](i);return e}}function ps(r,t){const e=U(U({},r),t),n={};for(const a in e)r[a]!==void 0&&t[a]!==void 0&&(n[a]=Xt(r[a])(r[a],t[a]));return a=>{for(const i in n)e[i]=n[i](a);return e}}function hs(r,t){var a;const e=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=r.indexes[s][n[s]],c=(a=r.values[o])!=null?a:0;e[i]=c,n[s]++}return e}const fs=(r,t)=>{const e=$e.createTransformer(t),n=ot(r),a=ot(t);return n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length?qt.has(r)&&!a.values.length||qt.has(t)&&!n.values.length?ls(r,t):Qt(ur(hs(n,a),a.values),e):(tt(!0,`Complex values '${r}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),It(r,t))};function pr(r,t,e){return typeof r=="number"&&typeof t=="number"&&typeof e=="number"?et(r,t,e):Xt(r)(r,t)}const ms=r=>{const t=({timestamp:e})=>r(e);return{start:(e=!0)=>Pe.update(t,e),stop:()=>Bt(t),now:()=>wt.isProcessing?wt.timestamp:ye.now()}},hr=(r,t,e=10)=>{let n="";const a=Math.max(Math.round(t/e),2);for(let i=0;i<a;i++)n+=r(i/(a-1))+", ";return`linear(${n.substring(0,n.length-2)})`},vs=5;function fr(r,t,e){const n=Math.max(t-vs,0);return Xn(e-r(n),t-n)}const ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Zt=.001;function gs({duration:r=ce.duration,bounce:t=ce.bounce,velocity:e=ce.velocity,mass:n=ce.mass}){let a,i;tt(r<=Ce(ce.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=Se(ce.minDamping,ce.maxDamping,s),r=Se(ce.minDuration,ce.maxDuration,xe(r)),s<1?(a=l=>{const d=l*s,u=d*r,h=d-e,p=Jt(l,s),f=Math.exp(-u);return Zt-h/p*f},i=l=>{const u=l*s*r,h=u*e+e,p=Math.pow(s,2)*Math.pow(l,2)*r,f=Math.exp(-u),m=Jt(Math.pow(l,2),s);return(-a(l)+Zt>0?-1:1)*((h-p)*f)/m}):(a=l=>{const d=Math.exp(-l*r),u=(l-e)*r+1;return-Zt+d*u},i=l=>{const d=Math.exp(-l*r),u=(e-l)*(r*r);return d*u});const o=5/r,c=ys(a,i,o);if(r=Ce(r),isNaN(c))return{stiffness:ce.stiffness,damping:ce.damping,duration:r};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:s*2*Math.sqrt(n*l),duration:r}}}const bs=12;function ys(r,t,e){let n=e;for(let a=1;a<bs;a++)n=n-r(n)/t(n);return n}function Jt(r,t){return r*Math.sqrt(1-t*t)}const _s=["duration","bounce"],Es=["stiffness","damping","mass"];function mr(r,t){return t.some(e=>r[e]!==void 0)}function Cs(r){let t=U({velocity:ce.velocity,stiffness:ce.stiffness,damping:ce.damping,mass:ce.mass,isResolvedFromDuration:!1},r);if(!mr(r,Es)&&mr(r,_s))if(r.visualDuration){const e=r.visualDuration,n=2*Math.PI/(e*1.2),a=n*n,i=2*Se(.05,1,1-(r.bounce||0))*Math.sqrt(a);t=J(U({},t),{mass:ce.mass,stiffness:a,damping:i})}else{const e=gs(r);t=J(U(U({},t),e),{mass:ce.mass}),t.isResolvedFromDuration=!0}return t}function ct(r=ce.visualDuration,t=ce.bounce){const e=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:t}:r;let{restSpeed:n,restDelta:a}=e;const i=e.keyframes[0],s=e.keyframes[e.keyframes.length-1],o={done:!1,value:i},{stiffness:c,damping:l,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=Cs(J(U({},e),{velocity:-xe(e.velocity||0)})),f=h||0,m=l/(2*Math.sqrt(c*d)),v=s-i,b=xe(Math.sqrt(c/d)),w=Math.abs(v)<5;n||(n=w?ce.restSpeed.granular:ce.restSpeed.default),a||(a=w?ce.restDelta.granular:ce.restDelta.default);let x;if(m<1){const I=Jt(b,m);x=L=>{const N=Math.exp(-m*b*L);return s-N*((f+m*b*v)/I*Math.sin(I*L)+v*Math.cos(I*L))}}else if(m===1)x=I=>s-Math.exp(-b*I)*(v+(f+b*v)*I);else{const I=b*Math.sqrt(m*m-1);x=L=>{const N=Math.exp(-m*b*L),S=Math.min(I*L,300);return s-N*((f+m*b*v)*Math.sinh(S)+I*v*Math.cosh(S))/I}}const O={calculatedDuration:p&&u||null,next:I=>{const L=x(I);if(p)o.done=I>=u;else{let N=I===0?f:0;m<1&&(N=I===0?Ce(f):fr(x,I,L));const S=Math.abs(N)<=n,B=Math.abs(s-L)<=a;o.done=S&&B}return o.value=o.done?s:L,o},toString:()=>{const I=Math.min(Ut(O),Et),L=hr(N=>O.next(I*N).value,I,30);return I+"ms "+L},toTransition:()=>{}};return O}ct.applyToOptions=r=>{const t=Hn(r,100,ct);return r.ease=t.ease,r.duration=Ce(t.duration),r.type="keyframes",r};function en({keyframes:r,velocity:t=0,power:e=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:c,restDelta:l=.5,restSpeed:d}){const u=r[0],h={done:!1,value:u},p=S=>o!==void 0&&S<o||c!==void 0&&S>c,f=S=>o===void 0?c:c===void 0||Math.abs(o-S)<Math.abs(c-S)?o:c;let m=e*t;const v=u+m,b=s===void 0?v:s(v);b!==v&&(m=b-u);const w=S=>-m*Math.exp(-S/n),x=S=>b+w(S),O=S=>{const B=w(S),G=x(S);h.done=Math.abs(B)<=l,h.value=h.done?b:G};let I,L;const N=S=>{p(h.value)&&(I=S,L=ct({keyframes:[h.value,f(h.value)],velocity:fr(x,S,h.value),damping:a,stiffness:i,restDelta:l,restSpeed:d}))};return N(0),{calculatedDuration:null,next:S=>{let B=!1;return!L&&I===void 0&&(B=!0,O(S),N(S)),I!==void 0&&S>=I?L.next(S-I):(!B&&O(S),h)}}}function ws(r,t,e){const n=[],a=e||Ne.mix||pr,i=r.length-1;for(let s=0;s<i;s++){let o=a(r[s],r[s+1]);if(t){const c=Array.isArray(t)?t[s]||je:t;o=Qt(c,o)}n.push(o)}return n}function As(r,t,{clamp:e=!0,ease:n,mixer:a}={}){const i=r.length;if(Oe(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=r[0]===r[1];r[0]>r[i-1]&&(r=[...r].reverse(),t=[...t].reverse());const o=ws(t,n,a),c=o.length,l=d=>{if(s&&d<r[0])return t[0];let u=0;if(c>1)for(;u<r.length-2&&!(d<r[u+1]);u++);const h=Vt(r[u],r[u+1],d);return o[u](h)};return e?d=>l(Se(r[0],r[i-1],d)):l}function Ts(r,t){return r.map(e=>e*t)}const vr=(r,t,e)=>(((1-3*e+3*t)*r+(3*e-6*t))*r+3*t)*r,Is=1e-7,xs=12;function Os(r,t,e,n,a){let i,s,o=0;do s=t+(e-t)/2,i=vr(s,n,a)-r,i>0?e=s:t=s;while(Math.abs(i)>Is&&++o<xs);return s}function lt(r,t,e,n){if(r===t&&e===n)return je;const a=i=>Os(i,0,1,r,e);return i=>i===0||i===1?i:vr(a(i),t,n)}const Ns=lt(.42,0,1,1),Ps=lt(0,0,.58,1),gr=lt(.42,0,.58,1),br=r=>t=>t<=.5?r(2*t)/2:(2-r(2*(1-t)))/2,yr=r=>t=>1-r(1-t),_r=lt(.33,1.53,.69,.99),tn=yr(_r),Er=br(tn),Cr=r=>(r*=2)<1?.5*tn(r):.5*(2-Math.pow(2,-10*(r-1))),nn=r=>1-Math.sin(Math.acos(r)),Ls=yr(nn),wr=br(nn),Ar=r=>Array.isArray(r)&&typeof r[0]=="number",Tr={linear:je,easeIn:Ns,easeInOut:gr,easeOut:Ps,circIn:nn,circInOut:wr,circOut:Ls,backIn:tn,backInOut:Er,backOut:_r,anticipate:Cr},Rs=r=>typeof r=="string",Ir=r=>{if(Ar(r)){Oe(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,e,n,a]=r;return lt(t,e,n,a)}else if(Rs(r))return Oe(Tr[r]!==void 0,`Invalid easing type '${r}'`),Tr[r];return r};function ks(r,t){return r.map(()=>t||gr).splice(0,r.length-1)}function qe({duration:r=300,keyframes:t,times:e,ease:n="easeInOut"}){const a=Fn(n)?n.map(Ir):Ir(n),i={done:!1,value:t[0]},s=Ts(e&&e.length===t.length?e:jn(t),r),o=As(s,t,{ease:Array.isArray(a)?a:ks(t,a)});return{calculatedDuration:r,next:c=>(i.value=o(c),i.done=c>=r,i)}}const Ss=r=>r!==null;function rn(r,{repeat:t,repeatType:e="loop"},n,a=1){const i=r.filter(Ss),o=a<0||t&&e!=="loop"&&t%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const Ms={decay:en,inertia:en,tween:qe,keyframes:qe,spring:ct};function xr(r){typeof r.type=="string"&&(r.type=Ms[r.type])}class an{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ds=r=>r/100;class sn extends an{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,a;const{motionValue:e}=this.options;e&&e.updatedAt!==ye.now()&&this.tick(ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(n=this.options).onStop)==null||a.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;xr(t);const{type:e=qe,repeat:n=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=t;let{keyframes:o}=t;const c=e||qe;process.env.NODE_ENV!=="production"&&c!==qe&&Oe(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),c!==qe&&typeof o[0]!="number"&&(this.mixKeyframes=Qt(Ds,pr(o[0],o[1])),o=[0,100]);const l=c(J(U({},t),{keyframes:o}));i==="mirror"&&(this.mirroredGenerator=c(J(U({},t),{keyframes:[...o].reverse(),velocity:-s}))),l.calculatedDuration===null&&(l.calculatedDuration=Ut(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(n+1)-a,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:a,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const b=this.currentTime-l*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?b<0:b>a;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let x=this.currentTime,O=n;if(u){const S=Math.min(this.currentTime,a)/o;let B=Math.floor(S),G=S%1;!G&&S>=1&&(G=1),G===1&&B--,B=Math.min(B,u+1),!!(B%2)&&(h==="reverse"?(G=1-G,p&&(G-=p/o)):h==="mirror"&&(O=s)),x=Se(0,1,G)*o}const I=w?{done:!1,value:d[0]}:O.next(x);i&&(I.value=i(I.value));let{done:L}=I;!w&&c!==null&&(L=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return N&&f!==en&&(I.value=rn(d,this.options,v,this.speed)),m&&m(I.value),N&&this.finish(),I}then(t,e){return this.finished.then(t,e)}get duration(){return xe(this.calculatedDuration)}get time(){return xe(this.currentTime)}set time(t){var e;t=Ce(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(e=this.driver)==null||e.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ye.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=xe(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=ms,startTime:e}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(i=(a=this.options).onPlay)==null||i.call(a);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e!=null?e:n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,e;this.notifyFinished(),this.teardown(),this.state="finished",(e=(t=this.options).onComplete)==null||e.call(t)}cancel(){var t,e;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(e=(t=this.options).onCancel)==null||e.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var e;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(e=this.driver)==null||e.stop(),t.observe(this)}}function Vs(r){var t;for(let e=1;e<r.length;e++)(t=r[e])!=null||(r[e]=r[e-1])}const De=r=>r*180/Math.PI,on=r=>{const t=De(Math.atan2(r[1],r[0]));return cn(t)},Fs={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:on,rotateZ:on,skewX:r=>De(Math.atan(r[1])),skewY:r=>De(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},cn=r=>(r=r%360,r<0&&(r+=360),r),Or=on,Nr=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),Pr=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),Us={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Nr,scaleY:Pr,scale:r=>(Nr(r)+Pr(r))/2,rotateX:r=>cn(De(Math.atan2(r[6],r[5]))),rotateY:r=>cn(De(Math.atan2(-r[2],r[0]))),rotateZ:Or,rotate:Or,skewX:r=>De(Math.atan(r[4])),skewY:r=>De(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function ln(r){return r.includes("scale")?1:0}function dn(r,t){if(!r||r==="none")return ln(t);const e=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,a;if(e)n=Us,a=e;else{const o=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Fs,a=o}if(!a)return ln(t);const i=n[t],s=a[1].split(",").map(zs);return typeof i=="function"?i(s):s[i]}const Bs=(r,t)=>{const{transform:e="none"}=getComputedStyle(r);return dn(e,t)};function zs(r){return parseFloat(r.trim())}const Lr=r=>r===Ye||r===X,js=new Set(["x","y","z"]),Hs=He.filter(r=>!js.has(r));function Ks(r){const t=[];return Hs.forEach(e=>{const n=r.getValue(e);n!==void 0&&(t.push([e,n.get()]),n.set(e.startsWith("scale")?1:0))}),t}const Ve={width:({x:r},{paddingLeft:t="0",paddingRight:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),height:({y:r},{paddingTop:t="0",paddingBottom:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),top:(r,{top:t})=>parseFloat(t),left:(r,{left:t})=>parseFloat(t),bottom:({y:r},{top:t})=>parseFloat(t)+(r.max-r.min),right:({x:r},{left:t})=>parseFloat(t)+(r.max-r.min),x:(r,{transform:t})=>dn(t,"x"),y:(r,{transform:t})=>dn(t,"y")};Ve.translateX=Ve.x,Ve.translateY=Ve.y;const Fe=new Set;let un=!1,pn=!1,hn=!1;function Rr(){if(pn){const r=Array.from(Fe).filter(n=>n.needsMeasurement),t=new Set(r.map(n=>n.element)),e=new Map;t.forEach(n=>{const a=Ks(n);a.length&&(e.set(n,a),n.render())}),r.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const a=e.get(n);a&&a.forEach(([i,s])=>{var o;(o=n.getValue(i))==null||o.set(s)})}),r.forEach(n=>n.measureEndState()),r.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}pn=!1,un=!1,Fe.forEach(r=>r.complete(hn)),Fe.clear()}function kr(){Fe.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(pn=!0)})}function Ys(){hn=!0,kr(),Rr(),hn=!1}class fn{constructor(t,e,n,a,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Fe.add(this),un||(un=!0,Pe.read(kr),Pe.resolveKeyframes(Rr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:a}=this;if(t[0]===null){const i=a==null?void 0:a.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&e){const o=n.readValue(e,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),a&&i===void 0&&a.set(t[0])}Vs(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Fe.delete(this)}cancel(){this.state==="scheduled"&&(Fe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ws=r=>r.startsWith("--");function Gs(r,t,e){Ws(t)?r.style.setProperty(t,e):r.style[t]=e}function mn(r){let t;return()=>(t===void 0&&(t=r()),t)}const $s=mn(()=>window.ScrollTimeline!==void 0),qs={};function Qs(r,t){const e=mn(r);return()=>{var n;return(n=qs[t])!=null?n:e()}}const Sr=Qs(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),dt=([r,t,e,n])=>`cubic-bezier(${r}, ${t}, ${e}, ${n})`,Mr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dt([0,.65,.55,1]),circOut:dt([.55,0,1,.45]),backIn:dt([.31,.01,.66,-.59]),backOut:dt([.33,1.53,.69,.99])};function Dr(r,t){if(r)return typeof r=="function"?Sr()?hr(r,t):"ease-out":Ar(r)?dt(r):Array.isArray(r)?r.map(e=>Dr(e,t)||Mr.easeOut):Mr[r]}function Xs(r,t,e,{delay:n=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeOut",times:c}={},l=void 0){const d={[t]:e};c&&(d.offset=c);const u=Dr(o,a);Array.isArray(u)&&(d.easing=u);const h={delay:n,duration:a,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),r.animate(d,h)}function Zs(e){var n=e,{type:r}=n,t=Ae(n,["type"]);var a,i;return Ft(r)&&Sr()?r.applyToOptions(t):((a=t.duration)!=null||(t.duration=300),(i=t.ease)!=null||(t.ease="easeOut"),t)}class Js extends an{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:a,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:o,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,Oe(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const l=Zs(t);this.animation=Xs(e,n,a,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=rn(a,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):Gs(e,n,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,e;(e=(t=this.animation).finish)==null||e.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,e;this.isPseudoElement||(e=(t=this.animation).commitStyles)==null||e.call(t)}get duration(){var e,n;const t=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return xe(Number(t))}get time(){return xe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&$s()?(this.animation.timeline=t,je):e(this)}}const Vr={anticipate:Cr,backInOut:Er,circInOut:wr};function eo(r){return r in Vr}function to(r){typeof r.ease=="string"&&eo(r.ease)&&(r.ease=Vr[r.ease])}const Fr=10;class no extends Js{constructor(t){to(t),xr(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){var d;const l=this.options,{motionValue:e,onUpdate:n,onComplete:a,element:i}=l,s=Ae(l,["motionValue","onUpdate","onComplete","element"]);if(!e)return;if(t!==void 0){e.set(t);return}const o=new sn(J(U({},s),{autoplay:!1})),c=Ce((d=this.finishedTime)!=null?d:this.time);e.setWithVelocity(o.sample(c-Fr).value,o.sample(c).value,Fr),o.stop()}}const Ur=(r,t)=>t==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&($e.test(r)||r==="0")&&!r.startsWith("url("));function ro(r){const t=r[0];if(r.length===1)return!0;for(let e=0;e<r.length;e++)if(r[e]!==t)return!0}function io(r,t,e,n){const a=r[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=r[r.length-1],s=Ur(a,t),o=Ur(i,t);return tt(s===o,`You are trying to animate ${t} from "${a}" to "${i}". ${a} is not an animatable value - to enable this animation set ${a} to a value animatable to ${i} via the \`style\` property.`),!s||!o?!1:ro(r)||(e==="spring"||Ft(e))&&n}function Br(r){return typeof r=="object"&&r!==null}function ao(r){return Br(r)&&"offsetHeight"in r}const so=new Set(["opacity","clipPath","filter","transform"]),oo=mn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function co(r){var l;const{motionValue:t,name:e,repeatDelay:n,repeatType:a,damping:i,type:s}=r;if(!ao((l=t==null?void 0:t.owner)==null?void 0:l.current))return!1;const{onUpdate:o,transformTemplate:c}=t.owner.getProps();return oo()&&e&&so.has(e)&&(e!=="transform"||!c)&&!o&&!n&&a!=="mirror"&&i!==0&&s!=="inertia"}const lo=40;class uo extends an{constructor(h){var p=h,{autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",keyframes:o,name:c,motionValue:l,element:d}=p,u=Ae(p,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var b,w;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=ye.now();const f=U({autoplay:t,delay:e,type:n,repeat:a,repeatDelay:i,repeatType:s,name:c,motionValue:l,element:d},u),m=(d==null?void 0:d.KeyframeResolver)||fn;this.keyframeResolver=new m(o,(b,w,x)=>this.onKeyframesResolved(b,w,f,!x),c,l,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,e,n,a){this.keyframeResolver=void 0;const{name:i,type:s,velocity:o,delay:c,isHandoff:l,onUpdate:d}=n;this.resolvedAt=ye.now(),io(t,i,s,o)||((Ne.instantAnimations||!c)&&(d==null||d(rn(t,n,e))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u=a?this.resolvedAt?this.resolvedAt-this.createdAt>lo?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=J(U({startTime:u,finalKeyframe:e},n),{keyframes:t}),p=!l&&co(h)?new no(J(U({},h),{element:h.motionValue.owner.current})):new sn(h);p.finished.then(()=>this.notifyFinished()).catch(je),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ys()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const zr=(r,t,e,n={},a,i)=>s=>{const o=Jn(n,r)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Ce(c);const d=J(U({keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity()},o),{delay:-l,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:r,motionValue:t,element:i?void 0:a});Ka(o)||Object.assign(d,Ha(r,d)),d.duration&&(d.duration=Ce(d.duration)),d.repeatDelay&&(d.repeatDelay=Ce(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),(Ne.instantAnimations||Ne.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!i&&t.get()!==void 0){const h=Fa(d.keyframes,o);if(h!==void 0){Pe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new sn(d):new uo(d)},jr=new Set(["width","height","top","left","right","bottom",...He]);function po({protectedKeys:r,needsAnimating:t},e){const n=r.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,n}function ho(r,t,{delay:e=0,transitionOverride:n,type:a}={}){var u;let d=t,{transition:i=r.getDefaultTransition(),transitionEnd:s}=d,o=Ae(d,["transition","transitionEnd"]);n&&(i=n);const c=[],l=a&&r.animationState&&r.animationState.getState()[a];for(const h in o){const p=r.getValue(h,(u=r.latestValues[h])!=null?u:null),f=o[h];if(f===void 0||l&&po(l,h))continue;const m=U({delay:e},Jn(i||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(f)&&f===v&&!m.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const x=Da(r);if(x){const O=window.MotionHandoffAnimation(x,h,Pe);O!==null&&(m.startTime=O,b=!0)}}Sa(r,h),p.start(zr(h,p,f,r.shouldReduceMotion&&jr.has(h)?{type:!1}:m,r,b));const w=p.animation;w&&c.push(w)}return s&&Promise.all(c).then(()=>{Pe.update(()=>{s&&Ra(r,s)})}),c}function fo({top:r,left:t,right:e,bottom:n}){return{x:{min:t,max:e},y:{min:r,max:n}}}function mo(r,t){if(!t)return r;const e=t({x:r.left,y:r.top}),n=t({x:r.right,y:r.bottom});return{top:e.y,left:e.x,bottom:n.y,right:n.x}}function vo(r,t){return fo(mo(r.getBoundingClientRect(),t))}const Hr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},vn={};for(const r in Hr)vn[r]={isEnabled:t=>Hr[r].some(e=>!!t[e])};const Kr=()=>({min:0,max:0}),gn=()=>({x:Kr(),y:Kr()}),go=typeof window!="undefined",bn={current:null},Yr={current:!1};function bo(){if(Yr.current=!0,!!go)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),t=()=>bn.current=r.matches;r.addListener(t),t()}else bn.current=!1}function yo(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function _o(r){return typeof r=="string"||Array.isArray(r)}const Eo=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Wr(r){return yo(r.animate)||Eo.some(t=>_o(r[t]))}function Co(r){return!!(Wr(r)||r.variants)}function wo(r,t,e){for(const n in t){const a=t[n],i=e[n];if(ge(a))r.addValue(n,a);else if(ge(i))r.addValue(n,rt(a,{owner:r}));else if(i!==a)if(r.hasValue(n)){const s=r.getValue(n);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=r.getStaticValue(n);r.addValue(n,rt(s!==void 0?s:a,{owner:r}))}}for(const n in e)t[n]===void 0&&r.removeValue(n);return t}const Gr=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),$r=r=>/^0[^.\s]+$/u.test(r),Ao={test:r=>r==="auto",parse:r=>r},qr=r=>t=>t.test(r),Qr=[Ye,X,We,Le,Za,Xa,Ao],Xr=r=>Qr.find(qr(r)),To=[...Qr,fe,$e],Io=r=>To.find(qr(r)),xo=new Set(["brightness","contrast","saturate","opacity"]);function Oo(r){const[t,e]=r.slice(0,-1).split("(");if(t==="drop-shadow")return r;const[n]=e.match(Ht)||[];if(!n)return r;const a=e.replace(n,"");let i=xo.has(t)?1:0;return n!==e&&(i*=100),t+"("+i+a+")"}const No=/\b([a-z-]*)\(.*?\)/gu,yn=J(U({},$e),{getAnimatableNone:r=>{const t=r.match(No);return t?t.map(Oo).join(" "):r}}),Zr=J(U({},Ye),{transform:Math.round}),_n=J(U({borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,radius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,backgroundPositionX:X,backgroundPositionY:X},{rotate:Le,rotateX:Le,rotateY:Le,rotateZ:Le,scale:Tt,scaleX:Tt,scaleY:Tt,scaleZ:Tt,skew:Le,skewX:Le,skewY:Le,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:it,originX:rr,originY:rr,originZ:X}),{zIndex:Zr,fillOpacity:it,strokeOpacity:it,numOctaves:Zr}),Po=J(U({},_n),{color:fe,backgroundColor:fe,outlineColor:fe,fill:fe,stroke:fe,borderColor:fe,borderTopColor:fe,borderRightColor:fe,borderBottomColor:fe,borderLeftColor:fe,filter:yn,WebkitFilter:yn}),Jr=r=>Po[r];function ei(r,t){let e=Jr(r);return e!==yn&&(e=$e),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const ti=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ni{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ye.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Pe.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=s;this.latestValues=c,this.baseTarget=U({},c),this.initialValues=e.initial?U({},c):{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Wr(e),this.isVariantNode=Co(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const h=this.scrapeMotionValuesFromProps(e,{},this),{willChange:d}=h,u=Ae(h,["willChange"]);for(const p in u){const f=u[p];c[p]!==void 0&&ge(f)&&f.set(c[p],!1)}}mount(t){this.current=t,nt.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,n)=>this.bindToMotionValue(n,e)),Yr.current||bo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:bn.current,process.env.NODE_ENV!=="production"&&qn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Bt(this.notifyUpdate),Bt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ke.has(t);n&&this.onBindTransform&&this.onBindTransform();const a=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Pe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in vn){const e=vn[t];if(!e)continue;const{isEnabled:n,Feature:a}=e;if(!this.features[t]&&a&&n(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<ti.length;n++){const a=ti[n];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,s=t[i];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=wo(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&e!==void 0&&(n=rt(e===null?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var a;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(a=this.getBaseTargetFromProps(this.props,t))!=null?a:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Gr(n)||$r(n))?n=parseFloat(n):!Io(n)&&$e.test(e)&&(n=ei(t,e)),this.setBaseTarget(t,ge(n)?n.get():n)),ge(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var i;const{initial:e}=this.props;let n;if(typeof e=="string"||typeof e=="object"){const s=Gn(this.props,e,(i=this.presenceContext)==null?void 0:i.custom);s&&(n=s[t])}if(e&&n!==void 0)return n;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ge(a)?a:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new Qn),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const Lo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ro(r){const t=Lo.exec(r);if(!t)return[,];const[,e,n,a]=t;return[`--${e!=null?e:n}`,a]}const ko=4;function ri(r,t,e=1){Oe(e<=ko,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,a]=Ro(r);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const s=i.trim();return Gr(s)?parseFloat(s):s}return jt(a)?ri(a,t,e+1):a}function So(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||$r(r):!0}const Mo=new Set(["auto","none","0"]);function Do(r,t,e){let n=0,a;for(;n<r.length&&!a;){const i=r[n];typeof i=="string"&&!Mo.has(i)&&ot(i).values.length&&(a=r[n]),n++}if(a&&e)for(const i of t)r[i]=ei(e,a)}class Vo extends fn{constructor(t,e,n,a,i){super(t,e,n,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),jt(l))){const d=ri(l,e.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!jr.has(n)||t.length!==2)return;const[a,i]=t,s=Xr(a),o=Xr(i);if(s!==o)if(Lr(s)&&Lr(o))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else Ve[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let a=0;a<t.length;a++)(t[a]===null||So(t[a]))&&n.push(a);n.length&&Do(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ve[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const a=e[e.length-1];a!==void 0&&t.getValue(n,a).jump(a,!1)}measureEndState(){var o;const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const a=t.getValue(e);a&&a.jump(this.measuredOrigin,!1);const i=n.length-1,s=n[i];n[i]=Ve[e](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([c,l])=>{t.getValue(c).set(l)}),this.resolveNoneKeyframes()}}class ii extends ni{constructor(){super(...arguments),this.KeyframeResolver=Vo}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const ai=(r,t)=>t&&typeof r=="number"?t.transform(r):r,Fo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Uo=He.length;function Bo(r,t,e){let n="",a=!0;for(let i=0;i<Uo;i++){const s=He[i],o=r[s];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(s.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||e){const l=ai(o,_n[s]);if(!c){a=!1;const d=Fo[s]||s;n+=`${d}(${l}) `}e&&(t[s]=l)}}return n=n.trim(),e?n=e(t,a?"":n):a&&(n="none"),n}function si(r,t,e){const{style:n,vars:a,transformOrigin:i}=r;let s=!1,o=!1;for(const c in t){const l=t[c];if(Ke.has(c)){s=!0;continue}else if(tr(c)){a[c]=l;continue}else{const d=ai(l,_n[c]);c.startsWith("origin")?(o=!0,i[c]=d):n[c]=d}}if(t.transform||(s||e?n.transform=Bo(t,r.transform,e):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:d=0}=i;n.transformOrigin=`${c} ${l} ${d}`}}function oi(r,{style:t,vars:e},n,a){Object.assign(r.style,t,a&&a.getProjectionStyles(n));for(const i in e)r.style.setProperty(i,e[i])}const zo={};function jo(r,{layout:t,layoutId:e}){return Ke.has(r)||r.startsWith("origin")||(t||e!==void 0)&&(!!zo[r]||r==="opacity")}function ci(r,t,e){var i;const{style:n}=r,a={};for(const s in n)(ge(n[s])||t.style&&ge(t.style[s])||jo(s,r)||((i=e==null?void 0:e.getValue(s))==null?void 0:i.liveStyle)!==void 0)&&(a[s]=n[s]);return a}function Ho(r){return window.getComputedStyle(r)}class Ko extends ii{constructor(){super(...arguments),this.type="html",this.renderInstance=oi}readValueFromInstance(t,e){var n;if(Ke.has(e))return(n=this.projection)!=null&&n.isProjecting?ln(e):Bs(t,e);{const a=Ho(t),i=(tr(e)?a.getPropertyValue(e):a[e])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return vo(t,e)}build(t,e,n){si(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ci(t,e,n)}}function Yo(r,t){return r in t}class Wo extends ni{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(Yo(e,t)){const n=t[e];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return gn()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Go={offset:"stroke-dashoffset",array:"stroke-dasharray"},$o={offset:"strokeDashoffset",array:"strokeDasharray"};function qo(r,t,e=1,n=0,a=!0){r.pathLength=1;const i=a?Go:$o;r[i.offset]=X.transform(-n);const s=X.transform(t),o=X.transform(e);r[i.array]=`${s} ${o}`}function Qo(r,u,c,l,d){var h=u,{attrX:t,attrY:e,attrScale:n,pathLength:a,pathSpacing:i=1,pathOffset:s=0}=h,o=Ae(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var m,v;if(si(r,o,l),c){r.style.viewBox&&(r.attrs.viewBox=r.style.viewBox);return}r.attrs=r.style,r.style={};const{attrs:p,style:f}=r;p.transform&&(f.transform=p.transform,delete p.transform),(f.transform||p.transformOrigin)&&(f.transformOrigin=(m=p.transformOrigin)!=null?m:"50% 50%",delete p.transformOrigin),f.transform&&(f.transformBox=(v=d==null?void 0:d.transformBox)!=null?v:"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),e!==void 0&&(p.y=e),n!==void 0&&(p.scale=n),a!==void 0&&qo(p,a,i,s,!1)}const li=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Xo=r=>typeof r=="string"&&r.toLowerCase()==="svg";function Zo(r,t,e,n){oi(r,t,void 0,n);for(const a in t.attrs)r.setAttribute(li.has(a)?a:zt(a),t.attrs[a])}function Jo(r,t,e){const n=ci(r,t,e);for(const a in r)if(ge(r[a])||ge(t[a])){const i=He.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;n[i]=r[a]}return n}class ec extends ii{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ke.has(e)){const n=Jr(e);return n&&n.default||0}return e=li.has(e)?e:zt(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Jo(t,e,n)}build(t,e,n){Qo(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,a){Zo(t,e,n,a)}mount(t){this.isSVGTag=Xo(t.tagName),super.mount(t)}}function di(r){return Br(r)&&"ownerSVGElement"in r}function tc(r){return di(r)&&r.tagName==="svg"}function nc(r){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=di(r)&&!tc(r)?new ec(t):new Ko(t);e.mount(r),nt.set(r,e)}function rc(r){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new Wo(t);e.mount(r),nt.set(r,e)}function ic(r,t,e){const n=ge(r)?r:rt(r);return n.start(zr("",n,t,e)),n.animation}function ac(r,t){return ge(r)||typeof r=="number"||typeof r=="string"&&!Dt(t)}function ui(r,t,e,n){const a=[];if(ac(r,t))a.push(ic(r,Dt(t)&&t.default||t,e&&(e.default||e)));else{const i=Dn(r,t,n),s=i.length;Oe(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const c=i[o],l=c instanceof Element?nc:rc;nt.has(c)||l(c);const d=nt.get(c),u=U({},e);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),a.push(...ho(d,J(U({},t),{transition:u}),{}))}}return a}function sc(r,t,e){const n=[];return ga(r,t,e,{spring:ct}).forEach(({keyframes:i,transition:s},o)=>{n.push(...ui(o,i,s))}),n}class oc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(n=>n.attachTimeline(t));return()=>{e.forEach((n,a)=>{n&&n(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class cc extends oc{then(t,e){return this.finished.finally(t).then(()=>{})}}function lc(r){return Array.isArray(r)&&r.some(Array.isArray)}function dc(r){function t(e,n,a){let i=[];return lc(e)?i=sc(e,n,r):i=ui(e,n,a,r),new cc(i)}return t}const pe=dc(),ie={spinner:"_spinner_1lif3_1",spinnerContainer:"_spinnerContainer_1lif3_5",success:"_success_1lif3_9",successContainer:"_successContainer_1lif3_14",container:"_container_1lif3_57",card:"_card_1lif3_66",warning:"_warning_1lif3_75",svg:"_svg_1lif3_83",srOnly:"_srOnly_1lif3_88",backButton:"_backButton_1lif3_92"};function ae(r,t){if(!t)return;const e=t.trim().split(/\s+/).filter(n=>n.length>0);r.classList.add(...e)}class pi{constructor(){A(this,"template",`
1
+ (function(ne,re){typeof exports=="object"&&typeof module!="undefined"?re(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],re):(ne=typeof globalThis!="undefined"?globalThis:ne||self,re(ne["PayNext SDK"]={},ne.React))})(this,function(ne,re){"use strict";var Ul=Object.defineProperty,Bl=Object.defineProperties;var zl=Object.getOwnPropertyDescriptors;var Mt=Object.getOwnPropertySymbols;var Ki=Object.prototype.hasOwnProperty,Wi=Object.prototype.propertyIsEnumerable;var Rn=(ne,re,se)=>re in ne?Ul(ne,re,{enumerable:!0,configurable:!0,writable:!0,value:se}):ne[re]=se,U=(ne,re)=>{for(var se in re||(re={}))Ki.call(re,se)&&Rn(ne,se,re[se]);if(Mt)for(var se of Mt(re))Wi.call(re,se)&&Rn(ne,se,re[se]);return ne},J=(ne,re)=>Bl(ne,zl(re));var Ae=(ne,re)=>{var se={};for(var ve in ne)Ki.call(ne,ve)&&re.indexOf(ve)<0&&(se[ve]=ne[ve]);if(ne!=null&&Mt)for(var ve of Mt(ne))re.indexOf(ve)<0&&Wi.call(ne,ve)&&(se[ve]=ne[ve]);return se};var A=(ne,re,se)=>Rn(ne,typeof re!="symbol"?re+"":re,se);var K=(ne,re,se)=>new Promise((ve,yt)=>{var G=Te=>{try{Re(se.next(Te))}catch(ke){yt(ke)}},Je=Te=>{try{Re(se.throw(Te))}catch(ke){yt(ke)}},Re=Te=>Te.done?ve(Te.value):Promise.resolve(Te.value).then(G,Je);Re((se=se.apply(ne,re)).next())});var se=document.createElement("style");se.textContent=`._spinner_1lif3_1{height:100%;width:100%}@keyframes _spin_1lif3_1{to{transform:rotate(360deg)}}._spinner_1lif3_1{animation:_spin_1lif3_1 1s linear infinite;fill:#9ca3af;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}._spinner_1lif3_1:is(._dark_1lif3_1 *){fill:#d1d5db;--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}._spinnerContainer_1lif3_5{height:40px;width:40px}._success_1lif3_9{position:absolute;top:50%;left:50%;height:3.5rem;width:3.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));fill:#0d776e;z-index:3}._successContainer_1lif3_14{position:relative;display:grid;height:5rem;width:5rem;flex:none;place-items:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(232 250 240 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14:is(._dark_1lif3_1 *){--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14{z-index:0;animation:_containerPulse_1lif3_1 3s ease-in-out infinite}._successContainer_1lif3_14:before,._successContainer_1lif3_14:after{content:"";position:absolute;inset:0;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14:is(._dark_1lif3_1 *):before,._successContainer_1lif3_14:is(._dark_1lif3_1 *):after{--tw-bg-opacity: 1;background-color:rgb(167 233 193 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14:before,._successContainer_1lif3_14:after{animation:_ripplePulse_1lif3_1 3s cubic-bezier(.4,0,.6,1) infinite;opacity:0;z-index:1}._successContainer_1lif3_14:after{animation-delay:.5s}@keyframes _containerPulse_1lif3_1{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}@keyframes _ripplePulse_1lif3_1{0%{transform:scale(1);opacity:0}10%{transform:scale(1);opacity:.7}to{transform:scale(1.3);opacity:0}}._container_1lif3_57{width:30px;height:20px;display:flex;margin:0 1px;align-items:center;justify-content:center}._card_1lif3_66{width:28px;height:19px;display:flex;margin:0 1px;align-items:center;justify-content:center}._warning_1lif3_75{width:16px;height:16px;display:flex;align-items:center;justify-content:center}._svg_1lif3_83{width:100%;height:100%}._srOnly_1lif3_88{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}._backButton_1lif3_92{width:30px;height:30px;display:flex;margin:0 1px;align-items:center;justify-content:center;background-color:#f4f4f5;border-radius:8px}._loader_nwq3e_1{position:absolute;height:100%;top:0;left:0;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);z-index:1000;display:flex;width:100%;align-items:center;justify-content:center;border-radius:10px}._checkout_15zm1_1{padding:0 4px;overflow:hidden;z-index:0;position:relative;height:auto;min-height:60px;width:100%;max-width:640px}._hidden_15zm1_8{display:none!important}._formInitial_15zm1_12{opacity:0;transform:translateY(100px)}._cardForm_15zm1_17{opacity:1}._btnsInitial_15zm1_21{opacity:0;transform:translateY(-100px)}._buttons_qc8am_1{display:flex;flex-direction:column;gap:8px;opacity:1}._hidden_qc8am_8{display:none!important}._skeleton_qc8am_12{overflow:hidden;width:100%;height:40px;border-radius:12px;background:linear-gradient(90deg,#f0f0f0,#e0e0e0 20%,#f0f0f0 40% 100%);background-size:200% 100%;animation:_shimmer_qc8am_1 2s infinite}@keyframes _shimmer_qc8am_1{0%{background-position:-200% 0}to{background-position:200% 0}}._applePay_1wlwu_1{display:flex;flex-direction:column;gap:8px}@media (hover: hover){._applePay_1wlwu_1:hover{filter:contrast(.575) brightness(1.2)}}._hidden_1wlwu_13{display:none!important}._googlePay_17y0j_1{position:relative;display:flex;overflow:hidden;height:40px;border-radius:12px}._googlePay_17y0j_1 iframe{position:absolute;top:-1px;left:-1px;width:calc(100% + 2px)!important;height:calc(100% + 2px)!important;border:none;display:block}._hidden_17y0j_19{display:none!important}._paypal_iyh6g_1{display:flex;flex-direction:column;gap:8px}._hidden_iyh6g_7{display:none}._button_1trim_1{transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(13 118 110 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:1.5rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_1trim_1{transition-property:none}}._button_1trim_1 span{margin-left:.25rem}@media (hover: hover){._button_1trim_1:hover{opacity:.7}}._container_10ziz_2{display:flex;flex-direction:column;gap:.5rem}._venmo_10ziz_8{display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:12px;height:40px;background-color:#0088f7;width:100%;color:#fff;font-size:16px;text-align:center;cursor:pointer;transition:background-color .3s ease;svg{height:40%}@media (hover: hover){&:hover{background-color:#5683c1}}}._hidden_10ziz_35{display:none}._button_125my_1{cursor:pointer}._button_1d7ly_1{margin-top:8px;transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(13 118 110 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_1d7ly_1{transition-property:none}}._button_1d7ly_1 span{margin-left:.25rem}._disabled_1d7ly_18{opacity:.7}@media (hover: hover){._button_1d7ly_1:hover{opacity:.7}}._hidden_1d7ly_28{display:none!important}._spinner_1d7ly_32{width:24px;height:24px}._cardForm_1uc4x_1{position:relative;display:grid;min-height:250px;gap:.75rem;padding-top:0;opacity:1}._hidden_1uc4x_6{display:none!important}._topOffset_1uc4x_10{margin-top:.5rem}._wrapper_1xw0g_1{position:relative}._inputContainer_1xw0g_5{background-color:transparent;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;padding-left:.75rem;padding-right:.75rem}._inputContainer_1xw0g_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xw0g_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xw0g_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_1xw0g_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_1xw0g_12{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._inputContainer_1xw0g_5:focus-within:not(._disabled_1xw0g_23){box-shadow:0 0 0 1px #0d766eb3,0 1px 1px #00000012,0 0 0 4px #0d766e4d}._input_1xw0g_5{display:block;width:100%;height:100%;border:none;font-size:1rem;font-weight:400;outline:none;background-color:transparent;color:#1a1a1ae6}._endContent_1xw0g_39{display:flex}._errorInput_1xw0g_18{box-shadow:0 0 0 1px #dc2727,0 2px 4px #00000012,0 1px 1.5px #0000000d}._error_1xw0g_18{margin-top:4px;margin-bottom:0;padding-left:4px;font-size:12px;font-weight:400;color:#ef4444}._label_1xw0g_56{margin-bottom:3px;display:flex;justify-content:space-between;padding-left:1px;padding-right:2px;font-size:12px;font-weight:500;color:#1a1a1ab2}._labelError_1xw0g_67{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_1xw0g_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_1xw0g_75{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_1xw0g_82{display:none!important}._wrapper_41zd2_1{position:relative}._inputContainer_41zd2_5{background-color:transparent;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;padding-left:.75rem;padding-right:.75rem}._inputContainer_41zd2_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_41zd2_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_41zd2_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_41zd2_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_41zd2_12{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._inputContainer_41zd2_5:focus-within:not(._disabled_41zd2_23){box-shadow:0 0 0 1px #0d766eb3,0 1px 1px #00000012,0 0 0 4px #0d766e4d}._input_41zd2_5{display:block;width:100%;height:100%;border:none;font-size:1rem;font-weight:400;outline:none;background-color:transparent;color:#1a1a1ae6}._endContent_41zd2_39{display:flex}._errorInput_41zd2_18{box-shadow:0 0 0 1px #dc2727,0 2px 4px #00000012,0 1px 1.5px #0000000d}._error_41zd2_18{margin-top:4px;margin-bottom:0;padding-left:4px;font-size:12px;font-weight:400;color:#ef4444}._label_41zd2_56{margin-bottom:3px;display:flex;justify-content:space-between;padding-left:1px;padding-right:2px;font-size:12px;font-weight:500;color:#1a1a1ab2}._labelError_41zd2_67{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_41zd2_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_41zd2_75{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_41zd2_82{display:none!important}._securityContent_41zd2_86{display:grid;grid-column-gap:6px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,auto))}._container_79xkl_1{display:flex;min-height:292px;width:100%;flex-direction:column;align-items:center;justify-content:center}._title_79xkl_5{margin-top:.5rem;font-weight:300}._container_g3abj_1{border-radius:12px;margin-top:.5rem;display:flex;width:100%;flex-grow:1;flex-direction:row;align-items:flex-start;justify-content:flex-start;-moz-column-gap:.25rem;column-gap:.25rem;--tw-bg-opacity: 1;background-color:rgb(254 231 239 / var(--tw-bg-opacity, 1));padding:.75rem 1rem}._container_g3abj_1:is(._dark_g3abj_1 *){background-color:#fee7ef80;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}._container_g3abj_1 svg{margin-top:2px;width:16px;height:16px}._title_g3abj_12{padding:0;padding-left:.25rem;font-size:.875rem;line-height:1.25rem;font-weight:300;--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}._title_g3abj_12:is(._dark_g3abj_1 *){--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}
2
+ /*$vite$:1*/`,document.head.appendChild(se);function ve(r,t){for(var e=0;e<t.length;e++){const n=t[e];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in r)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(r,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}class yt{constructor(t){A(this,"parent");A(this,"core");typeof window!="undefined"&&(this.parent=t)}mount(t){return K(this,null,function*(){if(!this.parent)return;if(!this.core){const a=(yield Promise.resolve().then(()=>_l)).Core;this.core=new a}t.styles&&this.core.state.styles.setState(t.styles),this.core.state.checkout.setState({clientToken:t.clientToken,environment:t.environment,apiVersion:t.apiVersion,errorMessageText:t.errorMessageText});const e=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(e),this.core.state.checkout.setState(t)})}unmount(){return K(this,null,function*(){!this.parent||!this.core||(this.parent.innerHTML="",this.core.clearState())})}}var G=(r=>(r.PAYPAL="PAYPAL",r.APPLE_PAY="APPLEPAY",r.GOOGLE_PAY="GPAY",r.CARD="CARD",r.VENMO="VENMO",r))(G||{}),Je=(r=>(r.PENDING="PENDING",r.FAILED="FAILED",r.AUTHORIZED="AUTHORIZED",r.SETTLING="SETTLING",r.SETTLED="SETTLED",r.DECLINED="DECLINED",r.CANCELLED="CANCELLED",r))(Je||{}),Re=(r=>(r.INSUFFICIENT_FUNDS="insufficient_funds",r.AUTHENTICATION_REQUIRED="authentication_required",r.CARD_ISSUER_DECLINE="card_issuer_decline",r.GENERIC_DECLINE="generic_decline",r.WITHDRAWAL_LIMIT_EXCEEDED="withdrawal_limit_exceeded",r.DO_NOT_HONOR="do_not_honor",r.EXPIRED_CARD="expired_card",r.SUSPECTED_FRAUD="suspected_fraud",r.INCORRECT_CVC="incorrect_cvc",r.INVALID_CARD_NUMBER="invalid_card_number",r.ISSUER_UNAVAILABLE="issuer_unavailable",r.CARD_LOST_OR_STOLEN="card_lost_or_stolen",r.CARD_DECLINED="card_declined",r))(Re||{});const Te={appIds:{develop:"app_00b96c0c3011",staging:"app_00396c84ac2b",sandbox:"app_03b1ea2b6dfa",production:"app_409cf462b6cc"},teamId:"team_f20c9e679d47"},ke=(r="sandbox")=>({develop:"https://dev-api.paynext.com",staging:"https://staging-api.paynext.com",sandbox:"https://sandbox-api.paynext.com",production:"https://api.paynext.com"})[r],Yi=[{type:G.PAYPAL,order:1,is_active:!0},{type:G.APPLE_PAY,order:2,is_active:!0},{type:G.GOOGLE_PAY,order:3,is_active:!0},{type:G.CARD,order:4,is_active:!0}],Gi=r=>r.googlePay?G.GOOGLE_PAY:r.applePay?G.APPLE_PAY:r.paypal?G.PAYPAL:r.braintree?G.VENMO:G.CARD,$i=r=>{const t=r.card;if(t)return{bin:t.firstSixDigits,bin_data:{brand:t.cardBrand,country:t.country,currency_code:t.currency,funding:t.funding,issuer:t.issuer,type:t.type},cvc:t.cvc,exp_month:Number(t.expMonth),exp_year:Number(t.expYear),last4:t.lastFourDigits,number:t.number}},qi=r=>{var e;const t=r.paypal;if((e=t==null?void 0:t.billing_agreement_token)!=null&&e.paypalId)return{billing_agreement_token:t.billing_agreement_token.paypalId}},Qi=r=>{var e,n,a,i,s,o,c,l,d,u,h,p,f,m,v,b,C,x;const t=r.googlePay;if(t!=null&&t.token)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(n=(e=t.card)==null?void 0:e.expiry)!=null&&n.month||(i=(a=t.token)==null?void 0:a.expiry)!=null&&i.month?Number(((o=(s=t.card)==null?void 0:s.expiry)==null?void 0:o.month)||((l=(c=t.token)==null?void 0:c.expiry)==null?void 0:l.month)):void 0,exp_year:(u=(d=t.card)==null?void 0:d.expiry)!=null&&u.year||(p=(h=t.token)==null?void 0:h.expiry)!=null&&p.year?Number(((m=(f=t.card)==null?void 0:f.expiry)==null?void 0:m.year)||((b=(v=t.token)==null?void 0:v.expiry)==null?void 0:b.year)):void 0,token:(C=t.token)==null?void 0:C.number,token_service_provider:(x=t.token)==null?void 0:x.tokenServiceProvider}},Xi=r=>{var e,n,a,i,s,o;const t=r.applePay;if(t)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(n=(e=t.networkToken)==null?void 0:e.expiry)!=null&&n.month?Number(t.networkToken.expiry.month):void 0,exp_year:(i=(a=t.networkToken)==null?void 0:a.expiry)!=null&&i.year?Number(t.networkToken.expiry.year):void 0,token:(s=t.networkToken)==null?void 0:s.number,token_service_provider:(o=t.networkToken)==null?void 0:o.tokenServiceProvider}},Zi=r=>{const t=r.braintree;if(t)return{payment_method_nonce:t.nonce}},kn=r=>{var n,a,i,s,o,c,l,d,u,h,p,f,m,v;const{applePay:t,googlePay:e}=r;if(!(!t&&!e))return{city:((n=t==null?void 0:t.billingContact)==null?void 0:n.locality)||((a=e==null?void 0:e.billingAddress)==null?void 0:a.locality)||void 0,country:((i=t==null?void 0:t.billingContact)==null?void 0:i.countryCode)||((s=e==null?void 0:e.billingAddress)==null?void 0:s.countryCode)||void 0,line1:((c=(o=t==null?void 0:t.billingContact)==null?void 0:o.addressLines)==null?void 0:c.at(0))||((l=e==null?void 0:e.billingAddress)==null?void 0:l.address1)||void 0,line2:((u=(d=t==null?void 0:t.billingContact)==null?void 0:d.addressLines)==null?void 0:u.at(1))||((h=e==null?void 0:e.billingAddress)==null?void 0:h.address2)||void 0,postal_code:((p=t==null?void 0:t.billingContact)==null?void 0:p.postalCode)||((f=e==null?void 0:e.billingAddress)==null?void 0:f.postalCode)||void 0,state:((m=t==null?void 0:t.billingContact)==null?void 0:m.administrativeArea)||((v=e==null?void 0:e.billingAddress)==null?void 0:v.administrativeArea)||void 0}},Sn=r=>{var a,i,s,o,c,l,d,u,h,p,f,m,v,b,C,x,N,I,L,O,k,B,W;const{card:t,googlePay:e,applePay:n}=r;if(!(!t&&!(e!=null&&e.card)&&!(n!=null&&n.card)))return{bin:t==null?void 0:t.firstSixDigits,bin_data:{brand:(t==null?void 0:t.cardBrand)||((a=e==null?void 0:e.card)==null?void 0:a.brand)||((i=n==null?void 0:n.card)==null?void 0:i.brand),country:(t==null?void 0:t.country)||((s=e==null?void 0:e.card)==null?void 0:s.country)||((o=n==null?void 0:n.card)==null?void 0:o.country),currency_code:(t==null?void 0:t.currency)||((c=e==null?void 0:e.card)==null?void 0:c.currency)||((l=n==null?void 0:n.card)==null?void 0:l.currency),funding:(t==null?void 0:t.funding)||((d=e==null?void 0:e.card)==null?void 0:d.funding)||((u=n==null?void 0:n.card)==null?void 0:u.funding),issuer:(t==null?void 0:t.issuer)||((h=e==null?void 0:e.card)==null?void 0:h.issuer)||((p=n==null?void 0:n.card)==null?void 0:p.issuer),type:(t==null?void 0:t.type)||((f=e==null?void 0:e.card)==null?void 0:f.segment)||((m=n==null?void 0:n.card)==null?void 0:m.segment)},cvc:t==null?void 0:t.cvc,exp_month:t!=null&&t.expMonth||(b=(v=e==null?void 0:e.card)==null?void 0:v.expiry)!=null&&b.month?Number((t==null?void 0:t.expMonth)||((x=(C=e==null?void 0:e.card)==null?void 0:C.expiry)==null?void 0:x.month)):void 0,exp_year:t!=null&&t.expYear||(I=(N=e==null?void 0:e.card)==null?void 0:N.expiry)!=null&&I.year?Number((t==null?void 0:t.expYear)||((O=(L=e==null?void 0:e.card)==null?void 0:L.expiry)==null?void 0:O.year)):void 0,last4:(t==null?void 0:t.lastFourDigits)||((k=e==null?void 0:e.card)==null?void 0:k.lastFour)||((B=n==null?void 0:n.card)==null?void 0:B.lastFour),number:(t==null?void 0:t.number)||((W=e==null?void 0:e.card)==null?void 0:W.number)}},Mn=r=>{var n,a;const{applePay:t,card:e}=r;return(n=t==null?void 0:t.billingContact)!=null&&n.givenName?`${t.billingContact.givenName} ${t.billingContact.familyName||""}`.trim():(a=e==null?void 0:e.metadata)==null?void 0:a.name},Ji=r=>{var n,a,i,s,o,c,l,d;const t=Gi(r),e={client_session:r.clientSession,three_ds_session_id:r.threeDsSessionId,type:t};switch(t){case G.CARD:return J(U({},e),{name:Mn(r),card:$i(r)});case G.PAYPAL:return J(U({},e),{paypal:qi(r)});case G.GOOGLE_PAY:return J(U({},e),{name:(a=(n=r.googlePay)==null?void 0:n.billingAddress)==null?void 0:a.name,phone:(c=(o=(s=(i=r.googlePay)==null?void 0:i.billingAddress)==null?void 0:s.phoneNumber)==null?void 0:o.replace(/ /g,""))==null?void 0:c.replace(/-/g,""),card:Sn(r),google_pay:Qi(r),billing_address:kn(r)});case G.APPLE_PAY:return J(U({},e),{name:Mn(r),card:Sn(r),apple_pay:Xi(r),phone:(d=(l=r.applePay)==null?void 0:l.shippingContact)==null?void 0:d.phoneNumber,billing_address:kn(r)});case G.VENMO:return J(U({},e),{venmo:Zi(r)});default:throw new Error(`Unsupported payment method: ${t}`)}},ea=(r,t,e)=>K(this,null,function*(){const n=`${ke(t)}/payments/create`,a=new Headers;a.append("Content-Type","application/json"),a.append("X-API-Version",e);const i=Ji(r);return yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify(i)})).json()}),ta=(r,t,e)=>K(this,null,function*(){const n=`${ke(t)}/payments/create/billing/agreement`,a=new Headers;return a.append("Content-Type","application/json"),a.append("X-API-Version",e),(yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify({client_session:r})})).json()).paypal_agreement_token_response.token_id||""}),na=(r,t,e)=>K(this,null,function*(){const n=new Headers;n.append("X-API-Version",e);const a=`${ke(t)}/payments/config?client_session_id=${r}`,s=yield(yield fetch(a,{headers:n})).json();return s.checkout_config||(s.checkout_config=Yi),s});let ra=class{constructor(t){A(this,"apple",null);A(this,"isAvailable",!0);A(this,"onReady");this.ev=t}init(l,d){return K(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:s,onPaymentAttempt:o},c){const u=this.ev.transactions.create(t);this.apple=this.ev.ui.applePay(u,J(U({locale:e,borderRadius:12,size:{width:"100%",height:"40px"}},c==null?void 0:c.styles),{allowedCardNetworks:["visa","masterCard"],requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(f,m)=>K(this,[f,m],function*(h,{fail:p}){o==null||o({paymentMethod:G.APPLE_PAY});try{i==null||i(h)}catch(v){console.error(v),p({message:"Cannot pay with payment credentials"})}})})),a&&this.apple.on("error",a),s&&this.apple.on("cancel",s),this.onReady=n})}render(t){return K(this,null,function*(){var e;if(!(!this.apple||!this.isAvailable)){t.innerHTML="";try{yield this.apple.mount(t),(e=this.onReady)==null||e.call(this)}catch(n){throw console.error(n),new Error(n instanceof Error?n.message:"Failed to render Apple Pay button")}}})}},ia=class{constructor(t){A(this,"google",null);this.ev=t}init(l,d){return K(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:s,onPaymentAttempt:o},c){const u=this.ev.transactions.create(t);this.google=this.ev.ui.googlePay(u,J(U({locale:e,size:{width:"100%",height:40},borderRadius:12,billingAddress:{phoneNumber:!0}},c==null?void 0:c.styles),{allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["VISA","MASTERCARD"],process:(f,m)=>K(this,[f,m],function*(h,{fail:p}){o==null||o({paymentMethod:G.GOOGLE_PAY});try{i==null||i(h)}catch(v){console.error(v),p({message:"Cannot pay with payment credentials"})}})})),s&&this.google.on("cancel",s),n&&this.google.on("ready",n),a&&this.google.on("error",a)})}render(t){return K(this,null,function*(){this.google&&(t.innerHTML="",this.google.mount(t))})}};class ue{constructor(){A(this,"listeners",[])}removeListener(t){this.listeners=this.listeners.filter(e=>e!==t)}addListener(t){return this.listeners.push(t),()=>this.removeListener(t)}emit(t){for(const e of this.listeners)e(t)}clear(){this.listeners=[]}}class aa{constructor(t){A(this,"threeDs",null);this.ev=t}init(i){return K(this,arguments,function*({threeDsId:t,onReady:e,onSuccess:n,onError:a}){this.threeDs=this.ev.ui.threeDSecure(t),this.threeDs.on("ready",()=>e==null?void 0:e()),this.threeDs.on("success",()=>n==null?void 0:n()),this.threeDs.on("failure",()=>a==null?void 0:a()),this.threeDs.on("error",()=>a==null?void 0:a())})}render(t){return K(this,null,function*(){this.threeDs&&this.threeDs.mount(t)})}}class sa{constructor(){A(this,"isReady",!1);A(this,"ev",null);A(this,"apple",null);A(this,"google",null);A(this,"threeDs",null);A(this,"events",{ready:new ue})}isShouldLoad({teamId:t,appId:e}){var n,a;return((n=this.ev)==null?void 0:n.config.appId)!==e||((a=this.ev)==null?void 0:a.config.teamId)!==t}preloadEvervault(t){return K(this,null,function*(){if(!this.isShouldLoad(t))return;if(typeof window=="undefined")throw new Error("Evervault can only be initialized in browser environment");this.isReady=!1;const{loadEvervault:e}=yield Promise.resolve().then(()=>wl);this.ev=yield e(t.teamId,t.appId)})}initEv(t){return K(this,null,function*(){this.ev||(yield this.preloadEvervault(t)),this.apple=new ra(this.ev),this.google=new ia(this.ev),this.events.ready.emit(),this.isReady=!0})}initThreeDs(t){return K(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new aa(this.ev),yield this.threeDs.init(t),yield this.threeDs.render()})}initApple(t,e){return K(this,null,function*(){if(!this.apple)throw new Error("Evervault should be init before using Apple Pay");yield this.apple.init(t,e)})}initGoogle(t,e){return K(this,null,function*(){if(!this.google)throw new Error("Evervault should be init before using Google Pay");yield this.google.init(t,e)})}isAppleAvailable(){var t;return!!((t=this.apple)!=null&&t.isAvailable)}addEventListener(t,e){return this.events[t].addListener(e)}renderApple(t){return K(this,null,function*(){var e;return(e=this.apple)==null?void 0:e.render(t)})}renderGoogle(t){return K(this,null,function*(){var e;return(e=this.google)==null?void 0:e.render(t)})}getEv(){if(!this.ev)throw new Error("Evervault should be init before getting instance");return this.ev}}function Dt(r){return typeof r=="object"&&!Array.isArray(r)}function oa(r,t,e){var n;if(r instanceof EventTarget)return[r];if(typeof r=="string"){let a=document;const i=(n=e==null?void 0:e[r])!=null?n:a.querySelectorAll(r);return i?Array.from(i):[]}return Array.from(r)}function Dn(r,t,e,n){return typeof r=="string"&&Dt(t)?oa(r,e,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function ca(r,t,e){return r*(t+1)}function Vn(r,t,e,n){var a;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,r+parseFloat(t)):t==="<"?e:(a=n.get(t))!=null?a:r}const et=(r,t,e)=>r+(t-r)*e,la=(r,t,e)=>{const n=t-r;return((e-r)%n+n)%n+r},Fn=r=>Array.isArray(r)&&typeof r[0]!="number";function Un(r,t){return Fn(r)?r[la(0,r.length,t)]:r}function da(r,t){r.indexOf(t)===-1&&r.push(t)}function Bn(r,t){const e=r.indexOf(t);e>-1&&r.splice(e,1)}function ua(r,t,e){for(let n=0;n<r.length;n++){const a=r[n];a.at>t&&a.at<e&&(Bn(r,a),n--)}}function pa(r,t,e,n,a,i){ua(r,a,i);for(let s=0;s<t.length;s++)r.push({value:t[s],at:et(a,i,n[s]),easing:Un(e,s)})}function ha(r,t){for(let e=0;e<r.length;e++)r[e]=r[e]/(t+1)}function fa(r,t){return r.at===t.at?r.value===null?1:t.value===null?-1:0:r.at-t.at}const ge=r=>!!(r&&r.getVelocity),Vt=(r,t,e)=>{const n=t-r;return n===0?1:(e-r)/n};function zn(r,t){const e=r[r.length-1];for(let n=1;n<=t;n++){const a=Vt(0,t,n);r.push(et(e,1,a))}}function jn(r){const t=[0];return zn(t,r.length-1),t}function Ft(r){return typeof r=="function"&&"applyToOptions"in r}const _t=2e4;function Ut(r){let t=0;const e=50;let n=r.next(t);for(;!n.done&&t<_t;)t+=e,n=r.next(t);return t>=_t?1/0:t}const Ce=r=>r*1e3,xe=r=>r/1e3;function Hn(r,t=100,e){const n=e(J(U({},r),{keyframes:[0,t]})),a=Math.min(Ut(n),_t);return{type:"keyframes",ease:i=>n.next(a*i).value/t,duration:xe(a)}}let tt=()=>{},Oe=()=>{};process.env.NODE_ENV!=="production"&&(tt=(r,t)=>{!r&&typeof console!="undefined"&&console.warn(t)},Oe=(r,t)=>{if(!r)throw new Error(t)});const ma="easeInOut",va=20;function ga(r,i={},n,a){var s=i,{defaultTransition:t={}}=s,e=Ae(s,["defaultTransition"]);const o=t.duration||.3,c=new Map,l=new Map,d={},u=new Map;let h=0,p=0,f=0;for(let m=0;m<r.length;m++){const v=r[m];if(typeof v=="string"){u.set(v,p);continue}else if(!Array.isArray(v)){u.set(v.name,Vn(p,v.at,h,u));continue}let[b,C,x={}]=v;x.at!==void 0&&(p=Vn(p,x.at,h,u));let N=0;const I=(L,O,k,B=0,W=0)=>{const $=ba(L),D=O,{delay:F=0,times:j=jn($),type:H="keyframes",repeat:ee,repeatType:M,repeatDelay:q=0}=D,Y=Ae(D,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:E=t.ease||"easeOut",duration:g}=O;const R=typeof F=="function"?F(B,W):F,V=$.length,y=Ft(H)?H:a==null?void 0:a[H];if(V<=2&&y){let w=100;if(V===2&&Ea($)){const le=$[1]-$[0];w=Math.abs(le)}const z=U({},Y);g!==void 0&&(z.duration=Ce(g));const Z=Hn(z,w,y);E=Z.ease,g=Z.duration}g!=null||(g=o);const T=p+R;j.length===1&&j[0]===0&&(j[1]=1);const _=j.length-$.length;if(_>0&&zn(j,_),$.length===1&&$.unshift(null),ee){Oe(ee<va,"Repeat count too high, must be less than 20"),g=ca(g,ee);const w=[...$],z=[...j];E=Array.isArray(E)?[...E]:[E];const Z=[...E];for(let le=0;le<ee;le++){$.push(...w);for(let S=0;S<w.length;S++)j.push(z[S]+(le+1)),E.push(S===0?"linear":Un(Z,S-1))}ha(j,ee)}const P=T+g;pa(k,$,E,j,T,P),N=Math.max(R+g,N),f=Math.max(P,f)};if(ge(b)){const L=Kn(b,l);I(C,x,Wn("default",L))}else{const L=Dn(b,C,n,d),O=L.length;for(let k=0;k<O;k++){C=C,x=x;const B=L[k],W=Kn(B,l);for(const $ in C)I(C[$],ya(x,$),Wn($,W),k,O)}}h=p,p+=N}return l.forEach((m,v)=>{for(const b in m){const C=m[b];C.sort(fa);const x=[],N=[],I=[];for(let O=0;O<C.length;O++){const{at:k,value:B,easing:W}=C[O];x.push(B),N.push(Vt(0,f,k)),I.push(W||"easeOut")}N[0]!==0&&(N.unshift(0),x.unshift(x[0]),I.unshift(ma)),N[N.length-1]!==1&&(N.push(1),x.push(null)),c.has(v)||c.set(v,{keyframes:{},transition:{}});const L=c.get(v);L.keyframes[b]=x,L.transition[b]=U(J(U({},t),{duration:f,ease:I,times:N}),e)}}),c}function Kn(r,t){return!t.has(r)&&t.set(r,{}),t.get(r)}function Wn(r,t){return t[r]||(t[r]=[]),t[r]}function ba(r){return Array.isArray(r)?r:[r]}function ya(r,t){return r&&r[t]?U(U({},r),r[t]):U({},r)}const _a=r=>typeof r=="number",Ea=r=>r.every(_a),nt=new WeakMap,Ca=r=>Array.isArray(r);function Yn(r){const t=[{},{}];return r==null||r.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Gn(r,t,e,n){if(typeof t=="function"){const[a,i]=Yn(n);t=t(e!==void 0?e:r.custom,a,i)}if(typeof t=="string"&&(t=r.variants&&r.variants[t]),typeof t=="function"){const[a,i]=Yn(n);t=t(e!==void 0?e:r.custom,a,i)}return t}function wa(r,t,e){const n=r.getProps();return Gn(n,t,n.custom,r)}const Et=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Aa(r,t){let e=new Set,n=new Set,a=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(d){s.has(d)&&(l.schedule(d),r()),d(o)}const l={schedule:(d,u=!1,h=!1)=>{const f=h&&a?e:n;return u&&s.add(d),f.has(d)||f.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(o=d,a){i=!0;return}a=!0,[e,n]=[n,e],e.forEach(c),e.clear(),a=!1,i&&(i=!1,l.process(d))}};return l}const Ne={},Ta=40;function Ia(r,t){let e=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>e=!0,s=Et.reduce((x,N)=>(x[N]=Aa(i),x),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:d,update:u,preRender:h,render:p,postRender:f}=s,m=()=>{const x=Ne.useManualTiming?a.timestamp:performance.now();e=!1,Ne.useManualTiming||(a.delta=n?1e3/60:Math.max(Math.min(x-a.timestamp,Ta),1)),a.timestamp=x,a.isProcessing=!0,o.process(a),c.process(a),l.process(a),d.process(a),u.process(a),h.process(a),p.process(a),f.process(a),a.isProcessing=!1,e&&t&&(n=!1,r(m))},v=()=>{e=!0,n=!0,a.isProcessing||r(m)};return{schedule:Et.reduce((x,N)=>{const I=s[N];return x[N]=(L,O=!1,k=!1)=>(e||v(),I.schedule(L,O,k)),x},{}),cancel:x=>{for(let N=0;N<Et.length;N++)s[Et[N]].cancel(x)},state:a,steps:s}}const je=r=>r,{schedule:Pe,cancel:Bt,state:Ct}=Ia(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:je,!0);let wt;function xa(){wt=void 0}const ye={now:()=>(wt===void 0&&ye.set(Ct.isProcessing||Ne.useManualTiming?Ct.timestamp:performance.now()),wt),set:r=>{wt=r,queueMicrotask(xa)}},$n=new Set;function qn(r,t,e){r||$n.has(t)||(console.warn(t),$n.add(t))}class Qn{constructor(){this.subscriptions=[]}add(t){return da(this.subscriptions,t),()=>Bn(this.subscriptions,t)}notify(t,e,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,e,n);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Xn(r,t){return t?r*(1e3/t):0}const Zn=30,Oa=r=>!isNaN(parseFloat(r));class Na{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,a=!0)=>{var s,o;const i=ye.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();a&&((o=this.events.renderRequest)==null||o.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Oa(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&qn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Qn);const n=this.events[t].add(e);return t==="change"?()=>{n(),Pe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){!e||!this.passiveEffect?this.updateAndNotify(t,e):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Zn)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Zn);return Xn(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,e;(t=this.dependents)==null||t.clear(),(e=this.events.destroy)==null||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rt(r,t){return new Na(r,t)}function Pa(r,t,e){r.hasValue(t)?r.getValue(t).set(e):r.addValue(t,rt(e))}function La(r){return Ca(r)?r[r.length-1]||0:r}function Ra(r,t){let s=wa(r,t)||{},{transitionEnd:n={},transition:a={}}=s,i=Ae(s,["transitionEnd","transition"]);i=U(U({},i),n);for(const o in i){const c=La(i[o]);Pa(r,o,c)}}function ka(r){return!!(ge(r)&&r.add)}function Sa(r,t){const e=r.getValue("willChange");if(ka(e))return e.add(t);if(!e&&Ne.WillChange){const n=new Ne.WillChange("auto");r.addValue("willChange",n),n.add(t)}}const zt=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ma="data-"+zt("framerAppearId");function Da(r){return r.props[Ma]}const Va=r=>r!==null;function Fa(r,{repeat:t,repeatType:e="loop"},n){const a=r.filter(Va),i=t&&e!=="loop"&&t%2===1?0:a.length-1;return a[i]}const He=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ke=new Set(He),Ua={type:"spring",stiffness:500,damping:25,restSpeed:10},Ba=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),za={type:"keyframes",duration:.8},ja={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ha=(r,{keyframes:t})=>t.length>2?za:Ke.has(r)?r.startsWith("scale")?Ba(t[1]):Ua:ja;function Ka(u){var h=u,{when:r,delay:t,delayChildren:e,staggerChildren:n,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:c,elapsed:l}=h,d=Ae(h,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}function Jn(r,t){var e,n;return(n=(e=r==null?void 0:r[t])!=null?e:r==null?void 0:r.default)!=null?n:r}const er=r=>t=>typeof t=="string"&&t.startsWith(r),tr=er("--"),Wa=er("var(--"),jt=r=>Wa(r)?Ya.test(r.split("/*")[0].trim()):!1,Ya=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Se=(r,t,e)=>e>t?t:e<r?r:e,We={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},it=J(U({},We),{transform:r=>Se(0,1,r)}),At=J(U({},We),{default:1}),at=r=>Math.round(r*1e5)/1e5,Ht=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ga(r){return r==null}const $a=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kt=(r,t)=>e=>!!(typeof e=="string"&&$a.test(e)&&e.startsWith(r)||t&&!Ga(e)&&Object.prototype.hasOwnProperty.call(e,t)),nr=(r,t,e)=>n=>{if(typeof n!="string")return n;const[a,i,s,o]=n.match(Ht);return{[r]:parseFloat(a),[t]:parseFloat(i),[e]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},qa=r=>Se(0,255,r),Wt=J(U({},We),{transform:r=>Math.round(qa(r))}),Me={test:Kt("rgb","red"),parse:nr("red","green","blue"),transform:({red:r,green:t,blue:e,alpha:n=1})=>"rgba("+Wt.transform(r)+", "+Wt.transform(t)+", "+Wt.transform(e)+", "+at(it.transform(n))+")"};function Qa(r){let t="",e="",n="",a="";return r.length>5?(t=r.substring(1,3),e=r.substring(3,5),n=r.substring(5,7),a=r.substring(7,9)):(t=r.substring(1,2),e=r.substring(2,3),n=r.substring(3,4),a=r.substring(4,5),t+=t,e+=e,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const Yt={test:Kt("#"),parse:Qa,transform:Me.transform},st=r=>({test:t=>typeof t=="string"&&t.endsWith(r)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${r}`}),Le=st("deg"),Ye=st("%"),X=st("px"),Xa=st("vh"),Za=st("vw"),rr=J(U({},Ye),{parse:r=>Ye.parse(r)/100,transform:r=>Ye.transform(r*100)}),Ge={test:Kt("hsl","hue"),parse:nr("hue","saturation","lightness"),transform:({hue:r,saturation:t,lightness:e,alpha:n=1})=>"hsla("+Math.round(r)+", "+Ye.transform(at(t))+", "+Ye.transform(at(e))+", "+at(it.transform(n))+")"},fe={test:r=>Me.test(r)||Yt.test(r)||Ge.test(r),parse:r=>Me.test(r)?Me.parse(r):Ge.test(r)?Ge.parse(r):Yt.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Me.transform(r):Ge.transform(r)},Ja=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function es(r){var t,e;return isNaN(r)&&typeof r=="string"&&(((t=r.match(Ht))==null?void 0:t.length)||0)+(((e=r.match(Ja))==null?void 0:e.length)||0)>0}const ir="number",ar="color",ts="var",ns="var(",sr="${}",rs=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ot(r){const t=r.toString(),e=[],n={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(rs,c=>(fe.test(c)?(n.color.push(i),a.push(ar),e.push(fe.parse(c))):c.startsWith(ns)?(n.var.push(i),a.push(ts),e.push(c)):(n.number.push(i),a.push(ir),e.push(parseFloat(c))),++i,sr)).split(sr);return{values:e,split:o,indexes:n,types:a}}function or(r){return ot(r).values}function cr(r){const{split:t,types:e}=ot(r),n=t.length;return a=>{let i="";for(let s=0;s<n;s++)if(i+=t[s],a[s]!==void 0){const o=e[s];o===ir?i+=at(a[s]):o===ar?i+=fe.transform(a[s]):i+=a[s]}return i}}const is=r=>typeof r=="number"?0:r;function as(r){const t=or(r);return cr(r)(t.map(is))}const $e={test:es,parse:or,createTransformer:cr,getAnimatableNone:as};function Gt(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*(2/3-e)*6:r}function ss({hue:r,saturation:t,lightness:e,alpha:n}){r/=360,t/=100,e/=100;let a=0,i=0,s=0;if(!t)a=i=s=e;else{const o=e<.5?e*(1+t):e+t-e*t,c=2*e-o;a=Gt(c,o,r+1/3),i=Gt(c,o,r),s=Gt(c,o,r-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:n}}function Tt(r,t){return e=>e>0?t:r}const $t=(r,t,e)=>{const n=r*r,a=e*(t*t-n)+n;return a<0?0:Math.sqrt(a)},os=[Yt,Me,Ge],cs=r=>os.find(t=>t.test(r));function lr(r){const t=cs(r);if(tt(!!t,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let e=t.parse(r);return t===Ge&&(e=ss(e)),e}const dr=(r,t)=>{const e=lr(r),n=lr(t);if(!e||!n)return Tt(r,t);const a=U({},e);return i=>(a.red=$t(e.red,n.red,i),a.green=$t(e.green,n.green,i),a.blue=$t(e.blue,n.blue,i),a.alpha=et(e.alpha,n.alpha,i),Me.transform(a))},qt=new Set(["none","hidden"]);function ls(r,t){return qt.has(r)?e=>e<=0?r:t:e=>e>=1?t:r}const ds=(r,t)=>e=>t(r(e)),Qt=(...r)=>r.reduce(ds);function us(r,t){return e=>et(r,t,e)}function Xt(r){return typeof r=="number"?us:typeof r=="string"?jt(r)?Tt:fe.test(r)?dr:fs:Array.isArray(r)?ur:typeof r=="object"?fe.test(r)?dr:ps:Tt}function ur(r,t){const e=[...r],n=e.length,a=r.map((i,s)=>Xt(i)(i,t[s]));return i=>{for(let s=0;s<n;s++)e[s]=a[s](i);return e}}function ps(r,t){const e=U(U({},r),t),n={};for(const a in e)r[a]!==void 0&&t[a]!==void 0&&(n[a]=Xt(r[a])(r[a],t[a]));return a=>{for(const i in n)e[i]=n[i](a);return e}}function hs(r,t){var a;const e=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=r.indexes[s][n[s]],c=(a=r.values[o])!=null?a:0;e[i]=c,n[s]++}return e}const fs=(r,t)=>{const e=$e.createTransformer(t),n=ot(r),a=ot(t);return n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length?qt.has(r)&&!a.values.length||qt.has(t)&&!n.values.length?ls(r,t):Qt(ur(hs(n,a),a.values),e):(tt(!0,`Complex values '${r}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Tt(r,t))};function pr(r,t,e){return typeof r=="number"&&typeof t=="number"&&typeof e=="number"?et(r,t,e):Xt(r)(r,t)}const ms=r=>{const t=({timestamp:e})=>r(e);return{start:(e=!0)=>Pe.update(t,e),stop:()=>Bt(t),now:()=>Ct.isProcessing?Ct.timestamp:ye.now()}},hr=(r,t,e=10)=>{let n="";const a=Math.max(Math.round(t/e),2);for(let i=0;i<a;i++)n+=r(i/(a-1))+", ";return`linear(${n.substring(0,n.length-2)})`},vs=5;function fr(r,t,e){const n=Math.max(t-vs,0);return Xn(e-r(n),t-n)}const ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Zt=.001;function gs({duration:r=ce.duration,bounce:t=ce.bounce,velocity:e=ce.velocity,mass:n=ce.mass}){let a,i;tt(r<=Ce(ce.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=Se(ce.minDamping,ce.maxDamping,s),r=Se(ce.minDuration,ce.maxDuration,xe(r)),s<1?(a=l=>{const d=l*s,u=d*r,h=d-e,p=Jt(l,s),f=Math.exp(-u);return Zt-h/p*f},i=l=>{const u=l*s*r,h=u*e+e,p=Math.pow(s,2)*Math.pow(l,2)*r,f=Math.exp(-u),m=Jt(Math.pow(l,2),s);return(-a(l)+Zt>0?-1:1)*((h-p)*f)/m}):(a=l=>{const d=Math.exp(-l*r),u=(l-e)*r+1;return-Zt+d*u},i=l=>{const d=Math.exp(-l*r),u=(e-l)*(r*r);return d*u});const o=5/r,c=ys(a,i,o);if(r=Ce(r),isNaN(c))return{stiffness:ce.stiffness,damping:ce.damping,duration:r};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:s*2*Math.sqrt(n*l),duration:r}}}const bs=12;function ys(r,t,e){let n=e;for(let a=1;a<bs;a++)n=n-r(n)/t(n);return n}function Jt(r,t){return r*Math.sqrt(1-t*t)}const _s=["duration","bounce"],Es=["stiffness","damping","mass"];function mr(r,t){return t.some(e=>r[e]!==void 0)}function Cs(r){let t=U({velocity:ce.velocity,stiffness:ce.stiffness,damping:ce.damping,mass:ce.mass,isResolvedFromDuration:!1},r);if(!mr(r,Es)&&mr(r,_s))if(r.visualDuration){const e=r.visualDuration,n=2*Math.PI/(e*1.2),a=n*n,i=2*Se(.05,1,1-(r.bounce||0))*Math.sqrt(a);t=J(U({},t),{mass:ce.mass,stiffness:a,damping:i})}else{const e=gs(r);t=J(U(U({},t),e),{mass:ce.mass}),t.isResolvedFromDuration=!0}return t}function ct(r=ce.visualDuration,t=ce.bounce){const e=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:t}:r;let{restSpeed:n,restDelta:a}=e;const i=e.keyframes[0],s=e.keyframes[e.keyframes.length-1],o={done:!1,value:i},{stiffness:c,damping:l,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=Cs(J(U({},e),{velocity:-xe(e.velocity||0)})),f=h||0,m=l/(2*Math.sqrt(c*d)),v=s-i,b=xe(Math.sqrt(c/d)),C=Math.abs(v)<5;n||(n=C?ce.restSpeed.granular:ce.restSpeed.default),a||(a=C?ce.restDelta.granular:ce.restDelta.default);let x;if(m<1){const I=Jt(b,m);x=L=>{const O=Math.exp(-m*b*L);return s-O*((f+m*b*v)/I*Math.sin(I*L)+v*Math.cos(I*L))}}else if(m===1)x=I=>s-Math.exp(-b*I)*(v+(f+b*v)*I);else{const I=b*Math.sqrt(m*m-1);x=L=>{const O=Math.exp(-m*b*L),k=Math.min(I*L,300);return s-O*((f+m*b*v)*Math.sinh(k)+I*v*Math.cosh(k))/I}}const N={calculatedDuration:p&&u||null,next:I=>{const L=x(I);if(p)o.done=I>=u;else{let O=I===0?f:0;m<1&&(O=I===0?Ce(f):fr(x,I,L));const k=Math.abs(O)<=n,B=Math.abs(s-L)<=a;o.done=k&&B}return o.value=o.done?s:L,o},toString:()=>{const I=Math.min(Ut(N),_t),L=hr(O=>N.next(I*O).value,I,30);return I+"ms "+L},toTransition:()=>{}};return N}ct.applyToOptions=r=>{const t=Hn(r,100,ct);return r.ease=t.ease,r.duration=Ce(t.duration),r.type="keyframes",r};function en({keyframes:r,velocity:t=0,power:e=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:c,restDelta:l=.5,restSpeed:d}){const u=r[0],h={done:!1,value:u},p=k=>o!==void 0&&k<o||c!==void 0&&k>c,f=k=>o===void 0?c:c===void 0||Math.abs(o-k)<Math.abs(c-k)?o:c;let m=e*t;const v=u+m,b=s===void 0?v:s(v);b!==v&&(m=b-u);const C=k=>-m*Math.exp(-k/n),x=k=>b+C(k),N=k=>{const B=C(k),W=x(k);h.done=Math.abs(B)<=l,h.value=h.done?b:W};let I,L;const O=k=>{p(h.value)&&(I=k,L=ct({keyframes:[h.value,f(h.value)],velocity:fr(x,k,h.value),damping:a,stiffness:i,restDelta:l,restSpeed:d}))};return O(0),{calculatedDuration:null,next:k=>{let B=!1;return!L&&I===void 0&&(B=!0,N(k),O(k)),I!==void 0&&k>=I?L.next(k-I):(!B&&N(k),h)}}}function ws(r,t,e){const n=[],a=e||Ne.mix||pr,i=r.length-1;for(let s=0;s<i;s++){let o=a(r[s],r[s+1]);if(t){const c=Array.isArray(t)?t[s]||je:t;o=Qt(c,o)}n.push(o)}return n}function As(r,t,{clamp:e=!0,ease:n,mixer:a}={}){const i=r.length;if(Oe(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=r[0]===r[1];r[0]>r[i-1]&&(r=[...r].reverse(),t=[...t].reverse());const o=ws(t,n,a),c=o.length,l=d=>{if(s&&d<r[0])return t[0];let u=0;if(c>1)for(;u<r.length-2&&!(d<r[u+1]);u++);const h=Vt(r[u],r[u+1],d);return o[u](h)};return e?d=>l(Se(r[0],r[i-1],d)):l}function Ts(r,t){return r.map(e=>e*t)}const vr=(r,t,e)=>(((1-3*e+3*t)*r+(3*e-6*t))*r+3*t)*r,Is=1e-7,xs=12;function Os(r,t,e,n,a){let i,s,o=0;do s=t+(e-t)/2,i=vr(s,n,a)-r,i>0?e=s:t=s;while(Math.abs(i)>Is&&++o<xs);return s}function lt(r,t,e,n){if(r===t&&e===n)return je;const a=i=>Os(i,0,1,r,e);return i=>i===0||i===1?i:vr(a(i),t,n)}const Ns=lt(.42,0,1,1),Ps=lt(0,0,.58,1),gr=lt(.42,0,.58,1),br=r=>t=>t<=.5?r(2*t)/2:(2-r(2*(1-t)))/2,yr=r=>t=>1-r(1-t),_r=lt(.33,1.53,.69,.99),tn=yr(_r),Er=br(tn),Cr=r=>(r*=2)<1?.5*tn(r):.5*(2-Math.pow(2,-10*(r-1))),nn=r=>1-Math.sin(Math.acos(r)),Ls=yr(nn),wr=br(nn),Ar=r=>Array.isArray(r)&&typeof r[0]=="number",Tr={linear:je,easeIn:Ns,easeInOut:gr,easeOut:Ps,circIn:nn,circInOut:wr,circOut:Ls,backIn:tn,backInOut:Er,backOut:_r,anticipate:Cr},Rs=r=>typeof r=="string",Ir=r=>{if(Ar(r)){Oe(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,e,n,a]=r;return lt(t,e,n,a)}else if(Rs(r))return Oe(Tr[r]!==void 0,`Invalid easing type '${r}'`),Tr[r];return r};function ks(r,t){return r.map(()=>t||gr).splice(0,r.length-1)}function qe({duration:r=300,keyframes:t,times:e,ease:n="easeInOut"}){const a=Fn(n)?n.map(Ir):Ir(n),i={done:!1,value:t[0]},s=Ts(e&&e.length===t.length?e:jn(t),r),o=As(s,t,{ease:Array.isArray(a)?a:ks(t,a)});return{calculatedDuration:r,next:c=>(i.value=o(c),i.done=c>=r,i)}}const Ss=r=>r!==null;function rn(r,{repeat:t,repeatType:e="loop"},n,a=1){const i=r.filter(Ss),o=a<0||t&&e!=="loop"&&t%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const Ms={decay:en,inertia:en,tween:qe,keyframes:qe,spring:ct};function xr(r){typeof r.type=="string"&&(r.type=Ms[r.type])}class an{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ds=r=>r/100;class sn extends an{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,a;const{motionValue:e}=this.options;e&&e.updatedAt!==ye.now()&&this.tick(ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(n=this.options).onStop)==null||a.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;xr(t);const{type:e=qe,repeat:n=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=t;let{keyframes:o}=t;const c=e||qe;process.env.NODE_ENV!=="production"&&c!==qe&&Oe(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),c!==qe&&typeof o[0]!="number"&&(this.mixKeyframes=Qt(Ds,pr(o[0],o[1])),o=[0,100]);const l=c(J(U({},t),{keyframes:o}));i==="mirror"&&(this.mirroredGenerator=c(J(U({},t),{keyframes:[...o].reverse(),velocity:-s}))),l.calculatedDuration===null&&(l.calculatedDuration=Ut(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(n+1)-a,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:a,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const b=this.currentTime-l*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?b<0:b>a;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let x=this.currentTime,N=n;if(u){const k=Math.min(this.currentTime,a)/o;let B=Math.floor(k),W=k%1;!W&&k>=1&&(W=1),W===1&&B--,B=Math.min(B,u+1),!!(B%2)&&(h==="reverse"?(W=1-W,p&&(W-=p/o)):h==="mirror"&&(N=s)),x=Se(0,1,W)*o}const I=C?{done:!1,value:d[0]}:N.next(x);i&&(I.value=i(I.value));let{done:L}=I;!C&&c!==null&&(L=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return O&&f!==en&&(I.value=rn(d,this.options,v,this.speed)),m&&m(I.value),O&&this.finish(),I}then(t,e){return this.finished.then(t,e)}get duration(){return xe(this.calculatedDuration)}get time(){return xe(this.currentTime)}set time(t){var e;t=Ce(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(e=this.driver)==null||e.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ye.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=xe(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=ms,startTime:e}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(i=(a=this.options).onPlay)==null||i.call(a);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e!=null?e:n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,e;this.notifyFinished(),this.teardown(),this.state="finished",(e=(t=this.options).onComplete)==null||e.call(t)}cancel(){var t,e;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(e=(t=this.options).onCancel)==null||e.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var e;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(e=this.driver)==null||e.stop(),t.observe(this)}}function Vs(r){var t;for(let e=1;e<r.length;e++)(t=r[e])!=null||(r[e]=r[e-1])}const De=r=>r*180/Math.PI,on=r=>{const t=De(Math.atan2(r[1],r[0]));return cn(t)},Fs={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:on,rotateZ:on,skewX:r=>De(Math.atan(r[1])),skewY:r=>De(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},cn=r=>(r=r%360,r<0&&(r+=360),r),Or=on,Nr=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),Pr=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),Us={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Nr,scaleY:Pr,scale:r=>(Nr(r)+Pr(r))/2,rotateX:r=>cn(De(Math.atan2(r[6],r[5]))),rotateY:r=>cn(De(Math.atan2(-r[2],r[0]))),rotateZ:Or,rotate:Or,skewX:r=>De(Math.atan(r[4])),skewY:r=>De(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function ln(r){return r.includes("scale")?1:0}function dn(r,t){if(!r||r==="none")return ln(t);const e=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,a;if(e)n=Us,a=e;else{const o=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Fs,a=o}if(!a)return ln(t);const i=n[t],s=a[1].split(",").map(zs);return typeof i=="function"?i(s):s[i]}const Bs=(r,t)=>{const{transform:e="none"}=getComputedStyle(r);return dn(e,t)};function zs(r){return parseFloat(r.trim())}const Lr=r=>r===We||r===X,js=new Set(["x","y","z"]),Hs=He.filter(r=>!js.has(r));function Ks(r){const t=[];return Hs.forEach(e=>{const n=r.getValue(e);n!==void 0&&(t.push([e,n.get()]),n.set(e.startsWith("scale")?1:0))}),t}const Ve={width:({x:r},{paddingLeft:t="0",paddingRight:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),height:({y:r},{paddingTop:t="0",paddingBottom:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),top:(r,{top:t})=>parseFloat(t),left:(r,{left:t})=>parseFloat(t),bottom:({y:r},{top:t})=>parseFloat(t)+(r.max-r.min),right:({x:r},{left:t})=>parseFloat(t)+(r.max-r.min),x:(r,{transform:t})=>dn(t,"x"),y:(r,{transform:t})=>dn(t,"y")};Ve.translateX=Ve.x,Ve.translateY=Ve.y;const Fe=new Set;let un=!1,pn=!1,hn=!1;function Rr(){if(pn){const r=Array.from(Fe).filter(n=>n.needsMeasurement),t=new Set(r.map(n=>n.element)),e=new Map;t.forEach(n=>{const a=Ks(n);a.length&&(e.set(n,a),n.render())}),r.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const a=e.get(n);a&&a.forEach(([i,s])=>{var o;(o=n.getValue(i))==null||o.set(s)})}),r.forEach(n=>n.measureEndState()),r.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}pn=!1,un=!1,Fe.forEach(r=>r.complete(hn)),Fe.clear()}function kr(){Fe.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(pn=!0)})}function Ws(){hn=!0,kr(),Rr(),hn=!1}class fn{constructor(t,e,n,a,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Fe.add(this),un||(un=!0,Pe.read(kr),Pe.resolveKeyframes(Rr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:a}=this;if(t[0]===null){const i=a==null?void 0:a.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&e){const o=n.readValue(e,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),a&&i===void 0&&a.set(t[0])}Vs(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Fe.delete(this)}cancel(){this.state==="scheduled"&&(Fe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ys=r=>r.startsWith("--");function Gs(r,t,e){Ys(t)?r.style.setProperty(t,e):r.style[t]=e}function mn(r){let t;return()=>(t===void 0&&(t=r()),t)}const $s=mn(()=>window.ScrollTimeline!==void 0),qs={};function Qs(r,t){const e=mn(r);return()=>{var n;return(n=qs[t])!=null?n:e()}}const Sr=Qs(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),dt=([r,t,e,n])=>`cubic-bezier(${r}, ${t}, ${e}, ${n})`,Mr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dt([0,.65,.55,1]),circOut:dt([.55,0,1,.45]),backIn:dt([.31,.01,.66,-.59]),backOut:dt([.33,1.53,.69,.99])};function Dr(r,t){if(r)return typeof r=="function"?Sr()?hr(r,t):"ease-out":Ar(r)?dt(r):Array.isArray(r)?r.map(e=>Dr(e,t)||Mr.easeOut):Mr[r]}function Xs(r,t,e,{delay:n=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeOut",times:c}={},l=void 0){const d={[t]:e};c&&(d.offset=c);const u=Dr(o,a);Array.isArray(u)&&(d.easing=u);const h={delay:n,duration:a,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),r.animate(d,h)}function Zs(e){var n=e,{type:r}=n,t=Ae(n,["type"]);var a,i;return Ft(r)&&Sr()?r.applyToOptions(t):((a=t.duration)!=null||(t.duration=300),(i=t.ease)!=null||(t.ease="easeOut"),t)}class Js extends an{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:a,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:o,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,Oe(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const l=Zs(t);this.animation=Xs(e,n,a,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=rn(a,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):Gs(e,n,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,e;(e=(t=this.animation).finish)==null||e.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,e;this.isPseudoElement||(e=(t=this.animation).commitStyles)==null||e.call(t)}get duration(){var e,n;const t=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return xe(Number(t))}get time(){return xe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&$s()?(this.animation.timeline=t,je):e(this)}}const Vr={anticipate:Cr,backInOut:Er,circInOut:wr};function eo(r){return r in Vr}function to(r){typeof r.ease=="string"&&eo(r.ease)&&(r.ease=Vr[r.ease])}const Fr=10;class no extends Js{constructor(t){to(t),xr(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){var d;const l=this.options,{motionValue:e,onUpdate:n,onComplete:a,element:i}=l,s=Ae(l,["motionValue","onUpdate","onComplete","element"]);if(!e)return;if(t!==void 0){e.set(t);return}const o=new sn(J(U({},s),{autoplay:!1})),c=Ce((d=this.finishedTime)!=null?d:this.time);e.setWithVelocity(o.sample(c-Fr).value,o.sample(c).value,Fr),o.stop()}}const Ur=(r,t)=>t==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&($e.test(r)||r==="0")&&!r.startsWith("url("));function ro(r){const t=r[0];if(r.length===1)return!0;for(let e=0;e<r.length;e++)if(r[e]!==t)return!0}function io(r,t,e,n){const a=r[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=r[r.length-1],s=Ur(a,t),o=Ur(i,t);return tt(s===o,`You are trying to animate ${t} from "${a}" to "${i}". ${a} is not an animatable value - to enable this animation set ${a} to a value animatable to ${i} via the \`style\` property.`),!s||!o?!1:ro(r)||(e==="spring"||Ft(e))&&n}function Br(r){return typeof r=="object"&&r!==null}function ao(r){return Br(r)&&"offsetHeight"in r}const so=new Set(["opacity","clipPath","filter","transform"]),oo=mn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function co(r){var l;const{motionValue:t,name:e,repeatDelay:n,repeatType:a,damping:i,type:s}=r;if(!ao((l=t==null?void 0:t.owner)==null?void 0:l.current))return!1;const{onUpdate:o,transformTemplate:c}=t.owner.getProps();return oo()&&e&&so.has(e)&&(e!=="transform"||!c)&&!o&&!n&&a!=="mirror"&&i!==0&&s!=="inertia"}const lo=40;class uo extends an{constructor(h){var p=h,{autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",keyframes:o,name:c,motionValue:l,element:d}=p,u=Ae(p,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var b,C;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(C=this.keyframeResolver)==null||C.cancel()},this.createdAt=ye.now();const f=U({autoplay:t,delay:e,type:n,repeat:a,repeatDelay:i,repeatType:s,name:c,motionValue:l,element:d},u),m=(d==null?void 0:d.KeyframeResolver)||fn;this.keyframeResolver=new m(o,(b,C,x)=>this.onKeyframesResolved(b,C,f,!x),c,l,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,e,n,a){this.keyframeResolver=void 0;const{name:i,type:s,velocity:o,delay:c,isHandoff:l,onUpdate:d}=n;this.resolvedAt=ye.now(),io(t,i,s,o)||((Ne.instantAnimations||!c)&&(d==null||d(rn(t,n,e))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u=a?this.resolvedAt?this.resolvedAt-this.createdAt>lo?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=J(U({startTime:u,finalKeyframe:e},n),{keyframes:t}),p=!l&&co(h)?new no(J(U({},h),{element:h.motionValue.owner.current})):new sn(h);p.finished.then(()=>this.notifyFinished()).catch(je),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ws()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const zr=(r,t,e,n={},a,i)=>s=>{const o=Jn(n,r)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Ce(c);const d=J(U({keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity()},o),{delay:-l,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:r,motionValue:t,element:i?void 0:a});Ka(o)||Object.assign(d,Ha(r,d)),d.duration&&(d.duration=Ce(d.duration)),d.repeatDelay&&(d.repeatDelay=Ce(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),(Ne.instantAnimations||Ne.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!i&&t.get()!==void 0){const h=Fa(d.keyframes,o);if(h!==void 0){Pe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new sn(d):new uo(d)},jr=new Set(["width","height","top","left","right","bottom",...He]);function po({protectedKeys:r,needsAnimating:t},e){const n=r.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,n}function ho(r,t,{delay:e=0,transitionOverride:n,type:a}={}){var u;let d=t,{transition:i=r.getDefaultTransition(),transitionEnd:s}=d,o=Ae(d,["transition","transitionEnd"]);n&&(i=n);const c=[],l=a&&r.animationState&&r.animationState.getState()[a];for(const h in o){const p=r.getValue(h,(u=r.latestValues[h])!=null?u:null),f=o[h];if(f===void 0||l&&po(l,h))continue;const m=U({delay:e},Jn(i||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(f)&&f===v&&!m.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const x=Da(r);if(x){const N=window.MotionHandoffAnimation(x,h,Pe);N!==null&&(m.startTime=N,b=!0)}}Sa(r,h),p.start(zr(h,p,f,r.shouldReduceMotion&&jr.has(h)?{type:!1}:m,r,b));const C=p.animation;C&&c.push(C)}return s&&Promise.all(c).then(()=>{Pe.update(()=>{s&&Ra(r,s)})}),c}function fo({top:r,left:t,right:e,bottom:n}){return{x:{min:t,max:e},y:{min:r,max:n}}}function mo(r,t){if(!t)return r;const e=t({x:r.left,y:r.top}),n=t({x:r.right,y:r.bottom});return{top:e.y,left:e.x,bottom:n.y,right:n.x}}function vo(r,t){return fo(mo(r.getBoundingClientRect(),t))}const Hr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},vn={};for(const r in Hr)vn[r]={isEnabled:t=>Hr[r].some(e=>!!t[e])};const Kr=()=>({min:0,max:0}),gn=()=>({x:Kr(),y:Kr()}),go=typeof window!="undefined",bn={current:null},Wr={current:!1};function bo(){if(Wr.current=!0,!!go)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),t=()=>bn.current=r.matches;r.addListener(t),t()}else bn.current=!1}function yo(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function _o(r){return typeof r=="string"||Array.isArray(r)}const Eo=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Yr(r){return yo(r.animate)||Eo.some(t=>_o(r[t]))}function Co(r){return!!(Yr(r)||r.variants)}function wo(r,t,e){for(const n in t){const a=t[n],i=e[n];if(ge(a))r.addValue(n,a);else if(ge(i))r.addValue(n,rt(a,{owner:r}));else if(i!==a)if(r.hasValue(n)){const s=r.getValue(n);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=r.getStaticValue(n);r.addValue(n,rt(s!==void 0?s:a,{owner:r}))}}for(const n in e)t[n]===void 0&&r.removeValue(n);return t}const Gr=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),$r=r=>/^0[^.\s]+$/u.test(r),Ao={test:r=>r==="auto",parse:r=>r},qr=r=>t=>t.test(r),Qr=[We,X,Ye,Le,Za,Xa,Ao],Xr=r=>Qr.find(qr(r)),To=[...Qr,fe,$e],Io=r=>To.find(qr(r)),xo=new Set(["brightness","contrast","saturate","opacity"]);function Oo(r){const[t,e]=r.slice(0,-1).split("(");if(t==="drop-shadow")return r;const[n]=e.match(Ht)||[];if(!n)return r;const a=e.replace(n,"");let i=xo.has(t)?1:0;return n!==e&&(i*=100),t+"("+i+a+")"}const No=/\b([a-z-]*)\(.*?\)/gu,yn=J(U({},$e),{getAnimatableNone:r=>{const t=r.match(No);return t?t.map(Oo).join(" "):r}}),Zr=J(U({},We),{transform:Math.round}),_n=J(U({borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,radius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,backgroundPositionX:X,backgroundPositionY:X},{rotate:Le,rotateX:Le,rotateY:Le,rotateZ:Le,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:Le,skewX:Le,skewY:Le,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:it,originX:rr,originY:rr,originZ:X}),{zIndex:Zr,fillOpacity:it,strokeOpacity:it,numOctaves:Zr}),Po=J(U({},_n),{color:fe,backgroundColor:fe,outlineColor:fe,fill:fe,stroke:fe,borderColor:fe,borderTopColor:fe,borderRightColor:fe,borderBottomColor:fe,borderLeftColor:fe,filter:yn,WebkitFilter:yn}),Jr=r=>Po[r];function ei(r,t){let e=Jr(r);return e!==yn&&(e=$e),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const ti=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ni{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ye.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Pe.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=s;this.latestValues=c,this.baseTarget=U({},c),this.initialValues=e.initial?U({},c):{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Yr(e),this.isVariantNode=Co(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const h=this.scrapeMotionValuesFromProps(e,{},this),{willChange:d}=h,u=Ae(h,["willChange"]);for(const p in u){const f=u[p];c[p]!==void 0&&ge(f)&&f.set(c[p],!1)}}mount(t){this.current=t,nt.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,n)=>this.bindToMotionValue(n,e)),Wr.current||bo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:bn.current,process.env.NODE_ENV!=="production"&&qn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Bt(this.notifyUpdate),Bt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ke.has(t);n&&this.onBindTransform&&this.onBindTransform();const a=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Pe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in vn){const e=vn[t];if(!e)continue;const{isEnabled:n,Feature:a}=e;if(!this.features[t]&&a&&n(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<ti.length;n++){const a=ti[n];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,s=t[i];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=wo(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&e!==void 0&&(n=rt(e===null?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var a;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(a=this.getBaseTargetFromProps(this.props,t))!=null?a:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Gr(n)||$r(n))?n=parseFloat(n):!Io(n)&&$e.test(e)&&(n=ei(t,e)),this.setBaseTarget(t,ge(n)?n.get():n)),ge(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var i;const{initial:e}=this.props;let n;if(typeof e=="string"||typeof e=="object"){const s=Gn(this.props,e,(i=this.presenceContext)==null?void 0:i.custom);s&&(n=s[t])}if(e&&n!==void 0)return n;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ge(a)?a:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new Qn),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const Lo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ro(r){const t=Lo.exec(r);if(!t)return[,];const[,e,n,a]=t;return[`--${e!=null?e:n}`,a]}const ko=4;function ri(r,t,e=1){Oe(e<=ko,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,a]=Ro(r);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const s=i.trim();return Gr(s)?parseFloat(s):s}return jt(a)?ri(a,t,e+1):a}function So(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||$r(r):!0}const Mo=new Set(["auto","none","0"]);function Do(r,t,e){let n=0,a;for(;n<r.length&&!a;){const i=r[n];typeof i=="string"&&!Mo.has(i)&&ot(i).values.length&&(a=r[n]),n++}if(a&&e)for(const i of t)r[i]=ei(e,a)}class Vo extends fn{constructor(t,e,n,a,i){super(t,e,n,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),jt(l))){const d=ri(l,e.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!jr.has(n)||t.length!==2)return;const[a,i]=t,s=Xr(a),o=Xr(i);if(s!==o)if(Lr(s)&&Lr(o))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else Ve[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let a=0;a<t.length;a++)(t[a]===null||So(t[a]))&&n.push(a);n.length&&Do(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ve[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const a=e[e.length-1];a!==void 0&&t.getValue(n,a).jump(a,!1)}measureEndState(){var o;const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const a=t.getValue(e);a&&a.jump(this.measuredOrigin,!1);const i=n.length-1,s=n[i];n[i]=Ve[e](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([c,l])=>{t.getValue(c).set(l)}),this.resolveNoneKeyframes()}}class ii extends ni{constructor(){super(...arguments),this.KeyframeResolver=Vo}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const ai=(r,t)=>t&&typeof r=="number"?t.transform(r):r,Fo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Uo=He.length;function Bo(r,t,e){let n="",a=!0;for(let i=0;i<Uo;i++){const s=He[i],o=r[s];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(s.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||e){const l=ai(o,_n[s]);if(!c){a=!1;const d=Fo[s]||s;n+=`${d}(${l}) `}e&&(t[s]=l)}}return n=n.trim(),e?n=e(t,a?"":n):a&&(n="none"),n}function si(r,t,e){const{style:n,vars:a,transformOrigin:i}=r;let s=!1,o=!1;for(const c in t){const l=t[c];if(Ke.has(c)){s=!0;continue}else if(tr(c)){a[c]=l;continue}else{const d=ai(l,_n[c]);c.startsWith("origin")?(o=!0,i[c]=d):n[c]=d}}if(t.transform||(s||e?n.transform=Bo(t,r.transform,e):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:d=0}=i;n.transformOrigin=`${c} ${l} ${d}`}}function oi(r,{style:t,vars:e},n,a){Object.assign(r.style,t,a&&a.getProjectionStyles(n));for(const i in e)r.style.setProperty(i,e[i])}const zo={};function jo(r,{layout:t,layoutId:e}){return Ke.has(r)||r.startsWith("origin")||(t||e!==void 0)&&(!!zo[r]||r==="opacity")}function ci(r,t,e){var i;const{style:n}=r,a={};for(const s in n)(ge(n[s])||t.style&&ge(t.style[s])||jo(s,r)||((i=e==null?void 0:e.getValue(s))==null?void 0:i.liveStyle)!==void 0)&&(a[s]=n[s]);return a}function Ho(r){return window.getComputedStyle(r)}class Ko extends ii{constructor(){super(...arguments),this.type="html",this.renderInstance=oi}readValueFromInstance(t,e){var n;if(Ke.has(e))return(n=this.projection)!=null&&n.isProjecting?ln(e):Bs(t,e);{const a=Ho(t),i=(tr(e)?a.getPropertyValue(e):a[e])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return vo(t,e)}build(t,e,n){si(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ci(t,e,n)}}function Wo(r,t){return r in t}class Yo extends ni{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(Wo(e,t)){const n=t[e];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return gn()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Go={offset:"stroke-dashoffset",array:"stroke-dasharray"},$o={offset:"strokeDashoffset",array:"strokeDasharray"};function qo(r,t,e=1,n=0,a=!0){r.pathLength=1;const i=a?Go:$o;r[i.offset]=X.transform(-n);const s=X.transform(t),o=X.transform(e);r[i.array]=`${s} ${o}`}function Qo(r,u,c,l,d){var h=u,{attrX:t,attrY:e,attrScale:n,pathLength:a,pathSpacing:i=1,pathOffset:s=0}=h,o=Ae(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var m,v;if(si(r,o,l),c){r.style.viewBox&&(r.attrs.viewBox=r.style.viewBox);return}r.attrs=r.style,r.style={};const{attrs:p,style:f}=r;p.transform&&(f.transform=p.transform,delete p.transform),(f.transform||p.transformOrigin)&&(f.transformOrigin=(m=p.transformOrigin)!=null?m:"50% 50%",delete p.transformOrigin),f.transform&&(f.transformBox=(v=d==null?void 0:d.transformBox)!=null?v:"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),e!==void 0&&(p.y=e),n!==void 0&&(p.scale=n),a!==void 0&&qo(p,a,i,s,!1)}const li=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Xo=r=>typeof r=="string"&&r.toLowerCase()==="svg";function Zo(r,t,e,n){oi(r,t,void 0,n);for(const a in t.attrs)r.setAttribute(li.has(a)?a:zt(a),t.attrs[a])}function Jo(r,t,e){const n=ci(r,t,e);for(const a in r)if(ge(r[a])||ge(t[a])){const i=He.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;n[i]=r[a]}return n}class ec extends ii{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ke.has(e)){const n=Jr(e);return n&&n.default||0}return e=li.has(e)?e:zt(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Jo(t,e,n)}build(t,e,n){Qo(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,a){Zo(t,e,n,a)}mount(t){this.isSVGTag=Xo(t.tagName),super.mount(t)}}function di(r){return Br(r)&&"ownerSVGElement"in r}function tc(r){return di(r)&&r.tagName==="svg"}function nc(r){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=di(r)&&!tc(r)?new ec(t):new Ko(t);e.mount(r),nt.set(r,e)}function rc(r){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new Yo(t);e.mount(r),nt.set(r,e)}function ic(r,t,e){const n=ge(r)?r:rt(r);return n.start(zr("",n,t,e)),n.animation}function ac(r,t){return ge(r)||typeof r=="number"||typeof r=="string"&&!Dt(t)}function ui(r,t,e,n){const a=[];if(ac(r,t))a.push(ic(r,Dt(t)&&t.default||t,e&&(e.default||e)));else{const i=Dn(r,t,n),s=i.length;Oe(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const c=i[o],l=c instanceof Element?nc:rc;nt.has(c)||l(c);const d=nt.get(c),u=U({},e);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),a.push(...ho(d,J(U({},t),{transition:u}),{}))}}return a}function sc(r,t,e){const n=[];return ga(r,t,e,{spring:ct}).forEach(({keyframes:i,transition:s},o)=>{n.push(...ui(o,i,s))}),n}class oc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(n=>n.attachTimeline(t));return()=>{e.forEach((n,a)=>{n&&n(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class cc extends oc{then(t,e){return this.finished.finally(t).then(()=>{})}}function lc(r){return Array.isArray(r)&&r.some(Array.isArray)}function dc(r){function t(e,n,a){let i=[];return lc(e)?i=sc(e,n,r):i=ui(e,n,a,r),new cc(i)}return t}const pe=dc(),ie={spinner:"_spinner_1lif3_1",spinnerContainer:"_spinnerContainer_1lif3_5",success:"_success_1lif3_9",successContainer:"_successContainer_1lif3_14",container:"_container_1lif3_57",card:"_card_1lif3_66",warning:"_warning_1lif3_75",svg:"_svg_1lif3_83",srOnly:"_srOnly_1lif3_88",backButton:"_backButton_1lif3_92"};function ae(r,t){if(!t)return;const e=t.trim().split(/\s+/).filter(n=>n.length>0);r.classList.add(...e)}class pi{constructor(){A(this,"template",`
3
3
  <svg class="${ie.spinner}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 215 215" fill="none">
4
4
  <path d="M214.476 107.728C214.476 132.466 205.898 156.439 190.204 175.562C174.51 194.686 152.671 207.775 128.408 212.602C104.144 217.428 78.9585 213.692 57.141 202.03C35.3236 190.369 18.2247 171.503 8.75763 148.647C-0.709393 125.792 -1.95874 100.361 5.22248 76.6878C12.4037 53.0145 27.5711 32.5636 48.1405 18.8196C68.7098 5.07558 93.4083 -1.11108 118.028 1.31372C142.647 3.73851 165.664 14.6247 183.157 32.1175L168.035 47.2395C154.041 33.2453 135.627 24.5363 115.932 22.5965C96.236 20.6566 76.4772 25.606 60.0217 36.6012C43.5663 47.5964 31.4323 63.9571 25.6874 82.8957C19.9424 101.834 20.9419 122.179 28.5155 140.463C36.0891 158.748 49.7683 173.84 67.2222 183.17C84.6761 192.499 104.825 195.488 124.235 191.627C143.646 187.766 161.117 177.294 173.672 161.995C186.228 146.697 193.09 127.518 193.09 107.728L214.476 107.728Z" fill="currentColor"/>
5
5
  </svg>
6
6
 
7
7
  <span class="${ie.srOnly}">Loading...</span>
8
- `);A(this,"spinner",document.createElement("div"));this.spinner.setAttribute("role","status"),this.spinner.classList.add(ie.spinnerContainer),this.spinner.innerHTML=this.template}addClass(t){ae(this.spinner,t)}removeClass(t){this.spinner.classList.remove(t)}render(){return this.spinner}}const hi={loader:"_loader_nwq3e_1"};class uc{constructor(){A(this,"loader");this.loader=document.createElement("div"),this.loader.classList.add(hi.loader),this.loader.appendChild(new pi().render())}setClassName(t){t?ae(this.loader,t):this.loader.className=hi.loader}render(){return this.loader}}const be={checkout:"_checkout_15zm1_1",hidden:"_hidden_15zm1_8",formInitial:"_formInitial_15zm1_12",btnsInitial:"_btnsInitial_15zm1_21"},Ue={buttons:"_buttons_qc8am_1",hidden:"_hidden_qc8am_8",skeleton:"_skeleton_qc8am_12"},En={applePay:"_applePay_1wlwu_1",hidden:"_hidden_1wlwu_13"};function Cn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var wn,fi;function pc(){if(fi)return wn;fi=1;var r={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[62207,62209],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,504174],[504176,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,63737423,63743358,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}};return wn=r,wn}var ut={},pt={},mi;function vi(){if(mi)return pt;mi=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.clone=void 0;function r(t){return t?JSON.parse(JSON.stringify(t)):null}return pt.clone=r,pt}var ht={},gi;function hc(){if(gi)return ht;gi=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.matches=void 0;function r(n,a,i){var s=String(a).length,o=n.substr(0,s),c=parseInt(o,10);return a=parseInt(String(a).substr(0,o.length),10),i=parseInt(String(i).substr(0,o.length),10),c>=a&&c<=i}function t(n,a){return a=String(a),a.substring(0,n.length)===n.substring(0,a.length)}function e(n,a){return Array.isArray(a)?r(n,a[0],a[1]):t(n,a)}return ht.matches=e,ht}var bi;function fc(){if(bi)return ut;bi=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.addMatchingCardsToResults=void 0;var r=vi(),t=hc();function e(n,a,i){var s,o;for(s=0;s<a.patterns.length;s++){var c=a.patterns[s];if((0,t.matches)(n,c)){var l=(0,r.clone)(a);Array.isArray(c)?o=String(c[0]).length:o=String(c).length,n.length>=o&&(l.matchStrength=o),i.push(l);break}}}return ut.addMatchingCardsToResults=e,ut}var ft={},yi;function mc(){if(yi)return ft;yi=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.isValidInputType=void 0;function r(t){return typeof t=="string"||t instanceof String}return ft.isValidInputType=r,ft}var mt={},_i;function vc(){if(_i)return mt;_i=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.findBestMatch=void 0;function r(e){var n=e.filter(function(a){return a.matchStrength}).length;return n>0&&n===e.length}function t(e){return r(e)?e.reduce(function(n,a){return!n||Number(n.matchStrength)<Number(a.matchStrength)?a:n}):null}return mt.findBestMatch=t,mt}var vt,Ei;function gc(){if(Ei)return vt;Ei=1;var r=vt&&vt.__assign||function(){return r=Object.assign||function(f){for(var m,v=1,b=arguments.length;v<b;v++){m=arguments[v];for(var w in m)Object.prototype.hasOwnProperty.call(m,w)&&(f[w]=m[w])}return f},r.apply(this,arguments)},t=pc(),e=fc(),n=mc(),a=vc(),i=vi(),s={},o={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},c=[o.VISA,o.MASTERCARD,o.AMERICAN_EXPRESS,o.DINERS_CLUB,o.DISCOVER,o.JCB,o.UNIONPAY,o.MAESTRO,o.ELO,o.MIR,o.HIPER,o.HIPERCARD],l=(0,i.clone)(c);function d(f){return s[f]||t[f]}function u(){return l.map(function(f){return(0,i.clone)(d(f))})}function h(f,m){m===void 0&&(m=!1);var v=l.indexOf(f);if(!m&&v===-1)throw new Error('"'+f+'" is not a supported card type.');return v}function p(f){var m=[];if(!(0,n.isValidInputType)(f))return m;if(f.length===0)return u();l.forEach(function(b){var w=d(b);(0,e.addMatchingCardsToResults)(f,w,m)});var v=(0,a.findBestMatch)(m);return v?[v]:m}return p.getTypeInfo=function(f){return(0,i.clone)(d(f))},p.removeCard=function(f){var m=h(f);l.splice(m,1)},p.addCard=function(f){var m=h(f.type,!0);s[f.type]=f,m===-1&&l.push(f.type)},p.updateCard=function(f,m){var v=s[f]||t[f];if(!v)throw new Error('"'.concat(f,"\" is not a recognized type. Use `addCard` instead.'"));if(m.type&&v.type!==m.type)throw new Error("Cannot overwrite type parameter.");var b=(0,i.clone)(v);b=r(r({},b),m),s[b.type]=b},p.changeOrder=function(f,m){var v=h(f);l.splice(v,1),l.splice(m,0,f)},p.resetModifications=function(){l=(0,i.clone)(c),s={}},p.types=o,vt=p,vt}var Qe=gc();Qe.updateCard("visa",{lengths:[16]}),Qe.updateCard("unionpay",{gaps:[4,8,12,16]});const bc=(r,t)=>{const e=Qe.getTypeInfo(t),n=r.replace(/\D/g,""),a=(e==null?void 0:e.gaps)||[4,8,12],i=e?Math.max(...e.lengths)+a.length:19,s=[0].concat(a,n.length),o=[];for(let c=0;s[c]<n.length;c++){const l=s[c],d=Math.min(s[c+1],n.length);o.push(n.slice(l,d))}return o.join(" ").slice(0,i)},yc=(r,t)=>{const e=Qe.getTypeInfo(t),n=(e==null?void 0:e.code.size)||4;return r.replace(/\D/g,"").slice(0,n)},_c=r=>{const t=r.replace(/\D/g,"");let e=t.slice(0,2);if(!e)return"";const n=Number(e);if(e!=="01"){if(Number.isNaN(n))return"0";if(n===0||n===1)return`${n}`;if(n>12)return"1";e=n>9?`${n}`:`0${n}`}if(t.length<=2)return e;let a="";return t.length===6?a=t.slice(4,6):a=t.slice(2,4),`${e} / ${a}`};var he=(r=>(r.Invalid="invalid",r.Empty="empty",r.Incomplete="incomplete",r.Unsupported="unsupported",r.Expired="expired",r))(he||{}),Be=(r=>(r.Visa="visa",r.Mastercard="mastercard",r))(Be||{});const xt=[{name:"Visa",type:"visa",pattern:/^4/,minLength:16,maxLength:16},{name:"MasterCard",type:"mastercard",pattern:/^5[1-5]/,minLength:16,maxLength:16}],Xe=[{name:"American Express",pattern:/^3[47]/,minLength:15,maxLength:15},{name:"Discover",pattern:/^6(?:011|5[0-9]{2})/,minLength:16,maxLength:16},{name:"JCB",pattern:/^(?:2131|1800|35\d{3})/,minLength:15,maxLength:16},{name:"Diners Club",pattern:/^3(?:0[0-5]|[68][0-9])/,minLength:14,maxLength:16},{name:"Union Pay",pattern:/^62[^7]+/,minLength:16,maxLength:19},{name:"Maestro",pattern:/^(50[^69]|5[68]|5018|5020|5038|627|6304|6759|6761|6763|6[3][^6]+)/,minLength:12,maxLength:19}],Ec=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="American Express"))==null?void 0:t.pattern.test(r))!=null?e:!1},Cc=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="Discover"))==null?void 0:t.pattern.test(r))!=null?e:!1},wc=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="JCB"))==null?void 0:t.pattern.test(r))!=null?e:!1},Ac=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="Diners Club"))==null?void 0:t.pattern.test(r))!=null?e:!1},Tc=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="Union Pay"))==null?void 0:t.pattern.test(r))!=null?e:!1},Ic=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="Maestro"))==null?void 0:t.pattern.test(r))!=null?e:!1},Ci=r=>xt.find(t=>t.pattern.test(r))||null,wi=r=>xt.filter(t=>t.pattern.test(r)),xc=r=>{let t=0,e=!1;for(let n=r.length-1;n>=0;n--){let a=parseInt(r[n]);e&&(a*=2,a>9&&(a-=9)),t+=a,e=!e}return t%10===0},Ai=(r,t)=>{const e=r.replace(/\D/g,"");if(!e)return{isValid:!1,cardType:null,error:he.Empty};if(!/^\d+$/.test(e))return{isValid:!1,cardType:null,error:he.Invalid};if(Ec(e)||Cc(e)||wc(e)||Ac(e)||Tc(e)||Ic(e))return{isValid:!1,cardType:null,error:he.Unsupported};const n=Ci(e);if(n){if(e.length<n.minLength||e.length>n.maxLength)return{isValid:!1,cardType:n.name,error:he.Incomplete}}else if(e.length<16)return{isValid:!1,cardType:null,error:he.Incomplete};return n&&t&&!t.includes(n.type)?{isValid:!1,cardType:n.name,error:he.Unsupported}:xc(e)?{isValid:!0,cardType:(n==null?void 0:n.name)||null,error:null}:{isValid:!1,cardType:(n==null?void 0:n.name)||null,error:he.Invalid}},Oc=r=>{var t;return r?typeof r.amount!="number"?(console.error("Transaction amount is missing or invalid for Google Pay"),null):r.currency?r.country?r.merchant_id?r.checkout_config&&!((t=r.checkout_config)==null?void 0:t.find(({is_active:n,type:a})=>n&&a===W.GOOGLE_PAY))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:[]}:(console.error("Transaction merchant_id is missing for Google Pay"),null):(console.error("Transaction country is missing for Google Pay"),null):(console.error("Transaction currency is missing for Google Pay"),null):(console.error("TransactionConfig is missing for Google Pay"),null)},Nc=r=>{var t,e;return r?typeof r.amount!="number"?(console.error("Transaction amount is missing or invalid for Apple Pay"),null):r.currency?r.country?r.merchant_id?r.checkout_config&&!((t=r.checkout_config)==null?void 0:t.find(({is_active:a,type:i})=>a&&i===W.APPLE_PAY))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:((e=r.apple_pay_info)==null?void 0:e.line_items)||[]}:(console.error("Transaction merchant_id is missing for Apple Pay"),null):(console.error("Transaction country is missing for Apple Pay"),null):(console.error("Transaction currency is missing for Apple Pay"),null):(console.error("TransactionConfig is missing for Apple Pay"),null)},Pc=(r=[])=>r.reduce((t,e)=>{switch(e){case Be.Visa:return t.push("visa"),t;case Be.Mastercard:return t.push("masterCard"),t;default:return t}},[]),Lc=r=>({ar:"ar-AB",en:"en-US",cs:"cs-CZ",da:"da-DK",de:"de-DE",el:"el-GR",es:"es-ES",fi:"fi-FI",fr:"fr-FR",hr:"hr-HR",hu:"hu-HU",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",ms:"ms-MY",ru:"ru-RU",no:"no-NO",nl:"nl-NL",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",uk:"uk-UA",sk:"sk-SK",sv:"sv-SE",th:"th-TH",tr:"tr-TR",vi:"vi-VN",zh:"zh-CN"})[r]||"en-US",Rc=r=>({en:"en",ar:"ar",bg:"bg",ca:"ca",cs:"cs",da:"da",de:"de",el:"el",es:"es",et:"et",fi:"fi",fr:"fr",hr:"hr",id:"id",it:"it",ja:"ja",ko:"ko",ms:"ms",no:"no",ru:"ru",nl:"nl",pl:"pl",pt:"pt",sk:"sk",sl:"sl",sr:"sr",sv:"sv",th:"th",tr:"tr",ua:"uk",zh:"zh"})[r]||"en",kc=r=>({en:"en_US",ar:"ar_EG",cs:"cs_CZ",da:"da_DK",de:"de_DE",el:"el_GR",es:"es_ES",fi:"fi_FI",fr:"fr_FR",id:"id_ID",it:"it_IT",ja:"ja_JP",ko:"ko_KR",no:"no_NO",nl:"nl_NL",pl:"pl_PL",pt:"pt_BR",ru:"ru_RU",sv:"sv_SE",th:"th_TH",tr:"tr_TR",zh:"zh_CN",mt:"en_GB"})[r]||"en_US";var Ot={exports:{}},gt={};/**
8
+ `);A(this,"spinner",document.createElement("div"));this.spinner.setAttribute("role","status"),this.spinner.classList.add(ie.spinnerContainer),this.spinner.innerHTML=this.template}addClass(t){ae(this.spinner,t)}removeClass(t){this.spinner.classList.remove(t)}render(){return this.spinner}}const hi={loader:"_loader_nwq3e_1"};class uc{constructor(){A(this,"loader");this.loader=document.createElement("div"),this.loader.classList.add(hi.loader),this.loader.appendChild(new pi().render())}setClassName(t){t?ae(this.loader,t):this.loader.className=hi.loader}render(){return this.loader}}const be={checkout:"_checkout_15zm1_1",hidden:"_hidden_15zm1_8",formInitial:"_formInitial_15zm1_12",btnsInitial:"_btnsInitial_15zm1_21"},Ue={buttons:"_buttons_qc8am_1",hidden:"_hidden_qc8am_8",skeleton:"_skeleton_qc8am_12"},En={applePay:"_applePay_1wlwu_1",hidden:"_hidden_1wlwu_13"};function Cn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var wn,fi;function pc(){if(fi)return wn;fi=1;var r={visa:{niceType:"Visa",type:"visa",patterns:[4],gaps:[4,8,12],lengths:[16,18,19],code:{name:"CVV",size:3}},mastercard:{niceType:"Mastercard",type:"mastercard",patterns:[[51,55],[2221,2229],[223,229],[23,26],[270,271],2720],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},"american-express":{niceType:"American Express",type:"american-express",patterns:[34,37],gaps:[4,10],lengths:[15],code:{name:"CID",size:4}},"diners-club":{niceType:"Diners Club",type:"diners-club",patterns:[[300,305],36,38,39],gaps:[4,10],lengths:[14,16,19],code:{name:"CVV",size:3}},discover:{niceType:"Discover",type:"discover",patterns:[6011,[644,649],65],gaps:[4,8,12],lengths:[16,19],code:{name:"CID",size:3}},jcb:{niceType:"JCB",type:"jcb",patterns:[2131,1800,[3528,3589]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVV",size:3}},unionpay:{niceType:"UnionPay",type:"unionpay",patterns:[620,[62100,62182],[62184,62187],[62185,62197],[62200,62205],[622010,622999],622018,[62207,62209],[623,626],6270,6272,6276,[627700,627779],[627781,627799],[6282,6289],6291,6292,810,[8110,8131],[8132,8151],[8152,8163],[8164,8171]],gaps:[4,8,12],lengths:[14,15,16,17,18,19],code:{name:"CVN",size:3}},maestro:{niceType:"Maestro",type:"maestro",patterns:[493698,[5e5,504174],[504176,506698],[506779,508999],[56,59],63,67,6],gaps:[4,8,12],lengths:[12,13,14,15,16,17,18,19],code:{name:"CVC",size:3}},elo:{niceType:"Elo",type:"elo",patterns:[401178,401179,438935,457631,457632,431274,451416,457393,504175,[506699,506778],[509e3,509999],627780,636297,636368,[650031,650033],[650035,650051],[650405,650439],[650485,650538],[650541,650598],[650700,650718],[650720,650727],[650901,650978],[651652,651679],[655e3,655019],[655021,655058]],gaps:[4,8,12],lengths:[16],code:{name:"CVE",size:3}},mir:{niceType:"Mir",type:"mir",patterns:[[2200,2204]],gaps:[4,8,12],lengths:[16,17,18,19],code:{name:"CVP2",size:3}},hiper:{niceType:"Hiper",type:"hiper",patterns:[637095,63737423,63743358,637568,637599,637609,637612],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}},hipercard:{niceType:"Hipercard",type:"hipercard",patterns:[606282],gaps:[4,8,12],lengths:[16],code:{name:"CVC",size:3}}};return wn=r,wn}var ut={},pt={},mi;function vi(){if(mi)return pt;mi=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.clone=void 0;function r(t){return t?JSON.parse(JSON.stringify(t)):null}return pt.clone=r,pt}var ht={},gi;function hc(){if(gi)return ht;gi=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.matches=void 0;function r(n,a,i){var s=String(a).length,o=n.substr(0,s),c=parseInt(o,10);return a=parseInt(String(a).substr(0,o.length),10),i=parseInt(String(i).substr(0,o.length),10),c>=a&&c<=i}function t(n,a){return a=String(a),a.substring(0,n.length)===n.substring(0,a.length)}function e(n,a){return Array.isArray(a)?r(n,a[0],a[1]):t(n,a)}return ht.matches=e,ht}var bi;function fc(){if(bi)return ut;bi=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.addMatchingCardsToResults=void 0;var r=vi(),t=hc();function e(n,a,i){var s,o;for(s=0;s<a.patterns.length;s++){var c=a.patterns[s];if((0,t.matches)(n,c)){var l=(0,r.clone)(a);Array.isArray(c)?o=String(c[0]).length:o=String(c).length,n.length>=o&&(l.matchStrength=o),i.push(l);break}}}return ut.addMatchingCardsToResults=e,ut}var ft={},yi;function mc(){if(yi)return ft;yi=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.isValidInputType=void 0;function r(t){return typeof t=="string"||t instanceof String}return ft.isValidInputType=r,ft}var mt={},_i;function vc(){if(_i)return mt;_i=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.findBestMatch=void 0;function r(e){var n=e.filter(function(a){return a.matchStrength}).length;return n>0&&n===e.length}function t(e){return r(e)?e.reduce(function(n,a){return!n||Number(n.matchStrength)<Number(a.matchStrength)?a:n}):null}return mt.findBestMatch=t,mt}var vt,Ei;function gc(){if(Ei)return vt;Ei=1;var r=vt&&vt.__assign||function(){return r=Object.assign||function(f){for(var m,v=1,b=arguments.length;v<b;v++){m=arguments[v];for(var C in m)Object.prototype.hasOwnProperty.call(m,C)&&(f[C]=m[C])}return f},r.apply(this,arguments)},t=pc(),e=fc(),n=mc(),a=vc(),i=vi(),s={},o={VISA:"visa",MASTERCARD:"mastercard",AMERICAN_EXPRESS:"american-express",DINERS_CLUB:"diners-club",DISCOVER:"discover",JCB:"jcb",UNIONPAY:"unionpay",MAESTRO:"maestro",ELO:"elo",MIR:"mir",HIPER:"hiper",HIPERCARD:"hipercard"},c=[o.VISA,o.MASTERCARD,o.AMERICAN_EXPRESS,o.DINERS_CLUB,o.DISCOVER,o.JCB,o.UNIONPAY,o.MAESTRO,o.ELO,o.MIR,o.HIPER,o.HIPERCARD],l=(0,i.clone)(c);function d(f){return s[f]||t[f]}function u(){return l.map(function(f){return(0,i.clone)(d(f))})}function h(f,m){m===void 0&&(m=!1);var v=l.indexOf(f);if(!m&&v===-1)throw new Error('"'+f+'" is not a supported card type.');return v}function p(f){var m=[];if(!(0,n.isValidInputType)(f))return m;if(f.length===0)return u();l.forEach(function(b){var C=d(b);(0,e.addMatchingCardsToResults)(f,C,m)});var v=(0,a.findBestMatch)(m);return v?[v]:m}return p.getTypeInfo=function(f){return(0,i.clone)(d(f))},p.removeCard=function(f){var m=h(f);l.splice(m,1)},p.addCard=function(f){var m=h(f.type,!0);s[f.type]=f,m===-1&&l.push(f.type)},p.updateCard=function(f,m){var v=s[f]||t[f];if(!v)throw new Error('"'.concat(f,"\" is not a recognized type. Use `addCard` instead.'"));if(m.type&&v.type!==m.type)throw new Error("Cannot overwrite type parameter.");var b=(0,i.clone)(v);b=r(r({},b),m),s[b.type]=b},p.changeOrder=function(f,m){var v=h(f);l.splice(v,1),l.splice(m,0,f)},p.resetModifications=function(){l=(0,i.clone)(c),s={}},p.types=o,vt=p,vt}var Qe=gc();Qe.updateCard("visa",{lengths:[16]}),Qe.updateCard("unionpay",{gaps:[4,8,12,16]});const bc=(r,t)=>{const e=Qe.getTypeInfo(t),n=r.replace(/\D/g,""),a=(e==null?void 0:e.gaps)||[4,8,12],i=e?Math.max(...e.lengths)+a.length:19,s=[0].concat(a,n.length),o=[];for(let c=0;s[c]<n.length;c++){const l=s[c],d=Math.min(s[c+1],n.length);o.push(n.slice(l,d))}return o.join(" ").slice(0,i)},yc=(r,t)=>{const e=Qe.getTypeInfo(t),n=(e==null?void 0:e.code.size)||4;return r.replace(/\D/g,"").slice(0,n)},_c=r=>{const t=r.replace(/\D/g,"");let e=t.slice(0,2);if(!e)return"";const n=Number(e);if(e!=="01"){if(Number.isNaN(n))return"0";if(n===0||n===1)return`${n}`;if(n>12)return"1";e=n>9?`${n}`:`0${n}`}if(t.length<=2)return e;let a="";return t.length===6?a=t.slice(4,6):a=t.slice(2,4),`${e} / ${a}`};var he=(r=>(r.Invalid="invalid",r.Empty="empty",r.Incomplete="incomplete",r.Unsupported="unsupported",r.Expired="expired",r))(he||{}),Be=(r=>(r.Visa="visa",r.Mastercard="mastercard",r))(Be||{});const It=[{name:"Visa",type:"visa",pattern:/^4/,minLength:16,maxLength:16},{name:"MasterCard",type:"mastercard",pattern:/^5[1-5]/,minLength:16,maxLength:16}],Xe=[{name:"American Express",pattern:/^3[47]/,minLength:15,maxLength:15},{name:"Discover",pattern:/^6(?:011|5[0-9]{2})/,minLength:16,maxLength:16},{name:"JCB",pattern:/^(?:2131|1800|35\d{3})/,minLength:15,maxLength:16},{name:"Diners Club",pattern:/^3(?:0[0-5]|[68][0-9])/,minLength:14,maxLength:16},{name:"Union Pay",pattern:/^62[^7]+/,minLength:16,maxLength:19},{name:"Maestro",pattern:/^(50[^69]|5[68]|5018|5020|5038|627|6304|6759|6761|6763|6[3][^6]+)/,minLength:12,maxLength:19}],Ec=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="American Express"))==null?void 0:t.pattern.test(r))!=null?e:!1},Cc=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="Discover"))==null?void 0:t.pattern.test(r))!=null?e:!1},wc=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="JCB"))==null?void 0:t.pattern.test(r))!=null?e:!1},Ac=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="Diners Club"))==null?void 0:t.pattern.test(r))!=null?e:!1},Tc=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="Union Pay"))==null?void 0:t.pattern.test(r))!=null?e:!1},Ic=r=>{var t,e;return(e=(t=Xe.find(n=>n.name==="Maestro"))==null?void 0:t.pattern.test(r))!=null?e:!1},Ci=r=>It.find(t=>t.pattern.test(r))||null,wi=r=>It.filter(t=>t.pattern.test(r)),xc=r=>{let t=0,e=!1;for(let n=r.length-1;n>=0;n--){let a=parseInt(r[n]);e&&(a*=2,a>9&&(a-=9)),t+=a,e=!e}return t%10===0},Ai=(r,t)=>{const e=r.replace(/\D/g,"");if(!e)return{isValid:!1,cardType:null,error:he.Empty};if(!/^\d+$/.test(e))return{isValid:!1,cardType:null,error:he.Invalid};if(Ec(e)||Cc(e)||wc(e)||Ac(e)||Tc(e)||Ic(e))return{isValid:!1,cardType:null,error:he.Unsupported};const n=Ci(e);if(n){if(e.length<n.minLength||e.length>n.maxLength)return{isValid:!1,cardType:n.name,error:he.Incomplete}}else if(e.length<16)return{isValid:!1,cardType:null,error:he.Incomplete};return n&&t&&!t.includes(n.type)?{isValid:!1,cardType:n.name,error:he.Unsupported}:xc(e)?{isValid:!0,cardType:(n==null?void 0:n.name)||null,error:null}:{isValid:!1,cardType:(n==null?void 0:n.name)||null,error:he.Invalid}},Oc=r=>{var t;return r?typeof r.amount!="number"?(console.error("Transaction amount is missing or invalid for Google Pay"),null):r.currency?r.country?r.merchant_id?r.checkout_config&&!((t=r.checkout_config)==null?void 0:t.find(({is_active:n,type:a})=>n&&a===G.GOOGLE_PAY))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:[]}:(console.error("Transaction merchant_id is missing for Google Pay"),null):(console.error("Transaction country is missing for Google Pay"),null):(console.error("Transaction currency is missing for Google Pay"),null):(console.error("TransactionConfig is missing for Google Pay"),null)},Nc=r=>{var t,e;return r?typeof r.amount!="number"?(console.error("Transaction amount is missing or invalid for Apple Pay"),null):r.currency?r.country?r.merchant_id?r.checkout_config&&!((t=r.checkout_config)==null?void 0:t.find(({is_active:a,type:i})=>a&&i===G.APPLE_PAY))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:((e=r.apple_pay_info)==null?void 0:e.line_items)||[]}:(console.error("Transaction merchant_id is missing for Apple Pay"),null):(console.error("Transaction country is missing for Apple Pay"),null):(console.error("Transaction currency is missing for Apple Pay"),null):(console.error("TransactionConfig is missing for Apple Pay"),null)},Pc=(r=[])=>r.reduce((t,e)=>{switch(e){case Be.Visa:return t.push("visa"),t;case Be.Mastercard:return t.push("masterCard"),t;default:return t}},[]),Lc=r=>({ar:"ar-AB",en:"en-US",cs:"cs-CZ",da:"da-DK",de:"de-DE",el:"el-GR",es:"es-ES",fi:"fi-FI",fr:"fr-FR",hr:"hr-HR",hu:"hu-HU",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",ms:"ms-MY",ru:"ru-RU",no:"no-NO",nl:"nl-NL",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",uk:"uk-UA",sk:"sk-SK",sv:"sv-SE",th:"th-TH",tr:"tr-TR",vi:"vi-VN",zh:"zh-CN"})[r]||"en-US",Rc=r=>({en:"en",ar:"ar",bg:"bg",ca:"ca",cs:"cs",da:"da",de:"de",el:"el",es:"es",et:"et",fi:"fi",fr:"fr",hr:"hr",id:"id",it:"it",ja:"ja",ko:"ko",ms:"ms",no:"no",ru:"ru",nl:"nl",pl:"pl",pt:"pt",sk:"sk",sl:"sl",sr:"sr",sv:"sv",th:"th",tr:"tr",ua:"uk",zh:"zh"})[r]||"en",kc=r=>({en:"en_US",ar:"ar_EG",cs:"cs_CZ",da:"da_DK",de:"de_DE",el:"el_GR",es:"es_ES",fi:"fi_FI",fr:"fr_FR",id:"id_ID",it:"it_IT",ja:"ja_JP",ko:"ko_KR",no:"no_NO",nl:"nl_NL",pl:"pl_PL",pt:"pt_BR",ru:"ru_RU",sv:"sv_SE",th:"th_TH",tr:"tr_TR",zh:"zh_CN",mt:"en_GB"})[r]||"en_US";var xt={exports:{}},gt={};/**
9
9
  * @license React
10
10
  * react-jsx-runtime.production.js
11
11
  *
@@ -21,12 +21,12 @@
21
21
  *
22
22
  * This source code is licensed under the MIT license found in the
23
23
  * LICENSE file in the root directory of this source tree.
24
- */var Ii;function Mc(){return Ii||(Ii=1,process.env.NODE_ENV!=="production"&&function(){function r(g){if(g==null)return null;if(typeof g=="function")return g.$$typeof===G?null:g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case m:return"Fragment";case b:return"Profiler";case v:return"StrictMode";case I:return"Suspense";case L:return"SuspenseList";case B:return"Activity"}if(typeof g=="object")switch(typeof g.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),g.$$typeof){case f:return"Portal";case x:return(g.displayName||"Context")+".Provider";case w:return(g._context.displayName||"Context")+".Consumer";case O:var R=g.render;return g=g.displayName,g||(g=R.displayName||R.name||"",g=g!==""?"ForwardRef("+g+")":"ForwardRef"),g;case N:return R=g.displayName||null,R!==null?R:r(g.type)||"Memo";case S:R=g._payload,g=g._init;try{return r(g(R))}catch(V){}}return null}function t(g){return""+g}function e(g){try{t(g);var R=!1}catch(T){R=!0}if(R){R=console;var V=R.error,y=typeof Symbol=="function"&&Symbol.toStringTag&&g[Symbol.toStringTag]||g.constructor.name||"Object";return V.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",y),t(g)}}function n(g){if(g===m)return"<>";if(typeof g=="object"&&g!==null&&g.$$typeof===S)return"<...>";try{var R=r(g);return R?"<"+R+">":"<...>"}catch(V){return"<...>"}}function a(){var g=$.A;return g===null?null:g.getOwner()}function i(){return Error("react-stack-top-frame")}function s(g){if(F.call(g,"key")){var R=Object.getOwnPropertyDescriptor(g,"key").get;if(R&&R.isReactWarning)return!1}return g.key!==void 0}function o(g,R){function V(){ee||(ee=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",R))}V.isReactWarning=!0,Object.defineProperty(g,"key",{get:V,configurable:!0})}function c(){var g=r(this.type);return M[g]||(M[g]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),g=this.props.ref,g!==void 0?g:null}function l(g,R,V,y,T,_,P,D){return V=_.ref,g={$$typeof:p,type:g,key:R,props:_,_owner:T},(V!==void 0?V:null)!==null?Object.defineProperty(g,"ref",{enumerable:!1,get:c}):Object.defineProperty(g,"ref",{enumerable:!1,value:null}),g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(g,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(g,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.defineProperty(g,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g}function d(g,R,V,y,T,_,P,D){var C=R.children;if(C!==void 0)if(y)if(j(C)){for(y=0;y<C.length;y++)u(C[y]);Object.freeze&&Object.freeze(C)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(C);if(F.call(R,"key")){C=r(g);var z=Object.keys(R).filter(function(le){return le!=="key"});y=0<z.length?"{key: someKey, "+z.join(": ..., ")+": ...}":"{key: someKey}",E[C+y]||(z=0<z.length?"{"+z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
24
+ */var Ii;function Mc(){return Ii||(Ii=1,process.env.NODE_ENV!=="production"&&function(){function r(g){if(g==null)return null;if(typeof g=="function")return g.$$typeof===W?null:g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case m:return"Fragment";case b:return"Profiler";case v:return"StrictMode";case I:return"Suspense";case L:return"SuspenseList";case B:return"Activity"}if(typeof g=="object")switch(typeof g.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),g.$$typeof){case f:return"Portal";case x:return(g.displayName||"Context")+".Provider";case C:return(g._context.displayName||"Context")+".Consumer";case N:var R=g.render;return g=g.displayName,g||(g=R.displayName||R.name||"",g=g!==""?"ForwardRef("+g+")":"ForwardRef"),g;case O:return R=g.displayName||null,R!==null?R:r(g.type)||"Memo";case k:R=g._payload,g=g._init;try{return r(g(R))}catch(V){}}return null}function t(g){return""+g}function e(g){try{t(g);var R=!1}catch(T){R=!0}if(R){R=console;var V=R.error,y=typeof Symbol=="function"&&Symbol.toStringTag&&g[Symbol.toStringTag]||g.constructor.name||"Object";return V.call(R,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",y),t(g)}}function n(g){if(g===m)return"<>";if(typeof g=="object"&&g!==null&&g.$$typeof===k)return"<...>";try{var R=r(g);return R?"<"+R+">":"<...>"}catch(V){return"<...>"}}function a(){var g=$.A;return g===null?null:g.getOwner()}function i(){return Error("react-stack-top-frame")}function s(g){if(F.call(g,"key")){var R=Object.getOwnPropertyDescriptor(g,"key").get;if(R&&R.isReactWarning)return!1}return g.key!==void 0}function o(g,R){function V(){ee||(ee=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",R))}V.isReactWarning=!0,Object.defineProperty(g,"key",{get:V,configurable:!0})}function c(){var g=r(this.type);return M[g]||(M[g]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),g=this.props.ref,g!==void 0?g:null}function l(g,R,V,y,T,_,P,D){return V=_.ref,g={$$typeof:p,type:g,key:R,props:_,_owner:T},(V!==void 0?V:null)!==null?Object.defineProperty(g,"ref",{enumerable:!1,get:c}):Object.defineProperty(g,"ref",{enumerable:!1,value:null}),g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(g,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(g,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.defineProperty(g,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:D}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g}function d(g,R,V,y,T,_,P,D){var w=R.children;if(w!==void 0)if(y)if(j(w)){for(y=0;y<w.length;y++)u(w[y]);Object.freeze&&Object.freeze(w)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(w);if(F.call(R,"key")){w=r(g);var z=Object.keys(R).filter(function(le){return le!=="key"});y=0<z.length?"{key: someKey, "+z.join(": ..., ")+": ...}":"{key: someKey}",E[w+y]||(z=0<z.length?"{"+z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
25
25
  let props = %s;
26
26
  <%s {...props} />
27
27
  React keys must be passed directly to JSX without using spread:
28
28
  let props = %s;
29
- <%s key={someKey} {...props} />`,y,C,z,C),E[C+y]=!0)}if(C=null,V!==void 0&&(e(V),C=""+V),s(R)&&(e(R.key),C=""+R.key),"key"in R){V={};for(var Z in R)Z!=="key"&&(V[Z]=R[Z])}else V=R;return C&&o(V,typeof g=="function"?g.displayName||g.name||"Unknown":g),l(g,C,_,T,a(),V,P,D)}function u(g){typeof g=="object"&&g!==null&&g.$$typeof===p&&g._store&&(g._store.validated=1)}var h=re,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),x=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),G=Symbol.for("react.client.reference"),$=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,j=Array.isArray,H=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(g){return g()}};var ee,M={},q=h.react_stack_bottom_frame.bind(h,i)(),Y=H(n(i)),E={};bt.Fragment=m,bt.jsx=function(g,R,V,y,T){var _=1e4>$.recentlyCreatedOwnerStacks++;return d(g,R,V,!1,y,T,_?Error("react-stack-top-frame"):q,_?H(n(g)):Y)},bt.jsxs=function(g,R,V,y,T){var _=1e4>$.recentlyCreatedOwnerStacks++;return d(g,R,V,!0,y,T,_?Error("react-stack-top-frame"):q,_?H(n(g)):Y)}}()),bt}var xi;function Dc(){return xi||(xi=1,process.env.NODE_ENV==="production"?Ot.exports=Sc():Ot.exports=Mc()),Ot.exports}Dc();const Vc=[Be.Mastercard,Be.Visa],Nt=(r,t)=>(console.error("Error: ",r),t.status.error);class Fc{constructor(t){A(this,"element");A(this,"events",{ready:new de});A(this,"ev");A(this,"customButtonStyles");A(this,"isInitialized",!1);A(this,"onPaymentAttempt");this.config=t;const e=this.config.state.styles.getState().ApplePayButton;this.onPaymentAttempt=this.config.state.checkout.getState().onCheckoutAttempt,this.ev=this.config.service.ev,this.customButtonStyles=e,this.element=document.createElement("div"),this.element.classList.add(En.applePay,En.hidden)}init(t){return K(this,null,function*(){if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.translate.locale(),a=Nc(e);if(!a)return!1;const i=t?J(U({},t),{onError:s=>{var c,l;if(!this.isInitialized){console.error("Apple Pay error:",s);return}const o=this.config.state.translate.messages();s!=null&&s.toLowerCase().includes("cancelled")?(c=t.onCancel)==null||c.call(t):(Nt(s,o),(l=t.onError)==null||l.call(t,s))},onSuccess:s=>{var o;(o=t.onSuccess)==null||o.call(t,s)}}):void 0;return yield this.ev.initApple(J(U({},i),{transaction:a,supportedCardTypes:Pc(Vc),locale:Lc(n||"en"),onPaymentAttempt:this.onPaymentAttempt}),this.customButtonStyles),this.ev.isAppleAvailable()?(yield this.ev.renderApple(this.element),this.isInitialized=!0,this.element.classList.remove(En.hidden),this.events.ready.emit(),!0):!1})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}const Uc=[{type:W.PAYPAL,is_active:!1,order:1},{type:W.APPLE_PAY,is_active:!1,order:2},{type:W.GOOGLE_PAY,is_active:!1,order:3},{type:W.VENMO,is_active:!1,order:4},{type:W.CARD,is_active:!0,order:5}],Ze={open:{y:0,opacity:1},close:{y:100,opacity:0},transition:{duration:.25,ease:"easeOut"}},Pt={open:{y:0,opacity:1},close:{y:-100,opacity:0},transition:{duration:.25,ease:"easeOut"}},me={open:{y:0,opacity:1},close:{y:15,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},_e={open:{y:0,opacity:1,height:"auto"},close:{y:-15,opacity:0,height:0},transition:{duration:.25,type:"spring",bounce:0}},An={googlePay:"_googlePay_17y0j_1",hidden:"_hidden_17y0j_19"};class Bc{constructor(t){A(this,"element");A(this,"events",{ready:new de});A(this,"ev");A(this,"customButtonStyles");A(this,"isInitialized",!1);A(this,"onPaymentAttempt");this.config=t,this.ev=this.config.service.ev,this.customButtonStyles=this.config.state.styles.getState().GooglePayButton,this.onPaymentAttempt=this.config.state.checkout.getState().onCheckoutAttempt,this.element=document.createElement("div"),this.element.classList.add(An.googlePay,An.hidden)}init(t){return K(this,null,function*(){if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.translate.locale(),a=Oc(e);if(!a)return!1;const i=t?J(U({},t),{onError:s=>{var o;if(!this.isInitialized){console.error("Google Pay error:",s);return}Nt(s,this.config.state.translate.messages()),(o=t.onError)==null||o.call(t,s)},onSuccess:s=>{var o;(o=t.onSuccess)==null||o.call(t,s)}}):void 0;return yield this.ev.initGoogle(J(U({},i),{transaction:a,locale:Rc(n||"en"),onPaymentAttempt:this.onPaymentAttempt}),this.customButtonStyles),yield this.ev.renderGoogle(this.element),this.element.classList.remove(An.hidden),this.isInitialized=!0,this.events.ready.emit(),!0})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}const Tn={paypal:"_paypal_iyh6g_1",hidden:"_hidden_iyh6g_7"};class zc{constructor(t){A(this,"element");A(this,"events",{ready:new de,onPaymentAttempt:new de});A(this,"paypal");A(this,"customButtonStyles");A(this,"isInitialized",!1);A(this,"attemptEmitted",!1);A(this,"interceptOverlay");this.config=t,this.paypal=this.config.service.paypal,this.customButtonStyles=this.config.state.styles.getState().PayPalButton,this.element=document.createElement("div"),this.element.classList.add(Tn.paypal,Tn.hidden)}init(t){return K(this,null,function*(){var s,o;if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.checkout.getState(),a=()=>K(this,null,function*(){try{return yield ta(n.clientToken,n.environment,n.apiVersion)}catch(c){throw c}});if(!e||Object.keys(e).length===0)return console.error("PayPal transaction data is empty or invalid"),!1;if(!((s=e==null?void 0:e.paypal_info)!=null&&s.client_id))return!1;try{if(yield this.paypal.init({clientId:e.paypal_info.client_id,environment:e.paypal_info.environment||"sandbox",vault:!0,locale:kc(this.config.state.translate.locale()),intent:"tokenize"}),!this.paypal.isLoaded())return!1}catch(c){return!1}const i=t?J(U({},t),{onError:c=>{var d,u;if(this.emitAttemptOnce(),!this.isInitialized){console.error("PayPal error:",c);return}!this.isUserCancellationError(c)&&c?(d=t.onError)==null||d.call(t,c):(u=t.onCancel)==null||u.call(t),this.attemptEmitted=!1},onCancel:()=>{var c;this.emitAttemptOnce(),(c=t.onCancel)==null||c.call(t),this.attemptEmitted=!1},onSuccess:c=>{var l;(l=t.onSuccess)==null||l.call(t,c),this.attemptEmitted=!1}}):void 0;try{yield this.paypal.render(this.element,J(U({},i),{createBillingAgreement:a,onClick:()=>{this.emitAttemptOnce()},onApprove:l=>K(this,[l],function*({billingToken:c}){var d;(d=i==null?void 0:i.onSuccess)==null||d.call(i,c||"")}),style:(o=this.customButtonStyles)==null?void 0:o.styles,onCancel:()=>{var c;(c=i==null?void 0:i.onCancel)==null||c.call(i)},onError:c=>{var d,u;const l=this.isUserCancellationError(c);!l&&c?(d=i==null?void 0:i.onError)==null||d.call(i,c):l&&((u=i==null?void 0:i.onCancel)==null||u.call(i))}}))}catch(c){return!1}return this.setupInterceptOverlay(),this.element.classList.remove(Tn.hidden),this.isInitialized=!0,this.events.ready.emit(),!0})}addEventListener(t,e){return this.events[t].addListener(e)}emitAttemptOnce(){this.attemptEmitted||(this.attemptEmitted=!0,this.events.onPaymentAttempt.emit(W.PAYPAL))}isUserCancellationError(t){var a;if(!t)return!1;const e=typeof t=="string"?t:(t==null?void 0:t.message)||((a=t==null?void 0:t.status_reason)==null?void 0:a.message)||"";return["window is closed","window closed","popup closed","user closed","cancelled by user","user cancelled","popup close"].some(i=>e.toLowerCase().includes(i))}setupInterceptOverlay(){if(this.interceptOverlay)return;this.element.style.position=this.element.style.position||"relative";const t=document.createElement("div");t.style.position="absolute",t.style.inset="0",t.style.background="transparent",t.style.zIndex="2",t.style.pointerEvents="auto";const e=()=>{this.emitAttemptOnce(),t.style.pointerEvents="none",setTimeout(()=>{t.style.pointerEvents="auto"},250)};t.addEventListener("pointerdown",e,{capture:!0}),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&e()},{capture:!0}),this.element.appendChild(t),this.interceptOverlay=t}render(){return this.element}}class jc{constructor(){A(this,"template",`
29
+ <%s key={someKey} {...props} />`,y,w,z,w),E[w+y]=!0)}if(w=null,V!==void 0&&(e(V),w=""+V),s(R)&&(e(R.key),w=""+R.key),"key"in R){V={};for(var Z in R)Z!=="key"&&(V[Z]=R[Z])}else V=R;return w&&o(V,typeof g=="function"?g.displayName||g.name||"Unknown":g),l(g,w,_,T,a(),V,P,D)}function u(g){typeof g=="object"&&g!==null&&g.$$typeof===p&&g._store&&(g._store.validated=1)}var h=re,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),x=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),W=Symbol.for("react.client.reference"),$=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,j=Array.isArray,H=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(g){return g()}};var ee,M={},q=h.react_stack_bottom_frame.bind(h,i)(),Y=H(n(i)),E={};bt.Fragment=m,bt.jsx=function(g,R,V,y,T){var _=1e4>$.recentlyCreatedOwnerStacks++;return d(g,R,V,!1,y,T,_?Error("react-stack-top-frame"):q,_?H(n(g)):Y)},bt.jsxs=function(g,R,V,y,T){var _=1e4>$.recentlyCreatedOwnerStacks++;return d(g,R,V,!0,y,T,_?Error("react-stack-top-frame"):q,_?H(n(g)):Y)}}()),bt}var xi;function Dc(){return xi||(xi=1,process.env.NODE_ENV==="production"?xt.exports=Sc():xt.exports=Mc()),xt.exports}Dc();const Vc=[Be.Mastercard,Be.Visa],Ot=(r,t)=>(console.error("Error: ",r),t.status.error);class Fc{constructor(t){A(this,"element");A(this,"events",{ready:new ue});A(this,"ev");A(this,"customButtonStyles");A(this,"isInitialized",!1);A(this,"onPaymentAttempt");this.config=t;const e=this.config.state.styles.getState().ApplePayButton;this.onPaymentAttempt=this.config.state.checkout.getState().onCheckoutAttempt,this.ev=this.config.service.ev,this.customButtonStyles=e,this.element=document.createElement("div"),this.element.classList.add(En.applePay,En.hidden)}init(t){return K(this,null,function*(){if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.translate.locale(),a=Nc(e);if(!a)return!1;const i=t?J(U({},t),{onError:s=>{var c,l;if(!this.isInitialized){console.error("Apple Pay error:",s);return}const o=this.config.state.translate.messages();s!=null&&s.toLowerCase().includes("cancelled")?(c=t.onCancel)==null||c.call(t):(Ot(s,o),(l=t.onError)==null||l.call(t,s))},onSuccess:s=>{var o;(o=t.onSuccess)==null||o.call(t,s)}}):void 0;return yield this.ev.initApple(J(U({},i),{transaction:a,supportedCardTypes:Pc(Vc),locale:Lc(n||"en"),onPaymentAttempt:this.onPaymentAttempt}),this.customButtonStyles),this.ev.isAppleAvailable()?(yield this.ev.renderApple(this.element),this.isInitialized=!0,this.element.classList.remove(En.hidden),this.events.ready.emit(),!0):!1})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}const Uc=[{type:G.PAYPAL,is_active:!1,order:1},{type:G.APPLE_PAY,is_active:!1,order:2},{type:G.GOOGLE_PAY,is_active:!1,order:3},{type:G.VENMO,is_active:!1,order:4},{type:G.CARD,is_active:!0,order:5}],Ze={open:{y:0,opacity:1},close:{y:100,opacity:0},transition:{duration:.25,ease:"easeOut"}},Nt={open:{y:0,opacity:1},close:{y:-100,opacity:0},transition:{duration:.25,ease:"easeOut"}},me={open:{y:0,opacity:1},close:{y:15,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},_e={open:{y:0,opacity:1,height:"auto"},close:{y:-15,opacity:0,height:0},transition:{duration:.25,type:"spring",bounce:0}},An={googlePay:"_googlePay_17y0j_1",hidden:"_hidden_17y0j_19"};class Bc{constructor(t){A(this,"element");A(this,"events",{ready:new ue});A(this,"ev");A(this,"customButtonStyles");A(this,"isInitialized",!1);A(this,"onPaymentAttempt");this.config=t,this.ev=this.config.service.ev,this.customButtonStyles=this.config.state.styles.getState().GooglePayButton,this.onPaymentAttempt=this.config.state.checkout.getState().onCheckoutAttempt,this.element=document.createElement("div"),this.element.classList.add(An.googlePay,An.hidden)}init(t){return K(this,null,function*(){if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.translate.locale(),a=Oc(e);if(!a)return!1;const i=t?J(U({},t),{onError:s=>{var o;if(!this.isInitialized){console.error("Google Pay error:",s);return}Ot(s,this.config.state.translate.messages()),(o=t.onError)==null||o.call(t,s)},onSuccess:s=>{var o;(o=t.onSuccess)==null||o.call(t,s)}}):void 0;return yield this.ev.initGoogle(J(U({},i),{transaction:a,locale:Rc(n||"en"),onPaymentAttempt:this.onPaymentAttempt}),this.customButtonStyles),yield this.ev.renderGoogle(this.element),this.element.classList.remove(An.hidden),this.isInitialized=!0,this.events.ready.emit(),!0})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}const Tn={paypal:"_paypal_iyh6g_1",hidden:"_hidden_iyh6g_7"};class zc{constructor(t){A(this,"element");A(this,"events",{ready:new ue,onPaymentAttempt:new ue});A(this,"paypal");A(this,"customButtonStyles");A(this,"isInitialized",!1);this.config=t,this.paypal=this.config.service.paypal,this.customButtonStyles=this.config.state.styles.getState().PayPalButton,this.element=document.createElement("div"),this.element.classList.add(Tn.paypal,Tn.hidden)}init(t){return K(this,null,function*(){var s,o;if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.checkout.getState(),a=()=>K(this,null,function*(){try{return yield ta(n.clientToken,n.environment,n.apiVersion)}catch(c){throw c}});if(!e||Object.keys(e).length===0)return console.error("PayPal transaction data is empty or invalid"),!1;if(!((s=e==null?void 0:e.paypal_info)!=null&&s.client_id))return!1;try{if(yield this.paypal.init({clientId:e.paypal_info.client_id,environment:e.paypal_info.environment||"sandbox",vault:!0,locale:kc(this.config.state.translate.locale()),intent:"tokenize"}),!this.paypal.isLoaded())return!1}catch(c){return!1}const i=t?J(U({},t),{onError:c=>{var d,u;if(!this.isInitialized){console.error("PayPal error:",c);return}!this.isUserCancellationError(c)&&c?(d=t.onError)==null||d.call(t,c):(u=t.onCancel)==null||u.call(t)},onCancel:()=>{var c;(c=t.onCancel)==null||c.call(t)},onSuccess:c=>{var l;(l=t.onSuccess)==null||l.call(t,c)}}):void 0;try{yield this.paypal.render(this.element,J(U({},i),{createBillingAgreement:a,onApprove:l=>K(this,[l],function*({billingToken:c}){var d;this.events.onPaymentAttempt.emit(G.PAYPAL),(d=i==null?void 0:i.onSuccess)==null||d.call(i,c||"")}),style:(o=this.customButtonStyles)==null?void 0:o.styles,onCancel:()=>{var c;(c=i==null?void 0:i.onCancel)==null||c.call(i)},onError:c=>{var d,u;const l=this.isUserCancellationError(c);!l&&c?(d=i==null?void 0:i.onError)==null||d.call(i,c):l&&((u=i==null?void 0:i.onCancel)==null||u.call(i))}}))}catch(c){return!1}return this.element.classList.remove(Tn.hidden),this.isInitialized=!0,this.events.ready.emit(),!0})}addEventListener(t,e){return this.events[t].addListener(e)}isUserCancellationError(t){var a;if(!t)return!1;const e=typeof t=="string"?t:(t==null?void 0:t.message)||((a=t==null?void 0:t.status_reason)==null?void 0:a.message)||"";return["window is closed","window closed","popup closed","user closed","cancelled by user","user cancelled","popup close"].some(i=>e.toLowerCase().includes(i))}render(){return this.element}}class jc{constructor(){A(this,"template",`
30
30
  <svg xmlns="http://www.w3.org/2000/svg"
31
31
  width="24"
32
32
  height="24"
@@ -41,10 +41,10 @@ React keys must be passed directly to JSX without using spread:
41
41
  <line x1="1" y1="10" x2="23" y2="10"></line>
42
42
  </svg>
43
43
  <span class="${ie.srOnly}">Pay with</span>
44
- `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.card),this.element.innerHTML=this.template}render(){return this.element}}const Oi={button:"_button_1trim_1"};class Hc{constructor(t){A(this,"element");A(this,"icon",new jc);this.config=t;const e=this.config.state.styles.getState().WalletButton,n=this.config.state.translate;this.element=document.createElement("button"),this.element.classList.add(Oi.button,Oi.press),e!=null&&e.className&&ae(this.element,e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles);const a=document.createElement("span");a.textContent=n.getState().messages.card.compact.button,this.element.append(this.icon.render(),a),n.subscribe(({messages:i})=>{a.textContent=i.card.compact.button})}addEventListener(t){return this.element.addEventListener("click",t)}render(){return this.element}}const Kc=(r,t,e)=>t.concat(r.filter(n=>t.every(a=>!e(n,a)))),Lt={container:"_container_10ziz_2",venmo:"_venmo_10ziz_8",hidden:"_hidden_10ziz_35"},Yc={display:"flex",height:40,borderRadius:12},Wc=`<svg viewBox="2.3 484.3 611.9 117.80000000000001" xmlns="http://www.w3.org/2000/svg">
44
+ `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.card),this.element.innerHTML=this.template}render(){return this.element}}const Oi={button:"_button_1trim_1"};class Hc{constructor(t){A(this,"element");A(this,"icon",new jc);this.config=t;const e=this.config.state.styles.getState().WalletButton,n=this.config.state.translate;this.element=document.createElement("button"),this.element.classList.add(Oi.button,Oi.press),e!=null&&e.className&&ae(this.element,e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles);const a=document.createElement("span");a.textContent=n.getState().messages.card.compact.button,this.element.append(this.icon.render(),a),n.subscribe(({messages:i})=>{a.textContent=i.card.compact.button})}addEventListener(t){return this.element.addEventListener("click",t)}render(){return this.element}}const Kc=(r,t,e)=>t.concat(r.filter(n=>t.every(a=>!e(n,a)))),Pt={container:"_container_10ziz_2",venmo:"_venmo_10ziz_8",hidden:"_hidden_10ziz_35"},Wc={display:"flex",height:40,borderRadius:12},Yc=`<svg viewBox="2.3 484.3 611.9 117.80000000000001" xmlns="http://www.w3.org/2000/svg">
45
45
  <path d="M103.1 485.8c4.2 7 5.7 14 5.7 22.4 0 28-23.8 65.9-43.4 91.1H20.5L2.3 491.5l40.6-2.8 9.8 77.1c8.4-14 19.7-37.9 19.7-53.2 0-8.4-1.4-14-4.2-19.7zm51.8 47.7c7 0 25.2-2.8 25.2-14 0-5.7-2.8-7-7-7-8.3 0-18.2 8.4-18.2 21zm-1.3 21c0 12.7 7 18.2 16.8 18.2s19.7-2.8 32.2-8.4l-5.7 30.8c-8.4 4.2-22.4 7-36.4 7-33.5 0-46.2-21-46.2-46.2 0-33.5 19.7-68.6 60.2-68.6 22.4 0 35 12.7 35 30.8 1.5 26.6-35 36.4-55.9 36.4zM324.4 511c0 4.2 0 9.8-1.4 14l-11.2 74.2H274l11.2-68.6c0-1.4 1.4-5.7 1.4-7 0-5.7-2.8-5.7-7-5.7-5.7 0-9.8 2.8-12.7 4.2l-14 77.1H215l16.8-112.1h33.5v8.4c8.4-5.7 18.2-11.2 32.2-11.2 19.9 3 26.9 12.7 26.9 26.7zm113.4-12.5c11.2-8.4 21-12.7 35-12.7 19.7 0 26.7 9.8 26.7 25.2 0 4.2 0 9.8-1.4 14L487 599.3h-37.9l11.2-70v-5.7c0-5.7-2.8-7-7-7s-9.8 1.4-12.7 4.2L428 599.2h-37.9l11.2-70v-5.7c0-5.7-2.8-7-7-7-5.7 0-9.8 2.8-12.7 4.2L369 599h-37.9L348 487h32.2l1.4 9.8c7-5.7 18.2-11.2 32.2-11.2 11.4 1.7 19.7 5.9 24 12.9zM575 532.1c0-9.8-2.8-15.4-9.8-15.4-15.4 0-18.2 26.7-18.2 40.6 0 9.8 2.8 16.8 9.8 16.8 15.5-1.4 18.2-29.4 18.2-42zm-65.8 22.4c0-35 18.2-68.6 61.6-68.6 32.2 0 43.4 19.7 43.4 44.9 0 35-18.2 70-61.6 70-32.2 1.3-43.4-19.7-43.4-46.3z"
46
46
  fill="currentColor"/>
47
- </svg>`;class Gc{constructor(t){A(this,"isProcessing",!1);A(this,"container");A(this,"venmoButton");A(this,"events",{ready:new de,onPaymentAttempt:new de});A(this,"braintree");A(this,"isInitialized",!1);this.config=t,this.braintree=this.config.service.braintree;const e=this.config.state.styles.getState().BraintreeButton;this.container=document.createElement("div"),this.container.classList.add(Lt.container),this.venmoButton=document.createElement("button"),this.venmoButton.classList.add(Lt.venmo,Lt.hidden),e!=null&&e.className&&ae(this.venmoButton,e.className),e!=null&&e.styles&&Object.assign(this.venmoButton.style,e.styles),this.venmoButton.setAttribute("aria-label","Venmo"),this.venmoButton.innerHTML=Wc,this.container.append(this.venmoButton)}init(t){return K(this,null,function*(){var n;if(!this.config)return!1;const e=this.config.state.transaction.getState();if(!e||Object.keys(e).length===0)return!1;try{return yield this.braintree.init({authorization:((n=e==null?void 0:e.brain_tree_info)==null?void 0:n.client_token)||""}),yield this.braintree.createVenmo({}),this.braintree.isBrowserSupported()?(this.displayVenmoButton(t),this.braintree.hasTokenizationResult()?(yield this.handleExistingTokenization(t),!1):(this.venmoButton.classList.remove(Lt.hidden),this.isInitialized=!0,this.events.ready.emit(),!0)):(this.handleVenmoError(new Error("Browser does not support Venmo")),!1)}catch(a){return this.handleVenmoError(a),!1}})}displayVenmoButton(t){Object.assign(this.venmoButton.style,Yc),this.venmoButton.addEventListener("click",()=>K(this,null,function*(){if(this.events.onPaymentAttempt.emit(W.VENMO),!this.isProcessing){this.isProcessing=!0,this.venmoButton.disabled=!0;try{const e=yield this.braintree.tokenize();this.handleVenmoSuccess(e,t)}catch(e){this.handleVenmoError(e,t)}finally{this.isProcessing=!1,this.venmoButton.disabled=!1}}}))}handleExistingTokenization(t){return K(this,null,function*(){try{const e=yield this.braintree.tokenize();this.handleVenmoSuccess(e,t)}catch(e){this.handleVenmoError(e,t)}})}handleVenmoSuccess(t,e){var n;(n=e.onSuccess)==null||n.call(e,t)}handleVenmoError(t,e){var n,a,i;this.isInitialized&&((n=t==null?void 0:t.message)!=null&&n.toLowerCase().includes("close")?(a=e==null?void 0:e.onCancel)==null||a.call(e):(i=e==null?void 0:e.onError)==null||i.call(e,t))}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.container}}class $c{constructor(t){A(this,"attempted",new Set);A(this,"buttons");A(this,"applePay");A(this,"googlePay");A(this,"paypal");A(this,"card");A(this,"braintree");A(this,"events",{onFormLoaded:new de,ready:new de,open:new de,error:new de,cancel:new de,success:new de,onPaymentAttempt:new de});this.config=t,this.buttons=document.createElement("div"),this.buttons.classList.add(Ue.buttons,Ue.hidden)}init(){return K(this,null,function*(){this.config.service.ev.addEventListener("ready",()=>{this.initPaymentMethods().catch(console.error)})})}initApple(t){return K(this,null,function*(){if(!this.applePay){t==null||t.remove();return}t==null||t.classList.add(Ue.skeleton);try{if(yield this.applePay.init({onError:n=>{this.events.error.emit(n),console.log("Apple Pay error:",n),t==null||t.remove(),this.attempted.delete(W.APPLE_PAY)},onCancel:()=>{this.events.cancel.emit(),this.attempted.delete(W.APPLE_PAY)},onSuccess:n=>{this.events.success.emit(J(U({},n),{type:"apple"})),this.attempted.delete(W.APPLE_PAY)}})){const n=this.applePay.render();t==null||t.appendChild(n);const a=()=>{this.attempted.has(W.APPLE_PAY)||(this.attempted.add(W.APPLE_PAY),this.events.onPaymentAttempt.emit(W.APPLE_PAY))};n.addEventListener("pointerdown",a,{capture:!0}),n.addEventListener("click",a,{capture:!0}),n.addEventListener("keydown",i=>{((i==null?void 0:i.key)==="Enter"||(i==null?void 0:i.key)===" ")&&a()},{capture:!0}),n.addEventListener("focusin",a,{capture:!0}),t==null||t.addEventListener("pointerdown",a,{capture:!0}),t==null||t.addEventListener("click",a,{capture:!0}),t==null||t.addEventListener("focusin",a,{capture:!0})}else t==null||t.remove()}catch(e){console.error(e),t==null||t.remove()}})}initGoogle(t){return K(this,null,function*(){if(!this.googlePay){t==null||t.remove();return}t==null||t.classList.add(Ue.skeleton);try{if(yield this.googlePay.init({onError:n=>{this.events.error.emit(n),t==null||t.remove(),this.attempted.delete(W.GOOGLE_PAY)},onCancel:()=>{this.events.cancel.emit(),this.attempted.delete(W.GOOGLE_PAY)},onSuccess:n=>{this.events.success.emit(J(U({},n),{type:"google"})),this.attempted.delete(W.GOOGLE_PAY)}})){const n=this.googlePay.render();t==null||t.appendChild(n);const a=()=>{this.attempted.has(W.GOOGLE_PAY)||(this.attempted.add(W.GOOGLE_PAY),this.events.onPaymentAttempt.emit(W.GOOGLE_PAY))};n.addEventListener("pointerdown",a,{capture:!0}),n.addEventListener("click",a,{capture:!0}),n.addEventListener("keydown",i=>{((i==null?void 0:i.key)==="Enter"||(i==null?void 0:i.key)===" ")&&a()},{capture:!0}),n.addEventListener("focusin",a,{capture:!0}),t==null||t.addEventListener("pointerdown",a,{capture:!0}),t==null||t.addEventListener("click",a,{capture:!0}),t==null||t.addEventListener("focusin",a,{capture:!0})}else t==null||t.remove()}catch(e){console.error(e),t==null||t.remove()}})}initPayPal(t){return K(this,null,function*(){if(!this.paypal){t==null||t.remove();return}t==null||t.classList.add(Ue.skeleton);try{const e=this.paypal.render();t==null||t.appendChild(e),(yield this.paypal.init({onError:a=>{this.events.error.emit(a),this.attempted.delete(W.PAYPAL)},onCancel:()=>{this.events.cancel.emit(),this.attempted.delete(W.PAYPAL)},onSuccess:a=>{this.events.success.emit({paypalId:a,type:"paypal"}),this.attempted.delete(W.PAYPAL)}}))||t==null||t.remove()}catch(e){t==null||t.remove()}})}initBraintreeVenmo(t){return K(this,null,function*(){if(!this.braintree){t==null||t.remove();return}t==null||t.classList.add(Ue.skeleton);try{if(yield this.braintree.init({onError:n=>{this.events.error.emit(n),t==null||t.remove()},onCancel:()=>this.events.cancel.emit(),onSuccess:n=>{this.events.success.emit({nonce:n==null?void 0:n.nonce,type:"venmo"})}})){const n=this.braintree.render();t==null||t.appendChild(n)}else t==null||t.remove()}catch(e){console.error(e),t==null||t.remove()}})}initCard(t){return K(this,null,function*(){if(!this.card){t==null||t.remove();return}t==null||t.appendChild(this.card.render())})}initPaymentMethods(){return K(this,null,function*(){const t=this.config.state.transaction.getState(),e=Kc(Uc,(t==null?void 0:t.checkout_config)||[],(s,o)=>s.type===o.type),n=this.config.state.checkout.getState();let a=e.filter(({is_active:s})=>s);(n==null?void 0:n.variant)==="default"&&(a=a.filter(({type:s})=>s!==W.CARD));const i=this.initializeButtonInstances(a);Promise.all(i).then(()=>{this.handleOnFormLoaded()}),this.handleReady()})}initializeButtonInstances(t){const e=t.map(({type:u})=>u),n=e.includes(W.APPLE_PAY),a=e.includes(W.GOOGLE_PAY),i=e.includes(W.PAYPAL),s=e.includes(W.VENMO),o=e.includes(W.CARD);n&&!this.applePay&&(this.applePay=new Fc(this.config)),a&&!this.googlePay&&(this.googlePay=new Bc(this.config)),i&&!this.paypal&&(this.paypal=new zc(this.config),this.paypal.addEventListener("onPaymentAttempt",u=>this.events.onPaymentAttempt.emit(u))),s&&!this.braintree&&(this.braintree=new Gc(this.config),this.braintree.addEventListener("onPaymentAttempt",u=>this.events.onPaymentAttempt.emit(u))),o&&!this.card&&(this.card=new Hc(this.config),this.card.addEventListener(()=>{this.events.open.emit()}));const c=t.filter(({type:u})=>{var m,v,b,w,x,O;const h=navigator,p=(b=(v=(m=h==null?void 0:h.userAgentData)==null?void 0:m.platform)==null?void 0:v.toLowerCase())==null?void 0:b.includes("android"),f=(O=(x=(w=h==null?void 0:h.userAgentData)==null?void 0:w.platform)==null?void 0:x.toLowerCase())==null?void 0:O.includes("windows");return!(u===W.APPLE_PAY&&(p||f))}).sort((u,h)=>u.order-h.order),l=new Map;for(const{type:u}of c){const h=document.createElement("div");this.buttons.appendChild(h),l.set(u,h)}return c.map(({type:u})=>{const h=l.get(u);if(u===W.APPLE_PAY&&this.applePay)return this.initApple(h);if(u===W.GOOGLE_PAY&&this.googlePay)return this.initGoogle(h);if(u===W.PAYPAL&&this.paypal)return this.initPayPal(h);if(u===W.VENMO&&this.braintree)return this.initBraintreeVenmo(h);if(u===W.CARD&&this.card)return this.initCard(h);throw new Error("Unknown button type")})}handleReady(){this.events.ready.emit()}handleOnFormLoaded(){this.events.onFormLoaded.emit()}addEventListener(t,e){return this.events[t].addListener(e)}showButton(){this.buttons.classList.remove(Ue.hidden)}render(){return this.buttons}}class qc{constructor(t){A(this,"template",`
47
+ </svg>`;class Gc{constructor(t){A(this,"isProcessing",!1);A(this,"container");A(this,"venmoButton");A(this,"events",{ready:new ue});A(this,"braintree");A(this,"isInitialized",!1);this.config=t,this.braintree=this.config.service.braintree;const e=this.config.state.styles.getState().BraintreeButton;this.container=document.createElement("div"),this.container.classList.add(Pt.container),this.venmoButton=document.createElement("button"),this.venmoButton.classList.add(Pt.venmo,Pt.hidden),e!=null&&e.className&&ae(this.venmoButton,e.className),e!=null&&e.styles&&Object.assign(this.venmoButton.style,e.styles),this.venmoButton.setAttribute("aria-label","Venmo"),this.venmoButton.innerHTML=Yc,this.container.append(this.venmoButton)}init(t){return K(this,null,function*(){var n;if(!this.config)return!1;const e=this.config.state.transaction.getState();if(!e||Object.keys(e).length===0)return!1;try{return yield this.braintree.init({authorization:((n=e==null?void 0:e.brain_tree_info)==null?void 0:n.client_token)||""}),yield this.braintree.createVenmo({}),this.braintree.isBrowserSupported()?(this.displayVenmoButton(t),this.braintree.hasTokenizationResult()?(yield this.handleExistingTokenization(t),!1):(this.venmoButton.classList.remove(Pt.hidden),this.isInitialized=!0,this.events.ready.emit(),!0)):(this.handleVenmoError(new Error("Browser does not support Venmo")),!1)}catch(a){return this.handleVenmoError(a),!1}})}displayVenmoButton(t){Object.assign(this.venmoButton.style,Wc),this.venmoButton.addEventListener("click",()=>K(this,null,function*(){if(!this.isProcessing){this.isProcessing=!0,this.venmoButton.disabled=!0;try{const e=yield this.braintree.tokenize();this.handleVenmoSuccess(e,t)}catch(e){this.handleVenmoError(e,t)}finally{this.isProcessing=!1,this.venmoButton.disabled=!1}}}))}handleExistingTokenization(t){return K(this,null,function*(){try{const e=yield this.braintree.tokenize();this.handleVenmoSuccess(e,t)}catch(e){this.handleVenmoError(e,t)}})}handleVenmoSuccess(t,e){var n;(n=e.onSuccess)==null||n.call(e,t)}handleVenmoError(t,e){var n,a,i;this.isInitialized&&((n=t==null?void 0:t.message)!=null&&n.toLowerCase().includes("close")?(a=e==null?void 0:e.onCancel)==null||a.call(e):(i=e==null?void 0:e.onError)==null||i.call(e,t))}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.container}}class $c{constructor(t){A(this,"attempted",new Set);A(this,"buttons");A(this,"applePay");A(this,"googlePay");A(this,"paypal");A(this,"card");A(this,"braintree");A(this,"events",{onFormLoaded:new ue,ready:new ue,open:new ue,error:new ue,cancel:new ue,success:new ue,onPaymentAttempt:new ue});this.config=t,this.buttons=document.createElement("div"),this.buttons.classList.add(Ue.buttons,Ue.hidden)}init(){return K(this,null,function*(){this.config.service.ev.addEventListener("ready",()=>{this.initPaymentMethods().catch(console.error)})})}initApple(t){return K(this,null,function*(){if(!this.applePay){t==null||t.remove();return}t==null||t.classList.add(Ue.skeleton);try{if(yield this.applePay.init({onError:n=>{this.events.error.emit(n),console.log("Apple Pay error:",n),t==null||t.remove(),this.attempted.delete(G.APPLE_PAY)},onCancel:()=>{this.events.cancel.emit(),this.attempted.delete(G.APPLE_PAY)},onSuccess:n=>{this.events.success.emit(J(U({},n),{type:"apple"})),this.attempted.delete(G.APPLE_PAY)}})){const n=this.applePay.render();t==null||t.appendChild(n)}else t==null||t.remove()}catch(e){console.error(e),t==null||t.remove()}})}initGoogle(t){return K(this,null,function*(){if(!this.googlePay){t==null||t.remove();return}t==null||t.classList.add(Ue.skeleton);try{if(yield this.googlePay.init({onError:n=>{this.events.error.emit(n),t==null||t.remove(),this.attempted.delete(G.GOOGLE_PAY)},onCancel:()=>{this.events.cancel.emit(),this.attempted.delete(G.GOOGLE_PAY)},onSuccess:n=>{this.events.success.emit(J(U({},n),{type:"google"})),this.attempted.delete(G.GOOGLE_PAY)}})){const n=this.googlePay.render();t==null||t.appendChild(n);const a=()=>{this.attempted.has(G.GOOGLE_PAY)||(this.attempted.add(G.GOOGLE_PAY),this.events.onPaymentAttempt.emit(G.GOOGLE_PAY))};n.addEventListener("pointerdown",a,{capture:!0}),n.addEventListener("click",a,{capture:!0}),n.addEventListener("keydown",i=>{((i==null?void 0:i.key)==="Enter"||(i==null?void 0:i.key)===" ")&&a()},{capture:!0}),n.addEventListener("focusin",a,{capture:!0}),t==null||t.addEventListener("pointerdown",a,{capture:!0}),t==null||t.addEventListener("click",a,{capture:!0}),t==null||t.addEventListener("focusin",a,{capture:!0})}else t==null||t.remove()}catch(e){console.error(e),t==null||t.remove()}})}initPayPal(t){return K(this,null,function*(){if(!this.paypal){t==null||t.remove();return}t==null||t.classList.add(Ue.skeleton);try{const e=this.paypal.render();t==null||t.appendChild(e),(yield this.paypal.init({onError:a=>{this.events.error.emit(a),this.attempted.delete(G.PAYPAL)},onCancel:()=>{this.events.cancel.emit(),this.attempted.delete(G.PAYPAL)},onSuccess:a=>{this.events.success.emit({paypalId:a,type:"paypal"}),this.attempted.delete(G.PAYPAL)}}))||t==null||t.remove()}catch(e){t==null||t.remove()}})}initBraintreeVenmo(t){return K(this,null,function*(){if(!this.braintree){t==null||t.remove();return}t==null||t.classList.add(Ue.skeleton);try{if(yield this.braintree.init({onError:n=>{this.events.onPaymentAttempt.emit(G.VENMO),this.events.error.emit(n),t==null||t.remove()},onCancel:()=>this.events.cancel.emit(),onSuccess:n=>{this.events.onPaymentAttempt.emit(G.VENMO),this.events.success.emit({nonce:n==null?void 0:n.nonce,type:"venmo"})}})){const n=this.braintree.render();t==null||t.appendChild(n)}else t==null||t.remove()}catch(e){console.error(e),t==null||t.remove()}})}initCard(t){return K(this,null,function*(){if(!this.card){t==null||t.remove();return}t==null||t.appendChild(this.card.render())})}initPaymentMethods(){return K(this,null,function*(){const t=this.config.state.transaction.getState(),e=Kc(Uc,(t==null?void 0:t.checkout_config)||[],(s,o)=>s.type===o.type),n=this.config.state.checkout.getState();let a=e.filter(({is_active:s})=>s);(n==null?void 0:n.variant)==="default"&&(a=a.filter(({type:s})=>s!==G.CARD));const i=this.initializeButtonInstances(a);Promise.all(i).then(()=>{this.handleOnFormLoaded()}),this.handleReady()})}initializeButtonInstances(t){const e=t.map(({type:u})=>u),n=e.includes(G.APPLE_PAY),a=e.includes(G.GOOGLE_PAY),i=e.includes(G.PAYPAL),s=e.includes(G.VENMO),o=e.includes(G.CARD);n&&!this.applePay&&(this.applePay=new Fc(this.config)),a&&!this.googlePay&&(this.googlePay=new Bc(this.config)),i&&!this.paypal&&(this.paypal=new zc(this.config),this.paypal.addEventListener("onPaymentAttempt",u=>this.events.onPaymentAttempt.emit(u))),s&&!this.braintree&&(this.braintree=new Gc(this.config)),o&&!this.card&&(this.card=new Hc(this.config),this.card.addEventListener(()=>{this.events.open.emit()}));const c=t.filter(({type:u})=>{var m,v,b,C,x,N;const h=navigator,p=(b=(v=(m=h==null?void 0:h.userAgentData)==null?void 0:m.platform)==null?void 0:v.toLowerCase())==null?void 0:b.includes("android"),f=(N=(x=(C=h==null?void 0:h.userAgentData)==null?void 0:C.platform)==null?void 0:x.toLowerCase())==null?void 0:N.includes("windows");return!(u===G.APPLE_PAY&&(p||f))}).sort((u,h)=>u.order-h.order),l=new Map;for(const{type:u}of c){const h=document.createElement("div");this.buttons.appendChild(h),l.set(u,h)}return c.map(({type:u})=>{const h=l.get(u);if(u===G.APPLE_PAY&&this.applePay)return this.initApple(h);if(u===G.GOOGLE_PAY&&this.googlePay)return this.initGoogle(h);if(u===G.PAYPAL&&this.paypal)return this.initPayPal(h);if(u===G.VENMO&&this.braintree)return this.initBraintreeVenmo(h);if(u===G.CARD&&this.card)return this.initCard(h);throw new Error("Unknown button type")})}handleReady(){this.events.ready.emit()}handleOnFormLoaded(){this.events.onFormLoaded.emit()}addEventListener(t,e){return this.events[t].addListener(e)}showButton(){this.buttons.classList.remove(Ue.hidden)}render(){return this.buttons}}class qc{constructor(t){A(this,"template",`
48
48
  <svg
49
49
  xmlns='http://www.w3.org/2000/svg'
50
50
  width='24'
@@ -60,7 +60,7 @@ React keys must be passed directly to JSX without using spread:
60
60
  <polyline points='15 18 9 12 15 6'></polyline>
61
61
  </svg>
62
62
  <span class="${ie.srOnly}">Back</span>
63
- `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.backButton),t!=null&&t.className&&ae(this.element,t.className),t!=null&&t.styles&&Object.assign(this.element.style,t.styles),this.element.innerHTML=this.template}render(){return this.element}}const Qc={button:"_button_125my_1"};class Xc{constructor(t){A(this,"element");A(this,"icon");this.element=document.createElement("div"),this.element.classList.add(Qc.button),this.icon=new qc(t),this.element.appendChild(this.icon.render())}addEventListener(t){return this.element.addEventListener("click",t)}render(){return this.element}}const Ie={button:"_button_1d7ly_1",disabled:"_disabled_1d7ly_18",hidden:"_hidden_1d7ly_28",spinner:"_spinner_1d7ly_32"};class Zc{constructor(t,e){A(this,"element");A(this,"spinner",new pi);A(this,"message",document.createElement("span"));A(this,"iconElement");this.element=document.createElement("button"),this.element.setAttribute("type","button"),this.element.classList.add(Ie.button,Ie.press),e!=null&&e.className&&ae(this.element,e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles),e!=null&&e.iconSvg&&(this.iconElement=document.createElement("div"),this.iconElement.classList.add(ie.card),this.iconElement.innerHTML=e.iconSvg),this.spinner.addClass(Ie.spinner),this.spinner.addClass(Ie.hidden),this.message.textContent=t.messages().card.pay.button,this.element.append(this.spinner.render()),this.iconElement&&this.element.append(this.iconElement),this.element.append(this.message),t.subscribe(n=>{this.message.textContent=n.messages.card.pay.button})}addEventListener(t){return this.element.addEventListener("click",t)}disable(t){t?(this.element.setAttribute("disabled","true"),this.element.classList.add(Ie.disabled),this.spinner.removeClass(Ie.hidden),this.iconElement&&this.iconElement.classList.add(Ie.hidden)):(this.element.removeAttribute("disabled"),this.element.classList.remove(Ie.disabled),this.spinner.addClass(Ie.hidden),this.iconElement&&this.iconElement.classList.remove(Ie.hidden))}render(){return this.element}}const ze={cardForm:"_cardForm_1uc4x_1",hidden:"_hidden_1uc4x_6",topOffset:"_topOffset_1uc4x_10"},ue={wrapper:"_wrapper_1xw0g_1",inputContainer:"_inputContainer_1xw0g_5",disabled:"_disabled_1xw0g_23",input:"_input_1xw0g_5",errorInput:"_errorInput_1xw0g_18",label:"_label_1xw0g_56",labelError:"_labelError_1xw0g_67",disabledInput:"_disabledInput_1xw0g_75",hidden:"_hidden_1xw0g_82"};class Rt{constructor(){A(this,"template",`
63
+ `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.backButton),t!=null&&t.className&&ae(this.element,t.className),t!=null&&t.styles&&Object.assign(this.element.style,t.styles),this.element.innerHTML=this.template}render(){return this.element}}const Qc={button:"_button_125my_1"};class Xc{constructor(t){A(this,"element");A(this,"icon");this.element=document.createElement("div"),this.element.classList.add(Qc.button),this.icon=new qc(t),this.element.appendChild(this.icon.render())}addEventListener(t){return this.element.addEventListener("click",t)}render(){return this.element}}const Ie={button:"_button_1d7ly_1",disabled:"_disabled_1d7ly_18",hidden:"_hidden_1d7ly_28",spinner:"_spinner_1d7ly_32"};class Zc{constructor(t,e){A(this,"element");A(this,"spinner",new pi);A(this,"message",document.createElement("span"));A(this,"iconElement");this.element=document.createElement("button"),this.element.setAttribute("type","button"),this.element.classList.add(Ie.button,Ie.press),e!=null&&e.className&&ae(this.element,e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles),e!=null&&e.iconSvg&&(this.iconElement=document.createElement("div"),this.iconElement.classList.add(ie.card),this.iconElement.innerHTML=e.iconSvg),this.spinner.addClass(Ie.spinner),this.spinner.addClass(Ie.hidden),this.message.textContent=t.messages().card.pay.button,this.element.append(this.spinner.render()),this.iconElement&&this.element.append(this.iconElement),this.element.append(this.message),t.subscribe(n=>{this.message.textContent=n.messages.card.pay.button})}addEventListener(t){return this.element.addEventListener("click",t)}disable(t){t?(this.element.setAttribute("disabled","true"),this.element.classList.add(Ie.disabled),this.spinner.removeClass(Ie.hidden),this.iconElement&&this.iconElement.classList.add(Ie.hidden)):(this.element.removeAttribute("disabled"),this.element.classList.remove(Ie.disabled),this.spinner.addClass(Ie.hidden),this.iconElement&&this.iconElement.classList.remove(Ie.hidden))}render(){return this.element}}const ze={cardForm:"_cardForm_1uc4x_1",hidden:"_hidden_1uc4x_6",topOffset:"_topOffset_1uc4x_10"},de={wrapper:"_wrapper_1xw0g_1",inputContainer:"_inputContainer_1xw0g_5",disabled:"_disabled_1xw0g_23",input:"_input_1xw0g_5",errorInput:"_errorInput_1xw0g_18",label:"_label_1xw0g_56",labelError:"_labelError_1xw0g_67",disabledInput:"_disabledInput_1xw0g_75",hidden:"_hidden_1xw0g_82"};class Lt{constructor(){A(this,"template",`
64
64
  <svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>
65
65
  <g fill='none' fill-rule='evenodd' transform='matrix(1 0 0 -1 0 12)'>
66
66
  <circle cx='6' cy='3.2' fill='currentColor' r='1'></circle>
@@ -71,7 +71,7 @@ React keys must be passed directly to JSX without using spread:
71
71
  </g>
72
72
  </svg>
73
73
  <span class="${ie.srOnly}">Warning</span>
74
- `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.warning),this.element.innerHTML=this.template}render(){return this.element}}class Jc{constructor(t,e){A(this,"id","paynext-card-input-name");A(this,"element");A(this,"inputContainer",document.createElement("div"));A(this,"input",document.createElement("input"));A(this,"label",document.createElement("label"));A(this,"labelText",document.createElement("span"));A(this,"labelError",document.createElement("span"));A(this,"endContent",document.createElement("div"));A(this,"warning",new Rt);A(this,"placeholderStyle",document.createElement("style"));A(this,"isTouchSubmit",!1);A(this,"isRequired",!1);A(this,"isDisabled",!1);A(this,"isChanged",!1);A(this,"events",{change:new de});var a,i,s,o,c,l,d,u,h;const n=t.messages();if(this.element=document.createElement("div"),this.element.classList.add(ue.wrapper),this.inputContainer.classList.add(ue.inputContainer),(a=e==null?void 0:e.container)!=null&&a.className&&ae(this.inputContainer,e.container.className),(i=e==null?void 0:e.container)!=null&&i.styles&&Object.assign(this.inputContainer.style,e.container.styles),this.input.setAttribute("id",this.id),this.input.setAttribute("autocomplete","cc-name"),this.input.setAttribute("placeholder",n.card.name.placeholder),this.input.classList.add(ue.input),(s=e==null?void 0:e.field)!=null&&s.className&&ae(this.input,e.field.className),(o=e==null?void 0:e.field)!=null&&o.styles&&Object.assign(this.input.style,e.field.styles),(c=e==null?void 0:e.placeholder)!=null&&c.styles&&Object.keys(e.placeholder.styles).length){const p=m=>m.replace(/[A-Z]/g,v=>"-"+v.toLowerCase()),f=Object.entries(e.placeholder.styles).map(([m,v])=>`${p(m)}:${v};`).join("");this.placeholderStyle.textContent=`#${this.id}::placeholder{${f}}`,this.element.appendChild(this.placeholderStyle)}this.endContent.classList.add(ue.hidden),this.endContent.appendChild(this.warning.render()),this.inputContainer.append(this.input,this.endContent),this.label.setAttribute("for",this.id),this.label.classList.add(ue.label),(l=e==null?void 0:e.label)!=null&&l.className&&ae(this.label,e.label.className),(d=e==null?void 0:e.label)!=null&&d.styles&&Object.assign(this.label.style,e.label.styles),this.labelText.textContent=n.card.name.label,this.labelError.textContent=n.card.required,this.labelError.classList.add(ue.labelError,ue.hidden),(u=e==null?void 0:e.error)!=null&&u.className&&ae(this.labelError,e.error.className),(h=e==null?void 0:e.error)!=null&&h.styles&&Object.assign(this.labelError.style,e.error.styles),this.label.append(this.labelText,this.labelError),this.element.append(this.label,this.inputContainer),this.input.addEventListener("input",()=>this.handleChange(this.input.value)),this.input.addEventListener("paste",()=>this.handleChange(this.input.value)),this.input.addEventListener("blur",()=>this.validate(this.input.value)),t.subscribe(({messages:p})=>{this.input.setAttribute("placeholder",p.card.name.placeholder),this.labelText.textContent=p.card.name.label,this.labelError.textContent=p.card.required})}validator(t){return t?null:he.Empty}filterInput(t){return t.replace(/[^\p{L}\s'-]/gu,"")}handleChange(t){if(this.isDisabled)return;const e=this.filterInput(t);e!==t&&(this.input.value=e),this.isRequired=!1,this.isChanged||(this.isChanged=!0),this.events.change.emit({value:e,isValid:this.validator(e)===null}),this.render()}toggleLabelError(t){return K(this,null,function*(){if(t){this.inputContainer.classList.add(ue.errorInput),this.endContent.classList.remove(ue.hidden),this.labelError.classList.remove(ue.hidden),yield pe(this.labelError,me.open,me.transition);return}this.inputContainer.classList.remove(ue.errorInput),this.endContent.classList.add(ue.hidden),yield pe(this.labelError,me.close,me.transition),this.labelError.classList.add(ue.hidden)})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.input.setAttribute("disabled","true"),this.input.classList.add(ue.disabledInput),this.inputContainer.classList.add(ue.disabled)):(this.input.removeAttribute("disabled"),this.input.classList.remove(ue.disabledInput),this.inputContainer.classList.remove(ue.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){return this.input.value}validate(t){const e=this.validator(t);return this.isRequired=!!e,this.render(),!e}render(){const n=(this.isTouchSubmit||this.isChanged)&&this.isRequired&&!this.isDisabled;return this.toggleLabelError(n),this.isDisabled?(this.inputContainer.classList.add(ue.disabled),this.input.classList.add(ue.disabledInput)):(this.inputContainer.classList.remove(ue.disabled),this.input.classList.remove(ue.disabledInput)),this.element}}const oe={wrapper:"_wrapper_1xw0g_1",inputContainer:"_inputContainer_1xw0g_5",disabled:"_disabled_1xw0g_23",input:"_input_1xw0g_5",endContent:"_endContent_1xw0g_39",errorInput:"_errorInput_1xw0g_18",error:"_error_1xw0g_18",label:"_label_1xw0g_56",labelError:"_labelError_1xw0g_67",disabledInput:"_disabledInput_1xw0g_75",hidden:"_hidden_1xw0g_82"};class el{constructor(){A(this,"template",`
74
+ `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.warning),this.element.innerHTML=this.template}render(){return this.element}}class Jc{constructor(t,e){A(this,"id","paynext-card-input-name");A(this,"element");A(this,"inputContainer",document.createElement("div"));A(this,"input",document.createElement("input"));A(this,"label",document.createElement("label"));A(this,"labelText",document.createElement("span"));A(this,"labelError",document.createElement("span"));A(this,"endContent",document.createElement("div"));A(this,"warning",new Lt);A(this,"placeholderStyle",document.createElement("style"));A(this,"isTouchSubmit",!1);A(this,"isRequired",!1);A(this,"isDisabled",!1);A(this,"isChanged",!1);A(this,"events",{change:new ue});var a,i,s,o,c,l,d,u,h;const n=t.messages();if(this.element=document.createElement("div"),this.element.classList.add(de.wrapper),this.inputContainer.classList.add(de.inputContainer),(a=e==null?void 0:e.container)!=null&&a.className&&ae(this.inputContainer,e.container.className),(i=e==null?void 0:e.container)!=null&&i.styles&&Object.assign(this.inputContainer.style,e.container.styles),this.input.setAttribute("id",this.id),this.input.setAttribute("autocomplete","cc-name"),this.input.setAttribute("placeholder",n.card.name.placeholder),this.input.classList.add(de.input),(s=e==null?void 0:e.field)!=null&&s.className&&ae(this.input,e.field.className),(o=e==null?void 0:e.field)!=null&&o.styles&&Object.assign(this.input.style,e.field.styles),(c=e==null?void 0:e.placeholder)!=null&&c.styles&&Object.keys(e.placeholder.styles).length){const p=m=>m.replace(/[A-Z]/g,v=>"-"+v.toLowerCase()),f=Object.entries(e.placeholder.styles).map(([m,v])=>`${p(m)}:${v};`).join("");this.placeholderStyle.textContent=`#${this.id}::placeholder{${f}}`,this.element.appendChild(this.placeholderStyle)}this.endContent.classList.add(de.hidden),this.endContent.appendChild(this.warning.render()),this.inputContainer.append(this.input,this.endContent),this.label.setAttribute("for",this.id),this.label.classList.add(de.label),(l=e==null?void 0:e.label)!=null&&l.className&&ae(this.label,e.label.className),(d=e==null?void 0:e.label)!=null&&d.styles&&Object.assign(this.label.style,e.label.styles),this.labelText.textContent=n.card.name.label,this.labelError.textContent=n.card.required,this.labelError.classList.add(de.labelError,de.hidden),(u=e==null?void 0:e.error)!=null&&u.className&&ae(this.labelError,e.error.className),(h=e==null?void 0:e.error)!=null&&h.styles&&Object.assign(this.labelError.style,e.error.styles),this.label.append(this.labelText,this.labelError),this.element.append(this.label,this.inputContainer),this.input.addEventListener("input",()=>this.handleChange(this.input.value)),this.input.addEventListener("paste",()=>this.handleChange(this.input.value)),this.input.addEventListener("blur",()=>this.validate(this.input.value)),t.subscribe(({messages:p})=>{this.input.setAttribute("placeholder",p.card.name.placeholder),this.labelText.textContent=p.card.name.label,this.labelError.textContent=p.card.required})}validator(t){return t?null:he.Empty}filterInput(t){return t.replace(/[^\p{L}\s'-]/gu,"")}handleChange(t){if(this.isDisabled)return;const e=this.filterInput(t);e!==t&&(this.input.value=e),this.isRequired=!1,this.isChanged||(this.isChanged=!0),this.events.change.emit({value:e,isValid:this.validator(e)===null}),this.render()}toggleLabelError(t){return K(this,null,function*(){if(t){this.inputContainer.classList.add(de.errorInput),this.endContent.classList.remove(de.hidden),this.labelError.classList.remove(de.hidden),yield pe(this.labelError,me.open,me.transition);return}this.inputContainer.classList.remove(de.errorInput),this.endContent.classList.add(de.hidden),yield pe(this.labelError,me.close,me.transition),this.labelError.classList.add(de.hidden)})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.input.setAttribute("disabled","true"),this.input.classList.add(de.disabledInput),this.inputContainer.classList.add(de.disabled)):(this.input.removeAttribute("disabled"),this.input.classList.remove(de.disabledInput),this.inputContainer.classList.remove(de.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){return this.input.value}validate(t){const e=this.validator(t);return this.isRequired=!!e,this.render(),!e}render(){const n=(this.isTouchSubmit||this.isChanged)&&this.isRequired&&!this.isDisabled;return this.toggleLabelError(n),this.isDisabled?(this.inputContainer.classList.add(de.disabled),this.input.classList.add(de.disabledInput)):(this.inputContainer.classList.remove(de.disabled),this.input.classList.remove(de.disabledInput)),this.element}}const oe={wrapper:"_wrapper_1xw0g_1",inputContainer:"_inputContainer_1xw0g_5",disabled:"_disabled_1xw0g_23",input:"_input_1xw0g_5",endContent:"_endContent_1xw0g_39",errorInput:"_errorInput_1xw0g_18",error:"_error_1xw0g_18",label:"_label_1xw0g_56",labelError:"_labelError_1xw0g_67",disabledInput:"_disabledInput_1xw0g_75",hidden:"_hidden_1xw0g_82"};class el{constructor(){A(this,"template",`
75
75
  <svg
76
76
  width='28'
77
77
  height='19'
@@ -151,12 +151,12 @@ React keys must be passed directly to JSX without using spread:
151
151
  </g>
152
152
  </svg>
153
153
  <span class="${ie.srOnly}">Visa</span>
154
- `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.container),this.element.innerHTML=this.template}render(){return this.element}}class rl{constructor(t,e){A(this,"id","paynext-card-input-number");A(this,"initialCardTypes",xt.map(t=>t.type));A(this,"element");A(this,"inputContainer",document.createElement("div"));A(this,"input",document.createElement("input"));A(this,"label",document.createElement("label"));A(this,"labelText",document.createElement("span"));A(this,"labelError",document.createElement("span"));A(this,"endContent",document.createElement("div"));A(this,"error",document.createElement("p"));A(this,"unknownCard",new el);A(this,"masterCard",new tl);A(this,"visa",new nl);A(this,"placeholderStyle",document.createElement("style"));A(this,"supportedCardTypes",this.initialCardTypes);A(this,"isTouchSubmit",!1);A(this,"errorMessage","");A(this,"isRequired",!1);A(this,"isDisabled",!1);A(this,"isChanged",!1);A(this,"events",{change:new de});var a,i,s,o,c,l,d,u,h;this.translate=t;const n=t.messages();if(this.element=document.createElement("div"),this.element.classList.add(oe.wrapper),this.inputContainer.classList.add(oe.inputContainer),(a=e==null?void 0:e.container)!=null&&a.className&&ae(this.inputContainer,e.container.className),(i=e==null?void 0:e.container)!=null&&i.styles&&Object.assign(this.inputContainer.style,e.container.styles),this.input.setAttribute("id",this.id),this.input.setAttribute("autocomplete","cc-number"),this.input.setAttribute("placeholder","1234 1234 1234 1234"),this.input.setAttribute("inputmode","numeric"),this.input.setAttribute("pattern","[0-9]*"),this.input.setAttribute("enterkeyhint","done"),this.input.classList.add(oe.input),(s=e==null?void 0:e.field)!=null&&s.className&&ae(this.input,e.field.className),(o=e==null?void 0:e.field)!=null&&o.styles&&Object.assign(this.input.style,e.field.styles),(c=e==null?void 0:e.placeholder)!=null&&c.styles&&Object.keys(e.placeholder.styles).length){const p=v=>v.replace(/[A-Z]/g,b=>"-"+b.toLowerCase()),f=Object.entries(e.placeholder.styles).map(([v,b])=>`${p(v)}:${b} !important;`).join(""),m=`#${this.id}`;this.placeholderStyle.textContent=`${m}::placeholder{${f}}
154
+ `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.container),this.element.innerHTML=this.template}render(){return this.element}}class rl{constructor(t,e){A(this,"id","paynext-card-input-number");A(this,"initialCardTypes",It.map(t=>t.type));A(this,"element");A(this,"inputContainer",document.createElement("div"));A(this,"input",document.createElement("input"));A(this,"label",document.createElement("label"));A(this,"labelText",document.createElement("span"));A(this,"labelError",document.createElement("span"));A(this,"endContent",document.createElement("div"));A(this,"error",document.createElement("p"));A(this,"unknownCard",new el);A(this,"masterCard",new tl);A(this,"visa",new nl);A(this,"placeholderStyle",document.createElement("style"));A(this,"supportedCardTypes",this.initialCardTypes);A(this,"isTouchSubmit",!1);A(this,"errorMessage","");A(this,"isRequired",!1);A(this,"isDisabled",!1);A(this,"isChanged",!1);A(this,"events",{change:new ue});var a,i,s,o,c,l,d,u,h;this.translate=t;const n=t.messages();if(this.element=document.createElement("div"),this.element.classList.add(oe.wrapper),this.inputContainer.classList.add(oe.inputContainer),(a=e==null?void 0:e.container)!=null&&a.className&&ae(this.inputContainer,e.container.className),(i=e==null?void 0:e.container)!=null&&i.styles&&Object.assign(this.inputContainer.style,e.container.styles),this.input.setAttribute("id",this.id),this.input.setAttribute("autocomplete","cc-number"),this.input.setAttribute("placeholder","1234 1234 1234 1234"),this.input.setAttribute("inputmode","numeric"),this.input.setAttribute("pattern","[0-9]*"),this.input.setAttribute("enterkeyhint","done"),this.input.classList.add(oe.input),(s=e==null?void 0:e.field)!=null&&s.className&&ae(this.input,e.field.className),(o=e==null?void 0:e.field)!=null&&o.styles&&Object.assign(this.input.style,e.field.styles),(c=e==null?void 0:e.placeholder)!=null&&c.styles&&Object.keys(e.placeholder.styles).length){const p=v=>v.replace(/[A-Z]/g,b=>"-"+b.toLowerCase()),f=Object.entries(e.placeholder.styles).map(([v,b])=>`${p(v)}:${b} !important;`).join(""),m=`#${this.id}`;this.placeholderStyle.textContent=`${m}::placeholder{${f}}
155
155
  ${m}::-webkit-input-placeholder{${f}}
156
156
  ${m}::-moz-placeholder{${f}}
157
157
  ${m}:-ms-input-placeholder{${f}}
158
158
  ${m}::-ms-input-placeholder{${f}}
159
- `,document.head.appendChild(this.placeholderStyle)}this.endContent.classList.add(oe.endContent),this.endContent.append(...this.getCardIcons()),this.inputContainer.append(this.input,this.endContent),this.label.setAttribute("for",this.id),this.label.classList.add(oe.label),(l=e==null?void 0:e.label)!=null&&l.className&&ae(this.label,e.label.className),(d=e==null?void 0:e.label)!=null&&d.styles&&Object.assign(this.label.style,e.label.styles),this.labelText.textContent=n.card.number.label,this.labelError.textContent=n.card.required,this.labelError.classList.add(oe.labelError,oe.hidden),(u=e==null?void 0:e.error)!=null&&u.className&&ae(this.labelError,e.error.className),(h=e==null?void 0:e.error)!=null&&h.styles&&Object.assign(this.labelError.style,e.error.styles),this.label.append(this.labelText,this.labelError),this.error.classList.add(oe.error,oe.hidden),this.element.append(this.label,this.inputContainer,this.error),this.input.addEventListener("keydown",p=>{this.isDisabled||["Backspace","Delete","Tab","ArrowLeft","ArrowRight","Home","End"].includes(p.key)||p.ctrlKey||p.metaKey||/^\d$/.test(p.key)||p.preventDefault()}),this.input.addEventListener("input",p=>{p.stopPropagation();const m=this.input.value.replace(/\D/g,"");this.handleChange(m)}),this.input.addEventListener("paste",p=>{var v;p.preventDefault();const m=(((v=p.clipboardData)==null?void 0:v.getData("text"))||"").replace(/\D/g,"");this.handleChange(m)}),this.input.addEventListener("blur",()=>this.validate(this.input.value)),this.translate.subscribe(({messages:p})=>{this.labelText.textContent=p.card.number.label,this.labelError.textContent=p.card.required,this.render()})}handleChange(t){if(this.isDisabled)return;this.isRequired=!1,this.errorMessage="",this.isChanged||(this.isChanged=!0);const e=wi(t).map(i=>i.type),n=Ci(t),a=bc(t,(n==null?void 0:n.type)||"");this.supportedCardTypes=e.length?e:this.initialCardTypes,a.replace(/\D/g,"").length===((n==null?void 0:n.maxLength)||16)&&this.validate(a),this.input.value=a,this.events.change.emit({card:a,cardType:n==null?void 0:n.type,cardTypes:e,isValid:Ai(t,this.supportedCardTypes).isValid}),this.render()}toggleLabelError(t){return K(this,null,function*(){if(t){this.inputContainer.classList.add(oe.errorInput),this.labelError.classList.remove(oe.hidden),yield pe(this.labelError,me.open,me.transition);return}yield pe(this.labelError,me.close,me.transition),this.labelError.classList.add(oe.hidden)})}toggleErrorMessage(t){return K(this,null,function*(){if(t){this.inputContainer.classList.add(oe.errorInput),this.error.textContent=this.errorMessage,this.error.classList.remove(oe.hidden),yield pe(this.error,_e.open,_e.transition);return}yield pe(this.error,_e.close,_e.transition),this.error.classList.add(oe.hidden)})}getCardIcons(){return xt.filter(({type:t})=>this.supportedCardTypes.includes(t)).slice(0,3).map(({type:t})=>{switch(t){case Be.Visa:return this.visa.render();case Be.Mastercard:return this.masterCard.render()}})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.input.setAttribute("disabled","true"),this.input.classList.add(oe.disabledInput),this.inputContainer.classList.add(oe.disabled)):(this.input.removeAttribute("disabled"),this.input.classList.remove(oe.disabledInput),this.inputContainer.classList.remove(oe.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){var t;return{value:this.input.value,cardType:((t=wi(this.input.value)[0])==null?void 0:t.type)||""}}validate(t){const e=this.translate.messages(),{isValid:n,error:a}=Ai(t,this.supportedCardTypes);return n?(this.isRequired=!1,this.errorMessage="",this.render(),n):(a===he.Empty?(this.errorMessage="",this.isRequired=!0):a===he.Unsupported?(this.errorMessage=e.card.number.error.unsupported,this.isRequired=!1):(this.errorMessage=a===he.Incomplete?e.card.number.error.incomplete:e.card.number.error.invalid,this.isRequired=!1),this.render(),n)}render(){const t=this.isTouchSubmit||this.isChanged,e=t&&!this.isDisabled&&this.isRequired,n=t&&!this.isDisabled&&!!this.errorMessage;return this.toggleLabelError(e),this.toggleErrorMessage(n),!e&&!n?(this.inputContainer.classList.remove(oe.errorInput),this.endContent.innerHTML="",this.endContent.append(...this.getCardIcons())):(this.endContent.innerHTML="",this.endContent.appendChild(this.unknownCard.render())),this.isDisabled?(this.inputContainer.classList.add(oe.disabled),this.input.classList.add(oe.disabledInput)):(this.inputContainer.classList.remove(oe.disabled),this.input.classList.remove(oe.disabledInput)),this.element}}const Q={inputContainer:"_inputContainer_41zd2_5",disabled:"_disabled_41zd2_23",input:"_input_41zd2_5",endContent:"_endContent_41zd2_39",errorInput:"_errorInput_41zd2_18",error:"_error_41zd2_18",label:"_label_41zd2_56",labelError:"_labelError_41zd2_67",disabledInput:"_disabledInput_41zd2_75",hidden:"_hidden_41zd2_82",securityContent:"_securityContent_41zd2_86"};class il{constructor(){A(this,"template",`
159
+ `,document.head.appendChild(this.placeholderStyle)}this.endContent.classList.add(oe.endContent),this.endContent.append(...this.getCardIcons()),this.inputContainer.append(this.input,this.endContent),this.label.setAttribute("for",this.id),this.label.classList.add(oe.label),(l=e==null?void 0:e.label)!=null&&l.className&&ae(this.label,e.label.className),(d=e==null?void 0:e.label)!=null&&d.styles&&Object.assign(this.label.style,e.label.styles),this.labelText.textContent=n.card.number.label,this.labelError.textContent=n.card.required,this.labelError.classList.add(oe.labelError,oe.hidden),(u=e==null?void 0:e.error)!=null&&u.className&&ae(this.labelError,e.error.className),(h=e==null?void 0:e.error)!=null&&h.styles&&Object.assign(this.labelError.style,e.error.styles),this.label.append(this.labelText,this.labelError),this.error.classList.add(oe.error,oe.hidden),this.element.append(this.label,this.inputContainer,this.error),this.input.addEventListener("keydown",p=>{this.isDisabled||["Backspace","Delete","Tab","ArrowLeft","ArrowRight","Home","End"].includes(p.key)||p.ctrlKey||p.metaKey||/^\d$/.test(p.key)||p.preventDefault()}),this.input.addEventListener("input",p=>{p.stopPropagation();const m=this.input.value.replace(/\D/g,"");this.handleChange(m)}),this.input.addEventListener("paste",p=>{var v;p.preventDefault();const m=(((v=p.clipboardData)==null?void 0:v.getData("text"))||"").replace(/\D/g,"");this.handleChange(m)}),this.input.addEventListener("blur",()=>this.validate(this.input.value)),this.translate.subscribe(({messages:p})=>{this.labelText.textContent=p.card.number.label,this.labelError.textContent=p.card.required,this.render()})}handleChange(t){if(this.isDisabled)return;this.isRequired=!1,this.errorMessage="",this.isChanged||(this.isChanged=!0);const e=wi(t).map(i=>i.type),n=Ci(t),a=bc(t,(n==null?void 0:n.type)||"");this.supportedCardTypes=e.length?e:this.initialCardTypes,a.replace(/\D/g,"").length===((n==null?void 0:n.maxLength)||16)&&this.validate(a),this.input.value=a,this.events.change.emit({card:a,cardType:n==null?void 0:n.type,cardTypes:e,isValid:Ai(t,this.supportedCardTypes).isValid}),this.render()}toggleLabelError(t){return K(this,null,function*(){if(t){this.inputContainer.classList.add(oe.errorInput),this.labelError.classList.remove(oe.hidden),yield pe(this.labelError,me.open,me.transition);return}yield pe(this.labelError,me.close,me.transition),this.labelError.classList.add(oe.hidden)})}toggleErrorMessage(t){return K(this,null,function*(){if(t){this.inputContainer.classList.add(oe.errorInput),this.error.textContent=this.errorMessage,this.error.classList.remove(oe.hidden),yield pe(this.error,_e.open,_e.transition);return}yield pe(this.error,_e.close,_e.transition),this.error.classList.add(oe.hidden)})}getCardIcons(){return It.filter(({type:t})=>this.supportedCardTypes.includes(t)).slice(0,3).map(({type:t})=>{switch(t){case Be.Visa:return this.visa.render();case Be.Mastercard:return this.masterCard.render()}})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.input.setAttribute("disabled","true"),this.input.classList.add(oe.disabledInput),this.inputContainer.classList.add(oe.disabled)):(this.input.removeAttribute("disabled"),this.input.classList.remove(oe.disabledInput),this.inputContainer.classList.remove(oe.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){var t;return{value:this.input.value,cardType:((t=wi(this.input.value)[0])==null?void 0:t.type)||""}}validate(t){const e=this.translate.messages(),{isValid:n,error:a}=Ai(t,this.supportedCardTypes);return n?(this.isRequired=!1,this.errorMessage="",this.render(),n):(a===he.Empty?(this.errorMessage="",this.isRequired=!0):a===he.Unsupported?(this.errorMessage=e.card.number.error.unsupported,this.isRequired=!1):(this.errorMessage=a===he.Incomplete?e.card.number.error.incomplete:e.card.number.error.invalid,this.isRequired=!1),this.render(),n)}render(){const t=this.isTouchSubmit||this.isChanged,e=t&&!this.isDisabled&&this.isRequired,n=t&&!this.isDisabled&&!!this.errorMessage;return this.toggleLabelError(e),this.toggleErrorMessage(n),!e&&!n?(this.inputContainer.classList.remove(oe.errorInput),this.endContent.innerHTML="",this.endContent.append(...this.getCardIcons())):(this.endContent.innerHTML="",this.endContent.appendChild(this.unknownCard.render())),this.isDisabled?(this.inputContainer.classList.add(oe.disabled),this.input.classList.add(oe.disabledInput)):(this.inputContainer.classList.remove(oe.disabled),this.input.classList.remove(oe.disabledInput)),this.element}}const Q={inputContainer:"_inputContainer_41zd2_5",disabled:"_disabled_41zd2_23",input:"_input_41zd2_5",endContent:"_endContent_41zd2_39",errorInput:"_errorInput_41zd2_18",error:"_error_41zd2_18",label:"_label_41zd2_56",labelError:"_labelError_41zd2_67",disabledInput:"_disabledInput_41zd2_75",hidden:"_hidden_41zd2_82",securityContent:"_securityContent_41zd2_86"};class il{constructor(){A(this,"template",`
160
160
  <svg class='${ie.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
161
161
  <title>CVC</title>
162
162
  <g fill='none' fill-rule='evenodd'>
@@ -175,7 +175,7 @@ ${m}::-ms-input-placeholder{${f}}
175
175
  </g>
176
176
  </svg>
177
177
  <span class="${ie.srOnly}">Card CVC</span>
178
- `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.container),this.element.innerHTML=this.template}render(){return this.element}}class al{constructor(t,e){A(this,"cvcId","paynext-card-input-cvc");A(this,"expiryId","paynext-card-input-expiry");A(this,"element");A(this,"expiryWarning",new Rt);A(this,"cvcWarning",new Rt);A(this,"cardCvc",new il);A(this,"expiryInputContainer",document.createElement("div"));A(this,"expiryInput",document.createElement("input"));A(this,"expiryLabel",document.createElement("label"));A(this,"expiryLabelText",document.createElement("span"));A(this,"expiryLabelError",document.createElement("span"));A(this,"expiryEndContent",document.createElement("div"));A(this,"expiryError",document.createElement("p"));A(this,"cvcInputContainer",document.createElement("div"));A(this,"cvcInput",document.createElement("input"));A(this,"cvcLabel",document.createElement("label"));A(this,"cvcLabelText",document.createElement("span"));A(this,"cvcLabelError",document.createElement("span"));A(this,"cvcEndContent",document.createElement("div"));A(this,"cvcError",document.createElement("p"));A(this,"placeholderStyle",document.createElement("style"));A(this,"cardType",null);A(this,"isTouchSubmit",!1);A(this,"isDisabled",!1);A(this,"expiryErrorMessage","");A(this,"isExpiryRequired",!1);A(this,"isExpiryChanged",!1);A(this,"cvcErrorMessage","");A(this,"isCvcRequired",!1);A(this,"isCvcChanged",!1);A(this,"events",{expiryChange:new de,cvcChange:new de});var s,o,c,l,d,u,h,p,f,m,v,b,w,x,O,I,L;this.translate=t;const n=t.messages();this.element=document.createElement("div"),this.element.classList.add(Q.securityContent),this.expiryInputContainer.classList.add(Q.inputContainer),(s=e==null?void 0:e.container)!=null&&s.className&&ae(this.expiryInputContainer,e.container.className),(o=e==null?void 0:e.container)!=null&&o.styles&&Object.assign(this.expiryInputContainer.style,e.container.styles),this.expiryInput.setAttribute("id",this.expiryId),this.expiryInput.setAttribute("autocomplete","cc-exp"),this.expiryInput.setAttribute("placeholder",n.card.expiry.placeholder),this.expiryInput.setAttribute("inputmode","numeric"),this.expiryInput.setAttribute("pattern","[0-9]*"),this.expiryInput.setAttribute("enterkeyhint","next"),this.expiryInput.classList.add(Q.input),(c=e==null?void 0:e.field)!=null&&c.className&&ae(this.expiryInput,e.field.className),(l=e==null?void 0:e.field)!=null&&l.styles&&Object.assign(this.expiryInput.style,e.field.styles),this.expiryEndContent.classList.add(Q.endContent),this.expiryEndContent.appendChild(this.expiryWarning.render()),this.expiryInputContainer.append(this.expiryInput,this.expiryEndContent),this.expiryLabel.setAttribute("for",this.expiryId),this.expiryLabel.classList.add(Q.label),(d=e==null?void 0:e.label)!=null&&d.className&&ae(this.expiryLabel,e.label.className),(u=e==null?void 0:e.label)!=null&&u.styles&&Object.assign(this.expiryLabel.style,e.label.styles),this.expiryLabelText.contentEditable="false",this.expiryLabelText.textContent=n.card.expiry.label,this.expiryLabelError.textContent=n.card.required,this.expiryLabelError.classList.add(Q.labelError,Q.hidden),this.expiryLabel.append(this.expiryLabelText,this.expiryLabelError),this.expiryError.classList.add(Q.error,Q.hidden),(h=e==null?void 0:e.error)!=null&&h.className&&ae(this.expiryError,e.error.className),(p=e==null?void 0:e.error)!=null&&p.styles&&Object.assign(this.expiryError.style,e.error.styles);const a=document.createElement("div");if(a.appendChild(this.expiryError),this.cvcInputContainer.classList.add(Q.inputContainer),(f=e==null?void 0:e.container)!=null&&f.className&&ae(this.cvcInputContainer,e.container.className),(m=e==null?void 0:e.container)!=null&&m.styles&&Object.assign(this.cvcInputContainer.style,e.container.styles),this.cvcInput.setAttribute("id",this.cvcId),this.cvcInput.setAttribute("autocomplete","cc-csc"),this.cvcInput.setAttribute("placeholder",n.card.cvc.placeholder),this.cvcInput.setAttribute("inputmode","numeric"),this.cvcInput.setAttribute("pattern","[0-9]*"),this.cvcInput.setAttribute("enterkeyhint","done"),this.cvcInput.classList.add(Q.input),(v=e==null?void 0:e.field)!=null&&v.className&&ae(this.cvcInput,e.field.className),(b=e==null?void 0:e.field)!=null&&b.styles&&Object.assign(this.cvcInput.style,e.field.styles),(w=e==null?void 0:e.placeholder)!=null&&w.styles&&Object.keys(e.placeholder.styles).length){const N=B=>B.replace(/[A-Z]/g,G=>"-"+G.toLowerCase()),S=Object.entries(e.placeholder.styles).map(([B,G])=>`${N(B)}:${G};`).join("");this.placeholderStyle.textContent=`#${this.expiryId}::placeholder{${S}}#${this.cvcId}::placeholder{${S}}`,this.element.appendChild(this.placeholderStyle)}this.cvcEndContent.classList.add(Q.endContent),this.cvcEndContent.appendChild(this.cardCvc.render()),this.cvcInputContainer.append(this.cvcInput,this.cvcEndContent),this.cvcLabel.setAttribute("for",this.cvcId),this.cvcLabel.classList.add(Q.label),(x=e==null?void 0:e.label)!=null&&x.className&&ae(this.cvcLabel,e.label.className),(O=e==null?void 0:e.label)!=null&&O.styles&&Object.assign(this.cvcLabel.style,e.label.styles),this.cvcLabelText.textContent=n.card.cvc.label,this.cvcLabelError.textContent=n.card.required,this.cvcLabelError.classList.add(Q.labelError,Q.hidden),(I=e==null?void 0:e.error)!=null&&I.className&&ae(this.cvcLabel,e.error.className),(L=e==null?void 0:e.error)!=null&&L.styles&&Object.assign(this.cvcLabelError.style,e.error.styles),this.cvcLabel.append(this.cvcLabelText,this.cvcLabelError),this.cvcError.classList.add(Q.error,Q.hidden);const i=document.createElement("div");i.appendChild(this.cvcError),this.element.append(this.expiryLabel,this.cvcLabel,this.expiryInputContainer,this.cvcInputContainer,a,i),this.expiryInput.addEventListener("input",N=>{N.preventDefault();const B=this.expiryInput.value.replace(/\D/g,"");this.handleExpiryChange(B)}),this.expiryInput.addEventListener("paste",N=>{var G;N.preventDefault();const B=(((G=N.clipboardData)==null?void 0:G.getData("text"))||"").replace(/\D/g,"");this.handleExpiryChange(B)}),this.expiryInput.addEventListener("keydown",N=>{this.isDisabled||["Backspace","Delete","Tab","ArrowLeft","ArrowRight","Home","End"].includes(N.key)||N.ctrlKey||N.metaKey||/^\d$/.test(N.key)||N.preventDefault()}),this.expiryInput.addEventListener("blur",()=>this.validateExpiry(this.expiryInput.value)),this.cvcInput.addEventListener("input",N=>{N.preventDefault();const B=this.cvcInput.value.replace(/\D/g,"");this.handleCvcChange(B)}),this.cvcInput.addEventListener("paste",N=>{var G;N.preventDefault();const B=(((G=N.clipboardData)==null?void 0:G.getData("text"))||"").replace(/\D/g,"");this.handleCvcChange(B)}),this.cvcInput.addEventListener("keydown",N=>{this.isDisabled||["Backspace","Delete","Tab","ArrowLeft","ArrowRight","Home","End"].includes(N.key)||N.ctrlKey||N.metaKey||/^\d$/.test(N.key)||N.preventDefault()}),this.cvcInput.addEventListener("blur",()=>this.validateCvc(this.cvcInput.value)),this.translate.subscribe(({messages:N})=>{this.cvcInput.setAttribute("placeholder",N.card.cvc.placeholder),this.expiryInput.setAttribute("placeholder",N.card.expiry.placeholder),this.expiryLabelText.textContent=N.card.expiry.label,this.cvcLabelText.textContent=N.card.cvc.label,this.expiryLabelError.textContent=N.card.required,this.cvcLabelError.textContent=N.card.required,this.render()})}cvcValidator(t){const e=Qe.getTypeInfo(this.cardType||""),n=!t,a=t.length<((e==null?void 0:e.code.size)||3);return!n&&!a?null:n?he.Empty:he.Incomplete}validateCvc(t){const e=this.translate.messages(),n=this.cvcValidator(t);return n?(n===he.Empty?(this.cvcErrorMessage="",this.isCvcRequired=!0):(this.cvcErrorMessage=e.card.cvc.error.incomplete,this.isCvcRequired=!1),this.render(),!n):(this.isCvcRequired=!1,this.cvcErrorMessage="",this.render(),!n)}handleCvcChange(t){if(this.isDisabled)return;this.isCvcRequired=!1,this.cvcErrorMessage="",this.isCvcChanged||(this.isCvcChanged=!0);const e=yc(t,this.cardType||""),n=Qe.getTypeInfo(this.cardType||"");e.length===(n==null?void 0:n.code.size)&&this.validateCvc(e),this.events.cvcChange.emit({value:e,isValid:this.cvcValidator(e)===null}),this.cvcInput.value=e,this.render()}toggleCvcLabelError(t){return K(this,null,function*(){if(t){this.cvcInputContainer.classList.add(Q.errorInput),this.cvcLabelError.classList.remove(Q.hidden),yield pe(this.cvcLabelError,me.open,me.transition);return}yield pe(this.cvcLabelError,me.close,me.transition),this.cvcLabelError.classList.add(Q.hidden)})}toggleCvcErrorMessage(t){return K(this,null,function*(){if(t){this.cvcInputContainer.classList.add(Q.errorInput),this.cvcError.textContent=this.cvcErrorMessage,this.cvcError.classList.remove(Q.hidden),yield pe(this.cvcError,_e.open,_e.transition);return}yield pe(this.cvcError,_e.close,_e.transition),this.cvcError.classList.add(Q.hidden)})}expiryValidator(t){const e=!t,n=t.length<7,a=new Date,[i,s]=t.split(" / ");a.setFullYear(2e3+parseInt(s),parseInt(i)-1,31);const o=a.getTime()<Date.now(),c=new Date,l=new Date;l.setFullYear(c.getFullYear()+50);const d=a.getTime()>l.getTime()||a.getFullYear()<c.getFullYear();return!e&&!n&&!o&&!d?null:e?he.Empty:n?he.Incomplete:d?"tooFarInFuture":a.getFullYear()===new Date().getFullYear()?"dateExpired":"expired"}validateExpiry(t){const e=this.translate.messages(),n=this.expiryValidator(t);if(n){if(n===he.Empty)this.expiryErrorMessage="",this.isExpiryRequired=!0;else{let a=e.card.expiry.error.invalid;n==="expired"?a=e.card.expiry.error.expired.replace("{date}","year"):n==="dateExpired"?a=e.card.expiry.error.expired.replace("{date}",t.replace(/ /g,"")):n==="tooFarInFuture"?a=e.card.expiry.error.tooFarInFuture:n===he.Incomplete&&(a=e.card.expiry.error.incomplete),this.isExpiryRequired=!1,this.expiryErrorMessage=a}return this.render(),!n}return this.isExpiryRequired=!1,this.expiryErrorMessage="",this.render(),!n}handleExpiryChange(t){if(this.isDisabled)return;this.isExpiryRequired=!1,this.expiryErrorMessage="",this.isExpiryChanged||(this.isExpiryChanged=!0);const e=_c(t);e.length===7&&this.validateExpiry(e),this.events.expiryChange.emit({value:e,isValid:this.expiryValidator(e)===null}),this.expiryInput.value=e,this.render()}toggleExpiryLabelError(t){return K(this,null,function*(){if(t){this.expiryInputContainer.classList.add(Q.errorInput),this.expiryLabelError.classList.remove(Q.hidden),yield pe(this.expiryLabelError,me.open,me.transition);return}yield pe(this.expiryLabelError,me.close,me.transition),this.expiryLabelError.classList.add(Q.hidden)})}toggleExpiryErrorMessage(t){return K(this,null,function*(){if(t){this.expiryInputContainer.classList.add(Q.errorInput),this.expiryError.textContent=this.expiryErrorMessage,this.expiryError.classList.remove(Q.hidden),yield pe(this.expiryError,_e.open,_e.transition);return}yield pe(this.expiryError,_e.close,_e.transition),this.expiryError.classList.add(Q.hidden)})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.expiryInput.setAttribute("disabled","true"),this.expiryInput.classList.add(Q.disabledInput),this.expiryInputContainer.classList.add(Q.disabled),this.cvcInput.setAttribute("disabled","true"),this.cvcInput.classList.add(Q.disabledInput),this.cvcInputContainer.classList.add(Q.disabled)):(this.expiryInput.removeAttribute("disabled"),this.expiryInput.classList.remove(Q.disabledInput),this.expiryInputContainer.classList.remove(Q.disabled),this.cvcInput.removeAttribute("disabled"),this.cvcInput.classList.remove(Q.disabledInput),this.cvcInputContainer.classList.remove(Q.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){return{expiry:this.expiryInput.value,cvc:this.cvcInput.value}}validate({expiry:t,cvc:e}){const n=this.validateExpiry(t),a=this.validateCvc(e);return n&&a}updateCardType(t){this.cardType=t,this.handleCvcChange(this.cvcInput.value)}render(){const t=this.isTouchSubmit||this.isExpiryChanged,e=t&&!this.isDisabled&&this.isExpiryRequired,n=t&&!this.isDisabled&&!!this.expiryErrorMessage;this.toggleExpiryLabelError(e),this.toggleExpiryErrorMessage(n),!e&&!n?(this.expiryInputContainer.classList.remove(Q.errorInput),this.expiryEndContent.classList.add(Q.hidden)):this.expiryEndContent.classList.remove(Q.hidden);const a=this.isTouchSubmit||this.isCvcChanged,i=a&&!this.isDisabled&&this.isCvcRequired,s=a&&!this.isDisabled&&!!this.cvcErrorMessage;return this.toggleCvcLabelError(i),this.toggleCvcErrorMessage(s),!i&&!s?(this.cvcInputContainer.classList.remove(Q.errorInput),this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.cardCvc.render())):(this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.cvcWarning.render())),this.isDisabled?(this.expiryInputContainer.classList.add(Q.disabled),this.expiryInput.classList.add(Q.disabledInput),this.cvcInputContainer.classList.add(Q.disabled),this.cvcInput.classList.add(Q.disabledInput)):(this.expiryInputContainer.classList.remove(Q.disabled),this.expiryInput.classList.remove(Q.disabledInput),this.cvcInputContainer.classList.remove(Q.disabled),this.cvcInput.classList.remove(Q.disabledInput)),this.element}}class sl{constructor({translate:t,className:e,stylesState:n,isDefaultVariant:a,onPaymentAttempt:i}){A(this,"element");A(this,"submit");A(this,"back");A(this,"number");A(this,"name");A(this,"cardSecurity");A(this,"onPaymentAttempt");A(this,"isBackVisible",!0);A(this,"events",{submit:new de,close:new de});const s=n.getState();this.element=document.createElement("form"),this.onPaymentAttempt=i,this.submit=new Zc(t,s.SubmitButton),this.back=new Xc(s.BackButton),this.number=new rl(t,s.Input),this.name=new Jc(t,s.Input),this.cardSecurity=new al(t,s.Input),this.element.classList.add(ze.cardForm),e&&ae(this.element,e);const o=this.back.render();a&&(this.isBackVisible=!1,o.classList.add(ze.hidden),this.element.classList.add(ze.topOffset)),this.element.append(o,this.number.render(),this.cardSecurity.render(),this.name.render(),this.submit.render()),requestAnimationFrame(()=>{const c=this.submit.render(),d=window.getComputedStyle(c).backgroundColor||"#5A67D8";this.element.style.setProperty("--input-focus-shadow-color",d)}),this.back.addEventListener(()=>this.events.close.emit()),this.number.addEventListener("change",({cardType:c})=>this.cardSecurity.updateCardType(c||null)),this.submit.addEventListener(c=>{var p;c.preventDefault();const{cvc:l,expiry:d}=this.cardSecurity.value(),{value:u,cardType:h}=this.number.value();this.touchSubmit(),this.validate()&&((p=this.onPaymentAttempt)==null||p.call(this,{paymentMethod:W.CARD}),this.events.submit.emit({number:u,expiry:d,cvc:l,name:this.name.value(),cardBrand:h}))})}addEventListener(t,e){return this.events[t].addListener(e)}setLoading(t){this.cardSecurity.disable(t),this.name.disable(t),this.number.disable(t),this.submit.disable(t)}touchSubmit(){this.cardSecurity.touchSubmit(),this.name.touchSubmit(),this.number.touchSubmit()}validate(){const t=this.number.validate(this.number.value().value),e=this.name.validate(this.name.value()),n=this.cardSecurity.validate(this.cardSecurity.value());return t&&e&&n}setDefaultVariant(t){const e=this.back.render();if(t&&this.isBackVisible){e.classList.add(ze.hidden),this.element.classList.add(ze.topOffset),this.isBackVisible=!1;return}!t&&!this.isBackVisible&&(e.classList.remove(ze.hidden),this.element.classList.remove(ze.topOffset),this.isBackVisible=!0)}render(){return this.element}}class ol{constructor(){A(this,"template",`
178
+ `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.container),this.element.innerHTML=this.template}render(){return this.element}}class al{constructor(t,e){A(this,"cvcId","paynext-card-input-cvc");A(this,"expiryId","paynext-card-input-expiry");A(this,"element");A(this,"expiryWarning",new Lt);A(this,"cvcWarning",new Lt);A(this,"cardCvc",new il);A(this,"expiryInputContainer",document.createElement("div"));A(this,"expiryInput",document.createElement("input"));A(this,"expiryLabel",document.createElement("label"));A(this,"expiryLabelText",document.createElement("span"));A(this,"expiryLabelError",document.createElement("span"));A(this,"expiryEndContent",document.createElement("div"));A(this,"expiryError",document.createElement("p"));A(this,"cvcInputContainer",document.createElement("div"));A(this,"cvcInput",document.createElement("input"));A(this,"cvcLabel",document.createElement("label"));A(this,"cvcLabelText",document.createElement("span"));A(this,"cvcLabelError",document.createElement("span"));A(this,"cvcEndContent",document.createElement("div"));A(this,"cvcError",document.createElement("p"));A(this,"placeholderStyle",document.createElement("style"));A(this,"cardType",null);A(this,"isTouchSubmit",!1);A(this,"isDisabled",!1);A(this,"expiryErrorMessage","");A(this,"isExpiryRequired",!1);A(this,"isExpiryChanged",!1);A(this,"cvcErrorMessage","");A(this,"isCvcRequired",!1);A(this,"isCvcChanged",!1);A(this,"events",{expiryChange:new ue,cvcChange:new ue});var s,o,c,l,d,u,h,p,f,m,v,b,C,x,N,I,L;this.translate=t;const n=t.messages();this.element=document.createElement("div"),this.element.classList.add(Q.securityContent),this.expiryInputContainer.classList.add(Q.inputContainer),(s=e==null?void 0:e.container)!=null&&s.className&&ae(this.expiryInputContainer,e.container.className),(o=e==null?void 0:e.container)!=null&&o.styles&&Object.assign(this.expiryInputContainer.style,e.container.styles),this.expiryInput.setAttribute("id",this.expiryId),this.expiryInput.setAttribute("autocomplete","cc-exp"),this.expiryInput.setAttribute("placeholder",n.card.expiry.placeholder),this.expiryInput.setAttribute("inputmode","numeric"),this.expiryInput.setAttribute("pattern","[0-9]*"),this.expiryInput.setAttribute("enterkeyhint","next"),this.expiryInput.classList.add(Q.input),(c=e==null?void 0:e.field)!=null&&c.className&&ae(this.expiryInput,e.field.className),(l=e==null?void 0:e.field)!=null&&l.styles&&Object.assign(this.expiryInput.style,e.field.styles),this.expiryEndContent.classList.add(Q.endContent),this.expiryEndContent.appendChild(this.expiryWarning.render()),this.expiryInputContainer.append(this.expiryInput,this.expiryEndContent),this.expiryLabel.setAttribute("for",this.expiryId),this.expiryLabel.classList.add(Q.label),(d=e==null?void 0:e.label)!=null&&d.className&&ae(this.expiryLabel,e.label.className),(u=e==null?void 0:e.label)!=null&&u.styles&&Object.assign(this.expiryLabel.style,e.label.styles),this.expiryLabelText.contentEditable="false",this.expiryLabelText.textContent=n.card.expiry.label,this.expiryLabelError.textContent=n.card.required,this.expiryLabelError.classList.add(Q.labelError,Q.hidden),this.expiryLabel.append(this.expiryLabelText,this.expiryLabelError),this.expiryError.classList.add(Q.error,Q.hidden),(h=e==null?void 0:e.error)!=null&&h.className&&ae(this.expiryError,e.error.className),(p=e==null?void 0:e.error)!=null&&p.styles&&Object.assign(this.expiryError.style,e.error.styles);const a=document.createElement("div");if(a.appendChild(this.expiryError),this.cvcInputContainer.classList.add(Q.inputContainer),(f=e==null?void 0:e.container)!=null&&f.className&&ae(this.cvcInputContainer,e.container.className),(m=e==null?void 0:e.container)!=null&&m.styles&&Object.assign(this.cvcInputContainer.style,e.container.styles),this.cvcInput.setAttribute("id",this.cvcId),this.cvcInput.setAttribute("autocomplete","cc-csc"),this.cvcInput.setAttribute("placeholder",n.card.cvc.placeholder),this.cvcInput.setAttribute("inputmode","numeric"),this.cvcInput.setAttribute("pattern","[0-9]*"),this.cvcInput.setAttribute("enterkeyhint","done"),this.cvcInput.classList.add(Q.input),(v=e==null?void 0:e.field)!=null&&v.className&&ae(this.cvcInput,e.field.className),(b=e==null?void 0:e.field)!=null&&b.styles&&Object.assign(this.cvcInput.style,e.field.styles),(C=e==null?void 0:e.placeholder)!=null&&C.styles&&Object.keys(e.placeholder.styles).length){const O=B=>B.replace(/[A-Z]/g,W=>"-"+W.toLowerCase()),k=Object.entries(e.placeholder.styles).map(([B,W])=>`${O(B)}:${W};`).join("");this.placeholderStyle.textContent=`#${this.expiryId}::placeholder{${k}}#${this.cvcId}::placeholder{${k}}`,this.element.appendChild(this.placeholderStyle)}this.cvcEndContent.classList.add(Q.endContent),this.cvcEndContent.appendChild(this.cardCvc.render()),this.cvcInputContainer.append(this.cvcInput,this.cvcEndContent),this.cvcLabel.setAttribute("for",this.cvcId),this.cvcLabel.classList.add(Q.label),(x=e==null?void 0:e.label)!=null&&x.className&&ae(this.cvcLabel,e.label.className),(N=e==null?void 0:e.label)!=null&&N.styles&&Object.assign(this.cvcLabel.style,e.label.styles),this.cvcLabelText.textContent=n.card.cvc.label,this.cvcLabelError.textContent=n.card.required,this.cvcLabelError.classList.add(Q.labelError,Q.hidden),(I=e==null?void 0:e.error)!=null&&I.className&&ae(this.cvcLabel,e.error.className),(L=e==null?void 0:e.error)!=null&&L.styles&&Object.assign(this.cvcLabelError.style,e.error.styles),this.cvcLabel.append(this.cvcLabelText,this.cvcLabelError),this.cvcError.classList.add(Q.error,Q.hidden);const i=document.createElement("div");i.appendChild(this.cvcError),this.element.append(this.expiryLabel,this.cvcLabel,this.expiryInputContainer,this.cvcInputContainer,a,i),this.expiryInput.addEventListener("input",O=>{O.preventDefault();const B=this.expiryInput.value.replace(/\D/g,"");this.handleExpiryChange(B)}),this.expiryInput.addEventListener("paste",O=>{var W;O.preventDefault();const B=(((W=O.clipboardData)==null?void 0:W.getData("text"))||"").replace(/\D/g,"");this.handleExpiryChange(B)}),this.expiryInput.addEventListener("keydown",O=>{this.isDisabled||["Backspace","Delete","Tab","ArrowLeft","ArrowRight","Home","End"].includes(O.key)||O.ctrlKey||O.metaKey||/^\d$/.test(O.key)||O.preventDefault()}),this.expiryInput.addEventListener("blur",()=>this.validateExpiry(this.expiryInput.value)),this.cvcInput.addEventListener("input",O=>{O.preventDefault();const B=this.cvcInput.value.replace(/\D/g,"");this.handleCvcChange(B)}),this.cvcInput.addEventListener("paste",O=>{var W;O.preventDefault();const B=(((W=O.clipboardData)==null?void 0:W.getData("text"))||"").replace(/\D/g,"");this.handleCvcChange(B)}),this.cvcInput.addEventListener("keydown",O=>{this.isDisabled||["Backspace","Delete","Tab","ArrowLeft","ArrowRight","Home","End"].includes(O.key)||O.ctrlKey||O.metaKey||/^\d$/.test(O.key)||O.preventDefault()}),this.cvcInput.addEventListener("blur",()=>this.validateCvc(this.cvcInput.value)),this.translate.subscribe(({messages:O})=>{this.cvcInput.setAttribute("placeholder",O.card.cvc.placeholder),this.expiryInput.setAttribute("placeholder",O.card.expiry.placeholder),this.expiryLabelText.textContent=O.card.expiry.label,this.cvcLabelText.textContent=O.card.cvc.label,this.expiryLabelError.textContent=O.card.required,this.cvcLabelError.textContent=O.card.required,this.render()})}cvcValidator(t){const e=Qe.getTypeInfo(this.cardType||""),n=!t,a=t.length<((e==null?void 0:e.code.size)||3);return!n&&!a?null:n?he.Empty:he.Incomplete}validateCvc(t){const e=this.translate.messages(),n=this.cvcValidator(t);return n?(n===he.Empty?(this.cvcErrorMessage="",this.isCvcRequired=!0):(this.cvcErrorMessage=e.card.cvc.error.incomplete,this.isCvcRequired=!1),this.render(),!n):(this.isCvcRequired=!1,this.cvcErrorMessage="",this.render(),!n)}handleCvcChange(t){if(this.isDisabled)return;this.isCvcRequired=!1,this.cvcErrorMessage="",this.isCvcChanged||(this.isCvcChanged=!0);const e=yc(t,this.cardType||""),n=Qe.getTypeInfo(this.cardType||"");e.length===(n==null?void 0:n.code.size)&&this.validateCvc(e),this.events.cvcChange.emit({value:e,isValid:this.cvcValidator(e)===null}),this.cvcInput.value=e,this.render()}toggleCvcLabelError(t){return K(this,null,function*(){if(t){this.cvcInputContainer.classList.add(Q.errorInput),this.cvcLabelError.classList.remove(Q.hidden),yield pe(this.cvcLabelError,me.open,me.transition);return}yield pe(this.cvcLabelError,me.close,me.transition),this.cvcLabelError.classList.add(Q.hidden)})}toggleCvcErrorMessage(t){return K(this,null,function*(){if(t){this.cvcInputContainer.classList.add(Q.errorInput),this.cvcError.textContent=this.cvcErrorMessage,this.cvcError.classList.remove(Q.hidden),yield pe(this.cvcError,_e.open,_e.transition);return}yield pe(this.cvcError,_e.close,_e.transition),this.cvcError.classList.add(Q.hidden)})}expiryValidator(t){const e=!t,n=t.length<7,a=new Date,[i,s]=t.split(" / ");a.setFullYear(2e3+parseInt(s),parseInt(i)-1,31);const o=a.getTime()<Date.now(),c=new Date,l=new Date;l.setFullYear(c.getFullYear()+50);const d=a.getTime()>l.getTime()||a.getFullYear()<c.getFullYear();return!e&&!n&&!o&&!d?null:e?he.Empty:n?he.Incomplete:d?"tooFarInFuture":a.getFullYear()===new Date().getFullYear()?"dateExpired":"expired"}validateExpiry(t){const e=this.translate.messages(),n=this.expiryValidator(t);if(n){if(n===he.Empty)this.expiryErrorMessage="",this.isExpiryRequired=!0;else{let a=e.card.expiry.error.invalid;n==="expired"?a=e.card.expiry.error.expired.replace("{date}","year"):n==="dateExpired"?a=e.card.expiry.error.expired.replace("{date}",t.replace(/ /g,"")):n==="tooFarInFuture"?a=e.card.expiry.error.tooFarInFuture:n===he.Incomplete&&(a=e.card.expiry.error.incomplete),this.isExpiryRequired=!1,this.expiryErrorMessage=a}return this.render(),!n}return this.isExpiryRequired=!1,this.expiryErrorMessage="",this.render(),!n}handleExpiryChange(t){if(this.isDisabled)return;this.isExpiryRequired=!1,this.expiryErrorMessage="",this.isExpiryChanged||(this.isExpiryChanged=!0);const e=_c(t);e.length===7&&this.validateExpiry(e),this.events.expiryChange.emit({value:e,isValid:this.expiryValidator(e)===null}),this.expiryInput.value=e,this.render()}toggleExpiryLabelError(t){return K(this,null,function*(){if(t){this.expiryInputContainer.classList.add(Q.errorInput),this.expiryLabelError.classList.remove(Q.hidden),yield pe(this.expiryLabelError,me.open,me.transition);return}yield pe(this.expiryLabelError,me.close,me.transition),this.expiryLabelError.classList.add(Q.hidden)})}toggleExpiryErrorMessage(t){return K(this,null,function*(){if(t){this.expiryInputContainer.classList.add(Q.errorInput),this.expiryError.textContent=this.expiryErrorMessage,this.expiryError.classList.remove(Q.hidden),yield pe(this.expiryError,_e.open,_e.transition);return}yield pe(this.expiryError,_e.close,_e.transition),this.expiryError.classList.add(Q.hidden)})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.expiryInput.setAttribute("disabled","true"),this.expiryInput.classList.add(Q.disabledInput),this.expiryInputContainer.classList.add(Q.disabled),this.cvcInput.setAttribute("disabled","true"),this.cvcInput.classList.add(Q.disabledInput),this.cvcInputContainer.classList.add(Q.disabled)):(this.expiryInput.removeAttribute("disabled"),this.expiryInput.classList.remove(Q.disabledInput),this.expiryInputContainer.classList.remove(Q.disabled),this.cvcInput.removeAttribute("disabled"),this.cvcInput.classList.remove(Q.disabledInput),this.cvcInputContainer.classList.remove(Q.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){return{expiry:this.expiryInput.value,cvc:this.cvcInput.value}}validate({expiry:t,cvc:e}){const n=this.validateExpiry(t),a=this.validateCvc(e);return n&&a}updateCardType(t){this.cardType=t,this.handleCvcChange(this.cvcInput.value)}render(){const t=this.isTouchSubmit||this.isExpiryChanged,e=t&&!this.isDisabled&&this.isExpiryRequired,n=t&&!this.isDisabled&&!!this.expiryErrorMessage;this.toggleExpiryLabelError(e),this.toggleExpiryErrorMessage(n),!e&&!n?(this.expiryInputContainer.classList.remove(Q.errorInput),this.expiryEndContent.classList.add(Q.hidden)):this.expiryEndContent.classList.remove(Q.hidden);const a=this.isTouchSubmit||this.isCvcChanged,i=a&&!this.isDisabled&&this.isCvcRequired,s=a&&!this.isDisabled&&!!this.cvcErrorMessage;return this.toggleCvcLabelError(i),this.toggleCvcErrorMessage(s),!i&&!s?(this.cvcInputContainer.classList.remove(Q.errorInput),this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.cardCvc.render())):(this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.cvcWarning.render())),this.isDisabled?(this.expiryInputContainer.classList.add(Q.disabled),this.expiryInput.classList.add(Q.disabledInput),this.cvcInputContainer.classList.add(Q.disabled),this.cvcInput.classList.add(Q.disabledInput)):(this.expiryInputContainer.classList.remove(Q.disabled),this.expiryInput.classList.remove(Q.disabledInput),this.cvcInputContainer.classList.remove(Q.disabled),this.cvcInput.classList.remove(Q.disabledInput)),this.element}}class sl{constructor({translate:t,className:e,stylesState:n,isDefaultVariant:a,onPaymentAttempt:i}){A(this,"element");A(this,"submit");A(this,"back");A(this,"number");A(this,"name");A(this,"cardSecurity");A(this,"onPaymentAttempt");A(this,"isBackVisible",!0);A(this,"events",{submit:new ue,close:new ue});const s=n.getState();this.element=document.createElement("form"),this.onPaymentAttempt=i,this.submit=new Zc(t,s.SubmitButton),this.back=new Xc(s.BackButton),this.number=new rl(t,s.Input),this.name=new Jc(t,s.Input),this.cardSecurity=new al(t,s.Input),this.element.classList.add(ze.cardForm),e&&ae(this.element,e);const o=this.back.render();a&&(this.isBackVisible=!1,o.classList.add(ze.hidden),this.element.classList.add(ze.topOffset)),this.element.append(o,this.number.render(),this.cardSecurity.render(),this.name.render(),this.submit.render()),requestAnimationFrame(()=>{const c=this.submit.render(),d=window.getComputedStyle(c).backgroundColor||"#5A67D8";this.element.style.setProperty("--input-focus-shadow-color",d)}),this.back.addEventListener(()=>this.events.close.emit()),this.number.addEventListener("change",({cardType:c})=>this.cardSecurity.updateCardType(c||null)),this.submit.addEventListener(c=>{var p;c.preventDefault();const{cvc:l,expiry:d}=this.cardSecurity.value(),{value:u,cardType:h}=this.number.value();this.touchSubmit(),this.validate()&&((p=this.onPaymentAttempt)==null||p.call(this,{paymentMethod:G.CARD}),this.events.submit.emit({number:u,expiry:d,cvc:l,name:this.name.value(),cardBrand:h}))})}addEventListener(t,e){return this.events[t].addListener(e)}setLoading(t){this.cardSecurity.disable(t),this.name.disable(t),this.number.disable(t),this.submit.disable(t)}touchSubmit(){this.cardSecurity.touchSubmit(),this.name.touchSubmit(),this.number.touchSubmit()}validate(){const t=this.number.validate(this.number.value().value),e=this.name.validate(this.name.value()),n=this.cardSecurity.validate(this.cardSecurity.value());return t&&e&&n}setDefaultVariant(t){const e=this.back.render();if(t&&this.isBackVisible){e.classList.add(ze.hidden),this.element.classList.add(ze.topOffset),this.isBackVisible=!1;return}!t&&!this.isBackVisible&&(e.classList.remove(ze.hidden),this.element.classList.remove(ze.topOffset),this.isBackVisible=!0)}render(){return this.element}}class ol{constructor(){A(this,"template",`
179
179
  <svg
180
180
  fill='none'
181
181
  height='24'
@@ -192,7 +192,7 @@ ${m}::-ms-input-placeholder{${f}}
192
192
  '></path>
193
193
  </svg>
194
194
  <span class="${ie.srOnly}">Success</span>
195
- `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.successContainer),this.element.innerHTML=this.template}render(){return this.element}}const Ni={container:"_container_79xkl_1",title:"_title_79xkl_5"};class cl{constructor(){A(this,"element");A(this,"message",document.createElement("p"));A(this,"icon",new ol);this.element=document.createElement("div"),this.element.classList.add(Ni.container),this.message.classList.add(Ni.title),this.element.append(this.icon.render(),this.message)}addClassName(t){ae(this.element,t)}removeClassName(t){this.element.classList.remove(t)}render(){return this.element}}const Pi={container:"_container_g3abj_1",title:"_title_g3abj_12"},yt=class yt{constructor(t,e){A(this,"element");A(this,"message",document.createElement("p"));A(this,"icon",new Rt);A(this,"hasCustomMessage",!1);A(this,"hasConfigMessage",!1);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(Pi.container),this.message.classList.add(Pi.title),e?(this.message.textContent=e,this.hasCustomMessage=!0,this.hasConfigMessage=!0):this.message.textContent=t.messages().status.error,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:n})=>{this.hasCustomMessage||(this.message.textContent=n.status.error)}),yt.instances.add(this)}setMessage(t){this.hasConfigMessage||(this.message.textContent=t,this.hasCustomMessage=!!t)}addClassName(t){ae(this.element,t)}removeClassName(t){this.element.classList.remove(t)}hide(){this.element.style.display="none"}show(){this.element.style.display="flex"}static hideAll(){for(const t of yt.instances)t.element.style.display="none"}render(){return this.element}};A(yt,"instances",new Set);let In=yt;class ll{constructor(t){A(this,"isLoading",!1);A(this,"isFormOpen",!1);A(this,"closedHeight",0);A(this,"hasLoadedOnce",!1);A(this,"checkout");A(this,"container",document.createElement("div"));A(this,"loader",new uc);A(this,"success");A(this,"buttons");A(this,"form");A(this,"error");A(this,"errorPrevHeight",null);A(this,"FORM_HEIGHT",309);this.config=t,this.buttons=new $c(t),this.form=new sl({translate:t.state.translate,className:be.hidden,stylesState:t.state.styles,isDefaultVariant:t.state.checkout.getState().variant==="default",onPaymentAttempt:e=>{var n,a;return(a=(n=this.config.state.checkout.getState()).onCheckoutAttempt)==null?void 0:a.call(n,e)}}),this.success=new cl,this.success.addClassName(be.hidden),this.error=new In(t.state.translate,t.state.checkout.getState().errorMessageText),this.error.hide(),this.container.append(this.loader.render(),this.buttons.render(),this.form.render()),this.checkout=document.createElement("div"),this.checkout.classList.add(be.checkout),this.checkout.append(this.container,this.error.render(),this.success.render())}init(){return K(this,null,function*(){this.buttons.addEventListener("onPaymentAttempt",t=>{var n;const e=this.config.state.checkout.getState();(n=e.onCheckoutAttempt)==null||n.call(e,{paymentMethod:t}),this.hideError()}),this.buttons.addEventListener("onFormLoaded",()=>{const{onCheckoutLoaded:t}=this.config.state.checkout.getState();!this.hasLoadedOnce&&t&&(this.hasLoadedOnce=!0,t({success:!0}))}),this.buttons.addEventListener("ready",()=>K(this,null,function*(){var e;this.loader.setClassName(be.hidden);const{variant:t}=this.config.state.checkout.getState();if(this.form.setDefaultVariant(t==="default"),this.buttons.showButton(),t==="default"){const n=this.checkout.getBoundingClientRect().height;n<this.FORM_HEIGHT&&(this.checkout.style.height=`${n}px`),this.form.element.classList.remove(be.hidden),n<this.FORM_HEIGHT&&(yield(e=this.checkout.animate({minHeight:[`${n}px`,`${this.FORM_HEIGHT}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?e:Promise.resolve(),this.checkout.style.height=""),this.isFormOpen=!0}})),this.buttons.addEventListener("open",()=>K(this,null,function*(){var a;if(this.isLoading)return;this.hideError();const t=this.checkout.getBoundingClientRect().height;this.closedHeight=t,t<this.FORM_HEIGHT&&(this.checkout.style.height=`${t}px`),yield pe(this.buttons.buttons,Pt.close,Pt.transition),this.buttons.buttons.classList.add(be.hidden),this.form.element.classList.add(be.formInitial),this.form.element.classList.remove(be.hidden);const e=t;let n=null;e<this.FORM_HEIGHT&&(this.checkout.style.height=`${e}px`,n=(a=this.checkout.animate({minHeight:[`${e}px`,`${this.FORM_HEIGHT}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?a:Promise.resolve()),yield Promise.all([pe(this.form.element,Ze.open,Ze.transition),n!=null?n:Promise.resolve()]),e<this.FORM_HEIGHT&&(this.checkout.style.height=""),this.isFormOpen=!0})),this.buttons.addEventListener("error",t=>{const{onCheckoutFail:e,onCheckoutLoaded:n}=this.config.state.checkout.getState(),a=this.config.state.translate.messages(),i=Nt(t,a);this.showError(i);const s={status:"failed",status_reason:{advice_code:"try_again_later",decline_code:Re.GENERIC_DECLINE,message:t.message||t}};!this.hasLoadedOnce&&n&&(this.hasLoadedOnce=!0,n({success:!1,error:s})),e==null||e(s)}),this.buttons.addEventListener("success",t=>{const{clientToken:e}=this.config.state.checkout.getState();switch(t.type){case"apple":return this.handleSuccess({clientSession:e,applePay:t});case"google":return this.handleSuccess({clientSession:e,googlePay:t});case"paypal":return this.handleSuccess({clientSession:e,paypal:{billing_agreement_token:t}});case"venmo":return this.handleSuccess({clientSession:e,braintree:{nonce:t}})}}),this.form.addEventListener("close",()=>K(this,null,function*(){var i,s;if(this.isLoading)return;this.hideError();const t=this.checkout.getBoundingClientRect().height;let e=null;this.closedHeight>0&&t>this.closedHeight&&(this.checkout.style.height=`${t}px`,e=(i=this.checkout.animate({minHeight:[`${t}px`,`${this.closedHeight}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?i:Promise.resolve()),yield pe(this.form.element,Ze.close,Ze.transition),this.form.element.classList.add(be.hidden);const{variant:a}=this.config.state.checkout.getState();if(a!=="default"){this.buttons.buttons.classList.add(be.btnsInitial),this.buttons.buttons.classList.remove(be.hidden);const o=pe(this.buttons.buttons,Pt.open,Pt.transition);yield Promise.all([o,e!=null?e:Promise.resolve()])}this.closedHeight>0&&(e=(s=this.checkout.animate({minHeight:[`${t}px`,`${this.closedHeight}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?s:Promise.resolve(),this.checkout.style.height="auto"),this.isFormOpen=!1})),this.form.addEventListener("submit",t=>K(this,null,function*(){if(this.isLoading||(this.form.touchSubmit(),this.hideError(),!this.form.validate()))return;const n=t.number.replace(/\D/g,""),a=this.config.state.checkout.getState(),i=this.config.service.ev.getEv(),[s,o]=yield Promise.all([i.encrypt(n),i.encrypt(t.cvc)]),[c,l]=t.expiry.split("/");yield this.handleSuccess({clientSession:a.clientToken,card:{firstSixDigits:n.slice(0,6),lastFourDigits:n.slice(-4),expMonth:Number(c),expYear:Number(l),cardBrand:t.cardBrand||"",number:s,cvc:o,type:W.CARD,metadata:{name:t.name,userAgent:navigator==null?void 0:navigator.userAgent}}})})),yield this.buttons.init()})}handleError(t){var i;const e=this.config.state.checkout.getState(),n=this.config.state.translate.messages(),a=Nt(t,n);t&&(this.showError(a),(i=e.onCheckoutFail)==null||i.call(e,t)),this.setLoading(!1)}handleSuccess(t){return K(this,null,function*(){var i,s;if(this.isLoading)return;this.hideError(),this.setLoading(!0);const e=this.config.state.checkout.getState(),n=this.config.state.translate.messages();let a;try{if(a=yield ea(t,e.environment,e.apiVersion),a.error)throw new Error(((i=a.error)==null?void 0:i.message)||n.status.error);if(a.three_ds_session_id){yield this.config.service.ev.initThreeDs({threeDsId:a.three_ds_session_id,onSuccess:()=>{this.setLoading(!1),this.handleSuccess(J(U({},t),{threeDsSessionId:a==null?void 0:a.three_ds_session_id}))},onError:()=>{this.handleError(a==null?void 0:a.status_reason)}});return}if(a.payment_status===Je.FAILED||a.payment_status===Je.DECLINED){this.handleError(a.status_reason);return}yield this.showSuccess(),this.setLoading(!1)}catch(o){return this.handleError({status:"failed",status_reason:{advice_code:"try_again_later",decline_code:Re.GENERIC_DECLINE,message:o.message||o}})}(s=e.onCheckoutComplete)==null||s.call(e,a)})}showSuccess(){return K(this,null,function*(){this.container.classList.add(be.hidden),this.success.removeClassName(be.hidden),yield pe(this.success.element,Ze.open,Ze.transition)})}hideError(){if(this.error.hide(),this.errorPrevHeight!==null){const t=this.checkout.getBoundingClientRect().height;this.checkout.style.height=`${t}px`;const e=this.checkout.animate({minHeight:[`${t}px`,`${this.closedHeight}px`]},{duration:250,easing:"ease-out",fill:"forwards"});this.checkout.style.height="auto",e.onfinish=()=>{this.errorPrevHeight=null},e.oncancel=()=>{this.errorPrevHeight=null}}}showError(t){if(this.loader.setClassName(be.hidden),t&&this.error.setMessage(t),this.error.show(),this.errorPrevHeight===null){const e=this.checkout.getBoundingClientRect().height;this.errorPrevHeight=e,this.checkout.style.height=`${e}px`,requestAnimationFrame(()=>{const n=this.checkout.getBoundingClientRect().height,a=this.checkout.animate({minHeight:[`${e}px`,`${n}px`]},{duration:250,easing:"ease-out",fill:"forwards"});a.onfinish=()=>{this.checkout.style.height=""}})}}setLoading(t){this.isLoading=t,this.form.setLoading(t),this.loader.setClassName(!t||this.isFormOpen?be.hidden:"")}render(){return this.checkout}}class dl{constructor(t){A(this,"component");this.config=t}init(){return K(this,null,function*(){const{checkout:t,transaction:e,translate:n,styles:a}=this.config.state,{apiVersion:i}=t.getState();t.subscribe(({clientToken:s,environment:o,locale:c,translate:l,styles:d})=>{const u=Te.teamId,h=Te.appIds[o];this.config.service.ev.preloadEvervault({teamId:u,appId:h}).finally(),c&&n.locale()!==c&&n.setLocale(c),l&&n.overrides()!==l&&n.setMessages(l),d&&a.setState(d),e.updateTransaction(s,o,i).then(p=>{if(!p)throw new Error("Payment config not found");return this.config.service.ev.initEv({teamId:u,appId:h})}).catch(p=>{if(console.error(p),this.component){const f=n.messages(),m=p.name==="INVALID_SESSION"?f.status.invalidSession:p.message;this.component.showError(m)}})})})}mount(){return K(this,null,function*(){return this.component||(this.component=new ll(this.config)),yield this.init(),yield this.component.init(),this.component.render()})}}class kt{constructor(t){A(this,"initialState");A(this,"state");A(this,"observer",new de);this.initialState=t,this.state=t}getState(){return this.state}setState(t){this.state=t,this.observer.emit(t)}clearState(){this.state=this.initialState,this.observer.clear()}subscribe(t){return this.observer.addListener(t)}}const ul={clientToken:"",environment:"sandbox",apiVersion:"1.0.0",variant:"default"};class pl extends kt{constructor(t){super(U(U({},ul),t))}}const hl={};class fl extends kt{constructor(t){super(U(U({},hl),t))}}class ml extends kt{constructor(e){super(e||null);A(this,"clientToken","")}updateTransaction(e,n,a){return K(this,null,function*(){if(this.clientToken===e)return this.getState();this.clientToken=e;try{const i=yield na(e,n,a);return this.setState(i),i}catch(i){console.error("Failed to update transaction:",i);const s=new Error("INVALID_SESSION");throw s.name="INVALID_SESSION",s}})}}const xn={ar:{card:{required:"يتطلب",number:{label:"رقم البطاقة",error:{invalid:"رقم البطاقة غير صالح",incomplete:"رقم البطاقة غير كامل",unsupported:"نوع البطاقة غير المدعوم"}},expiry:{label:"تاريخ الانتهاء",placeholder:"سنة / شهر",error:{invalid:"تاريخ انتهاء الصلاحية غير صالح",incomplete:"تاريخ انتهاء الصلاحية غير كامل",expired:"تاريخ انتهاء الصلاحية {date} قد انقضى",tooFarInFuture:"سنة انتهاء الصلاحية غير صالحة"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC غير كامل"}},name:{label:"اسم حامل البطاقة",placeholder:"الاسم الكامل على البطاقة"},pay:{button:"ادفع الآن"},compact:{button:"بطاقة الائتمان أو الخصم"}},status:{error:"تم رفض طريقة الدفع الخاصة بك. قد يكون هذا بسبب عدم كفاية الأموال أو تفاصيل الدفع منتهية الصلاحية أو قيود الأمان. يرجى التحقق من تفاصيل الدفع الخاصة بك أو تجربة طريقة دفع مختلفة.",invalidSession:"انتهت صلاحية جلسة الدفع الخاصة بك. يرجى تحديث الصفحة للمتابعة."}},en:{card:{required:"REQUIRED",number:{label:"Card number",error:{invalid:"Card number is invalid",incomplete:"Card number is incomplete",unsupported:"Unsupported card type"}},expiry:{label:"Expiry date",placeholder:"MM / YY",error:{invalid:"Expiry date is invalid",incomplete:"Expiry date is incomplete",expired:"Expiry date {date} has passed",tooFarInFuture:"Expiration year is invalid"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC is incomplete"}},name:{label:"Cardholder name",placeholder:"Full name on card"},pay:{button:"Pay Now"},compact:{button:"Credit or debit card"}},status:{error:"Your payment method was declined. This could be due to insufficient funds, expired payment details, or security restrictions. Please check your payment details or try a different payment method.",invalidSession:"Your payment session has expired. Please refresh the page to continue."}},bg:{card:{required:"ЗАДЪЛЖИТЕЛНО",number:{label:"Номер на карта",error:{invalid:"Номерът на картата е неправилен",incomplete:"Номерът на картата е непълен",unsupported:"Неподдържан тип карта"}},expiry:{label:"Годен до",placeholder:"ММ / ГГ",error:{incomplete:"Датата на валидност е непълна",invalid:"Датата на валидност е невалидна",expired:"Датата на валидност {date} е изтекла",tooFarInFuture:"Годината на валидност е невалидна"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC е непълен"}},name:{label:"Име на картодържателя",placeholder:"Пълно име върху картата"},pay:{button:"Платете сега"},compact:{button:"Банкова карта"}},status:{error:"Вашият метод на плащане беше отхвърлен. Това може да се дължи на недостатъчни средства, изтекли платежни данни или ограничения за сигурност. Моля, проверете вашите платежни данни или опитайте друг метод на плащане.",invalidSession:"Вашата платежна сесия е изтекла. Моля, опреснете страницата, за да продължите."}},cs:{card:{required:"POVINNÉ",number:{label:"Číslo karty",error:{invalid:"Číslo karty je neplatné",incomplete:"Číslo karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Datum platnosti",placeholder:"MM / RR",error:{incomplete:"Datum platnosti neúplné",invalid:"Datum platnosti neplatné",expired:"Datum platnosti {date} uplynulo",tooFarInFuture:"Rok platnosti neplatný"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC neúplný"}},name:{label:"Jméno držitele karty",placeholder:"Celé jméno"},pay:{button:"Zaplatit nyní"},compact:{button:"Platební karta"}},status:{error:"Váš způsob platby byl odmítnut. Může to být kvůli nedostatečným prostředkům, vypršelým platebním údajům nebo bezpečnostním omezením. Zkontrolujte prosím své platební údaje nebo zkuste jiný způsob platby.",invalidSession:"Vaše platební relace vypršela. Obnovte stránku pro pokračování."}},da:{card:{required:"PÅKRÆVET",number:{label:"Kortnummer",error:{invalid:"Kortnummer er ugyldigt",incomplete:"Kortnummeret er ufuldstændigt",unsupported:"Korttype understøttes ikke"}},expiry:{label:"Udløbsdato",placeholder:"MM / ÅÅ",error:{incomplete:"Udløbsdato ufuldstændig",invalid:"Udløbsdato ugyldig",expired:"Udløbsdato {date} er passeret",tooFarInFuture:"Udløbsår ugyldigt"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ufuldstændig"}},name:{label:"Kortholderens navn",placeholder:"Fulde navn"},pay:{button:"Betal nu"},compact:{button:"Betalingskort"}},status:{error:"Din betalingsmetode blev afvist. Dette kan skyldes utilstrækkelige midler, udløbne betalingsoplysninger eller sikkerhedsbegrænsninger. Kontroller venligst dine betalingsoplysninger eller prøv en anden betalingsmetode.",invalidSession:"Din betalingssession er udløbet. Opdater venligst siden for at fortsætte."}},de:{card:{required:"PFLICHT",number:{label:"Kartennummer",error:{invalid:"Kartennummer ist ungültig",incomplete:"Kartennummer ist unvollständig",unsupported:"Nicht unterstützter Kartentyp"}},expiry:{label:"Ablaufdatum",placeholder:"MM / JJ",error:{incomplete:"Ablaufdatum ist unvollständig",invalid:"Ablaufdatum ist ungültig",expired:"Ablaufdatum {date} ist abgelaufen",tooFarInFuture:"Ablaufjahr ist ungültig"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ist unvollständig"}},name:{label:"Name des/der Karteninhaber",placeholder:"Vollständiger Name"},pay:{button:"Jetzt bezahlen"},compact:{button:"Kredit- oder Debitkarte"}},status:{error:"Ihre Zahlungsmethode wurde abgelehnt. Dies könnte auf unzureichende Mittel, abgelaufene Zahlungsdetails oder Sicherheitsbeschränkungen zurückzuführen sein. Bitte überprüfen Sie Ihre Zahlungsdetails oder versuchen Sie eine andere Zahlungsmethode.",invalidSession:"Ihre Zahlungssitzung ist abgelaufen. Bitte aktualisieren Sie die Seite, um fortzufahren."}},el:{card:{required:"Απαιτούμενο",number:{label:"Αριθμός κάρτας",error:{invalid:"Ο αριθμός κάρτας δεν είναι έγκυρος",incomplete:"Ο αριθμός κάρτας είναι ελλιπής",unsupported:"Ο τύπος κάρτας δεν υποστηρίζεται"}},expiry:{label:"Ημερομηνία λήξης",placeholder:"ΜΜ / ΕΕ",error:{incomplete:"Η ημερομηνία λήξης είναι ελλιπής",invalid:"Η ημερομηνία λήξης δεν είναι έγκυρη",expired:"Η ημερομηνία λήξης {date} έχει παρέλθει",tooFarInFuture:"Το έτος λήξης δεν είναι έγκυρο"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"Το CVC είναι ελλιπές"}},name:{label:"Όνομα κατόχου κάρτας",placeholder:"Πλήρες όνομα στην κάρτα"},pay:{button:"Πληρώστε τώρα"},compact:{button:"Τραπεζική κάρτα"}},status:{error:"Η μέθοδος πληρωμής σας απορρίφθηκε. Αυτό μπορεί να οφείλεται σε ανεπαρκή κεφάλαια, ληγμένα στοιχεία πληρωμής ή περιορισμούς ασφαλείας. Παρακαλούμε ελέγξτε τα στοιχεία πληρωμής σας ή δοκιμάστε μια διαφορετική μέθοδο πληρωμής.",invalidSession:"Η συνεδρία πληρωμής σας έχει λήξει. Παρακαλούμε ανανεώστε τη σελίδα για να συνεχίσετε."}},es:{card:{required:"OBLIGATORIO",number:{label:"Número de tarjeta",error:{invalid:"Número de tarjeta no válido",incomplete:"Número de tarjeta incompleto",unsupported:"Tipo de tarjeta no soportado"}},expiry:{label:"Fecha de caducidad",placeholder:"MM / AA",error:{incomplete:"Fecha de caducidad incompleta",invalid:"Fecha de caducidad no válida",expired:"Fecha de caducidad {date} ha pasado",tooFarInFuture:"Año de vencimiento no válido"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC incompleto"}},name:{label:"Nombre del titular de la tarjeta",placeholder:"Nombre completo"},pay:{button:"Pagar ahora"},compact:{button:"Tarjeta de crédito o débito"}},status:{error:"Su método de pago fue rechazado. Esto podría deberse a fondos insuficientes, detalles de pago caducados o restricciones de seguridad. Por favor, verifique sus detalles de pago o pruebe con otro método de pago.",invalidSession:"Su sesión de pago ha caducado. Por favor, actualice la página para continuar."}},et:{card:{required:"NÕUTAV",number:{label:"Kaardi number",error:{invalid:"Kaardinumber ei sobi",incomplete:"Kaardinumber on puudulik",unsupported:"Kaardi tüüp ei ole toetatud"}},expiry:{label:"Aegumiskuupäev",placeholder:"KK / AA",error:{incomplete:"Aegumiskuupäev on puudulik",invalid:"Aegumiskuupäev on kehtetu",expired:"Aegumiskuupäev {date} on möödunud",tooFarInFuture:"Aegumisaasta on kehtetu"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC on puudulik"}},name:{label:"Kaardiomaniku nimi",placeholder:"Täisnimi"},pay:{button:"Maksa kohe"},compact:{button:"Pangakaart"}},status:{error:"Teie makseviis lükati tagasi. See võib olla tingitud ebapiisavatest vahenditest, aegunud makseandmetest või turvapiirangutes. Palun kontrollige oma makseandmeid või proovige teist makseviisi.",invalidSession:"Teie makseseanss on aegunud. Palun värskendage lehte jätkamiseks."}},fi:{card:{required:"PAKOLLINEN",number:{label:"Kortin numero",error:{invalid:"Kortin numero ei kelpaa",incomplete:"Kortin numero on puutteellinen",unsupported:"Korttyyppiä ei tueta"}},expiry:{label:"Voimassaoloaika",placeholder:"KK / VV",error:{incomplete:"Voimassaoloaika puutteellinen",invalid:"Voimassaoloaika virheellinen",expired:"Voimassaoloaika {date} umpeutunut",tooFarInFuture:"Voimassaolovuosi virheellinen"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC puutteellinen"}},name:{label:"Kortinhaltijan nimi",placeholder:"Koko nimi"},pay:{button:"Maksa nyt"},compact:{button:"Pankkikortti"}},status:{error:"Maksutapasi hylättiin. Tämä voi johtua riittämättömistä varoista, vanhentuneista maksutiedoista tai turvallisuusrajoituksista. Tarkista maksutietosi tai kokeile toista maksutapaa.",invalidSession:"Maksuistuntosi on vanhentunut. Päivitä sivu jatkaaksesi."}},fil:{card:{required:"KAILANGAN",number:{label:"Numero ng card",error:{invalid:"Hindi valid ang numero ng kard",incomplete:"Ang numero ng kard ay kulang",unsupported:"Hindi sinusuportahang uri ng card"}},expiry:{label:"Petsa ng pagkapaso",placeholder:"BB / TT",error:{incomplete:"Ang petsa ng pagkapaso ay kulang",invalid:"Hindi valid ang petsa ng pagkapaso",expired:"Ang petsa ng pagkapaso {date} ay lumipas na",tooFarInFuture:"Hindi valid ang taon ng pagkapaso"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"Ang CVC ay kulang"}},name:{label:"Pangalan ng may-ari ng kard",placeholder:"Buong pangalan"},pay:{button:"Magbayad ngayon"},compact:{button:"Credit o debit card"}},status:{error:"Ang iyong paraan ng pagbabayad ay tinanggihan. Maaaring dahil ito sa hindi sapat na pondo, nag-expire na mga detalye ng pagbabayad, o mga paghihigpit sa seguridad. Pakisuri ang iyong mga detalye ng pagbabayad o subukang ibang paraan ng pagbabayad.",invalidSession:"Ang iyong sesyon ng pagbabayad ay nag-expire na. Paki-refresh ang pahina upang magpatuloy."}},fr:{card:{required:"OBLIGATOIRE",number:{label:"Numéro de carte",error:{invalid:"Numéro de carte non valide",incomplete:"Numéro de carte incomplet",unsupported:"Type de carte non supporté"}},expiry:{label:"Date d'expiration",placeholder:"MM / AA",error:{incomplete:"Date d'expiration incomplète",invalid:"Date d'expiration non valide",expired:"Date d'expiration {date} dépassée",tooFarInFuture:"Année d'expiration invalide"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC incomplet"}},name:{label:"Nom du titulaire de la carte",placeholder:"Nom complet"},pay:{button:"Payer maintenant"},compact:{button:"Carte de crédit ou de débit"}},status:{error:"Votre moyen de paiement a été refusé. Cela peut être dû à des fonds insuffisants, des détails de paiement expirés ou des restrictions de sécurité. Veuillez vérifier vos détails de paiement ou essayer un autre moyen de paiement.",invalidSession:"Votre session de paiement a expiré. Veuillez actualiser la page pour continuer."}},hr:{card:{required:"POTREBNO",number:{label:"Broj kartice",error:{invalid:"Broj kartice nije valjan",incomplete:"Broj kartice nije potpun",unsupported:"Vrsta kartice nije podržana"}},expiry:{label:"Datum isteka",placeholder:"MM / GG",error:{incomplete:"Datum isteka nepotpun",invalid:"Datum isteka nije valjan",expired:"Datum isteka {date} je prošao",tooFarInFuture:"Godina isteka nije valjana"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC nepotpun"}},name:{label:"Ime vlasnika kartice",placeholder:"Puno ime"},pay:{button:"Plati sada"},compact:{button:"Platna kartica"}},status:{error:"Vaš način plaćanja je odbijen. To može biti zbog nedovoljnih sredstava, isteklih podataka o plaćanju ili sigurnosnih ograničenja. Molimo provjerite svoje podatke o plaćanju ili pokušajte s drugim načinom plaćanja.",invalidSession:"Vaša sesija plaćanja je istekla. Molimo osvježite stranicu za nastavak."}},hu:{card:{required:"KÖTELEZŐ",number:{label:"Kártyaszám",error:{invalid:"A kártyaszám érvénytelen",incomplete:"A kártyaszám hiányos",unsupported:"A kártya típusa nem támogatott"}},expiry:{label:"Lejárat dátuma",placeholder:"HH / ÉÉ",error:{incomplete:"Lejárati dátum hiányos",invalid:"Lejárati dátum érvénytelen",expired:"Lejárati dátum {date} eltelt",tooFarInFuture:"Lejárati év érvénytelen"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC hiányos"}},name:{label:"Kártyabirtokos neve",placeholder:"Teljes név"},pay:{button:"Fizess most"},compact:{button:"Bankkártya"}},status:{error:"A fizetési módot elutasították. Ez annak köszönhető, hogy nincs elegendő fedezet, lejártak a fizetési adatok, vagy biztonsági korlátozások léptek életbe. Ellenőrizze a fizetési adatait, vagy próbáljon meg másik fizetési módot használni.",invalidSession:"A fizetési munkamenete lejárt. Frissítse az oldalt a folytatáshoz."}},id:{card:{required:"WAJIB",number:{label:"Nomor kartu",error:{invalid:"Nomor kartu tidak valid",incomplete:"Nomor kartu tidak lengkap",unsupported:"Tipe kartu tidak didukung"}},expiry:{label:"Tanggal kedaluwarsa",placeholder:"BB / TT",error:{incomplete:"Tanggal kedaluwarsa tidak lengkap",invalid:"Tanggal kedaluwarsa tidak valid",expired:"Tanggal kedaluwarsa {date} telah lewat",tooFarInFuture:"Tahun kedaluwarsa tidak valid"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC tidak lengkap"}},name:{label:"Nama pemegang kartu",placeholder:"Nama lengkap"},pay:{button:"Bayar sekarang"},compact:{button:"Kartu kredit atau debit"}},status:{error:"Metode pembayaran Anda ditolak. Ini bisa karena dana tidak mencukupi, detail pembayaran kedaluwarsa, atau pembatasan keamanan. Silakan periksa detail pembayaran Anda atau coba metode pembayaran lain.",invalidSession:"Sesi pembayaran Anda telah kedaluwarsa. Silakan muat ulang halaman untuk melanjutkan."}},it:{card:{required:"OBBLIGATORIO",number:{label:"Numero carta",error:{invalid:"Numero carta non valido",incomplete:"Numero carta incompleto",unsupported:"Tipo di carta non supportato"}},expiry:{label:"Data di scadenza",placeholder:"MM / AA",error:{incomplete:"Data di scadenza incompleta",invalid:"Data di scadenza non valida",expired:"Data di scadenza {date} è passata",tooFarInFuture:"Anno di scadenza non valido"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC incompleto"}},name:{label:"Nome del titolare della carta",placeholder:"Nome e cognome"},pay:{button:"Paga ora"},compact:{button:"Carta di credito o debito"}},status:{error:"Il tuo metodo di pagamento è stato rifiutato. Ciò potrebbe essere dovuto a fondi insufficienti, dettagli di pagamento scaduti o restrizioni di sicurezza. Si prega di controllare i dettagli di pagamento o provare un metodo di pagamento diverso.",invalidSession:"La tua sessione di pagamento è scaduta. Si prega di aggiornare la pagina per continuare."}},ja:{card:{required:"必須",number:{label:"カード番号",error:{invalid:"カード番号が無効です",incomplete:"カード番号に不備があります",unsupported:"サポートされていないカードタイプ"}},expiry:{label:"有効期限",placeholder:"MM (月) / YY (年)",error:{incomplete:"有効期限に不備があります",invalid:"有効期限が無効です",expired:"有効期限 {date} が過ぎています",tooFarInFuture:"有効期限の年が無効です"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVCに不備があります"}},name:{label:"カード保有者の名前",placeholder:"氏名"},pay:{button:"今すぐ支払う"},compact:{button:"クレジットカード・デビットカード"}},status:{error:"お支払い方法が拒否されました。これは、残高不足、有効期限切れのお支払い情報、またはセキュリティ制限が原因である可能性があります。お支払い情報を確認するか、別のお支払い方法をお試しください。",invalidSession:"お支払いセッションの有効期限が切れました。ページを更新して続行してください。"}},ko:{card:{required:"필수",number:{label:"카드 번호",error:{invalid:"카드 번호가 잘못되었습니다",incomplete:"카드 번호가 불완전합니다",unsupported:"지원되지 않는 카드 유형"}},expiry:{label:"만료 날짜",placeholder:"MM / YY",error:{incomplete:"유효기간이 불완전합니다",invalid:"유효기간이 잘못되었습니다",expired:"유효기간 {date}이(가) 지났습니다",tooFarInFuture:"만료 연도가 잘못되었습니다"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC가 불완전합니다"}},name:{label:"카드 소유자 이름",placeholder:"성명"},pay:{button:"지금 결제"},compact:{button:"신용카드·체크카드"}},status:{error:"결제 수단이 거부되었습니다. 잔액 부족, 만료된 결제 정보 또는 보안 제한으로 인해 발생할 수 있습니다. 결제 정보를 확인하거나 다른 결제 수단을 시도해 주세요.",invalidSession:"결제 세션이 만료되었습니다. 계속하려면 페이지를 새로고침하세요."}},lt:{card:{required:"PRIVALOMA",number:{label:"Kortelės numeris",error:{invalid:"Kortelės numeris negalioja",incomplete:"Kortelės numeris neišsamus",unsupported:"Nepalaikomas kortelės tipas"}},expiry:{label:"Galioja iki",placeholder:"mm / MM",error:{incomplete:"Galiojimo data neišsami",invalid:"Galiojimo data netinkama",expired:"Galiojimo data {date} praėjo",tooFarInFuture:"Galiojimo metai netinkami"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC neišsamus"}},name:{label:"Kortelės turėtojo vardas ir pavardė",placeholder:"Vardas ir pavardė"},pay:{button:"Mokėti dabar"},compact:{button:"Banko kortelė"}},status:{error:"Jūsų mokėjimo būdas buvo atmestas. Tai gali būti dėl nepakankamų lėšų, pasibaigusios mokėjimo informacijos ar saugumo apribojimų. Patikrinkite savo mokėjimo informaciją arba bandykite kitą mokėjimo būdą.",invalidSession:"Jūsų mokėjimo seansas baigėsi. Atnaujinkite puslapį, kad tęstumėte."}},lv:{card:{required:"OBLIGĀTI",number:{label:"Kartes numurs",error:{invalid:"Kartes numurs nav derīgs",incomplete:"Kartes numurs nav pilnīgs",unsupported:"Kartes tips nav atbalstīts"}},expiry:{label:"Derīgs līdz",placeholder:"MM / YY",error:{incomplete:"Derīguma datums nav pilnīgs",invalid:"Derīguma datums nav derīgs",expired:"Derīguma datums {date} ir pagājis",tooFarInFuture:"Derīguma gads nav derīgs"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC nav pilnīgs"}},name:{label:"Kartes īpašnieka vārds",placeholder:"Vārds, uzvārds"},pay:{button:"Maksāt tūlīt"},compact:{button:"Bankas karte"}},status:{error:"Jūsu maksājuma metode tika noraidīta. Tas var būt nepietiekamu līdzekļu, novecojušas maksājumu informācijas vai drošības ierobežojumu dēļ. Lūdzu, pārbaudiet savu maksājumu informāciju vai mēģiniet citu maksājuma metodi.",invalidSession:"Jūsu maksājuma sesija ir beigusies. Lūdzu, atsvaidziniet lapu, lai turpinātu."}},ms:{card:{required:"DIPERLUKAN",number:{label:"Nombor kad",error:{invalid:"Nombor kad tidak sah",incomplete:"Nombor kad tidak lengkap",unsupported:"Jenis kad tidak disokong"}},expiry:{label:"Tarikh tamat tempoh",placeholder:"BB / TT",error:{incomplete:"Tarikh tamat tempoh tidak lengkap",invalid:"Tarikh tamat tempoh tidak sah",expired:"Tarikh tamat tempoh {date} telah berlalu",tooFarInFuture:"Tahun tamat tempoh tidak sah"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC tidak lengkap"}},name:{label:"Nama pemegang kad",placeholder:"Nama penuh"},pay:{button:"Bayar sekarang"},compact:{button:"Kad kredit atau debit"}},status:{error:"Kaedah pembayaran anda ditolak. Ini mungkin disebabkan oleh dana yang tidak mencukupi, butiran pembayaran yang tamat tempoh atau sekatan keselamatan. Sila semak butiran pembayaran anda atau cuba kaedah pembayaran lain.",invalidSession:"Sesi pembayaran anda telah tamat tempoh. Sila muat semula halaman untuk meneruskan."}},ru:{card:{required:"ОБЯЗАТЕЛЬНО",number:{label:"Номер карты",error:{invalid:"Неверный номер карты",incomplete:"Номер карты неполон",unsupported:"Неподдерживаемый тип карты"}},expiry:{label:"Срок действия",placeholder:"ММ / ГГ",error:{incomplete:"Срок действия указан не полностью",invalid:"Срок действия недействителен",expired:"Срок действия {date} истек",tooFarInFuture:"Недействительный год истечения срока"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC введен не полностью"}},name:{label:"Имя владельца карты",placeholder:"Имя фамилия"},pay:{button:"Оплатить сейчас"},compact:{button:"Банковская карта"}},status:{error:"Ваш способ оплаты был отклонен. Это может быть из-за недостаточных средств, истекших платежных данных или ограничений безопасности. Пожалуйста, проверьте ваши платежные данные или попробуйте другой способ оплаты.",invalidSession:"Ваша платежная сессия истекла. Пожалуйста, обновите страницу, чтобы продолжить."}},mt:{card:{required:"MEĦTIEĠ/A",number:{label:"Numru tal-karta",error:{invalid:"In-numru tal-karta mhuwiex tajjeb",incomplete:"In-numru tal-karta mhuwiex komplut",unsupported:"Tip ta' karta mhux appoġġjat"}},expiry:{label:"Data tal-iskadenza",placeholder:"XX / SS",error:{incomplete:"Data tal-iskadenza mhix sħiħa",invalid:"Data tal-iskadenza mhix tajba",expired:"Data tal-iskadenza {date} għaddiet",tooFarInFuture:"Is-sena tal-iskadenza mhix valida"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC mhux sħiħ"}},name:{label:"Isem id-detentur tal-karta",placeholder:"Isem u kunjom"},pay:{button:"Ħallas issa"},compact:{button:"Karta bankarja"}},status:{error:"Il-metodu tal-ħlas tiegħek ġie miċħud. Dan jista' jkun minħabba fondi insuffiċjenti, dettalji tal-ħlas skaduti jew restrizzjonijiet ta' sigurtà. Jekk jogħġbok iċċekkja d-dettalji tal-ħlas tiegħek jew prova metodu ta' ħlas differenti.",invalidSession:"Sessjoni skaduta. Jekk jogħġbok aġġorna l-paġna biex tkompli."}},no:{card:{required:"PÅKREVD",number:{label:"Kortnummer",error:{invalid:"Kortnummer er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Korttype støttes ikke"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{invalid:"Utløpsdato ugyldig",incomplete:"Utløpsdato ufullstendig",expired:"Utløpsdato {date} har passert",tooFarInFuture:"Utløpsår ugyldig"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ufullstendig"}},name:{label:"Kortholders navn",placeholder:"Fullt navn"},pay:{button:"Betal nå"},compact:{button:"Bankkort"}},status:{error:"Betalingsmetoden din ble avvist. Dette kan skyldes utilstrekkelige midler, utløpte betalingsdetaljer eller sikkerhetsbegrensninger. Vennligst sjekk betalingsdetaljene dine eller prøv en annen betalingsmetode.",invalidSession:"Betalingsøkten din har utløpt. Vennligst oppdater siden for å fortsette."}},nl:{card:{required:"VEREIST",number:{label:"Kaartnummer",error:{invalid:"Kaartnummer is ongeldig",incomplete:"Kaartnummer is onvolledig",unsupported:"Kaarttype niet ondersteund"}},expiry:{label:"Vervaldatum",placeholder:"MM / JJ",error:{incomplete:"Vervaldatum onvolledig",invalid:"Vervaldatum ongeldig",expired:"Vervaldatum {date} is verstreken",tooFarInFuture:"Vervaljaar ongeldig"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC onvolledig"}},name:{label:"Naam kaarthouder",placeholder:"Volledige naam"},pay:{button:"Nu betalen"},compact:{button:"Betaalkaart"}},status:{error:"Je betaalmethode is geweigerd. Dit kan komen door onvoldoende saldo, verlopen betalingsgegevens of beveiligingsbeperkingen. Controleer je betalingsgegevens of probeer een andere betaalmethode.",invalidSession:"Je betaalsessie is verlopen. Ververs de pagina om door te gaan."}},pl:{card:{required:"WYMAGANE",number:{label:"Numer karty",error:{invalid:"Numer karty jest nieprawidłowy",incomplete:"Numer karty jest niepełny",unsupported:"Nieobsługiwany typ karty"}},expiry:{label:"Data ważności",placeholder:"MM / RR",error:{incomplete:"Data ważności niepełna",invalid:"Data ważności nieprawidłowa",expired:"Data ważności {date} minęła",tooFarInFuture:"Rok ważności nieprawidłowy"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC niekompletny"}},name:{label:"Imię i nazwisko posiadacza karty",placeholder:"Imię i nazwisko"},pay:{button:"Zapłać teraz"},compact:{button:"Karta płatnicza"}},status:{error:"Twoja metoda płatności została odrzucona. Może to wynikać z niewystarczających środków, wygasłych danych płatności lub ograniczeń bezpieczeństwa. Sprawdź dane płatności lub spróbuj innej metody płatności.",invalidSession:"Twoja sesja płatności wygasła. Odśwież stronę, aby kontynuować."}},pt:{card:{required:"OBRIGATÓRIO",number:{label:"Número do cartão",error:{invalid:"Número do cartão inválido",incomplete:"Número do cartão incompleto",unsupported:"Tipo de cartão não suportado"}},expiry:{label:"Data de validade",placeholder:"MM / AA",error:{incomplete:"Data de validade incompleta",invalid:"Data de validade inválida",expired:"Data de validade {date} passou",tooFarInFuture:"Ano de validade inválido"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC incompleto"}},name:{label:"Nome do titular do cartão",placeholder:"Nome completo"},pay:{button:"Pagar agora"},compact:{button:"Cartão de crédito ou débito"}},status:{error:"Seu método de pagamento foi recusado. Isso pode ser devido a fundos insuficientes, detalhes de pagamento expirados ou restrições de segurança. Por favor, verifique seus detalhes de pagamento ou tente um método de pagamento diferente.",invalidSession:"Sua sessão de pagamento expirou. Por favor, atualize a página para continuar."}},ro:{card:{required:"NECESAR",number:{label:"Număr card",error:{invalid:"Numărul cardului nu este valid",incomplete:"Numărul cardului nu este complet",unsupported:"Tipul cardului nu este acceptat"}},expiry:{label:"Data de expirare",placeholder:"LL / AA",error:{incomplete:"Data de expirare incompletă",invalid:"Data de expirare nu este validă",expired:"Data de expirare {date} a trecut",tooFarInFuture:"Anul de expirare este invalid"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC incomplet"}},name:{label:"Nume titular card",placeholder:"Nume complet"},pay:{button:"Plătește acum"},compact:{button:"Card de credit sau debit"}},status:{error:"Metoda dvs. de plată a fost refuzată. Acest lucru se poate datora fondurilor insuficiente, detaliilor de plată expirate sau restricțiilor de securitate. Vă rugăm să verificați detaliile de plată sau să încercați o altă metodă de plată.",invalidSession:"Sesiunea dvs. de plată a expirat. Vă rugăm să reîmprospătați pagina pentru a continua."}},uk:{card:{required:"ОБОВʼЯЗКОВО",number:{label:"Номер картки",error:{invalid:"Невірний номер картки",incomplete:"Номер картки неповний",unsupported:"Непідтримуваний тип картки"}},expiry:{label:"Термін дії",placeholder:"ММ / РР",error:{invalid:"Невірний термін дії",incomplete:"Термін дії вказано не повністю",expired:"Термін дії {date} минув",tooFarInFuture:"Недійсний рік закінчення терміну дії"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC-код неповний"}},name:{label:"Імʼя власника картки",placeholder:"Повне імʼя"},pay:{button:"Оплатити зараз"},compact:{button:"Платіжна картка"}},status:{error:"Ваш спосіб оплати було відхилено. Це може бути через недостатню кількість коштів, термін дії платіжних даних закінчився або обмеження безпеки. Будь ласка, перевірте свої платіжні дані або спробуйте інший спосіб оплати.",invalidSession:"Термін дії вашої платіжної сесії закінчився. Будь ласка, оновіть сторінку, щоб продовжити."}},sk:{card:{required:"POŽADOVANÉ",number:{label:"Číslo karty",error:{invalid:"Číslo karty je neplatné",incomplete:"Číslo karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Dátum ukončenia platnosti",placeholder:"MM / RR",error:{incomplete:"Dátum platnosti neúplný",invalid:"Dátum platnosti neplatný",expired:"Dátum platnosti {date} uplynul",tooFarInFuture:"Rok platnosti neplatný"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC neúplný"}},name:{label:"Držiteľ karty",placeholder:"Celé meno"},pay:{button:"Zaplatiť teraz"},compact:{button:"Platobná karta"}},status:{error:"Váš spôsob platby bol zamietnutý. Môže to byť kvôli nedostatočným prostriedkom, vypršaným platobným údajom alebo bezpečnostným obmedzeniam. Skontrolujte prosím svoje platobné údaje alebo skúste iný spôsob platby.",invalidSession:"Vaša platobná relácia vypršala. Obnovte stránku pre pokračovanie."}},sl:{card:{required:"OBVEZNO",number:{label:"Številka kartice",error:{invalid:"Številka kartice ni veljavna",incomplete:"Številka kartice ni popolna",unsupported:"Vrsta kartice ni podprta"}},expiry:{label:"Datum poteka",placeholder:"MM / LL",error:{incomplete:"Datum poteka ni popoln",invalid:"Datum poteka ni veljaven",expired:"Datum poteka {date} je potekel",tooFarInFuture:"Leto poteka ni veljavno"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ni popoln"}},name:{label:"Ime imetnika kartice",placeholder:"Polno ime"},pay:{button:"Plačaj zdaj"},compact:{button:"Plačilna kartica"}},status:{error:"Vaš način plačila je bil zavrnjen. To je lahko zaradi nezadostnih sredstev, poteklih podatkov o plačilu ali varnostnih omejitev. Preverite svoje podatke o plačilu ali poskusite drug način plačila.",invalidSession:"Vaša seja plačila je potekla. Osvežite stran za nadaljevanje."}},sv:{card:{required:"KRÄVS",number:{label:"Kortnummer",error:{invalid:"Kortnummer är ogiltigt",incomplete:"Kortnumret är ofullständigt",unsupported:"Korttypen stöds inte"}},expiry:{label:"Utgångsdatum",placeholder:"MM / ÅÅ",error:{incomplete:"Utgångsdatum ofullständigt",invalid:"Utgångsdatum ogiltigt",expired:"Utgångsdatum {date} har passerat",tooFarInFuture:"Utgångsår ogiltigt"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ofullständig"}},name:{label:"Kortinnehavarens namn",placeholder:"Fullständigt namn"},pay:{button:"Betala nu"},compact:{button:"Bankkort"}},status:{error:"Din betalningsmetod avvisades. Detta kan bero på otillräckliga medel, utgångna betalningsuppgifter eller säkerhetsbegränsningar. Vänligen kontrollera dina betalningsuppgifter eller prova en annan betalningsmetod.",invalidSession:"Din betalningssession har löpt ut. Vänligen uppdatera sidan för att fortsätta."}},th:{card:{required:"จำเป็น",number:{label:"หมายเลขบัตร",error:{invalid:"หมายเลขบัตรไม่ถูกต้อง",incomplete:"หมายเลขบัตรไม่ครบถ้วน",unsupported:"ประเภทบัตรไม่ถูกต้อง"}},expiry:{label:"วันหมดอายุ",placeholder:"ดด / ปป",error:{incomplete:"วันหมดอายุไม่ครบถ้วน",invalid:"วันหมดอายุไม่ถูกต้อง",expired:"วันหมดอายุ {date} ผ่านไปแล้ว",tooFarInFuture:"ปีหมดอายุไม่ถูกต้อง"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ไม่ครบถ้วน"}},name:{label:"ชื่อเจ้าของบัตร",placeholder:"ชื่อ-นามสกุล"},pay:{button:"ชำระเงินตอนนี้"},compact:{button:"บัตรเครดิตหรือเดบิต"}},status:{error:"วิธีการชำระเงินของคุณถูกปฏิเสธ อาจเป็นเพราะเงินไม่เพียงพอ ข้อมูลการชำระเงินหมดอายุ หรือข้อจำกัดด้านความปลอดภัย โปรดตรวจสอบข้อมูลการชำระเงินของคุณหรือลองวิธีการชำระเงินอื่น",invalidSession:"เซสชั่นการชำระเงินของคุณหมดอายุแล้ว โปรดรีเฟรชหน้าเพื่อดำเนินการต่อ"}},tr:{card:{required:"GEREKLI",number:{label:"Kart numarası",error:{invalid:"Kart numarası geçersiz",incomplete:"Kart numarası eksik",unsupported:"Desteklenmeyen kart türü"}},expiry:{label:"Son Kullanma Tarihi",placeholder:"AA / YY",error:{incomplete:"Son kullanma tarihi eksik",invalid:"Son kullanım tarihi geçersiz",expired:"Son kullanma tarihi {date} geçti",tooFarInFuture:"Son kullanma yılı geçersiz"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC eksik"}},name:{label:"Kart sahibinin adı",placeholder:"Ad ve soyadı"},pay:{button:"Şimdi öde"},compact:{button:"Banka kartı"}},status:{error:"Ödeme yönteminiz reddedildi. Bu, yetersiz bakiye, süresi dolmuş ödeme bilgileri veya güvenlik kısıtlamaları nedeniyle olabilir. Lütfen ödeme bilgilerinizi kontrol edin veya farklı bir ödeme yöntemi deneyin.",invalidSession:"Ödeme oturumunuz sona erdi. Devam etmek için lütfen sayfayı yenileyin."}},vi:{card:{required:"BẮT BUỘC",number:{label:"Số thẻ",error:{invalid:"Số thẻ không hợp lệ",incomplete:"Số thẻ không đầy đủ",unsupported:"Không hỗ trợ loại thẻ"}},expiry:{label:"Ngày hết hạn",placeholder:"MM / YY",error:{incomplete:"Ngày hết hạn không đầy đủ",invalid:"Ngày hết hạn không hợp lệ",expired:"Ngày hết hạn {date} đã qua",tooFarInFuture:"Năm hết hạn không hợp lệ"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC không đầy đủ"}},name:{label:"Tên chủ thẻ",placeholder:"Họ và tên"},pay:{button:"Thanh toán ngay"},compact:{button:"Thẻ tín dụng hoặc ghi nợ"}},status:{error:"Phương thức thanh toán của bạn đã bị từ chối. Điều này có thể do số dư không đủ, thông tin thanh toán đã hết hạn hoặc hạn chế bảo mật. Vui lòng kiểm tra thông tin thanh toán của bạn hoặc thử phương thức thanh toán khác.",invalidSession:"Phiên thanh toán của bạn đã hết hạn. Vui lòng làm mới trang để tiếp tục."}},zh:{card:{required:"必填",number:{label:"卡号",error:{invalid:"卡号无效",incomplete:"卡号不完整",unsupported:"不支持的卡类型"}},expiry:{label:"有效期",placeholder:"月份 / 年份",error:{incomplete:"有效期不完整",invalid:"有效期无效",expired:"有效期 {date} 已过",tooFarInFuture:"有效期年份无效"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC 不完整"}},name:{label:"持卡人姓名",placeholder:"全名"},pay:{button:"立即支付"},compact:{button:"信用卡·借记卡"}},status:{error:"您的付款方式被拒绝。这可能是由于余额不足、付款详情过期或安全限制。请检查您的付款详情或尝试其他付款方式。",invalidSession:"您的付款会话已过期。请刷新页面以继续。"}}},On=()=>{const r=navigator==null?void 0:navigator.language.split("-")[0];return xn[r]||xn.en},Li=(r,t={})=>{var a,i;if(!r)return On();const e=xn[r]||On();return{card:U(U({},e.card),t.card&&{required:t.card.required||e.card.required,number:t.card.number?J(U(U({},e.card.number),t.card.number),{error:t.card.number.error?U(U({},e.card.number.error),t.card.number.error):e.card.number.error}):e.card.number,expiry:t.card.expiry?J(U(U({},e.card.expiry),t.card.expiry),{error:t.card.expiry.error?U(U({},e.card.expiry.error),t.card.expiry.error):e.card.expiry.error}):e.card.expiry,cvc:t.card.cvc?J(U(U({},e.card.cvc),t.card.cvc),{error:t.card.cvc.error?U(U({},e.card.cvc.error),t.card.cvc.error):e.card.cvc.error}):e.card.cvc,name:t.card.name?U(U({},e.card.name),t.card.name):e.card.name,pay:t.card.pay?U(U({},e.card.pay),t.card.pay):e.card.pay,compact:t.card.compact?U(U({},e.card.compact),t.card.compact):e.card.compact}),status:{error:((a=t==null?void 0:t.status)==null?void 0:a.error)||e.status.error,invalidSession:((i=t==null?void 0:t.status)==null?void 0:i.invalidSession)||e.status.invalidSession}}};class vl extends kt{constructor(){super({messages:On(),locale:(navigator==null?void 0:navigator.language.split("-")[0])||"en"})}setMessages(t){const e=this.locale(),n=Li(e,t);this.setState({locale:e,messages:n,overrides:t})}setLocale(t){const e=this.overrides(),n=Li(t,e);this.setState({locale:t,messages:n,overrides:e})}overrides(){const{overrides:t}=this.getState();return t}messages(){const{messages:t}=this.getState();return t}locale(){const{locale:t}=this.getState();return t}dir(){return this.locale()==="ar"?"rtl":"ltr"}}const gl={layout:"vertical",tagline:!1,height:40,borderRadius:12};class bl{constructor(){A(this,"paypal",null)}init(t){return K(this,null,function*(){if(typeof window=="undefined")throw new Error("PayPal can only be initialized in browser environment");try{const{loadScript:e}=yield Promise.resolve().then(()=>Rl);this.paypal=yield e(t)}catch(e){throw this.paypal=null,e}})}isLoaded(){return this.paypal!==null&&this.paypal.Buttons!==void 0}render(t,e){return K(this,null,function*(){var n,a;if(!t.isConnected)throw new Error("PayPal parent element must be connected to DOM before render()");if(this.paypal){const i=U(U({},gl),(e==null?void 0:e.style)||{}),s=J(U({fundingSource:"paypal"},e),{style:i}),o=(a=(n=this.paypal).Buttons)==null?void 0:a.call(n,s);if(!o)throw new Error("PayPal Buttons instance is null");yield o.render(t)}})}}class yl{constructor(){A(this,"client",null);A(this,"venmoInstance",null);A(this,"deviceData",null)}init(t){return K(this,null,function*(){if(typeof window=="undefined")throw new Error("Braintree can only be initialized in browser environment");try{const[e,n]=yield Promise.all([Promise.resolve().then(()=>Sl),Promise.resolve().then(()=>Dl)]),a=e.default,i=n.default;this.client=yield a.create({authorization:t.authorization});try{const s=yield i.create({client:this.client,paypal:!0});this.deviceData=s.deviceData||null}catch(s){console.warn("Braintree device data collection failed:",s),this.deviceData=null}}catch(e){throw console.error("Failed to initialize Braintree client:",e),e}})}createVenmo(t){return K(this,null,function*(){if(!this.client)throw new Error("Braintree client must be initialized before creating Venmo instance");try{const n=(yield Promise.resolve().then(()=>Fl)).default;return this.venmoInstance=yield n.create(U({client:this.client,allowDesktop:!0,mobileWebFallBack:!0,allowDesktopWebLogin:!0,paymentMethodUsage:"multi_use"},t)),this.venmoInstance}catch(e){throw console.error("Failed to create Venmo instance:",e),e}})}isBrowserSupported(){var t,e;return(e=(t=this.venmoInstance)==null?void 0:t.isBrowserSupported())!=null?e:!1}hasTokenizationResult(){var t,e;return(e=(t=this.venmoInstance)==null?void 0:t.hasTokenizationResult())!=null?e:!1}tokenize(){return K(this,null,function*(){if(!this.venmoInstance)throw new Error("Venmo instance not initialized");return new Promise((t,e)=>{this.venmoInstance.tokenize(void 0,(n,a)=>{if(n)e(n);else{const i=J(U({},a),{device_data:this.deviceData||void 0}),s=a,o=(s==null?void 0:s.billingAddress)||(s==null?void 0:s.billing_address);if(o){const c={city:o.adminArea2,country:o.countryCode,line1:o.line1,line2:o.line2,postal_code:o.postalCode,state:o.adminArea1};i.billing_address=c}t(i)}})})})}}class Ri{constructor(){A(this,"ev",new sa);A(this,"paypal",new bl);A(this,"braintree",new yl);A(this,"state",{translate:new vl,checkout:new pl,transaction:new ml,styles:new fl});A(this,"checkout",new dl({state:this.state,service:{ev:this.ev,paypal:this.paypal,braintree:this.braintree}}))}clearState(){Object.values(this.state).forEach(t=>t.clearState())}}const _l=Object.freeze(Object.defineProperty({__proto__:null,Core:Ri},Symbol.toStringTag,{value:"Module"}));let St=null;function El(){return K(this,null,function*(){return St||(St=new Promise((r,t)=>{const e=document.createElement("script");if(e.src="https://js.evervault.com/v2",e.onload=()=>r(),e.onerror=()=>{St=null,t()},!document.head)throw new Error("Expected document.head not to be null. Evervault.js requires a <head> element.");document.head.appendChild(e)}),St)})}function ki(){return K(this,null,function*(){if(window.Evervault)return window.Evervault;try{return yield El(),window.Evervault}catch(r){throw new Error("Failed to load Evervault.js")}})}function Cl(r,t,e){return K(this,null,function*(){const n=yield ki();return new n(r,t,e)})}Promise.resolve().then(()=>{ki()});const wl=Object.freeze(Object.defineProperty({__proto__:null,loadEvervault:Cl},Symbol.toStringTag,{value:"Module"}));/*!
195
+ `);A(this,"element",document.createElement("div"));this.element.classList.add(ie.successContainer),this.element.innerHTML=this.template}render(){return this.element}}const Ni={container:"_container_79xkl_1",title:"_title_79xkl_5"};class cl{constructor(){A(this,"element");A(this,"message",document.createElement("p"));A(this,"icon",new ol);this.element=document.createElement("div"),this.element.classList.add(Ni.container),this.message.classList.add(Ni.title),this.element.append(this.icon.render(),this.message)}addClassName(t){ae(this.element,t)}removeClassName(t){this.element.classList.remove(t)}render(){return this.element}}const Pi={container:"_container_g3abj_1",title:"_title_g3abj_12"},St=class St{constructor(t,e){A(this,"element");A(this,"message",document.createElement("p"));A(this,"icon",new Lt);A(this,"hasCustomMessage",!1);A(this,"hasConfigMessage",!1);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(Pi.container),this.message.classList.add(Pi.title),e?(this.message.textContent=e,this.hasCustomMessage=!0,this.hasConfigMessage=!0):this.message.textContent=t.messages().status.error,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:n})=>{this.hasCustomMessage||(this.message.textContent=n.status.error)}),St.instances.add(this)}setMessage(t){this.hasConfigMessage||(this.message.textContent=t,this.hasCustomMessage=!!t)}addClassName(t){ae(this.element,t)}removeClassName(t){this.element.classList.remove(t)}hide(){this.element.style.display="none"}show(){this.element.style.display="flex"}render(){return this.element}};A(St,"instances",new Set);let In=St;class ll{constructor(t){A(this,"isLoading",!1);A(this,"isFormOpen",!1);A(this,"closedHeight",0);A(this,"hasLoadedOnce",!1);A(this,"checkout");A(this,"container",document.createElement("div"));A(this,"loader",new uc);A(this,"success");A(this,"buttons");A(this,"form");A(this,"error");A(this,"errorPrevHeight",null);A(this,"FORM_HEIGHT",309);this.config=t,this.buttons=new $c(t),this.form=new sl({translate:t.state.translate,className:be.hidden,stylesState:t.state.styles,isDefaultVariant:t.state.checkout.getState().variant==="default",onPaymentAttempt:e=>{var n,a;return(a=(n=this.config.state.checkout.getState()).onCheckoutAttempt)==null?void 0:a.call(n,e)}}),this.success=new cl,this.success.addClassName(be.hidden),this.error=new In(t.state.translate,t.state.checkout.getState().errorMessageText),this.error.hide(),this.container.append(this.loader.render(),this.buttons.render(),this.form.render()),this.checkout=document.createElement("div"),this.checkout.classList.add(be.checkout),this.checkout.append(this.container,this.error.render(),this.success.render())}init(){return K(this,null,function*(){this.buttons.addEventListener("onPaymentAttempt",t=>{var n;const e=this.config.state.checkout.getState();(n=e.onCheckoutAttempt)==null||n.call(e,{paymentMethod:t}),this.hideError()}),this.buttons.addEventListener("onFormLoaded",()=>{const{onCheckoutLoaded:t}=this.config.state.checkout.getState();!this.hasLoadedOnce&&t&&(this.hasLoadedOnce=!0,t({success:!0}))}),this.buttons.addEventListener("ready",()=>K(this,null,function*(){var e;this.loader.setClassName(be.hidden);const{variant:t}=this.config.state.checkout.getState();if(this.form.setDefaultVariant(t==="default"),this.buttons.showButton(),t==="default"){const n=this.checkout.getBoundingClientRect().height;n<this.FORM_HEIGHT&&(this.checkout.style.height=`${n}px`),this.form.element.classList.remove(be.hidden),n<this.FORM_HEIGHT&&(yield(e=this.checkout.animate({minHeight:[`${n}px`,`${this.FORM_HEIGHT}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?e:Promise.resolve(),this.checkout.style.height=""),this.isFormOpen=!0}})),this.buttons.addEventListener("open",()=>K(this,null,function*(){var a;if(this.isLoading)return;this.hideError();const t=this.checkout.getBoundingClientRect().height;this.closedHeight=t,t<this.FORM_HEIGHT&&(this.checkout.style.height=`${t}px`),yield pe(this.buttons.buttons,Nt.close,Nt.transition),this.buttons.buttons.classList.add(be.hidden),this.form.element.classList.add(be.formInitial),this.form.element.classList.remove(be.hidden);const e=t;let n=null;e<this.FORM_HEIGHT&&(this.checkout.style.height=`${e}px`,n=(a=this.checkout.animate({minHeight:[`${e}px`,`${this.FORM_HEIGHT}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?a:Promise.resolve()),yield Promise.all([pe(this.form.element,Ze.open,Ze.transition),n!=null?n:Promise.resolve()]),e<this.FORM_HEIGHT&&(this.checkout.style.height=""),this.isFormOpen=!0})),this.buttons.addEventListener("error",t=>{const{onCheckoutFail:e,onCheckoutLoaded:n}=this.config.state.checkout.getState(),a=this.config.state.translate.messages(),i=Ot(t,a);this.showError(i);const s={status:"failed",status_reason:{advice_code:"try_again_later",decline_code:Re.GENERIC_DECLINE,message:t.message||t}};!this.hasLoadedOnce&&n&&(this.hasLoadedOnce=!0,n({success:!1,error:s})),e==null||e(s)}),this.buttons.addEventListener("success",t=>{const{clientToken:e}=this.config.state.checkout.getState();switch(t.type){case"apple":return this.handleSuccess({clientSession:e,applePay:t});case"google":return this.handleSuccess({clientSession:e,googlePay:t});case"paypal":return this.handleSuccess({clientSession:e,paypal:{billing_agreement_token:t}});case"venmo":return this.handleSuccess({clientSession:e,braintree:{nonce:t}})}}),this.form.addEventListener("close",()=>K(this,null,function*(){var i,s;if(this.isLoading)return;this.hideError();const t=this.checkout.getBoundingClientRect().height;let e=null;this.closedHeight>0&&t>this.closedHeight&&(this.checkout.style.height=`${t}px`,e=(i=this.checkout.animate({minHeight:[`${t}px`,`${this.closedHeight}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?i:Promise.resolve()),yield pe(this.form.element,Ze.close,Ze.transition),this.form.element.classList.add(be.hidden);const{variant:a}=this.config.state.checkout.getState();if(a!=="default"){this.buttons.buttons.classList.add(be.btnsInitial),this.buttons.buttons.classList.remove(be.hidden);const o=pe(this.buttons.buttons,Nt.open,Nt.transition);yield Promise.all([o,e!=null?e:Promise.resolve()])}this.closedHeight>0&&(e=(s=this.checkout.animate({minHeight:[`${t}px`,`${this.closedHeight}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?s:Promise.resolve(),this.checkout.style.height="auto"),this.isFormOpen=!1})),this.form.addEventListener("submit",t=>K(this,null,function*(){if(this.isLoading||(this.form.touchSubmit(),this.hideError(),!this.form.validate()))return;const n=t.number.replace(/\D/g,""),a=this.config.state.checkout.getState(),i=this.config.service.ev.getEv(),[s,o]=yield Promise.all([i.encrypt(n),i.encrypt(t.cvc)]),[c,l]=t.expiry.split("/");yield this.handleSuccess({clientSession:a.clientToken,card:{firstSixDigits:n.slice(0,6),lastFourDigits:n.slice(-4),expMonth:Number(c),expYear:Number(l),cardBrand:t.cardBrand||"",number:s,cvc:o,type:G.CARD,metadata:{name:t.name,userAgent:navigator==null?void 0:navigator.userAgent}}})})),yield this.buttons.init()})}handleError(t){var i;const e=this.config.state.checkout.getState(),n=this.config.state.translate.messages(),a=Ot(t,n);t&&(this.showError(a),(i=e.onCheckoutFail)==null||i.call(e,t)),this.setLoading(!1)}handleSuccess(t){return K(this,null,function*(){var i,s;if(this.isLoading)return;this.hideError(),this.setLoading(!0);const e=this.config.state.checkout.getState(),n=this.config.state.translate.messages();let a;try{if(a=yield ea(t,e.environment,e.apiVersion),a.error)throw new Error(((i=a.error)==null?void 0:i.message)||n.status.error);if(a.three_ds_session_id){yield this.config.service.ev.initThreeDs({threeDsId:a.three_ds_session_id,onSuccess:()=>{this.setLoading(!1),this.handleSuccess(J(U({},t),{threeDsSessionId:a==null?void 0:a.three_ds_session_id}))},onError:()=>{this.handleError(a==null?void 0:a.status_reason)}});return}if(a.payment_status===Je.FAILED||a.payment_status===Je.DECLINED){this.handleError(a.status_reason);return}yield this.showSuccess(),this.setLoading(!1)}catch(o){return this.handleError({status:"failed",status_reason:{advice_code:"try_again_later",decline_code:Re.GENERIC_DECLINE,message:o.message||o}})}(s=e.onCheckoutComplete)==null||s.call(e,a)})}showSuccess(){return K(this,null,function*(){this.container.classList.add(be.hidden),this.success.removeClassName(be.hidden),yield pe(this.success.element,Ze.open,Ze.transition)})}hideError(){if(this.error.hide(),this.errorPrevHeight!==null){const t=this.checkout.getBoundingClientRect().height;this.checkout.style.height=`${t}px`;const e=this.checkout.animate({minHeight:[`${t}px`,`${this.closedHeight}px`]},{duration:250,easing:"ease-out",fill:"forwards"});this.checkout.style.height="auto",e.onfinish=()=>{this.errorPrevHeight=null},e.oncancel=()=>{this.errorPrevHeight=null}}}showError(t){if(this.loader.setClassName(be.hidden),t&&this.error.setMessage(t),this.error.show(),this.errorPrevHeight===null){const e=this.checkout.getBoundingClientRect().height;this.errorPrevHeight=e,this.checkout.style.height=`${e}px`,requestAnimationFrame(()=>{const n=this.checkout.getBoundingClientRect().height,a=this.checkout.animate({minHeight:[`${e}px`,`${n}px`]},{duration:250,easing:"ease-out",fill:"forwards"});a.onfinish=()=>{this.checkout.style.height=""}})}}setLoading(t){this.isLoading=t,this.form.setLoading(t),this.loader.setClassName(!t||this.isFormOpen?be.hidden:"")}render(){return this.checkout}}class dl{constructor(t){A(this,"component");this.config=t}init(){return K(this,null,function*(){const{checkout:t,transaction:e,translate:n,styles:a}=this.config.state,{apiVersion:i}=t.getState();t.subscribe(({clientToken:s,environment:o,locale:c,translate:l,styles:d})=>{const u=Te.teamId,h=Te.appIds[o];this.config.service.ev.preloadEvervault({teamId:u,appId:h}).finally(),c&&n.locale()!==c&&n.setLocale(c),l&&n.overrides()!==l&&n.setMessages(l),d&&a.setState(d),e.updateTransaction(s,o,i).then(p=>{if(!p)throw new Error("Payment config not found");return this.config.service.ev.initEv({teamId:u,appId:h})}).catch(p=>{if(console.error(p),this.component){const f=n.messages(),m=p.name==="INVALID_SESSION"?f.status.invalidSession:p.message;this.component.showError(m)}})})})}mount(){return K(this,null,function*(){return this.component||(this.component=new ll(this.config)),yield this.init(),yield this.component.init(),this.component.render()})}}class Rt{constructor(t){A(this,"initialState");A(this,"state");A(this,"observer",new ue);this.initialState=t,this.state=t}getState(){return this.state}setState(t){this.state=t,this.observer.emit(t)}clearState(){this.state=this.initialState,this.observer.clear()}subscribe(t){return this.observer.addListener(t)}}const ul={clientToken:"",environment:"sandbox",apiVersion:"1.0.0",variant:"default"};class pl extends Rt{constructor(t){super(U(U({},ul),t))}}const hl={};class fl extends Rt{constructor(t){super(U(U({},hl),t))}}class ml extends Rt{constructor(e){super(e||null);A(this,"clientToken","")}updateTransaction(e,n,a){return K(this,null,function*(){if(this.clientToken===e)return this.getState();this.clientToken=e;try{const i=yield na(e,n,a);return this.setState(i),i}catch(i){console.error("Failed to update transaction:",i);const s=new Error("INVALID_SESSION");throw s.name="INVALID_SESSION",s}})}}const xn={ar:{card:{required:"يتطلب",number:{label:"رقم البطاقة",error:{invalid:"رقم البطاقة غير صالح",incomplete:"رقم البطاقة غير كامل",unsupported:"نوع البطاقة غير المدعوم"}},expiry:{label:"تاريخ الانتهاء",placeholder:"سنة / شهر",error:{invalid:"تاريخ انتهاء الصلاحية غير صالح",incomplete:"تاريخ انتهاء الصلاحية غير كامل",expired:"تاريخ انتهاء الصلاحية {date} قد انقضى",tooFarInFuture:"سنة انتهاء الصلاحية غير صالحة"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC غير كامل"}},name:{label:"اسم حامل البطاقة",placeholder:"الاسم الكامل على البطاقة"},pay:{button:"ادفع الآن"},compact:{button:"بطاقة الائتمان أو الخصم"}},status:{error:"تم رفض طريقة الدفع الخاصة بك. قد يكون هذا بسبب عدم كفاية الأموال أو تفاصيل الدفع منتهية الصلاحية أو قيود الأمان. يرجى التحقق من تفاصيل الدفع الخاصة بك أو تجربة طريقة دفع مختلفة.",invalidSession:"انتهت صلاحية جلسة الدفع الخاصة بك. يرجى تحديث الصفحة للمتابعة."}},en:{card:{required:"REQUIRED",number:{label:"Card number",error:{invalid:"Card number is invalid",incomplete:"Card number is incomplete",unsupported:"Unsupported card type"}},expiry:{label:"Expiry date",placeholder:"MM / YY",error:{invalid:"Expiry date is invalid",incomplete:"Expiry date is incomplete",expired:"Expiry date {date} has passed",tooFarInFuture:"Expiration year is invalid"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC is incomplete"}},name:{label:"Cardholder name",placeholder:"Full name on card"},pay:{button:"Pay Now"},compact:{button:"Credit or debit card"}},status:{error:"Your payment method was declined. This could be due to insufficient funds, expired payment details, or security restrictions. Please check your payment details or try a different payment method.",invalidSession:"Your payment session has expired. Please refresh the page to continue."}},bg:{card:{required:"ЗАДЪЛЖИТЕЛНО",number:{label:"Номер на карта",error:{invalid:"Номерът на картата е неправилен",incomplete:"Номерът на картата е непълен",unsupported:"Неподдържан тип карта"}},expiry:{label:"Годен до",placeholder:"ММ / ГГ",error:{incomplete:"Датата на валидност е непълна",invalid:"Датата на валидност е невалидна",expired:"Датата на валидност {date} е изтекла",tooFarInFuture:"Годината на валидност е невалидна"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC е непълен"}},name:{label:"Име на картодържателя",placeholder:"Пълно име върху картата"},pay:{button:"Платете сега"},compact:{button:"Банкова карта"}},status:{error:"Вашият метод на плащане беше отхвърлен. Това може да се дължи на недостатъчни средства, изтекли платежни данни или ограничения за сигурност. Моля, проверете вашите платежни данни или опитайте друг метод на плащане.",invalidSession:"Вашата платежна сесия е изтекла. Моля, опреснете страницата, за да продължите."}},cs:{card:{required:"POVINNÉ",number:{label:"Číslo karty",error:{invalid:"Číslo karty je neplatné",incomplete:"Číslo karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Datum platnosti",placeholder:"MM / RR",error:{incomplete:"Datum platnosti neúplné",invalid:"Datum platnosti neplatné",expired:"Datum platnosti {date} uplynulo",tooFarInFuture:"Rok platnosti neplatný"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC neúplný"}},name:{label:"Jméno držitele karty",placeholder:"Celé jméno"},pay:{button:"Zaplatit nyní"},compact:{button:"Platební karta"}},status:{error:"Váš způsob platby byl odmítnut. Může to být kvůli nedostatečným prostředkům, vypršelým platebním údajům nebo bezpečnostním omezením. Zkontrolujte prosím své platební údaje nebo zkuste jiný způsob platby.",invalidSession:"Vaše platební relace vypršela. Obnovte stránku pro pokračování."}},da:{card:{required:"PÅKRÆVET",number:{label:"Kortnummer",error:{invalid:"Kortnummer er ugyldigt",incomplete:"Kortnummeret er ufuldstændigt",unsupported:"Korttype understøttes ikke"}},expiry:{label:"Udløbsdato",placeholder:"MM / ÅÅ",error:{incomplete:"Udløbsdato ufuldstændig",invalid:"Udløbsdato ugyldig",expired:"Udløbsdato {date} er passeret",tooFarInFuture:"Udløbsår ugyldigt"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ufuldstændig"}},name:{label:"Kortholderens navn",placeholder:"Fulde navn"},pay:{button:"Betal nu"},compact:{button:"Betalingskort"}},status:{error:"Din betalingsmetode blev afvist. Dette kan skyldes utilstrækkelige midler, udløbne betalingsoplysninger eller sikkerhedsbegrænsninger. Kontroller venligst dine betalingsoplysninger eller prøv en anden betalingsmetode.",invalidSession:"Din betalingssession er udløbet. Opdater venligst siden for at fortsætte."}},de:{card:{required:"PFLICHT",number:{label:"Kartennummer",error:{invalid:"Kartennummer ist ungültig",incomplete:"Kartennummer ist unvollständig",unsupported:"Nicht unterstützter Kartentyp"}},expiry:{label:"Ablaufdatum",placeholder:"MM / JJ",error:{incomplete:"Ablaufdatum ist unvollständig",invalid:"Ablaufdatum ist ungültig",expired:"Ablaufdatum {date} ist abgelaufen",tooFarInFuture:"Ablaufjahr ist ungültig"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ist unvollständig"}},name:{label:"Name des/der Karteninhaber",placeholder:"Vollständiger Name"},pay:{button:"Jetzt bezahlen"},compact:{button:"Kredit- oder Debitkarte"}},status:{error:"Ihre Zahlungsmethode wurde abgelehnt. Dies könnte auf unzureichende Mittel, abgelaufene Zahlungsdetails oder Sicherheitsbeschränkungen zurückzuführen sein. Bitte überprüfen Sie Ihre Zahlungsdetails oder versuchen Sie eine andere Zahlungsmethode.",invalidSession:"Ihre Zahlungssitzung ist abgelaufen. Bitte aktualisieren Sie die Seite, um fortzufahren."}},el:{card:{required:"Απαιτούμενο",number:{label:"Αριθμός κάρτας",error:{invalid:"Ο αριθμός κάρτας δεν είναι έγκυρος",incomplete:"Ο αριθμός κάρτας είναι ελλιπής",unsupported:"Ο τύπος κάρτας δεν υποστηρίζεται"}},expiry:{label:"Ημερομηνία λήξης",placeholder:"ΜΜ / ΕΕ",error:{incomplete:"Η ημερομηνία λήξης είναι ελλιπής",invalid:"Η ημερομηνία λήξης δεν είναι έγκυρη",expired:"Η ημερομηνία λήξης {date} έχει παρέλθει",tooFarInFuture:"Το έτος λήξης δεν είναι έγκυρο"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"Το CVC είναι ελλιπές"}},name:{label:"Όνομα κατόχου κάρτας",placeholder:"Πλήρες όνομα στην κάρτα"},pay:{button:"Πληρώστε τώρα"},compact:{button:"Τραπεζική κάρτα"}},status:{error:"Η μέθοδος πληρωμής σας απορρίφθηκε. Αυτό μπορεί να οφείλεται σε ανεπαρκή κεφάλαια, ληγμένα στοιχεία πληρωμής ή περιορισμούς ασφαλείας. Παρακαλούμε ελέγξτε τα στοιχεία πληρωμής σας ή δοκιμάστε μια διαφορετική μέθοδο πληρωμής.",invalidSession:"Η συνεδρία πληρωμής σας έχει λήξει. Παρακαλούμε ανανεώστε τη σελίδα για να συνεχίσετε."}},es:{card:{required:"OBLIGATORIO",number:{label:"Número de tarjeta",error:{invalid:"Número de tarjeta no válido",incomplete:"Número de tarjeta incompleto",unsupported:"Tipo de tarjeta no soportado"}},expiry:{label:"Fecha de caducidad",placeholder:"MM / AA",error:{incomplete:"Fecha de caducidad incompleta",invalid:"Fecha de caducidad no válida",expired:"Fecha de caducidad {date} ha pasado",tooFarInFuture:"Año de vencimiento no válido"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC incompleto"}},name:{label:"Nombre del titular de la tarjeta",placeholder:"Nombre completo"},pay:{button:"Pagar ahora"},compact:{button:"Tarjeta de crédito o débito"}},status:{error:"Su método de pago fue rechazado. Esto podría deberse a fondos insuficientes, detalles de pago caducados o restricciones de seguridad. Por favor, verifique sus detalles de pago o pruebe con otro método de pago.",invalidSession:"Su sesión de pago ha caducado. Por favor, actualice la página para continuar."}},et:{card:{required:"NÕUTAV",number:{label:"Kaardi number",error:{invalid:"Kaardinumber ei sobi",incomplete:"Kaardinumber on puudulik",unsupported:"Kaardi tüüp ei ole toetatud"}},expiry:{label:"Aegumiskuupäev",placeholder:"KK / AA",error:{incomplete:"Aegumiskuupäev on puudulik",invalid:"Aegumiskuupäev on kehtetu",expired:"Aegumiskuupäev {date} on möödunud",tooFarInFuture:"Aegumisaasta on kehtetu"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC on puudulik"}},name:{label:"Kaardiomaniku nimi",placeholder:"Täisnimi"},pay:{button:"Maksa kohe"},compact:{button:"Pangakaart"}},status:{error:"Teie makseviis lükati tagasi. See võib olla tingitud ebapiisavatest vahenditest, aegunud makseandmetest või turvapiirangutes. Palun kontrollige oma makseandmeid või proovige teist makseviisi.",invalidSession:"Teie makseseanss on aegunud. Palun värskendage lehte jätkamiseks."}},fi:{card:{required:"PAKOLLINEN",number:{label:"Kortin numero",error:{invalid:"Kortin numero ei kelpaa",incomplete:"Kortin numero on puutteellinen",unsupported:"Korttyyppiä ei tueta"}},expiry:{label:"Voimassaoloaika",placeholder:"KK / VV",error:{incomplete:"Voimassaoloaika puutteellinen",invalid:"Voimassaoloaika virheellinen",expired:"Voimassaoloaika {date} umpeutunut",tooFarInFuture:"Voimassaolovuosi virheellinen"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC puutteellinen"}},name:{label:"Kortinhaltijan nimi",placeholder:"Koko nimi"},pay:{button:"Maksa nyt"},compact:{button:"Pankkikortti"}},status:{error:"Maksutapasi hylättiin. Tämä voi johtua riittämättömistä varoista, vanhentuneista maksutiedoista tai turvallisuusrajoituksista. Tarkista maksutietosi tai kokeile toista maksutapaa.",invalidSession:"Maksuistuntosi on vanhentunut. Päivitä sivu jatkaaksesi."}},fil:{card:{required:"KAILANGAN",number:{label:"Numero ng card",error:{invalid:"Hindi valid ang numero ng kard",incomplete:"Ang numero ng kard ay kulang",unsupported:"Hindi sinusuportahang uri ng card"}},expiry:{label:"Petsa ng pagkapaso",placeholder:"BB / TT",error:{incomplete:"Ang petsa ng pagkapaso ay kulang",invalid:"Hindi valid ang petsa ng pagkapaso",expired:"Ang petsa ng pagkapaso {date} ay lumipas na",tooFarInFuture:"Hindi valid ang taon ng pagkapaso"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"Ang CVC ay kulang"}},name:{label:"Pangalan ng may-ari ng kard",placeholder:"Buong pangalan"},pay:{button:"Magbayad ngayon"},compact:{button:"Credit o debit card"}},status:{error:"Ang iyong paraan ng pagbabayad ay tinanggihan. Maaaring dahil ito sa hindi sapat na pondo, nag-expire na mga detalye ng pagbabayad, o mga paghihigpit sa seguridad. Pakisuri ang iyong mga detalye ng pagbabayad o subukang ibang paraan ng pagbabayad.",invalidSession:"Ang iyong sesyon ng pagbabayad ay nag-expire na. Paki-refresh ang pahina upang magpatuloy."}},fr:{card:{required:"OBLIGATOIRE",number:{label:"Numéro de carte",error:{invalid:"Numéro de carte non valide",incomplete:"Numéro de carte incomplet",unsupported:"Type de carte non supporté"}},expiry:{label:"Date d'expiration",placeholder:"MM / AA",error:{incomplete:"Date d'expiration incomplète",invalid:"Date d'expiration non valide",expired:"Date d'expiration {date} dépassée",tooFarInFuture:"Année d'expiration invalide"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC incomplet"}},name:{label:"Nom du titulaire de la carte",placeholder:"Nom complet"},pay:{button:"Payer maintenant"},compact:{button:"Carte de crédit ou de débit"}},status:{error:"Votre moyen de paiement a été refusé. Cela peut être dû à des fonds insuffisants, des détails de paiement expirés ou des restrictions de sécurité. Veuillez vérifier vos détails de paiement ou essayer un autre moyen de paiement.",invalidSession:"Votre session de paiement a expiré. Veuillez actualiser la page pour continuer."}},hr:{card:{required:"POTREBNO",number:{label:"Broj kartice",error:{invalid:"Broj kartice nije valjan",incomplete:"Broj kartice nije potpun",unsupported:"Vrsta kartice nije podržana"}},expiry:{label:"Datum isteka",placeholder:"MM / GG",error:{incomplete:"Datum isteka nepotpun",invalid:"Datum isteka nije valjan",expired:"Datum isteka {date} je prošao",tooFarInFuture:"Godina isteka nije valjana"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC nepotpun"}},name:{label:"Ime vlasnika kartice",placeholder:"Puno ime"},pay:{button:"Plati sada"},compact:{button:"Platna kartica"}},status:{error:"Vaš način plaćanja je odbijen. To može biti zbog nedovoljnih sredstava, isteklih podataka o plaćanju ili sigurnosnih ograničenja. Molimo provjerite svoje podatke o plaćanju ili pokušajte s drugim načinom plaćanja.",invalidSession:"Vaša sesija plaćanja je istekla. Molimo osvježite stranicu za nastavak."}},hu:{card:{required:"KÖTELEZŐ",number:{label:"Kártyaszám",error:{invalid:"A kártyaszám érvénytelen",incomplete:"A kártyaszám hiányos",unsupported:"A kártya típusa nem támogatott"}},expiry:{label:"Lejárat dátuma",placeholder:"HH / ÉÉ",error:{incomplete:"Lejárati dátum hiányos",invalid:"Lejárati dátum érvénytelen",expired:"Lejárati dátum {date} eltelt",tooFarInFuture:"Lejárati év érvénytelen"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC hiányos"}},name:{label:"Kártyabirtokos neve",placeholder:"Teljes név"},pay:{button:"Fizess most"},compact:{button:"Bankkártya"}},status:{error:"A fizetési módot elutasították. Ez annak köszönhető, hogy nincs elegendő fedezet, lejártak a fizetési adatok, vagy biztonsági korlátozások léptek életbe. Ellenőrizze a fizetési adatait, vagy próbáljon meg másik fizetési módot használni.",invalidSession:"A fizetési munkamenete lejárt. Frissítse az oldalt a folytatáshoz."}},id:{card:{required:"WAJIB",number:{label:"Nomor kartu",error:{invalid:"Nomor kartu tidak valid",incomplete:"Nomor kartu tidak lengkap",unsupported:"Tipe kartu tidak didukung"}},expiry:{label:"Tanggal kedaluwarsa",placeholder:"BB / TT",error:{incomplete:"Tanggal kedaluwarsa tidak lengkap",invalid:"Tanggal kedaluwarsa tidak valid",expired:"Tanggal kedaluwarsa {date} telah lewat",tooFarInFuture:"Tahun kedaluwarsa tidak valid"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC tidak lengkap"}},name:{label:"Nama pemegang kartu",placeholder:"Nama lengkap"},pay:{button:"Bayar sekarang"},compact:{button:"Kartu kredit atau debit"}},status:{error:"Metode pembayaran Anda ditolak. Ini bisa karena dana tidak mencukupi, detail pembayaran kedaluwarsa, atau pembatasan keamanan. Silakan periksa detail pembayaran Anda atau coba metode pembayaran lain.",invalidSession:"Sesi pembayaran Anda telah kedaluwarsa. Silakan muat ulang halaman untuk melanjutkan."}},it:{card:{required:"OBBLIGATORIO",number:{label:"Numero carta",error:{invalid:"Numero carta non valido",incomplete:"Numero carta incompleto",unsupported:"Tipo di carta non supportato"}},expiry:{label:"Data di scadenza",placeholder:"MM / AA",error:{incomplete:"Data di scadenza incompleta",invalid:"Data di scadenza non valida",expired:"Data di scadenza {date} è passata",tooFarInFuture:"Anno di scadenza non valido"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC incompleto"}},name:{label:"Nome del titolare della carta",placeholder:"Nome e cognome"},pay:{button:"Paga ora"},compact:{button:"Carta di credito o debito"}},status:{error:"Il tuo metodo di pagamento è stato rifiutato. Ciò potrebbe essere dovuto a fondi insufficienti, dettagli di pagamento scaduti o restrizioni di sicurezza. Si prega di controllare i dettagli di pagamento o provare un metodo di pagamento diverso.",invalidSession:"La tua sessione di pagamento è scaduta. Si prega di aggiornare la pagina per continuare."}},ja:{card:{required:"必須",number:{label:"カード番号",error:{invalid:"カード番号が無効です",incomplete:"カード番号に不備があります",unsupported:"サポートされていないカードタイプ"}},expiry:{label:"有効期限",placeholder:"MM (月) / YY (年)",error:{incomplete:"有効期限に不備があります",invalid:"有効期限が無効です",expired:"有効期限 {date} が過ぎています",tooFarInFuture:"有効期限の年が無効です"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVCに不備があります"}},name:{label:"カード保有者の名前",placeholder:"氏名"},pay:{button:"今すぐ支払う"},compact:{button:"クレジットカード・デビットカード"}},status:{error:"お支払い方法が拒否されました。これは、残高不足、有効期限切れのお支払い情報、またはセキュリティ制限が原因である可能性があります。お支払い情報を確認するか、別のお支払い方法をお試しください。",invalidSession:"お支払いセッションの有効期限が切れました。ページを更新して続行してください。"}},ko:{card:{required:"필수",number:{label:"카드 번호",error:{invalid:"카드 번호가 잘못되었습니다",incomplete:"카드 번호가 불완전합니다",unsupported:"지원되지 않는 카드 유형"}},expiry:{label:"만료 날짜",placeholder:"MM / YY",error:{incomplete:"유효기간이 불완전합니다",invalid:"유효기간이 잘못되었습니다",expired:"유효기간 {date}이(가) 지났습니다",tooFarInFuture:"만료 연도가 잘못되었습니다"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC가 불완전합니다"}},name:{label:"카드 소유자 이름",placeholder:"성명"},pay:{button:"지금 결제"},compact:{button:"신용카드·체크카드"}},status:{error:"결제 수단이 거부되었습니다. 잔액 부족, 만료된 결제 정보 또는 보안 제한으로 인해 발생할 수 있습니다. 결제 정보를 확인하거나 다른 결제 수단을 시도해 주세요.",invalidSession:"결제 세션이 만료되었습니다. 계속하려면 페이지를 새로고침하세요."}},lt:{card:{required:"PRIVALOMA",number:{label:"Kortelės numeris",error:{invalid:"Kortelės numeris negalioja",incomplete:"Kortelės numeris neišsamus",unsupported:"Nepalaikomas kortelės tipas"}},expiry:{label:"Galioja iki",placeholder:"mm / MM",error:{incomplete:"Galiojimo data neišsami",invalid:"Galiojimo data netinkama",expired:"Galiojimo data {date} praėjo",tooFarInFuture:"Galiojimo metai netinkami"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC neišsamus"}},name:{label:"Kortelės turėtojo vardas ir pavardė",placeholder:"Vardas ir pavardė"},pay:{button:"Mokėti dabar"},compact:{button:"Banko kortelė"}},status:{error:"Jūsų mokėjimo būdas buvo atmestas. Tai gali būti dėl nepakankamų lėšų, pasibaigusios mokėjimo informacijos ar saugumo apribojimų. Patikrinkite savo mokėjimo informaciją arba bandykite kitą mokėjimo būdą.",invalidSession:"Jūsų mokėjimo seansas baigėsi. Atnaujinkite puslapį, kad tęstumėte."}},lv:{card:{required:"OBLIGĀTI",number:{label:"Kartes numurs",error:{invalid:"Kartes numurs nav derīgs",incomplete:"Kartes numurs nav pilnīgs",unsupported:"Kartes tips nav atbalstīts"}},expiry:{label:"Derīgs līdz",placeholder:"MM / YY",error:{incomplete:"Derīguma datums nav pilnīgs",invalid:"Derīguma datums nav derīgs",expired:"Derīguma datums {date} ir pagājis",tooFarInFuture:"Derīguma gads nav derīgs"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC nav pilnīgs"}},name:{label:"Kartes īpašnieka vārds",placeholder:"Vārds, uzvārds"},pay:{button:"Maksāt tūlīt"},compact:{button:"Bankas karte"}},status:{error:"Jūsu maksājuma metode tika noraidīta. Tas var būt nepietiekamu līdzekļu, novecojušas maksājumu informācijas vai drošības ierobežojumu dēļ. Lūdzu, pārbaudiet savu maksājumu informāciju vai mēģiniet citu maksājuma metodi.",invalidSession:"Jūsu maksājuma sesija ir beigusies. Lūdzu, atsvaidziniet lapu, lai turpinātu."}},ms:{card:{required:"DIPERLUKAN",number:{label:"Nombor kad",error:{invalid:"Nombor kad tidak sah",incomplete:"Nombor kad tidak lengkap",unsupported:"Jenis kad tidak disokong"}},expiry:{label:"Tarikh tamat tempoh",placeholder:"BB / TT",error:{incomplete:"Tarikh tamat tempoh tidak lengkap",invalid:"Tarikh tamat tempoh tidak sah",expired:"Tarikh tamat tempoh {date} telah berlalu",tooFarInFuture:"Tahun tamat tempoh tidak sah"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC tidak lengkap"}},name:{label:"Nama pemegang kad",placeholder:"Nama penuh"},pay:{button:"Bayar sekarang"},compact:{button:"Kad kredit atau debit"}},status:{error:"Kaedah pembayaran anda ditolak. Ini mungkin disebabkan oleh dana yang tidak mencukupi, butiran pembayaran yang tamat tempoh atau sekatan keselamatan. Sila semak butiran pembayaran anda atau cuba kaedah pembayaran lain.",invalidSession:"Sesi pembayaran anda telah tamat tempoh. Sila muat semula halaman untuk meneruskan."}},ru:{card:{required:"ОБЯЗАТЕЛЬНО",number:{label:"Номер карты",error:{invalid:"Неверный номер карты",incomplete:"Номер карты неполон",unsupported:"Неподдерживаемый тип карты"}},expiry:{label:"Срок действия",placeholder:"ММ / ГГ",error:{incomplete:"Срок действия указан не полностью",invalid:"Срок действия недействителен",expired:"Срок действия {date} истек",tooFarInFuture:"Недействительный год истечения срока"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC введен не полностью"}},name:{label:"Имя владельца карты",placeholder:"Имя фамилия"},pay:{button:"Оплатить сейчас"},compact:{button:"Банковская карта"}},status:{error:"Ваш способ оплаты был отклонен. Это может быть из-за недостаточных средств, истекших платежных данных или ограничений безопасности. Пожалуйста, проверьте ваши платежные данные или попробуйте другой способ оплаты.",invalidSession:"Ваша платежная сессия истекла. Пожалуйста, обновите страницу, чтобы продолжить."}},mt:{card:{required:"MEĦTIEĠ/A",number:{label:"Numru tal-karta",error:{invalid:"In-numru tal-karta mhuwiex tajjeb",incomplete:"In-numru tal-karta mhuwiex komplut",unsupported:"Tip ta' karta mhux appoġġjat"}},expiry:{label:"Data tal-iskadenza",placeholder:"XX / SS",error:{incomplete:"Data tal-iskadenza mhix sħiħa",invalid:"Data tal-iskadenza mhix tajba",expired:"Data tal-iskadenza {date} għaddiet",tooFarInFuture:"Is-sena tal-iskadenza mhix valida"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC mhux sħiħ"}},name:{label:"Isem id-detentur tal-karta",placeholder:"Isem u kunjom"},pay:{button:"Ħallas issa"},compact:{button:"Karta bankarja"}},status:{error:"Il-metodu tal-ħlas tiegħek ġie miċħud. Dan jista' jkun minħabba fondi insuffiċjenti, dettalji tal-ħlas skaduti jew restrizzjonijiet ta' sigurtà. Jekk jogħġbok iċċekkja d-dettalji tal-ħlas tiegħek jew prova metodu ta' ħlas differenti.",invalidSession:"Sessjoni skaduta. Jekk jogħġbok aġġorna l-paġna biex tkompli."}},no:{card:{required:"PÅKREVD",number:{label:"Kortnummer",error:{invalid:"Kortnummer er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Korttype støttes ikke"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{invalid:"Utløpsdato ugyldig",incomplete:"Utløpsdato ufullstendig",expired:"Utløpsdato {date} har passert",tooFarInFuture:"Utløpsår ugyldig"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ufullstendig"}},name:{label:"Kortholders navn",placeholder:"Fullt navn"},pay:{button:"Betal nå"},compact:{button:"Bankkort"}},status:{error:"Betalingsmetoden din ble avvist. Dette kan skyldes utilstrekkelige midler, utløpte betalingsdetaljer eller sikkerhetsbegrensninger. Vennligst sjekk betalingsdetaljene dine eller prøv en annen betalingsmetode.",invalidSession:"Betalingsøkten din har utløpt. Vennligst oppdater siden for å fortsette."}},nl:{card:{required:"VEREIST",number:{label:"Kaartnummer",error:{invalid:"Kaartnummer is ongeldig",incomplete:"Kaartnummer is onvolledig",unsupported:"Kaarttype niet ondersteund"}},expiry:{label:"Vervaldatum",placeholder:"MM / JJ",error:{incomplete:"Vervaldatum onvolledig",invalid:"Vervaldatum ongeldig",expired:"Vervaldatum {date} is verstreken",tooFarInFuture:"Vervaljaar ongeldig"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC onvolledig"}},name:{label:"Naam kaarthouder",placeholder:"Volledige naam"},pay:{button:"Nu betalen"},compact:{button:"Betaalkaart"}},status:{error:"Je betaalmethode is geweigerd. Dit kan komen door onvoldoende saldo, verlopen betalingsgegevens of beveiligingsbeperkingen. Controleer je betalingsgegevens of probeer een andere betaalmethode.",invalidSession:"Je betaalsessie is verlopen. Ververs de pagina om door te gaan."}},pl:{card:{required:"WYMAGANE",number:{label:"Numer karty",error:{invalid:"Numer karty jest nieprawidłowy",incomplete:"Numer karty jest niepełny",unsupported:"Nieobsługiwany typ karty"}},expiry:{label:"Data ważności",placeholder:"MM / RR",error:{incomplete:"Data ważności niepełna",invalid:"Data ważności nieprawidłowa",expired:"Data ważności {date} minęła",tooFarInFuture:"Rok ważności nieprawidłowy"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC niekompletny"}},name:{label:"Imię i nazwisko posiadacza karty",placeholder:"Imię i nazwisko"},pay:{button:"Zapłać teraz"},compact:{button:"Karta płatnicza"}},status:{error:"Twoja metoda płatności została odrzucona. Może to wynikać z niewystarczających środków, wygasłych danych płatności lub ograniczeń bezpieczeństwa. Sprawdź dane płatności lub spróbuj innej metody płatności.",invalidSession:"Twoja sesja płatności wygasła. Odśwież stronę, aby kontynuować."}},pt:{card:{required:"OBRIGATÓRIO",number:{label:"Número do cartão",error:{invalid:"Número do cartão inválido",incomplete:"Número do cartão incompleto",unsupported:"Tipo de cartão não suportado"}},expiry:{label:"Data de validade",placeholder:"MM / AA",error:{incomplete:"Data de validade incompleta",invalid:"Data de validade inválida",expired:"Data de validade {date} passou",tooFarInFuture:"Ano de validade inválido"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC incompleto"}},name:{label:"Nome do titular do cartão",placeholder:"Nome completo"},pay:{button:"Pagar agora"},compact:{button:"Cartão de crédito ou débito"}},status:{error:"Seu método de pagamento foi recusado. Isso pode ser devido a fundos insuficientes, detalhes de pagamento expirados ou restrições de segurança. Por favor, verifique seus detalhes de pagamento ou tente um método de pagamento diferente.",invalidSession:"Sua sessão de pagamento expirou. Por favor, atualize a página para continuar."}},ro:{card:{required:"NECESAR",number:{label:"Număr card",error:{invalid:"Numărul cardului nu este valid",incomplete:"Numărul cardului nu este complet",unsupported:"Tipul cardului nu este acceptat"}},expiry:{label:"Data de expirare",placeholder:"LL / AA",error:{incomplete:"Data de expirare incompletă",invalid:"Data de expirare nu este validă",expired:"Data de expirare {date} a trecut",tooFarInFuture:"Anul de expirare este invalid"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC incomplet"}},name:{label:"Nume titular card",placeholder:"Nume complet"},pay:{button:"Plătește acum"},compact:{button:"Card de credit sau debit"}},status:{error:"Metoda dvs. de plată a fost refuzată. Acest lucru se poate datora fondurilor insuficiente, detaliilor de plată expirate sau restricțiilor de securitate. Vă rugăm să verificați detaliile de plată sau să încercați o altă metodă de plată.",invalidSession:"Sesiunea dvs. de plată a expirat. Vă rugăm să reîmprospătați pagina pentru a continua."}},uk:{card:{required:"ОБОВʼЯЗКОВО",number:{label:"Номер картки",error:{invalid:"Невірний номер картки",incomplete:"Номер картки неповний",unsupported:"Непідтримуваний тип картки"}},expiry:{label:"Термін дії",placeholder:"ММ / РР",error:{invalid:"Невірний термін дії",incomplete:"Термін дії вказано не повністю",expired:"Термін дії {date} минув",tooFarInFuture:"Недійсний рік закінчення терміну дії"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC-код неповний"}},name:{label:"Імʼя власника картки",placeholder:"Повне імʼя"},pay:{button:"Оплатити зараз"},compact:{button:"Платіжна картка"}},status:{error:"Ваш спосіб оплати було відхилено. Це може бути через недостатню кількість коштів, термін дії платіжних даних закінчився або обмеження безпеки. Будь ласка, перевірте свої платіжні дані або спробуйте інший спосіб оплати.",invalidSession:"Термін дії вашої платіжної сесії закінчився. Будь ласка, оновіть сторінку, щоб продовжити."}},sk:{card:{required:"POŽADOVANÉ",number:{label:"Číslo karty",error:{invalid:"Číslo karty je neplatné",incomplete:"Číslo karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Dátum ukončenia platnosti",placeholder:"MM / RR",error:{incomplete:"Dátum platnosti neúplný",invalid:"Dátum platnosti neplatný",expired:"Dátum platnosti {date} uplynul",tooFarInFuture:"Rok platnosti neplatný"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC neúplný"}},name:{label:"Držiteľ karty",placeholder:"Celé meno"},pay:{button:"Zaplatiť teraz"},compact:{button:"Platobná karta"}},status:{error:"Váš spôsob platby bol zamietnutý. Môže to byť kvôli nedostatočným prostriedkom, vypršaným platobným údajom alebo bezpečnostným obmedzeniam. Skontrolujte prosím svoje platobné údaje alebo skúste iný spôsob platby.",invalidSession:"Vaša platobná relácia vypršala. Obnovte stránku pre pokračovanie."}},sl:{card:{required:"OBVEZNO",number:{label:"Številka kartice",error:{invalid:"Številka kartice ni veljavna",incomplete:"Številka kartice ni popolna",unsupported:"Vrsta kartice ni podprta"}},expiry:{label:"Datum poteka",placeholder:"MM / LL",error:{incomplete:"Datum poteka ni popoln",invalid:"Datum poteka ni veljaven",expired:"Datum poteka {date} je potekel",tooFarInFuture:"Leto poteka ni veljavno"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ni popoln"}},name:{label:"Ime imetnika kartice",placeholder:"Polno ime"},pay:{button:"Plačaj zdaj"},compact:{button:"Plačilna kartica"}},status:{error:"Vaš način plačila je bil zavrnjen. To je lahko zaradi nezadostnih sredstev, poteklih podatkov o plačilu ali varnostnih omejitev. Preverite svoje podatke o plačilu ali poskusite drug način plačila.",invalidSession:"Vaša seja plačila je potekla. Osvežite stran za nadaljevanje."}},sv:{card:{required:"KRÄVS",number:{label:"Kortnummer",error:{invalid:"Kortnummer är ogiltigt",incomplete:"Kortnumret är ofullständigt",unsupported:"Korttypen stöds inte"}},expiry:{label:"Utgångsdatum",placeholder:"MM / ÅÅ",error:{incomplete:"Utgångsdatum ofullständigt",invalid:"Utgångsdatum ogiltigt",expired:"Utgångsdatum {date} har passerat",tooFarInFuture:"Utgångsår ogiltigt"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ofullständig"}},name:{label:"Kortinnehavarens namn",placeholder:"Fullständigt namn"},pay:{button:"Betala nu"},compact:{button:"Bankkort"}},status:{error:"Din betalningsmetod avvisades. Detta kan bero på otillräckliga medel, utgångna betalningsuppgifter eller säkerhetsbegränsningar. Vänligen kontrollera dina betalningsuppgifter eller prova en annan betalningsmetod.",invalidSession:"Din betalningssession har löpt ut. Vänligen uppdatera sidan för att fortsätta."}},th:{card:{required:"จำเป็น",number:{label:"หมายเลขบัตร",error:{invalid:"หมายเลขบัตรไม่ถูกต้อง",incomplete:"หมายเลขบัตรไม่ครบถ้วน",unsupported:"ประเภทบัตรไม่ถูกต้อง"}},expiry:{label:"วันหมดอายุ",placeholder:"ดด / ปป",error:{incomplete:"วันหมดอายุไม่ครบถ้วน",invalid:"วันหมดอายุไม่ถูกต้อง",expired:"วันหมดอายุ {date} ผ่านไปแล้ว",tooFarInFuture:"ปีหมดอายุไม่ถูกต้อง"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC ไม่ครบถ้วน"}},name:{label:"ชื่อเจ้าของบัตร",placeholder:"ชื่อ-นามสกุล"},pay:{button:"ชำระเงินตอนนี้"},compact:{button:"บัตรเครดิตหรือเดบิต"}},status:{error:"วิธีการชำระเงินของคุณถูกปฏิเสธ อาจเป็นเพราะเงินไม่เพียงพอ ข้อมูลการชำระเงินหมดอายุ หรือข้อจำกัดด้านความปลอดภัย โปรดตรวจสอบข้อมูลการชำระเงินของคุณหรือลองวิธีการชำระเงินอื่น",invalidSession:"เซสชั่นการชำระเงินของคุณหมดอายุแล้ว โปรดรีเฟรชหน้าเพื่อดำเนินการต่อ"}},tr:{card:{required:"GEREKLI",number:{label:"Kart numarası",error:{invalid:"Kart numarası geçersiz",incomplete:"Kart numarası eksik",unsupported:"Desteklenmeyen kart türü"}},expiry:{label:"Son Kullanma Tarihi",placeholder:"AA / YY",error:{incomplete:"Son kullanma tarihi eksik",invalid:"Son kullanım tarihi geçersiz",expired:"Son kullanma tarihi {date} geçti",tooFarInFuture:"Son kullanma yılı geçersiz"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC eksik"}},name:{label:"Kart sahibinin adı",placeholder:"Ad ve soyadı"},pay:{button:"Şimdi öde"},compact:{button:"Banka kartı"}},status:{error:"Ödeme yönteminiz reddedildi. Bu, yetersiz bakiye, süresi dolmuş ödeme bilgileri veya güvenlik kısıtlamaları nedeniyle olabilir. Lütfen ödeme bilgilerinizi kontrol edin veya farklı bir ödeme yöntemi deneyin.",invalidSession:"Ödeme oturumunuz sona erdi. Devam etmek için lütfen sayfayı yenileyin."}},vi:{card:{required:"BẮT BUỘC",number:{label:"Số thẻ",error:{invalid:"Số thẻ không hợp lệ",incomplete:"Số thẻ không đầy đủ",unsupported:"Không hỗ trợ loại thẻ"}},expiry:{label:"Ngày hết hạn",placeholder:"MM / YY",error:{incomplete:"Ngày hết hạn không đầy đủ",invalid:"Ngày hết hạn không hợp lệ",expired:"Ngày hết hạn {date} đã qua",tooFarInFuture:"Năm hết hạn không hợp lệ"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC không đầy đủ"}},name:{label:"Tên chủ thẻ",placeholder:"Họ và tên"},pay:{button:"Thanh toán ngay"},compact:{button:"Thẻ tín dụng hoặc ghi nợ"}},status:{error:"Phương thức thanh toán của bạn đã bị từ chối. Điều này có thể do số dư không đủ, thông tin thanh toán đã hết hạn hoặc hạn chế bảo mật. Vui lòng kiểm tra thông tin thanh toán của bạn hoặc thử phương thức thanh toán khác.",invalidSession:"Phiên thanh toán của bạn đã hết hạn. Vui lòng làm mới trang để tiếp tục."}},zh:{card:{required:"必填",number:{label:"卡号",error:{invalid:"卡号无效",incomplete:"卡号不完整",unsupported:"不支持的卡类型"}},expiry:{label:"有效期",placeholder:"月份 / 年份",error:{incomplete:"有效期不完整",invalid:"有效期无效",expired:"有效期 {date} 已过",tooFarInFuture:"有效期年份无效"}},cvc:{label:"CVC",placeholder:"CVC",error:{incomplete:"CVC 不完整"}},name:{label:"持卡人姓名",placeholder:"全名"},pay:{button:"立即支付"},compact:{button:"信用卡·借记卡"}},status:{error:"您的付款方式被拒绝。这可能是由于余额不足、付款详情过期或安全限制。请检查您的付款详情或尝试其他付款方式。",invalidSession:"您的付款会话已过期。请刷新页面以继续。"}}},On=()=>{const r=navigator==null?void 0:navigator.language.split("-")[0];return xn[r]||xn.en},Li=(r,t={})=>{var a,i;if(!r)return On();const e=xn[r]||On();return{card:U(U({},e.card),t.card&&{required:t.card.required||e.card.required,number:t.card.number?J(U(U({},e.card.number),t.card.number),{error:t.card.number.error?U(U({},e.card.number.error),t.card.number.error):e.card.number.error}):e.card.number,expiry:t.card.expiry?J(U(U({},e.card.expiry),t.card.expiry),{error:t.card.expiry.error?U(U({},e.card.expiry.error),t.card.expiry.error):e.card.expiry.error}):e.card.expiry,cvc:t.card.cvc?J(U(U({},e.card.cvc),t.card.cvc),{error:t.card.cvc.error?U(U({},e.card.cvc.error),t.card.cvc.error):e.card.cvc.error}):e.card.cvc,name:t.card.name?U(U({},e.card.name),t.card.name):e.card.name,pay:t.card.pay?U(U({},e.card.pay),t.card.pay):e.card.pay,compact:t.card.compact?U(U({},e.card.compact),t.card.compact):e.card.compact}),status:{error:((a=t==null?void 0:t.status)==null?void 0:a.error)||e.status.error,invalidSession:((i=t==null?void 0:t.status)==null?void 0:i.invalidSession)||e.status.invalidSession}}};class vl extends Rt{constructor(){super({messages:On(),locale:(navigator==null?void 0:navigator.language.split("-")[0])||"en"})}setMessages(t){const e=this.locale(),n=Li(e,t);this.setState({locale:e,messages:n,overrides:t})}setLocale(t){const e=this.overrides(),n=Li(t,e);this.setState({locale:t,messages:n,overrides:e})}overrides(){const{overrides:t}=this.getState();return t}messages(){const{messages:t}=this.getState();return t}locale(){const{locale:t}=this.getState();return t}dir(){return this.locale()==="ar"?"rtl":"ltr"}}const gl={layout:"vertical",tagline:!1,height:40,borderRadius:12};class bl{constructor(){A(this,"paypal",null)}init(t){return K(this,null,function*(){if(typeof window=="undefined")throw new Error("PayPal can only be initialized in browser environment");try{const{loadScript:e}=yield Promise.resolve().then(()=>Rl);this.paypal=yield e(t)}catch(e){throw this.paypal=null,e}})}isLoaded(){return this.paypal!==null&&this.paypal.Buttons!==void 0}render(t,e){return K(this,null,function*(){var n,a;if(!t.isConnected)throw new Error("PayPal parent element must be connected to DOM before render()");if(this.paypal){const i=U(U({},gl),(e==null?void 0:e.style)||{}),s=J(U({fundingSource:"paypal"},e),{style:i}),o=(a=(n=this.paypal).Buttons)==null?void 0:a.call(n,s);if(!o)throw new Error("PayPal Buttons instance is null");yield o.render(t)}})}}class yl{constructor(){A(this,"client",null);A(this,"venmoInstance",null);A(this,"deviceData",null)}init(t){return K(this,null,function*(){if(typeof window=="undefined")throw new Error("Braintree can only be initialized in browser environment");try{const[e,n]=yield Promise.all([Promise.resolve().then(()=>Sl),Promise.resolve().then(()=>Dl)]),a=e.default,i=n.default;this.client=yield a.create({authorization:t.authorization});try{const s=yield i.create({client:this.client,paypal:!0});this.deviceData=s.deviceData||null}catch(s){console.warn("Braintree device data collection failed:",s),this.deviceData=null}}catch(e){throw console.error("Failed to initialize Braintree client:",e),e}})}createVenmo(t){return K(this,null,function*(){if(!this.client)throw new Error("Braintree client must be initialized before creating Venmo instance");try{const n=(yield Promise.resolve().then(()=>Fl)).default;return this.venmoInstance=yield n.create(U({client:this.client,allowDesktop:!0,mobileWebFallBack:!0,allowDesktopWebLogin:!0,paymentMethodUsage:"multi_use"},t)),this.venmoInstance}catch(e){throw console.error("Failed to create Venmo instance:",e),e}})}isBrowserSupported(){var t,e;return(e=(t=this.venmoInstance)==null?void 0:t.isBrowserSupported())!=null?e:!1}hasTokenizationResult(){var t,e;return(e=(t=this.venmoInstance)==null?void 0:t.hasTokenizationResult())!=null?e:!1}tokenize(){return K(this,null,function*(){if(!this.venmoInstance)throw new Error("Venmo instance not initialized");return new Promise((t,e)=>{this.venmoInstance.tokenize(void 0,(n,a)=>{if(n)e(n);else{const i=J(U({},a),{device_data:this.deviceData||void 0}),s=a,o=(s==null?void 0:s.billingAddress)||(s==null?void 0:s.billing_address);if(o){const c={city:o.adminArea2,country:o.countryCode,line1:o.line1,line2:o.line2,postal_code:o.postalCode,state:o.adminArea1};i.billing_address=c}t(i)}})})})}}class Ri{constructor(){A(this,"ev",new sa);A(this,"paypal",new bl);A(this,"braintree",new yl);A(this,"state",{translate:new vl,checkout:new pl,transaction:new ml,styles:new fl});A(this,"checkout",new dl({state:this.state,service:{ev:this.ev,paypal:this.paypal,braintree:this.braintree}}))}clearState(){Object.values(this.state).forEach(t=>t.clearState())}}const _l=Object.freeze(Object.defineProperty({__proto__:null,Core:Ri},Symbol.toStringTag,{value:"Module"}));let kt=null;function El(){return K(this,null,function*(){return kt||(kt=new Promise((r,t)=>{const e=document.createElement("script");if(e.src="https://js.evervault.com/v2",e.onload=()=>r(),e.onerror=()=>{kt=null,t()},!document.head)throw new Error("Expected document.head not to be null. Evervault.js requires a <head> element.");document.head.appendChild(e)}),kt)})}function ki(){return K(this,null,function*(){if(window.Evervault)return window.Evervault;try{return yield El(),window.Evervault}catch(r){throw new Error("Failed to load Evervault.js")}})}function Cl(r,t,e){return K(this,null,function*(){const n=yield ki();return new n(r,t,e)})}Promise.resolve().then(()=>{ki()});const wl=Object.freeze(Object.defineProperty({__proto__:null,loadEvervault:Cl},Symbol.toStringTag,{value:"Module"}));/*!
196
196
  * paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
197
197
  * Copyright 2020-present, PayPal, Inc. All rights reserved.
198
198
  *
@@ -220,7 +220,7 @@ ${m}::-ms-input-placeholder{${f}}
220
220
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
221
221
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
222
222
  PERFORMANCE OF THIS SOFTWARE.
223
- ***************************************************************************** */function s(y,T,_,P){function D(C){return C instanceof _?C:new _(function(z){z(C)})}return new(_||(_=Promise))(function(C,z){function Z(te){try{k(P.next(te))}catch(we){z(we)}}function le(te){try{k(P.throw(te))}catch(we){z(we)}}function k(te){te.done?C(te.value):D(te.value).then(Z,le)}k((P=P.apply(y,[])).next())})}function o(y,T){var _={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},P,D,C,z;return z={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(z[Symbol.iterator]=function(){return this}),z;function Z(k){return function(te){return le([k,te])}}function le(k){if(P)throw new TypeError("Generator is already executing.");for(;_;)try{if(P=1,D&&(C=k[0]&2?D.return:k[0]?D.throw||((C=D.return)&&C.call(D),0):D.next)&&!(C=C.call(D,k[1])).done)return C;switch(D=0,C&&(k=[k[0]&2,C.value]),k[0]){case 0:case 1:C=k;break;case 4:return _.label++,{value:k[1],done:!1};case 5:_.label++,D=k[1],k=[0];continue;case 7:k=_.ops.pop(),_.trys.pop();continue;default:if(C=_.trys,!(C=C.length>0&&C[C.length-1])&&(k[0]===6||k[0]===2)){_=0;continue}if(k[0]===3&&(!C||k[1]>C[0]&&k[1]<C[3])){_.label=k[1];break}if(k[0]===6&&_.label<C[1]){_.label=C[1],C=k;break}if(C&&_.label<C[2]){_.label=C[2],_.ops.push(k);break}C[2]&&_.ops.pop(),_.trys.pop();continue}k=T.call(y,_)}catch(te){k=[6,te],D=0}finally{P=C=0}if(k[0]&5)throw k[1];return{value:k[0]?k[1]:void 0,done:!0}}}var c={},l={};function d(y){var T,_=JSON.stringify(y);if(!y.forceScriptReload&&(T=l[_],T))return T;var P=document.createElement("script"),D=y.dataAttributes||{},C=y.container||document.head;return P.src=y.src,P.id=y.id||"",P.async=!0,y.type&&P.setAttribute("type","".concat(y.type)),y.crossorigin&&P.setAttribute("crossorigin","".concat(y.crossorigin)),Object.keys(D).forEach(function(z){P.setAttribute("data-".concat(z),"".concat(D[z]))}),T=new Promise(function(z,Z){P.addEventListener("load",function(){z(P)}),P.addEventListener("error",function(){Z(new Error("".concat(y.src," failed to load.")))}),P.addEventListener("abort",function(){Z(new Error("".concat(y.src," has aborted.")))}),C.appendChild(P)}),l[_]=T,T}d.clearCache=function(){l={}};var u=d,h=function(T){var _=document.querySelector('link[href="'.concat(T.href,'"]'));if(_)return Promise.resolve(_);_=document.createElement("link");var P=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),P.firstChild?P.insertBefore(_,P.firstChild):P.appendChild(_),Promise.resolve(_)};Object.defineProperty(c,"__esModule",{value:!0}),c.loadStylesheet=f=c.loadScript=void 0;var p=u,f=c.loadScript=p,m=h;c.loadStylesheet=m;var v="https://www.paypalobjects.com",b={minified:"axo.min",unminified:"axo"},w="fastlane",x="connect-boba",O="".concat(x,"/locales/"),I={AXO_ASSET_NAME:b,AXO_ASSET_PATH:x,LOCALE_PATH:O,CDNX_PROD:v},L={BT:"BT",PPCP:"PPCP"};function N(){return typeof window.define=="function"&&!!window.define.amd}function S(){return N()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function B(y,T,_){var P,D;return _===void 0&&(_=!0),s(this,void 0,void 0,function(){var C,z;return o(this,function(Z){if(C=$(),C&&C[y.module]){if(T&&((P=C[y.module])===null||P===void 0?void 0:P.VERSION)!==T)throw z=(D=C[y.module])===null||D===void 0?void 0:D.VERSION,new Error("".concat(y.module," already loaded with version ").concat(z," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(y.module," without specifying version"));return[2,G(y,T,_)]})})}function G(y,T,_){if(_===void 0&&(_=!0),N()){var P=_?y.amdModule.minified:y.amdModule.unminified;return new Promise(function(C,z){window.require([P],C,z)})}var D=_?y.script.minified:y.script.unminified;return f({id:"".concat(y.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(D)})}function $(){return window==null?void 0:window.braintree}var F,j,H={Client:"client",HostedCardFields:"hostedFields"},ee="braintree",M=(F={},F[H.Client]="client",F[H.HostedCardFields]="hosted-fields",F),q=(j={},j[H.Client]={id:"client",module:H.Client,amdModule:{unminified:"".concat(ee,"/").concat(M[H.Client]),minified:"".concat(ee,"/").concat(M[H.Client],".min")},script:{unminified:"".concat(M[H.Client],".js"),minified:"".concat(M[H.Client],".min.js")}},j[H.HostedCardFields]={id:"hcf",module:H.HostedCardFields,amdModule:{unminified:"".concat(ee,"/").concat(M[H.HostedCardFields]),minified:"".concat(ee,"/").concat(M[H.HostedCardFields],".min")},script:{unminified:"".concat(M[H.HostedCardFields],".js"),minified:"".concat(M[H.HostedCardFields],".min.js")}},j);function Y(y){return s(this,void 0,void 0,function(){var T,_,P,D;return o(this,function(C){switch(C.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=y.btSdkVersion,_=y.minified,P=R(y),D=V(y),y.platform!==L.BT?[3,2]:[4,Promise.all([B(q.hostedFields,T,_),E(P,_)])];case 1:return C.sent(),[3,5];case 2:return y.platform!==L.PPCP?[3,4]:[4,Promise.all([B(q.client,T,_),B(q.hostedFields,T,_),E(P,_)])];case 3:return C.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:D}}]}})})}function E(y,T){var _;if(T===void 0&&(T=!0),N()){S()&&requirejs.config({paths:(_={},_[w]=y,_)});var P="".concat(w,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(D,C){window.require([P],D,C)})}return f({id:"axo-id",src:y,forceScriptReload:!0})}function g(y){var T=y.assetUrl,_=y.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function R(y){var T,_=(y==null?void 0:y.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,P=N()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:P,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(y){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=Y})},{}],9:[function(e,n,a){var i=e("./constants").BRAINTREE_VERSION,s=e("./request/graphql"),o=e("./request"),c=e("../lib/is-verified-domain"),l=e("../lib/braintree-error"),d=e("../lib/convert-to-braintree-error"),u=e("./get-configuration").getConfiguration,h=e("../lib/create-authorization-data"),p=e("../lib/add-metadata"),f=e("@braintree/wrap-promise"),m=e("../lib/once"),v=e("../lib/deferred"),b=e("../lib/assign").assign,w=e("../lib/analytics"),x=e("./errors"),O=e("../lib/constants").VERSION,I=e("../lib/constants").GRAPHQL_URLS,L=e("../lib/methods"),N=e("../lib/convert-methods-to-error"),S=e("../lib/assets"),B=e("../lib/constants").FRAUDNET_FNCLS,G=e("../lib/constants").FRAUDNET_SOURCE,$=e("../lib/constants").FRAUDNET_URL,F={};function j(M){var q,Y;if(M=M||{},q=JSON.stringify(M),Y=M.gatewayConfiguration,!Y)throw new l(x.CLIENT_MISSING_GATEWAY_CONFIGURATION);if(["assetsUrl","clientApiUrl","configUrl"].forEach(function(E){if(E in Y&&!c(Y[E]))throw new l({type:x.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:x.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:E+" property is on an invalid domain."})}),this.getConfiguration=function(){return JSON.parse(q)},this._request=o,this._configuration=this.getConfiguration(),this._clientApiBaseUrl=Y.clientApiUrl+"/v1/",Y.graphQL){if(!c(Y.graphQL.url))throw new l({type:x.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:x.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:"graphQL.url property is on an invalid domain."});this._graphQL=new s({graphQL:Y.graphQL})}}j.initialize=function(M){var q,Y,E=F[M.authorization];if(E)return w.sendEvent(E,"custom.client.load.cached"),E;try{Y=h(M.authorization)}catch(g){return Promise.reject(new l(x.CLIENT_INVALID_AUTHORIZATION))}return E=u(Y,M.sessionId).then(function(g){return M.debug&&(g.isDebug=!0),g.authorization=M.authorization,q=new j(g),q}),F[M.authorization]=E,w.sendEvent(E,"custom.client.load.initialized"),E.then(function(g){return w.sendEvent(q,"custom.client.load.succeeded"),g}).catch(function(g){return delete F[M.authorization],Promise.reject(g)})},j.clearCache=function(){F={}},j.prototype._findOrCreateFraudnetJSON=function(M){var q=document.querySelector('script[fncls="'+B+'"]'),Y,E,g,R;q||(q=document.body.appendChild(document.createElement("script")),q.type="application/json",q.setAttribute("fncls",B)),Y=this.getConfiguration(),E={rda_tenant:"bt_card",mid:Y.gatewayConfiguration.merchantId},g=Y.authorizationFingerprint,g&&g.split("&").forEach(function(V){var y=V.split("=");y[0]==="customer_id"&&y.length>1&&(E.cid=y[1])}),R={f:M.substr(0,32),fp:E,bu:!1,s:G},q.text=JSON.stringify(R)},j.prototype.request=function(M,q){var Y=this,E=new Promise(function(g,R){var V,y,T,_,P=!!(M.endpoint==="payment_methods/credit_cards"&&Y.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);if(M.api!=="graphQLApi"&&(M.method?M.endpoint||(V="options.endpoint"):V="options.method"),V)throw new l({type:x.CLIENT_OPTION_REQUIRED.type,code:x.CLIENT_OPTION_REQUIRED.code,message:V+" is required when making a request."});if("api"in M?y=M.api:y="clientApi",_={method:M.method,graphQL:Y._graphQL,timeout:M.timeout,metadata:Y._configuration.analyticsMetadata},y==="clientApi")T=Y._clientApiBaseUrl,_.data=p.addMetadata(Y._configuration,M.data);else if(y==="graphQLApi")T=I[Y._configuration.gatewayConfiguration.environment],M.endpoint="",_.method="post",_.data=b({clientSdkMetadata:{platform:Y._configuration.analyticsMetadata.platform,source:Y._configuration.analyticsMetadata.source,integration:Y._configuration.analyticsMetadata.integration,sessionId:Y._configuration.analyticsMetadata.sessionId,version:O}},M.data),_.headers=ee(Y._configuration);else throw new l({type:x.CLIENT_OPTION_INVALID.type,code:x.CLIENT_OPTION_INVALID.code,message:"options.api is invalid."});_.url=T+M.endpoint,_.sendAnalyticsEvent=function(D){w.sendEvent(Y,D)},Y._request(_,function(D,C,z){var Z,le;if(le=H(z,D),le){R(le);return}if(y==="graphQLApi"&&C.errors){R(d(C.errors,{type:x.CLIENT_GRAPHQL_REQUEST_ERROR.type,code:x.CLIENT_GRAPHQL_REQUEST_ERROR.code,message:x.CLIENT_GRAPHQL_REQUEST_ERROR.message}));return}Z=b({_httpStatus:z},C),P&&Z.creditCards&&Z.creditCards.length>0&&(Y._findOrCreateFraudnetJSON(Z.creditCards[0].nonce),S.loadScript({src:$,forceScriptReload:!0})),g(Z)})});if(typeof q=="function"){q=m(v(q)),E.then(function(g){q(null,g,g._httpStatus)}).catch(function(g){var R=g&&g.details&&g.details.httpStatus;q(g,null,R)});return}return E};function H(M,q){var Y;if(M===-1?Y=new l(x.CLIENT_REQUEST_TIMEOUT):M===401?Y=new l(x.CLIENT_AUTHORIZATION_INVALID):M===403?Y=new l(x.CLIENT_AUTHORIZATION_INSUFFICIENT):M===429?Y=new l(x.CLIENT_RATE_LIMITED):M>=500?Y=new l(x.CLIENT_GATEWAY_NETWORK):(M<200||M>=400)&&(Y=d(q,{type:x.CLIENT_REQUEST_ERROR.type,code:x.CLIENT_REQUEST_ERROR.code,message:x.CLIENT_REQUEST_ERROR.message})),Y)return Y.details=Y.details||{},Y.details.httpStatus=M,Y}j.prototype.toJSON=function(){return this.getConfiguration()},j.prototype.getVersion=function(){return O},j.prototype.teardown=f(function(){var M=this;return delete F[M.getConfiguration().authorization],N(M,L(j.prototype)),Promise.resolve()});function ee(M){var q=M.authorizationFingerprint||M.authorization;return{Authorization:"Bearer "+q,"Braintree-Version":i}}n.exports=j},{"../lib/add-metadata":29,"../lib/analytics":30,"../lib/assets":31,"../lib/assign":32,"../lib/braintree-error":33,"../lib/constants":34,"../lib/convert-methods-to-error":35,"../lib/convert-to-braintree-error":36,"../lib/create-authorization-data":37,"../lib/deferred":38,"../lib/is-verified-domain":43,"../lib/methods":45,"../lib/once":46,"./constants":10,"./errors":11,"./get-configuration":12,"./request":25,"./request/graphql":23,"@braintree/wrap-promise":7}],10:[function(e,n,a){n.exports={BRAINTREE_VERSION:"2018-05-10"}},{}],11:[function(e,n,a){var i=e("../lib/braintree-error");n.exports={CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN:{type:i.types.MERCHANT,code:"CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN"},CLIENT_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"CLIENT_OPTION_REQUIRED"},CLIENT_OPTION_INVALID:{type:i.types.MERCHANT,code:"CLIENT_OPTION_INVALID"},CLIENT_MISSING_GATEWAY_CONFIGURATION:{type:i.types.INTERNAL,code:"CLIENT_MISSING_GATEWAY_CONFIGURATION",message:"Missing gatewayConfiguration."},CLIENT_INVALID_AUTHORIZATION:{type:i.types.MERCHANT,code:"CLIENT_INVALID_AUTHORIZATION",message:"Authorization is invalid. Make sure your client token or tokenization key is valid."},CLIENT_GATEWAY_NETWORK:{type:i.types.NETWORK,code:"CLIENT_GATEWAY_NETWORK",message:"Cannot contact the gateway at this time."},CLIENT_REQUEST_TIMEOUT:{type:i.types.NETWORK,code:"CLIENT_REQUEST_TIMEOUT",message:"Request timed out waiting for a reply."},CLIENT_REQUEST_ERROR:{type:i.types.NETWORK,code:"CLIENT_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_GRAPHQL_REQUEST_ERROR:{type:i.types.NETWORK,code:"CLIENT_GRAPHQL_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_RATE_LIMITED:{type:i.types.MERCHANT,code:"CLIENT_RATE_LIMITED",message:"You are being rate-limited; please try again in a few minutes."},CLIENT_AUTHORIZATION_INSUFFICIENT:{type:i.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INSUFFICIENT",message:"The authorization used has insufficient privileges."},CLIENT_AUTHORIZATION_INVALID:{type:i.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INVALID",message:"Either the client token has expired and a new one should be generated or the tokenization key has been deactivated or deleted."}}},{"../lib/braintree-error":33}],12:[function(e,n,a){var i=e("../lib/braintree-error"),s=e("@braintree/wrap-promise"),o=e("./request"),c=e("@braintree/uuid"),l=e("../lib/constants"),d=e("./errors"),u=e("./request/graphql"),h=e("../lib/constants").GRAPHQL_URLS,p=e("../lib/is-date-string-before-or-on"),f=e("./constants").BRAINTREE_VERSION;function m(v,b){return new Promise(function(w,x){var O,I,L,N,S=b||c(),B={merchantAppId:window.location.host,platform:l.PLATFORM,sdkVersion:l.VERSION,source:l.SOURCE,integration:l.INTEGRATION,integrationType:l.INTEGRATION,sessionId:S};I=v.attrs,L=v.configUrl,I._meta=B,I.braintreeLibraryVersion=l.BRAINTREE_LIBRARY_VERSION,I.configVersion="3",N={url:L,method:"GET",data:I},I.authorizationFingerprint&&v.graphQL?(p(v.graphQL.date,f)&&(N.graphQL=new u({graphQL:{url:v.graphQL.url,features:["configuration"]}})),N.metadata=B):I.tokenizationKey&&(N.graphQL=new u({graphQL:{url:h[v.environment],features:["configuration"]}}),N.metadata=B),o(N,function(G,$,F){var j;if(G){F===403?j=d.CLIENT_AUTHORIZATION_INSUFFICIENT:F===401?j=d.CLIENT_AUTHORIZATION_INVALID:j=d.CLIENT_GATEWAY_NETWORK,x(new i({type:j.type,code:j.code,message:j.message,details:{originalError:G}}));return}O={authorizationType:I.tokenizationKey?"TOKENIZATION_KEY":"CLIENT_TOKEN",authorizationFingerprint:I.authorizationFingerprint,analyticsMetadata:B,gatewayConfiguration:$},w(O)})})}n.exports={getConfiguration:s(m)}},{"../lib/braintree-error":33,"../lib/constants":34,"../lib/is-date-string-before-or-on":41,"./constants":10,"./errors":11,"./request":25,"./request/graphql":23,"@braintree/uuid":3,"@braintree/wrap-promise":7}],13:[function(e,n,a){var i=e("../lib/braintree-error"),s=e("./client"),o="3.126.0",c=e("@braintree/wrap-promise"),l=e("../lib/errors");function d(u){return u.authorization?s.initialize(u):Promise.reject(new i({type:l.INSTANTIATION_OPTION_REQUIRED.type,code:l.INSTANTIATION_OPTION_REQUIRED.code,message:"options.authorization is required when instantiating a client."}))}n.exports={create:c(d),VERSION:o}},{"../lib/braintree-error":33,"../lib/errors":40,"./client":9,"@braintree/wrap-promise":7}],14:[function(e,n,a){var i=e("../../lib/querystring"),s=e("../../lib/assign").assign,o=e("./prep-body"),c=e("./parse-body"),l=e("./xhr"),d=l.isAvailable,u=e("./graphql/request"),h=e("./default-request"),p=1,f=408;function m(x){return!x||x===f}function v(x){var O=!x.data&&x.errors&&x.errors[0]&&x.errors[0].extensions&&x.errors[0].extensions.errorClass;return O==="UNKNOWN"||O==="INTERNAL"}function b(x,O,I){var L,N,S,B,G,$,F,j=x.url,H=x.graphQL,ee=x.timeout,M=l.getRequestObject(),q=I,Y=!!(H&&H.isGraphQLRequest(j,x.data));x.headers=s({"Content-Type":"application/json"},x.headers),Y?S=new u(x):S=new h(x),j=S.getUrl(),B=S.getBody(),G=S.getMethod(),$=S.getHeaders(),G==="GET"&&(j=i.queryify(j,B),B=null),d?M.onreadystatechange=function(){if(M.readyState===4){if(M.status===0&&Y){delete x.graphQL,b(x,O,I);return}if(F=c(M.responseText),N=S.adaptResponseBody(F),L=S.determineStatus(M.status,F),L>=400||L<200){if(Y&&v(F)){delete x.graphQL,b(x,O,I);return}if(O<p&&m(L)){O++,b(x,O,I);return}q(N||"error",null,L||500)}else q(null,N,L)}}:(x.headers&&(j=i.queryify(j,$)),M.onload=function(){q(null,c(M.responseText),M.status)},M.onerror=function(){q("error",null,500)},M.onprogress=function(){},M.ontimeout=function(){q("timeout",null,-1)});try{M.open(G,j,!0)}catch(E){if(!Y)throw E;delete x.graphQL,b(x,O,I);return}M.timeout=ee,d&&Object.keys($).forEach(function(E){M.setRequestHeader(E,$[E])});try{M.send(o(G,B))}catch(E){}}function w(x,O){b(x,0,O)}n.exports={request:w}},{"../../lib/assign":32,"../../lib/querystring":47,"./default-request":15,"./graphql/request":24,"./parse-body":26,"./prep-body":27,"./xhr":28}],15:[function(e,n,a){function i(s){this._url=s.url,this._data=s.data,this._method=s.method,this._headers=s.headers}i.prototype.getUrl=function(){return this._url},i.prototype.getBody=function(){return this._data},i.prototype.getMethod=function(){return this._method},i.prototype.getHeaders=function(){return this._headers},i.prototype.adaptResponseBody=function(s){return s},i.prototype.determineStatus=function(s){return s},n.exports=i},{}],16:[function(e,n,a){var i=e("./error"),s=e("../../../../lib/assign").assign,o={creditCard:{AMERICAN_EXPRESS:"American Express",DISCOVER:"Discover",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",SOLO:"Solo",UK_MAESTRO:"UK Maestro",UNION_PAY:"UnionPay",VISA:"Visa",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard"},applePayWeb:{VISA:"visa",MASTERCARD:"mastercard",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",INTERNATIONAL_MAESTRO:"maestro",ELO:"elo"},visaCheckout:{VISA:"Visa",MASTERCARD:"MasterCard",DISCOVER:"Discover",AMERICAN_EXPRESS:"American Express"},googlePay:{VISA:"visa",MASTERCARD:"mastercard",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",INTERNATIONAL_MAESTRO:"maestro",ELO:"elo"},masterpass:{VISA:"visa",MASTERCARD:"master",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",DINERS:"diners",INTERNATIONAL_MAESTRO:"maestro",JCB:"jcb"}};function c(u,h){var p;return u.data&&!u.errors?p=l(u,h):p=i(u),p}function l(u,h){var p=u.data.clientConfiguration,f;return f={environment:p.environment.toLowerCase(),clientApiUrl:p.clientApiUrl,assetsUrl:p.assetsUrl,analytics:{url:p.analyticsUrl},merchantId:p.merchantId,venmo:"off"},p.supportedFeatures&&(f.graphQL={url:h._graphQL._config.url,features:p.supportedFeatures.map(function(m){return m.toLowerCase()})}),p.braintreeApi&&(f.braintreeApi=p.braintreeApi),p.applePayWeb&&(f.applePayWeb=p.applePayWeb,f.applePayWeb.supportedNetworks=d(p.applePayWeb.supportedCardBrands,o.applePayWeb),delete f.applePayWeb.supportedCardBrands),p.fastlane&&(f.fastlane=p.fastlane),p.ideal&&(f.ideal=p.ideal),p.creditCard?(f.challenges=p.creditCard.challenges.map(function(m){return m.toLowerCase()}),f.creditCards={supportedCardTypes:d(p.creditCard.supportedCardBrands,o.creditCard)},f.threeDSecureEnabled=p.creditCard.threeDSecureEnabled,f.threeDSecure=p.creditCard.threeDSecure):(f.challenges=[],f.creditCards={supportedCardTypes:[]},f.threeDSecureEnabled=!1),p.googlePay&&(f.androidPay={displayName:p.googlePay.displayName,enabled:!0,environment:p.googlePay.environment.toLowerCase(),googleAuthorizationFingerprint:p.googlePay.googleAuthorization,paypalClientId:p.googlePay.paypalClientId,supportedNetworks:d(p.googlePay.supportedCardBrands,o.googlePay)}),p.venmo&&(f.payWithVenmo={merchantId:p.venmo.merchantId,accessToken:p.venmo.accessToken,environment:p.venmo.environment.toLowerCase(),enrichedCustomerDataEnabled:p.venmo.enrichedCustomerDataEnabled}),p.paypal?(f.paypalEnabled=!0,f.paypal=s({},p.paypal),f.paypal.currencyIsoCode=f.paypal.currencyCode,f.paypal.environment=f.paypal.environment.toLowerCase(),delete f.paypal.currencyCode):f.paypalEnabled=!1,p.unionPay&&(f.unionPay={enabled:!0,merchantAccountId:p.unionPay.merchantAccountId}),p.visaCheckout&&(f.visaCheckout={apikey:p.visaCheckout.apiKey,encryptionKey:p.visaCheckout.encryptionKey,externalClientId:p.visaCheckout.externalClientId,supportedCardTypes:d(p.visaCheckout.supportedCardBrands,o.visaCheckout)}),p.masterpass&&(f.masterpass={merchantCheckoutId:p.masterpass.merchantCheckoutId,supportedNetworks:d(p.masterpass.supportedCardBrands,o.masterpass)}),p.usBankAccount&&(f.usBankAccount={routeId:p.usBankAccount.routeId,plaid:{publicKey:p.usBankAccount.plaidPublicKey}}),f}function d(u,h){return u.reduce(function(p,f){return h.hasOwnProperty(f)?p.concat(h[f]):p},[])}n.exports=c},{"../../../../lib/assign":32,"./error":19}],17:[function(e,n,a){var i=e("./error"),s={AMERICAN_EXPRESS:"American Express",DINERS:"Discover",DISCOVER:"Discover",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",UK_MAESTRO:"Maestro",UNION_PAY:"UnionPay",VISA:"Visa"},o={YES:"Yes",NO:"No",UNKNOWN:"Unknown"},c={PSDTWO:"psd2"};function l(u){var h;return u.data&&!u.errors?h=d(u):h=i(u),h}function d(u){var h=u.data.tokenizeCreditCardForPayPalConnect,p=h.paymentMethod.details,f=p.last4?p.last4.substr(2,4):"",m=p.binData,v,b;return m&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(w){m[w]?m[w]=o[m[w]]:m[w]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(w){m[w]||(m[w]="Unknown")})),v={creditCards:[{binData:m,consumed:!1,description:f?"ending in "+f:"",nonce:h.paymentMethod.id,details:{cardholderName:p.cardholderName,expirationMonth:p.expirationMonth,expirationYear:p.expirationYear,bin:p.bin||"",cardType:s[p.brandCode]||"Unknown",lastFour:p.last4||"",lastTwo:f},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(b=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:c[b]||b.toLowerCase()}),v}n.exports=l},{"./error":19}],18:[function(e,n,a){var i=e("./error"),s={AMERICAN_EXPRESS:"American Express",DINERS:"Discover",DISCOVER:"Discover",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",UK_MAESTRO:"Maestro",UNION_PAY:"UnionPay",VISA:"Visa"},o={YES:"Yes",NO:"No",UNKNOWN:"Unknown"},c={PSDTWO:"psd2"};function l(u){var h;return u.data&&!u.errors?h=d(u):h=i(u),h}function d(u){var h=u.data.tokenizeCreditCard,p=h.creditCard,f=p.last4?p.last4.substr(2,4):"",m=p.binData,v,b;return m&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(w){m[w]?m[w]=o[m[w]]:m[w]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(w){m[w]||(m[w]="Unknown")})),v={creditCards:[{binData:m,consumed:!1,description:f?"ending in "+f:"",nonce:h.token,details:{cardholderName:p.cardholderName,expirationMonth:p.expirationMonth,expirationYear:p.expirationYear,bin:p.bin||"",cardType:s[p.brandCode]||"Unknown",lastFour:p.last4||"",lastTwo:f},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(b=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:c[b]||b.toLowerCase()}),v}n.exports=l},{"./error":19}],19:[function(e,n,a){function i(u){var h,p=u.errors&&u.errors[0]&&u.errors[0].extensions&&u.errors[0].extensions.errorClass;return p==="VALIDATION"?h=o(u):p?h=s(u):h={error:{message:"There was a problem serving your request"},fieldErrors:[]},h}function s(u){return{error:{message:u.errors[0].message},fieldErrors:[]}}function o(u){var h=c(u.errors);return h.length===0?{error:{message:u.errors[0].message}}:{error:{message:d(h)},fieldErrors:h}}function c(u){var h=[];return u.forEach(function(p){p.extensions&&p.extensions.inputPath&&l(p.extensions.inputPath.slice(1),p,h)}),h}function l(u,h,p){var f,m=h.extensions.legacyCode,v=u[0];if(u.length===1){p.push({code:m,field:v,message:h.message});return}p.forEach(function(b){b.field===v&&(f=b)}),f||(f={field:v,fieldErrors:[]},p.push(f)),l(u.slice(1),h,f.fieldErrors)}function d(u){var h={creditCard:"Credit card is invalid"},p=u[0].field;return h[p]}n.exports=i},{}],20:[function(e,n,a){var i="query ClientConfiguration { clientConfiguration { analyticsUrl environment merchantId assetsUrl clientApiUrl creditCard { supportedCardBrands challenges threeDSecureEnabled threeDSecure { cardinalAuthenticationJWT cardinalSongbirdUrl cardinalSongbirdIdentityHash } } applePayWeb { countryCode currencyCode merchantIdentifier supportedCardBrands } fastlane { enabled tokensOnDemand { enabled tokenExchange { enabled } } } googlePay { displayName supportedCardBrands environment googleAuthorization paypalClientId } ideal { routeId assetsUrl } masterpass { merchantCheckoutId supportedCardBrands } paypal { displayName clientId assetsUrl environment environmentNoNetwork unvettedMerchant braintreeClientId billingAgreementsEnabled merchantAccountId currencyCode payeeEmail } unionPay { merchantAccountId } usBankAccount { routeId plaidPublicKey } venmo { merchantId accessToken environment enrichedCustomerDataEnabled } visaCheckout { apiKey externalClientId supportedCardBrands } braintreeApi { accessToken url } supportedFeatures } }";function s(){return{query:i,operationName:"ClientConfiguration"}}n.exports=s},{}],21:[function(e,n,a){var i=e("../../../../lib/assign").assign;function s(u){var h=u.hasAuthenticationInsight,p="mutation TokenizeCreditCardForPayPalConnect($input: TokenizeCreditCardForPayPalConnectInput!";return h&&(p+=", $authenticationInsightInput: AuthenticationInsightInput!"),p+=") { tokenizeCreditCardForPayPalConnect(input: $input) { clientMutationId paymentMethod { id details { ... on CreditCardDetails { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId business consumer purchase corporate } } } }",h&&(p+=" authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }"),p+=" } }",p}function o(u,h){var p=u.creditCard,f=p.fastlane||{},m="fastlane"in p&&"termsAndConditionsVersion"in p.fastlane&&p.fastlane.termsAndConditionsVersion,v="fastlane"in p&&"termsAndConditionsCountry"in p.fastlane&&p.fastlane.termsAndConditionsCountry,b=p.email,w="hasBuyerConsent"in f&&f.hasBuyerConsent,x=p.shippingAddress,O=c(u,h),I=i({},O.input,{email:b,optIn:w,phone:p.phone});return m&&(I.termsAndConditionsVersion=m),v&&(I.termsAndConditionsCountry=v),"authAssertion"in f&&(I.authAssertion=f.authAssertion),x&&(I.shippingAddress=x),{input:I}}function c(u,h){var p=u.creditCard,f=p&&p.billingAddress,m=p&&p.expirationDate,v=p&&(p.expirationMonth||m&&m.split("/")[0].trim()),b=p&&(p.expirationYear||m&&m.split("/")[1].trim()),w={input:{creditCard:{number:p&&p.number,expirationMonth:v,expirationYear:b,cvv:p&&p.cvv,cardholderName:p&&p.cardholderName},options:{}}};return h.hasAuthenticationInsight&&(w.authenticationInsightInput={merchantAccountId:u.merchantAccountId}),f&&(w.input.creditCard.billingAddress=f),w.input=l(u,w.input),w}function l(u,h){var p;return u.creditCard&&u.creditCard.options&&typeof u.creditCard.options.validate=="boolean"?p=u.creditCard.options.validate:u.authorizationFingerprint&&u.tokenizationKey||u.authorizationFingerprint?p=!0:u.tokenizationKey&&(p=!1),typeof p=="boolean"&&(h.options=i({validate:p},h.options)),h}function d(u){var h={hasAuthenticationInsight:!!(u.authenticationInsight&&u.merchantAccountId)};return{query:s(h),variables:o(u,h),operationName:"TokenizeCreditCardForPayPalConnect"}}n.exports=d},{"../../../../lib/assign":32}],22:[function(e,n,a){var i=e("../../../../lib/assign").assign;function s(d){var u=d.hasAuthenticationInsight,h="mutation TokenizeCreditCard($input: TokenizeCreditCardInput!";return u&&(h+=", $authenticationInsightInput: AuthenticationInsightInput!"),h+=") { tokenizeCreditCard(input: $input) { token creditCard { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId business consumer purchase corporate } } ",u&&(h+=" authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }"),h+=" } }",h}function o(d,u){var h=d.creditCard,p=h&&h.billingAddress,f=h&&h.expirationDate,m=h&&(h.expirationMonth||f&&f.split("/")[0].trim()),v=h&&(h.expirationYear||f&&f.split("/")[1].trim()),b={input:{creditCard:{number:h&&h.number,expirationMonth:m,expirationYear:v,cvv:h&&h.cvv,cardholderName:h&&h.cardholderName},options:{}}};return u.hasAuthenticationInsight&&(b.authenticationInsightInput={merchantAccountId:d.merchantAccountId}),p&&(b.input.creditCard.billingAddress=p),b.input=c(d,b.input),b}function c(d,u){var h;return d.creditCard&&d.creditCard.options&&typeof d.creditCard.options.validate=="boolean"?h=d.creditCard.options.validate:d.authorizationFingerprint&&d.tokenizationKey||d.authorizationFingerprint?h=!0:d.tokenizationKey&&(h=!1),typeof h=="boolean"&&(u.options=i({validate:h},u.options)),u}function l(d){var u={hasAuthenticationInsight:!!(d.authenticationInsight&&d.merchantAccountId)};return{query:s(u),variables:o(d,u),operationName:"TokenizeCreditCard"}}n.exports=l},{"../../../../lib/assign":32}],23:[function(e,n,a){var i={tokenize_credit_cards:"payment_methods/credit_cards",configuration:"configuration"},s=["creditCard.options.unionPayEnrollment"];function o(l){this._config=l.graphQL}o.prototype.getGraphQLEndpoint=function(){return this._config.url},o.prototype.isGraphQLRequest=function(l,d){var u,h=this.getClientApiPath(l);return!this._isGraphQLEnabled()||!h||(u=this._config.features.some(function(p){return i[p]===h}),c(d))?!1:u},o.prototype.getClientApiPath=function(l){var d,u="/client_api/v1/",h=l.split(u);return h.length>1&&(d=h[1].split("?")[0]),d},o.prototype._isGraphQLEnabled=function(){return!!this._config};function c(l){return s.some(function(d){var u=d.split(".").reduce(function(h,p){return h&&h[p]},l);return u!==void 0})}n.exports=o},{}],24:[function(e,n,a){var i=e("../../constants").BRAINTREE_VERSION,s=e("../../../lib/assign").assign,o=e("../../../lib/snake-case-to-camel-case"),c=e("../../../lib/is-fastlane-checkout"),l=e("./generators/credit-card-tokenization"),d=e("./adapters/credit-card-tokenization"),u=e("./adapters/credit-card-tokenization-fastlane"),h=e("./generators/credit-card-for-fastlane-tokenization"),p=e("./generators/configuration"),f=e("./adapters/configuration"),m={"payment_methods/credit_cards":function(O,I){return I?h(O):l(O)},configuration:p},v={"payment_methods/credit_cards":function(O,I,L){return L?u(O,I):d(O,I)},configuration:f};function b(O){var I=O.graphQL.getClientApiPath(O.url);this._graphQL=O.graphQL,this._data=O.data,this._method=O.method,this._headers=O.headers,this._clientSdkMetadata={source:O.metadata.source,integration:O.metadata.integration,sessionId:O.metadata.sessionId},this._sendAnalyticsEvent=O.sendAnalyticsEvent||Function.prototype,this._generator=m[I],this._adapter=v[I],this._sendAnalyticsEvent("graphql.init")}b.prototype.getUrl=function(){return this._graphQL.getGraphQLEndpoint()},b.prototype.getBody=function(){var O=x(this._data),I=this._generator(O,c(this._data.creditCard)),L=s({clientSdkMetadata:this._clientSdkMetadata},I);return JSON.stringify(L)},b.prototype.getMethod=function(){return"POST"},b.prototype.getHeaders=function(){var O,I;return this._data.authorizationFingerprint?(this._sendAnalyticsEvent("graphql.authorization-fingerprint"),O=this._data.authorizationFingerprint):(this._sendAnalyticsEvent("graphql.tokenization-key"),O=this._data.tokenizationKey),I={Authorization:"Bearer "+O,"Braintree-Version":i},s({},this._headers,I)},b.prototype.adaptResponseBody=function(O){return this._adapter(O,this,"creditCard"in this._data&&c(this._data.creditCard))},b.prototype.determineStatus=function(O,I){var L,N;return O===200?(N=I.errors&&I.errors[0]&&I.errors[0].extensions&&I.errors[0].extensions.errorClass,I.data&&!I.errors?L=200:N==="VALIDATION"?L=422:N==="AUTHORIZATION"?L=403:N==="AUTHENTICATION"?L=401:w(N,I)?L=403:L=500):O?L=O:L=500,this._sendAnalyticsEvent("graphql.status."+O),this._sendAnalyticsEvent("graphql.determinedStatus."+L),L};function w(O,I){return!O&&I.errors[0].message}function x(O){var I={};return Object.keys(O).forEach(function(L){var N=o(L);typeof O[L]=="object"?I[N]=x(O[L]):typeof O[L]=="number"?I[N]=String(O[L]):I[N]=O[L]}),I}n.exports=b},{"../../../lib/assign":32,"../../../lib/is-fastlane-checkout":42,"../../../lib/snake-case-to-camel-case":48,"../../constants":10,"./adapters/configuration":16,"./adapters/credit-card-tokenization":18,"./adapters/credit-card-tokenization-fastlane":17,"./generators/configuration":20,"./generators/credit-card-for-fastlane-tokenization":21,"./generators/credit-card-tokenization":22}],25:[function(e,n,a){var i=e("../../lib/once"),s=e("./ajax-driver");n.exports=function(o,c){c=i(c||Function.prototype),o.method=(o.method||"GET").toUpperCase(),o.timeout=o.timeout==null?6e4:o.timeout,o.data=o.data||{},s.request(o,c)}},{"../../lib/once":46,"./ajax-driver":14}],26:[function(e,n,a){n.exports=function(i){try{i=JSON.parse(i)}catch(s){}return i}},{}],27:[function(e,n,a){n.exports=function(i,s){if(typeof i!="string")throw new Error("Method must be a string");return i.toLowerCase()!=="get"&&s!=null&&(s=typeof s=="string"?s:JSON.stringify(s)),s}},{}],28:[function(e,n,a){var i=typeof window!="undefined"&&window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest;function s(){return i?new window.XMLHttpRequest:new window.XDomainRequest}n.exports={isAvailable:i,getRequestObject:s}},{}],29:[function(e,n,a){var i=e("./create-authorization-data"),s=e("./json-clone"),o=e("./constants");function c(d,u){var h,p=u?s(u):{},f=i(d.authorization).attrs,m=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(m[h]=p._meta[h]);return p._meta=m,f.tokenizationKey?p.tokenizationKey=f.tokenizationKey:p.authorizationFingerprint=f.authorizationFingerprint,p}function l(d){var u=d.getConfiguration(),h=i(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",f={api_integration_type:u.analyticsMetadata.integrationType,app_id:window.location.host,c_sdk_ver:o.VERSION,component:"braintreeclientsdk",merchant_sdk_env:p?"production":"sandbox",merchant_id:u.gatewayConfiguration.merchantId,event_source:"web",platform:o.PLATFORM,platform_version:window.navigator.userAgent,session_id:u.analyticsMetadata.sessionId,client_session_id:u.analyticsMetadata.sessionId,tenant_name:"braintree",product_name:"BT_DCC",space_key:"SKDUYK"};return h.tokenizationKey?f.tokenization_key=h.tokenizationKey:f.auth_fingerprint=h.authorizationFingerprint,f}n.exports={addMetadata:c,addEventMetadata:l}},{"./constants":34,"./create-authorization-data":37,"./json-clone":44}],30:[function(e,n,a){var i=e("./constants"),s=e("./add-metadata"),o=e("./assign").assign;function c(u,h,p){return l(u,h,{},p)}function l(u,h,p,f){var m=Date.now();return p.flow==="vault"?p.context_type="BA_Token":p.flow==="checkout"&&(p.context_type="EC_Token"),Promise.resolve(u).then(function(v){var b=v._request,w=i.ANALYTICS_URL,x=i.ANALYTICS_PREFIX+h,O=v.getConfiguration(),I=O.gatewayConfiguration.environment==="production",L={events:[],tracking:[]},N=s.addEventMetadata(v,L);return N.event_name=x,N.t=m,L.events=[{level:"info",event:x,payload:o({env:I?"production":"sandbox",timestamp:m},p)}],L.tracking=[N],p&&typeof p=="object"&&(L.tracking=[d(N,p)]),b({url:w,method:"post",data:L,timeout:i.ANALYTICS_REQUEST_TIMEOUT_MS},f)}).catch(function(v){f&&f(v)})}function d(u,h){var p={},f=o({},h);return Object.keys(f).forEach(function(m){i.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(m)===-1&&delete f[m]}),p=o(u,f),p}n.exports={sendEvent:c,sendEventPlus:l}},{"./add-metadata":29,"./assign":32,"./constants":34}],31:[function(e,n,a){var i=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:i,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":8}],32:[function(e,n,a){var i=typeof Object.assign=="function"?Object.assign:s;function s(o){var c,l,d;for(c=1;c<arguments.length;c++){l=arguments[c];for(d in l)l.hasOwnProperty(d)&&(o[d]=l[d])}return o}n.exports={assign:i,_assign:s}},{}],33:[function(e,n,a){var i=e("./enumerate");function s(o){if(!s.types.hasOwnProperty(o.type))throw new Error(o.type+" is not a valid type.");if(!o.code)throw new Error("Error code required.");if(!o.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=o.code,this.message=o.message,this.type=o.type,this.details=o.details}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":39}],34:[function(e,n,a){var i="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},c={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},l={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:c,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:l,INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],35:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors");n.exports=function(o,c){c.forEach(function(l){o[l]=function(){throw new i({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:l+" cannot be called after teardown."})}})}},{"./braintree-error":33,"./errors":40}],36:[function(e,n,a){var i=e("./braintree-error");function s(o,c){return o instanceof i?o:new i({type:c.type,code:c.code,message:c.message,details:{originalError:o}})}n.exports=s},{"./braintree-error":33}],37:[function(e,n,a){var i=e("../lib/vendor/polyfill").atob,s=e("../lib/constants").CLIENT_API_URLS;function o(d){return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(d)}function c(d){var u=d.split("_"),h=u[0],p=u.slice(2).join("_");return{merchantId:p,environment:h}}function l(d){var u,h,p={attrs:{},configUrl:""};return o(d)?(h=c(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=s[h.environment]+"/merchants/"+h.merchantId+"/client_api/v1/configuration"):(u=JSON.parse(i(d)),p.environment=u.environment,p.attrs.authorizationFingerprint=u.authorizationFingerprint,p.configUrl=u.configUrl,p.graphQL=u.graphQL),p}n.exports=l},{"../lib/constants":34,"../lib/vendor/polyfill":49}],38:[function(e,n,a){n.exports=function(i){return function(){var s=arguments;setTimeout(function(){i.apply(null,s)},1)}}},{}],39:[function(e,n,a){function i(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}n.exports=i},{}],40:[function(e,n,a){var i=e("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:i.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:i.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:i.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:i.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":33}],41:[function(e,n,a){function i(o){var c=o.split("-");return new Date(c[0],c[1],c[2])}function s(o,c){return i(o)<=i(c)}n.exports=s},{}],42:[function(e,n,a){n.exports=function(i){return i&&i.hasOwnProperty("fastlane")&&i.fastlane}},{}],43:[function(e,n,a){var i,s={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function o(l){return l.split(".").slice(-2).join(".")}function c(l){var d;return l=l.toLowerCase(),/^https:/.test(l)?(i=i||document.createElement("a"),i.href=l,d=o(i.hostname),s.hasOwnProperty(d)):!1}n.exports=c},{}],44:[function(e,n,a){n.exports=function(i){return JSON.parse(JSON.stringify(i))}},{}],45:[function(e,n,a){n.exports=function(i){return Object.keys(i).filter(function(s){return typeof i[s]=="function"})}},{}],46:[function(e,n,a){function i(s){var o=!1;return function(){o||(o=!0,s.apply(null,arguments))}}n.exports=i},{}],47:[function(e,n,a){function i(u){var h;for(h in u)if(u.hasOwnProperty(h))return!0;return!1}function s(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.toString.call(u)==="[object Array]"||!1}function o(u){return u=u||window.location.href,/\?/.test(u)}function c(u){var h,p;return u=u||window.location.href,o(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(f,m){var v=m.split("="),b=decodeURIComponent(v[0]),w=decodeURIComponent(v[1]);return f[b]=w,f},{}),p):{}}function l(u,h){var p,f,m,v=[];for(m in u)u.hasOwnProperty(m)&&(f=u[m],h?s(u)?p=h+"[]":p=h+"["+m+"]":p=m,typeof f=="object"?v.push(l(f,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(f)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&i(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=l(h)),u}n.exports={parse:c,stringify:l,queryify:d,hasQueryParams:o}},{}],48:[function(e,n,a){n.exports=function(i){return i.indexOf("_")===-1?i:i.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],49:[function(e,n,a){var i=typeof atob=="function"?atob:s;function s(o){var c,l,d,u,h,p,f,m,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$/,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",w="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");m=0;do u=b.indexOf(o.charAt(m++)),h=b.indexOf(o.charAt(m++)),p=b.indexOf(o.charAt(m++)),f=b.indexOf(o.charAt(m++)),c=(u&63)<<2|h>>4&3,l=(h&15)<<4|p>>2&15,d=(p&3)<<6|f&63,w+=String.fromCharCode(c)+(l?String.fromCharCode(l):"")+(d?String.fromCharCode(d):"");while(m<o.length);return w}n.exports={atob:function(o){return i.call(window,o)},_atob:s}},{}]},{},[13])(13)})}(Nn)),Nn.exports}var Ui=kl();const Sl=ve({__proto__:null,default:Cn(Ui)},[Ui]);var Pn={exports:{}},Bi;function Ml(){return Bi||(Bi=1,function(r,t){(function(e){r.exports=e()})(function(){return function(){function e(n,a,i){function s(l,d){if(!a[l]){if(!n[l]){var u=typeof Ee=="function"&&Ee;if(!d&&u)return u(l,!0);if(o)return o(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var p=a[l]={exports:{}};n[l][0].call(p.exports,function(f){var m=n[l][1][f];return s(m||f)},p,p.exports,e,n,a,i)}return a[l].exports}for(var o=typeof Ee=="function"&&Ee,c=0;c<i.length;c++)s(i[c]);return s}return e}()({1:[function(e,n,a){var i={};function s(o){var c,l=JSON.stringify(o);if(!o.forceScriptReload&&(c=i[l],c))return c;var d=document.createElement("script"),u=o.dataAttributes||{},h=o.container||document.head;return d.src=o.src,d.id=o.id||"",d.async=!0,o.type&&d.setAttribute("type","".concat(o.type)),o.crossorigin&&d.setAttribute("crossorigin","".concat(o.crossorigin)),o.integrity&&d.setAttribute("integrity","".concat(o.integrity)),Object.keys(u).forEach(function(p){d.setAttribute("data-".concat(p),"".concat(u[p]))}),c=new Promise(function(p,f){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){f(new Error("".concat(o.src," failed to load.")))}),d.addEventListener("abort",function(){f(new Error("".concat(o.src," has aborted.")))}),h.appendChild(d)}),i[l]=c,c}s.clearCache=function(){i={}},n.exports=s},{}],2:[function(e,n,a){n.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){return function(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];setTimeout(function(){try{s.apply(void 0,o)}catch(l){console.log("Error in callback function"),console.log(l)}},1)}}a.deferred=i},{}],4:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){var o=!1;return function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];o||(o=!0,s.apply(void 0,c))}}a.once=i},{}],5:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s,o){if(!o)return s;s.then(function(c){return o(null,c)}).catch(function(c){return o(c)})}a.promiseOrCallback=i},{}],6:[function(e,n,a){var i=e("./lib/deferred"),s=e("./lib/once"),o=e("./lib/promise-or-callback");function c(l){return function(){for(var d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];var h,p=d[d.length-1];return typeof p=="function"&&(h=d.pop(),h=s.once(i.deferred(h))),o.promiseOrCallback(l.apply(this,d),h)}}c.wrapPrototype=function(l,d){d===void 0&&(d={});var u=d.ignoreMethods||[],h=d.transformPrivateMethods===!0,p=Object.getOwnPropertyNames(l.prototype).filter(function(f){var m,v=f!=="constructor"&&typeof l.prototype[f]=="function",b=u.indexOf(f)===-1;return h?m=!0:m=f.charAt(0)!=="_",v&&m&&b});return p.forEach(function(f){var m=l.prototype[f];l.prototype[f]=c(m)}),l},n.exports=c},{"./lib/deferred":3,"./lib/once":4,"./lib/promise-or-callback":5}],7:[function(e,n,a){(function(i,s){typeof a=="object"&&typeof n!="undefined"?s(a):(i=typeof globalThis!="undefined"?globalThis:i||self,s(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
223
+ ***************************************************************************** */function s(y,T,_,P){function D(w){return w instanceof _?w:new _(function(z){z(w)})}return new(_||(_=Promise))(function(w,z){function Z(te){try{S(P.next(te))}catch(we){z(we)}}function le(te){try{S(P.throw(te))}catch(we){z(we)}}function S(te){te.done?w(te.value):D(te.value).then(Z,le)}S((P=P.apply(y,[])).next())})}function o(y,T){var _={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},P,D,w,z;return z={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(z[Symbol.iterator]=function(){return this}),z;function Z(S){return function(te){return le([S,te])}}function le(S){if(P)throw new TypeError("Generator is already executing.");for(;_;)try{if(P=1,D&&(w=S[0]&2?D.return:S[0]?D.throw||((w=D.return)&&w.call(D),0):D.next)&&!(w=w.call(D,S[1])).done)return w;switch(D=0,w&&(S=[S[0]&2,w.value]),S[0]){case 0:case 1:w=S;break;case 4:return _.label++,{value:S[1],done:!1};case 5:_.label++,D=S[1],S=[0];continue;case 7:S=_.ops.pop(),_.trys.pop();continue;default:if(w=_.trys,!(w=w.length>0&&w[w.length-1])&&(S[0]===6||S[0]===2)){_=0;continue}if(S[0]===3&&(!w||S[1]>w[0]&&S[1]<w[3])){_.label=S[1];break}if(S[0]===6&&_.label<w[1]){_.label=w[1],w=S;break}if(w&&_.label<w[2]){_.label=w[2],_.ops.push(S);break}w[2]&&_.ops.pop(),_.trys.pop();continue}S=T.call(y,_)}catch(te){S=[6,te],D=0}finally{P=w=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}}var c={},l={};function d(y){var T,_=JSON.stringify(y);if(!y.forceScriptReload&&(T=l[_],T))return T;var P=document.createElement("script"),D=y.dataAttributes||{},w=y.container||document.head;return P.src=y.src,P.id=y.id||"",P.async=!0,y.type&&P.setAttribute("type","".concat(y.type)),y.crossorigin&&P.setAttribute("crossorigin","".concat(y.crossorigin)),Object.keys(D).forEach(function(z){P.setAttribute("data-".concat(z),"".concat(D[z]))}),T=new Promise(function(z,Z){P.addEventListener("load",function(){z(P)}),P.addEventListener("error",function(){Z(new Error("".concat(y.src," failed to load.")))}),P.addEventListener("abort",function(){Z(new Error("".concat(y.src," has aborted.")))}),w.appendChild(P)}),l[_]=T,T}d.clearCache=function(){l={}};var u=d,h=function(T){var _=document.querySelector('link[href="'.concat(T.href,'"]'));if(_)return Promise.resolve(_);_=document.createElement("link");var P=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),P.firstChild?P.insertBefore(_,P.firstChild):P.appendChild(_),Promise.resolve(_)};Object.defineProperty(c,"__esModule",{value:!0}),c.loadStylesheet=f=c.loadScript=void 0;var p=u,f=c.loadScript=p,m=h;c.loadStylesheet=m;var v="https://www.paypalobjects.com",b={minified:"axo.min",unminified:"axo"},C="fastlane",x="connect-boba",N="".concat(x,"/locales/"),I={AXO_ASSET_NAME:b,AXO_ASSET_PATH:x,LOCALE_PATH:N,CDNX_PROD:v},L={BT:"BT",PPCP:"PPCP"};function O(){return typeof window.define=="function"&&!!window.define.amd}function k(){return O()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function B(y,T,_){var P,D;return _===void 0&&(_=!0),s(this,void 0,void 0,function(){var w,z;return o(this,function(Z){if(w=$(),w&&w[y.module]){if(T&&((P=w[y.module])===null||P===void 0?void 0:P.VERSION)!==T)throw z=(D=w[y.module])===null||D===void 0?void 0:D.VERSION,new Error("".concat(y.module," already loaded with version ").concat(z," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(y.module," without specifying version"));return[2,W(y,T,_)]})})}function W(y,T,_){if(_===void 0&&(_=!0),O()){var P=_?y.amdModule.minified:y.amdModule.unminified;return new Promise(function(w,z){window.require([P],w,z)})}var D=_?y.script.minified:y.script.unminified;return f({id:"".concat(y.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(D)})}function $(){return window==null?void 0:window.braintree}var F,j,H={Client:"client",HostedCardFields:"hostedFields"},ee="braintree",M=(F={},F[H.Client]="client",F[H.HostedCardFields]="hosted-fields",F),q=(j={},j[H.Client]={id:"client",module:H.Client,amdModule:{unminified:"".concat(ee,"/").concat(M[H.Client]),minified:"".concat(ee,"/").concat(M[H.Client],".min")},script:{unminified:"".concat(M[H.Client],".js"),minified:"".concat(M[H.Client],".min.js")}},j[H.HostedCardFields]={id:"hcf",module:H.HostedCardFields,amdModule:{unminified:"".concat(ee,"/").concat(M[H.HostedCardFields]),minified:"".concat(ee,"/").concat(M[H.HostedCardFields],".min")},script:{unminified:"".concat(M[H.HostedCardFields],".js"),minified:"".concat(M[H.HostedCardFields],".min.js")}},j);function Y(y){return s(this,void 0,void 0,function(){var T,_,P,D;return o(this,function(w){switch(w.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=y.btSdkVersion,_=y.minified,P=R(y),D=V(y),y.platform!==L.BT?[3,2]:[4,Promise.all([B(q.hostedFields,T,_),E(P,_)])];case 1:return w.sent(),[3,5];case 2:return y.platform!==L.PPCP?[3,4]:[4,Promise.all([B(q.client,T,_),B(q.hostedFields,T,_),E(P,_)])];case 3:return w.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:D}}]}})})}function E(y,T){var _;if(T===void 0&&(T=!0),O()){k()&&requirejs.config({paths:(_={},_[C]=y,_)});var P="".concat(C,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(D,w){window.require([P],D,w)})}return f({id:"axo-id",src:y,forceScriptReload:!0})}function g(y){var T=y.assetUrl,_=y.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function R(y){var T,_=(y==null?void 0:y.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,P=O()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:P,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(y){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=Y})},{}],9:[function(e,n,a){var i=e("./constants").BRAINTREE_VERSION,s=e("./request/graphql"),o=e("./request"),c=e("../lib/is-verified-domain"),l=e("../lib/braintree-error"),d=e("../lib/convert-to-braintree-error"),u=e("./get-configuration").getConfiguration,h=e("../lib/create-authorization-data"),p=e("../lib/add-metadata"),f=e("@braintree/wrap-promise"),m=e("../lib/once"),v=e("../lib/deferred"),b=e("../lib/assign").assign,C=e("../lib/analytics"),x=e("./errors"),N=e("../lib/constants").VERSION,I=e("../lib/constants").GRAPHQL_URLS,L=e("../lib/methods"),O=e("../lib/convert-methods-to-error"),k=e("../lib/assets"),B=e("../lib/constants").FRAUDNET_FNCLS,W=e("../lib/constants").FRAUDNET_SOURCE,$=e("../lib/constants").FRAUDNET_URL,F={};function j(M){var q,Y;if(M=M||{},q=JSON.stringify(M),Y=M.gatewayConfiguration,!Y)throw new l(x.CLIENT_MISSING_GATEWAY_CONFIGURATION);if(["assetsUrl","clientApiUrl","configUrl"].forEach(function(E){if(E in Y&&!c(Y[E]))throw new l({type:x.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:x.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:E+" property is on an invalid domain."})}),this.getConfiguration=function(){return JSON.parse(q)},this._request=o,this._configuration=this.getConfiguration(),this._clientApiBaseUrl=Y.clientApiUrl+"/v1/",Y.graphQL){if(!c(Y.graphQL.url))throw new l({type:x.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:x.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:"graphQL.url property is on an invalid domain."});this._graphQL=new s({graphQL:Y.graphQL})}}j.initialize=function(M){var q,Y,E=F[M.authorization];if(E)return C.sendEvent(E,"custom.client.load.cached"),E;try{Y=h(M.authorization)}catch(g){return Promise.reject(new l(x.CLIENT_INVALID_AUTHORIZATION))}return E=u(Y,M.sessionId).then(function(g){return M.debug&&(g.isDebug=!0),g.authorization=M.authorization,q=new j(g),q}),F[M.authorization]=E,C.sendEvent(E,"custom.client.load.initialized"),E.then(function(g){return C.sendEvent(q,"custom.client.load.succeeded"),g}).catch(function(g){return delete F[M.authorization],Promise.reject(g)})},j.clearCache=function(){F={}},j.prototype._findOrCreateFraudnetJSON=function(M){var q=document.querySelector('script[fncls="'+B+'"]'),Y,E,g,R;q||(q=document.body.appendChild(document.createElement("script")),q.type="application/json",q.setAttribute("fncls",B)),Y=this.getConfiguration(),E={rda_tenant:"bt_card",mid:Y.gatewayConfiguration.merchantId},g=Y.authorizationFingerprint,g&&g.split("&").forEach(function(V){var y=V.split("=");y[0]==="customer_id"&&y.length>1&&(E.cid=y[1])}),R={f:M.substr(0,32),fp:E,bu:!1,s:W},q.text=JSON.stringify(R)},j.prototype.request=function(M,q){var Y=this,E=new Promise(function(g,R){var V,y,T,_,P=!!(M.endpoint==="payment_methods/credit_cards"&&Y.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);if(M.api!=="graphQLApi"&&(M.method?M.endpoint||(V="options.endpoint"):V="options.method"),V)throw new l({type:x.CLIENT_OPTION_REQUIRED.type,code:x.CLIENT_OPTION_REQUIRED.code,message:V+" is required when making a request."});if("api"in M?y=M.api:y="clientApi",_={method:M.method,graphQL:Y._graphQL,timeout:M.timeout,metadata:Y._configuration.analyticsMetadata},y==="clientApi")T=Y._clientApiBaseUrl,_.data=p.addMetadata(Y._configuration,M.data);else if(y==="graphQLApi")T=I[Y._configuration.gatewayConfiguration.environment],M.endpoint="",_.method="post",_.data=b({clientSdkMetadata:{platform:Y._configuration.analyticsMetadata.platform,source:Y._configuration.analyticsMetadata.source,integration:Y._configuration.analyticsMetadata.integration,sessionId:Y._configuration.analyticsMetadata.sessionId,version:N}},M.data),_.headers=ee(Y._configuration);else throw new l({type:x.CLIENT_OPTION_INVALID.type,code:x.CLIENT_OPTION_INVALID.code,message:"options.api is invalid."});_.url=T+M.endpoint,_.sendAnalyticsEvent=function(D){C.sendEvent(Y,D)},Y._request(_,function(D,w,z){var Z,le;if(le=H(z,D),le){R(le);return}if(y==="graphQLApi"&&w.errors){R(d(w.errors,{type:x.CLIENT_GRAPHQL_REQUEST_ERROR.type,code:x.CLIENT_GRAPHQL_REQUEST_ERROR.code,message:x.CLIENT_GRAPHQL_REQUEST_ERROR.message}));return}Z=b({_httpStatus:z},w),P&&Z.creditCards&&Z.creditCards.length>0&&(Y._findOrCreateFraudnetJSON(Z.creditCards[0].nonce),k.loadScript({src:$,forceScriptReload:!0})),g(Z)})});if(typeof q=="function"){q=m(v(q)),E.then(function(g){q(null,g,g._httpStatus)}).catch(function(g){var R=g&&g.details&&g.details.httpStatus;q(g,null,R)});return}return E};function H(M,q){var Y;if(M===-1?Y=new l(x.CLIENT_REQUEST_TIMEOUT):M===401?Y=new l(x.CLIENT_AUTHORIZATION_INVALID):M===403?Y=new l(x.CLIENT_AUTHORIZATION_INSUFFICIENT):M===429?Y=new l(x.CLIENT_RATE_LIMITED):M>=500?Y=new l(x.CLIENT_GATEWAY_NETWORK):(M<200||M>=400)&&(Y=d(q,{type:x.CLIENT_REQUEST_ERROR.type,code:x.CLIENT_REQUEST_ERROR.code,message:x.CLIENT_REQUEST_ERROR.message})),Y)return Y.details=Y.details||{},Y.details.httpStatus=M,Y}j.prototype.toJSON=function(){return this.getConfiguration()},j.prototype.getVersion=function(){return N},j.prototype.teardown=f(function(){var M=this;return delete F[M.getConfiguration().authorization],O(M,L(j.prototype)),Promise.resolve()});function ee(M){var q=M.authorizationFingerprint||M.authorization;return{Authorization:"Bearer "+q,"Braintree-Version":i}}n.exports=j},{"../lib/add-metadata":29,"../lib/analytics":30,"../lib/assets":31,"../lib/assign":32,"../lib/braintree-error":33,"../lib/constants":34,"../lib/convert-methods-to-error":35,"../lib/convert-to-braintree-error":36,"../lib/create-authorization-data":37,"../lib/deferred":38,"../lib/is-verified-domain":43,"../lib/methods":45,"../lib/once":46,"./constants":10,"./errors":11,"./get-configuration":12,"./request":25,"./request/graphql":23,"@braintree/wrap-promise":7}],10:[function(e,n,a){n.exports={BRAINTREE_VERSION:"2018-05-10"}},{}],11:[function(e,n,a){var i=e("../lib/braintree-error");n.exports={CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN:{type:i.types.MERCHANT,code:"CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN"},CLIENT_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"CLIENT_OPTION_REQUIRED"},CLIENT_OPTION_INVALID:{type:i.types.MERCHANT,code:"CLIENT_OPTION_INVALID"},CLIENT_MISSING_GATEWAY_CONFIGURATION:{type:i.types.INTERNAL,code:"CLIENT_MISSING_GATEWAY_CONFIGURATION",message:"Missing gatewayConfiguration."},CLIENT_INVALID_AUTHORIZATION:{type:i.types.MERCHANT,code:"CLIENT_INVALID_AUTHORIZATION",message:"Authorization is invalid. Make sure your client token or tokenization key is valid."},CLIENT_GATEWAY_NETWORK:{type:i.types.NETWORK,code:"CLIENT_GATEWAY_NETWORK",message:"Cannot contact the gateway at this time."},CLIENT_REQUEST_TIMEOUT:{type:i.types.NETWORK,code:"CLIENT_REQUEST_TIMEOUT",message:"Request timed out waiting for a reply."},CLIENT_REQUEST_ERROR:{type:i.types.NETWORK,code:"CLIENT_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_GRAPHQL_REQUEST_ERROR:{type:i.types.NETWORK,code:"CLIENT_GRAPHQL_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_RATE_LIMITED:{type:i.types.MERCHANT,code:"CLIENT_RATE_LIMITED",message:"You are being rate-limited; please try again in a few minutes."},CLIENT_AUTHORIZATION_INSUFFICIENT:{type:i.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INSUFFICIENT",message:"The authorization used has insufficient privileges."},CLIENT_AUTHORIZATION_INVALID:{type:i.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INVALID",message:"Either the client token has expired and a new one should be generated or the tokenization key has been deactivated or deleted."}}},{"../lib/braintree-error":33}],12:[function(e,n,a){var i=e("../lib/braintree-error"),s=e("@braintree/wrap-promise"),o=e("./request"),c=e("@braintree/uuid"),l=e("../lib/constants"),d=e("./errors"),u=e("./request/graphql"),h=e("../lib/constants").GRAPHQL_URLS,p=e("../lib/is-date-string-before-or-on"),f=e("./constants").BRAINTREE_VERSION;function m(v,b){return new Promise(function(C,x){var N,I,L,O,k=b||c(),B={merchantAppId:window.location.host,platform:l.PLATFORM,sdkVersion:l.VERSION,source:l.SOURCE,integration:l.INTEGRATION,integrationType:l.INTEGRATION,sessionId:k};I=v.attrs,L=v.configUrl,I._meta=B,I.braintreeLibraryVersion=l.BRAINTREE_LIBRARY_VERSION,I.configVersion="3",O={url:L,method:"GET",data:I},I.authorizationFingerprint&&v.graphQL?(p(v.graphQL.date,f)&&(O.graphQL=new u({graphQL:{url:v.graphQL.url,features:["configuration"]}})),O.metadata=B):I.tokenizationKey&&(O.graphQL=new u({graphQL:{url:h[v.environment],features:["configuration"]}}),O.metadata=B),o(O,function(W,$,F){var j;if(W){F===403?j=d.CLIENT_AUTHORIZATION_INSUFFICIENT:F===401?j=d.CLIENT_AUTHORIZATION_INVALID:j=d.CLIENT_GATEWAY_NETWORK,x(new i({type:j.type,code:j.code,message:j.message,details:{originalError:W}}));return}N={authorizationType:I.tokenizationKey?"TOKENIZATION_KEY":"CLIENT_TOKEN",authorizationFingerprint:I.authorizationFingerprint,analyticsMetadata:B,gatewayConfiguration:$},C(N)})})}n.exports={getConfiguration:s(m)}},{"../lib/braintree-error":33,"../lib/constants":34,"../lib/is-date-string-before-or-on":41,"./constants":10,"./errors":11,"./request":25,"./request/graphql":23,"@braintree/uuid":3,"@braintree/wrap-promise":7}],13:[function(e,n,a){var i=e("../lib/braintree-error"),s=e("./client"),o="3.126.0",c=e("@braintree/wrap-promise"),l=e("../lib/errors");function d(u){return u.authorization?s.initialize(u):Promise.reject(new i({type:l.INSTANTIATION_OPTION_REQUIRED.type,code:l.INSTANTIATION_OPTION_REQUIRED.code,message:"options.authorization is required when instantiating a client."}))}n.exports={create:c(d),VERSION:o}},{"../lib/braintree-error":33,"../lib/errors":40,"./client":9,"@braintree/wrap-promise":7}],14:[function(e,n,a){var i=e("../../lib/querystring"),s=e("../../lib/assign").assign,o=e("./prep-body"),c=e("./parse-body"),l=e("./xhr"),d=l.isAvailable,u=e("./graphql/request"),h=e("./default-request"),p=1,f=408;function m(x){return!x||x===f}function v(x){var N=!x.data&&x.errors&&x.errors[0]&&x.errors[0].extensions&&x.errors[0].extensions.errorClass;return N==="UNKNOWN"||N==="INTERNAL"}function b(x,N,I){var L,O,k,B,W,$,F,j=x.url,H=x.graphQL,ee=x.timeout,M=l.getRequestObject(),q=I,Y=!!(H&&H.isGraphQLRequest(j,x.data));x.headers=s({"Content-Type":"application/json"},x.headers),Y?k=new u(x):k=new h(x),j=k.getUrl(),B=k.getBody(),W=k.getMethod(),$=k.getHeaders(),W==="GET"&&(j=i.queryify(j,B),B=null),d?M.onreadystatechange=function(){if(M.readyState===4){if(M.status===0&&Y){delete x.graphQL,b(x,N,I);return}if(F=c(M.responseText),O=k.adaptResponseBody(F),L=k.determineStatus(M.status,F),L>=400||L<200){if(Y&&v(F)){delete x.graphQL,b(x,N,I);return}if(N<p&&m(L)){N++,b(x,N,I);return}q(O||"error",null,L||500)}else q(null,O,L)}}:(x.headers&&(j=i.queryify(j,$)),M.onload=function(){q(null,c(M.responseText),M.status)},M.onerror=function(){q("error",null,500)},M.onprogress=function(){},M.ontimeout=function(){q("timeout",null,-1)});try{M.open(W,j,!0)}catch(E){if(!Y)throw E;delete x.graphQL,b(x,N,I);return}M.timeout=ee,d&&Object.keys($).forEach(function(E){M.setRequestHeader(E,$[E])});try{M.send(o(W,B))}catch(E){}}function C(x,N){b(x,0,N)}n.exports={request:C}},{"../../lib/assign":32,"../../lib/querystring":47,"./default-request":15,"./graphql/request":24,"./parse-body":26,"./prep-body":27,"./xhr":28}],15:[function(e,n,a){function i(s){this._url=s.url,this._data=s.data,this._method=s.method,this._headers=s.headers}i.prototype.getUrl=function(){return this._url},i.prototype.getBody=function(){return this._data},i.prototype.getMethod=function(){return this._method},i.prototype.getHeaders=function(){return this._headers},i.prototype.adaptResponseBody=function(s){return s},i.prototype.determineStatus=function(s){return s},n.exports=i},{}],16:[function(e,n,a){var i=e("./error"),s=e("../../../../lib/assign").assign,o={creditCard:{AMERICAN_EXPRESS:"American Express",DISCOVER:"Discover",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",SOLO:"Solo",UK_MAESTRO:"UK Maestro",UNION_PAY:"UnionPay",VISA:"Visa",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard"},applePayWeb:{VISA:"visa",MASTERCARD:"mastercard",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",INTERNATIONAL_MAESTRO:"maestro",ELO:"elo"},visaCheckout:{VISA:"Visa",MASTERCARD:"MasterCard",DISCOVER:"Discover",AMERICAN_EXPRESS:"American Express"},googlePay:{VISA:"visa",MASTERCARD:"mastercard",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",INTERNATIONAL_MAESTRO:"maestro",ELO:"elo"},masterpass:{VISA:"visa",MASTERCARD:"master",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",DINERS:"diners",INTERNATIONAL_MAESTRO:"maestro",JCB:"jcb"}};function c(u,h){var p;return u.data&&!u.errors?p=l(u,h):p=i(u),p}function l(u,h){var p=u.data.clientConfiguration,f;return f={environment:p.environment.toLowerCase(),clientApiUrl:p.clientApiUrl,assetsUrl:p.assetsUrl,analytics:{url:p.analyticsUrl},merchantId:p.merchantId,venmo:"off"},p.supportedFeatures&&(f.graphQL={url:h._graphQL._config.url,features:p.supportedFeatures.map(function(m){return m.toLowerCase()})}),p.braintreeApi&&(f.braintreeApi=p.braintreeApi),p.applePayWeb&&(f.applePayWeb=p.applePayWeb,f.applePayWeb.supportedNetworks=d(p.applePayWeb.supportedCardBrands,o.applePayWeb),delete f.applePayWeb.supportedCardBrands),p.fastlane&&(f.fastlane=p.fastlane),p.ideal&&(f.ideal=p.ideal),p.creditCard?(f.challenges=p.creditCard.challenges.map(function(m){return m.toLowerCase()}),f.creditCards={supportedCardTypes:d(p.creditCard.supportedCardBrands,o.creditCard)},f.threeDSecureEnabled=p.creditCard.threeDSecureEnabled,f.threeDSecure=p.creditCard.threeDSecure):(f.challenges=[],f.creditCards={supportedCardTypes:[]},f.threeDSecureEnabled=!1),p.googlePay&&(f.androidPay={displayName:p.googlePay.displayName,enabled:!0,environment:p.googlePay.environment.toLowerCase(),googleAuthorizationFingerprint:p.googlePay.googleAuthorization,paypalClientId:p.googlePay.paypalClientId,supportedNetworks:d(p.googlePay.supportedCardBrands,o.googlePay)}),p.venmo&&(f.payWithVenmo={merchantId:p.venmo.merchantId,accessToken:p.venmo.accessToken,environment:p.venmo.environment.toLowerCase(),enrichedCustomerDataEnabled:p.venmo.enrichedCustomerDataEnabled}),p.paypal?(f.paypalEnabled=!0,f.paypal=s({},p.paypal),f.paypal.currencyIsoCode=f.paypal.currencyCode,f.paypal.environment=f.paypal.environment.toLowerCase(),delete f.paypal.currencyCode):f.paypalEnabled=!1,p.unionPay&&(f.unionPay={enabled:!0,merchantAccountId:p.unionPay.merchantAccountId}),p.visaCheckout&&(f.visaCheckout={apikey:p.visaCheckout.apiKey,encryptionKey:p.visaCheckout.encryptionKey,externalClientId:p.visaCheckout.externalClientId,supportedCardTypes:d(p.visaCheckout.supportedCardBrands,o.visaCheckout)}),p.masterpass&&(f.masterpass={merchantCheckoutId:p.masterpass.merchantCheckoutId,supportedNetworks:d(p.masterpass.supportedCardBrands,o.masterpass)}),p.usBankAccount&&(f.usBankAccount={routeId:p.usBankAccount.routeId,plaid:{publicKey:p.usBankAccount.plaidPublicKey}}),f}function d(u,h){return u.reduce(function(p,f){return h.hasOwnProperty(f)?p.concat(h[f]):p},[])}n.exports=c},{"../../../../lib/assign":32,"./error":19}],17:[function(e,n,a){var i=e("./error"),s={AMERICAN_EXPRESS:"American Express",DINERS:"Discover",DISCOVER:"Discover",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",UK_MAESTRO:"Maestro",UNION_PAY:"UnionPay",VISA:"Visa"},o={YES:"Yes",NO:"No",UNKNOWN:"Unknown"},c={PSDTWO:"psd2"};function l(u){var h;return u.data&&!u.errors?h=d(u):h=i(u),h}function d(u){var h=u.data.tokenizeCreditCardForPayPalConnect,p=h.paymentMethod.details,f=p.last4?p.last4.substr(2,4):"",m=p.binData,v,b;return m&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(C){m[C]?m[C]=o[m[C]]:m[C]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(C){m[C]||(m[C]="Unknown")})),v={creditCards:[{binData:m,consumed:!1,description:f?"ending in "+f:"",nonce:h.paymentMethod.id,details:{cardholderName:p.cardholderName,expirationMonth:p.expirationMonth,expirationYear:p.expirationYear,bin:p.bin||"",cardType:s[p.brandCode]||"Unknown",lastFour:p.last4||"",lastTwo:f},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(b=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:c[b]||b.toLowerCase()}),v}n.exports=l},{"./error":19}],18:[function(e,n,a){var i=e("./error"),s={AMERICAN_EXPRESS:"American Express",DINERS:"Discover",DISCOVER:"Discover",ELO:"Elo",HIPER:"Hiper",HIPERCARD:"Hipercard",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",UK_MAESTRO:"Maestro",UNION_PAY:"UnionPay",VISA:"Visa"},o={YES:"Yes",NO:"No",UNKNOWN:"Unknown"},c={PSDTWO:"psd2"};function l(u){var h;return u.data&&!u.errors?h=d(u):h=i(u),h}function d(u){var h=u.data.tokenizeCreditCard,p=h.creditCard,f=p.last4?p.last4.substr(2,4):"",m=p.binData,v,b;return m&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(C){m[C]?m[C]=o[m[C]]:m[C]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(C){m[C]||(m[C]="Unknown")})),v={creditCards:[{binData:m,consumed:!1,description:f?"ending in "+f:"",nonce:h.token,details:{cardholderName:p.cardholderName,expirationMonth:p.expirationMonth,expirationYear:p.expirationYear,bin:p.bin||"",cardType:s[p.brandCode]||"Unknown",lastFour:p.last4||"",lastTwo:f},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(b=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:c[b]||b.toLowerCase()}),v}n.exports=l},{"./error":19}],19:[function(e,n,a){function i(u){var h,p=u.errors&&u.errors[0]&&u.errors[0].extensions&&u.errors[0].extensions.errorClass;return p==="VALIDATION"?h=o(u):p?h=s(u):h={error:{message:"There was a problem serving your request"},fieldErrors:[]},h}function s(u){return{error:{message:u.errors[0].message},fieldErrors:[]}}function o(u){var h=c(u.errors);return h.length===0?{error:{message:u.errors[0].message}}:{error:{message:d(h)},fieldErrors:h}}function c(u){var h=[];return u.forEach(function(p){p.extensions&&p.extensions.inputPath&&l(p.extensions.inputPath.slice(1),p,h)}),h}function l(u,h,p){var f,m=h.extensions.legacyCode,v=u[0];if(u.length===1){p.push({code:m,field:v,message:h.message});return}p.forEach(function(b){b.field===v&&(f=b)}),f||(f={field:v,fieldErrors:[]},p.push(f)),l(u.slice(1),h,f.fieldErrors)}function d(u){var h={creditCard:"Credit card is invalid"},p=u[0].field;return h[p]}n.exports=i},{}],20:[function(e,n,a){var i="query ClientConfiguration { clientConfiguration { analyticsUrl environment merchantId assetsUrl clientApiUrl creditCard { supportedCardBrands challenges threeDSecureEnabled threeDSecure { cardinalAuthenticationJWT cardinalSongbirdUrl cardinalSongbirdIdentityHash } } applePayWeb { countryCode currencyCode merchantIdentifier supportedCardBrands } fastlane { enabled tokensOnDemand { enabled tokenExchange { enabled } } } googlePay { displayName supportedCardBrands environment googleAuthorization paypalClientId } ideal { routeId assetsUrl } masterpass { merchantCheckoutId supportedCardBrands } paypal { displayName clientId assetsUrl environment environmentNoNetwork unvettedMerchant braintreeClientId billingAgreementsEnabled merchantAccountId currencyCode payeeEmail } unionPay { merchantAccountId } usBankAccount { routeId plaidPublicKey } venmo { merchantId accessToken environment enrichedCustomerDataEnabled } visaCheckout { apiKey externalClientId supportedCardBrands } braintreeApi { accessToken url } supportedFeatures } }";function s(){return{query:i,operationName:"ClientConfiguration"}}n.exports=s},{}],21:[function(e,n,a){var i=e("../../../../lib/assign").assign;function s(u){var h=u.hasAuthenticationInsight,p="mutation TokenizeCreditCardForPayPalConnect($input: TokenizeCreditCardForPayPalConnectInput!";return h&&(p+=", $authenticationInsightInput: AuthenticationInsightInput!"),p+=") { tokenizeCreditCardForPayPalConnect(input: $input) { clientMutationId paymentMethod { id details { ... on CreditCardDetails { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId business consumer purchase corporate } } } }",h&&(p+=" authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }"),p+=" } }",p}function o(u,h){var p=u.creditCard,f=p.fastlane||{},m="fastlane"in p&&"termsAndConditionsVersion"in p.fastlane&&p.fastlane.termsAndConditionsVersion,v="fastlane"in p&&"termsAndConditionsCountry"in p.fastlane&&p.fastlane.termsAndConditionsCountry,b=p.email,C="hasBuyerConsent"in f&&f.hasBuyerConsent,x=p.shippingAddress,N=c(u,h),I=i({},N.input,{email:b,optIn:C,phone:p.phone});return m&&(I.termsAndConditionsVersion=m),v&&(I.termsAndConditionsCountry=v),"authAssertion"in f&&(I.authAssertion=f.authAssertion),x&&(I.shippingAddress=x),{input:I}}function c(u,h){var p=u.creditCard,f=p&&p.billingAddress,m=p&&p.expirationDate,v=p&&(p.expirationMonth||m&&m.split("/")[0].trim()),b=p&&(p.expirationYear||m&&m.split("/")[1].trim()),C={input:{creditCard:{number:p&&p.number,expirationMonth:v,expirationYear:b,cvv:p&&p.cvv,cardholderName:p&&p.cardholderName},options:{}}};return h.hasAuthenticationInsight&&(C.authenticationInsightInput={merchantAccountId:u.merchantAccountId}),f&&(C.input.creditCard.billingAddress=f),C.input=l(u,C.input),C}function l(u,h){var p;return u.creditCard&&u.creditCard.options&&typeof u.creditCard.options.validate=="boolean"?p=u.creditCard.options.validate:u.authorizationFingerprint&&u.tokenizationKey||u.authorizationFingerprint?p=!0:u.tokenizationKey&&(p=!1),typeof p=="boolean"&&(h.options=i({validate:p},h.options)),h}function d(u){var h={hasAuthenticationInsight:!!(u.authenticationInsight&&u.merchantAccountId)};return{query:s(h),variables:o(u,h),operationName:"TokenizeCreditCardForPayPalConnect"}}n.exports=d},{"../../../../lib/assign":32}],22:[function(e,n,a){var i=e("../../../../lib/assign").assign;function s(d){var u=d.hasAuthenticationInsight,h="mutation TokenizeCreditCard($input: TokenizeCreditCardInput!";return u&&(h+=", $authenticationInsightInput: AuthenticationInsightInput!"),h+=") { tokenizeCreditCard(input: $input) { token creditCard { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId business consumer purchase corporate } } ",u&&(h+=" authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }"),h+=" } }",h}function o(d,u){var h=d.creditCard,p=h&&h.billingAddress,f=h&&h.expirationDate,m=h&&(h.expirationMonth||f&&f.split("/")[0].trim()),v=h&&(h.expirationYear||f&&f.split("/")[1].trim()),b={input:{creditCard:{number:h&&h.number,expirationMonth:m,expirationYear:v,cvv:h&&h.cvv,cardholderName:h&&h.cardholderName},options:{}}};return u.hasAuthenticationInsight&&(b.authenticationInsightInput={merchantAccountId:d.merchantAccountId}),p&&(b.input.creditCard.billingAddress=p),b.input=c(d,b.input),b}function c(d,u){var h;return d.creditCard&&d.creditCard.options&&typeof d.creditCard.options.validate=="boolean"?h=d.creditCard.options.validate:d.authorizationFingerprint&&d.tokenizationKey||d.authorizationFingerprint?h=!0:d.tokenizationKey&&(h=!1),typeof h=="boolean"&&(u.options=i({validate:h},u.options)),u}function l(d){var u={hasAuthenticationInsight:!!(d.authenticationInsight&&d.merchantAccountId)};return{query:s(u),variables:o(d,u),operationName:"TokenizeCreditCard"}}n.exports=l},{"../../../../lib/assign":32}],23:[function(e,n,a){var i={tokenize_credit_cards:"payment_methods/credit_cards",configuration:"configuration"},s=["creditCard.options.unionPayEnrollment"];function o(l){this._config=l.graphQL}o.prototype.getGraphQLEndpoint=function(){return this._config.url},o.prototype.isGraphQLRequest=function(l,d){var u,h=this.getClientApiPath(l);return!this._isGraphQLEnabled()||!h||(u=this._config.features.some(function(p){return i[p]===h}),c(d))?!1:u},o.prototype.getClientApiPath=function(l){var d,u="/client_api/v1/",h=l.split(u);return h.length>1&&(d=h[1].split("?")[0]),d},o.prototype._isGraphQLEnabled=function(){return!!this._config};function c(l){return s.some(function(d){var u=d.split(".").reduce(function(h,p){return h&&h[p]},l);return u!==void 0})}n.exports=o},{}],24:[function(e,n,a){var i=e("../../constants").BRAINTREE_VERSION,s=e("../../../lib/assign").assign,o=e("../../../lib/snake-case-to-camel-case"),c=e("../../../lib/is-fastlane-checkout"),l=e("./generators/credit-card-tokenization"),d=e("./adapters/credit-card-tokenization"),u=e("./adapters/credit-card-tokenization-fastlane"),h=e("./generators/credit-card-for-fastlane-tokenization"),p=e("./generators/configuration"),f=e("./adapters/configuration"),m={"payment_methods/credit_cards":function(N,I){return I?h(N):l(N)},configuration:p},v={"payment_methods/credit_cards":function(N,I,L){return L?u(N,I):d(N,I)},configuration:f};function b(N){var I=N.graphQL.getClientApiPath(N.url);this._graphQL=N.graphQL,this._data=N.data,this._method=N.method,this._headers=N.headers,this._clientSdkMetadata={source:N.metadata.source,integration:N.metadata.integration,sessionId:N.metadata.sessionId},this._sendAnalyticsEvent=N.sendAnalyticsEvent||Function.prototype,this._generator=m[I],this._adapter=v[I],this._sendAnalyticsEvent("graphql.init")}b.prototype.getUrl=function(){return this._graphQL.getGraphQLEndpoint()},b.prototype.getBody=function(){var N=x(this._data),I=this._generator(N,c(this._data.creditCard)),L=s({clientSdkMetadata:this._clientSdkMetadata},I);return JSON.stringify(L)},b.prototype.getMethod=function(){return"POST"},b.prototype.getHeaders=function(){var N,I;return this._data.authorizationFingerprint?(this._sendAnalyticsEvent("graphql.authorization-fingerprint"),N=this._data.authorizationFingerprint):(this._sendAnalyticsEvent("graphql.tokenization-key"),N=this._data.tokenizationKey),I={Authorization:"Bearer "+N,"Braintree-Version":i},s({},this._headers,I)},b.prototype.adaptResponseBody=function(N){return this._adapter(N,this,"creditCard"in this._data&&c(this._data.creditCard))},b.prototype.determineStatus=function(N,I){var L,O;return N===200?(O=I.errors&&I.errors[0]&&I.errors[0].extensions&&I.errors[0].extensions.errorClass,I.data&&!I.errors?L=200:O==="VALIDATION"?L=422:O==="AUTHORIZATION"?L=403:O==="AUTHENTICATION"?L=401:C(O,I)?L=403:L=500):N?L=N:L=500,this._sendAnalyticsEvent("graphql.status."+N),this._sendAnalyticsEvent("graphql.determinedStatus."+L),L};function C(N,I){return!N&&I.errors[0].message}function x(N){var I={};return Object.keys(N).forEach(function(L){var O=o(L);typeof N[L]=="object"?I[O]=x(N[L]):typeof N[L]=="number"?I[O]=String(N[L]):I[O]=N[L]}),I}n.exports=b},{"../../../lib/assign":32,"../../../lib/is-fastlane-checkout":42,"../../../lib/snake-case-to-camel-case":48,"../../constants":10,"./adapters/configuration":16,"./adapters/credit-card-tokenization":18,"./adapters/credit-card-tokenization-fastlane":17,"./generators/configuration":20,"./generators/credit-card-for-fastlane-tokenization":21,"./generators/credit-card-tokenization":22}],25:[function(e,n,a){var i=e("../../lib/once"),s=e("./ajax-driver");n.exports=function(o,c){c=i(c||Function.prototype),o.method=(o.method||"GET").toUpperCase(),o.timeout=o.timeout==null?6e4:o.timeout,o.data=o.data||{},s.request(o,c)}},{"../../lib/once":46,"./ajax-driver":14}],26:[function(e,n,a){n.exports=function(i){try{i=JSON.parse(i)}catch(s){}return i}},{}],27:[function(e,n,a){n.exports=function(i,s){if(typeof i!="string")throw new Error("Method must be a string");return i.toLowerCase()!=="get"&&s!=null&&(s=typeof s=="string"?s:JSON.stringify(s)),s}},{}],28:[function(e,n,a){var i=typeof window!="undefined"&&window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest;function s(){return i?new window.XMLHttpRequest:new window.XDomainRequest}n.exports={isAvailable:i,getRequestObject:s}},{}],29:[function(e,n,a){var i=e("./create-authorization-data"),s=e("./json-clone"),o=e("./constants");function c(d,u){var h,p=u?s(u):{},f=i(d.authorization).attrs,m=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(m[h]=p._meta[h]);return p._meta=m,f.tokenizationKey?p.tokenizationKey=f.tokenizationKey:p.authorizationFingerprint=f.authorizationFingerprint,p}function l(d){var u=d.getConfiguration(),h=i(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",f={api_integration_type:u.analyticsMetadata.integrationType,app_id:window.location.host,c_sdk_ver:o.VERSION,component:"braintreeclientsdk",merchant_sdk_env:p?"production":"sandbox",merchant_id:u.gatewayConfiguration.merchantId,event_source:"web",platform:o.PLATFORM,platform_version:window.navigator.userAgent,session_id:u.analyticsMetadata.sessionId,client_session_id:u.analyticsMetadata.sessionId,tenant_name:"braintree",product_name:"BT_DCC",space_key:"SKDUYK"};return h.tokenizationKey?f.tokenization_key=h.tokenizationKey:f.auth_fingerprint=h.authorizationFingerprint,f}n.exports={addMetadata:c,addEventMetadata:l}},{"./constants":34,"./create-authorization-data":37,"./json-clone":44}],30:[function(e,n,a){var i=e("./constants"),s=e("./add-metadata"),o=e("./assign").assign;function c(u,h,p){return l(u,h,{},p)}function l(u,h,p,f){var m=Date.now();return p.flow==="vault"?p.context_type="BA_Token":p.flow==="checkout"&&(p.context_type="EC_Token"),Promise.resolve(u).then(function(v){var b=v._request,C=i.ANALYTICS_URL,x=i.ANALYTICS_PREFIX+h,N=v.getConfiguration(),I=N.gatewayConfiguration.environment==="production",L={events:[],tracking:[]},O=s.addEventMetadata(v,L);return O.event_name=x,O.t=m,L.events=[{level:"info",event:x,payload:o({env:I?"production":"sandbox",timestamp:m},p)}],L.tracking=[O],p&&typeof p=="object"&&(L.tracking=[d(O,p)]),b({url:C,method:"post",data:L,timeout:i.ANALYTICS_REQUEST_TIMEOUT_MS},f)}).catch(function(v){f&&f(v)})}function d(u,h){var p={},f=o({},h);return Object.keys(f).forEach(function(m){i.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(m)===-1&&delete f[m]}),p=o(u,f),p}n.exports={sendEvent:c,sendEventPlus:l}},{"./add-metadata":29,"./assign":32,"./constants":34}],31:[function(e,n,a){var i=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:i,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":8}],32:[function(e,n,a){var i=typeof Object.assign=="function"?Object.assign:s;function s(o){var c,l,d;for(c=1;c<arguments.length;c++){l=arguments[c];for(d in l)l.hasOwnProperty(d)&&(o[d]=l[d])}return o}n.exports={assign:i,_assign:s}},{}],33:[function(e,n,a){var i=e("./enumerate");function s(o){if(!s.types.hasOwnProperty(o.type))throw new Error(o.type+" is not a valid type.");if(!o.code)throw new Error("Error code required.");if(!o.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=o.code,this.message=o.message,this.type=o.type,this.details=o.details}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":39}],34:[function(e,n,a){var i="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},c={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},l={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:c,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:l,INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],35:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors");n.exports=function(o,c){c.forEach(function(l){o[l]=function(){throw new i({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:l+" cannot be called after teardown."})}})}},{"./braintree-error":33,"./errors":40}],36:[function(e,n,a){var i=e("./braintree-error");function s(o,c){return o instanceof i?o:new i({type:c.type,code:c.code,message:c.message,details:{originalError:o}})}n.exports=s},{"./braintree-error":33}],37:[function(e,n,a){var i=e("../lib/vendor/polyfill").atob,s=e("../lib/constants").CLIENT_API_URLS;function o(d){return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(d)}function c(d){var u=d.split("_"),h=u[0],p=u.slice(2).join("_");return{merchantId:p,environment:h}}function l(d){var u,h,p={attrs:{},configUrl:""};return o(d)?(h=c(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=s[h.environment]+"/merchants/"+h.merchantId+"/client_api/v1/configuration"):(u=JSON.parse(i(d)),p.environment=u.environment,p.attrs.authorizationFingerprint=u.authorizationFingerprint,p.configUrl=u.configUrl,p.graphQL=u.graphQL),p}n.exports=l},{"../lib/constants":34,"../lib/vendor/polyfill":49}],38:[function(e,n,a){n.exports=function(i){return function(){var s=arguments;setTimeout(function(){i.apply(null,s)},1)}}},{}],39:[function(e,n,a){function i(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}n.exports=i},{}],40:[function(e,n,a){var i=e("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:i.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:i.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:i.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:i.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":33}],41:[function(e,n,a){function i(o){var c=o.split("-");return new Date(c[0],c[1],c[2])}function s(o,c){return i(o)<=i(c)}n.exports=s},{}],42:[function(e,n,a){n.exports=function(i){return i&&i.hasOwnProperty("fastlane")&&i.fastlane}},{}],43:[function(e,n,a){var i,s={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function o(l){return l.split(".").slice(-2).join(".")}function c(l){var d;return l=l.toLowerCase(),/^https:/.test(l)?(i=i||document.createElement("a"),i.href=l,d=o(i.hostname),s.hasOwnProperty(d)):!1}n.exports=c},{}],44:[function(e,n,a){n.exports=function(i){return JSON.parse(JSON.stringify(i))}},{}],45:[function(e,n,a){n.exports=function(i){return Object.keys(i).filter(function(s){return typeof i[s]=="function"})}},{}],46:[function(e,n,a){function i(s){var o=!1;return function(){o||(o=!0,s.apply(null,arguments))}}n.exports=i},{}],47:[function(e,n,a){function i(u){var h;for(h in u)if(u.hasOwnProperty(h))return!0;return!1}function s(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.toString.call(u)==="[object Array]"||!1}function o(u){return u=u||window.location.href,/\?/.test(u)}function c(u){var h,p;return u=u||window.location.href,o(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(f,m){var v=m.split("="),b=decodeURIComponent(v[0]),C=decodeURIComponent(v[1]);return f[b]=C,f},{}),p):{}}function l(u,h){var p,f,m,v=[];for(m in u)u.hasOwnProperty(m)&&(f=u[m],h?s(u)?p=h+"[]":p=h+"["+m+"]":p=m,typeof f=="object"?v.push(l(f,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(f)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&i(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=l(h)),u}n.exports={parse:c,stringify:l,queryify:d,hasQueryParams:o}},{}],48:[function(e,n,a){n.exports=function(i){return i.indexOf("_")===-1?i:i.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],49:[function(e,n,a){var i=typeof atob=="function"?atob:s;function s(o){var c,l,d,u,h,p,f,m,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$/,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",C="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");m=0;do u=b.indexOf(o.charAt(m++)),h=b.indexOf(o.charAt(m++)),p=b.indexOf(o.charAt(m++)),f=b.indexOf(o.charAt(m++)),c=(u&63)<<2|h>>4&3,l=(h&15)<<4|p>>2&15,d=(p&3)<<6|f&63,C+=String.fromCharCode(c)+(l?String.fromCharCode(l):"")+(d?String.fromCharCode(d):"");while(m<o.length);return C}n.exports={atob:function(o){return i.call(window,o)},_atob:s}},{}]},{},[13])(13)})}(Nn)),Nn.exports}var Ui=kl();const Sl=ve({__proto__:null,default:Cn(Ui)},[Ui]);var Pn={exports:{}},Bi;function Ml(){return Bi||(Bi=1,function(r,t){(function(e){r.exports=e()})(function(){return function(){function e(n,a,i){function s(l,d){if(!a[l]){if(!n[l]){var u=typeof Ee=="function"&&Ee;if(!d&&u)return u(l,!0);if(o)return o(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var p=a[l]={exports:{}};n[l][0].call(p.exports,function(f){var m=n[l][1][f];return s(m||f)},p,p.exports,e,n,a,i)}return a[l].exports}for(var o=typeof Ee=="function"&&Ee,c=0;c<i.length;c++)s(i[c]);return s}return e}()({1:[function(e,n,a){var i={};function s(o){var c,l=JSON.stringify(o);if(!o.forceScriptReload&&(c=i[l],c))return c;var d=document.createElement("script"),u=o.dataAttributes||{},h=o.container||document.head;return d.src=o.src,d.id=o.id||"",d.async=!0,o.type&&d.setAttribute("type","".concat(o.type)),o.crossorigin&&d.setAttribute("crossorigin","".concat(o.crossorigin)),o.integrity&&d.setAttribute("integrity","".concat(o.integrity)),Object.keys(u).forEach(function(p){d.setAttribute("data-".concat(p),"".concat(u[p]))}),c=new Promise(function(p,f){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){f(new Error("".concat(o.src," failed to load.")))}),d.addEventListener("abort",function(){f(new Error("".concat(o.src," has aborted.")))}),h.appendChild(d)}),i[l]=c,c}s.clearCache=function(){i={}},n.exports=s},{}],2:[function(e,n,a){n.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){return function(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];setTimeout(function(){try{s.apply(void 0,o)}catch(l){console.log("Error in callback function"),console.log(l)}},1)}}a.deferred=i},{}],4:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){var o=!1;return function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];o||(o=!0,s.apply(void 0,c))}}a.once=i},{}],5:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s,o){if(!o)return s;s.then(function(c){return o(null,c)}).catch(function(c){return o(c)})}a.promiseOrCallback=i},{}],6:[function(e,n,a){var i=e("./lib/deferred"),s=e("./lib/once"),o=e("./lib/promise-or-callback");function c(l){return function(){for(var d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];var h,p=d[d.length-1];return typeof p=="function"&&(h=d.pop(),h=s.once(i.deferred(h))),o.promiseOrCallback(l.apply(this,d),h)}}c.wrapPrototype=function(l,d){d===void 0&&(d={});var u=d.ignoreMethods||[],h=d.transformPrivateMethods===!0,p=Object.getOwnPropertyNames(l.prototype).filter(function(f){var m,v=f!=="constructor"&&typeof l.prototype[f]=="function",b=u.indexOf(f)===-1;return h?m=!0:m=f.charAt(0)!=="_",v&&m&&b});return p.forEach(function(f){var m=l.prototype[f];l.prototype[f]=c(m)}),l},n.exports=c},{"./lib/deferred":3,"./lib/once":4,"./lib/promise-or-callback":5}],7:[function(e,n,a){(function(i,s){typeof a=="object"&&typeof n!="undefined"?s(a):(i=typeof globalThis!="undefined"?globalThis:i||self,s(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
224
224
  Copyright (c) Microsoft Corporation.
225
225
 
226
226
  Permission to use, copy, modify, and/or distribute this software for any
@@ -233,7 +233,7 @@ ${m}::-ms-input-placeholder{${f}}
233
233
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
234
234
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
235
235
  PERFORMANCE OF THIS SOFTWARE.
236
- ***************************************************************************** */function s(y,T,_,P){function D(C){return C instanceof _?C:new _(function(z){z(C)})}return new(_||(_=Promise))(function(C,z){function Z(te){try{k(P.next(te))}catch(we){z(we)}}function le(te){try{k(P.throw(te))}catch(we){z(we)}}function k(te){te.done?C(te.value):D(te.value).then(Z,le)}k((P=P.apply(y,[])).next())})}function o(y,T){var _={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},P,D,C,z;return z={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(z[Symbol.iterator]=function(){return this}),z;function Z(k){return function(te){return le([k,te])}}function le(k){if(P)throw new TypeError("Generator is already executing.");for(;_;)try{if(P=1,D&&(C=k[0]&2?D.return:k[0]?D.throw||((C=D.return)&&C.call(D),0):D.next)&&!(C=C.call(D,k[1])).done)return C;switch(D=0,C&&(k=[k[0]&2,C.value]),k[0]){case 0:case 1:C=k;break;case 4:return _.label++,{value:k[1],done:!1};case 5:_.label++,D=k[1],k=[0];continue;case 7:k=_.ops.pop(),_.trys.pop();continue;default:if(C=_.trys,!(C=C.length>0&&C[C.length-1])&&(k[0]===6||k[0]===2)){_=0;continue}if(k[0]===3&&(!C||k[1]>C[0]&&k[1]<C[3])){_.label=k[1];break}if(k[0]===6&&_.label<C[1]){_.label=C[1],C=k;break}if(C&&_.label<C[2]){_.label=C[2],_.ops.push(k);break}C[2]&&_.ops.pop(),_.trys.pop();continue}k=T.call(y,_)}catch(te){k=[6,te],D=0}finally{P=C=0}if(k[0]&5)throw k[1];return{value:k[0]?k[1]:void 0,done:!0}}}var c={},l={};function d(y){var T,_=JSON.stringify(y);if(!y.forceScriptReload&&(T=l[_],T))return T;var P=document.createElement("script"),D=y.dataAttributes||{},C=y.container||document.head;return P.src=y.src,P.id=y.id||"",P.async=!0,y.type&&P.setAttribute("type","".concat(y.type)),y.crossorigin&&P.setAttribute("crossorigin","".concat(y.crossorigin)),Object.keys(D).forEach(function(z){P.setAttribute("data-".concat(z),"".concat(D[z]))}),T=new Promise(function(z,Z){P.addEventListener("load",function(){z(P)}),P.addEventListener("error",function(){Z(new Error("".concat(y.src," failed to load.")))}),P.addEventListener("abort",function(){Z(new Error("".concat(y.src," has aborted.")))}),C.appendChild(P)}),l[_]=T,T}d.clearCache=function(){l={}};var u=d,h=function(T){var _=document.querySelector('link[href="'.concat(T.href,'"]'));if(_)return Promise.resolve(_);_=document.createElement("link");var P=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),P.firstChild?P.insertBefore(_,P.firstChild):P.appendChild(_),Promise.resolve(_)};Object.defineProperty(c,"__esModule",{value:!0}),c.loadStylesheet=f=c.loadScript=void 0;var p=u,f=c.loadScript=p,m=h;c.loadStylesheet=m;var v="https://www.paypalobjects.com",b={minified:"axo.min",unminified:"axo"},w="fastlane",x="connect-boba",O="".concat(x,"/locales/"),I={AXO_ASSET_NAME:b,AXO_ASSET_PATH:x,LOCALE_PATH:O,CDNX_PROD:v},L={BT:"BT",PPCP:"PPCP"};function N(){return typeof window.define=="function"&&!!window.define.amd}function S(){return N()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function B(y,T,_){var P,D;return _===void 0&&(_=!0),s(this,void 0,void 0,function(){var C,z;return o(this,function(Z){if(C=$(),C&&C[y.module]){if(T&&((P=C[y.module])===null||P===void 0?void 0:P.VERSION)!==T)throw z=(D=C[y.module])===null||D===void 0?void 0:D.VERSION,new Error("".concat(y.module," already loaded with version ").concat(z," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(y.module," without specifying version"));return[2,G(y,T,_)]})})}function G(y,T,_){if(_===void 0&&(_=!0),N()){var P=_?y.amdModule.minified:y.amdModule.unminified;return new Promise(function(C,z){window.require([P],C,z)})}var D=_?y.script.minified:y.script.unminified;return f({id:"".concat(y.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(D)})}function $(){return window==null?void 0:window.braintree}var F,j,H={Client:"client",HostedCardFields:"hostedFields"},ee="braintree",M=(F={},F[H.Client]="client",F[H.HostedCardFields]="hosted-fields",F),q=(j={},j[H.Client]={id:"client",module:H.Client,amdModule:{unminified:"".concat(ee,"/").concat(M[H.Client]),minified:"".concat(ee,"/").concat(M[H.Client],".min")},script:{unminified:"".concat(M[H.Client],".js"),minified:"".concat(M[H.Client],".min.js")}},j[H.HostedCardFields]={id:"hcf",module:H.HostedCardFields,amdModule:{unminified:"".concat(ee,"/").concat(M[H.HostedCardFields]),minified:"".concat(ee,"/").concat(M[H.HostedCardFields],".min")},script:{unminified:"".concat(M[H.HostedCardFields],".js"),minified:"".concat(M[H.HostedCardFields],".min.js")}},j);function Y(y){return s(this,void 0,void 0,function(){var T,_,P,D;return o(this,function(C){switch(C.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=y.btSdkVersion,_=y.minified,P=R(y),D=V(y),y.platform!==L.BT?[3,2]:[4,Promise.all([B(q.hostedFields,T,_),E(P,_)])];case 1:return C.sent(),[3,5];case 2:return y.platform!==L.PPCP?[3,4]:[4,Promise.all([B(q.client,T,_),B(q.hostedFields,T,_),E(P,_)])];case 3:return C.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:D}}]}})})}function E(y,T){var _;if(T===void 0&&(T=!0),N()){S()&&requirejs.config({paths:(_={},_[w]=y,_)});var P="".concat(w,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(D,C){window.require([P],D,C)})}return f({id:"axo-id",src:y,forceScriptReload:!0})}function g(y){var T=y.assetUrl,_=y.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function R(y){var T,_=(y==null?void 0:y.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,P=N()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:P,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(y){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=Y})},{}],8:[function(e,n,a){var i=e("../lib/braintree-error");n.exports={DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS:{type:i.types.MERCHANT,code:"DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS",message:"Data Collector must be created with Kount and/or PayPal."}}},{"../lib/braintree-error":13}],9:[function(e,n,a){var i=e("../lib/constants").FRAUDNET_FNCLS,s=e("../lib/constants").FRAUDNET_SOURCE,o=e("../lib/constants").FRAUDNET_URL,c=e("../lib/assets").loadScript,l=32,d;function u(b){var w=new p;return b=b||{},!b.sessionId&&d?(w.sessionId=d,Promise.resolve(w)):w.initialize(b)}function h(){d=null}function p(){}p.prototype.initialize=function(b){var w=b.environment,x=this;return this.sessionId=b.sessionId||b.clientSessionId,this.sessionId&&(this.sessionId=this.sessionId.substring(0,l)),b.sessionId||(d=this.sessionId),this._beaconId=m(this.sessionId),this._parameterBlock=v(this.sessionId,this._beaconId,w,b.cb1),c({src:o}).then(function(O){return x._thirdPartyBlock=O,x}).catch(function(){return null})},p.prototype.teardown=function(){f(document.querySelector('iframe[title="ppfniframe"]')),f(document.querySelector('iframe[title="pbf"]')),f(this._parameterBlock),f(this._thirdPartyBlock)};function f(b){b&&b.parentNode&&b.parentNode.removeChild(b)}function m(b){var w=new Date().getTime()/1e3;return"https://b.stats.paypal.com/counter.cgi?i=127.0.0.1&p="+b+"&t="+w+"&a=14"}function v(b,w,x,O){var I=document.body.appendChild(document.createElement("script")),L={f:b,s,b:w,cb1:O};return x!=="production"&&(L.sandbox=!0),I.type="application/json",I.setAttribute("fncls",i),I.text=JSON.stringify(L),I}n.exports={setup:u,clearSessionIdCache:h}},{"../lib/assets":11,"../lib/constants":14}],10:[function(e,n,a){var i=e("./fraudnet"),s=e("../lib/braintree-error"),o=e("../lib/basic-component-verification"),c=e("../lib/create-deferred-client"),l=e("../lib/create-assets-url"),d=e("../lib/methods"),u=e("../lib/convert-methods-to-error"),h="3.126.0",p=e("@braintree/wrap-promise"),f=e("./errors");function m(w){var x="Data Collector",O={_instances:[]},I={};return o.verify({name:x,client:w.client,authorization:w.authorization}).then(function(){return O._instantiatedWithAClient=!w.useDeferredClient,O._createPromise=c.create({authorization:w.authorization,client:w.client,debug:w.debug,assetsUrl:l.create(w.authorization),name:x}).then(function(L){var N=L.getConfiguration();return i.setup({sessionId:w.riskCorrelationId||w.clientMetadataId||w.correlationId,clientSessionId:N.analyticsMetadata.sessionId,environment:N.gatewayConfiguration.environment,cb1:w.cb1}).then(function(S){S&&(I.correlation_id=S.sessionId,O._instances.push(S))})}).then(function(){return O._instances.length===0?Promise.reject(new s(f.DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS)):(O.deviceData=JSON.stringify(I),O.rawDeviceData=I,O)}),O.teardown=v(O),O.getDeviceData=b(O),O._instantiatedWithAClient?O._createPromise:O})}function v(w){return p(function(){return w._createPromise.then(function(){w._instances.forEach(function(O){O&&O.teardown()}),u(w,d(w))})})}function b(w){return p(function(O){return O=O||{},w._createPromise.then(function(){return O.raw?Promise.resolve(w.rawDeviceData):Promise.resolve(w.deviceData)})})}n.exports={create:p(m),VERSION:h}},{"../lib/basic-component-verification":12,"../lib/braintree-error":13,"../lib/convert-methods-to-error":15,"../lib/create-assets-url":16,"../lib/create-deferred-client":17,"../lib/methods":20,"./errors":8,"./fraudnet":9,"@braintree/wrap-promise":6}],11:[function(e,n,a){var i=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:i,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":7}],12:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors"),o="3.126.0";function c(l){var d,u,h;return l?(h=l.name,d=l.client,u=l.authorization,!d&&!u?Promise.reject(new i({type:s.INSTANTIATION_OPTION_REQUIRED.type,code:s.INSTANTIATION_OPTION_REQUIRED.code,message:"options.client is required when instantiating "+h+"."})):!u&&d.getVersion()!==o?Promise.reject(new i({type:s.INCOMPATIBLE_VERSIONS.type,code:s.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+d.getVersion()+") and "+h+" (version "+o+") components must be from the same SDK version."})):Promise.resolve()):Promise.reject(new i({type:s.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:s.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:"Options must be passed to basicComponentVerification function."}))}n.exports={verify:c}},{"./braintree-error":13,"./errors":19}],13:[function(e,n,a){var i=e("./enumerate");function s(o){if(!s.types.hasOwnProperty(o.type))throw new Error(o.type+" is not a valid type.");if(!o.code)throw new Error("Error code required.");if(!o.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=o.code,this.message=o.message,this.type=o.type,this.details=o.details}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":18}],14:[function(e,n,a){var i="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},c={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},l={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:c,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:l,INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],15:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors");n.exports=function(o,c){c.forEach(function(l){o[l]=function(){throw new i({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:l+" cannot be called after teardown."})}})}},{"./braintree-error":13,"./errors":19}],16:[function(e,n,a){var i=e("./constants").ASSETS_URLS;function s(o){return i.production}n.exports={create:s}},{"./constants":14}],17:[function(e,n,a){var i=e("./braintree-error"),s=e("./assets"),o=e("./errors"),c="3.126.0";function l(d){var u=Promise.resolve();return d.client?Promise.resolve(d.client):(window.braintree&&window.braintree.client||(u=s.loadScript({src:d.assetsUrl+"/web/"+c+"/js/client.min.js"}).catch(function(h){return Promise.reject(new i({type:o.CLIENT_SCRIPT_FAILED_TO_LOAD.type,code:o.CLIENT_SCRIPT_FAILED_TO_LOAD.code,message:o.CLIENT_SCRIPT_FAILED_TO_LOAD.message,details:{originalError:h}}))})),u.then(function(){return window.braintree.client.VERSION!==c?Promise.reject(new i({type:o.INCOMPATIBLE_VERSIONS.type,code:o.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+window.braintree.client.VERSION+") and "+d.name+" (version "+c+") components must be from the same SDK version."})):window.braintree.client.create({authorization:d.authorization,debug:d.debug})}))}n.exports={create:l}},{"./assets":11,"./braintree-error":13,"./errors":19}],18:[function(e,n,a){function i(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}n.exports=i},{}],19:[function(e,n,a){var i=e("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:i.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:i.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:i.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:i.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":13}],20:[function(e,n,a){n.exports=function(i){return Object.keys(i).filter(function(s){return typeof i[s]=="function"})}},{}]},{},[10])(10)})}(Pn)),Pn.exports}var zi=Ml();const Dl=ve({__proto__:null,default:Cn(zi)},[zi]);var Ln={exports:{}},ji;function Vl(){return ji||(ji=1,function(r,t){(function(e){r.exports=e()})(function(){return function(){function e(n,a,i){function s(l,d){if(!a[l]){if(!n[l]){var u=typeof Ee=="function"&&Ee;if(!d&&u)return u(l,!0);if(o)return o(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var p=a[l]={exports:{}};n[l][0].call(p.exports,function(f){var m=n[l][1][f];return s(m||f)},p,p.exports,e,n,a,i)}return a[l].exports}for(var o=typeof Ee=="function"&&Ee,c=0;c<i.length;c++)s(i[c]);return s}return e}()({1:[function(e,n,a){var i={};function s(o){var c,l=JSON.stringify(o);if(!o.forceScriptReload&&(c=i[l],c))return c;var d=document.createElement("script"),u=o.dataAttributes||{},h=o.container||document.head;return d.src=o.src,d.id=o.id||"",d.async=!0,o.type&&d.setAttribute("type","".concat(o.type)),o.crossorigin&&d.setAttribute("crossorigin","".concat(o.crossorigin)),o.integrity&&d.setAttribute("integrity","".concat(o.integrity)),Object.keys(u).forEach(function(p){d.setAttribute("data-".concat(p),"".concat(u[p]))}),c=new Promise(function(p,f){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){f(new Error("".concat(o.src," failed to load.")))}),d.addEventListener("abort",function(){f(new Error("".concat(o.src," has aborted.")))}),h.appendChild(d)}),i[l]=c,c}s.clearCache=function(){i={}},n.exports=s},{}],2:[function(e,n,a){n.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,/Android/i.test(s)}},{}],4:[function(e,n,a){var i=e("./is-edge"),s=e("./is-samsung"),o=e("./is-duckduckgo"),c=e("./is-opera"),l=e("./is-silk");n.exports=function(u){return u=u||window.navigator.userAgent,(u.indexOf("Chrome")!==-1||u.indexOf("CriOS")!==-1)&&!i(u)&&!s(u)&&!o(u)&&!c(u)&&!l(u)}},{"./is-duckduckgo":5,"./is-edge":6,"./is-opera":14,"./is-samsung":15,"./is-silk":16}],5:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("DuckDuckGo/")!==-1}},{}],6:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Edge/")!==-1||s.indexOf("Edg/")!==-1}},{}],7:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,/FxiOS/i.test(s)}},{}],8:[function(e,n,a){var i=e("./is-ios");function s(o){return/\bGSA\b/.test(o)}n.exports=function(c){return c=c||window.navigator.userAgent,i(c)&&s(c)}},{"./is-ios":12}],9:[function(e,n,a){var i=e("./is-ios"),s=e("./is-ios-firefox"),o=/webkit/i;function c(u){return o.test(u)}function l(u){return u.indexOf("CriOS")>-1}function d(u){return u.indexOf("FBAN")>-1}n.exports=function(h){return h=h||window.navigator.userAgent,i(h)&&c(h)&&!l(h)&&!s(h)&&!d(h)}},{"./is-ios":12,"./is-ios-firefox":7}],10:[function(e,n,a){var i=e("./is-ios"),s=e("./is-ios-google-search-app");n.exports=function(c){return c=c||window.navigator.userAgent,i(c)?s(c)?!0:/.+AppleWebKit(?!.*Safari)/i.test(c):!1}},{"./is-ios":12,"./is-ios-google-search-app":8}],11:[function(e,n,a){var i=e("./is-ios-webview");n.exports=function(o,c){return c=typeof c!="undefined"?c:window.statusbar.visible,i(o)&&c}},{"./is-ios-webview":10}],12:[function(e,n,a){var i=e("./is-ipados");n.exports=function(o,c,l){c===void 0&&(c=!0),o=o||window.navigator.userAgent;var d=/iPhone|iPod|iPad/i.test(o);return c?d||i(o,l):d}},{"./is-ipados":13}],13:[function(e,n,a){n.exports=function(s,o){return s=s||window.navigator.userAgent,o=o||window.document,/Mac|iPad/i.test(s)&&"ontouchend"in o}},{}],14:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("OPR/")!==-1||s.indexOf("Opera/")!==-1||s.indexOf("OPT/")!==-1}},{}],15:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,/SamsungBrowser/i.test(s)}},{}],16:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Silk/")!==-1}},{}],17:[function(e,n,a){var i=48,s=e("./is-android"),o=e("./is-ios-firefox"),c=e("./is-ios-webview"),l=e("./is-chrome"),d=e("./is-samsung"),u=e("./is-duckduckgo");function h(v){v=v||window.navigator.userAgent;var b=v.match(/CriOS\/(\d+)\./);if(!b)return!1;var w=parseInt(b[1],10);return w<i}function p(v){return v=v||window.navigator.userAgent,v.indexOf("Opera Mini")>-1}function f(v){var b=/Version\/[\d.]+/i;return v=v||window.navigator.userAgent,s(v)?b.test(v)&&!p(v)&&!u(v):!1}function m(v){return!l(v)&&!d(v)&&/samsung/i.test(v)}n.exports=function(b){return b=b||window.navigator.userAgent,!(c(b)||o(b)||f(b)||p(b)||h(b)||m(b))}},{"./is-android":3,"./is-chrome":4,"./is-duckduckgo":5,"./is-ios-firefox":7,"./is-ios-webview":10,"./is-samsung":15}],18:[function(e,n,a){n.exports=e("./dist/is-android")},{"./dist/is-android":3}],19:[function(e,n,a){n.exports=e("./dist/is-chrome")},{"./dist/is-chrome":4}],20:[function(e,n,a){n.exports=e("./dist/is-ios-safari")},{"./dist/is-ios-safari":9}],21:[function(e,n,a){n.exports=e("./dist/is-ios-webview")},{"./dist/is-ios-webview":10}],22:[function(e,n,a){n.exports=e("./dist/is-ios-wkwebview")},{"./dist/is-ios-wkwebview":11}],23:[function(e,n,a){n.exports=e("./dist/is-ios")},{"./dist/is-ios":12}],24:[function(e,n,a){n.exports=e("./dist/is-samsung")},{"./dist/is-samsung":15}],25:[function(e,n,a){n.exports=e("./dist/supports-popups")},{"./dist/supports-popups":17}],26:[function(e,n,a){var i=typeof Promise!="undefined"?Promise:null,s=function(){function o(c){var l=this;if(typeof c=="function"){this._promise=new o.Promise(c);return}this._promise=new o.Promise(function(d,u){l._resolveFunction=d,l._rejectFunction=u}),c=c||{},this._onResolve=c.onResolve||o.defaultOnResolve,this._onReject=c.onReject||o.defaultOnReject,o.shouldCatchExceptions(c)&&this._promise.catch(function(){}),this._resetState()}return o.defaultOnResolve=function(c){return o.Promise.resolve(c)},o.defaultOnReject=function(c){return o.Promise.reject(c)},o.setPromise=function(c){o.Promise=c},o.shouldCatchExceptions=function(c){return c.hasOwnProperty("suppressUnhandledPromiseMessage")?!!c.suppressUnhandledPromiseMessage:!!o.suppressUnhandledPromiseMessage},o.all=function(c){return o.Promise.all(c)},o.allSettled=function(c){return o.Promise.allSettled(c)},o.race=function(c){return o.Promise.race(c)},o.reject=function(c){return o.Promise.reject(c)},o.resolve=function(c){return o.Promise.resolve(c)},o.prototype.then=function(){for(var c,l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];return(c=this._promise).then.apply(c,l)},o.prototype.catch=function(){for(var c,l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];return(c=this._promise).catch.apply(c,l)},o.prototype.resolve=function(c){var l=this;return this.isFulfilled?this:(this._setResolved(),o.Promise.resolve().then(function(){return l._onResolve(c)}).then(function(d){l._resolveFunction(d)}).catch(function(d){l._resetState(),l.reject(d)}),this)},o.prototype.reject=function(c){var l=this;return this.isFulfilled?this:(this._setRejected(),o.Promise.resolve().then(function(){return l._onReject(c)}).then(function(d){l._setResolved(),l._resolveFunction(d)}).catch(function(d){return l._rejectFunction(d)}),this)},o.prototype._resetState=function(){this.isFulfilled=!1,this.isResolved=!1,this.isRejected=!1},o.prototype._setResolved=function(){this.isFulfilled=!0,this.isResolved=!0,this.isRejected=!1},o.prototype._setRejected=function(){this.isFulfilled=!0,this.isResolved=!1,this.isRejected=!0},o.Promise=i,o}();n.exports=s},{}],27:[function(e,n,a){var i=e("./lib/set-attributes"),s=e("./lib/default-attributes"),o=e("./lib/assign");n.exports=function(l){l===void 0&&(l={});var d=document.createElement("iframe"),u=(0,o.assign)({},s.defaultAttributes,l);return u.style&&typeof u.style!="string"&&((0,o.assign)(d.style,u.style),delete u.style),(0,i.setAttributes)(d,u),d.getAttribute("id")||(d.id=d.name),d}},{"./lib/assign":28,"./lib/default-attributes":29,"./lib/set-attributes":30}],28:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.assign=void 0;function i(s){for(var o=[],c=1;c<arguments.length;c++)o[c-1]=arguments[c];return o.forEach(function(l){typeof l=="object"&&Object.keys(l).forEach(function(d){s[d]=l[d]})}),s}a.assign=i},{}],29:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.defaultAttributes=void 0,a.defaultAttributes={src:"about:blank",frameBorder:0,allowtransparency:!0,scrolling:"no"}},{}],30:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.setAttributes=void 0;function i(s,o){for(var c in o)if(o.hasOwnProperty(c)){var l=o[c];l==null?s.removeAttribute(c):s.setAttribute(c,l)}}a.setAttributes=i},{}],31:[function(e,n,a){function i(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var o=Math.random()*16|0,c=s==="x"?o:o&3|8;return c.toString(16)})}n.exports=i},{}],32:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){return function(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];setTimeout(function(){try{s.apply(void 0,o)}catch(l){console.log("Error in callback function"),console.log(l)}},1)}}a.deferred=i},{}],33:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){var o=!1;return function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];o||(o=!0,s.apply(void 0,c))}}a.once=i},{}],34:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s,o){if(!o)return s;s.then(function(c){return o(null,c)}).catch(function(c){return o(c)})}a.promiseOrCallback=i},{}],35:[function(e,n,a){var i=e("./lib/deferred"),s=e("./lib/once"),o=e("./lib/promise-or-callback");function c(l){return function(){for(var d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];var h,p=d[d.length-1];return typeof p=="function"&&(h=d.pop(),h=s.once(i.deferred(h))),o.promiseOrCallback(l.apply(this,d),h)}}c.wrapPrototype=function(l,d){d===void 0&&(d={});var u=d.ignoreMethods||[],h=d.transformPrivateMethods===!0,p=Object.getOwnPropertyNames(l.prototype).filter(function(f){var m,v=f!=="constructor"&&typeof l.prototype[f]=="function",b=u.indexOf(f)===-1;return h?m=!0:m=f.charAt(0)!=="_",v&&m&&b});return p.forEach(function(f){var m=l.prototype[f];l.prototype[f]=c(m)}),l},n.exports=c},{"./lib/deferred":32,"./lib/once":33,"./lib/promise-or-callback":34}],36:[function(e,n,a){(function(i,s){typeof a=="object"&&typeof n!="undefined"?s(a):(i=typeof globalThis!="undefined"?globalThis:i||self,s(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
236
+ ***************************************************************************** */function s(y,T,_,P){function D(w){return w instanceof _?w:new _(function(z){z(w)})}return new(_||(_=Promise))(function(w,z){function Z(te){try{S(P.next(te))}catch(we){z(we)}}function le(te){try{S(P.throw(te))}catch(we){z(we)}}function S(te){te.done?w(te.value):D(te.value).then(Z,le)}S((P=P.apply(y,[])).next())})}function o(y,T){var _={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},P,D,w,z;return z={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(z[Symbol.iterator]=function(){return this}),z;function Z(S){return function(te){return le([S,te])}}function le(S){if(P)throw new TypeError("Generator is already executing.");for(;_;)try{if(P=1,D&&(w=S[0]&2?D.return:S[0]?D.throw||((w=D.return)&&w.call(D),0):D.next)&&!(w=w.call(D,S[1])).done)return w;switch(D=0,w&&(S=[S[0]&2,w.value]),S[0]){case 0:case 1:w=S;break;case 4:return _.label++,{value:S[1],done:!1};case 5:_.label++,D=S[1],S=[0];continue;case 7:S=_.ops.pop(),_.trys.pop();continue;default:if(w=_.trys,!(w=w.length>0&&w[w.length-1])&&(S[0]===6||S[0]===2)){_=0;continue}if(S[0]===3&&(!w||S[1]>w[0]&&S[1]<w[3])){_.label=S[1];break}if(S[0]===6&&_.label<w[1]){_.label=w[1],w=S;break}if(w&&_.label<w[2]){_.label=w[2],_.ops.push(S);break}w[2]&&_.ops.pop(),_.trys.pop();continue}S=T.call(y,_)}catch(te){S=[6,te],D=0}finally{P=w=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}}var c={},l={};function d(y){var T,_=JSON.stringify(y);if(!y.forceScriptReload&&(T=l[_],T))return T;var P=document.createElement("script"),D=y.dataAttributes||{},w=y.container||document.head;return P.src=y.src,P.id=y.id||"",P.async=!0,y.type&&P.setAttribute("type","".concat(y.type)),y.crossorigin&&P.setAttribute("crossorigin","".concat(y.crossorigin)),Object.keys(D).forEach(function(z){P.setAttribute("data-".concat(z),"".concat(D[z]))}),T=new Promise(function(z,Z){P.addEventListener("load",function(){z(P)}),P.addEventListener("error",function(){Z(new Error("".concat(y.src," failed to load.")))}),P.addEventListener("abort",function(){Z(new Error("".concat(y.src," has aborted.")))}),w.appendChild(P)}),l[_]=T,T}d.clearCache=function(){l={}};var u=d,h=function(T){var _=document.querySelector('link[href="'.concat(T.href,'"]'));if(_)return Promise.resolve(_);_=document.createElement("link");var P=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),P.firstChild?P.insertBefore(_,P.firstChild):P.appendChild(_),Promise.resolve(_)};Object.defineProperty(c,"__esModule",{value:!0}),c.loadStylesheet=f=c.loadScript=void 0;var p=u,f=c.loadScript=p,m=h;c.loadStylesheet=m;var v="https://www.paypalobjects.com",b={minified:"axo.min",unminified:"axo"},C="fastlane",x="connect-boba",N="".concat(x,"/locales/"),I={AXO_ASSET_NAME:b,AXO_ASSET_PATH:x,LOCALE_PATH:N,CDNX_PROD:v},L={BT:"BT",PPCP:"PPCP"};function O(){return typeof window.define=="function"&&!!window.define.amd}function k(){return O()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function B(y,T,_){var P,D;return _===void 0&&(_=!0),s(this,void 0,void 0,function(){var w,z;return o(this,function(Z){if(w=$(),w&&w[y.module]){if(T&&((P=w[y.module])===null||P===void 0?void 0:P.VERSION)!==T)throw z=(D=w[y.module])===null||D===void 0?void 0:D.VERSION,new Error("".concat(y.module," already loaded with version ").concat(z," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(y.module," without specifying version"));return[2,W(y,T,_)]})})}function W(y,T,_){if(_===void 0&&(_=!0),O()){var P=_?y.amdModule.minified:y.amdModule.unminified;return new Promise(function(w,z){window.require([P],w,z)})}var D=_?y.script.minified:y.script.unminified;return f({id:"".concat(y.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(D)})}function $(){return window==null?void 0:window.braintree}var F,j,H={Client:"client",HostedCardFields:"hostedFields"},ee="braintree",M=(F={},F[H.Client]="client",F[H.HostedCardFields]="hosted-fields",F),q=(j={},j[H.Client]={id:"client",module:H.Client,amdModule:{unminified:"".concat(ee,"/").concat(M[H.Client]),minified:"".concat(ee,"/").concat(M[H.Client],".min")},script:{unminified:"".concat(M[H.Client],".js"),minified:"".concat(M[H.Client],".min.js")}},j[H.HostedCardFields]={id:"hcf",module:H.HostedCardFields,amdModule:{unminified:"".concat(ee,"/").concat(M[H.HostedCardFields]),minified:"".concat(ee,"/").concat(M[H.HostedCardFields],".min")},script:{unminified:"".concat(M[H.HostedCardFields],".js"),minified:"".concat(M[H.HostedCardFields],".min.js")}},j);function Y(y){return s(this,void 0,void 0,function(){var T,_,P,D;return o(this,function(w){switch(w.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=y.btSdkVersion,_=y.minified,P=R(y),D=V(y),y.platform!==L.BT?[3,2]:[4,Promise.all([B(q.hostedFields,T,_),E(P,_)])];case 1:return w.sent(),[3,5];case 2:return y.platform!==L.PPCP?[3,4]:[4,Promise.all([B(q.client,T,_),B(q.hostedFields,T,_),E(P,_)])];case 3:return w.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:D}}]}})})}function E(y,T){var _;if(T===void 0&&(T=!0),O()){k()&&requirejs.config({paths:(_={},_[C]=y,_)});var P="".concat(C,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(D,w){window.require([P],D,w)})}return f({id:"axo-id",src:y,forceScriptReload:!0})}function g(y){var T=y.assetUrl,_=y.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function R(y){var T,_=(y==null?void 0:y.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,P=O()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:P,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(y){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=Y})},{}],8:[function(e,n,a){var i=e("../lib/braintree-error");n.exports={DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS:{type:i.types.MERCHANT,code:"DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS",message:"Data Collector must be created with Kount and/or PayPal."}}},{"../lib/braintree-error":13}],9:[function(e,n,a){var i=e("../lib/constants").FRAUDNET_FNCLS,s=e("../lib/constants").FRAUDNET_SOURCE,o=e("../lib/constants").FRAUDNET_URL,c=e("../lib/assets").loadScript,l=32,d;function u(b){var C=new p;return b=b||{},!b.sessionId&&d?(C.sessionId=d,Promise.resolve(C)):C.initialize(b)}function h(){d=null}function p(){}p.prototype.initialize=function(b){var C=b.environment,x=this;return this.sessionId=b.sessionId||b.clientSessionId,this.sessionId&&(this.sessionId=this.sessionId.substring(0,l)),b.sessionId||(d=this.sessionId),this._beaconId=m(this.sessionId),this._parameterBlock=v(this.sessionId,this._beaconId,C,b.cb1),c({src:o}).then(function(N){return x._thirdPartyBlock=N,x}).catch(function(){return null})},p.prototype.teardown=function(){f(document.querySelector('iframe[title="ppfniframe"]')),f(document.querySelector('iframe[title="pbf"]')),f(this._parameterBlock),f(this._thirdPartyBlock)};function f(b){b&&b.parentNode&&b.parentNode.removeChild(b)}function m(b){var C=new Date().getTime()/1e3;return"https://b.stats.paypal.com/counter.cgi?i=127.0.0.1&p="+b+"&t="+C+"&a=14"}function v(b,C,x,N){var I=document.body.appendChild(document.createElement("script")),L={f:b,s,b:C,cb1:N};return x!=="production"&&(L.sandbox=!0),I.type="application/json",I.setAttribute("fncls",i),I.text=JSON.stringify(L),I}n.exports={setup:u,clearSessionIdCache:h}},{"../lib/assets":11,"../lib/constants":14}],10:[function(e,n,a){var i=e("./fraudnet"),s=e("../lib/braintree-error"),o=e("../lib/basic-component-verification"),c=e("../lib/create-deferred-client"),l=e("../lib/create-assets-url"),d=e("../lib/methods"),u=e("../lib/convert-methods-to-error"),h="3.126.0",p=e("@braintree/wrap-promise"),f=e("./errors");function m(C){var x="Data Collector",N={_instances:[]},I={};return o.verify({name:x,client:C.client,authorization:C.authorization}).then(function(){return N._instantiatedWithAClient=!C.useDeferredClient,N._createPromise=c.create({authorization:C.authorization,client:C.client,debug:C.debug,assetsUrl:l.create(C.authorization),name:x}).then(function(L){var O=L.getConfiguration();return i.setup({sessionId:C.riskCorrelationId||C.clientMetadataId||C.correlationId,clientSessionId:O.analyticsMetadata.sessionId,environment:O.gatewayConfiguration.environment,cb1:C.cb1}).then(function(k){k&&(I.correlation_id=k.sessionId,N._instances.push(k))})}).then(function(){return N._instances.length===0?Promise.reject(new s(f.DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS)):(N.deviceData=JSON.stringify(I),N.rawDeviceData=I,N)}),N.teardown=v(N),N.getDeviceData=b(N),N._instantiatedWithAClient?N._createPromise:N})}function v(C){return p(function(){return C._createPromise.then(function(){C._instances.forEach(function(N){N&&N.teardown()}),u(C,d(C))})})}function b(C){return p(function(N){return N=N||{},C._createPromise.then(function(){return N.raw?Promise.resolve(C.rawDeviceData):Promise.resolve(C.deviceData)})})}n.exports={create:p(m),VERSION:h}},{"../lib/basic-component-verification":12,"../lib/braintree-error":13,"../lib/convert-methods-to-error":15,"../lib/create-assets-url":16,"../lib/create-deferred-client":17,"../lib/methods":20,"./errors":8,"./fraudnet":9,"@braintree/wrap-promise":6}],11:[function(e,n,a){var i=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:i,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":7}],12:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors"),o="3.126.0";function c(l){var d,u,h;return l?(h=l.name,d=l.client,u=l.authorization,!d&&!u?Promise.reject(new i({type:s.INSTANTIATION_OPTION_REQUIRED.type,code:s.INSTANTIATION_OPTION_REQUIRED.code,message:"options.client is required when instantiating "+h+"."})):!u&&d.getVersion()!==o?Promise.reject(new i({type:s.INCOMPATIBLE_VERSIONS.type,code:s.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+d.getVersion()+") and "+h+" (version "+o+") components must be from the same SDK version."})):Promise.resolve()):Promise.reject(new i({type:s.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:s.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:"Options must be passed to basicComponentVerification function."}))}n.exports={verify:c}},{"./braintree-error":13,"./errors":19}],13:[function(e,n,a){var i=e("./enumerate");function s(o){if(!s.types.hasOwnProperty(o.type))throw new Error(o.type+" is not a valid type.");if(!o.code)throw new Error("Error code required.");if(!o.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=o.code,this.message=o.message,this.type=o.type,this.details=o.details}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":18}],14:[function(e,n,a){var i="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},c={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},l={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:c,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:l,INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],15:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors");n.exports=function(o,c){c.forEach(function(l){o[l]=function(){throw new i({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:l+" cannot be called after teardown."})}})}},{"./braintree-error":13,"./errors":19}],16:[function(e,n,a){var i=e("./constants").ASSETS_URLS;function s(o){return i.production}n.exports={create:s}},{"./constants":14}],17:[function(e,n,a){var i=e("./braintree-error"),s=e("./assets"),o=e("./errors"),c="3.126.0";function l(d){var u=Promise.resolve();return d.client?Promise.resolve(d.client):(window.braintree&&window.braintree.client||(u=s.loadScript({src:d.assetsUrl+"/web/"+c+"/js/client.min.js"}).catch(function(h){return Promise.reject(new i({type:o.CLIENT_SCRIPT_FAILED_TO_LOAD.type,code:o.CLIENT_SCRIPT_FAILED_TO_LOAD.code,message:o.CLIENT_SCRIPT_FAILED_TO_LOAD.message,details:{originalError:h}}))})),u.then(function(){return window.braintree.client.VERSION!==c?Promise.reject(new i({type:o.INCOMPATIBLE_VERSIONS.type,code:o.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+window.braintree.client.VERSION+") and "+d.name+" (version "+c+") components must be from the same SDK version."})):window.braintree.client.create({authorization:d.authorization,debug:d.debug})}))}n.exports={create:l}},{"./assets":11,"./braintree-error":13,"./errors":19}],18:[function(e,n,a){function i(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}n.exports=i},{}],19:[function(e,n,a){var i=e("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:i.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:i.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:i.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:i.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":13}],20:[function(e,n,a){n.exports=function(i){return Object.keys(i).filter(function(s){return typeof i[s]=="function"})}},{}]},{},[10])(10)})}(Pn)),Pn.exports}var zi=Ml();const Dl=ve({__proto__:null,default:Cn(zi)},[zi]);var Ln={exports:{}},ji;function Vl(){return ji||(ji=1,function(r,t){(function(e){r.exports=e()})(function(){return function(){function e(n,a,i){function s(l,d){if(!a[l]){if(!n[l]){var u=typeof Ee=="function"&&Ee;if(!d&&u)return u(l,!0);if(o)return o(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var p=a[l]={exports:{}};n[l][0].call(p.exports,function(f){var m=n[l][1][f];return s(m||f)},p,p.exports,e,n,a,i)}return a[l].exports}for(var o=typeof Ee=="function"&&Ee,c=0;c<i.length;c++)s(i[c]);return s}return e}()({1:[function(e,n,a){var i={};function s(o){var c,l=JSON.stringify(o);if(!o.forceScriptReload&&(c=i[l],c))return c;var d=document.createElement("script"),u=o.dataAttributes||{},h=o.container||document.head;return d.src=o.src,d.id=o.id||"",d.async=!0,o.type&&d.setAttribute("type","".concat(o.type)),o.crossorigin&&d.setAttribute("crossorigin","".concat(o.crossorigin)),o.integrity&&d.setAttribute("integrity","".concat(o.integrity)),Object.keys(u).forEach(function(p){d.setAttribute("data-".concat(p),"".concat(u[p]))}),c=new Promise(function(p,f){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){f(new Error("".concat(o.src," failed to load.")))}),d.addEventListener("abort",function(){f(new Error("".concat(o.src," has aborted.")))}),h.appendChild(d)}),i[l]=c,c}s.clearCache=function(){i={}},n.exports=s},{}],2:[function(e,n,a){n.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,/Android/i.test(s)}},{}],4:[function(e,n,a){var i=e("./is-edge"),s=e("./is-samsung"),o=e("./is-duckduckgo"),c=e("./is-opera"),l=e("./is-silk");n.exports=function(u){return u=u||window.navigator.userAgent,(u.indexOf("Chrome")!==-1||u.indexOf("CriOS")!==-1)&&!i(u)&&!s(u)&&!o(u)&&!c(u)&&!l(u)}},{"./is-duckduckgo":5,"./is-edge":6,"./is-opera":14,"./is-samsung":15,"./is-silk":16}],5:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("DuckDuckGo/")!==-1}},{}],6:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Edge/")!==-1||s.indexOf("Edg/")!==-1}},{}],7:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,/FxiOS/i.test(s)}},{}],8:[function(e,n,a){var i=e("./is-ios");function s(o){return/\bGSA\b/.test(o)}n.exports=function(c){return c=c||window.navigator.userAgent,i(c)&&s(c)}},{"./is-ios":12}],9:[function(e,n,a){var i=e("./is-ios"),s=e("./is-ios-firefox"),o=/webkit/i;function c(u){return o.test(u)}function l(u){return u.indexOf("CriOS")>-1}function d(u){return u.indexOf("FBAN")>-1}n.exports=function(h){return h=h||window.navigator.userAgent,i(h)&&c(h)&&!l(h)&&!s(h)&&!d(h)}},{"./is-ios":12,"./is-ios-firefox":7}],10:[function(e,n,a){var i=e("./is-ios"),s=e("./is-ios-google-search-app");n.exports=function(c){return c=c||window.navigator.userAgent,i(c)?s(c)?!0:/.+AppleWebKit(?!.*Safari)/i.test(c):!1}},{"./is-ios":12,"./is-ios-google-search-app":8}],11:[function(e,n,a){var i=e("./is-ios-webview");n.exports=function(o,c){return c=typeof c!="undefined"?c:window.statusbar.visible,i(o)&&c}},{"./is-ios-webview":10}],12:[function(e,n,a){var i=e("./is-ipados");n.exports=function(o,c,l){c===void 0&&(c=!0),o=o||window.navigator.userAgent;var d=/iPhone|iPod|iPad/i.test(o);return c?d||i(o,l):d}},{"./is-ipados":13}],13:[function(e,n,a){n.exports=function(s,o){return s=s||window.navigator.userAgent,o=o||window.document,/Mac|iPad/i.test(s)&&"ontouchend"in o}},{}],14:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("OPR/")!==-1||s.indexOf("Opera/")!==-1||s.indexOf("OPT/")!==-1}},{}],15:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,/SamsungBrowser/i.test(s)}},{}],16:[function(e,n,a){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Silk/")!==-1}},{}],17:[function(e,n,a){var i=48,s=e("./is-android"),o=e("./is-ios-firefox"),c=e("./is-ios-webview"),l=e("./is-chrome"),d=e("./is-samsung"),u=e("./is-duckduckgo");function h(v){v=v||window.navigator.userAgent;var b=v.match(/CriOS\/(\d+)\./);if(!b)return!1;var C=parseInt(b[1],10);return C<i}function p(v){return v=v||window.navigator.userAgent,v.indexOf("Opera Mini")>-1}function f(v){var b=/Version\/[\d.]+/i;return v=v||window.navigator.userAgent,s(v)?b.test(v)&&!p(v)&&!u(v):!1}function m(v){return!l(v)&&!d(v)&&/samsung/i.test(v)}n.exports=function(b){return b=b||window.navigator.userAgent,!(c(b)||o(b)||f(b)||p(b)||h(b)||m(b))}},{"./is-android":3,"./is-chrome":4,"./is-duckduckgo":5,"./is-ios-firefox":7,"./is-ios-webview":10,"./is-samsung":15}],18:[function(e,n,a){n.exports=e("./dist/is-android")},{"./dist/is-android":3}],19:[function(e,n,a){n.exports=e("./dist/is-chrome")},{"./dist/is-chrome":4}],20:[function(e,n,a){n.exports=e("./dist/is-ios-safari")},{"./dist/is-ios-safari":9}],21:[function(e,n,a){n.exports=e("./dist/is-ios-webview")},{"./dist/is-ios-webview":10}],22:[function(e,n,a){n.exports=e("./dist/is-ios-wkwebview")},{"./dist/is-ios-wkwebview":11}],23:[function(e,n,a){n.exports=e("./dist/is-ios")},{"./dist/is-ios":12}],24:[function(e,n,a){n.exports=e("./dist/is-samsung")},{"./dist/is-samsung":15}],25:[function(e,n,a){n.exports=e("./dist/supports-popups")},{"./dist/supports-popups":17}],26:[function(e,n,a){var i=typeof Promise!="undefined"?Promise:null,s=function(){function o(c){var l=this;if(typeof c=="function"){this._promise=new o.Promise(c);return}this._promise=new o.Promise(function(d,u){l._resolveFunction=d,l._rejectFunction=u}),c=c||{},this._onResolve=c.onResolve||o.defaultOnResolve,this._onReject=c.onReject||o.defaultOnReject,o.shouldCatchExceptions(c)&&this._promise.catch(function(){}),this._resetState()}return o.defaultOnResolve=function(c){return o.Promise.resolve(c)},o.defaultOnReject=function(c){return o.Promise.reject(c)},o.setPromise=function(c){o.Promise=c},o.shouldCatchExceptions=function(c){return c.hasOwnProperty("suppressUnhandledPromiseMessage")?!!c.suppressUnhandledPromiseMessage:!!o.suppressUnhandledPromiseMessage},o.all=function(c){return o.Promise.all(c)},o.allSettled=function(c){return o.Promise.allSettled(c)},o.race=function(c){return o.Promise.race(c)},o.reject=function(c){return o.Promise.reject(c)},o.resolve=function(c){return o.Promise.resolve(c)},o.prototype.then=function(){for(var c,l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];return(c=this._promise).then.apply(c,l)},o.prototype.catch=function(){for(var c,l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];return(c=this._promise).catch.apply(c,l)},o.prototype.resolve=function(c){var l=this;return this.isFulfilled?this:(this._setResolved(),o.Promise.resolve().then(function(){return l._onResolve(c)}).then(function(d){l._resolveFunction(d)}).catch(function(d){l._resetState(),l.reject(d)}),this)},o.prototype.reject=function(c){var l=this;return this.isFulfilled?this:(this._setRejected(),o.Promise.resolve().then(function(){return l._onReject(c)}).then(function(d){l._setResolved(),l._resolveFunction(d)}).catch(function(d){return l._rejectFunction(d)}),this)},o.prototype._resetState=function(){this.isFulfilled=!1,this.isResolved=!1,this.isRejected=!1},o.prototype._setResolved=function(){this.isFulfilled=!0,this.isResolved=!0,this.isRejected=!1},o.prototype._setRejected=function(){this.isFulfilled=!0,this.isResolved=!1,this.isRejected=!0},o.Promise=i,o}();n.exports=s},{}],27:[function(e,n,a){var i=e("./lib/set-attributes"),s=e("./lib/default-attributes"),o=e("./lib/assign");n.exports=function(l){l===void 0&&(l={});var d=document.createElement("iframe"),u=(0,o.assign)({},s.defaultAttributes,l);return u.style&&typeof u.style!="string"&&((0,o.assign)(d.style,u.style),delete u.style),(0,i.setAttributes)(d,u),d.getAttribute("id")||(d.id=d.name),d}},{"./lib/assign":28,"./lib/default-attributes":29,"./lib/set-attributes":30}],28:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.assign=void 0;function i(s){for(var o=[],c=1;c<arguments.length;c++)o[c-1]=arguments[c];return o.forEach(function(l){typeof l=="object"&&Object.keys(l).forEach(function(d){s[d]=l[d]})}),s}a.assign=i},{}],29:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.defaultAttributes=void 0,a.defaultAttributes={src:"about:blank",frameBorder:0,allowtransparency:!0,scrolling:"no"}},{}],30:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.setAttributes=void 0;function i(s,o){for(var c in o)if(o.hasOwnProperty(c)){var l=o[c];l==null?s.removeAttribute(c):s.setAttribute(c,l)}}a.setAttributes=i},{}],31:[function(e,n,a){function i(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var o=Math.random()*16|0,c=s==="x"?o:o&3|8;return c.toString(16)})}n.exports=i},{}],32:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){return function(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];setTimeout(function(){try{s.apply(void 0,o)}catch(l){console.log("Error in callback function"),console.log(l)}},1)}}a.deferred=i},{}],33:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s){var o=!1;return function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];o||(o=!0,s.apply(void 0,c))}}a.once=i},{}],34:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(s,o){if(!o)return s;s.then(function(c){return o(null,c)}).catch(function(c){return o(c)})}a.promiseOrCallback=i},{}],35:[function(e,n,a){var i=e("./lib/deferred"),s=e("./lib/once"),o=e("./lib/promise-or-callback");function c(l){return function(){for(var d=[],u=0;u<arguments.length;u++)d[u]=arguments[u];var h,p=d[d.length-1];return typeof p=="function"&&(h=d.pop(),h=s.once(i.deferred(h))),o.promiseOrCallback(l.apply(this,d),h)}}c.wrapPrototype=function(l,d){d===void 0&&(d={});var u=d.ignoreMethods||[],h=d.transformPrivateMethods===!0,p=Object.getOwnPropertyNames(l.prototype).filter(function(f){var m,v=f!=="constructor"&&typeof l.prototype[f]=="function",b=u.indexOf(f)===-1;return h?m=!0:m=f.charAt(0)!=="_",v&&m&&b});return p.forEach(function(f){var m=l.prototype[f];l.prototype[f]=c(m)}),l},n.exports=c},{"./lib/deferred":32,"./lib/once":33,"./lib/promise-or-callback":34}],36:[function(e,n,a){(function(i,s){typeof a=="object"&&typeof n!="undefined"?s(a):(i=typeof globalThis!="undefined"?globalThis:i||self,s(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
237
237
  Copyright (c) Microsoft Corporation.
238
238
 
239
239
  Permission to use, copy, modify, and/or distribute this software for any
@@ -246,7 +246,7 @@ ${m}::-ms-input-placeholder{${f}}
246
246
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
247
247
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
248
248
  PERFORMANCE OF THIS SOFTWARE.
249
- ***************************************************************************** */function s(y,T,_,P){function D(C){return C instanceof _?C:new _(function(z){z(C)})}return new(_||(_=Promise))(function(C,z){function Z(te){try{k(P.next(te))}catch(we){z(we)}}function le(te){try{k(P.throw(te))}catch(we){z(we)}}function k(te){te.done?C(te.value):D(te.value).then(Z,le)}k((P=P.apply(y,[])).next())})}function o(y,T){var _={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},P,D,C,z;return z={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(z[Symbol.iterator]=function(){return this}),z;function Z(k){return function(te){return le([k,te])}}function le(k){if(P)throw new TypeError("Generator is already executing.");for(;_;)try{if(P=1,D&&(C=k[0]&2?D.return:k[0]?D.throw||((C=D.return)&&C.call(D),0):D.next)&&!(C=C.call(D,k[1])).done)return C;switch(D=0,C&&(k=[k[0]&2,C.value]),k[0]){case 0:case 1:C=k;break;case 4:return _.label++,{value:k[1],done:!1};case 5:_.label++,D=k[1],k=[0];continue;case 7:k=_.ops.pop(),_.trys.pop();continue;default:if(C=_.trys,!(C=C.length>0&&C[C.length-1])&&(k[0]===6||k[0]===2)){_=0;continue}if(k[0]===3&&(!C||k[1]>C[0]&&k[1]<C[3])){_.label=k[1];break}if(k[0]===6&&_.label<C[1]){_.label=C[1],C=k;break}if(C&&_.label<C[2]){_.label=C[2],_.ops.push(k);break}C[2]&&_.ops.pop(),_.trys.pop();continue}k=T.call(y,_)}catch(te){k=[6,te],D=0}finally{P=C=0}if(k[0]&5)throw k[1];return{value:k[0]?k[1]:void 0,done:!0}}}var c={},l={};function d(y){var T,_=JSON.stringify(y);if(!y.forceScriptReload&&(T=l[_],T))return T;var P=document.createElement("script"),D=y.dataAttributes||{},C=y.container||document.head;return P.src=y.src,P.id=y.id||"",P.async=!0,y.type&&P.setAttribute("type","".concat(y.type)),y.crossorigin&&P.setAttribute("crossorigin","".concat(y.crossorigin)),Object.keys(D).forEach(function(z){P.setAttribute("data-".concat(z),"".concat(D[z]))}),T=new Promise(function(z,Z){P.addEventListener("load",function(){z(P)}),P.addEventListener("error",function(){Z(new Error("".concat(y.src," failed to load.")))}),P.addEventListener("abort",function(){Z(new Error("".concat(y.src," has aborted.")))}),C.appendChild(P)}),l[_]=T,T}d.clearCache=function(){l={}};var u=d,h=function(T){var _=document.querySelector('link[href="'.concat(T.href,'"]'));if(_)return Promise.resolve(_);_=document.createElement("link");var P=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),P.firstChild?P.insertBefore(_,P.firstChild):P.appendChild(_),Promise.resolve(_)};Object.defineProperty(c,"__esModule",{value:!0}),c.loadStylesheet=f=c.loadScript=void 0;var p=u,f=c.loadScript=p,m=h;c.loadStylesheet=m;var v="https://www.paypalobjects.com",b={minified:"axo.min",unminified:"axo"},w="fastlane",x="connect-boba",O="".concat(x,"/locales/"),I={AXO_ASSET_NAME:b,AXO_ASSET_PATH:x,LOCALE_PATH:O,CDNX_PROD:v},L={BT:"BT",PPCP:"PPCP"};function N(){return typeof window.define=="function"&&!!window.define.amd}function S(){return N()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function B(y,T,_){var P,D;return _===void 0&&(_=!0),s(this,void 0,void 0,function(){var C,z;return o(this,function(Z){if(C=$(),C&&C[y.module]){if(T&&((P=C[y.module])===null||P===void 0?void 0:P.VERSION)!==T)throw z=(D=C[y.module])===null||D===void 0?void 0:D.VERSION,new Error("".concat(y.module," already loaded with version ").concat(z," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(y.module," without specifying version"));return[2,G(y,T,_)]})})}function G(y,T,_){if(_===void 0&&(_=!0),N()){var P=_?y.amdModule.minified:y.amdModule.unminified;return new Promise(function(C,z){window.require([P],C,z)})}var D=_?y.script.minified:y.script.unminified;return f({id:"".concat(y.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(D)})}function $(){return window==null?void 0:window.braintree}var F,j,H={Client:"client",HostedCardFields:"hostedFields"},ee="braintree",M=(F={},F[H.Client]="client",F[H.HostedCardFields]="hosted-fields",F),q=(j={},j[H.Client]={id:"client",module:H.Client,amdModule:{unminified:"".concat(ee,"/").concat(M[H.Client]),minified:"".concat(ee,"/").concat(M[H.Client],".min")},script:{unminified:"".concat(M[H.Client],".js"),minified:"".concat(M[H.Client],".min.js")}},j[H.HostedCardFields]={id:"hcf",module:H.HostedCardFields,amdModule:{unminified:"".concat(ee,"/").concat(M[H.HostedCardFields]),minified:"".concat(ee,"/").concat(M[H.HostedCardFields],".min")},script:{unminified:"".concat(M[H.HostedCardFields],".js"),minified:"".concat(M[H.HostedCardFields],".min.js")}},j);function Y(y){return s(this,void 0,void 0,function(){var T,_,P,D;return o(this,function(C){switch(C.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=y.btSdkVersion,_=y.minified,P=R(y),D=V(y),y.platform!==L.BT?[3,2]:[4,Promise.all([B(q.hostedFields,T,_),E(P,_)])];case 1:return C.sent(),[3,5];case 2:return y.platform!==L.PPCP?[3,4]:[4,Promise.all([B(q.client,T,_),B(q.hostedFields,T,_),E(P,_)])];case 3:return C.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:D}}]}})})}function E(y,T){var _;if(T===void 0&&(T=!0),N()){S()&&requirejs.config({paths:(_={},_[w]=y,_)});var P="".concat(w,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(D,C){window.require([P],D,C)})}return f({id:"axo-id",src:y,forceScriptReload:!0})}function g(y){var T=y.assetUrl,_=y.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function R(y){var T,_=(y==null?void 0:y.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,P=N()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:P,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(y){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=Y})},{}],37:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Framebus=void 0;var i=e("./lib"),s=typeof window!="undefined"&&window.Promise,o=function(){function c(l){l===void 0&&(l={}),this.origin=l.origin||"*",this.channel=l.channel||"",this.verifyDomain=l.verifyDomain,this.targetFrames=l.targetFrames||[],this.limitBroadcastToFramesArray=!!l.targetFrames,this.isDestroyed=!1,this.listeners=[],this.hasAdditionalChecksForOnListeners=!!(this.verifyDomain||this.limitBroadcastToFramesArray)}return c.setPromise=function(l){c.Promise=l},c.target=function(l){return new c(l)},c.prototype.addTargetFrame=function(l){this.limitBroadcastToFramesArray&&this.targetFrames.push(l)},c.prototype.include=function(l){return l==null||l.Window==null||l.constructor!==l.Window?!1:(i.childWindows.push(l),!0)},c.prototype.target=function(l){return c.target(l)},c.prototype.emit=function(l,d,u){if(this.isDestroyed)return!1;var h=this.origin;if(l=this.namespaceEvent(l),(0,i.isntString)(l)||(0,i.isntString)(h))return!1;typeof d=="function"&&(u=d,d=void 0);var p=(0,i.packagePayload)(l,h,d,u);return p?(this.limitBroadcastToFramesArray?this.targetFramesAsWindows().forEach(function(f){(0,i.sendMessage)(f,p,h)}):(0,i.broadcast)(p,{origin:h,frame:window.top||window.self}),!0):!1},c.prototype.emitAsPromise=function(l,d){var u=this;return new c.Promise(function(h,p){var f=u.emit(l,d,function(m){h(m)});f||p(new Error('Listener not added for "'.concat(l,'"')))})},c.prototype.on=function(l,d){if(this.isDestroyed)return!1;var u=this,h=this.origin,p=d;return l=this.namespaceEvent(l),(0,i.subscriptionArgsInvalid)(l,p,h)?!1:(this.hasAdditionalChecksForOnListeners&&(p=function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];u.passesVerifyDomainCheck(this&&this.origin)&&u.hasMatchingTargetFrame(this&&this.source)&&d.apply(void 0,f)}),this.listeners.push({eventName:l,handler:p,originalHandler:d}),i.subscribers[h]=i.subscribers[h]||{},i.subscribers[h][l]=i.subscribers[h][l]||[],i.subscribers[h][l].push(p),!0)},c.prototype.off=function(l,d){var u=d;if(this.isDestroyed)return!1;if(this.hasAdditionalChecksForOnListeners)for(var h=0;h<this.listeners.length;h++){var p=this.listeners[h];p.originalHandler===d&&(u=p.handler)}l=this.namespaceEvent(l);var f=this.origin;if((0,i.subscriptionArgsInvalid)(l,u,f))return!1;var m=i.subscribers[f]&&i.subscribers[f][l];if(!m)return!1;for(var h=0;h<m.length;h++)if(m[h]===u)return m.splice(h,1),!0;return!1},c.prototype.teardown=function(){if(!this.isDestroyed){this.isDestroyed=!0;for(var l=0;l<this.listeners.length;l++){var d=this.listeners[l];this.off(d.eventName,d.handler)}this.listeners.length=0}},c.prototype.passesVerifyDomainCheck=function(l){return this.verifyDomain?this.checkOrigin(l):!0},c.prototype.targetFramesAsWindows=function(){return this.limitBroadcastToFramesArray?this.targetFrames.map(function(l){return l instanceof HTMLIFrameElement?l.contentWindow:l}).filter(function(l){return l}):[]},c.prototype.hasMatchingTargetFrame=function(l){if(!this.limitBroadcastToFramesArray)return!0;var d=this.targetFramesAsWindows().find(function(u){return u===l});return!!d},c.prototype.checkOrigin=function(l){var d,u=document.createElement("a");u.href=location.href,u.protocol==="https:"?d=u.host.replace(/:443$/,""):u.protocol==="http:"?d=u.host.replace(/:80$/,""):d=u.host;var h=u.protocol+"//"+d;return h===l?!0:this.verifyDomain?this.verifyDomain(l):!0},c.prototype.namespaceEvent=function(l){return this.channel?"".concat(this.channel,":").concat(l):l},c.Promise=s,c}();a.Framebus=o},{"./lib":45}],38:[function(e,n,a){var i=e("./lib"),s=e("./framebus");(0,i.attach)(),n.exports=s.Framebus},{"./framebus":37,"./lib":45}],39:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.detach=a.attach=void 0;var i=e("./"),s=!1;function o(){s||typeof window=="undefined"||(s=!0,window.addEventListener("message",i.onMessage,!1))}a.attach=o;function c(){s=!1,window.removeEventListener("message",i.onMessage,!1)}a.detach=c},{"./":45}],40:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.broadcastToChildWindows=void 0;var i=e("./");function s(o,c,l){for(var d=i.childWindows.length-1;d>=0;d--){var u=i.childWindows[d];u.closed?i.childWindows.splice(d,1):l!==u&&(0,i.broadcast)(o,{origin:c,frame:u.top})}}a.broadcastToChildWindows=s},{"./":45}],41:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.broadcast=void 0;var i=e("./");function s(o,c){var l=0,d,u=c.origin,h=c.frame;try{for(h.postMessage(o,u),(0,i.hasOpener)(h)&&h.opener.top!==window.top&&s(o,{origin:u,frame:h.opener.top});d=h.frames[l];)s(o,{origin:u,frame:d}),l++}catch(p){}}a.broadcast=s},{"./":45}],42:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.subscribers=a.childWindows=a.prefix=void 0,a.prefix="/*framebus*/",a.childWindows=[],a.subscribers={}},{}],43:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.dispatch=void 0;var i=e("./");function s(o,c,l,d,u){if(i.subscribers[o]&&i.subscribers[o][c]){var h=[];l&&h.push(l),d&&h.push(d);for(var p=0;p<i.subscribers[o][c].length;p++)i.subscribers[o][c][p].apply(u,h)}}a.dispatch=s},{"./":45}],44:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.hasOpener=void 0;function i(s){return!(s.top!==s||s.opener==null||s.opener===s||s.opener.closed===!0)}a.hasOpener=i},{}],45:[function(e,n,a){var i=this&&this.__createBinding||(Object.create?function(o,c,l,d){d===void 0&&(d=l);var u=Object.getOwnPropertyDescriptor(c,l);(!u||("get"in u?!c.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return c[l]}}),Object.defineProperty(o,d,u)}:function(o,c,l,d){d===void 0&&(d=l),o[d]=c[l]}),s=this&&this.__exportStar||function(o,c){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(c,l)&&i(c,o,l)};Object.defineProperty(a,"__esModule",{value:!0}),s(e("./attach"),a),s(e("./broadcast-to-child-windows"),a),s(e("./broadcast"),a),s(e("./constants"),a),s(e("./dispatch"),a),s(e("./has-opener"),a),s(e("./is-not-string"),a),s(e("./message"),a),s(e("./package-payload"),a),s(e("./send-message"),a),s(e("./subscribe-replier"),a),s(e("./subscription-args-invalid"),a),s(e("./types"),a),s(e("./unpack-payload"),a)},{"./attach":39,"./broadcast":41,"./broadcast-to-child-windows":40,"./constants":42,"./dispatch":43,"./has-opener":44,"./is-not-string":46,"./message":47,"./package-payload":48,"./send-message":49,"./subscribe-replier":50,"./subscription-args-invalid":51,"./types":52,"./unpack-payload":53}],46:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.isntString=void 0;function i(s){return typeof s!="string"}a.isntString=i},{}],47:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.onMessage=void 0;var i=e("./");function s(o){if(!(0,i.isntString)(o.data)){var c=(0,i.unpackPayload)(o);if(c){var l=c.eventData,d=c.reply;(0,i.dispatch)("*",c.event,l,d,o),(0,i.dispatch)(o.origin,c.event,l,d,o),(0,i.broadcastToChildWindows)(o.data,c.origin,o.source)}}}a.onMessage=s},{"./":45}],48:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.packagePayload=void 0;var i=e("./");function s(o,c,l,d){var u,h={event:o,origin:c};typeof d=="function"&&(h.reply=(0,i.subscribeReplier)(d,c)),h.eventData=l;try{u=i.prefix+JSON.stringify(h)}catch(p){throw new Error("Could not stringify event: ".concat(p.message))}return u}a.packagePayload=s},{"./":45}],49:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.sendMessage=void 0;function i(s,o,c){try{s.postMessage(o,c)}catch(l){}}a.sendMessage=i},{}],50:[function(e,n,a){var i=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(a,"__esModule",{value:!0}),a.subscribeReplier=void 0;var s=e("../framebus"),o=i(e("@braintree/uuid"));function c(l,d){var u=(0,o.default)();function h(p,f){l(p,f),s.Framebus.target({origin:d}).off(u,h)}return s.Framebus.target({origin:d}).on(u,h),u}a.subscribeReplier=c},{"../framebus":37,"@braintree/uuid":31}],51:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.subscriptionArgsInvalid=void 0;var i=e("./");function s(o,c,l){return(0,i.isntString)(o)||typeof c!="function"?!0:(0,i.isntString)(l)}a.subscriptionArgsInvalid=s},{"./":45}],52:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0})},{}],53:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.unpackPayload=void 0;var i=e("./");function s(o){var c;if(o.data.slice(0,i.prefix.length)!==i.prefix)return!1;try{c=JSON.parse(o.data.slice(i.prefix.length))}catch(h){return!1}if(c.reply){var l=o.origin,d=o.source,u=c.reply;c.reply=function(p){if(d){var f=(0,i.packagePayload)(u,l,p);f&&d.postMessage(f,l)}}}return c}a.unpackPayload=s},{"./":45}],54:[function(e,n,a){var i=e("./create-authorization-data"),s=e("./json-clone"),o=e("./constants");function c(d,u){var h,p=u?s(u):{},f=i(d.authorization).attrs,m=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(m[h]=p._meta[h]);return p._meta=m,f.tokenizationKey?p.tokenizationKey=f.tokenizationKey:p.authorizationFingerprint=f.authorizationFingerprint,p}function l(d){var u=d.getConfiguration(),h=i(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",f={api_integration_type:u.analyticsMetadata.integrationType,app_id:window.location.host,c_sdk_ver:o.VERSION,component:"braintreeclientsdk",merchant_sdk_env:p?"production":"sandbox",merchant_id:u.gatewayConfiguration.merchantId,event_source:"web",platform:o.PLATFORM,platform_version:window.navigator.userAgent,session_id:u.analyticsMetadata.sessionId,client_session_id:u.analyticsMetadata.sessionId,tenant_name:"braintree",product_name:"BT_DCC",space_key:"SKDUYK"};return h.tokenizationKey?f.tokenization_key=h.tokenizationKey:f.auth_fingerprint=h.authorizationFingerprint,f}n.exports={addMetadata:c,addEventMetadata:l}},{"./constants":60,"./create-authorization-data":63,"./json-clone":80}],55:[function(e,n,a){var i=e("./constants"),s=e("./add-metadata"),o=e("./assign").assign;function c(u,h,p){return l(u,h,{},p)}function l(u,h,p,f){var m=Date.now();return p.flow==="vault"?p.context_type="BA_Token":p.flow==="checkout"&&(p.context_type="EC_Token"),Promise.resolve(u).then(function(v){var b=v._request,w=i.ANALYTICS_URL,x=i.ANALYTICS_PREFIX+h,O=v.getConfiguration(),I=O.gatewayConfiguration.environment==="production",L={events:[],tracking:[]},N=s.addEventMetadata(v,L);return N.event_name=x,N.t=m,L.events=[{level:"info",event:x,payload:o({env:I?"production":"sandbox",timestamp:m},p)}],L.tracking=[N],p&&typeof p=="object"&&(L.tracking=[d(N,p)]),b({url:w,method:"post",data:L,timeout:i.ANALYTICS_REQUEST_TIMEOUT_MS},f)}).catch(function(v){f&&f(v)})}function d(u,h){var p={},f=o({},h);return Object.keys(f).forEach(function(m){i.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(m)===-1&&delete f[m]}),p=o(u,f),p}n.exports={sendEvent:c,sendEventPlus:l}},{"./add-metadata":54,"./assign":57,"./constants":60}],56:[function(e,n,a){var i=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:i,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":36}],57:[function(e,n,a){var i=typeof Object.assign=="function"?Object.assign:s;function s(o){var c,l,d;for(c=1;c<arguments.length;c++){l=arguments[c];for(d in l)l.hasOwnProperty(d)&&(o[d]=l[d])}return o}n.exports={assign:i,_assign:s}},{}],58:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors"),o="3.126.0";function c(l){var d,u,h;return l?(h=l.name,d=l.client,u=l.authorization,!d&&!u?Promise.reject(new i({type:s.INSTANTIATION_OPTION_REQUIRED.type,code:s.INSTANTIATION_OPTION_REQUIRED.code,message:"options.client is required when instantiating "+h+"."})):!u&&d.getVersion()!==o?Promise.reject(new i({type:s.INCOMPATIBLE_VERSIONS.type,code:s.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+d.getVersion()+") and "+h+" (version "+o+") components must be from the same SDK version."})):Promise.resolve()):Promise.reject(new i({type:s.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:s.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:"Options must be passed to basicComponentVerification function."}))}n.exports={verify:c}},{"./braintree-error":59,"./errors":66}],59:[function(e,n,a){var i=e("./enumerate");function s(o){if(!s.types.hasOwnProperty(o.type))throw new Error(o.type+" is not a valid type.");if(!o.code)throw new Error("Error code required.");if(!o.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=o.code,this.message=o.message,this.type=o.type,this.details=o.details}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":65}],60:[function(e,n,a){var i="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},c={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},l={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:c,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:l,INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],61:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors");n.exports=function(o,c){c.forEach(function(l){o[l]=function(){throw new i({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:l+" cannot be called after teardown."})}})}},{"./braintree-error":59,"./errors":66}],62:[function(e,n,a){var i=e("./constants").ASSETS_URLS;function s(o){return i.production}n.exports={create:s}},{"./constants":60}],63:[function(e,n,a){var i=e("../lib/vendor/polyfill").atob,s=e("../lib/constants").CLIENT_API_URLS;function o(d){return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(d)}function c(d){var u=d.split("_"),h=u[0],p=u.slice(2).join("_");return{merchantId:p,environment:h}}function l(d){var u,h,p={attrs:{},configUrl:""};return o(d)?(h=c(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=s[h.environment]+"/merchants/"+h.merchantId+"/client_api/v1/configuration"):(u=JSON.parse(i(d)),p.environment=u.environment,p.attrs.authorizationFingerprint=u.authorizationFingerprint,p.configUrl=u.configUrl,p.graphQL=u.graphQL),p}n.exports=l},{"../lib/constants":60,"../lib/vendor/polyfill":86}],64:[function(e,n,a){var i=e("./braintree-error"),s=e("./assets"),o=e("./errors"),c="3.126.0";function l(d){var u=Promise.resolve();return d.client?Promise.resolve(d.client):(window.braintree&&window.braintree.client||(u=s.loadScript({src:d.assetsUrl+"/web/"+c+"/js/client.min.js"}).catch(function(h){return Promise.reject(new i({type:o.CLIENT_SCRIPT_FAILED_TO_LOAD.type,code:o.CLIENT_SCRIPT_FAILED_TO_LOAD.code,message:o.CLIENT_SCRIPT_FAILED_TO_LOAD.message,details:{originalError:h}}))})),u.then(function(){return window.braintree.client.VERSION!==c?Promise.reject(new i({type:o.INCOMPATIBLE_VERSIONS.type,code:o.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+window.braintree.client.VERSION+") and "+d.name+" (version "+c+") components must be from the same SDK version."})):window.braintree.client.create({authorization:d.authorization,debug:d.debug})}))}n.exports={create:l}},{"./assets":56,"./braintree-error":59,"./errors":66}],65:[function(e,n,a){function i(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}n.exports=i},{}],66:[function(e,n,a){var i=e("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:i.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:i.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:i.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:i.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":59}],67:[function(e,n,a){var i=e("./strategies/popup"),s=e("./strategies/popup-bridge"),o=e("./strategies/modal"),c=e("framebus"),l=e("../shared/events"),d=e("../shared/errors"),u=e("../shared/constants"),h=e("@braintree/uuid"),p=e("@braintree/iframer"),f=e("../../braintree-error"),m=e("../shared/browser-detection"),v=e("./../../assign").assign,b=e("../../constants").BUS_CONFIGURATION_REQUEST_EVENT,w=["name","dispatchFrameUrl","openFrameUrl"];function x(){}function O(L){if(!L)throw new Error("Valid configuration is required");if(w.forEach(function(N){if(!L.hasOwnProperty(N))throw new Error("A valid frame "+N+" must be provided")}),!/^[\w_]+$/.test(L.name))throw new Error("A valid frame name must be provided")}function I(L){O(L),this._serviceId=h().replace(/-/g,""),this._options={name:L.name+"_"+this._serviceId,dispatchFrameUrl:L.dispatchFrameUrl,openFrameUrl:L.openFrameUrl,height:L.height,width:L.width,top:L.top,left:L.left},this.state=L.state||{},this._bus=new c({channel:this._serviceId}),this._setBusEvents()}I.prototype.initialize=function(L){var N=function(){L(),this._bus.off(l.DISPATCH_FRAME_READY,N)}.bind(this);this._bus.on(l.DISPATCH_FRAME_READY,N),this._writeDispatchFrame()},I.prototype._writeDispatchFrame=function(){var L=u.DISPATCH_FRAME_NAME+"_"+this._serviceId,N=this._options.dispatchFrameUrl;this._dispatchFrame=p({"aria-hidden":!0,name:L,title:L,src:N,class:u.DISPATCH_FRAME_CLASS,height:0,width:0,style:{position:"absolute",left:"-9999px"}}),document.body.appendChild(this._dispatchFrame)},I.prototype._setBusEvents=function(){this._bus.on(l.DISPATCH_FRAME_REPORT,function(L,N){this._onCompleteCallback&&this._onCompleteCallback.call(null,L.err,L.payload),this._frame.close(),this._onCompleteCallback=null,N&&N()}.bind(this)),this._bus.on(b,function(L){L(this.state)}.bind(this))},I.prototype.open=function(L,N){if(L=L||{},this._frame=this._getFrameForEnvironment(L),this._frame.initialize(N),!(this._frame instanceof s)){if(v(this.state,L.state),this._onCompleteCallback=N,this._frame.open(),this.isFrameClosed()){this._cleanupFrame(),N&&N(new f(d.FRAME_SERVICE_FRAME_OPEN_FAILED));return}this._pollForPopupClose()}},I.prototype.redirect=function(L){this._frame&&!this.isFrameClosed()&&this._frame.redirect(L)},I.prototype.close=function(){this.isFrameClosed()||this._frame.close()},I.prototype.focus=function(){this.isFrameClosed()||this._frame.focus()},I.prototype.createHandler=function(L){return L=L||{},{close:function(){L.beforeClose&&L.beforeClose(),this.close()}.bind(this),focus:function(){L.beforeFocus&&L.beforeFocus(),this.focus()}.bind(this)}},I.prototype.createNoopHandler=function(){return{close:x,focus:x}},I.prototype.teardown=function(){this.close(),this._dispatchFrame.parentNode.removeChild(this._dispatchFrame),this._dispatchFrame=null,this._cleanupFrame()},I.prototype.isFrameClosed=function(){return this._frame==null||this._frame.isClosed()},I.prototype._cleanupFrame=function(){this._frame=null,clearInterval(this._popupInterval),this._popupInterval=null},I.prototype._pollForPopupClose=function(){return this._popupInterval=setInterval(function(){this.isFrameClosed()&&(this._cleanupFrame(),this._onCompleteCallback&&this._onCompleteCallback(new f(d.FRAME_SERVICE_FRAME_CLOSED)))}.bind(this),u.POPUP_POLL_INTERVAL),this._popupInterval},I.prototype._getFrameForEnvironment=function(L){var N=m.supportsPopups(),S=!!window.popupBridge,B=v({},this._options,L);return S?new s(B):N?new i(B):new o(B)},n.exports=I},{"../../braintree-error":59,"../../constants":60,"../shared/browser-detection":74,"../shared/constants":75,"../shared/errors":76,"../shared/events":77,"./../../assign":57,"./strategies/modal":69,"./strategies/popup":72,"./strategies/popup-bridge":70,"@braintree/iframer":27,"@braintree/uuid":31,framebus:38}],68:[function(e,n,a){var i=e("./frame-service");n.exports={create:function(o,c){var l=new i(o);l.initialize(function(){c(l)})}}},{"./frame-service":67}],69:[function(e,n,a){var i=e("@braintree/iframer"),s=e("../../../assign").assign,o=e("../../shared/browser-detection"),c={position:"fixed",top:0,left:0,bottom:0,padding:0,margin:0,border:0,outline:"none",zIndex:20001,background:"#FFFFFF"};function l(){}function d(u){this._closed=null,this._frame=null,this._options=u||{},this._container=this._options.container||document.body}d.prototype.initialize=l,d.prototype.open=function(){var u={src:this._options.openFrameUrl,name:this._options.name,scrolling:"yes",height:"100%",width:"100%",style:s({},c),title:"Lightbox Frame"};o.isIos()?(o.isIosWKWebview()&&(this._lockScrolling(),u.style={}),this._el=document.createElement("div"),s(this._el.style,c,{height:"100%",width:"100%",overflow:"auto","-webkit-overflow-scrolling":"touch"}),this._frame=i(u),this._el.appendChild(this._frame)):this._el=this._frame=i(u),this._closed=!1,this._container.appendChild(this._el)},d.prototype.focus=l,d.prototype.close=function(){this._container.removeChild(this._el),this._frame=null,this._closed=!0,o.isIosWKWebview()&&this._unlockScrolling()},d.prototype.isClosed=function(){return!!this._closed},d.prototype.redirect=function(u){this._frame.src=u},d.prototype._unlockScrolling=function(){document.body.style.overflow=this._savedBodyProperties.overflowStyle,document.body.style.position=this._savedBodyProperties.positionStyle,window.scrollTo(this._savedBodyProperties.left,this._savedBodyProperties.top),delete this._savedBodyProperties},d.prototype._lockScrolling=function(){var u=document.documentElement;this._savedBodyProperties={left:(window.pageXOffset||u.scrollLeft)-(u.clientLeft||0),top:(window.pageYOffset||u.scrollTop)-(u.clientTop||0),overflowStyle:document.body.style.overflow,positionStyle:document.body.style.position},document.body.style.overflow="hidden",document.body.style.position="fixed",window.scrollTo(0,0)},n.exports=d},{"../../../assign":57,"../../shared/browser-detection":74,"@braintree/iframer":27}],70:[function(e,n,a){var i=e("../../../braintree-error"),s=e("../../shared/errors");function o(){}function c(l){this._closed=null,this._options=l}c.prototype.initialize=function(l){var d=this;window.popupBridge.onComplete=function(u,h){var p=!h&&!u;if(d._closed=!0,u||p){l(new i(s.FRAME_SERVICE_FRAME_CLOSED));return}l(null,h)}},c.prototype.open=function(l){var d;l=l||{},d=l.openFrameUrl||this._options.openFrameUrl,this._closed=!1,window.popupBridge.open(d)},c.prototype.focus=o,c.prototype.close=o,c.prototype.isClosed=function(){return!!this._closed},c.prototype.redirect=function(l){this.open({openFrameUrl:l})},n.exports=c},{"../../../braintree-error":59,"../../shared/errors":76}],71:[function(e,n,a){var i=e("../../../shared/constants"),s=e("./position");function o(c,l,d){return typeof l!="undefined"?l:s[c](d)}n.exports=function(l){var d=l.height||i.DEFAULT_POPUP_HEIGHT,u=l.width||i.DEFAULT_POPUP_WIDTH,h=o("top",l.top,d),p=o("left",l.left,u);return[i.POPUP_BASE_OPTIONS,"height="+d,"width="+u,"top="+h,"left="+p].join(",")}},{"../../../shared/constants":75,"./position":73}],72:[function(e,n,a){var i=e("./compose-options");function s(){}function o(c){this._frame=null,this._options=c||{}}o.prototype.initialize=s,o.prototype.open=function(){this._frame=window.open(this._options.openFrameUrl,this._options.name,i(this._options))},o.prototype.focus=function(){this._frame.focus()},o.prototype.close=function(){this._frame.closed||this._frame.close()},o.prototype.isClosed=function(){return!this._frame||!!this._frame.closed},o.prototype.redirect=function(c){this._frame.location.href=c},n.exports=o},{"./compose-options":71}],73:[function(e,n,a){function i(c){var l=window.outerHeight||document.documentElement.clientHeight,d=window.screenY==null?window.screenTop:window.screenY;return o(l,c,d)}function s(c){var l=window.outerWidth||document.documentElement.clientWidth,d=window.screenX==null?window.screenLeft:window.screenX;return o(l,c,d)}function o(c,l,d){return(c-l)/2+d}n.exports={top:i,left:s,center:o}},{}],74:[function(e,n,a){n.exports={isIos:e("@braintree/browser-detection/is-ios"),isIosWKWebview:e("@braintree/browser-detection/is-ios-wkwebview"),supportsPopups:e("@braintree/browser-detection/supports-popups")}},{"@braintree/browser-detection/is-ios":23,"@braintree/browser-detection/is-ios-wkwebview":22,"@braintree/browser-detection/supports-popups":25}],75:[function(e,n,a){n.exports={DISPATCH_FRAME_NAME:"dispatch",DISPATCH_FRAME_CLASS:"braintree-dispatch-frame",POPUP_BASE_OPTIONS:"resizable,scrollbars",DEFAULT_POPUP_WIDTH:450,DEFAULT_POPUP_HEIGHT:535,POPUP_POLL_INTERVAL:100,POPUP_CLOSE_TIMEOUT:100}},{}],76:[function(e,n,a){var i=e("../../braintree-error");n.exports={FRAME_SERVICE_FRAME_CLOSED:{type:i.types.INTERNAL,code:"FRAME_SERVICE_FRAME_CLOSED",message:"Frame closed before tokenization could occur."},FRAME_SERVICE_FRAME_OPEN_FAILED:{type:i.types.INTERNAL,code:"FRAME_SERVICE_FRAME_OPEN_FAILED",message:"Frame failed to open."}}},{"../../braintree-error":59}],77:[function(e,n,a){var i=e("../../enumerate");n.exports=i(["DISPATCH_FRAME_READY","DISPATCH_FRAME_REPORT"],"frameService:")},{"../../enumerate":65}],78:[function(e,n,a){n.exports=function(s){s=s||window;try{return s.self!==s.top}catch(o){return!0}}},{}],79:[function(e,n,a){var i,s={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function o(l){return l.split(".").slice(-2).join(".")}function c(l){var d;return l=l.toLowerCase(),/^https:/.test(l)?(i=i||document.createElement("a"),i.href=l,d=o(i.hostname),s.hasOwnProperty(d)):!1}n.exports=c},{}],80:[function(e,n,a){n.exports=function(i){return JSON.parse(JSON.stringify(i))}},{}],81:[function(e,n,a){n.exports=function(i){return Object.keys(i).filter(function(s){return typeof i[s]=="function"})}},{}],82:[function(e,n,a){function i(u){var h;for(h in u)if(u.hasOwnProperty(h))return!0;return!1}function s(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.toString.call(u)==="[object Array]"||!1}function o(u){return u=u||window.location.href,/\?/.test(u)}function c(u){var h,p;return u=u||window.location.href,o(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(f,m){var v=m.split("="),b=decodeURIComponent(v[0]),w=decodeURIComponent(v[1]);return f[b]=w,f},{}),p):{}}function l(u,h){var p,f,m,v=[];for(m in u)u.hasOwnProperty(m)&&(f=u[m],h?s(u)?p=h+"[]":p=h+"["+m+"]":p=m,typeof f=="object"?v.push(l(f,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(f)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&i(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=l(h)),u}n.exports={parse:c,stringify:l,queryify:d,hasQueryParams:o}},{}],83:[function(e,n,a){n.exports=function(i){return i.indexOf("_")===-1?i:i.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],84:[function(e,n,a){var i=e("./querystring");function s(){return i.parse(window.location.href)}n.exports={getUrlParams:s}},{"./querystring":82}],85:[function(e,n,a){function i(s){return s?"":".min"}n.exports=i},{}],86:[function(e,n,a){var i=typeof atob=="function"?atob:s;function s(o){var c,l,d,u,h,p,f,m,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$/,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",w="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");m=0;do u=b.indexOf(o.charAt(m++)),h=b.indexOf(o.charAt(m++)),p=b.indexOf(o.charAt(m++)),f=b.indexOf(o.charAt(m++)),c=(u&63)<<2|h>>4&3,l=(h&15)<<4|p>>2&15,d=(p&3)<<6|f&63,w+=String.fromCharCode(c)+(l?String.fromCharCode(l):"")+(d?String.fromCharCode(d):"");while(m<o.length);return w}n.exports={atob:function(o){return i.call(window,o)},_atob:s}},{}],87:[function(e,n,a){var i=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},s=i(e("./venmo-desktop"));n.exports=function(c){var l=new s.default(c);return l.initialize()}},{"./venmo-desktop":89}],88:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.VENMO_PAYMENT_CONTEXT_STATUS_QUERY=a.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY=a.UPDATE_PAYMENT_CONTEXT_QUERY=a.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY=a.CREATE_PAYMENT_CONTEXT_QUERY=a.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=void 0,a.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=`mutation CreateVenmoQRCodePaymentContext($input: CreateVenmoQRCodePaymentContextInput!) {
249
+ ***************************************************************************** */function s(y,T,_,P){function D(w){return w instanceof _?w:new _(function(z){z(w)})}return new(_||(_=Promise))(function(w,z){function Z(te){try{S(P.next(te))}catch(we){z(we)}}function le(te){try{S(P.throw(te))}catch(we){z(we)}}function S(te){te.done?w(te.value):D(te.value).then(Z,le)}S((P=P.apply(y,[])).next())})}function o(y,T){var _={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},P,D,w,z;return z={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(z[Symbol.iterator]=function(){return this}),z;function Z(S){return function(te){return le([S,te])}}function le(S){if(P)throw new TypeError("Generator is already executing.");for(;_;)try{if(P=1,D&&(w=S[0]&2?D.return:S[0]?D.throw||((w=D.return)&&w.call(D),0):D.next)&&!(w=w.call(D,S[1])).done)return w;switch(D=0,w&&(S=[S[0]&2,w.value]),S[0]){case 0:case 1:w=S;break;case 4:return _.label++,{value:S[1],done:!1};case 5:_.label++,D=S[1],S=[0];continue;case 7:S=_.ops.pop(),_.trys.pop();continue;default:if(w=_.trys,!(w=w.length>0&&w[w.length-1])&&(S[0]===6||S[0]===2)){_=0;continue}if(S[0]===3&&(!w||S[1]>w[0]&&S[1]<w[3])){_.label=S[1];break}if(S[0]===6&&_.label<w[1]){_.label=w[1],w=S;break}if(w&&_.label<w[2]){_.label=w[2],_.ops.push(S);break}w[2]&&_.ops.pop(),_.trys.pop();continue}S=T.call(y,_)}catch(te){S=[6,te],D=0}finally{P=w=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}}var c={},l={};function d(y){var T,_=JSON.stringify(y);if(!y.forceScriptReload&&(T=l[_],T))return T;var P=document.createElement("script"),D=y.dataAttributes||{},w=y.container||document.head;return P.src=y.src,P.id=y.id||"",P.async=!0,y.type&&P.setAttribute("type","".concat(y.type)),y.crossorigin&&P.setAttribute("crossorigin","".concat(y.crossorigin)),Object.keys(D).forEach(function(z){P.setAttribute("data-".concat(z),"".concat(D[z]))}),T=new Promise(function(z,Z){P.addEventListener("load",function(){z(P)}),P.addEventListener("error",function(){Z(new Error("".concat(y.src," failed to load.")))}),P.addEventListener("abort",function(){Z(new Error("".concat(y.src," has aborted.")))}),w.appendChild(P)}),l[_]=T,T}d.clearCache=function(){l={}};var u=d,h=function(T){var _=document.querySelector('link[href="'.concat(T.href,'"]'));if(_)return Promise.resolve(_);_=document.createElement("link");var P=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),P.firstChild?P.insertBefore(_,P.firstChild):P.appendChild(_),Promise.resolve(_)};Object.defineProperty(c,"__esModule",{value:!0}),c.loadStylesheet=f=c.loadScript=void 0;var p=u,f=c.loadScript=p,m=h;c.loadStylesheet=m;var v="https://www.paypalobjects.com",b={minified:"axo.min",unminified:"axo"},C="fastlane",x="connect-boba",N="".concat(x,"/locales/"),I={AXO_ASSET_NAME:b,AXO_ASSET_PATH:x,LOCALE_PATH:N,CDNX_PROD:v},L={BT:"BT",PPCP:"PPCP"};function O(){return typeof window.define=="function"&&!!window.define.amd}function k(){return O()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function B(y,T,_){var P,D;return _===void 0&&(_=!0),s(this,void 0,void 0,function(){var w,z;return o(this,function(Z){if(w=$(),w&&w[y.module]){if(T&&((P=w[y.module])===null||P===void 0?void 0:P.VERSION)!==T)throw z=(D=w[y.module])===null||D===void 0?void 0:D.VERSION,new Error("".concat(y.module," already loaded with version ").concat(z," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(y.module," without specifying version"));return[2,W(y,T,_)]})})}function W(y,T,_){if(_===void 0&&(_=!0),O()){var P=_?y.amdModule.minified:y.amdModule.unminified;return new Promise(function(w,z){window.require([P],w,z)})}var D=_?y.script.minified:y.script.unminified;return f({id:"".concat(y.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(D)})}function $(){return window==null?void 0:window.braintree}var F,j,H={Client:"client",HostedCardFields:"hostedFields"},ee="braintree",M=(F={},F[H.Client]="client",F[H.HostedCardFields]="hosted-fields",F),q=(j={},j[H.Client]={id:"client",module:H.Client,amdModule:{unminified:"".concat(ee,"/").concat(M[H.Client]),minified:"".concat(ee,"/").concat(M[H.Client],".min")},script:{unminified:"".concat(M[H.Client],".js"),minified:"".concat(M[H.Client],".min.js")}},j[H.HostedCardFields]={id:"hcf",module:H.HostedCardFields,amdModule:{unminified:"".concat(ee,"/").concat(M[H.HostedCardFields]),minified:"".concat(ee,"/").concat(M[H.HostedCardFields],".min")},script:{unminified:"".concat(M[H.HostedCardFields],".js"),minified:"".concat(M[H.HostedCardFields],".min.js")}},j);function Y(y){return s(this,void 0,void 0,function(){var T,_,P,D;return o(this,function(w){switch(w.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=y.btSdkVersion,_=y.minified,P=R(y),D=V(y),y.platform!==L.BT?[3,2]:[4,Promise.all([B(q.hostedFields,T,_),E(P,_)])];case 1:return w.sent(),[3,5];case 2:return y.platform!==L.PPCP?[3,4]:[4,Promise.all([B(q.client,T,_),B(q.hostedFields,T,_),E(P,_)])];case 3:return w.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:D}}]}})})}function E(y,T){var _;if(T===void 0&&(T=!0),O()){k()&&requirejs.config({paths:(_={},_[C]=y,_)});var P="".concat(C,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(D,w){window.require([P],D,w)})}return f({id:"axo-id",src:y,forceScriptReload:!0})}function g(y){var T=y.assetUrl,_=y.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function R(y){var T,_=(y==null?void 0:y.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,P=O()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:P,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(y){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=y==null?void 0:y.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=Y})},{}],37:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Framebus=void 0;var i=e("./lib"),s=typeof window!="undefined"&&window.Promise,o=function(){function c(l){l===void 0&&(l={}),this.origin=l.origin||"*",this.channel=l.channel||"",this.verifyDomain=l.verifyDomain,this.targetFrames=l.targetFrames||[],this.limitBroadcastToFramesArray=!!l.targetFrames,this.isDestroyed=!1,this.listeners=[],this.hasAdditionalChecksForOnListeners=!!(this.verifyDomain||this.limitBroadcastToFramesArray)}return c.setPromise=function(l){c.Promise=l},c.target=function(l){return new c(l)},c.prototype.addTargetFrame=function(l){this.limitBroadcastToFramesArray&&this.targetFrames.push(l)},c.prototype.include=function(l){return l==null||l.Window==null||l.constructor!==l.Window?!1:(i.childWindows.push(l),!0)},c.prototype.target=function(l){return c.target(l)},c.prototype.emit=function(l,d,u){if(this.isDestroyed)return!1;var h=this.origin;if(l=this.namespaceEvent(l),(0,i.isntString)(l)||(0,i.isntString)(h))return!1;typeof d=="function"&&(u=d,d=void 0);var p=(0,i.packagePayload)(l,h,d,u);return p?(this.limitBroadcastToFramesArray?this.targetFramesAsWindows().forEach(function(f){(0,i.sendMessage)(f,p,h)}):(0,i.broadcast)(p,{origin:h,frame:window.top||window.self}),!0):!1},c.prototype.emitAsPromise=function(l,d){var u=this;return new c.Promise(function(h,p){var f=u.emit(l,d,function(m){h(m)});f||p(new Error('Listener not added for "'.concat(l,'"')))})},c.prototype.on=function(l,d){if(this.isDestroyed)return!1;var u=this,h=this.origin,p=d;return l=this.namespaceEvent(l),(0,i.subscriptionArgsInvalid)(l,p,h)?!1:(this.hasAdditionalChecksForOnListeners&&(p=function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];u.passesVerifyDomainCheck(this&&this.origin)&&u.hasMatchingTargetFrame(this&&this.source)&&d.apply(void 0,f)}),this.listeners.push({eventName:l,handler:p,originalHandler:d}),i.subscribers[h]=i.subscribers[h]||{},i.subscribers[h][l]=i.subscribers[h][l]||[],i.subscribers[h][l].push(p),!0)},c.prototype.off=function(l,d){var u=d;if(this.isDestroyed)return!1;if(this.hasAdditionalChecksForOnListeners)for(var h=0;h<this.listeners.length;h++){var p=this.listeners[h];p.originalHandler===d&&(u=p.handler)}l=this.namespaceEvent(l);var f=this.origin;if((0,i.subscriptionArgsInvalid)(l,u,f))return!1;var m=i.subscribers[f]&&i.subscribers[f][l];if(!m)return!1;for(var h=0;h<m.length;h++)if(m[h]===u)return m.splice(h,1),!0;return!1},c.prototype.teardown=function(){if(!this.isDestroyed){this.isDestroyed=!0;for(var l=0;l<this.listeners.length;l++){var d=this.listeners[l];this.off(d.eventName,d.handler)}this.listeners.length=0}},c.prototype.passesVerifyDomainCheck=function(l){return this.verifyDomain?this.checkOrigin(l):!0},c.prototype.targetFramesAsWindows=function(){return this.limitBroadcastToFramesArray?this.targetFrames.map(function(l){return l instanceof HTMLIFrameElement?l.contentWindow:l}).filter(function(l){return l}):[]},c.prototype.hasMatchingTargetFrame=function(l){if(!this.limitBroadcastToFramesArray)return!0;var d=this.targetFramesAsWindows().find(function(u){return u===l});return!!d},c.prototype.checkOrigin=function(l){var d,u=document.createElement("a");u.href=location.href,u.protocol==="https:"?d=u.host.replace(/:443$/,""):u.protocol==="http:"?d=u.host.replace(/:80$/,""):d=u.host;var h=u.protocol+"//"+d;return h===l?!0:this.verifyDomain?this.verifyDomain(l):!0},c.prototype.namespaceEvent=function(l){return this.channel?"".concat(this.channel,":").concat(l):l},c.Promise=s,c}();a.Framebus=o},{"./lib":45}],38:[function(e,n,a){var i=e("./lib"),s=e("./framebus");(0,i.attach)(),n.exports=s.Framebus},{"./framebus":37,"./lib":45}],39:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.detach=a.attach=void 0;var i=e("./"),s=!1;function o(){s||typeof window=="undefined"||(s=!0,window.addEventListener("message",i.onMessage,!1))}a.attach=o;function c(){s=!1,window.removeEventListener("message",i.onMessage,!1)}a.detach=c},{"./":45}],40:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.broadcastToChildWindows=void 0;var i=e("./");function s(o,c,l){for(var d=i.childWindows.length-1;d>=0;d--){var u=i.childWindows[d];u.closed?i.childWindows.splice(d,1):l!==u&&(0,i.broadcast)(o,{origin:c,frame:u.top})}}a.broadcastToChildWindows=s},{"./":45}],41:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.broadcast=void 0;var i=e("./");function s(o,c){var l=0,d,u=c.origin,h=c.frame;try{for(h.postMessage(o,u),(0,i.hasOpener)(h)&&h.opener.top!==window.top&&s(o,{origin:u,frame:h.opener.top});d=h.frames[l];)s(o,{origin:u,frame:d}),l++}catch(p){}}a.broadcast=s},{"./":45}],42:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.subscribers=a.childWindows=a.prefix=void 0,a.prefix="/*framebus*/",a.childWindows=[],a.subscribers={}},{}],43:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.dispatch=void 0;var i=e("./");function s(o,c,l,d,u){if(i.subscribers[o]&&i.subscribers[o][c]){var h=[];l&&h.push(l),d&&h.push(d);for(var p=0;p<i.subscribers[o][c].length;p++)i.subscribers[o][c][p].apply(u,h)}}a.dispatch=s},{"./":45}],44:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.hasOpener=void 0;function i(s){return!(s.top!==s||s.opener==null||s.opener===s||s.opener.closed===!0)}a.hasOpener=i},{}],45:[function(e,n,a){var i=this&&this.__createBinding||(Object.create?function(o,c,l,d){d===void 0&&(d=l);var u=Object.getOwnPropertyDescriptor(c,l);(!u||("get"in u?!c.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return c[l]}}),Object.defineProperty(o,d,u)}:function(o,c,l,d){d===void 0&&(d=l),o[d]=c[l]}),s=this&&this.__exportStar||function(o,c){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(c,l)&&i(c,o,l)};Object.defineProperty(a,"__esModule",{value:!0}),s(e("./attach"),a),s(e("./broadcast-to-child-windows"),a),s(e("./broadcast"),a),s(e("./constants"),a),s(e("./dispatch"),a),s(e("./has-opener"),a),s(e("./is-not-string"),a),s(e("./message"),a),s(e("./package-payload"),a),s(e("./send-message"),a),s(e("./subscribe-replier"),a),s(e("./subscription-args-invalid"),a),s(e("./types"),a),s(e("./unpack-payload"),a)},{"./attach":39,"./broadcast":41,"./broadcast-to-child-windows":40,"./constants":42,"./dispatch":43,"./has-opener":44,"./is-not-string":46,"./message":47,"./package-payload":48,"./send-message":49,"./subscribe-replier":50,"./subscription-args-invalid":51,"./types":52,"./unpack-payload":53}],46:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.isntString=void 0;function i(s){return typeof s!="string"}a.isntString=i},{}],47:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.onMessage=void 0;var i=e("./");function s(o){if(!(0,i.isntString)(o.data)){var c=(0,i.unpackPayload)(o);if(c){var l=c.eventData,d=c.reply;(0,i.dispatch)("*",c.event,l,d,o),(0,i.dispatch)(o.origin,c.event,l,d,o),(0,i.broadcastToChildWindows)(o.data,c.origin,o.source)}}}a.onMessage=s},{"./":45}],48:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.packagePayload=void 0;var i=e("./");function s(o,c,l,d){var u,h={event:o,origin:c};typeof d=="function"&&(h.reply=(0,i.subscribeReplier)(d,c)),h.eventData=l;try{u=i.prefix+JSON.stringify(h)}catch(p){throw new Error("Could not stringify event: ".concat(p.message))}return u}a.packagePayload=s},{"./":45}],49:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.sendMessage=void 0;function i(s,o,c){try{s.postMessage(o,c)}catch(l){}}a.sendMessage=i},{}],50:[function(e,n,a){var i=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(a,"__esModule",{value:!0}),a.subscribeReplier=void 0;var s=e("../framebus"),o=i(e("@braintree/uuid"));function c(l,d){var u=(0,o.default)();function h(p,f){l(p,f),s.Framebus.target({origin:d}).off(u,h)}return s.Framebus.target({origin:d}).on(u,h),u}a.subscribeReplier=c},{"../framebus":37,"@braintree/uuid":31}],51:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.subscriptionArgsInvalid=void 0;var i=e("./");function s(o,c,l){return(0,i.isntString)(o)||typeof c!="function"?!0:(0,i.isntString)(l)}a.subscriptionArgsInvalid=s},{"./":45}],52:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0})},{}],53:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.unpackPayload=void 0;var i=e("./");function s(o){var c;if(o.data.slice(0,i.prefix.length)!==i.prefix)return!1;try{c=JSON.parse(o.data.slice(i.prefix.length))}catch(h){return!1}if(c.reply){var l=o.origin,d=o.source,u=c.reply;c.reply=function(p){if(d){var f=(0,i.packagePayload)(u,l,p);f&&d.postMessage(f,l)}}}return c}a.unpackPayload=s},{"./":45}],54:[function(e,n,a){var i=e("./create-authorization-data"),s=e("./json-clone"),o=e("./constants");function c(d,u){var h,p=u?s(u):{},f=i(d.authorization).attrs,m=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(m[h]=p._meta[h]);return p._meta=m,f.tokenizationKey?p.tokenizationKey=f.tokenizationKey:p.authorizationFingerprint=f.authorizationFingerprint,p}function l(d){var u=d.getConfiguration(),h=i(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",f={api_integration_type:u.analyticsMetadata.integrationType,app_id:window.location.host,c_sdk_ver:o.VERSION,component:"braintreeclientsdk",merchant_sdk_env:p?"production":"sandbox",merchant_id:u.gatewayConfiguration.merchantId,event_source:"web",platform:o.PLATFORM,platform_version:window.navigator.userAgent,session_id:u.analyticsMetadata.sessionId,client_session_id:u.analyticsMetadata.sessionId,tenant_name:"braintree",product_name:"BT_DCC",space_key:"SKDUYK"};return h.tokenizationKey?f.tokenization_key=h.tokenizationKey:f.auth_fingerprint=h.authorizationFingerprint,f}n.exports={addMetadata:c,addEventMetadata:l}},{"./constants":60,"./create-authorization-data":63,"./json-clone":80}],55:[function(e,n,a){var i=e("./constants"),s=e("./add-metadata"),o=e("./assign").assign;function c(u,h,p){return l(u,h,{},p)}function l(u,h,p,f){var m=Date.now();return p.flow==="vault"?p.context_type="BA_Token":p.flow==="checkout"&&(p.context_type="EC_Token"),Promise.resolve(u).then(function(v){var b=v._request,C=i.ANALYTICS_URL,x=i.ANALYTICS_PREFIX+h,N=v.getConfiguration(),I=N.gatewayConfiguration.environment==="production",L={events:[],tracking:[]},O=s.addEventMetadata(v,L);return O.event_name=x,O.t=m,L.events=[{level:"info",event:x,payload:o({env:I?"production":"sandbox",timestamp:m},p)}],L.tracking=[O],p&&typeof p=="object"&&(L.tracking=[d(O,p)]),b({url:C,method:"post",data:L,timeout:i.ANALYTICS_REQUEST_TIMEOUT_MS},f)}).catch(function(v){f&&f(v)})}function d(u,h){var p={},f=o({},h);return Object.keys(f).forEach(function(m){i.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(m)===-1&&delete f[m]}),p=o(u,f),p}n.exports={sendEvent:c,sendEventPlus:l}},{"./add-metadata":54,"./assign":57,"./constants":60}],56:[function(e,n,a){var i=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:i,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":36}],57:[function(e,n,a){var i=typeof Object.assign=="function"?Object.assign:s;function s(o){var c,l,d;for(c=1;c<arguments.length;c++){l=arguments[c];for(d in l)l.hasOwnProperty(d)&&(o[d]=l[d])}return o}n.exports={assign:i,_assign:s}},{}],58:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors"),o="3.126.0";function c(l){var d,u,h;return l?(h=l.name,d=l.client,u=l.authorization,!d&&!u?Promise.reject(new i({type:s.INSTANTIATION_OPTION_REQUIRED.type,code:s.INSTANTIATION_OPTION_REQUIRED.code,message:"options.client is required when instantiating "+h+"."})):!u&&d.getVersion()!==o?Promise.reject(new i({type:s.INCOMPATIBLE_VERSIONS.type,code:s.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+d.getVersion()+") and "+h+" (version "+o+") components must be from the same SDK version."})):Promise.resolve()):Promise.reject(new i({type:s.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:s.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:"Options must be passed to basicComponentVerification function."}))}n.exports={verify:c}},{"./braintree-error":59,"./errors":66}],59:[function(e,n,a){var i=e("./enumerate");function s(o){if(!s.types.hasOwnProperty(o.type))throw new Error(o.type+" is not a valid type.");if(!o.code)throw new Error("Error code required.");if(!o.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=o.code,this.message=o.message,this.type=o.type,this.details=o.details}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,s.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":65}],60:[function(e,n,a){var i="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},c={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},l={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:c,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:l,INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],61:[function(e,n,a){var i=e("./braintree-error"),s=e("./errors");n.exports=function(o,c){c.forEach(function(l){o[l]=function(){throw new i({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:l+" cannot be called after teardown."})}})}},{"./braintree-error":59,"./errors":66}],62:[function(e,n,a){var i=e("./constants").ASSETS_URLS;function s(o){return i.production}n.exports={create:s}},{"./constants":60}],63:[function(e,n,a){var i=e("../lib/vendor/polyfill").atob,s=e("../lib/constants").CLIENT_API_URLS;function o(d){return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(d)}function c(d){var u=d.split("_"),h=u[0],p=u.slice(2).join("_");return{merchantId:p,environment:h}}function l(d){var u,h,p={attrs:{},configUrl:""};return o(d)?(h=c(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=s[h.environment]+"/merchants/"+h.merchantId+"/client_api/v1/configuration"):(u=JSON.parse(i(d)),p.environment=u.environment,p.attrs.authorizationFingerprint=u.authorizationFingerprint,p.configUrl=u.configUrl,p.graphQL=u.graphQL),p}n.exports=l},{"../lib/constants":60,"../lib/vendor/polyfill":86}],64:[function(e,n,a){var i=e("./braintree-error"),s=e("./assets"),o=e("./errors"),c="3.126.0";function l(d){var u=Promise.resolve();return d.client?Promise.resolve(d.client):(window.braintree&&window.braintree.client||(u=s.loadScript({src:d.assetsUrl+"/web/"+c+"/js/client.min.js"}).catch(function(h){return Promise.reject(new i({type:o.CLIENT_SCRIPT_FAILED_TO_LOAD.type,code:o.CLIENT_SCRIPT_FAILED_TO_LOAD.code,message:o.CLIENT_SCRIPT_FAILED_TO_LOAD.message,details:{originalError:h}}))})),u.then(function(){return window.braintree.client.VERSION!==c?Promise.reject(new i({type:o.INCOMPATIBLE_VERSIONS.type,code:o.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+window.braintree.client.VERSION+") and "+d.name+" (version "+c+") components must be from the same SDK version."})):window.braintree.client.create({authorization:d.authorization,debug:d.debug})}))}n.exports={create:l}},{"./assets":56,"./braintree-error":59,"./errors":66}],65:[function(e,n,a){function i(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}n.exports=i},{}],66:[function(e,n,a){var i=e("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:i.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:i.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:i.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:i.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:i.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":59}],67:[function(e,n,a){var i=e("./strategies/popup"),s=e("./strategies/popup-bridge"),o=e("./strategies/modal"),c=e("framebus"),l=e("../shared/events"),d=e("../shared/errors"),u=e("../shared/constants"),h=e("@braintree/uuid"),p=e("@braintree/iframer"),f=e("../../braintree-error"),m=e("../shared/browser-detection"),v=e("./../../assign").assign,b=e("../../constants").BUS_CONFIGURATION_REQUEST_EVENT,C=["name","dispatchFrameUrl","openFrameUrl"];function x(){}function N(L){if(!L)throw new Error("Valid configuration is required");if(C.forEach(function(O){if(!L.hasOwnProperty(O))throw new Error("A valid frame "+O+" must be provided")}),!/^[\w_]+$/.test(L.name))throw new Error("A valid frame name must be provided")}function I(L){N(L),this._serviceId=h().replace(/-/g,""),this._options={name:L.name+"_"+this._serviceId,dispatchFrameUrl:L.dispatchFrameUrl,openFrameUrl:L.openFrameUrl,height:L.height,width:L.width,top:L.top,left:L.left},this.state=L.state||{},this._bus=new c({channel:this._serviceId}),this._setBusEvents()}I.prototype.initialize=function(L){var O=function(){L(),this._bus.off(l.DISPATCH_FRAME_READY,O)}.bind(this);this._bus.on(l.DISPATCH_FRAME_READY,O),this._writeDispatchFrame()},I.prototype._writeDispatchFrame=function(){var L=u.DISPATCH_FRAME_NAME+"_"+this._serviceId,O=this._options.dispatchFrameUrl;this._dispatchFrame=p({"aria-hidden":!0,name:L,title:L,src:O,class:u.DISPATCH_FRAME_CLASS,height:0,width:0,style:{position:"absolute",left:"-9999px"}}),document.body.appendChild(this._dispatchFrame)},I.prototype._setBusEvents=function(){this._bus.on(l.DISPATCH_FRAME_REPORT,function(L,O){this._onCompleteCallback&&this._onCompleteCallback.call(null,L.err,L.payload),this._frame.close(),this._onCompleteCallback=null,O&&O()}.bind(this)),this._bus.on(b,function(L){L(this.state)}.bind(this))},I.prototype.open=function(L,O){if(L=L||{},this._frame=this._getFrameForEnvironment(L),this._frame.initialize(O),!(this._frame instanceof s)){if(v(this.state,L.state),this._onCompleteCallback=O,this._frame.open(),this.isFrameClosed()){this._cleanupFrame(),O&&O(new f(d.FRAME_SERVICE_FRAME_OPEN_FAILED));return}this._pollForPopupClose()}},I.prototype.redirect=function(L){this._frame&&!this.isFrameClosed()&&this._frame.redirect(L)},I.prototype.close=function(){this.isFrameClosed()||this._frame.close()},I.prototype.focus=function(){this.isFrameClosed()||this._frame.focus()},I.prototype.createHandler=function(L){return L=L||{},{close:function(){L.beforeClose&&L.beforeClose(),this.close()}.bind(this),focus:function(){L.beforeFocus&&L.beforeFocus(),this.focus()}.bind(this)}},I.prototype.createNoopHandler=function(){return{close:x,focus:x}},I.prototype.teardown=function(){this.close(),this._dispatchFrame.parentNode.removeChild(this._dispatchFrame),this._dispatchFrame=null,this._cleanupFrame()},I.prototype.isFrameClosed=function(){return this._frame==null||this._frame.isClosed()},I.prototype._cleanupFrame=function(){this._frame=null,clearInterval(this._popupInterval),this._popupInterval=null},I.prototype._pollForPopupClose=function(){return this._popupInterval=setInterval(function(){this.isFrameClosed()&&(this._cleanupFrame(),this._onCompleteCallback&&this._onCompleteCallback(new f(d.FRAME_SERVICE_FRAME_CLOSED)))}.bind(this),u.POPUP_POLL_INTERVAL),this._popupInterval},I.prototype._getFrameForEnvironment=function(L){var O=m.supportsPopups(),k=!!window.popupBridge,B=v({},this._options,L);return k?new s(B):O?new i(B):new o(B)},n.exports=I},{"../../braintree-error":59,"../../constants":60,"../shared/browser-detection":74,"../shared/constants":75,"../shared/errors":76,"../shared/events":77,"./../../assign":57,"./strategies/modal":69,"./strategies/popup":72,"./strategies/popup-bridge":70,"@braintree/iframer":27,"@braintree/uuid":31,framebus:38}],68:[function(e,n,a){var i=e("./frame-service");n.exports={create:function(o,c){var l=new i(o);l.initialize(function(){c(l)})}}},{"./frame-service":67}],69:[function(e,n,a){var i=e("@braintree/iframer"),s=e("../../../assign").assign,o=e("../../shared/browser-detection"),c={position:"fixed",top:0,left:0,bottom:0,padding:0,margin:0,border:0,outline:"none",zIndex:20001,background:"#FFFFFF"};function l(){}function d(u){this._closed=null,this._frame=null,this._options=u||{},this._container=this._options.container||document.body}d.prototype.initialize=l,d.prototype.open=function(){var u={src:this._options.openFrameUrl,name:this._options.name,scrolling:"yes",height:"100%",width:"100%",style:s({},c),title:"Lightbox Frame"};o.isIos()?(o.isIosWKWebview()&&(this._lockScrolling(),u.style={}),this._el=document.createElement("div"),s(this._el.style,c,{height:"100%",width:"100%",overflow:"auto","-webkit-overflow-scrolling":"touch"}),this._frame=i(u),this._el.appendChild(this._frame)):this._el=this._frame=i(u),this._closed=!1,this._container.appendChild(this._el)},d.prototype.focus=l,d.prototype.close=function(){this._container.removeChild(this._el),this._frame=null,this._closed=!0,o.isIosWKWebview()&&this._unlockScrolling()},d.prototype.isClosed=function(){return!!this._closed},d.prototype.redirect=function(u){this._frame.src=u},d.prototype._unlockScrolling=function(){document.body.style.overflow=this._savedBodyProperties.overflowStyle,document.body.style.position=this._savedBodyProperties.positionStyle,window.scrollTo(this._savedBodyProperties.left,this._savedBodyProperties.top),delete this._savedBodyProperties},d.prototype._lockScrolling=function(){var u=document.documentElement;this._savedBodyProperties={left:(window.pageXOffset||u.scrollLeft)-(u.clientLeft||0),top:(window.pageYOffset||u.scrollTop)-(u.clientTop||0),overflowStyle:document.body.style.overflow,positionStyle:document.body.style.position},document.body.style.overflow="hidden",document.body.style.position="fixed",window.scrollTo(0,0)},n.exports=d},{"../../../assign":57,"../../shared/browser-detection":74,"@braintree/iframer":27}],70:[function(e,n,a){var i=e("../../../braintree-error"),s=e("../../shared/errors");function o(){}function c(l){this._closed=null,this._options=l}c.prototype.initialize=function(l){var d=this;window.popupBridge.onComplete=function(u,h){var p=!h&&!u;if(d._closed=!0,u||p){l(new i(s.FRAME_SERVICE_FRAME_CLOSED));return}l(null,h)}},c.prototype.open=function(l){var d;l=l||{},d=l.openFrameUrl||this._options.openFrameUrl,this._closed=!1,window.popupBridge.open(d)},c.prototype.focus=o,c.prototype.close=o,c.prototype.isClosed=function(){return!!this._closed},c.prototype.redirect=function(l){this.open({openFrameUrl:l})},n.exports=c},{"../../../braintree-error":59,"../../shared/errors":76}],71:[function(e,n,a){var i=e("../../../shared/constants"),s=e("./position");function o(c,l,d){return typeof l!="undefined"?l:s[c](d)}n.exports=function(l){var d=l.height||i.DEFAULT_POPUP_HEIGHT,u=l.width||i.DEFAULT_POPUP_WIDTH,h=o("top",l.top,d),p=o("left",l.left,u);return[i.POPUP_BASE_OPTIONS,"height="+d,"width="+u,"top="+h,"left="+p].join(",")}},{"../../../shared/constants":75,"./position":73}],72:[function(e,n,a){var i=e("./compose-options");function s(){}function o(c){this._frame=null,this._options=c||{}}o.prototype.initialize=s,o.prototype.open=function(){this._frame=window.open(this._options.openFrameUrl,this._options.name,i(this._options))},o.prototype.focus=function(){this._frame.focus()},o.prototype.close=function(){this._frame.closed||this._frame.close()},o.prototype.isClosed=function(){return!this._frame||!!this._frame.closed},o.prototype.redirect=function(c){this._frame.location.href=c},n.exports=o},{"./compose-options":71}],73:[function(e,n,a){function i(c){var l=window.outerHeight||document.documentElement.clientHeight,d=window.screenY==null?window.screenTop:window.screenY;return o(l,c,d)}function s(c){var l=window.outerWidth||document.documentElement.clientWidth,d=window.screenX==null?window.screenLeft:window.screenX;return o(l,c,d)}function o(c,l,d){return(c-l)/2+d}n.exports={top:i,left:s,center:o}},{}],74:[function(e,n,a){n.exports={isIos:e("@braintree/browser-detection/is-ios"),isIosWKWebview:e("@braintree/browser-detection/is-ios-wkwebview"),supportsPopups:e("@braintree/browser-detection/supports-popups")}},{"@braintree/browser-detection/is-ios":23,"@braintree/browser-detection/is-ios-wkwebview":22,"@braintree/browser-detection/supports-popups":25}],75:[function(e,n,a){n.exports={DISPATCH_FRAME_NAME:"dispatch",DISPATCH_FRAME_CLASS:"braintree-dispatch-frame",POPUP_BASE_OPTIONS:"resizable,scrollbars",DEFAULT_POPUP_WIDTH:450,DEFAULT_POPUP_HEIGHT:535,POPUP_POLL_INTERVAL:100,POPUP_CLOSE_TIMEOUT:100}},{}],76:[function(e,n,a){var i=e("../../braintree-error");n.exports={FRAME_SERVICE_FRAME_CLOSED:{type:i.types.INTERNAL,code:"FRAME_SERVICE_FRAME_CLOSED",message:"Frame closed before tokenization could occur."},FRAME_SERVICE_FRAME_OPEN_FAILED:{type:i.types.INTERNAL,code:"FRAME_SERVICE_FRAME_OPEN_FAILED",message:"Frame failed to open."}}},{"../../braintree-error":59}],77:[function(e,n,a){var i=e("../../enumerate");n.exports=i(["DISPATCH_FRAME_READY","DISPATCH_FRAME_REPORT"],"frameService:")},{"../../enumerate":65}],78:[function(e,n,a){n.exports=function(s){s=s||window;try{return s.self!==s.top}catch(o){return!0}}},{}],79:[function(e,n,a){var i,s={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function o(l){return l.split(".").slice(-2).join(".")}function c(l){var d;return l=l.toLowerCase(),/^https:/.test(l)?(i=i||document.createElement("a"),i.href=l,d=o(i.hostname),s.hasOwnProperty(d)):!1}n.exports=c},{}],80:[function(e,n,a){n.exports=function(i){return JSON.parse(JSON.stringify(i))}},{}],81:[function(e,n,a){n.exports=function(i){return Object.keys(i).filter(function(s){return typeof i[s]=="function"})}},{}],82:[function(e,n,a){function i(u){var h;for(h in u)if(u.hasOwnProperty(h))return!0;return!1}function s(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.toString.call(u)==="[object Array]"||!1}function o(u){return u=u||window.location.href,/\?/.test(u)}function c(u){var h,p;return u=u||window.location.href,o(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(f,m){var v=m.split("="),b=decodeURIComponent(v[0]),C=decodeURIComponent(v[1]);return f[b]=C,f},{}),p):{}}function l(u,h){var p,f,m,v=[];for(m in u)u.hasOwnProperty(m)&&(f=u[m],h?s(u)?p=h+"[]":p=h+"["+m+"]":p=m,typeof f=="object"?v.push(l(f,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(f)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&i(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=l(h)),u}n.exports={parse:c,stringify:l,queryify:d,hasQueryParams:o}},{}],83:[function(e,n,a){n.exports=function(i){return i.indexOf("_")===-1?i:i.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],84:[function(e,n,a){var i=e("./querystring");function s(){return i.parse(window.location.href)}n.exports={getUrlParams:s}},{"./querystring":82}],85:[function(e,n,a){function i(s){return s?"":".min"}n.exports=i},{}],86:[function(e,n,a){var i=typeof atob=="function"?atob:s;function s(o){var c,l,d,u,h,p,f,m,v=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$/,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",C="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");m=0;do u=b.indexOf(o.charAt(m++)),h=b.indexOf(o.charAt(m++)),p=b.indexOf(o.charAt(m++)),f=b.indexOf(o.charAt(m++)),c=(u&63)<<2|h>>4&3,l=(h&15)<<4|p>>2&15,d=(p&3)<<6|f&63,C+=String.fromCharCode(c)+(l?String.fromCharCode(l):"")+(d?String.fromCharCode(d):"");while(m<o.length);return C}n.exports={atob:function(o){return i.call(window,o)},_atob:s}},{}],87:[function(e,n,a){var i=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},s=i(e("./venmo-desktop"));n.exports=function(c){var l=new s.default(c);return l.initialize()}},{"./venmo-desktop":89}],88:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.VENMO_PAYMENT_CONTEXT_STATUS_QUERY=a.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY=a.UPDATE_PAYMENT_CONTEXT_QUERY=a.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY=a.CREATE_PAYMENT_CONTEXT_QUERY=a.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=void 0,a.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=`mutation CreateVenmoQRCodePaymentContext($input: CreateVenmoQRCodePaymentContextInput!) {
250
250
  createVenmoQRCodePaymentContext(input: $input) {
251
251
  clientMutationId
252
252
  venmoQRCodePaymentContext {
@@ -316,12 +316,12 @@ ${m}::-ms-input-placeholder{${f}}
316
316
  }
317
317
  }
318
318
  }
319
- }`},{}],89:[function(e,n,a){var i=this&&this.__assign||function(){return i=Object.assign||function(m){for(var v,b=1,w=arguments.length;b<w;b++){v=arguments[b];for(var x in v)Object.prototype.hasOwnProperty.call(v,x)&&(m[x]=v[x])}return m},i.apply(this,arguments)},s=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(a,"__esModule",{value:!0});var o=s(e("framebus")),c=s(e("@braintree/iframer")),l=s(e("@braintree/uuid")),d=e("../shared/events"),u=e("./queries"),h=1e3,p=2e3,f=function(){function m(v){this.isHidden=!0,this.env=v.environment,this.id=l.default(),this.profileId=v.profileId,this.displayName=v.displayName,this.paymentMethodUsage=v.paymentMethodUsage,this.shouldUseLegacyQRCodeMutation=!this.paymentMethodUsage;var b=v.url+"#"+this.env+"_"+this.id;this.bus=new o.default({channel:this.id,verifyDomain:v.verifyDomain,targetFrames:[]}),this.apiRequest=v.apiRequest,this.sendEvent=v.sendEvent,this.Promise=v.Promise,this.alertBox=document.createElement("div"),this.alertBox.setAttribute("data-venmo-desktop-id",this.id),this.alertBox.setAttribute("role","alert"),this.alertBox.style.position="fixed",this.alertBox.style.display="none",this.alertBox.style.height="1px",this.alertBox.style.width="1px",this.alertBox.style.overflow="hidden",this.alertBox.style.zIndex="0",this.iframe=c.default({src:b,name:"venmo-desktop-iframe",style:{display:"none",position:"fixed",top:"0",bottom:"0",right:"0",left:"0",height:"100%",width:"100%",zIndex:"9999999"},title:"Venmo Desktop"}),this.bus.addTargetFrame(this.iframe)}return m.prototype.initialize=function(){var v=this;return new this.Promise(function(b){v.bus.on(d.VENMO_DESKTOP_IFRAME_READY,function(){b(v)}),v.bus.on(d.VENMO_DESKTOP_REQUEST_NEW_QR_CODE,function(){v.sendEvent("venmo.tokenize.desktop.restarted-from-error-view"),v.startPolling()}),document.body.appendChild(v.iframe),document.body.appendChild(v.alertBox)})},m.prototype.launchDesktopFlow=function(){var v=this;this.isHidden=!1;var b=new this.Promise(function(w,x){v.launchDesktopPromiseRejectFunction=x;var O=function(){v.bus.off(d.VENMO_DESKTOP_CUSTOMER_CANCELED,L),v.bus.off(d.VENMO_DESKTOP_UNKNOWN_ERROR,I)},I=function(N){O(),v.sendEvent("venmo.tokenize.desktop.unknown-error"),x({allowUIToHandleError:!1,reason:"UNKNOWN_ERROR",err:N})},L=function(){O(),v.updateVenmoDesktopPaymentContext("CANCELED"),v.sendEvent("venmo.tokenize.desktop.status-change.canceled-from-modal"),x({allowUIToHandleError:!1,reason:"CUSTOMER_CANCELED"})};v.completedHandler=function(N){O(),w(N)},v.bus.on(d.VENMO_DESKTOP_CUSTOMER_CANCELED,L),v.bus.on(d.VENMO_DESKTOP_UNKNOWN_ERROR,I)});return this.iframe.style.display="block",this.setAlert("Generating a QR code, get your Venmo app ready"),this.iframe.focus(),this.startPolling(),b.then(function(w){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,w}).catch(function(w){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,v.Promise.reject(w)})},m.prototype.triggerCompleted=function(v){var b=this;this.isHidden||setTimeout(function(){b.completedHandler&&b.completedHandler(v),delete b.completedHandler},p)},m.prototype.triggerRejected=function(v){this.launchDesktopPromiseRejectFunction&&this.launchDesktopPromiseRejectFunction(v)},m.prototype.hideDesktopFlow=function(){this.setAlert(""),this.iframe.style.display="none",this.bus.emit(d.VENMO_DESKTOP_CLOSED_FROM_PARENT),this.isHidden=!0},m.prototype.displayError=function(v){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_ERROR,{message:v}),this.setAlert(v))},m.prototype.displayQRCode=function(v,b){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_QR_CODE,{id:v,merchantId:b}),this.setAlert("To scan the QR code, open your Venmo app"))},m.prototype.authorize=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZE),this.setAlert("Venmo account authorized"))},m.prototype.authorizing=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZING),this.setAlert("Authorize on your Venmo app"))},m.prototype.startPolling=function(){var v=this;return this.createVenmoDesktopPaymentContext().then(function(b){var w=new Date(b.expiresAt).getTime()-new Date(b.createdAt).getTime(),x=Date.now()+w;return v.displayQRCode(b.id,b.merchantId),v.pollForStatusChange(b.status,x)}).then(function(b){if(b){var w=b.userName||"";w="@"+w.replace("@",""),v.triggerCompleted({paymentMethodNonce:b.paymentMethodId,username:w,payerInfo:b.payerInfo,id:v.venmoContextId||""})}}).catch(function(b){b.allowUIToHandleError||(v.sendEvent("venmo.tokenize.desktop.unhandled-error"),v.triggerRejected(b))})},m.prototype.pollForStatusChange=function(v,b){var w=this;return this.venmoContextId?Date.now()>b?this.updateVenmoDesktopPaymentContext("EXPIRED").then(function(){return w.displayError("Something went wrong"),w.sendEvent("venmo.tokenize.desktop.status-change.sdk-timeout"),w.Promise.reject({allowUIToHandleError:!0,reason:"TIMEOUT"})}):this.lookupVenmoDesktopPaymentContext().then(function(x){if(!w.venmoContextId||!x)return w.Promise.resolve();var O=x.status;if(O!==v)switch(v=O,w.sendEvent("venmo.tokenize.desktop.status-change."+v.toLowerCase()),v){case"CREATED":break;case"EXPIRED":case"FAILED":case"CANCELED":var I=v==="CANCELED"?"The authorization was canceled":"Something went wrong";return w.displayError(I),w.Promise.reject({allowUIToHandleError:!0,reason:v});case"SCANNED":w.authorizing();break;case"APPROVED":return w.authorize(),w.Promise.resolve(x)}return new w.Promise(function(L,N){setTimeout(function(){w.pollForStatusChange(v,b).then(L).catch(N)},h)})}):this.Promise.resolve()},m.prototype.teardown=function(){this.bus.teardown(),this.iframe.parentNode&&this.iframe.parentNode.removeChild(this.iframe),this.alertBox.parentNode&&this.alertBox.parentNode.removeChild(this.alertBox)},m.prototype.setAlert=function(v){this.alertBox.style.display=v?"block":"none",this.alertBox.textContent=v},m.prototype.createPaymentContextFromGraphqlLegacyQRCodeMutation=function(v){return this.apiRequest(u.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY,{input:{environment:this.env,intent:v}}).then(function(b){return b.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext})},m.prototype.createPaymentContextFromGraphQL=function(v){var b={intent:v,paymentMethodUsage:this.paymentMethodUsage,customerClient:"DESKTOP"};return this.profileId&&(b.merchantProfileId=this.profileId),this.displayName&&(b.displayName=this.displayName),this.apiRequest(u.CREATE_PAYMENT_CONTEXT_QUERY,{input:b}).then(function(w){return w.createVenmoPaymentContext.venmoPaymentContext})},m.prototype.createVenmoDesktopPaymentContext=function(){var v=this,b=this.shouldUseLegacyQRCodeMutation?this.createPaymentContextFromGraphqlLegacyQRCodeMutation("PAY_FROM_APP"):this.createPaymentContextFromGraphQL("PAY_FROM_APP");return b.then(function(w){v.venmoContextId=w.id;var x=v.profileId||w.merchantId;return{id:w.id,status:w.status,merchantId:x,createdAt:w.createdAt,expiresAt:w.expiresAt}})},m.prototype.updateVenmoDesktopPaymentContext=function(v,b){if(b===void 0&&(b={}),!this.venmoContextId)return this.Promise.resolve();var w={input:i({id:this.venmoContextId,status:v},b)},x=this.shouldUseLegacyQRCodeMutation?u.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:u.UPDATE_PAYMENT_CONTEXT_QUERY;return this.apiRequest(x,w).then(function(){})},m.prototype.lookupVenmoDesktopPaymentContext=function(){if(!this.venmoContextId)return this.Promise.resolve();var v=this.shouldUseLegacyQRCodeMutation?u.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:u.VENMO_PAYMENT_CONTEXT_STATUS_QUERY;return this.apiRequest(v,{id:this.venmoContextId}).then(function(b){return b.node})},m}();a.default=f},{"../shared/events":94,"./queries":88,"@braintree/iframer":27,"@braintree/uuid":31,framebus:38}],90:[function(e,n,a){var i=e("../lib/analytics"),s=e("../lib/basic-component-verification"),o=e("../lib/create-deferred-client"),c=e("../lib/create-assets-url"),l=e("./shared/errors"),d=e("@braintree/wrap-promise"),u=e("../lib/braintree-error"),h=e("./venmo"),p=e("./shared/supports-venmo"),f="3.126.0";function m(b){var w="Venmo";return s.verify({name:w,client:b.client,authorization:b.authorization}).then(function(){var x,O;return b.profileId&&typeof b.profileId!="string"?Promise.reject(new u(l.VENMO_INVALID_PROFILE_ID)):b.deepLinkReturnUrl&&typeof b.deepLinkReturnUrl!="string"?Promise.reject(new u(l.VENMO_INVALID_DEEP_LINK_RETURN_URL)):(x=o.create({authorization:b.authorization,client:b.client,debug:b.debug,assetsUrl:c.create(b.authorization),name:w}).then(function(I){var L=I.getConfiguration();return b.client=I,L.gatewayConfiguration.payWithVenmo?I:Promise.reject(new u(l.VENMO_NOT_ENABLED))}),b.createPromise=x,O=new h(b),i.sendEvent(x,"venmo.initialized"),x.then(function(){return O}))})}function v(b){return p.isBrowserSupported(b)}n.exports={create:d(m),isBrowserSupported:v,VERSION:f}},{"../lib/analytics":55,"../lib/basic-component-verification":58,"../lib/braintree-error":59,"../lib/create-assets-url":62,"../lib/create-deferred-client":64,"./shared/errors":93,"./shared/supports-venmo":96,"./venmo":98,"@braintree/wrap-promise":35}],91:[function(e,n,a){var i=e("@braintree/browser-detection/is-android"),s=e("@braintree/browser-detection/is-chrome"),o=e("@braintree/browser-detection/is-ios"),c=e("@braintree/browser-detection/is-ios-safari"),l=e("@braintree/browser-detection/is-ios-webview"),d=e("@braintree/browser-detection/is-samsung");function u(){return i()&&window.navigator.userAgent.toLowerCase().indexOf("wv")>-1}function h(){return o()?l()||!c():!1}function p(){var m=window.navigator.userAgent.toLowerCase();return m.indexOf("huawei")>-1&&m.indexOf("fban")>-1?!0:i()?m.indexOf("fb_iab")>-1||m.indexOf("instagram")>-1:!1}function f(){return o()&&s()}n.exports={isAndroid:i,isAndroidWebview:u,isChrome:s,isIos:o,isIosChrome:f,isSamsung:d,isIosSafari:c,isIosWebview:l,isFacebookOwnedBrowserOnAndroid:p,doesNotSupportWindowOpenInIos:h}},{"@braintree/browser-detection/is-android":18,"@braintree/browser-detection/is-chrome":19,"@braintree/browser-detection/is-ios":23,"@braintree/browser-detection/is-ios-safari":20,"@braintree/browser-detection/is-ios-webview":21,"@braintree/browser-detection/is-samsung":24}],92:[function(e,n,a){n.exports={DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY:500,DEFAULT_PROCESS_RESULTS_DELAY:1e3,VENMO_APP_OR_MOBILE_AUTH_URL:"https://venmo.com/go/checkout",VENMO_MOBILE_APP_AUTH_ONLY_URL:"https://venmo.com/braintree/checkout",VENMO_WEB_LOGIN_URL:"https://account.venmo.com/go/web"}},{}],93:[function(e,n,a){var i=e("../../lib/braintree-error");n.exports={VENMO_NOT_ENABLED:{type:i.types.MERCHANT,code:"VENMO_NOT_ENABLED",message:"Venmo is not enabled for this merchant."},VENMO_TOKENIZATION_REQUEST_ACTIVE:{type:i.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_ACTIVE",message:"Another tokenization request is active."},VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE:{type:i.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE",message:"No tokenization in progress."},VENMO_APP_FAILED:{type:i.types.UNKNOWN,code:"VENMO_APP_FAILED",message:"Venmo app encountered a problem."},VENMO_APP_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_APP_CANCELED",message:"Venmo app authorization was canceled."},VENMO_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_CANCELED",message:"User canceled Venmo authorization, or Venmo app is not available."},VENMO_CUSTOMER_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_CUSTOMER_CANCELED",message:"User canceled Venmo authorization."},VENMO_NETWORK_ERROR:{type:i.types.NETWORK,code:"VENMO_NETWORK_ERROR",message:"Something went wrong making the request"},VENMO_DESKTOP_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_DESKTOP_CANCELED",message:"User canceled Venmo authorization by closing the Venmo Desktop modal."},VENMO_TOKENIZATION_CANCELED_BY_MERCHANT:{type:i.types.MERCHANT,code:"VENMO_TOKENIZATION_CANCELED_BY_MERCHANT",message:"The Venmo tokenization was canceled by the merchant."},VENMO_DESKTOP_UNKNOWN_ERROR:{type:i.types.UNKNOWN,code:"VENMO_DESKTOP_UNKNOWN_ERROR",message:"Something went wrong with the Venmo Desktop flow."},VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED:{type:i.types.NETWORK,code:"VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED",message:"Something went wrong creating the Venmo Payment Context."},VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR:{type:i.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR",message:"Something went wrong during mobile polling."},VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED:{type:i.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED",message:"The Venmo authorization request is expired."},VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED",message:"The Venmo authorization was canceled"},VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT:{type:i.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT",message:"Customer took too long to authorize Venmo payment."},VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID:{type:i.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID",message:"No Venmo payment context ID available."},VENMO_MOBILE_POLLING_TOKENIZATION_FAILED:{type:i.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_FAILED",message:"The Venmo authorization failed."},VENMO_INVALID_PROFILE_ID:{type:i.types.MERCHANT,code:"VENMO_INVALID_PROFILE_ID",message:"Venmo profile ID is invalid."},VENMO_INVALID_DEEP_LINK_RETURN_URL:{type:i.types.MERCHANT,code:"VENMO_INVALID_DEEP_LINK_RETURN_URL",message:"Venmo deep link return URL is invalid."},VENMO_TOKENIZATION_FAILED:{type:i.types.UNKNOWN,code:"VENMO_TOKENIZATION_FAILED",message:"Venmo encountered a problem"},VENMO_ECD_DISABLED:{type:i.types.MERCHANT,code:"ECD_DISABLED",message:"Cannot collect customer data when ECD is disabled. Enable this feature in the Control Panel to collect this data."}}},{"../../lib/braintree-error":59}],94:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.VENMO_DESKTOP_UNKNOWN_ERROR=a.VENMO_DESKTOP_REQUEST_NEW_QR_CODE=a.VENMO_DESKTOP_CLOSED_FROM_PARENT=a.VENMO_DESKTOP_IFRAME_READY=a.VENMO_DESKTOP_DISPLAY_QR_CODE=a.VENMO_DESKTOP_DISPLAY_ERROR=a.VENMO_DESKTOP_CUSTOMER_CANCELED=a.VENMO_DESKTOP_AUTHORIZING=a.VENMO_DESKTOP_AUTHORIZE=a.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT=void 0,a.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT="VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT",a.VENMO_DESKTOP_AUTHORIZE="VENMO_DESKTOP_AUTHORIZE",a.VENMO_DESKTOP_AUTHORIZING="VENMO_DESKTOP_AUTHORIZING",a.VENMO_DESKTOP_CUSTOMER_CANCELED="VENMO_DESKTOP_CUSTOMER_CANCELED",a.VENMO_DESKTOP_DISPLAY_ERROR="VENMO_DESKTOP_DISPLAY_ERROR",a.VENMO_DESKTOP_DISPLAY_QR_CODE="VENMO_DESKTOP_DISPLAY_QR_CODE",a.VENMO_DESKTOP_IFRAME_READY="VENMO_DESKTOP_IFRAME_READY",a.VENMO_DESKTOP_CLOSED_FROM_PARENT="VENMO_DESKTOP_CLOSED_FROM_PARENT",a.VENMO_DESKTOP_REQUEST_NEW_QR_CODE="VENMO_DESKTOP_REQUEST_NEW_QR_CODE",a.VENMO_DESKTOP_UNKNOWN_ERROR="VENMO_DESKTOP_UNKNOWN_ERROR"},{}],95:[function(e,n,a){var i=e("./constants");function s(o){return o.useAllowDesktopWebLogin?i.VENMO_WEB_LOGIN_URL:o.mobileWebFallBack?i.VENMO_APP_OR_MOBILE_AUTH_URL:i.VENMO_MOBILE_APP_AUTH_ONLY_URL}n.exports=s},{"./constants":92}],96:[function(e,n,a){var i=e("./browser-detection"),s=e("../../lib/in-iframe");function o(c){var l,d,u,h,p,f=i.isAndroid(),m=f||i.isIos(),v=f&&i.isChrome(),b=i.isIosSafari()||v;return c=c||{},d=(c.allowDesktopWebLogin||c.allowDesktop)===!0,h=c.hasOwnProperty("allowNewBrowserTab")?c.allowNewBrowserTab:!0,p=c.hasOwnProperty("allowWebviews")?c.allowWebviews:!0,u=h&&!s(),l=!u&&i.isIosChrome()||i.isFacebookOwnedBrowserOnAndroid()||i.isSamsung(),l||!p&&(i.isAndroidWebview()||i.isIosWebview())?!1:m?h?m:b:d}n.exports={isBrowserSupported:o}},{"../../lib/in-iframe":78,"./browser-detection":91}],97:[function(e,n,a){var i=e("../../lib/frame-service/external"),s=e("../../lib/use-min"),o=e("@braintree/extended-promise"),c=e("../shared/errors"),l=e("../../lib/braintree-error"),d="3.126.0",u=`<svg width="198" height="58" viewBox="0 0 198 58" fill="none" xmlns="http://www.w3.org/2000/svg">
319
+ }`},{}],89:[function(e,n,a){var i=this&&this.__assign||function(){return i=Object.assign||function(m){for(var v,b=1,C=arguments.length;b<C;b++){v=arguments[b];for(var x in v)Object.prototype.hasOwnProperty.call(v,x)&&(m[x]=v[x])}return m},i.apply(this,arguments)},s=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(a,"__esModule",{value:!0});var o=s(e("framebus")),c=s(e("@braintree/iframer")),l=s(e("@braintree/uuid")),d=e("../shared/events"),u=e("./queries"),h=1e3,p=2e3,f=function(){function m(v){this.isHidden=!0,this.env=v.environment,this.id=l.default(),this.profileId=v.profileId,this.displayName=v.displayName,this.paymentMethodUsage=v.paymentMethodUsage,this.shouldUseLegacyQRCodeMutation=!this.paymentMethodUsage;var b=v.url+"#"+this.env+"_"+this.id;this.bus=new o.default({channel:this.id,verifyDomain:v.verifyDomain,targetFrames:[]}),this.apiRequest=v.apiRequest,this.sendEvent=v.sendEvent,this.Promise=v.Promise,this.alertBox=document.createElement("div"),this.alertBox.setAttribute("data-venmo-desktop-id",this.id),this.alertBox.setAttribute("role","alert"),this.alertBox.style.position="fixed",this.alertBox.style.display="none",this.alertBox.style.height="1px",this.alertBox.style.width="1px",this.alertBox.style.overflow="hidden",this.alertBox.style.zIndex="0",this.iframe=c.default({src:b,name:"venmo-desktop-iframe",style:{display:"none",position:"fixed",top:"0",bottom:"0",right:"0",left:"0",height:"100%",width:"100%",zIndex:"9999999"},title:"Venmo Desktop"}),this.bus.addTargetFrame(this.iframe)}return m.prototype.initialize=function(){var v=this;return new this.Promise(function(b){v.bus.on(d.VENMO_DESKTOP_IFRAME_READY,function(){b(v)}),v.bus.on(d.VENMO_DESKTOP_REQUEST_NEW_QR_CODE,function(){v.sendEvent("venmo.tokenize.desktop.restarted-from-error-view"),v.startPolling()}),document.body.appendChild(v.iframe),document.body.appendChild(v.alertBox)})},m.prototype.launchDesktopFlow=function(){var v=this;this.isHidden=!1;var b=new this.Promise(function(C,x){v.launchDesktopPromiseRejectFunction=x;var N=function(){v.bus.off(d.VENMO_DESKTOP_CUSTOMER_CANCELED,L),v.bus.off(d.VENMO_DESKTOP_UNKNOWN_ERROR,I)},I=function(O){N(),v.sendEvent("venmo.tokenize.desktop.unknown-error"),x({allowUIToHandleError:!1,reason:"UNKNOWN_ERROR",err:O})},L=function(){N(),v.updateVenmoDesktopPaymentContext("CANCELED"),v.sendEvent("venmo.tokenize.desktop.status-change.canceled-from-modal"),x({allowUIToHandleError:!1,reason:"CUSTOMER_CANCELED"})};v.completedHandler=function(O){N(),C(O)},v.bus.on(d.VENMO_DESKTOP_CUSTOMER_CANCELED,L),v.bus.on(d.VENMO_DESKTOP_UNKNOWN_ERROR,I)});return this.iframe.style.display="block",this.setAlert("Generating a QR code, get your Venmo app ready"),this.iframe.focus(),this.startPolling(),b.then(function(C){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,C}).catch(function(C){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,v.Promise.reject(C)})},m.prototype.triggerCompleted=function(v){var b=this;this.isHidden||setTimeout(function(){b.completedHandler&&b.completedHandler(v),delete b.completedHandler},p)},m.prototype.triggerRejected=function(v){this.launchDesktopPromiseRejectFunction&&this.launchDesktopPromiseRejectFunction(v)},m.prototype.hideDesktopFlow=function(){this.setAlert(""),this.iframe.style.display="none",this.bus.emit(d.VENMO_DESKTOP_CLOSED_FROM_PARENT),this.isHidden=!0},m.prototype.displayError=function(v){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_ERROR,{message:v}),this.setAlert(v))},m.prototype.displayQRCode=function(v,b){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_QR_CODE,{id:v,merchantId:b}),this.setAlert("To scan the QR code, open your Venmo app"))},m.prototype.authorize=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZE),this.setAlert("Venmo account authorized"))},m.prototype.authorizing=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZING),this.setAlert("Authorize on your Venmo app"))},m.prototype.startPolling=function(){var v=this;return this.createVenmoDesktopPaymentContext().then(function(b){var C=new Date(b.expiresAt).getTime()-new Date(b.createdAt).getTime(),x=Date.now()+C;return v.displayQRCode(b.id,b.merchantId),v.pollForStatusChange(b.status,x)}).then(function(b){if(b){var C=b.userName||"";C="@"+C.replace("@",""),v.triggerCompleted({paymentMethodNonce:b.paymentMethodId,username:C,payerInfo:b.payerInfo,id:v.venmoContextId||""})}}).catch(function(b){b.allowUIToHandleError||(v.sendEvent("venmo.tokenize.desktop.unhandled-error"),v.triggerRejected(b))})},m.prototype.pollForStatusChange=function(v,b){var C=this;return this.venmoContextId?Date.now()>b?this.updateVenmoDesktopPaymentContext("EXPIRED").then(function(){return C.displayError("Something went wrong"),C.sendEvent("venmo.tokenize.desktop.status-change.sdk-timeout"),C.Promise.reject({allowUIToHandleError:!0,reason:"TIMEOUT"})}):this.lookupVenmoDesktopPaymentContext().then(function(x){if(!C.venmoContextId||!x)return C.Promise.resolve();var N=x.status;if(N!==v)switch(v=N,C.sendEvent("venmo.tokenize.desktop.status-change."+v.toLowerCase()),v){case"CREATED":break;case"EXPIRED":case"FAILED":case"CANCELED":var I=v==="CANCELED"?"The authorization was canceled":"Something went wrong";return C.displayError(I),C.Promise.reject({allowUIToHandleError:!0,reason:v});case"SCANNED":C.authorizing();break;case"APPROVED":return C.authorize(),C.Promise.resolve(x)}return new C.Promise(function(L,O){setTimeout(function(){C.pollForStatusChange(v,b).then(L).catch(O)},h)})}):this.Promise.resolve()},m.prototype.teardown=function(){this.bus.teardown(),this.iframe.parentNode&&this.iframe.parentNode.removeChild(this.iframe),this.alertBox.parentNode&&this.alertBox.parentNode.removeChild(this.alertBox)},m.prototype.setAlert=function(v){this.alertBox.style.display=v?"block":"none",this.alertBox.textContent=v},m.prototype.createPaymentContextFromGraphqlLegacyQRCodeMutation=function(v){return this.apiRequest(u.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY,{input:{environment:this.env,intent:v}}).then(function(b){return b.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext})},m.prototype.createPaymentContextFromGraphQL=function(v){var b={intent:v,paymentMethodUsage:this.paymentMethodUsage,customerClient:"DESKTOP"};return this.profileId&&(b.merchantProfileId=this.profileId),this.displayName&&(b.displayName=this.displayName),this.apiRequest(u.CREATE_PAYMENT_CONTEXT_QUERY,{input:b}).then(function(C){return C.createVenmoPaymentContext.venmoPaymentContext})},m.prototype.createVenmoDesktopPaymentContext=function(){var v=this,b=this.shouldUseLegacyQRCodeMutation?this.createPaymentContextFromGraphqlLegacyQRCodeMutation("PAY_FROM_APP"):this.createPaymentContextFromGraphQL("PAY_FROM_APP");return b.then(function(C){v.venmoContextId=C.id;var x=v.profileId||C.merchantId;return{id:C.id,status:C.status,merchantId:x,createdAt:C.createdAt,expiresAt:C.expiresAt}})},m.prototype.updateVenmoDesktopPaymentContext=function(v,b){if(b===void 0&&(b={}),!this.venmoContextId)return this.Promise.resolve();var C={input:i({id:this.venmoContextId,status:v},b)},x=this.shouldUseLegacyQRCodeMutation?u.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:u.UPDATE_PAYMENT_CONTEXT_QUERY;return this.apiRequest(x,C).then(function(){})},m.prototype.lookupVenmoDesktopPaymentContext=function(){if(!this.venmoContextId)return this.Promise.resolve();var v=this.shouldUseLegacyQRCodeMutation?u.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:u.VENMO_PAYMENT_CONTEXT_STATUS_QUERY;return this.apiRequest(v,{id:this.venmoContextId}).then(function(b){return b.node})},m}();a.default=f},{"../shared/events":94,"./queries":88,"@braintree/iframer":27,"@braintree/uuid":31,framebus:38}],90:[function(e,n,a){var i=e("../lib/analytics"),s=e("../lib/basic-component-verification"),o=e("../lib/create-deferred-client"),c=e("../lib/create-assets-url"),l=e("./shared/errors"),d=e("@braintree/wrap-promise"),u=e("../lib/braintree-error"),h=e("./venmo"),p=e("./shared/supports-venmo"),f="3.126.0";function m(b){var C="Venmo";return s.verify({name:C,client:b.client,authorization:b.authorization}).then(function(){var x,N;return b.profileId&&typeof b.profileId!="string"?Promise.reject(new u(l.VENMO_INVALID_PROFILE_ID)):b.deepLinkReturnUrl&&typeof b.deepLinkReturnUrl!="string"?Promise.reject(new u(l.VENMO_INVALID_DEEP_LINK_RETURN_URL)):(x=o.create({authorization:b.authorization,client:b.client,debug:b.debug,assetsUrl:c.create(b.authorization),name:C}).then(function(I){var L=I.getConfiguration();return b.client=I,L.gatewayConfiguration.payWithVenmo?I:Promise.reject(new u(l.VENMO_NOT_ENABLED))}),b.createPromise=x,N=new h(b),i.sendEvent(x,"venmo.initialized"),x.then(function(){return N}))})}function v(b){return p.isBrowserSupported(b)}n.exports={create:d(m),isBrowserSupported:v,VERSION:f}},{"../lib/analytics":55,"../lib/basic-component-verification":58,"../lib/braintree-error":59,"../lib/create-assets-url":62,"../lib/create-deferred-client":64,"./shared/errors":93,"./shared/supports-venmo":96,"./venmo":98,"@braintree/wrap-promise":35}],91:[function(e,n,a){var i=e("@braintree/browser-detection/is-android"),s=e("@braintree/browser-detection/is-chrome"),o=e("@braintree/browser-detection/is-ios"),c=e("@braintree/browser-detection/is-ios-safari"),l=e("@braintree/browser-detection/is-ios-webview"),d=e("@braintree/browser-detection/is-samsung");function u(){return i()&&window.navigator.userAgent.toLowerCase().indexOf("wv")>-1}function h(){return o()?l()||!c():!1}function p(){var m=window.navigator.userAgent.toLowerCase();return m.indexOf("huawei")>-1&&m.indexOf("fban")>-1?!0:i()?m.indexOf("fb_iab")>-1||m.indexOf("instagram")>-1:!1}function f(){return o()&&s()}n.exports={isAndroid:i,isAndroidWebview:u,isChrome:s,isIos:o,isIosChrome:f,isSamsung:d,isIosSafari:c,isIosWebview:l,isFacebookOwnedBrowserOnAndroid:p,doesNotSupportWindowOpenInIos:h}},{"@braintree/browser-detection/is-android":18,"@braintree/browser-detection/is-chrome":19,"@braintree/browser-detection/is-ios":23,"@braintree/browser-detection/is-ios-safari":20,"@braintree/browser-detection/is-ios-webview":21,"@braintree/browser-detection/is-samsung":24}],92:[function(e,n,a){n.exports={DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY:500,DEFAULT_PROCESS_RESULTS_DELAY:1e3,VENMO_APP_OR_MOBILE_AUTH_URL:"https://venmo.com/go/checkout",VENMO_MOBILE_APP_AUTH_ONLY_URL:"https://venmo.com/braintree/checkout",VENMO_WEB_LOGIN_URL:"https://account.venmo.com/go/web"}},{}],93:[function(e,n,a){var i=e("../../lib/braintree-error");n.exports={VENMO_NOT_ENABLED:{type:i.types.MERCHANT,code:"VENMO_NOT_ENABLED",message:"Venmo is not enabled for this merchant."},VENMO_TOKENIZATION_REQUEST_ACTIVE:{type:i.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_ACTIVE",message:"Another tokenization request is active."},VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE:{type:i.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE",message:"No tokenization in progress."},VENMO_APP_FAILED:{type:i.types.UNKNOWN,code:"VENMO_APP_FAILED",message:"Venmo app encountered a problem."},VENMO_APP_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_APP_CANCELED",message:"Venmo app authorization was canceled."},VENMO_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_CANCELED",message:"User canceled Venmo authorization, or Venmo app is not available."},VENMO_CUSTOMER_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_CUSTOMER_CANCELED",message:"User canceled Venmo authorization."},VENMO_NETWORK_ERROR:{type:i.types.NETWORK,code:"VENMO_NETWORK_ERROR",message:"Something went wrong making the request"},VENMO_DESKTOP_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_DESKTOP_CANCELED",message:"User canceled Venmo authorization by closing the Venmo Desktop modal."},VENMO_TOKENIZATION_CANCELED_BY_MERCHANT:{type:i.types.MERCHANT,code:"VENMO_TOKENIZATION_CANCELED_BY_MERCHANT",message:"The Venmo tokenization was canceled by the merchant."},VENMO_DESKTOP_UNKNOWN_ERROR:{type:i.types.UNKNOWN,code:"VENMO_DESKTOP_UNKNOWN_ERROR",message:"Something went wrong with the Venmo Desktop flow."},VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED:{type:i.types.NETWORK,code:"VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED",message:"Something went wrong creating the Venmo Payment Context."},VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR:{type:i.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR",message:"Something went wrong during mobile polling."},VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED:{type:i.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED",message:"The Venmo authorization request is expired."},VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED:{type:i.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED",message:"The Venmo authorization was canceled"},VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT:{type:i.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT",message:"Customer took too long to authorize Venmo payment."},VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID:{type:i.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID",message:"No Venmo payment context ID available."},VENMO_MOBILE_POLLING_TOKENIZATION_FAILED:{type:i.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_FAILED",message:"The Venmo authorization failed."},VENMO_INVALID_PROFILE_ID:{type:i.types.MERCHANT,code:"VENMO_INVALID_PROFILE_ID",message:"Venmo profile ID is invalid."},VENMO_INVALID_DEEP_LINK_RETURN_URL:{type:i.types.MERCHANT,code:"VENMO_INVALID_DEEP_LINK_RETURN_URL",message:"Venmo deep link return URL is invalid."},VENMO_TOKENIZATION_FAILED:{type:i.types.UNKNOWN,code:"VENMO_TOKENIZATION_FAILED",message:"Venmo encountered a problem"},VENMO_ECD_DISABLED:{type:i.types.MERCHANT,code:"ECD_DISABLED",message:"Cannot collect customer data when ECD is disabled. Enable this feature in the Control Panel to collect this data."}}},{"../../lib/braintree-error":59}],94:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.VENMO_DESKTOP_UNKNOWN_ERROR=a.VENMO_DESKTOP_REQUEST_NEW_QR_CODE=a.VENMO_DESKTOP_CLOSED_FROM_PARENT=a.VENMO_DESKTOP_IFRAME_READY=a.VENMO_DESKTOP_DISPLAY_QR_CODE=a.VENMO_DESKTOP_DISPLAY_ERROR=a.VENMO_DESKTOP_CUSTOMER_CANCELED=a.VENMO_DESKTOP_AUTHORIZING=a.VENMO_DESKTOP_AUTHORIZE=a.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT=void 0,a.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT="VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT",a.VENMO_DESKTOP_AUTHORIZE="VENMO_DESKTOP_AUTHORIZE",a.VENMO_DESKTOP_AUTHORIZING="VENMO_DESKTOP_AUTHORIZING",a.VENMO_DESKTOP_CUSTOMER_CANCELED="VENMO_DESKTOP_CUSTOMER_CANCELED",a.VENMO_DESKTOP_DISPLAY_ERROR="VENMO_DESKTOP_DISPLAY_ERROR",a.VENMO_DESKTOP_DISPLAY_QR_CODE="VENMO_DESKTOP_DISPLAY_QR_CODE",a.VENMO_DESKTOP_IFRAME_READY="VENMO_DESKTOP_IFRAME_READY",a.VENMO_DESKTOP_CLOSED_FROM_PARENT="VENMO_DESKTOP_CLOSED_FROM_PARENT",a.VENMO_DESKTOP_REQUEST_NEW_QR_CODE="VENMO_DESKTOP_REQUEST_NEW_QR_CODE",a.VENMO_DESKTOP_UNKNOWN_ERROR="VENMO_DESKTOP_UNKNOWN_ERROR"},{}],95:[function(e,n,a){var i=e("./constants");function s(o){return o.useAllowDesktopWebLogin?i.VENMO_WEB_LOGIN_URL:o.mobileWebFallBack?i.VENMO_APP_OR_MOBILE_AUTH_URL:i.VENMO_MOBILE_APP_AUTH_ONLY_URL}n.exports=s},{"./constants":92}],96:[function(e,n,a){var i=e("./browser-detection"),s=e("../../lib/in-iframe");function o(c){var l,d,u,h,p,f=i.isAndroid(),m=f||i.isIos(),v=f&&i.isChrome(),b=i.isIosSafari()||v;return c=c||{},d=(c.allowDesktopWebLogin||c.allowDesktop)===!0,h=c.hasOwnProperty("allowNewBrowserTab")?c.allowNewBrowserTab:!0,p=c.hasOwnProperty("allowWebviews")?c.allowWebviews:!0,u=h&&!s(),l=!u&&i.isIosChrome()||i.isFacebookOwnedBrowserOnAndroid()||i.isSamsung(),l||!p&&(i.isAndroidWebview()||i.isIosWebview())?!1:m?h?m:b:d}n.exports={isBrowserSupported:o}},{"../../lib/in-iframe":78,"./browser-detection":91}],97:[function(e,n,a){var i=e("../../lib/frame-service/external"),s=e("../../lib/use-min"),o=e("@braintree/extended-promise"),c=e("../shared/errors"),l=e("../../lib/braintree-error"),d="3.126.0",u=`<svg width="198" height="58" viewBox="0 0 198 58" fill="none" xmlns="http://www.w3.org/2000/svg">
320
320
  <path fill-rule="evenodd" clip-rule="evenodd" d="M43.0702 13.6572C44.1935 15.4585 44.6999 17.3139 44.6999 19.6576C44.6999 27.1328 38.1277 36.8436 32.7935 43.6625H20.6099L15.7236 15.2939L26.3917 14.3105L28.9751 34.4966C31.389 30.6783 34.3678 24.6779 34.3678 20.587C34.3678 18.3477 33.9727 16.8225 33.3553 15.5666L43.0702 13.6572Z" fill="white"/>
321
321
  <path fill-rule="evenodd" clip-rule="evenodd" d="M56.8965 26.1491C58.8596 26.1491 63.8018 25.2772 63.8018 22.5499C63.8018 21.2402 62.8481 20.587 61.7242 20.587C59.7579 20.587 57.1776 22.8763 56.8965 26.1491ZM56.6715 31.5506C56.6715 34.8807 58.5787 36.1873 61.107 36.1873C63.8603 36.1873 66.4966 35.534 69.923 33.8433L68.6324 42.3523C66.2183 43.4976 62.4559 44.2617 58.8039 44.2617C49.5403 44.2617 46.2249 38.8071 46.2249 31.9879C46.2249 23.1496 51.6179 13.765 62.7365 13.765C68.858 13.765 72.2809 17.0949 72.2809 21.7317C72.2815 29.2066 62.4005 31.4965 56.6715 31.5506Z" fill="white"/>
322
322
  <path fill-rule="evenodd" clip-rule="evenodd" d="M103.067 20.3142C103.067 21.4052 102.897 22.9875 102.727 24.0216L99.5262 43.6622H89.1385L92.0585 25.658C92.1139 25.1696 92.284 24.1865 92.284 23.6411C92.284 22.3314 91.4414 22.0047 90.4282 22.0047C89.0826 22.0047 87.7337 22.6042 86.8354 23.0418L83.5234 43.6625H73.0772L77.8495 14.257H86.8908L87.0052 16.6041C89.1382 15.2404 91.9469 13.7656 95.932 13.7656C101.212 13.765 103.067 16.3845 103.067 20.3142Z" fill="white"/>
323
323
  <path fill-rule="evenodd" clip-rule="evenodd" d="M133.906 16.9841C136.881 14.9131 139.69 13.765 143.563 13.765C148.897 13.765 150.753 16.3845 150.753 20.3142C150.753 21.4052 150.583 22.9875 150.413 24.0216L147.216 43.6622H136.825L139.801 25.2774C139.855 24.786 139.971 24.1865 139.971 23.8063C139.971 22.3317 139.128 22.0047 138.115 22.0047C136.824 22.0047 135.535 22.5501 134.577 23.0418L131.266 43.6625H120.878L123.854 25.2777C123.908 24.7863 124.02 24.1868 124.02 23.8065C124.02 22.332 123.177 22.0049 122.167 22.0049C120.819 22.0049 119.473 22.6045 118.574 23.0421L115.26 43.6628H104.817L109.589 14.2573H118.52L118.8 16.7122C120.878 15.241 123.684 13.7662 127.446 13.7662C130.704 13.765 132.837 15.129 133.906 16.9841Z" fill="white"/>
324
324
  <path fill-rule="evenodd" clip-rule="evenodd" d="M171.426 25.5502C171.426 23.1496 170.808 21.513 168.956 21.513C164.857 21.513 164.015 28.55 164.015 32.1498C164.015 34.8807 164.802 36.5709 166.653 36.5709C170.528 36.5709 171.426 29.1497 171.426 25.5502ZM153.458 31.7152C153.458 22.442 158.511 13.765 170.136 13.765C178.896 13.765 182.098 18.7854 182.098 25.7148C182.098 34.8805 177.099 44.3723 165.194 44.3723C156.378 44.3723 153.458 38.7525 153.458 31.7152Z" fill="white"/>
325
- </svg>`,h="Tap cancel payment to cancel and return to the business. Continue payment will relaunch the payment window.",p=400,f=570,m={backdrop:"venmo-desktop-web-backdrop",backdropHidden:"venmo-desktop-web-backdrop.hidden",backdropContainer:"venmo-backdrop-container",cancelButton:"venmo-popup-cancel-button",continueButton:"venmo-popup-continue-button",message:"venmo-message",instructions:"venmo-instructions",venmoLogo:"venmo-full-logo"};o.suppressUnhandledPromiseMessage=!0;function v(N){var S=N.frameServiceInstance,B=N.venmoUrl,G=N.checkForStatusChange,$=N.cancelTokenization,F=N.checkPaymentContextStatus,j=new o;return document.getElementById(m.continueButton).addEventListener("click",function(){S.focus()}),document.getElementById(m.cancelButton).addEventListener("click",function(){S.close(),$(),w()}),S.open({},function(H){var ee=1;H?j.reject(H):G(ee).then(function(M){j.resolve(M)}).catch(function(M){F().then(function(q){q.status==="CREATED"?j.reject(new l(c.VENMO_CUSTOMER_CANCELED)):j.reject(M)})}),S.close(),w()}),S.redirect(B),j}function b(){var N=Math.round((window.outerHeight-f)/2)+window.screenTop,S=Math.round((window.outerWidth-p)/2)+window.screenLeft;return{top:N,left:S}}function w(){document.getElementById("venmo-desktop-web-backdrop").classList.add("hidden")}function x(){var N=["#"+m.backdropHidden+" {","display: none;","}","#"+m.backdrop+" {","z-index: 3141592632;","cursor: pointer;","position: fixed;","top: 0;","left: 0;","bottom: 0;","width: 100%;","background: rgba(0, 0, 0, 0.8);","}"],S=["#"+m.backdropContainer+" {","display: flex;","align-content: center;","justify-content: center;","align-items: center;","width: 100%;","height: 100%;","flex-direction: column;","}"],B=["#"+m.cancelButton+" {","height: 24px;","width: 380px;","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 700;","font-size: 18px;","line-height: 24px;","text-align: center;","background-color: transparent;","border: none;","color: #FFFFFF;","margin-top: 28px;","}"],G=["#"+m.continueButton+" {","width: 400px;","height: 50px;","background: #0074DE;","border-radius: 24px;","border: none;","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 700;","font-size: 18px;","color: #FFFFFF;","margin-top: 44px;","}"],$=["#"+m.message+" {","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 500;","font-size: 24px;","line-height: 32px;","text-align: center;","color: #FFFFFF;","margin-top: 32px;","}"],F=["#"+m.instructions+" {","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 400;","font-size: 16px;","line-height: 20px;","text-align: center;","color: #FFFFFF;","margin-top: 16px;","width: 400px;","}"],j=N.concat(S,B,G,$,F);return j.join(`
326
- `)}function O(N){var S=document.getElementById(m.backdrop),B,G,$,F,j,H,ee,M;if(S){S.classList.remove("hidden");return}B=document.createElement("style"),G=document.createElement("div"),$=document.createElement("div"),F=document.createElement("div"),j=document.createElement("div"),H=document.createElement("div"),ee=document.createElement("button"),M=document.createElement("button"),N&&(B.nonce=N),B.id="venmo-desktop-web__injected-styles",B.innerHTML=x(),G.id=m.backdrop,$.id=m.backdropContainer,F.id=m.venmoLogo,F.innerHTML=u,j.id=m.message,j.innerText="What would you like to do?",H.id=m.instructions,H.innerText=h,ee.id=m.continueButton,ee.innerText="Continue payment",M.id=m.cancelButton,M.innerText="Cancel payment",document.head.appendChild(B),$.appendChild(F),$.appendChild(j),$.appendChild(H),$.appendChild(ee),$.appendChild(M),G.appendChild($),document.body.appendChild(G),G.addEventListener("click",function(q){q.stopPropagation()})}function I(N){return O(N.styleCspNonce),v(N)}function L(N){var S=new o,B="venmoDesktopWebLogin",G=N.assetsUrl,$=N.debug||!1,F=b(),j=G+"/web/"+d+"/html";return i.create({name:B,dispatchFrameUrl:j+"/dispatch-frame"+s($)+".html",openFrameUrl:j+"/venmo-landing-frame"+s($)+".html",top:F.top,left:F.left,height:f,width:p},function(H){S.resolve(H)}),S}n.exports={runWebLogin:I,openPopup:v,setupDesktopWebLogin:L,POPUP_WIDTH:p,POPUP_HEIGHT:f}},{"../../lib/braintree-error":59,"../../lib/frame-service/external":68,"../../lib/use-min":85,"../shared/errors":93,"@braintree/extended-promise":26}],98:[function(e,n,a){var i=e("../lib/analytics"),s=e("../lib/assign").assign,o=e("./shared/supports-venmo"),c=e("./shared/browser-detection"),l=e("./shared/constants"),d=e("./shared/errors"),u=e("../lib/querystring"),h=e("../lib/is-verified-domain"),p=e("../lib/methods"),f=e("../lib/convert-methods-to-error"),m=e("@braintree/wrap-promise"),v=e("../lib/braintree-error"),b=e("../lib/in-iframe"),w=e("@braintree/extended-promise"),x=e("./shared/get-venmo-url"),O=e("./shared/web-login-backdrop"),I=e("../lib/snake-case-to-camel-case"),L=e("../lib/url-params"),N=e("./external/"),S=e("./external/queries"),B="3.126.0",G=250,$=3e5;w.suppressUnhandledPromiseMessage=!0;function F(E){var g=this;this._allowDesktopWebLogin=E.allowDesktopWebLogin||!1,this._mobileWebFallBack=E.mobileWebFallBack||!1,this._createPromise=E.createPromise,this._allowNewBrowserTab=E.allowNewBrowserTab!==!1,this._allowWebviews=E.allowWebviews!==!1,this._allowDesktop=E.allowDesktop===!0,this._useRedirectForIOS=E.useRedirectForIOS===!0,this._profileId=E.profileId,this._displayName=E.displayName,this._deepLinkReturnUrl=E.deepLinkReturnUrl,this._ignoreHistoryChanges=E.ignoreHistoryChanges,this._paymentMethodUsage=(E.paymentMethodUsage||"").toUpperCase(),this._shouldUseLegacyFlow=!this._paymentMethodUsage,this._requireManualReturn=E.requireManualReturn===!0,this._useDesktopQRFlow=this._allowDesktop&&this._isDesktop()&&!this._allowDesktopWebLogin,this._useAllowDesktopWebLogin=this._allowDesktopWebLogin&&this._isDesktop(),this._cannotHaveReturnUrls=b()||this._requireManualReturn,this._allowAndroidRecreation=E.allowAndroidRecreation!==!1,this._maxRetryCount=3,this._collectCustomerBillingAddress=E.collectCustomerBillingAddress||!1,this._collectCustomerShippingAddress=E.collectCustomerShippingAddress||!1,this._isFinalAmount=E.isFinalAmount||!1,this._lineItems=E.lineItems,this._subTotalAmount=E.subTotalAmount,this._discountAmount=E.discountAmount,this._taxAmount=E.taxAmount,this._shippingAmount=E.shippingAmount,this._totalAmount=E.totalAmount,this._cspNonce=(this._mobileWebFallBack||this._allowDesktopWebLogin)&&(E.styleCspNonce||!1),this._shouldCreateVenmoPaymentContext=this._cannotHaveReturnUrls||!this._shouldUseLegacyFlow,i.sendEvent(this._createPromise,"venmo.desktop-flow.configured."+String(!!this._allowDesktop)),this.hasTokenizationResult()?i.sendEvent(this._createPromise,"venmo.appswitch.return-in-new-tab"):this._useDesktopQRFlow?this._createPromise=this._createPromise.then(function(R){var V=R.getConfiguration().gatewayConfiguration;return N({url:V.assetsUrl+"/web/"+B+"/html/venmo-desktop-frame.html",environment:V.environment==="production"?"PRODUCTION":"SANDBOX",profileId:g._profileId||V.payWithVenmo.merchantId,paymentMethodUsage:g._paymentMethodUsage,displayName:g._displayName,Promise,apiRequest:function(y,T){return R.request({api:"graphQLApi",data:{query:y,variables:T}}).then(function(_){return _.data})},sendEvent:function(y){i.sendEvent(g._createPromise,y)},verifyDomain:h}).then(function(y){return g._venmoDesktopInstance=y,i.sendEvent(g._createPromise,"venmo.desktop-flow.presented"),R}).catch(function(){return i.sendEvent(g._createPromise,"venmo.desktop-flow.setup-failed"),g._useDesktopQRFlow=!1,R})}):this._shouldCreateVenmoPaymentContext&&(this._mobilePollingInterval=G,this._mobilePollingExpiresThreshold=$,this._createPromise=this._createPromise.then(function(R){var V,y,T=g._cannotHaveReturnUrls?"manual-return":"mobile-payment-context",_=R.getConfiguration();return y=O.setupDesktopWebLogin({assetsUrl:_.gatewayConfiguration.assetsUrl,debug:_.isDebug}).then(function(P){g._frameServiceInstance=P}).catch(function(P){return P}),g._mobilePollingContextEnvironment=_.gatewayConfiguration.environment.toUpperCase(),V=g._createVenmoPaymentContext(R).then(function(){return i.sendEvent(g._createPromise,"venmo."+T+".presented"),R}).catch(function(P){return i.sendEvent(g._createPromise,"venmo."+T+".setup-failed"),Promise.reject(new v({type:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.type,code:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.code,message:j(P)?P.details.originalError[0].message:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.message,details:{originalError:P}}))}),w.all([y,V]).then(function(P){var D=P[1];return Promise.resolve(D)}).catch(function(P){return Promise.reject(P)})}))}function j(E){return E.details&&E.details.originalError&&E.details.originalError[0]&&E.details.originalError[0].extensions&&E.details.originalError[0].extensions.errorClass==="VALIDATION"&&E.details.originalError[0].extensions.errorType==="user_error"}F.prototype._createVenmoPaymentContext=function(E,g){var R=this,V,y,T=E.getConfiguration(),_=T.gatewayConfiguration.payWithVenmo,P=!1,D=R._useAllowDesktopWebLogin?"NATIVE_WEB":"MOBILE_WEB";if(!this._shouldCreateVenmoPaymentContext)return Promise.resolve();if(this._shouldUseLegacyFlow)V=E.request({api:"graphQLApi",data:{query:S.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{environment:this._mobilePollingContextEnvironment,intent:"PAY_FROM_APP"}}}}).then(function(C){return C.data.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext});else{if((this._collectCustomerBillingAddress||this._collectCustomerShippingAddress)&&!_.enrichedCustomerDataEnabled)return Promise.reject(new v(d.VENMO_ECD_DISABLED));this._lineItems&&this._lineItems.forEach(function(C){C.unitTaxAmount=C.unitTaxAmount||"0"}),y={subTotalAmount:this._subTotalAmount,discountAmount:this._discountAmount,taxAmount:this._taxAmount,shippingAmount:this._shippingAmount,totalAmount:this._totalAmount,lineItems:this._lineItems},P=Object.keys(y).some(function(C){return y[C]!==void 0}),V=E.request({api:"graphQLApi",data:{query:S.CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{paymentMethodUsage:this._paymentMethodUsage,intent:"CONTINUE",customerClient:D,isFinalAmount:this._isFinalAmount,displayName:this._displayName,paysheetDetails:{collectCustomerBillingAddress:this._collectCustomerBillingAddress,collectCustomerShippingAddress:this._collectCustomerShippingAddress,transactionDetails:P?y:void 0}}}}}).then(function(C){return C.data.createVenmoPaymentContext.venmoPaymentContext})}return V.then(function(C){var z=new Date(C.expiresAt)-new Date(C.createdAt),Z=z*.6666;clearTimeout(R._refreshPaymentContextTimeout),R._refreshPaymentContextTimeout=setTimeout(function(){R._tokenizationInProgress||R._createVenmoPaymentContext(E,!0)},Z),!(g&&R._tokenizationInProgress)&&(R._venmoPaymentContextStatus=C.status,R._venmoPaymentContextId=C.id)})},F.prototype._popupBridgeIsInstalled=function(){return window.popupBridge&&typeof window.popupBridge.open=="function"},F.prototype._venmoNativeAppIsInstalled=function(){return!!(window.popupBridge&&(window.parent&&window.parent.popupBridge.isVenmoInstalled||window.popupBridge.isVenmoInstalled))},F.prototype._handleDeepLinkAppSwitch=function(E){Y()?this._handleIosWebviewDeepLink(E):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(E):(i.sendEvent(this._createPromise,"venmo.appswitch.start.webview"),this._venmoWindow=window.open(E))},F.prototype._handleIosWebviewDeepLink=function(E){i.sendEvent(this._createPromise,"venmo.appswitch.start.ios-webview"),b()?this._handleIosWebviewInIframe(E):!this._venmoNativeAppIsInstalled()&&this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(E):window.location.href=E},F.prototype._handleIosWebviewInIframe=function(E){this._venmoNativeAppIsInstalled()?this._handleIFrameBreakout(E):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(E):this._handleIFrameBreakout(E)},F.prototype._handlePopupBridgeAppSwitch=function(E){i.sendEvent(this._createPromise,"venmo.appswitch.start.popup-bridge"),window.popupBridge.open(E)},F.prototype._handleBrowserAppSwitch=function(E){i.sendEvent(this._createPromise,"venmo.appswitch.start.browser"),c.doesNotSupportWindowOpenInIos()||this._shouldUseRedirectStrategy()||this._mobileWebFallBack&&c.isAndroid()&&c.isChrome()?window.location.href=E:this._venmoWindow=window.open(E)},F.prototype._handleIFrameBreakout=function(E){window.top.location.href=E},F.prototype.appSwitch=function(E){this._deepLinkReturnUrl?this._handleDeepLinkAppSwitch(E):this._handleBrowserAppSwitch(E)},F.prototype.getUrl=function(){return this._createPromise.then(function(E){var g=E.getConfiguration(),R={},V=this._deepLinkReturnUrl||window.location.href.replace(window.location.hash,""),y=g.gatewayConfiguration.payWithVenmo,T=g.analyticsMetadata,_=y.accessToken,P={_meta:{version:T.sdkVersion,integration:T.integration,platform:T.platform,sessionId:T.sessionId}};return this._isDebug=g.isDebug,this._assetsUrl=g.gatewayConfiguration.assetsUrl,V=V.replace(/#*$/,""),this._venmoPaymentContextId&&(this._shouldUseLegacyFlow?_+="|pcid:"+this._venmoPaymentContextId:R.resource_id=this._venmoPaymentContextId),this._shouldIncludeReturnUrls()||this._useAllowDesktopWebLogin?(this._useAllowDesktopWebLogin&&(V=this._assetsUrl+"/web/"+B+"/html/redirect-frame.html"),R["x-success"]=V+"#venmoSuccess=1",R["x-cancel"]=V+"#venmoCancel=1",R["x-error"]=V+"#venmoError=1"):(R["x-success"]="NOOP",R["x-cancel"]="NOOP",R["x-error"]="NOOP"),this._allowAndroidRecreation?R.allowAndroidRecreation=1:R.allowAndroidRecreation=0,R.ua=window.navigator.userAgent,R.braintree_merchant_id=this._profileId||y.merchantId,R.braintree_access_token=_,R.braintree_environment=y.environment,R.braintree_sdk_data=btoa(JSON.stringify(P)),x({useAllowDesktopWebLogin:this._useAllowDesktopWebLogin,mobileWebFallBack:this._mobileWebFallBack})+"?"+u.stringify(R)}.bind(this))},F.prototype.isBrowserSupported=function(){return o.isBrowserSupported({allowNewBrowserTab:this._allowNewBrowserTab,allowWebviews:this._allowWebviews,allowDesktop:this._allowDesktop,allowDesktopWebLogin:this._allowDesktopWebLogin})},F.prototype.hasTokenizationResult=function(){return this._hasTokenizationResult()},F.prototype._hasTokenizationResult=function(E){var g=H(E),R=L.getUrlParams();return R.resource_id?this._venmoPaymentContextId=R.resource_id:g.id&&(this._venmoPaymentContextId=g.id),typeof(g.venmoSuccess||g.venmoError||g.venmoCancel)!="undefined"},F.prototype._shouldIncludeReturnUrls=function(){return this._deepLinkReturnUrl?!0:!this._cannotHaveReturnUrls},F.prototype._isDesktop=function(){return!(c.isIos()||c.isAndroid())},F.prototype.tokenize=function(E){var g=this,R;return E=E||{},this._tokenizationInProgress===!0?Promise.reject(new v(d.VENMO_TOKENIZATION_REQUEST_ACTIVE)):(this._tokenizationInProgress=!0,this._useDesktopQRFlow?R=this._tokenizeForDesktopQRFlow(E):this._useAllowDesktopWebLogin?R=this._tokenizeWebLoginWithRedirect(E):this._cannotHaveReturnUrls?R=this._tokenizeForMobileWithManualReturn():R=this._tokenizeForMobileWithHashChangeListeners(E),R.then(function(V){return g._createPromise.then(function(y){return g._createVenmoPaymentContext(y)}).then(function(){return g._tokenizationInProgress=!1,g._venmoWindow=null,M(V)})}).catch(function(V){return g._createPromise.then(function(y){return g._createVenmoPaymentContext(y)}).then(function(){return g._tokenizationInProgress=!1,g._venmoWindow=null,Promise.reject(V)})}))},F.prototype.cancelTokenization=function(){return this._tokenizationInProgress?(this._removeVisibilityEventListener(),this._tokenizePromise&&this._tokenizePromise.reject(new v(d.VENMO_TOKENIZATION_CANCELED_BY_MERCHANT)),Promise.all([this._cancelMobilePaymentContext(),this._cancelVenmoDesktopContext()])):Promise.reject(new v(d.VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE))},F.prototype._tokenizeWebLoginWithRedirect=function(){var E=this,g;return i.sendEventPlus(E._createPromise,"venmo.tokenize.web-login.start",{context_id:E._venmoPaymentContextId}),this._tokenizePromise=new w,this.getUrl().then(function(R){return g={checkForStatusChange:E._checkPaymentContextStatusAndProcessResult.bind(E),cancelTokenization:E.cancelTokenization.bind(E),frameServiceInstance:E._frameServiceInstance,venmoUrl:R,debug:E._isDebug,checkPaymentContextStatus:E._checkPaymentContextStatus.bind(E)},E._cspNonce&&(g=s({},g,{styleCspNonce:E._cspNonce})),O.runWebLogin(g).then(function(V){i.sendEventPlus(E._createPromise,"venmo.tokenize.web-login.success",{context_id:E._venmoPaymentContextId}),E._tokenizePromise.resolve({paymentMethodNonce:V.paymentMethodId,username:V.userName,payerInfo:V.payerInfo,id:E._venmoPaymentContextId})}).catch(function(V){i.sendEventPlus(E._createPromise,"venmo.tokenize.web-login.failure",{context_id:E._venmoPaymentContextId}),E._tokenizePromise.reject(V)}),E._tokenizePromise})},F.prototype._queryPaymentContextStatus=function(E){var g=this;return this._createPromise.then(function(R){var V=g._shouldUseLegacyFlow?S.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:S.VENMO_PAYMENT_CONTEXT_STATUS_QUERY;return R.request({api:"graphQLApi",data:{query:V,variables:{id:E}}})}).then(function(R){return R.data.node})},F.prototype._checkPaymentContextStatusAndProcessResult=function(E){var g=this;return g._checkPaymentContextStatus().then(function(R){var V=R.status;if(V!==g._venmoPaymentContextStatus)switch(g._venmoPaymentContextStatus=V,i.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.status-change",{context_id:g._venmoPaymentContextId}),V){case"APPROVED":return Promise.resolve(R);case"CANCELED":return Promise.reject(new v(d.VENMO_CUSTOMER_CANCELED));case"FAILED":return Promise.reject(new v(d.VENMO_TOKENIZATION_FAILED))}return new Promise(function(y,T){E<g._maxRetryCount?(E++,g._checkPaymentContextStatusAndProcessResult(E).then(y).catch(T)):T(new v(d.VENMO_TOKENIZATION_FAILED))})})},F.prototype._checkPaymentContextStatus=function(){var E=this;return E._queryPaymentContextStatus(E._venmoPaymentContextId).catch(function(g){return Promise.reject(new v({type:d.VENMO_NETWORK_ERROR.type,code:d.VENMO_NETWORK_ERROR.code,message:d.VENMO_NETWORK_ERROR.message,details:g}))}).then(function(g){return Promise.resolve(g)})},F.prototype._pollForStatusChange=function(){var E=this;return E._venmoPaymentContextId?Date.now()>E._mobilePollingContextExpiresIn?Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT)):E._venmoWindow&&E._venmoWindow.closed&&E._venmoPaymentContextStatus==="CREATED"?(i.sendEvent(E._createPromise,"venmo.appswitch.browser-window.closed"),E._cancelMobilePaymentContext().then(function(){i.sendEventPlus(E._createPromise,"venmo.tokenize.manual-return.canceled",{context_id:E._venmoPaymentContextId})}).catch(function(g){i.sendEventPlus(E._createPromise,"venmo.tokenize.manual-return.canceled.error",{context_id:E._venmoPaymentContextId})}),Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED))):this._queryPaymentContextStatus(this._venmoPaymentContextId).catch(function(g){return Promise.reject(new v({type:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.type,code:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.code,message:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.message,details:{originalError:g}}))}).then(function(g){var R=g.status;if(R!==E._venmoPaymentContextStatus)switch(E._venmoPaymentContextStatus=R,i.sendEventPlus(E._createPromise,"venmo.tokenize.manual-return.status-change."+R.toLowerCase(),{context_id:E._venmoPaymentContextId}),R){case"EXPIRED":case"FAILED":case"CANCELED":return Promise.reject(new v(d["VENMO_MOBILE_POLLING_TOKENIZATION_"+R]));case"APPROVED":return Promise.resolve(g)}return new Promise(function(V,y){setTimeout(function(){E._pollForStatusChange().then(V).catch(y)},E._mobilePollingInterval)})}):Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID))},F.prototype._tokenizeForMobileWithManualReturn=function(){var E=this;return i.sendEventPlus(this._createPromise,"venmo.tokenize.manual-return.start",{context_id:E._venmoPaymentContextId}),this._mobilePollingContextExpiresIn=Date.now()+this._mobilePollingExpiresThreshold,this._tokenizePromise=new w,this._pollForStatusChange().then(function(g){i.sendEventPlus(E._createPromise,"venmo.tokenize.manual-return.success",{context_id:E._venmoPaymentContextId}),E._tokenizePromise.resolve({paymentMethodNonce:g.paymentMethodId,username:g.userName,payerInfo:g.payerInfo,id:E._venmoPaymentContextId})}).catch(function(g){i.sendEventPlus(E._createPromise,"venmo.tokenize.manual-return.failure",{context_id:E._venmoPaymentContextId}),E._tokenizePromise.reject(g)}),this.getUrl().then(function(g){return E.appSwitch(g),E._tokenizePromise})},F.prototype._shouldUseRedirectStrategy=function(){return c.isIos()?this._mobileWebFallBack===!0?!0:this._useRedirectForIOS:!1},F.prototype._tokenizeForMobileWithHashChangeListeners=function(E){var g=this,R,V;if(this.hasTokenizationResult())return this.processHashChangeFlowResults();i.sendEvent(this._createPromise,"venmo.tokenize.mobile.start"),this._tokenizePromise=new w,this._previousHash=window.location.hash;function y(T){var _;g.processHashChangeFlowResults(T).catch(function(P){_=P}).then(function(P){!g._ignoreHistoryChanges&&window.location.hash!==g._previousHash&&(window.location.hash=g._previousHash),g._removeVisibilityEventListener(),_?g._tokenizePromise.reject(_):g._tokenizePromise.resolve(P),delete g._tokenizePromise})}return this._onHashChangeListener=function(T){var _=T.newURL.split("#")[1];g._hasTokenizationResult(_)&&(R=!0,clearTimeout(V),y(_))},window.addEventListener("hashchange",this._onHashChangeListener,!1),this._visibilityChangeListener=function(){var T=E.processResultsDelay||l.DEFAULT_PROCESS_RESULTS_DELAY;window.document.hidden||(g._venmoWindow&&!g._venmoWindow.closed&&g._venmoWindow.close(),R||(V=setTimeout(y,T)))},this.getUrl().then(function(T){return g.appSwitch(T),setTimeout(function(){window.document.addEventListener(q(),g._visibilityChangeListener)},l.DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY),g._tokenizePromise})},F.prototype._tokenizeForDesktopQRFlow=function(){var E=this;return i.sendEvent(this._createPromise,"venmo.tokenize.desktop.start"),this._tokenizePromise=new w,this._createPromise.then(function(){return E._venmoDesktopInstance.launchDesktopFlow()}).then(function(g){E._venmoDesktopInstance.hideDesktopFlow(),i.sendEvent(E._createPromise,"venmo.tokenize.desktop.success"),E._tokenizePromise.resolve(g)}).catch(function(g){if(i.sendEvent(E._createPromise,"venmo.tokenize.desktop.failure"),E._venmoDesktopInstance&&E._venmoDesktopInstance.hideDesktopFlow(),g&&g.reason==="CUSTOMER_CANCELED"){E._tokenizePromise.reject(new v(d.VENMO_DESKTOP_CANCELED));return}E._tokenizePromise.reject(new v({type:d.VENMO_DESKTOP_UNKNOWN_ERROR.type,code:d.VENMO_DESKTOP_UNKNOWN_ERROR.code,message:d.VENMO_DESKTOP_UNKNOWN_ERROR.message,details:{originalError:g}}))}),this._tokenizePromise},F.prototype._cancelMobilePaymentContext=function(){var E=this;return this._createPromise.then(function(g){var R;return E._venmoPaymentContextId?(R=E._shouldUseLegacyFlow?S.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:S.UPDATE_PAYMENT_CONTEXT_QUERY,g.request({api:"graphQLApi",data:{query:R,variables:{input:{id:E._venmoPaymentContextId,status:"CANCELED"}}}})):Promise.resolve()})},F.prototype._cancelVenmoDesktopContext=function(){var E=this;return this._createPromise.then(function(){return E._venmoDesktopInstance&&E._venmoDesktopInstance.updateVenmoDesktopPaymentContext("CANCELED"),Promise.resolve()})},F.prototype.teardown=function(){var E=this;return this._removeVisibilityEventListener(),this._createPromise.then(function(){E._venmoDesktopInstance&&E._venmoDesktopInstance.teardown(),clearTimeout(E._refreshPaymentContextTimeout),E._cancelMobilePaymentContext(),f(this,p(F.prototype))}.bind(this))},F.prototype._removeVisibilityEventListener=function(){window.removeEventListener("hashchange",this._onHashChangeListener),window.document.removeEventListener(q(),this._visibilityChangeListener),delete this._visibilityChangeListener,delete this._onHashChangeListener},F.prototype.processHashChangeFlowResults=function(E){var g=this,R=H(E);return new Promise(function(V,y){g._shouldUseLegacyFlow?R.venmoSuccess?(i.sendEvent(g._createPromise,"venmo.appswitch.handle.success"),window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:succeeded"),V(R)):R.venmoError?(i.sendEvent(g._createPromise,"venmo.appswitch.handle.error"),window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:failed"),y(new v({type:d.VENMO_APP_FAILED.type,code:d.VENMO_APP_FAILED.code,message:d.VENMO_APP_FAILED.message,details:{originalError:{message:decodeURIComponent(R.errorMessage),code:R.errorCode}}}))):R.venmoCancel?(i.sendEvent(g._createPromise,"venmo.appswitch.handle.cancel"),window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:canceled"),y(new v(d.VENMO_APP_CANCELED))):(i.sendEvent(g._createPromise,"venmo.appswitch.cancel-or-unavailable"),y(new v(d.VENMO_CANCELED))):g._pollForStatusChange().then(function(T){return i.sendEventPlus(g._createPromise,"venmo.appswitch.handle.payment-context-status-query.success",{context_id:g._venmoPaymentContextId}),window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:succeeded"),V({paymentMethodNonce:T.paymentMethodId,username:T.userName,payerInfo:T.payerInfo,id:g._venmoPaymentContextId})}).catch(function(T){T.code===d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED.code?(window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:canceled"),y(T)):window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:failed"),i.sendEventPlus(g._createPromise,"venmo.process-results.payment-context-status-query-failed",{context_id:g._venmoPaymentContextId}),V(R)}),g._clearFragmentParameters()})},F.prototype._clearFragmentParameters=function(){this._ignoreHistoryChanges||typeof window.history.replaceState=="function"&&window.location.hash&&history.pushState({},"",window.location.href.slice(0,window.location.href.indexOf("#")))};function H(E){var g=(E||window.location.hash.substring(1)).split("&"),R=g.reduce(function(V,y){var T=y.split("="),_=decodeURIComponent(T[0]).replace(/\W/g,""),P=I(_),D=decodeURIComponent(T[1]);return V[P]=D,V},{});return R.resourceId&&(R.id=R.resourceId),R}function ee(E){return E=E||"","@"+E.replace("@","")}function M(E){var g={nonce:E.paymentMethodNonce,type:"VenmoAccount",details:{username:ee(E.username),paymentContextId:E.id}};return E.payerInfo&&(g.details.payerInfo=E.payerInfo,g.details.payerInfo.userName=ee(E.payerInfo.userName)),g}function q(){var E;return typeof window.document.hidden!="undefined"?E="visibilitychange":typeof window.document.msHidden!="undefined"?E="msvisibilitychange":typeof window.document.webkitHidden!="undefined"&&(E="webkitvisibilitychange"),E}function Y(){return window.navigator.platform&&/iPhone|iPad|iPod/.test(window.navigator.platform)}n.exports=m.wrapPrototype(F)},{"../lib/analytics":55,"../lib/assign":57,"../lib/braintree-error":59,"../lib/convert-methods-to-error":61,"../lib/in-iframe":78,"../lib/is-verified-domain":79,"../lib/methods":81,"../lib/querystring":82,"../lib/snake-case-to-camel-case":83,"../lib/url-params":84,"./external/":87,"./external/queries":88,"./shared/browser-detection":91,"./shared/constants":92,"./shared/errors":93,"./shared/get-venmo-url":95,"./shared/supports-venmo":96,"./shared/web-login-backdrop":97,"@braintree/extended-promise":26,"@braintree/wrap-promise":35}]},{},[90])(90)})}(Ln)),Ln.exports}var Hi=Vl();const Fl=ve({__proto__:null,default:Cn(Hi)},[Hi]);ne.Core=Ri,ne.PayNextCheckout=_t,ne.PaymentMethod=W,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
325
+ </svg>`,h="Tap cancel payment to cancel and return to the business. Continue payment will relaunch the payment window.",p=400,f=570,m={backdrop:"venmo-desktop-web-backdrop",backdropHidden:"venmo-desktop-web-backdrop.hidden",backdropContainer:"venmo-backdrop-container",cancelButton:"venmo-popup-cancel-button",continueButton:"venmo-popup-continue-button",message:"venmo-message",instructions:"venmo-instructions",venmoLogo:"venmo-full-logo"};o.suppressUnhandledPromiseMessage=!0;function v(O){var k=O.frameServiceInstance,B=O.venmoUrl,W=O.checkForStatusChange,$=O.cancelTokenization,F=O.checkPaymentContextStatus,j=new o;return document.getElementById(m.continueButton).addEventListener("click",function(){k.focus()}),document.getElementById(m.cancelButton).addEventListener("click",function(){k.close(),$(),C()}),k.open({},function(H){var ee=1;H?j.reject(H):W(ee).then(function(M){j.resolve(M)}).catch(function(M){F().then(function(q){q.status==="CREATED"?j.reject(new l(c.VENMO_CUSTOMER_CANCELED)):j.reject(M)})}),k.close(),C()}),k.redirect(B),j}function b(){var O=Math.round((window.outerHeight-f)/2)+window.screenTop,k=Math.round((window.outerWidth-p)/2)+window.screenLeft;return{top:O,left:k}}function C(){document.getElementById("venmo-desktop-web-backdrop").classList.add("hidden")}function x(){var O=["#"+m.backdropHidden+" {","display: none;","}","#"+m.backdrop+" {","z-index: 3141592632;","cursor: pointer;","position: fixed;","top: 0;","left: 0;","bottom: 0;","width: 100%;","background: rgba(0, 0, 0, 0.8);","}"],k=["#"+m.backdropContainer+" {","display: flex;","align-content: center;","justify-content: center;","align-items: center;","width: 100%;","height: 100%;","flex-direction: column;","}"],B=["#"+m.cancelButton+" {","height: 24px;","width: 380px;","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 700;","font-size: 18px;","line-height: 24px;","text-align: center;","background-color: transparent;","border: none;","color: #FFFFFF;","margin-top: 28px;","}"],W=["#"+m.continueButton+" {","width: 400px;","height: 50px;","background: #0074DE;","border-radius: 24px;","border: none;","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 700;","font-size: 18px;","color: #FFFFFF;","margin-top: 44px;","}"],$=["#"+m.message+" {","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 500;","font-size: 24px;","line-height: 32px;","text-align: center;","color: #FFFFFF;","margin-top: 32px;","}"],F=["#"+m.instructions+" {","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 400;","font-size: 16px;","line-height: 20px;","text-align: center;","color: #FFFFFF;","margin-top: 16px;","width: 400px;","}"],j=O.concat(k,B,W,$,F);return j.join(`
326
+ `)}function N(O){var k=document.getElementById(m.backdrop),B,W,$,F,j,H,ee,M;if(k){k.classList.remove("hidden");return}B=document.createElement("style"),W=document.createElement("div"),$=document.createElement("div"),F=document.createElement("div"),j=document.createElement("div"),H=document.createElement("div"),ee=document.createElement("button"),M=document.createElement("button"),O&&(B.nonce=O),B.id="venmo-desktop-web__injected-styles",B.innerHTML=x(),W.id=m.backdrop,$.id=m.backdropContainer,F.id=m.venmoLogo,F.innerHTML=u,j.id=m.message,j.innerText="What would you like to do?",H.id=m.instructions,H.innerText=h,ee.id=m.continueButton,ee.innerText="Continue payment",M.id=m.cancelButton,M.innerText="Cancel payment",document.head.appendChild(B),$.appendChild(F),$.appendChild(j),$.appendChild(H),$.appendChild(ee),$.appendChild(M),W.appendChild($),document.body.appendChild(W),W.addEventListener("click",function(q){q.stopPropagation()})}function I(O){return N(O.styleCspNonce),v(O)}function L(O){var k=new o,B="venmoDesktopWebLogin",W=O.assetsUrl,$=O.debug||!1,F=b(),j=W+"/web/"+d+"/html";return i.create({name:B,dispatchFrameUrl:j+"/dispatch-frame"+s($)+".html",openFrameUrl:j+"/venmo-landing-frame"+s($)+".html",top:F.top,left:F.left,height:f,width:p},function(H){k.resolve(H)}),k}n.exports={runWebLogin:I,openPopup:v,setupDesktopWebLogin:L,POPUP_WIDTH:p,POPUP_HEIGHT:f}},{"../../lib/braintree-error":59,"../../lib/frame-service/external":68,"../../lib/use-min":85,"../shared/errors":93,"@braintree/extended-promise":26}],98:[function(e,n,a){var i=e("../lib/analytics"),s=e("../lib/assign").assign,o=e("./shared/supports-venmo"),c=e("./shared/browser-detection"),l=e("./shared/constants"),d=e("./shared/errors"),u=e("../lib/querystring"),h=e("../lib/is-verified-domain"),p=e("../lib/methods"),f=e("../lib/convert-methods-to-error"),m=e("@braintree/wrap-promise"),v=e("../lib/braintree-error"),b=e("../lib/in-iframe"),C=e("@braintree/extended-promise"),x=e("./shared/get-venmo-url"),N=e("./shared/web-login-backdrop"),I=e("../lib/snake-case-to-camel-case"),L=e("../lib/url-params"),O=e("./external/"),k=e("./external/queries"),B="3.126.0",W=250,$=3e5;C.suppressUnhandledPromiseMessage=!0;function F(E){var g=this;this._allowDesktopWebLogin=E.allowDesktopWebLogin||!1,this._mobileWebFallBack=E.mobileWebFallBack||!1,this._createPromise=E.createPromise,this._allowNewBrowserTab=E.allowNewBrowserTab!==!1,this._allowWebviews=E.allowWebviews!==!1,this._allowDesktop=E.allowDesktop===!0,this._useRedirectForIOS=E.useRedirectForIOS===!0,this._profileId=E.profileId,this._displayName=E.displayName,this._deepLinkReturnUrl=E.deepLinkReturnUrl,this._ignoreHistoryChanges=E.ignoreHistoryChanges,this._paymentMethodUsage=(E.paymentMethodUsage||"").toUpperCase(),this._shouldUseLegacyFlow=!this._paymentMethodUsage,this._requireManualReturn=E.requireManualReturn===!0,this._useDesktopQRFlow=this._allowDesktop&&this._isDesktop()&&!this._allowDesktopWebLogin,this._useAllowDesktopWebLogin=this._allowDesktopWebLogin&&this._isDesktop(),this._cannotHaveReturnUrls=b()||this._requireManualReturn,this._allowAndroidRecreation=E.allowAndroidRecreation!==!1,this._maxRetryCount=3,this._collectCustomerBillingAddress=E.collectCustomerBillingAddress||!1,this._collectCustomerShippingAddress=E.collectCustomerShippingAddress||!1,this._isFinalAmount=E.isFinalAmount||!1,this._lineItems=E.lineItems,this._subTotalAmount=E.subTotalAmount,this._discountAmount=E.discountAmount,this._taxAmount=E.taxAmount,this._shippingAmount=E.shippingAmount,this._totalAmount=E.totalAmount,this._cspNonce=(this._mobileWebFallBack||this._allowDesktopWebLogin)&&(E.styleCspNonce||!1),this._shouldCreateVenmoPaymentContext=this._cannotHaveReturnUrls||!this._shouldUseLegacyFlow,i.sendEvent(this._createPromise,"venmo.desktop-flow.configured."+String(!!this._allowDesktop)),this.hasTokenizationResult()?i.sendEvent(this._createPromise,"venmo.appswitch.return-in-new-tab"):this._useDesktopQRFlow?this._createPromise=this._createPromise.then(function(R){var V=R.getConfiguration().gatewayConfiguration;return O({url:V.assetsUrl+"/web/"+B+"/html/venmo-desktop-frame.html",environment:V.environment==="production"?"PRODUCTION":"SANDBOX",profileId:g._profileId||V.payWithVenmo.merchantId,paymentMethodUsage:g._paymentMethodUsage,displayName:g._displayName,Promise,apiRequest:function(y,T){return R.request({api:"graphQLApi",data:{query:y,variables:T}}).then(function(_){return _.data})},sendEvent:function(y){i.sendEvent(g._createPromise,y)},verifyDomain:h}).then(function(y){return g._venmoDesktopInstance=y,i.sendEvent(g._createPromise,"venmo.desktop-flow.presented"),R}).catch(function(){return i.sendEvent(g._createPromise,"venmo.desktop-flow.setup-failed"),g._useDesktopQRFlow=!1,R})}):this._shouldCreateVenmoPaymentContext&&(this._mobilePollingInterval=W,this._mobilePollingExpiresThreshold=$,this._createPromise=this._createPromise.then(function(R){var V,y,T=g._cannotHaveReturnUrls?"manual-return":"mobile-payment-context",_=R.getConfiguration();return y=N.setupDesktopWebLogin({assetsUrl:_.gatewayConfiguration.assetsUrl,debug:_.isDebug}).then(function(P){g._frameServiceInstance=P}).catch(function(P){return P}),g._mobilePollingContextEnvironment=_.gatewayConfiguration.environment.toUpperCase(),V=g._createVenmoPaymentContext(R).then(function(){return i.sendEvent(g._createPromise,"venmo."+T+".presented"),R}).catch(function(P){return i.sendEvent(g._createPromise,"venmo."+T+".setup-failed"),Promise.reject(new v({type:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.type,code:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.code,message:j(P)?P.details.originalError[0].message:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.message,details:{originalError:P}}))}),C.all([y,V]).then(function(P){var D=P[1];return Promise.resolve(D)}).catch(function(P){return Promise.reject(P)})}))}function j(E){return E.details&&E.details.originalError&&E.details.originalError[0]&&E.details.originalError[0].extensions&&E.details.originalError[0].extensions.errorClass==="VALIDATION"&&E.details.originalError[0].extensions.errorType==="user_error"}F.prototype._createVenmoPaymentContext=function(E,g){var R=this,V,y,T=E.getConfiguration(),_=T.gatewayConfiguration.payWithVenmo,P=!1,D=R._useAllowDesktopWebLogin?"NATIVE_WEB":"MOBILE_WEB";if(!this._shouldCreateVenmoPaymentContext)return Promise.resolve();if(this._shouldUseLegacyFlow)V=E.request({api:"graphQLApi",data:{query:k.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{environment:this._mobilePollingContextEnvironment,intent:"PAY_FROM_APP"}}}}).then(function(w){return w.data.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext});else{if((this._collectCustomerBillingAddress||this._collectCustomerShippingAddress)&&!_.enrichedCustomerDataEnabled)return Promise.reject(new v(d.VENMO_ECD_DISABLED));this._lineItems&&this._lineItems.forEach(function(w){w.unitTaxAmount=w.unitTaxAmount||"0"}),y={subTotalAmount:this._subTotalAmount,discountAmount:this._discountAmount,taxAmount:this._taxAmount,shippingAmount:this._shippingAmount,totalAmount:this._totalAmount,lineItems:this._lineItems},P=Object.keys(y).some(function(w){return y[w]!==void 0}),V=E.request({api:"graphQLApi",data:{query:k.CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{paymentMethodUsage:this._paymentMethodUsage,intent:"CONTINUE",customerClient:D,isFinalAmount:this._isFinalAmount,displayName:this._displayName,paysheetDetails:{collectCustomerBillingAddress:this._collectCustomerBillingAddress,collectCustomerShippingAddress:this._collectCustomerShippingAddress,transactionDetails:P?y:void 0}}}}}).then(function(w){return w.data.createVenmoPaymentContext.venmoPaymentContext})}return V.then(function(w){var z=new Date(w.expiresAt)-new Date(w.createdAt),Z=z*.6666;clearTimeout(R._refreshPaymentContextTimeout),R._refreshPaymentContextTimeout=setTimeout(function(){R._tokenizationInProgress||R._createVenmoPaymentContext(E,!0)},Z),!(g&&R._tokenizationInProgress)&&(R._venmoPaymentContextStatus=w.status,R._venmoPaymentContextId=w.id)})},F.prototype._popupBridgeIsInstalled=function(){return window.popupBridge&&typeof window.popupBridge.open=="function"},F.prototype._venmoNativeAppIsInstalled=function(){return!!(window.popupBridge&&(window.parent&&window.parent.popupBridge.isVenmoInstalled||window.popupBridge.isVenmoInstalled))},F.prototype._handleDeepLinkAppSwitch=function(E){Y()?this._handleIosWebviewDeepLink(E):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(E):(i.sendEvent(this._createPromise,"venmo.appswitch.start.webview"),this._venmoWindow=window.open(E))},F.prototype._handleIosWebviewDeepLink=function(E){i.sendEvent(this._createPromise,"venmo.appswitch.start.ios-webview"),b()?this._handleIosWebviewInIframe(E):!this._venmoNativeAppIsInstalled()&&this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(E):window.location.href=E},F.prototype._handleIosWebviewInIframe=function(E){this._venmoNativeAppIsInstalled()?this._handleIFrameBreakout(E):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(E):this._handleIFrameBreakout(E)},F.prototype._handlePopupBridgeAppSwitch=function(E){i.sendEvent(this._createPromise,"venmo.appswitch.start.popup-bridge"),window.popupBridge.open(E)},F.prototype._handleBrowserAppSwitch=function(E){i.sendEvent(this._createPromise,"venmo.appswitch.start.browser"),c.doesNotSupportWindowOpenInIos()||this._shouldUseRedirectStrategy()||this._mobileWebFallBack&&c.isAndroid()&&c.isChrome()?window.location.href=E:this._venmoWindow=window.open(E)},F.prototype._handleIFrameBreakout=function(E){window.top.location.href=E},F.prototype.appSwitch=function(E){this._deepLinkReturnUrl?this._handleDeepLinkAppSwitch(E):this._handleBrowserAppSwitch(E)},F.prototype.getUrl=function(){return this._createPromise.then(function(E){var g=E.getConfiguration(),R={},V=this._deepLinkReturnUrl||window.location.href.replace(window.location.hash,""),y=g.gatewayConfiguration.payWithVenmo,T=g.analyticsMetadata,_=y.accessToken,P={_meta:{version:T.sdkVersion,integration:T.integration,platform:T.platform,sessionId:T.sessionId}};return this._isDebug=g.isDebug,this._assetsUrl=g.gatewayConfiguration.assetsUrl,V=V.replace(/#*$/,""),this._venmoPaymentContextId&&(this._shouldUseLegacyFlow?_+="|pcid:"+this._venmoPaymentContextId:R.resource_id=this._venmoPaymentContextId),this._shouldIncludeReturnUrls()||this._useAllowDesktopWebLogin?(this._useAllowDesktopWebLogin&&(V=this._assetsUrl+"/web/"+B+"/html/redirect-frame.html"),R["x-success"]=V+"#venmoSuccess=1",R["x-cancel"]=V+"#venmoCancel=1",R["x-error"]=V+"#venmoError=1"):(R["x-success"]="NOOP",R["x-cancel"]="NOOP",R["x-error"]="NOOP"),this._allowAndroidRecreation?R.allowAndroidRecreation=1:R.allowAndroidRecreation=0,R.ua=window.navigator.userAgent,R.braintree_merchant_id=this._profileId||y.merchantId,R.braintree_access_token=_,R.braintree_environment=y.environment,R.braintree_sdk_data=btoa(JSON.stringify(P)),x({useAllowDesktopWebLogin:this._useAllowDesktopWebLogin,mobileWebFallBack:this._mobileWebFallBack})+"?"+u.stringify(R)}.bind(this))},F.prototype.isBrowserSupported=function(){return o.isBrowserSupported({allowNewBrowserTab:this._allowNewBrowserTab,allowWebviews:this._allowWebviews,allowDesktop:this._allowDesktop,allowDesktopWebLogin:this._allowDesktopWebLogin})},F.prototype.hasTokenizationResult=function(){return this._hasTokenizationResult()},F.prototype._hasTokenizationResult=function(E){var g=H(E),R=L.getUrlParams();return R.resource_id?this._venmoPaymentContextId=R.resource_id:g.id&&(this._venmoPaymentContextId=g.id),typeof(g.venmoSuccess||g.venmoError||g.venmoCancel)!="undefined"},F.prototype._shouldIncludeReturnUrls=function(){return this._deepLinkReturnUrl?!0:!this._cannotHaveReturnUrls},F.prototype._isDesktop=function(){return!(c.isIos()||c.isAndroid())},F.prototype.tokenize=function(E){var g=this,R;return E=E||{},this._tokenizationInProgress===!0?Promise.reject(new v(d.VENMO_TOKENIZATION_REQUEST_ACTIVE)):(this._tokenizationInProgress=!0,this._useDesktopQRFlow?R=this._tokenizeForDesktopQRFlow(E):this._useAllowDesktopWebLogin?R=this._tokenizeWebLoginWithRedirect(E):this._cannotHaveReturnUrls?R=this._tokenizeForMobileWithManualReturn():R=this._tokenizeForMobileWithHashChangeListeners(E),R.then(function(V){return g._createPromise.then(function(y){return g._createVenmoPaymentContext(y)}).then(function(){return g._tokenizationInProgress=!1,g._venmoWindow=null,M(V)})}).catch(function(V){return g._createPromise.then(function(y){return g._createVenmoPaymentContext(y)}).then(function(){return g._tokenizationInProgress=!1,g._venmoWindow=null,Promise.reject(V)})}))},F.prototype.cancelTokenization=function(){return this._tokenizationInProgress?(this._removeVisibilityEventListener(),this._tokenizePromise&&this._tokenizePromise.reject(new v(d.VENMO_TOKENIZATION_CANCELED_BY_MERCHANT)),Promise.all([this._cancelMobilePaymentContext(),this._cancelVenmoDesktopContext()])):Promise.reject(new v(d.VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE))},F.prototype._tokenizeWebLoginWithRedirect=function(){var E=this,g;return i.sendEventPlus(E._createPromise,"venmo.tokenize.web-login.start",{context_id:E._venmoPaymentContextId}),this._tokenizePromise=new C,this.getUrl().then(function(R){return g={checkForStatusChange:E._checkPaymentContextStatusAndProcessResult.bind(E),cancelTokenization:E.cancelTokenization.bind(E),frameServiceInstance:E._frameServiceInstance,venmoUrl:R,debug:E._isDebug,checkPaymentContextStatus:E._checkPaymentContextStatus.bind(E)},E._cspNonce&&(g=s({},g,{styleCspNonce:E._cspNonce})),N.runWebLogin(g).then(function(V){i.sendEventPlus(E._createPromise,"venmo.tokenize.web-login.success",{context_id:E._venmoPaymentContextId}),E._tokenizePromise.resolve({paymentMethodNonce:V.paymentMethodId,username:V.userName,payerInfo:V.payerInfo,id:E._venmoPaymentContextId})}).catch(function(V){i.sendEventPlus(E._createPromise,"venmo.tokenize.web-login.failure",{context_id:E._venmoPaymentContextId}),E._tokenizePromise.reject(V)}),E._tokenizePromise})},F.prototype._queryPaymentContextStatus=function(E){var g=this;return this._createPromise.then(function(R){var V=g._shouldUseLegacyFlow?k.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:k.VENMO_PAYMENT_CONTEXT_STATUS_QUERY;return R.request({api:"graphQLApi",data:{query:V,variables:{id:E}}})}).then(function(R){return R.data.node})},F.prototype._checkPaymentContextStatusAndProcessResult=function(E){var g=this;return g._checkPaymentContextStatus().then(function(R){var V=R.status;if(V!==g._venmoPaymentContextStatus)switch(g._venmoPaymentContextStatus=V,i.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.status-change",{context_id:g._venmoPaymentContextId}),V){case"APPROVED":return Promise.resolve(R);case"CANCELED":return Promise.reject(new v(d.VENMO_CUSTOMER_CANCELED));case"FAILED":return Promise.reject(new v(d.VENMO_TOKENIZATION_FAILED))}return new Promise(function(y,T){E<g._maxRetryCount?(E++,g._checkPaymentContextStatusAndProcessResult(E).then(y).catch(T)):T(new v(d.VENMO_TOKENIZATION_FAILED))})})},F.prototype._checkPaymentContextStatus=function(){var E=this;return E._queryPaymentContextStatus(E._venmoPaymentContextId).catch(function(g){return Promise.reject(new v({type:d.VENMO_NETWORK_ERROR.type,code:d.VENMO_NETWORK_ERROR.code,message:d.VENMO_NETWORK_ERROR.message,details:g}))}).then(function(g){return Promise.resolve(g)})},F.prototype._pollForStatusChange=function(){var E=this;return E._venmoPaymentContextId?Date.now()>E._mobilePollingContextExpiresIn?Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT)):E._venmoWindow&&E._venmoWindow.closed&&E._venmoPaymentContextStatus==="CREATED"?(i.sendEvent(E._createPromise,"venmo.appswitch.browser-window.closed"),E._cancelMobilePaymentContext().then(function(){i.sendEventPlus(E._createPromise,"venmo.tokenize.manual-return.canceled",{context_id:E._venmoPaymentContextId})}).catch(function(g){i.sendEventPlus(E._createPromise,"venmo.tokenize.manual-return.canceled.error",{context_id:E._venmoPaymentContextId})}),Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED))):this._queryPaymentContextStatus(this._venmoPaymentContextId).catch(function(g){return Promise.reject(new v({type:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.type,code:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.code,message:d.VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR.message,details:{originalError:g}}))}).then(function(g){var R=g.status;if(R!==E._venmoPaymentContextStatus)switch(E._venmoPaymentContextStatus=R,i.sendEventPlus(E._createPromise,"venmo.tokenize.manual-return.status-change."+R.toLowerCase(),{context_id:E._venmoPaymentContextId}),R){case"EXPIRED":case"FAILED":case"CANCELED":return Promise.reject(new v(d["VENMO_MOBILE_POLLING_TOKENIZATION_"+R]));case"APPROVED":return Promise.resolve(g)}return new Promise(function(V,y){setTimeout(function(){E._pollForStatusChange().then(V).catch(y)},E._mobilePollingInterval)})}):Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID))},F.prototype._tokenizeForMobileWithManualReturn=function(){var E=this;return i.sendEventPlus(this._createPromise,"venmo.tokenize.manual-return.start",{context_id:E._venmoPaymentContextId}),this._mobilePollingContextExpiresIn=Date.now()+this._mobilePollingExpiresThreshold,this._tokenizePromise=new C,this._pollForStatusChange().then(function(g){i.sendEventPlus(E._createPromise,"venmo.tokenize.manual-return.success",{context_id:E._venmoPaymentContextId}),E._tokenizePromise.resolve({paymentMethodNonce:g.paymentMethodId,username:g.userName,payerInfo:g.payerInfo,id:E._venmoPaymentContextId})}).catch(function(g){i.sendEventPlus(E._createPromise,"venmo.tokenize.manual-return.failure",{context_id:E._venmoPaymentContextId}),E._tokenizePromise.reject(g)}),this.getUrl().then(function(g){return E.appSwitch(g),E._tokenizePromise})},F.prototype._shouldUseRedirectStrategy=function(){return c.isIos()?this._mobileWebFallBack===!0?!0:this._useRedirectForIOS:!1},F.prototype._tokenizeForMobileWithHashChangeListeners=function(E){var g=this,R,V;if(this.hasTokenizationResult())return this.processHashChangeFlowResults();i.sendEvent(this._createPromise,"venmo.tokenize.mobile.start"),this._tokenizePromise=new C,this._previousHash=window.location.hash;function y(T){var _;g.processHashChangeFlowResults(T).catch(function(P){_=P}).then(function(P){!g._ignoreHistoryChanges&&window.location.hash!==g._previousHash&&(window.location.hash=g._previousHash),g._removeVisibilityEventListener(),_?g._tokenizePromise.reject(_):g._tokenizePromise.resolve(P),delete g._tokenizePromise})}return this._onHashChangeListener=function(T){var _=T.newURL.split("#")[1];g._hasTokenizationResult(_)&&(R=!0,clearTimeout(V),y(_))},window.addEventListener("hashchange",this._onHashChangeListener,!1),this._visibilityChangeListener=function(){var T=E.processResultsDelay||l.DEFAULT_PROCESS_RESULTS_DELAY;window.document.hidden||(g._venmoWindow&&!g._venmoWindow.closed&&g._venmoWindow.close(),R||(V=setTimeout(y,T)))},this.getUrl().then(function(T){return g.appSwitch(T),setTimeout(function(){window.document.addEventListener(q(),g._visibilityChangeListener)},l.DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY),g._tokenizePromise})},F.prototype._tokenizeForDesktopQRFlow=function(){var E=this;return i.sendEvent(this._createPromise,"venmo.tokenize.desktop.start"),this._tokenizePromise=new C,this._createPromise.then(function(){return E._venmoDesktopInstance.launchDesktopFlow()}).then(function(g){E._venmoDesktopInstance.hideDesktopFlow(),i.sendEvent(E._createPromise,"venmo.tokenize.desktop.success"),E._tokenizePromise.resolve(g)}).catch(function(g){if(i.sendEvent(E._createPromise,"venmo.tokenize.desktop.failure"),E._venmoDesktopInstance&&E._venmoDesktopInstance.hideDesktopFlow(),g&&g.reason==="CUSTOMER_CANCELED"){E._tokenizePromise.reject(new v(d.VENMO_DESKTOP_CANCELED));return}E._tokenizePromise.reject(new v({type:d.VENMO_DESKTOP_UNKNOWN_ERROR.type,code:d.VENMO_DESKTOP_UNKNOWN_ERROR.code,message:d.VENMO_DESKTOP_UNKNOWN_ERROR.message,details:{originalError:g}}))}),this._tokenizePromise},F.prototype._cancelMobilePaymentContext=function(){var E=this;return this._createPromise.then(function(g){var R;return E._venmoPaymentContextId?(R=E._shouldUseLegacyFlow?k.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:k.UPDATE_PAYMENT_CONTEXT_QUERY,g.request({api:"graphQLApi",data:{query:R,variables:{input:{id:E._venmoPaymentContextId,status:"CANCELED"}}}})):Promise.resolve()})},F.prototype._cancelVenmoDesktopContext=function(){var E=this;return this._createPromise.then(function(){return E._venmoDesktopInstance&&E._venmoDesktopInstance.updateVenmoDesktopPaymentContext("CANCELED"),Promise.resolve()})},F.prototype.teardown=function(){var E=this;return this._removeVisibilityEventListener(),this._createPromise.then(function(){E._venmoDesktopInstance&&E._venmoDesktopInstance.teardown(),clearTimeout(E._refreshPaymentContextTimeout),E._cancelMobilePaymentContext(),f(this,p(F.prototype))}.bind(this))},F.prototype._removeVisibilityEventListener=function(){window.removeEventListener("hashchange",this._onHashChangeListener),window.document.removeEventListener(q(),this._visibilityChangeListener),delete this._visibilityChangeListener,delete this._onHashChangeListener},F.prototype.processHashChangeFlowResults=function(E){var g=this,R=H(E);return new Promise(function(V,y){g._shouldUseLegacyFlow?R.venmoSuccess?(i.sendEvent(g._createPromise,"venmo.appswitch.handle.success"),window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:succeeded"),V(R)):R.venmoError?(i.sendEvent(g._createPromise,"venmo.appswitch.handle.error"),window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:failed"),y(new v({type:d.VENMO_APP_FAILED.type,code:d.VENMO_APP_FAILED.code,message:d.VENMO_APP_FAILED.message,details:{originalError:{message:decodeURIComponent(R.errorMessage),code:R.errorCode}}}))):R.venmoCancel?(i.sendEvent(g._createPromise,"venmo.appswitch.handle.cancel"),window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:canceled"),y(new v(d.VENMO_APP_CANCELED))):(i.sendEvent(g._createPromise,"venmo.appswitch.cancel-or-unavailable"),y(new v(d.VENMO_CANCELED))):g._pollForStatusChange().then(function(T){return i.sendEventPlus(g._createPromise,"venmo.appswitch.handle.payment-context-status-query.success",{context_id:g._venmoPaymentContextId}),window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:succeeded"),V({paymentMethodNonce:T.paymentMethodId,username:T.userName,payerInfo:T.payerInfo,id:g._venmoPaymentContextId})}).catch(function(T){T.code===d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED.code?(window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:canceled"),y(T)):window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:failed"),i.sendEventPlus(g._createPromise,"venmo.process-results.payment-context-status-query-failed",{context_id:g._venmoPaymentContextId}),V(R)}),g._clearFragmentParameters()})},F.prototype._clearFragmentParameters=function(){this._ignoreHistoryChanges||typeof window.history.replaceState=="function"&&window.location.hash&&history.pushState({},"",window.location.href.slice(0,window.location.href.indexOf("#")))};function H(E){var g=(E||window.location.hash.substring(1)).split("&"),R=g.reduce(function(V,y){var T=y.split("="),_=decodeURIComponent(T[0]).replace(/\W/g,""),P=I(_),D=decodeURIComponent(T[1]);return V[P]=D,V},{});return R.resourceId&&(R.id=R.resourceId),R}function ee(E){return E=E||"","@"+E.replace("@","")}function M(E){var g={nonce:E.paymentMethodNonce,type:"VenmoAccount",details:{username:ee(E.username),paymentContextId:E.id}};return E.payerInfo&&(g.details.payerInfo=E.payerInfo,g.details.payerInfo.userName=ee(E.payerInfo.userName)),g}function q(){var E;return typeof window.document.hidden!="undefined"?E="visibilitychange":typeof window.document.msHidden!="undefined"?E="msvisibilitychange":typeof window.document.webkitHidden!="undefined"&&(E="webkitvisibilitychange"),E}function Y(){return window.navigator.platform&&/iPhone|iPad|iPod/.test(window.navigator.platform)}n.exports=m.wrapPrototype(F)},{"../lib/analytics":55,"../lib/assign":57,"../lib/braintree-error":59,"../lib/convert-methods-to-error":61,"../lib/in-iframe":78,"../lib/is-verified-domain":79,"../lib/methods":81,"../lib/querystring":82,"../lib/snake-case-to-camel-case":83,"../lib/url-params":84,"./external/":87,"./external/queries":88,"./shared/browser-detection":91,"./shared/constants":92,"./shared/errors":93,"./shared/get-venmo-url":95,"./shared/supports-venmo":96,"./shared/web-login-backdrop":97,"@braintree/extended-promise":26,"@braintree/wrap-promise":35}]},{},[90])(90)})}(Ln)),Ln.exports}var Hi=Vl();const Fl=ve({__proto__:null,default:Cn(Hi)},[Hi]);ne.Core=Ri,ne.PayNextCheckout=yt,ne.PaymentMethod=G,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
327
327
  //# sourceMappingURL=index.umd.js.map