@paynext/sdk 0.0.76 → 0.0.78

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,22 +1,11 @@
1
- (function(ne,ie){typeof exports=="object"&&typeof module!="undefined"?ie(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],ie):(ne=typeof globalThis!="undefined"?globalThis:ne||self,ie(ne["PayNext SDK"]={},ne.React))})(this,function(ne,ie){"use strict";var qc=Object.defineProperty,Wc=Object.defineProperties;var $c=Object.getOwnPropertyDescriptors;var St=Object.getOwnPropertySymbols;var Wi=Object.prototype.hasOwnProperty,$i=Object.prototype.propertyIsEnumerable;var Lr=(ne,ie,se)=>ie in ne?qc(ne,ie,{enumerable:!0,configurable:!0,writable:!0,value:se}):ne[ie]=se,K=(ne,ie)=>{for(var se in ie||(ie={}))Wi.call(ie,se)&&Lr(ne,se,ie[se]);if(St)for(var se of St(ie))$i.call(ie,se)&&Lr(ne,se,ie[se]);return ne},J=(ne,ie)=>Wc(ne,$c(ie));var Ie=(ne,ie)=>{var se={};for(var _e in ne)Wi.call(ne,_e)&&ie.indexOf(_e)<0&&(se[_e]=ne[_e]);if(ne!=null&&St)for(var _e of St(ne))ie.indexOf(_e)<0&&$i.call(ne,_e)&&(se[_e]=ne[_e]);return se};var w=(ne,ie,se)=>Lr(ne,typeof ie!="symbol"?ie+"":ie,se);var W=(ne,ie,se)=>new Promise((_e,Me)=>{var Dt=ke=>{try{Je(se.next(ke))}catch(et){Me(et)}},Et=ke=>{try{Je(se.throw(ke))}catch(et){Me(et)}},Je=ke=>ke.done?_e(ke.value):Promise.resolve(ke.value).then(Dt,Et);Je((se=se.apply(ne,ie)).next())});var se=document.createElement("style");se.textContent=`._spinner_k40uq_1{height:100%;width:100%}@keyframes _spin_k40uq_1{to{transform:rotate(360deg)}}._spinner_k40uq_1{animation:_spin_k40uq_1 1s linear infinite;fill:#9ca3af;--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}._spinner_k40uq_1:is(._dark_k40uq_1 *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}._spinnerContainer_k40uq_5{height:40px;width:40px}._success_k40uq_9{position:absolute;top:50%;left:50%;width:1.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:#16a34a}._successContainer_k40uq_13{position:relative;display:grid;height:2.25rem;width:2.25rem;flex:none;place-items:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(232 250 240 / var(--tw-bg-opacity, 1))}._successContainer_k40uq_13:is(._dark_k40uq_1 *){--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._container_k40uq_17{width:30px;height:20px;display:flex;margin:0 1px;align-items:center;justify-content:center}._card_k40uq_26{width:28px;height:19px;display:flex;margin:0 1px;align-items:center;justify-content:center}._warning_k40uq_35{width:16px;height:16px;display:flex;align-items:center;justify-content:center}._svg_k40uq_43{width:100%;height:100%}._srOnly_k40uq_48{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_k40uq_52{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_5sq3n_1{overflow:hidden;z-index:0;position:relative;height:auto;min-height:40px;width:100%;max-width:640px}._hidden_5sq3n_7{display:none!important}._formInitial_5sq3n_11{opacity:0;transform:translateY(100px)}._btnsInitial_5sq3n_16{opacity:0;transform:translateY(-100px)}._buttons_1i8cu_1{display:grid;gap:.5rem}._hidden_1i8cu_5{display:none!important}._applePay_1ce61_1{display:flex;flex-direction:column;gap:8px}._applePay_1ce61_1:hover{filter:contrast(.575) brightness(1.2)}._hidden_1ce61_26{display:none!important}._container_94v1h_1{display:flex;width:100%;flex-grow:1;flex-direction:row;align-items:center;justify-content:flex-start;-moz-column-gap:.25rem;column-gap:.25rem;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(254 231 239 / var(--tw-bg-opacity, 1));padding:.75rem 1rem}._container_94v1h_1:is(._dark_94v1h_1 *){background-color:#fee7ef80;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}._container_94v1h_1 svg{width:16px;height:16px}._title_94v1h_10{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_94v1h_10:is(._dark_94v1h_1 *){--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}._googlePay_gmreq_1{display:flex;flex-direction:column;gap:8px}._hidden_gmreq_20{display:none!important}._paypal_90mm5_1{display:flex;flex-direction:column;gap:8px}._hidden_90mm5_12{display:none}._button_13xr0_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(22 163 74 / 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_13xr0_1{transition-property:none}}._button_13xr0_1 span{margin-left:.25rem}._button_13xr0_1:hover{opacity:.7}._button_13xr0_1:active{transform:scale(.95)}._conteiner_1j5pe_2{display:flex;flex-direction:column;gap:.5rem}._venmo_1j5pe_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%}&:hover{background-color:#5683c1}}._hidden_1j5pe_33{display:none}._button_125my_1{cursor:pointer}._button_191iv_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(37 99 235 / 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_191iv_1{transition-property:none}}._button_191iv_1 span{margin-left:.25rem}._disabled_191iv_17,._button_191iv_1:hover{opacity:.7}._press_191iv_22:active{transform:scale(.95)}._hidden_191iv_26{display:none!important}._spinner_191iv_30{width:24px;height:24px}._cardForm_6gjbg_1{position:relative;display:grid;min-height:292px;gap:.75rem;padding-top:0}._hidden_6gjbg_5{display:none!important}._topOffset_6gjbg_9{margin-top:.5rem}._wrapper_4knhb_1{position:relative}._inputContainer_4knhb_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_4knhb_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_4knhb_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_4knhb_10,._inputContainer_4knhb_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_4knhb_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_4knhb_20{display:flex}._errorInput_4knhb_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_4knhb_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_4knhb_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._label_4knhb_28{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_4knhb_32{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_4knhb_36{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_4knhb_40{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_4knhb_47{display:none!important}._wrapper_j8wuo_1{position:relative}._inputContainer_j8wuo_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_j8wuo_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_j8wuo_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_j8wuo_10,._inputContainer_j8wuo_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_j8wuo_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_j8wuo_20{display:flex}._errorInput_j8wuo_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_j8wuo_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_j8wuo_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._error_j8wuo_24{margin-top:.25rem;margin-bottom:0;padding-left:.25rem;font-size:.75rem;line-height:1rem;font-weight:400;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._label_j8wuo_32{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_j8wuo_36{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_j8wuo_40{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_j8wuo_44{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_j8wuo_51{display:none!important}._wrapper_1xdj3_1{position:relative}._inputContainer_1xdj3_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_1xdj3_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_1xdj3_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_1xdj3_10,._inputContainer_1xdj3_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_1xdj3_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_1xdj3_20{display:flex;align-items:center;justify-content:center}._errorInput_1xdj3_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_1xdj3_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_1xdj3_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._error_1xdj3_24{margin-top:.25rem;margin-bottom:0;padding-left:.25rem;font-size:.75rem;line-height:1rem;font-weight:400;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._label_1xdj3_32{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_1xdj3_36{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_1xdj3_40{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_1xdj3_44{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_1xdj3_51{display:none!important}._securityContent_1xdj3_55{display:grid;grid-column-gap:5px;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}
2
- /*$vite$:1*/`,document.head.appendChild(se);class _e{constructor(t){w(this,"parent");w(this,"core");typeof window!="undefined"&&(this.parent=t)}mount(t){return W(this,null,function*(){if(!this.parent)return;if(!this.core){const a=(yield Promise.resolve().then(()=>Kc)).Core;this.core=new a}t.styles&&this.core.state.styles.setState(t.styles);const e=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(e),this.core.state.checkout.setState(t)})}unmount(){return W(this,null,function*(){!this.parent||!this.core||(this.parent.innerHTML="",this.core.clearState())})}}let Me=null;function Dt(){return W(this,null,function*(){return Me||(Me=new Promise((r,t)=>{const e=document.createElement("script");if(e.src="https://js.evervault.com/v2",e.onload=()=>r(),e.onerror=()=>{Me=null,t()},!document.head)throw new Error("Expected document.head not to be null. Evervault.js requires a <head> element.");document.head.appendChild(e)}),Me)})}function Et(){return W(this,null,function*(){if(window.Evervault)return window.Evervault;try{return yield Dt(),window.Evervault}catch(r){throw new Error("Failed to load Evervault.js")}})}function Je(r,t,e){return W(this,null,function*(){const n=yield Et();return new n(r,t,e)})}Promise.resolve().then(()=>{Et()});let ke=class{constructor(t){w(this,"apple",null);w(this,"isAvailable",!1);w(this,"onReady");this.ev=t}init(c,d){return W(this,arguments,function*({transaction:t,locale:e,supportedCardTypes:n,onReady:a,onError:i,onSuccess:o,onCancel:s},l){const u=this.ev.transactions.create(t);this.apple=this.ev.ui.applePay(u,J(K({locale:e,borderRadius:12,size:{width:"100%",height:"40px"}},l==null?void 0:l.styles),{allowedCardNetworks:n,requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(m,v)=>W(this,[m,v],function*(p,{fail:f}){try{o==null||o(p)}catch(y){console.error(y),f({message:"Cannot pay with payment credentials"})}})}));const h=yield this.apple.availability();this.isAvailable=!0,console.log("Apple Pay availability",h),this.isAvailable||console.error("Apple Pay is not available",h),i&&this.apple.on("error",i),s&&this.apple.on("cancel",s),this.onReady=a})}render(t){return W(this,null,function*(){var e;!this.apple||!this.isAvailable||(t.innerHTML="",yield this.apple.mount(t),(e=this.onReady)==null||e.call(this))})}},et=class{constructor(t){w(this,"google",null);this.ev=t}init(l,c){return W(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:o},s){const d=this.ev.transactions.create(t);this.google=this.ev.ui.googlePay(d,J(K({locale:e,size:{width:"100%",height:"42px"},borderRadius:12,billingAddress:{phoneNumber:!0}},s==null?void 0:s.styles),{process:(p,f)=>W(this,[p,f],function*(u,{fail:h}){try{i==null||i(u)}catch(m){console.error(m),h({message:"Cannot pay with payment credentials"})}})})),o&&this.google.on("cancel",o),n&&this.google.on("ready",n),a&&this.google.on("error",a)})}render(t){return W(this,null,function*(){this.google&&(t.innerHTML="",this.google.mount(t))})}};class he{constructor(){w(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 Yi{constructor(t){w(this,"threeDs",null);this.ev=t}init(i){return W(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 W(this,null,function*(){this.threeDs&&this.threeDs.mount(t)})}}class Gi{constructor(){w(this,"isReady",!1);w(this,"ev",null);w(this,"apple",null);w(this,"google",null);w(this,"threeDs",null);w(this,"events",{ready:new he})}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}initEv(t){return W(this,null,function*(){this.isShouldLoad(t)&&(this.isReady=!1,this.ev=yield Je(t.teamId,t.appId),this.apple=new ke(this.ev),this.google=new et(this.ev),this.events.ready.emit(),this.isReady=!0)})}initThreeDs(t){return W(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new Yi(this.ev),yield this.threeDs.init(t),yield this.threeDs.render()})}initApple(t,e){return W(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 W(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 W(this,null,function*(){var e;return yield(e=this.apple)==null?void 0:e.render(t)})}renderGoogle(t){return W(this,null,function*(){var e;return yield(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 Mt(r){return typeof r=="object"&&!Array.isArray(r)}function Qi(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 Sr(r,t,e,n){return typeof r=="string"&&Mt(t)?Qi(r,e,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function Xi(r,t,e){return r*(t+1)}function Dr(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 tt=(r,t,e)=>r+(t-r)*e,Zi=(r,t,e)=>{const n=t-r;return((e-r)%n+n)%n+r},Mr=r=>Array.isArray(r)&&typeof r[0]!="number";function Vr(r,t){return Mr(r)?r[Zi(0,r.length,t)]:r}function Ji(r,t){r.indexOf(t)===-1&&r.push(t)}function Fr(r,t){const e=r.indexOf(t);e>-1&&r.splice(e,1)}function ea(r,t,e){for(let n=0;n<r.length;n++){const a=r[n];a.at>t&&a.at<e&&(Fr(r,a),n--)}}function ta(r,t,e,n,a,i){ea(r,a,i);for(let o=0;o<t.length;o++)r.push({value:t[o],at:tt(a,i,n[o]),easing:Vr(e,o)})}function ra(r,t){for(let e=0;e<r.length;e++)r[e]=r[e]/(t+1)}function na(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 Ur(r,t){const e=r[r.length-1];for(let n=1;n<=t;n++){const a=Vt(0,t,n);r.push(tt(e,1,a))}}function jr(r){const t=[0];return Ur(t,r.length-1),t}function Ft(r){return typeof r=="function"&&"applyToOptions"in r}const Ct=2e4;function Ut(r){let t=0;const e=50;let n=r.next(t);for(;!n.done&&t<Ct;)t+=e,n=r.next(t);return t>=Ct?1/0:t}const Ae=r=>r*1e3,Ne=r=>r/1e3;function zr(r,t=100,e){const n=e(J(K({},r),{keyframes:[0,t]})),a=Math.min(Ut(n),Ct);return{type:"keyframes",ease:i=>n.next(a*i).value/t,duration:Ne(a)}}let rt=()=>{},Oe=()=>{};process.env.NODE_ENV!=="production"&&(rt=(r,t)=>{!r&&typeof console!="undefined"&&console.warn(t)},Oe=(r,t)=>{if(!r)throw new Error(t)});const ia="easeInOut",aa=20;function sa(r,i={},n,a){var o=i,{defaultTransition:t={}}=o,e=Ie(o,["defaultTransition"]);const s=t.duration||.3,l=new Map,c=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,Dr(p,v.at,h,u));continue}let[y,A,x={}]=v;x.at!==void 0&&(p=Dr(p,x.at,h,u));let N=0;const I=(P,k,S,U=0,q=0)=>{const $=oa(P),M=k,{delay:F=0,times:z=jr($),type:B="keyframes",repeat:Z,repeatType:D,repeatDelay:Y=0}=M,H=Ie(M,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:E=t.ease||"easeOut",duration:g}=k;const R=typeof F=="function"?F(U,q):F,V=$.length,b=Ft(B)?B:a==null?void 0:a[B];if(V<=2&&b){let C=100;if(V===2&&da($)){const ae=$[1]-$[0];C=Math.abs(ae)}const j=K({},H);g!==void 0&&(j.duration=Ae(g));const Q=zr(j,C,b);E=Q.ease,g=Q.duration}g!=null||(g=s);const T=p+R;z.length===1&&z[0]===0&&(z[1]=1);const _=z.length-$.length;if(_>0&&Ur(z,_),$.length===1&&$.unshift(null),Z){Oe(Z<aa,"Repeat count too high, must be less than 20"),g=Xi(g,Z);const C=[...$],j=[...z];E=Array.isArray(E)?[...E]:[E];const Q=[...E];for(let ae=0;ae<Z;ae++){$.push(...C);for(let L=0;L<C.length;L++)z.push(j[L]+(ae+1)),E.push(L===0?"linear":Vr(Q,L-1))}ra(z,Z)}const O=T+g;ta(S,$,E,z,T,O),N=Math.max(R+g,N),f=Math.max(O,f)};if(ge(y)){const P=Br(y,c);I(A,x,Kr("default",P))}else{const P=Sr(y,A,n,d),k=P.length;for(let S=0;S<k;S++){A=A,x=x;const U=P[S],q=Br(U,c);for(const $ in A)I(A[$],la(x,$),Kr($,q),S,k)}}h=p,p+=N}return c.forEach((m,v)=>{for(const y in m){const A=m[y];A.sort(na);const x=[],N=[],I=[];for(let k=0;k<A.length;k++){const{at:S,value:U,easing:q}=A[k];x.push(U),N.push(Vt(0,f,S)),I.push(q||"easeOut")}N[0]!==0&&(N.unshift(0),x.unshift(x[0]),I.unshift(ia)),N[N.length-1]!==1&&(N.push(1),x.push(null)),l.has(v)||l.set(v,{keyframes:{},transition:{}});const P=l.get(v);P.keyframes[y]=x,P.transition[y]=K(J(K({},t),{duration:f,ease:I,times:N}),e)}}),l}function Br(r,t){return!t.has(r)&&t.set(r,{}),t.get(r)}function Kr(r,t){return t[r]||(t[r]=[]),t[r]}function oa(r){return Array.isArray(r)?r:[r]}function la(r,t){return r&&r[t]?K(K({},r),r[t]):K({},r)}const ca=r=>typeof r=="number",da=r=>r.every(ca),nt=new WeakMap,ua=r=>Array.isArray(r);function Hr(r){const t=[{},{}];return r==null||r.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function qr(r,t,e,n){if(typeof t=="function"){const[a,i]=Hr(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]=Hr(n);t=t(e!==void 0?e:r.custom,a,i)}return t}function pa(r,t,e){const n=r.getProps();return qr(n,t,n.custom,r)}const wt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ha(r,t){let e=new Set,n=new Set,a=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(d){o.has(d)&&(c.schedule(d),r()),d(s)}const c={schedule:(d,u=!1,h=!1)=>{const f=h&&a?e:n;return u&&o.add(d),f.has(d)||f.add(d),d},cancel:d=>{n.delete(d),o.delete(d)},process:d=>{if(s=d,a){i=!0;return}a=!0,[e,n]=[n,e],e.forEach(l),e.clear(),a=!1,i&&(i=!1,c.process(d))}};return c}const Pe={},fa=40;function ma(r,t){let e=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>e=!0,o=wt.reduce((x,N)=>(x[N]=ha(i),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:p,postRender:f}=o,m=()=>{const x=Pe.useManualTiming?a.timestamp:performance.now();e=!1,Pe.useManualTiming||(a.delta=n?1e3/60:Math.max(Math.min(x-a.timestamp,fa),1)),a.timestamp=x,a.isProcessing=!0,s.process(a),l.process(a),c.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:wt.reduce((x,N)=>{const I=o[N];return x[N]=(P,k=!1,S=!1)=>(e||v(),I.schedule(P,k,S)),x},{}),cancel:x=>{for(let N=0;N<wt.length;N++)o[wt[N]].cancel(x)},state:a,steps:o}}const Be=r=>r,{schedule:Re,cancel:jt,state:At}=ma(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:Be,!0);let Tt;function va(){Tt=void 0}const Ee={now:()=>(Tt===void 0&&Ee.set(At.isProcessing||Pe.useManualTiming?At.timestamp:performance.now()),Tt),set:r=>{Tt=r,queueMicrotask(va)}},Wr=new Set;function $r(r,t,e){r||Wr.has(t)||(console.warn(t),Wr.add(t))}class Yr{constructor(){this.subscriptions=[]}add(t){return Ji(this.subscriptions,t),()=>Fr(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 o=this.subscriptions[i];o&&o(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Gr(r,t){return t?r*(1e3/t):0}const Qr=30,ga=r=>!isNaN(parseFloat(r));class ya{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,a=!0)=>{var o,s;const i=Ee.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();a&&((s=this.events.renderRequest)==null||s.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=Ee.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ga(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&$r(!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 Yr);const n=this.events[t].add(e);return t==="change"?()=>{n(),Re.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=Ee.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Qr)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Qr);return Gr(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 it(r,t){return new ya(r,t)}function ba(r,t,e){r.hasValue(t)?r.getValue(t).set(e):r.addValue(t,it(e))}function _a(r){return ua(r)?r[r.length-1]||0:r}function Ea(r,t){let o=pa(r,t)||{},{transitionEnd:n={},transition:a={}}=o,i=Ie(o,["transitionEnd","transition"]);i=K(K({},i),n);for(const s in i){const l=_a(i[s]);ba(r,s,l)}}function Ca(r){return!!(ge(r)&&r.add)}function wa(r,t){const e=r.getValue("willChange");if(Ca(e))return e.add(t);if(!e&&Pe.WillChange){const n=new Pe.WillChange("auto");r.addValue("willChange",n),n.add(t)}}const zt=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Aa="data-"+zt("framerAppearId");function Ta(r){return r.props[Aa]}const Ia=r=>r!==null;function xa(r,{repeat:t,repeatType:e="loop"},n){const a=r.filter(Ia),i=t&&e!=="loop"&&t%2===1?0:a.length-1;return a[i]}const Ke=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],He=new Set(Ke),ka={type:"spring",stiffness:500,damping:25,restSpeed:10},Na=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),Oa={type:"keyframes",duration:.8},Pa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ra=(r,{keyframes:t})=>t.length>2?Oa:He.has(r)?r.startsWith("scale")?Na(t[1]):ka:Pa;function La(u){var h=u,{when:r,delay:t,delayChildren:e,staggerChildren:n,staggerDirection:a,repeat:i,repeatType:o,repeatDelay:s,from:l,elapsed:c}=h,d=Ie(h,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}function Xr(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 Zr=r=>t=>typeof t=="string"&&t.startsWith(r),Jr=Zr("--"),Sa=Zr("var(--"),Bt=r=>Sa(r)?Da.test(r.split("/*")[0].trim()):!1,Da=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ve=(r,t,e)=>e>t?t:e<r?r:e,qe={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},at=J(K({},qe),{transform:r=>Ve(0,1,r)}),It=J(K({},qe),{default:1}),st=r=>Math.round(r*1e5)/1e5,Kt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ma(r){return r==null}const Va=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ht=(r,t)=>e=>!!(typeof e=="string"&&Va.test(e)&&e.startsWith(r)||t&&!Ma(e)&&Object.prototype.hasOwnProperty.call(e,t)),en=(r,t,e)=>n=>{if(typeof n!="string")return n;const[a,i,o,s]=n.match(Kt);return{[r]:parseFloat(a),[t]:parseFloat(i),[e]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},Fa=r=>Ve(0,255,r),qt=J(K({},qe),{transform:r=>Math.round(Fa(r))}),Fe={test:Ht("rgb","red"),parse:en("red","green","blue"),transform:({red:r,green:t,blue:e,alpha:n=1})=>"rgba("+qt.transform(r)+", "+qt.transform(t)+", "+qt.transform(e)+", "+st(at.transform(n))+")"};function Ua(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:Ht("#"),parse:Ua,transform:Fe.transform},ot=r=>({test:t=>typeof t=="string"&&t.endsWith(r)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${r}`}),Le=ot("deg"),We=ot("%"),X=ot("px"),ja=ot("vh"),za=ot("vw"),tn=J(K({},We),{parse:r=>We.parse(r)/100,transform:r=>We.transform(r*100)}),$e={test:Ht("hsl","hue"),parse:en("hue","saturation","lightness"),transform:({hue:r,saturation:t,lightness:e,alpha:n=1})=>"hsla("+Math.round(r)+", "+We.transform(st(t))+", "+We.transform(st(e))+", "+st(at.transform(n))+")"},me={test:r=>Fe.test(r)||Wt.test(r)||$e.test(r),parse:r=>Fe.test(r)?Fe.parse(r):$e.test(r)?$e.parse(r):Wt.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Fe.transform(r):$e.transform(r)},Ba=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ka(r){var t,e;return isNaN(r)&&typeof r=="string"&&(((t=r.match(Kt))==null?void 0:t.length)||0)+(((e=r.match(Ba))==null?void 0:e.length)||0)>0}const rn="number",nn="color",Ha="var",qa="var(",an="${}",Wa=/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 lt(r){const t=r.toString(),e=[],n={color:[],number:[],var:[]},a=[];let i=0;const s=t.replace(Wa,l=>(me.test(l)?(n.color.push(i),a.push(nn),e.push(me.parse(l))):l.startsWith(qa)?(n.var.push(i),a.push(Ha),e.push(l)):(n.number.push(i),a.push(rn),e.push(parseFloat(l))),++i,an)).split(an);return{values:e,split:s,indexes:n,types:a}}function sn(r){return lt(r).values}function on(r){const{split:t,types:e}=lt(r),n=t.length;return a=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],a[o]!==void 0){const s=e[o];s===rn?i+=st(a[o]):s===nn?i+=me.transform(a[o]):i+=a[o]}return i}}const $a=r=>typeof r=="number"?0:r;function Ya(r){const t=sn(r);return on(r)(t.map($a))}const Ye={test:Ka,parse:sn,createTransformer:on,getAnimatableNone:Ya};function $t(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 Ga({hue:r,saturation:t,lightness:e,alpha:n}){r/=360,t/=100,e/=100;let a=0,i=0,o=0;if(!t)a=i=o=e;else{const s=e<.5?e*(1+t):e+t-e*t,l=2*e-s;a=$t(l,s,r+1/3),i=$t(l,s,r),o=$t(l,s,r-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}function xt(r,t){return e=>e>0?t:r}const Yt=(r,t,e)=>{const n=r*r,a=e*(t*t-n)+n;return a<0?0:Math.sqrt(a)},Qa=[Wt,Fe,$e],Xa=r=>Qa.find(t=>t.test(r));function ln(r){const t=Xa(r);if(rt(!!t,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let e=t.parse(r);return t===$e&&(e=Ga(e)),e}const cn=(r,t)=>{const e=ln(r),n=ln(t);if(!e||!n)return xt(r,t);const a=K({},e);return i=>(a.red=Yt(e.red,n.red,i),a.green=Yt(e.green,n.green,i),a.blue=Yt(e.blue,n.blue,i),a.alpha=tt(e.alpha,n.alpha,i),Fe.transform(a))},Gt=new Set(["none","hidden"]);function Za(r,t){return Gt.has(r)?e=>e<=0?r:t:e=>e>=1?t:r}const Ja=(r,t)=>e=>t(r(e)),Qt=(...r)=>r.reduce(Ja);function es(r,t){return e=>tt(r,t,e)}function Xt(r){return typeof r=="number"?es:typeof r=="string"?Bt(r)?xt:me.test(r)?cn:ns:Array.isArray(r)?dn:typeof r=="object"?me.test(r)?cn:ts:xt}function dn(r,t){const e=[...r],n=e.length,a=r.map((i,o)=>Xt(i)(i,t[o]));return i=>{for(let o=0;o<n;o++)e[o]=a[o](i);return e}}function ts(r,t){const e=K(K({},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 rs(r,t){var a;const e=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],s=r.indexes[o][n[o]],l=(a=r.values[s])!=null?a:0;e[i]=l,n[o]++}return e}const ns=(r,t)=>{const e=Ye.createTransformer(t),n=lt(r),a=lt(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?Gt.has(r)&&!a.values.length||Gt.has(t)&&!n.values.length?Za(r,t):Qt(dn(rs(n,a),a.values),e):(rt(!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.`),xt(r,t))};function un(r,t,e){return typeof r=="number"&&typeof t=="number"&&typeof e=="number"?tt(r,t,e):Xt(r)(r,t)}const is=r=>{const t=({timestamp:e})=>r(e);return{start:(e=!0)=>Re.update(t,e),stop:()=>jt(t),now:()=>At.isProcessing?At.timestamp:Ee.now()}},pn=(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)})`},as=5;function hn(r,t,e){const n=Math.max(t-as,0);return Gr(e-r(n),t-n)}const le={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 ss({duration:r=le.duration,bounce:t=le.bounce,velocity:e=le.velocity,mass:n=le.mass}){let a,i;rt(r<=Ae(le.maxDuration),"Spring duration must be 10 seconds or less");let o=1-t;o=Ve(le.minDamping,le.maxDamping,o),r=Ve(le.minDuration,le.maxDuration,Ne(r)),o<1?(a=c=>{const d=c*o,u=d*r,h=d-e,p=Jt(c,o),f=Math.exp(-u);return Zt-h/p*f},i=c=>{const u=c*o*r,h=u*e+e,p=Math.pow(o,2)*Math.pow(c,2)*r,f=Math.exp(-u),m=Jt(Math.pow(c,2),o);return(-a(c)+Zt>0?-1:1)*((h-p)*f)/m}):(a=c=>{const d=Math.exp(-c*r),u=(c-e)*r+1;return-Zt+d*u},i=c=>{const d=Math.exp(-c*r),u=(e-c)*(r*r);return d*u});const s=5/r,l=ls(a,i,s);if(r=Ae(r),isNaN(l))return{stiffness:le.stiffness,damping:le.damping,duration:r};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:r}}}const os=12;function ls(r,t,e){let n=e;for(let a=1;a<os;a++)n=n-r(n)/t(n);return n}function Jt(r,t){return r*Math.sqrt(1-t*t)}const cs=["duration","bounce"],ds=["stiffness","damping","mass"];function fn(r,t){return t.some(e=>r[e]!==void 0)}function us(r){let t=K({velocity:le.velocity,stiffness:le.stiffness,damping:le.damping,mass:le.mass,isResolvedFromDuration:!1},r);if(!fn(r,ds)&&fn(r,cs))if(r.visualDuration){const e=r.visualDuration,n=2*Math.PI/(e*1.2),a=n*n,i=2*Ve(.05,1,1-(r.bounce||0))*Math.sqrt(a);t=J(K({},t),{mass:le.mass,stiffness:a,damping:i})}else{const e=ss(r);t=J(K(K({},t),e),{mass:le.mass}),t.isResolvedFromDuration=!0}return t}function ct(r=le.visualDuration,t=le.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],o=e.keyframes[e.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=us(J(K({},e),{velocity:-Ne(e.velocity||0)})),f=h||0,m=c/(2*Math.sqrt(l*d)),v=o-i,y=Ne(Math.sqrt(l/d)),A=Math.abs(v)<5;n||(n=A?le.restSpeed.granular:le.restSpeed.default),a||(a=A?le.restDelta.granular:le.restDelta.default);let x;if(m<1){const I=Jt(y,m);x=P=>{const k=Math.exp(-m*y*P);return o-k*((f+m*y*v)/I*Math.sin(I*P)+v*Math.cos(I*P))}}else if(m===1)x=I=>o-Math.exp(-y*I)*(v+(f+y*v)*I);else{const I=y*Math.sqrt(m*m-1);x=P=>{const k=Math.exp(-m*y*P),S=Math.min(I*P,300);return o-k*((f+m*y*v)*Math.sinh(S)+I*v*Math.cosh(S))/I}}const N={calculatedDuration:p&&u||null,next:I=>{const P=x(I);if(p)s.done=I>=u;else{let k=I===0?f:0;m<1&&(k=I===0?Ae(f):hn(x,I,P));const S=Math.abs(k)<=n,U=Math.abs(o-P)<=a;s.done=S&&U}return s.value=s.done?o:P,s},toString:()=>{const I=Math.min(Ut(N),Ct),P=pn(k=>N.next(I*k).value,I,30);return I+"ms "+P},toTransition:()=>{}};return N}ct.applyToOptions=r=>{const t=zr(r,100,ct);return r.ease=t.ease,r.duration=Ae(t.duration),r.type="keyframes",r};function er({keyframes:r,velocity:t=0,power:e=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:o,min:s,max:l,restDelta:c=.5,restSpeed:d}){const u=r[0],h={done:!1,value:u},p=S=>s!==void 0&&S<s||l!==void 0&&S>l,f=S=>s===void 0?l:l===void 0||Math.abs(s-S)<Math.abs(l-S)?s:l;let m=e*t;const v=u+m,y=o===void 0?v:o(v);y!==v&&(m=y-u);const A=S=>-m*Math.exp(-S/n),x=S=>y+A(S),N=S=>{const U=A(S),q=x(S);h.done=Math.abs(U)<=c,h.value=h.done?y:q};let I,P;const k=S=>{p(h.value)&&(I=S,P=ct({keyframes:[h.value,f(h.value)],velocity:hn(x,S,h.value),damping:a,stiffness:i,restDelta:c,restSpeed:d}))};return k(0),{calculatedDuration:null,next:S=>{let U=!1;return!P&&I===void 0&&(U=!0,N(S),k(S)),I!==void 0&&S>=I?P.next(S-I):(!U&&N(S),h)}}}function ps(r,t,e){const n=[],a=e||Pe.mix||un,i=r.length-1;for(let o=0;o<i;o++){let s=a(r[o],r[o+1]);if(t){const l=Array.isArray(t)?t[o]||Be:t;s=Qt(l,s)}n.push(s)}return n}function hs(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 o=r[0]===r[1];r[0]>r[i-1]&&(r=[...r].reverse(),t=[...t].reverse());const s=ps(t,n,a),l=s.length,c=d=>{if(o&&d<r[0])return t[0];let u=0;if(l>1)for(;u<r.length-2&&!(d<r[u+1]);u++);const h=Vt(r[u],r[u+1],d);return s[u](h)};return e?d=>c(Ve(r[0],r[i-1],d)):c}function fs(r,t){return r.map(e=>e*t)}const mn=(r,t,e)=>(((1-3*e+3*t)*r+(3*e-6*t))*r+3*t)*r,ms=1e-7,vs=12;function gs(r,t,e,n,a){let i,o,s=0;do o=t+(e-t)/2,i=mn(o,n,a)-r,i>0?e=o:t=o;while(Math.abs(i)>ms&&++s<vs);return o}function dt(r,t,e,n){if(r===t&&e===n)return Be;const a=i=>gs(i,0,1,r,e);return i=>i===0||i===1?i:mn(a(i),t,n)}const ys=dt(.42,0,1,1),bs=dt(0,0,.58,1),vn=dt(.42,0,.58,1),gn=r=>t=>t<=.5?r(2*t)/2:(2-r(2*(1-t)))/2,yn=r=>t=>1-r(1-t),bn=dt(.33,1.53,.69,.99),tr=yn(bn),_n=gn(tr),En=r=>(r*=2)<1?.5*tr(r):.5*(2-Math.pow(2,-10*(r-1))),rr=r=>1-Math.sin(Math.acos(r)),_s=yn(rr),Cn=gn(rr),wn=r=>Array.isArray(r)&&typeof r[0]=="number",An={linear:Be,easeIn:ys,easeInOut:vn,easeOut:bs,circIn:rr,circInOut:Cn,circOut:_s,backIn:tr,backInOut:_n,backOut:bn,anticipate:En},Es=r=>typeof r=="string",Tn=r=>{if(wn(r)){Oe(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,e,n,a]=r;return dt(t,e,n,a)}else if(Es(r))return Oe(An[r]!==void 0,`Invalid easing type '${r}'`),An[r];return r};function Cs(r,t){return r.map(()=>t||vn).splice(0,r.length-1)}function Ge({duration:r=300,keyframes:t,times:e,ease:n="easeInOut"}){const a=Mr(n)?n.map(Tn):Tn(n),i={done:!1,value:t[0]},o=fs(e&&e.length===t.length?e:jr(t),r),s=hs(o,t,{ease:Array.isArray(a)?a:Cs(t,a)});return{calculatedDuration:r,next:l=>(i.value=s(l),i.done=l>=r,i)}}const ws=r=>r!==null;function nr(r,{repeat:t,repeatType:e="loop"},n,a=1){const i=r.filter(ws),s=a<0||t&&e!=="loop"&&t%2===1?0:i.length-1;return!s||n===void 0?i[s]:n}const As={decay:er,inertia:er,tween:Ge,keyframes:Ge,spring:ct};function In(r){typeof r.type=="string"&&(r.type=As[r.type])}class ir{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 Ts=r=>r/100;class ar extends ir{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!==Ee.now()&&this.tick(Ee.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;In(t);const{type:e=Ge,repeat:n=0,repeatDelay:a=0,repeatType:i,velocity:o=0}=t;let{keyframes:s}=t;const l=e||Ge;process.env.NODE_ENV!=="production"&&l!==Ge&&Oe(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`),l!==Ge&&typeof s[0]!="number"&&(this.mixKeyframes=Qt(Ts,un(s[0],s[1])),s=[0,100]);const c=l(J(K({},t),{keyframes:s}));i==="mirror"&&(this.mirroredGenerator=l(J(K({},t),{keyframes:[...s].reverse(),velocity:-o}))),c.calculatedDuration===null&&(c.calculatedDuration=Ut(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(n+1)-a,this.generator=c}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:o,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:c=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 y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?y<0:y>a;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let x=this.currentTime,N=n;if(u){const S=Math.min(this.currentTime,a)/s;let U=Math.floor(S),q=S%1;!q&&S>=1&&(q=1),q===1&&U--,U=Math.min(U,u+1),!!(U%2)&&(h==="reverse"?(q=1-q,p&&(q-=p/s)):h==="mirror"&&(N=o)),x=Ve(0,1,q)*s}const I=A?{done:!1,value:d[0]}:N.next(x);i&&(I.value=i(I.value));let{done:P}=I;!A&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return k&&f!==er&&(I.value=nr(d,this.options,v,this.speed)),m&&m(I.value),k&&this.finish(),I}then(t,e){return this.finished.then(t,e)}get duration(){return Ne(this.calculatedDuration)}get time(){return Ne(this.currentTime)}set time(t){var e;t=Ae(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(Ee.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Ne(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=is,startTime:e}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(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(Ee.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 Is(r){var t;for(let e=1;e<r.length;e++)(t=r[e])!=null||(r[e]=r[e-1])}const Ue=r=>r*180/Math.PI,sr=r=>{const t=Ue(Math.atan2(r[1],r[0]));return or(t)},xs={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:sr,rotateZ:sr,skewX:r=>Ue(Math.atan(r[1])),skewY:r=>Ue(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},or=r=>(r=r%360,r<0&&(r+=360),r),xn=sr,kn=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),Nn=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),ks={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:kn,scaleY:Nn,scale:r=>(kn(r)+Nn(r))/2,rotateX:r=>or(Ue(Math.atan2(r[6],r[5]))),rotateY:r=>or(Ue(Math.atan2(-r[2],r[0]))),rotateZ:xn,rotate:xn,skewX:r=>Ue(Math.atan(r[4])),skewY:r=>Ue(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function lr(r){return r.includes("scale")?1:0}function cr(r,t){if(!r||r==="none")return lr(t);const e=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,a;if(e)n=ks,a=e;else{const s=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=xs,a=s}if(!a)return lr(t);const i=n[t],o=a[1].split(",").map(Os);return typeof i=="function"?i(o):o[i]}const Ns=(r,t)=>{const{transform:e="none"}=getComputedStyle(r);return cr(e,t)};function Os(r){return parseFloat(r.trim())}const On=r=>r===qe||r===X,Ps=new Set(["x","y","z"]),Rs=Ke.filter(r=>!Ps.has(r));function Ls(r){const t=[];return Rs.forEach(e=>{const n=r.getValue(e);n!==void 0&&(t.push([e,n.get()]),n.set(e.startsWith("scale")?1:0))}),t}const je={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})=>cr(t,"x"),y:(r,{transform:t})=>cr(t,"y")};je.translateX=je.x,je.translateY=je.y;const ze=new Set;let dr=!1,ur=!1,pr=!1;function Pn(){if(ur){const r=Array.from(ze).filter(n=>n.needsMeasurement),t=new Set(r.map(n=>n.element)),e=new Map;t.forEach(n=>{const a=Ls(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,o])=>{var s;(s=n.getValue(i))==null||s.set(o)})}),r.forEach(n=>n.measureEndState()),r.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}ur=!1,dr=!1,ze.forEach(r=>r.complete(pr)),ze.clear()}function Rn(){ze.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(ur=!0)})}function Ss(){pr=!0,Rn(),Pn(),pr=!1}class hr{constructor(t,e,n,a,i,o=!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=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ze.add(this),dr||(dr=!0,Re.read(Rn),Re.resolveKeyframes(Pn))):(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(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&e){const s=n.readValue(e,o);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=o),a&&i===void 0&&a.set(t[0])}Is(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ze.delete(this)}cancel(){this.state==="scheduled"&&(ze.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ds=r=>r.startsWith("--");function Ms(r,t,e){Ds(t)?r.style.setProperty(t,e):r.style[t]=e}function fr(r){let t;return()=>(t===void 0&&(t=r()),t)}const Vs=fr(()=>window.ScrollTimeline!==void 0),Fs={};function Us(r,t){const e=fr(r);return()=>{var n;return(n=Fs[t])!=null?n:e()}}const Ln=Us(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),ut=([r,t,e,n])=>`cubic-bezier(${r}, ${t}, ${e}, ${n})`,Sn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ut([0,.65,.55,1]),circOut:ut([.55,0,1,.45]),backIn:ut([.31,.01,.66,-.59]),backOut:ut([.33,1.53,.69,.99])};function Dn(r,t){if(r)return typeof r=="function"?Ln()?pn(r,t):"ease-out":wn(r)?ut(r):Array.isArray(r)?r.map(e=>Dn(e,t)||Sn.easeOut):Sn[r]}function js(r,t,e,{delay:n=0,duration:a=300,repeat:i=0,repeatType:o="loop",ease:s="easeOut",times:l}={},c=void 0){const d={[t]:e};l&&(d.offset=l);const u=Dn(s,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:o==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),r.animate(d,h)}function zs(e){var n=e,{type:r}=n,t=Ie(n,["type"]);var a,i;return Ft(r)&&Ln()?r.applyToOptions(t):((a=t.duration)!=null||(t.duration=300),(i=t.ease)!=null||(t.ease="easeOut"),t)}class Bs extends ir{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:a,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=o,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 c=zs(t);this.animation=js(e,n,a,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=nr(a,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(d):Ms(e,n,d),this.animation.cancel()}l==null||l(),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 Ne(Number(t))}get time(){return Ne(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ae(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&&Vs()?(this.animation.timeline=t,Be):e(this)}}const Mn={anticipate:En,backInOut:_n,circInOut:Cn};function Ks(r){return r in Mn}function Hs(r){typeof r.ease=="string"&&Ks(r.ease)&&(r.ease=Mn[r.ease])}const Vn=10;class qs extends Bs{constructor(t){Hs(t),In(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){var d;const c=this.options,{motionValue:e,onUpdate:n,onComplete:a,element:i}=c,o=Ie(c,["motionValue","onUpdate","onComplete","element"]);if(!e)return;if(t!==void 0){e.set(t);return}const s=new ar(J(K({},o),{autoplay:!1})),l=Ae((d=this.finishedTime)!=null?d:this.time);e.setWithVelocity(s.sample(l-Vn).value,s.sample(l).value,Vn),s.stop()}}const Fn=(r,t)=>t==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&(Ye.test(r)||r==="0")&&!r.startsWith("url("));function Ws(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 $s(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],o=Fn(a,t),s=Fn(i,t);return rt(o===s,`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.`),!o||!s?!1:Ws(r)||(e==="spring"||Ft(e))&&n}function Un(r){return typeof r=="object"&&r!==null}function Ys(r){return Un(r)&&"offsetHeight"in r}const Gs=new Set(["opacity","clipPath","filter","transform"]),Qs=fr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Xs(r){var c;const{motionValue:t,name:e,repeatDelay:n,repeatType:a,damping:i,type:o}=r;if(!Ys((c=t==null?void 0:t.owner)==null?void 0:c.current))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return Qs()&&e&&Gs.has(e)&&(e!=="transform"||!l)&&!s&&!n&&a!=="mirror"&&i!==0&&o!=="inertia"}const Zs=40;class Js extends ir{constructor(h){var p=h,{autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:o="loop",keyframes:s,name:l,motionValue:c,element:d}=p,u=Ie(p,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var y,A;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(A=this.keyframeResolver)==null||A.cancel()},this.createdAt=Ee.now();const f=K({autoplay:t,delay:e,type:n,repeat:a,repeatDelay:i,repeatType:o,name:l,motionValue:c,element:d},u),m=(d==null?void 0:d.KeyframeResolver)||hr;this.keyframeResolver=new m(s,(y,A,x)=>this.onKeyframesResolved(y,A,f,!x),l,c,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,e,n,a){this.keyframeResolver=void 0;const{name:i,type:o,velocity:s,delay:l,isHandoff:c,onUpdate:d}=n;this.resolvedAt=Ee.now(),$s(t,i,o,s)||((Pe.instantAnimations||!l)&&(d==null||d(nr(t,n,e))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u=a?this.resolvedAt?this.resolvedAt-this.createdAt>Zs?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=J(K({startTime:u,finalKeyframe:e},n),{keyframes:t}),p=!c&&Xs(h)?new qs(J(K({},h),{element:h.motionValue.owner.current})):new ar(h);p.finished.then(()=>this.notifyFinished()).catch(Be),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(),Ss()),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 jn=(r,t,e,n={},a,i)=>o=>{const s=Xr(n,r)||{},l=s.delay||n.delay||0;let{elapsed:c=0}=n;c=c-Ae(l);const d=J(K({keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity()},s),{delay:-c,onUpdate:h=>{t.set(h),s.onUpdate&&s.onUpdate(h)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:r,motionValue:t,element:i?void 0:a});La(s)||Object.assign(d,Ra(r,d)),d.duration&&(d.duration=Ae(d.duration)),d.repeatDelay&&(d.repeatDelay=Ae(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)),(Pe.instantAnimations||Pe.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!s.type&&!s.ease,u&&!i&&t.get()!==void 0){const h=xa(d.keyframes,s);if(h!==void 0){Re.update(()=>{d.onUpdate(h),d.onComplete()});return}}return s.isSync?new ar(d):new Js(d)},zn=new Set(["width","height","top","left","right","bottom",...Ke]);function eo({protectedKeys:r,needsAnimating:t},e){const n=r.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,n}function to(r,t,{delay:e=0,transitionOverride:n,type:a}={}){var u;let d=t,{transition:i=r.getDefaultTransition(),transitionEnd:o}=d,s=Ie(d,["transition","transitionEnd"]);n&&(i=n);const l=[],c=a&&r.animationState&&r.animationState.getState()[a];for(const h in s){const p=r.getValue(h,(u=r.latestValues[h])!=null?u:null),f=s[h];if(f===void 0||c&&eo(c,h))continue;const m=K({delay:e},Xr(i||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(f)&&f===v&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const x=Ta(r);if(x){const N=window.MotionHandoffAnimation(x,h,Re);N!==null&&(m.startTime=N,y=!0)}}wa(r,h),p.start(jn(h,p,f,r.shouldReduceMotion&&zn.has(h)?{type:!1}:m,r,y));const A=p.animation;A&&l.push(A)}return o&&Promise.all(l).then(()=>{Re.update(()=>{o&&Ea(r,o)})}),l}function ro({top:r,left:t,right:e,bottom:n}){return{x:{min:t,max:e},y:{min:r,max:n}}}function no(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 io(r,t){return ro(no(r.getBoundingClientRect(),t))}const Bn={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"]},mr={};for(const r in Bn)mr[r]={isEnabled:t=>Bn[r].some(e=>!!t[e])};const Kn=()=>({min:0,max:0}),vr=()=>({x:Kn(),y:Kn()}),ao=typeof window!="undefined",gr={current:null},Hn={current:!1};function so(){if(Hn.current=!0,!!ao)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),t=()=>gr.current=r.matches;r.addListener(t),t()}else gr.current=!1}function oo(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function lo(r){return typeof r=="string"||Array.isArray(r)}const co=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function qn(r){return oo(r.animate)||co.some(t=>lo(r[t]))}function uo(r){return!!(qn(r)||r.variants)}function po(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,it(a,{owner:r}));else if(i!==a)if(r.hasValue(n)){const o=r.getValue(n);o.liveStyle===!0?o.jump(a):o.hasAnimated||o.set(a)}else{const o=r.getStaticValue(n);r.addValue(n,it(o!==void 0?o:a,{owner:r}))}}for(const n in e)t[n]===void 0&&r.removeValue(n);return t}const Wn=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),$n=r=>/^0[^.\s]+$/u.test(r),ho={test:r=>r==="auto",parse:r=>r},Yn=r=>t=>t.test(r),Gn=[qe,X,We,Le,za,ja,ho],Qn=r=>Gn.find(Yn(r)),fo=[...Gn,me,Ye],mo=r=>fo.find(Yn(r)),vo=new Set(["brightness","contrast","saturate","opacity"]);function go(r){const[t,e]=r.slice(0,-1).split("(");if(t==="drop-shadow")return r;const[n]=e.match(Kt)||[];if(!n)return r;const a=e.replace(n,"");let i=vo.has(t)?1:0;return n!==e&&(i*=100),t+"("+i+a+")"}const yo=/\b([a-z-]*)\(.*?\)/gu,yr=J(K({},Ye),{getAnimatableNone:r=>{const t=r.match(yo);return t?t.map(go).join(" "):r}}),Xn=J(K({},qe),{transform:Math.round}),br=J(K({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:It,scaleX:It,scaleY:It,scaleZ:It,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:at,originX:tn,originY:tn,originZ:X}),{zIndex:Xn,fillOpacity:at,strokeOpacity:at,numOctaves:Xn}),bo=J(K({},br),{color:me,backgroundColor:me,outlineColor:me,fill:me,stroke:me,borderColor:me,borderTopColor:me,borderRightColor:me,borderBottomColor:me,borderLeftColor:me,filter:yr,WebkitFilter:yr}),Zn=r=>bo[r];function Jn(r,t){let e=Zn(r);return e!==yr&&(e=Ye),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const ei=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ti{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:a,blockInitialAnimation:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=hr,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=Ee.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Re.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget=K({},l),this.initialValues=e.initial?K({},l):{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=qn(e),this.isVariantNode=uo(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const h=this.scrapeMotionValuesFromProps(e,{},this),{willChange:d}=h,u=Ie(h,["willChange"]);for(const p in u){const f=u[p];l[p]!==void 0&&ge(f)&&f.set(l[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)),Hn.current||so(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:gr.current,process.env.NODE_ENV!=="production"&&$r(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(),jt(this.notifyUpdate),jt(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=He.has(t);n&&this.onBindTransform&&this.onBindTransform();const a=e.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Re.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{a(),i(),o&&o(),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 mr){const e=mr[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):vr()}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<ei.length;n++){const a=ei[n];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,o=t[i];o&&(this.propEventSubscriptions[a]=this.on(a,o))}this.prevMotionValues=po(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=it(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"&&(Wn(n)||$n(n))?n=parseFloat(n):!mo(n)&&Ye.test(e)&&(n=Jn(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 o=qr(this.props,e,(i=this.presenceContext)==null?void 0:i.custom);o&&(n=o[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 Yr),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const _o=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Eo(r){const t=_o.exec(r);if(!t)return[,];const[,e,n,a]=t;return[`--${e!=null?e:n}`,a]}const Co=4;function ri(r,t,e=1){Oe(e<=Co,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,a]=Eo(r);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const o=i.trim();return Wn(o)?parseFloat(o):o}return Bt(a)?ri(a,t,e+1):a}function wo(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||$n(r):!0}const Ao=new Set(["auto","none","0"]);function To(r,t,e){let n=0,a;for(;n<r.length&&!a;){const i=r[n];typeof i=="string"&&!Ao.has(i)&&lt(i).values.length&&(a=r[n]),n++}if(a&&e)for(const i of t)r[i]=Jn(e,a)}class Io extends hr{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 l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Bt(c))){const d=ri(c,e.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!zn.has(n)||t.length!==2)return;const[a,i]=t,o=Qn(a),s=Qn(i);if(o!==s)if(On(o)&&On(s))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else je[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let a=0;a<t.length;a++)(t[a]===null||wo(t[a]))&&n.push(a);n.length&&To(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=je[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 s;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,o=n[i];n[i]=je[e](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(s=this.removedTransforms)!=null&&s.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}class ni extends ti{constructor(){super(...arguments),this.KeyframeResolver=Io}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 ii=(r,t)=>t&&typeof r=="number"?t.transform(r):r,xo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ko=Ke.length;function No(r,t,e){let n="",a=!0;for(let i=0;i<ko;i++){const o=Ke[i],s=r[o];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(o.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||e){const c=ii(s,br[o]);if(!l){a=!1;const d=xo[o]||o;n+=`${d}(${c}) `}e&&(t[o]=c)}}return n=n.trim(),e?n=e(t,a?"":n):a&&(n="none"),n}function ai(r,t,e){const{style:n,vars:a,transformOrigin:i}=r;let o=!1,s=!1;for(const l in t){const c=t[l];if(He.has(l)){o=!0;continue}else if(Jr(l)){a[l]=c;continue}else{const d=ii(c,br[l]);l.startsWith("origin")?(s=!0,i[l]=d):n[l]=d}}if(t.transform||(o||e?n.transform=No(t,r.transform,e):n.transform&&(n.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:d=0}=i;n.transformOrigin=`${l} ${c} ${d}`}}function si(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 Oo={};function Po(r,{layout:t,layoutId:e}){return He.has(r)||r.startsWith("origin")||(t||e!==void 0)&&(!!Oo[r]||r==="opacity")}function oi(r,t,e){var i;const{style:n}=r,a={};for(const o in n)(ge(n[o])||t.style&&ge(t.style[o])||Po(o,r)||((i=e==null?void 0:e.getValue(o))==null?void 0:i.liveStyle)!==void 0)&&(a[o]=n[o]);return a}function Ro(r){return window.getComputedStyle(r)}class Lo extends ni{constructor(){super(...arguments),this.type="html",this.renderInstance=si}readValueFromInstance(t,e){var n;if(He.has(e))return(n=this.projection)!=null&&n.isProjecting?lr(e):Ns(t,e);{const a=Ro(t),i=(Jr(e)?a.getPropertyValue(e):a[e])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return io(t,e)}build(t,e,n){ai(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return oi(t,e,n)}}function So(r,t){return r in t}class Do extends ti{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(So(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 vr()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Mo={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vo={offset:"strokeDashoffset",array:"strokeDasharray"};function Fo(r,t,e=1,n=0,a=!0){r.pathLength=1;const i=a?Mo:Vo;r[i.offset]=X.transform(-n);const o=X.transform(t),s=X.transform(e);r[i.array]=`${o} ${s}`}function Uo(r,u,l,c,d){var h=u,{attrX:t,attrY:e,attrScale:n,pathLength:a,pathSpacing:i=1,pathOffset:o=0}=h,s=Ie(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var m,v;if(ai(r,s,c),l){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&&Fo(p,a,i,o,!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"]),jo=r=>typeof r=="string"&&r.toLowerCase()==="svg";function zo(r,t,e,n){si(r,t,void 0,n);for(const a in t.attrs)r.setAttribute(li.has(a)?a:zt(a),t.attrs[a])}function Bo(r,t,e){const n=oi(r,t,e);for(const a in r)if(ge(r[a])||ge(t[a])){const i=Ke.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;n[i]=r[a]}return n}class Ko extends ni{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(He.has(e)){const n=Zn(e);return n&&n.default||0}return e=li.has(e)?e:zt(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Bo(t,e,n)}build(t,e,n){Uo(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,a){zo(t,e,n,a)}mount(t){this.isSVGTag=jo(t.tagName),super.mount(t)}}function ci(r){return Un(r)&&"ownerSVGElement"in r}function Ho(r){return ci(r)&&r.tagName==="svg"}function qo(r){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=ci(r)&&!Ho(r)?new Ko(t):new Lo(t);e.mount(r),nt.set(r,e)}function Wo(r){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new Do(t);e.mount(r),nt.set(r,e)}function $o(r,t,e){const n=ge(r)?r:it(r);return n.start(jn("",n,t,e)),n.animation}function Yo(r,t){return ge(r)||typeof r=="number"||typeof r=="string"&&!Mt(t)}function di(r,t,e,n){const a=[];if(Yo(r,t))a.push($o(r,Mt(t)&&t.default||t,e&&(e.default||e)));else{const i=Sr(r,t,n),o=i.length;Oe(!!o,"No valid elements provided.");for(let s=0;s<o;s++){const l=i[s],c=l instanceof Element?qo:Wo;nt.has(l)||c(l);const d=nt.get(l),u=K({},e);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(s,o)),a.push(...to(d,J(K({},t),{transition:u}),{}))}}return a}function Go(r,t,e){const n=[];return sa(r,t,e,{spring:ct}).forEach(({keyframes:i,transition:o},s)=>{n.push(...di(s,i,o))}),n}class Qo{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 Xo extends Qo{then(t,e){return this.finished.finally(t).then(()=>{})}}function Zo(r){return Array.isArray(r)&&r.some(Array.isArray)}function Jo(r){function t(e,n,a){let i=[];return Zo(e)?i=Go(e,n,r):i=di(e,n,a,r),new Xo(i)}return t}const ue=Jo(),te={spinner:"_spinner_k40uq_1",spinnerContainer:"_spinnerContainer_k40uq_5",success:"_success_k40uq_9",successContainer:"_successContainer_k40uq_13",container:"_container_k40uq_17",card:"_card_k40uq_26",warning:"_warning_k40uq_35",svg:"_svg_k40uq_43",srOnly:"_srOnly_k40uq_48",backButton:"_backButton_k40uq_52"};class ui{constructor(){w(this,"template",`
3
- <svg aria-hidden="true" class="${te.spinner}" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ (function(ne,ie){typeof exports=="object"&&typeof module!="undefined"?ie(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],ie):(ne=typeof globalThis!="undefined"?globalThis:ne||self,ie(ne["PayNext SDK"]={},ne.React))})(this,function(ne,ie){"use strict";var Wl=Object.defineProperty,Yl=Object.defineProperties;var Gl=Object.getOwnPropertyDescriptors;var kt=Object.getOwnPropertySymbols;var Wi=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable;var kr=(ne,ie,se)=>ie in ne?Wl(ne,ie,{enumerable:!0,configurable:!0,writable:!0,value:se}):ne[ie]=se,K=(ne,ie)=>{for(var se in ie||(ie={}))Wi.call(ie,se)&&kr(ne,se,ie[se]);if(kt)for(var se of kt(ie))Yi.call(ie,se)&&kr(ne,se,ie[se]);return ne},ee=(ne,ie)=>Yl(ne,Gl(ie));var Ae=(ne,ie)=>{var se={};for(var be in ne)Wi.call(ne,be)&&ie.indexOf(be)<0&&(se[be]=ne[be]);if(ne!=null&&kt)for(var be of kt(ne))ie.indexOf(be)<0&&Yi.call(ne,be)&&(se[be]=ne[be]);return se};var w=(ne,ie,se)=>kr(ne,typeof ie!="symbol"?ie+"":ie,se);var Y=(ne,ie,se)=>new Promise((be,ke)=>{var Rt=Te=>{try{qe(se.next(Te))}catch(Qe){ke(Qe)}},gt=Te=>{try{qe(se.throw(Te))}catch(Qe){ke(Qe)}},qe=Te=>Te.done?be(Te.value):Promise.resolve(Te.value).then(Rt,gt);qe((se=se.apply(ne,ie)).next())});var se=document.createElement("style");se.textContent=`._spinner_k40uq_1{height:100%;width:100%}@keyframes _spin_k40uq_1{to{transform:rotate(360deg)}}._spinner_k40uq_1{animation:_spin_k40uq_1 1s linear infinite;fill:#9ca3af;--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}._spinner_k40uq_1:is(._dark_k40uq_1 *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}._spinnerContainer_k40uq_5{height:40px;width:40px}._success_k40uq_9{position:absolute;top:50%;left:50%;width:1.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:#16a34a}._successContainer_k40uq_13{position:relative;display:grid;height:2.25rem;width:2.25rem;flex:none;place-items:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(232 250 240 / var(--tw-bg-opacity, 1))}._successContainer_k40uq_13:is(._dark_k40uq_1 *){--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._container_k40uq_17{width:30px;height:20px;display:flex;margin:0 1px;align-items:center;justify-content:center}._card_k40uq_26{width:28px;height:19px;display:flex;margin:0 1px;align-items:center;justify-content:center}._warning_k40uq_35{width:16px;height:16px;display:flex;align-items:center;justify-content:center}._svg_k40uq_43{width:100%;height:100%}._srOnly_k40uq_48{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_k40uq_52{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_5sq3n_1{overflow:hidden;z-index:0;position:relative;height:auto;min-height:40px;width:100%;max-width:640px}._hidden_5sq3n_7{display:none!important}._formInitial_5sq3n_11{opacity:0;transform:translateY(100px)}._btnsInitial_5sq3n_16{opacity:0;transform:translateY(-100px)}._buttons_1i8cu_1{display:grid;gap:.5rem}._hidden_1i8cu_5{display:none!important}._applePay_1ce61_1{display:flex;flex-direction:column;gap:8px}._applePay_1ce61_1:hover{filter:contrast(.575) brightness(1.2)}._hidden_1ce61_26{display:none!important}._googlePay_gmreq_1{display:flex;flex-direction:column;gap:8px}._hidden_gmreq_20{display:none!important}._paypal_90mm5_1{display:flex;flex-direction:column;gap:8px}._hidden_90mm5_12{display:none}._button_13xr0_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(22 163 74 / 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_13xr0_1{transition-property:none}}._button_13xr0_1 span{margin-left:.25rem}._button_13xr0_1:hover{opacity:.7}._button_13xr0_1:active{transform:scale(.95)}._conteiner_1j5pe_2{display:flex;flex-direction:column;gap:.5rem}._venmo_1j5pe_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%}&:hover{background-color:#5683c1}}._hidden_1j5pe_33{display:none}._button_125my_1{cursor:pointer}._button_191iv_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(37 99 235 / 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_191iv_1{transition-property:none}}._button_191iv_1 span{margin-left:.25rem}._disabled_191iv_17,._button_191iv_1:hover{opacity:.7}._press_191iv_22:active{transform:scale(.95)}._hidden_191iv_26{display:none!important}._spinner_191iv_30{width:24px;height:24px}._cardForm_6gjbg_1{position:relative;display:grid;min-height:292px;gap:.75rem;padding-top:0}._hidden_6gjbg_5{display:none!important}._topOffset_6gjbg_9{margin-top:.5rem}._wrapper_4knhb_1{position:relative}._inputContainer_4knhb_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_4knhb_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_4knhb_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_4knhb_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_4knhb_10,._inputContainer_4knhb_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_4knhb_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_4knhb_20{display:flex}._errorInput_4knhb_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_4knhb_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_4knhb_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._label_4knhb_28{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_4knhb_32{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_4knhb_36{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_4knhb_40{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_4knhb_47{display:none!important}._wrapper_j8wuo_1{position:relative}._inputContainer_j8wuo_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_j8wuo_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_j8wuo_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_j8wuo_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_j8wuo_10,._inputContainer_j8wuo_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_j8wuo_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_j8wuo_20{display:flex}._errorInput_j8wuo_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_j8wuo_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_j8wuo_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._error_j8wuo_24{margin-top:.25rem;margin-bottom:0;padding-left:.25rem;font-size:.75rem;line-height:1rem;font-weight:400;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._label_j8wuo_32{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_j8wuo_36{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_j8wuo_40{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_j8wuo_44{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_j8wuo_51{display:none!important}._wrapper_1xdj3_1{position:relative}._inputContainer_1xdj3_5{background-color:transparent;box-sizing:border-box;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;border-width:1px;border-style:solid;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));padding-left:.75rem;padding-right:.75rem}._inputContainer_1xdj3_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xdj3_5{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){._inputContainer_1xdj3_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_1xdj3_10,._inputContainer_1xdj3_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._input_1xdj3_5{background-color:transparent;display:block;height:100%;width:100%;border-style:none;font-size:1rem;font-weight:400;outline:2px solid transparent;outline-offset:2px}._endContent_1xdj3_20{display:flex;align-items:center;justify-content:center}._errorInput_1xdj3_24{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._errorInput_1xdj3_24:hover{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._errorInput_1xdj3_24:focus{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1));--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity, 1))}._error_1xdj3_24{margin-top:.25rem;margin-bottom:0;padding-left:.25rem;font-size:.75rem;line-height:1rem;font-weight:400;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._label_1xdj3_32{margin-bottom:2px;display:flex;align-items:flex-end;justify-content:space-between;padding-left:1px;padding-right:.5rem;font-size:.75rem;line-height:1rem;font-weight:400}._labelError_1xdj3_36{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_1xdj3_40{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_1xdj3_44{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_1xdj3_51{display:none!important}._securityContent_1xdj3_55{display:grid;grid-column-gap:5px;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_1cz9d_1{margin-top:.5rem;display:flex;width:100%;flex-grow:1;flex-direction:row;align-items:center;justify-content:flex-start;-moz-column-gap:.25rem;column-gap:.25rem;border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(254 231 239 / var(--tw-bg-opacity, 1));padding:.75rem 1rem}._container_1cz9d_1:is(._dark_1cz9d_1 *){background-color:#fee7ef80;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}._container_1cz9d_1 svg{width:16px;height:16px}._title_1cz9d_10{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_1cz9d_10:is(._dark_1cz9d_1 *){--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}
2
+ /*$vite$:1*/`,document.head.appendChild(se);class be{constructor(t){w(this,"parent");w(this,"core");typeof window!="undefined"&&(this.parent=t)}mount(t){return Y(this,null,function*(){if(!this.parent)return;if(!this.core){const a=(yield Promise.resolve().then(()=>Kl)).Core;this.core=new a}t.styles&&this.core.state.styles.setState(t.styles);const e=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(e),this.core.state.checkout.setState(t)})}unmount(){return Y(this,null,function*(){!this.parent||!this.core||(this.parent.innerHTML="",this.core.clearState())})}}let ke=null;function Rt(){return Y(this,null,function*(){return ke||(ke=new Promise((n,t)=>{const e=document.createElement("script");if(e.src="https://js.evervault.com/v2",e.onload=()=>n(),e.onerror=()=>{ke=null,t()},!document.head)throw new Error("Expected document.head not to be null. Evervault.js requires a <head> element.");document.head.appendChild(e)}),ke)})}function gt(){return Y(this,null,function*(){if(window.Evervault)return window.Evervault;try{return yield Rt(),window.Evervault}catch(n){throw new Error("Failed to load Evervault.js")}})}function qe(n,t,e){return Y(this,null,function*(){const r=yield gt();return new r(n,t,e)})}Promise.resolve().then(()=>{gt()});let Te=class{constructor(t){w(this,"apple",null);w(this,"isAvailable",!1);w(this,"onReady");this.ev=t}init(l,d){return Y(this,arguments,function*({transaction:t,locale:e,supportedCardTypes:r,onReady:a,onError:i,onSuccess:s,onCancel:o},c){const u=this.ev.transactions.create(t);this.apple=this.ev.ui.applePay(u,ee(K({locale:e,borderRadius:12,size:{width:"100%",height:"40px"}},c==null?void 0:c.styles),{allowedCardNetworks:r,requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(m,v)=>Y(this,[m,v],function*(p,{fail:f}){try{s==null||s(p)}catch(y){console.error(y),f({message:"Cannot pay with payment credentials"})}})}));const h=yield this.apple.availability();this.isAvailable=!0,console.log("Apple Pay availability",h),this.isAvailable||console.error("Apple Pay is not available",h),i&&this.apple.on("error",i),o&&this.apple.on("cancel",o),this.onReady=a})}render(t){return Y(this,null,function*(){var e;!this.apple||!this.isAvailable||(t.innerHTML="",yield this.apple.mount(t),(e=this.onReady)==null||e.call(this))})}},Qe=class{constructor(t){w(this,"google",null);this.ev=t}init(c,l){return Y(this,arguments,function*({transaction:t,locale:e,onReady:r,onError:a,onSuccess:i,onCancel:s},o){const d=this.ev.transactions.create(t);this.google=this.ev.ui.googlePay(d,ee(K({locale:e,size:{width:"100%",height:"42px"},borderRadius:12,billingAddress:{phoneNumber:!0}},o==null?void 0:o.styles),{process:(p,f)=>Y(this,[p,f],function*(u,{fail:h}){try{i==null||i(u)}catch(m){console.error(m),h({message:"Cannot pay with payment credentials"})}})})),s&&this.google.on("cancel",s),r&&this.google.on("ready",r),a&&this.google.on("error",a)})}render(t){return Y(this,null,function*(){this.google&&(t.innerHTML="",this.google.mount(t))})}};class ce{constructor(){w(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 Gi{constructor(t){w(this,"threeDs",null);this.ev=t}init(i){return Y(this,arguments,function*({threeDsId:t,onReady:e,onSuccess:r,onError:a}){this.threeDs=this.ev.ui.threeDSecure(t),this.threeDs.on("ready",()=>e==null?void 0:e()),this.threeDs.on("success",()=>r==null?void 0:r()),this.threeDs.on("failure",()=>a==null?void 0:a()),this.threeDs.on("error",()=>a==null?void 0:a())})}render(t){return Y(this,null,function*(){this.threeDs&&this.threeDs.mount(t)})}}class $i{constructor(){w(this,"isReady",!1);w(this,"ev",null);w(this,"apple",null);w(this,"google",null);w(this,"threeDs",null);w(this,"events",{ready:new ce})}isShouldLoad({teamId:t,appId:e}){var r,a;return((r=this.ev)==null?void 0:r.config.appId)!==e||((a=this.ev)==null?void 0:a.config.teamId)!==t}initEv(t){return Y(this,null,function*(){this.isShouldLoad(t)&&(this.isReady=!1,this.ev=yield qe(t.teamId,t.appId),this.apple=new Te(this.ev),this.google=new Qe(this.ev),this.events.ready.emit(),this.isReady=!0)})}initThreeDs(t){return Y(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new Gi(this.ev),yield this.threeDs.init(t),yield this.threeDs.render()})}initApple(t,e){return Y(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 Y(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 Y(this,null,function*(){var e;return yield(e=this.apple)==null?void 0:e.render(t)})}renderGoogle(t){return Y(this,null,function*(){var e;return yield(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 St(n){return typeof n=="object"&&!Array.isArray(n)}function qi(n,t,e){var r;if(n instanceof EventTarget)return[n];if(typeof n=="string"){let a=document;const i=(r=e==null?void 0:e[n])!=null?r:a.querySelectorAll(n);return i?Array.from(i):[]}return Array.from(n)}function Rr(n,t,e,r){return typeof n=="string"&&St(t)?qi(n,e,r):n instanceof NodeList?Array.from(n):Array.isArray(n)?n:[n]}function Qi(n,t,e){return n*(t+1)}function Sr(n,t,e,r){var a;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,n+parseFloat(t)):t==="<"?e:(a=r.get(t))!=null?a:n}const Xe=(n,t,e)=>n+(t-n)*e,Xi=(n,t,e)=>{const r=t-n;return((e-n)%r+r)%r+n},Mr=n=>Array.isArray(n)&&typeof n[0]!="number";function Dr(n,t){return Mr(n)?n[Xi(0,n.length,t)]:n}function Zi(n,t){n.indexOf(t)===-1&&n.push(t)}function Vr(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function Ji(n,t,e){for(let r=0;r<n.length;r++){const a=n[r];a.at>t&&a.at<e&&(Vr(n,a),r--)}}function ea(n,t,e,r,a,i){Ji(n,a,i);for(let s=0;s<t.length;s++)n.push({value:t[s],at:Xe(a,i,r[s]),easing:Dr(e,s)})}function ta(n,t){for(let e=0;e<n.length;e++)n[e]=n[e]/(t+1)}function ra(n,t){return n.at===t.at?n.value===null?1:t.value===null?-1:0:n.at-t.at}const ve=n=>!!(n&&n.getVelocity),Mt=(n,t,e)=>{const r=t-n;return r===0?1:(e-n)/r};function Ur(n,t){const e=n[n.length-1];for(let r=1;r<=t;r++){const a=Mt(0,t,r);n.push(Xe(e,1,a))}}function Fr(n){const t=[0];return Ur(t,n.length-1),t}function Dt(n){return typeof n=="function"&&"applyToOptions"in n}const yt=2e4;function Vt(n){let t=0;const e=50;let r=n.next(t);for(;!r.done&&t<yt;)t+=e,r=n.next(t);return t>=yt?1/0:t}const we=n=>n*1e3,Ie=n=>n/1e3;function Br(n,t=100,e){const r=e(ee(K({},n),{keyframes:[0,t]})),a=Math.min(Vt(r),yt);return{type:"keyframes",ease:i=>r.next(a*i).value/t,duration:Ie(a)}}let Ze=()=>{},xe=()=>{};process.env.NODE_ENV!=="production"&&(Ze=(n,t)=>{!n&&typeof console!="undefined"&&console.warn(t)},xe=(n,t)=>{if(!n)throw new Error(t)});const na="easeInOut",ia=20;function aa(n,i={},r,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<n.length;m++){const v=n[m];if(typeof v=="string"){u.set(v,p);continue}else if(!Array.isArray(v)){u.set(v.name,Sr(p,v.at,h,u));continue}let[y,A,x={}]=v;x.at!==void 0&&(p=Sr(p,x.at,h,u));let N=0;const I=(P,O,S,F=0,W=0)=>{const G=sa(P),D=O,{delay:U=0,times:j=Fr(G),type:z="keyframes",repeat:J,repeatType:M,repeatDelay:$=0}=D,H=Ae(D,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:E=t.ease||"easeOut",duration:g}=O;const k=typeof U=="function"?U(F,W):U,V=G.length,b=Dt(z)?z:a==null?void 0:a[z];if(V<=2&&b){let C=100;if(V===2&&la(G)){const ae=G[1]-G[0];C=Math.abs(ae)}const B=K({},H);g!==void 0&&(B.duration=we(g));const X=Br(B,C,b);E=X.ease,g=X.duration}g!=null||(g=o);const T=p+k;j.length===1&&j[0]===0&&(j[1]=1);const _=j.length-G.length;if(_>0&&Ur(j,_),G.length===1&&G.unshift(null),J){xe(J<ia,"Repeat count too high, must be less than 20"),g=Qi(g,J);const C=[...G],B=[...j];E=Array.isArray(E)?[...E]:[E];const X=[...E];for(let ae=0;ae<J;ae++){G.push(...C);for(let R=0;R<C.length;R++)j.push(B[R]+(ae+1)),E.push(R===0?"linear":Dr(X,R-1))}ta(j,J)}const L=T+g;ea(S,G,E,j,T,L),N=Math.max(k+g,N),f=Math.max(L,f)};if(ve(y)){const P=jr(y,l);I(A,x,zr("default",P))}else{const P=Rr(y,A,r,d),O=P.length;for(let S=0;S<O;S++){A=A,x=x;const F=P[S],W=jr(F,l);for(const G in A)I(A[G],oa(x,G),zr(G,W),S,O)}}h=p,p+=N}return l.forEach((m,v)=>{for(const y in m){const A=m[y];A.sort(ra);const x=[],N=[],I=[];for(let O=0;O<A.length;O++){const{at:S,value:F,easing:W}=A[O];x.push(F),N.push(Mt(0,f,S)),I.push(W||"easeOut")}N[0]!==0&&(N.unshift(0),x.unshift(x[0]),I.unshift(na)),N[N.length-1]!==1&&(N.push(1),x.push(null)),c.has(v)||c.set(v,{keyframes:{},transition:{}});const P=c.get(v);P.keyframes[y]=x,P.transition[y]=K(ee(K({},t),{duration:f,ease:I,times:N}),e)}}),c}function jr(n,t){return!t.has(n)&&t.set(n,{}),t.get(n)}function zr(n,t){return t[n]||(t[n]=[]),t[n]}function sa(n){return Array.isArray(n)?n:[n]}function oa(n,t){return n&&n[t]?K(K({},n),n[t]):K({},n)}const ca=n=>typeof n=="number",la=n=>n.every(ca),Je=new WeakMap,da=n=>Array.isArray(n);function Kr(n){const t=[{},{}];return n==null||n.values.forEach((e,r)=>{t[0][r]=e.get(),t[1][r]=e.getVelocity()}),t}function Hr(n,t,e,r){if(typeof t=="function"){const[a,i]=Kr(r);t=t(e!==void 0?e:n.custom,a,i)}if(typeof t=="string"&&(t=n.variants&&n.variants[t]),typeof t=="function"){const[a,i]=Kr(r);t=t(e!==void 0?e:n.custom,a,i)}return t}function ua(n,t,e){const r=n.getProps();return Hr(r,t,r.custom,n)}const bt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function pa(n,t){let e=new Set,r=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),n()),d(o)}const l={schedule:(d,u=!1,h=!1)=>{const f=h&&a?e:r;return u&&s.add(d),f.has(d)||f.add(d),d},cancel:d=>{r.delete(d),s.delete(d)},process:d=>{if(o=d,a){i=!0;return}a=!0,[e,r]=[r,e],e.forEach(c),e.clear(),a=!1,i&&(i=!1,l.process(d))}};return l}const Oe={},ha=40;function fa(n,t){let e=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>e=!0,s=bt.reduce((x,N)=>(x[N]=pa(i),x),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:d,update:u,preRender:h,render:p,postRender:f}=s,m=()=>{const x=Oe.useManualTiming?a.timestamp:performance.now();e=!1,Oe.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(x-a.timestamp,ha),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&&(r=!1,n(m))},v=()=>{e=!0,r=!0,a.isProcessing||n(m)};return{schedule:bt.reduce((x,N)=>{const I=s[N];return x[N]=(P,O=!1,S=!1)=>(e||v(),I.schedule(P,O,S)),x},{}),cancel:x=>{for(let N=0;N<bt.length;N++)s[bt[N]].cancel(x)},state:a,steps:s}}const Fe=n=>n,{schedule:Ne,cancel:Ut,state:_t}=fa(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:Fe,!0);let Et;function ma(){Et=void 0}const _e={now:()=>(Et===void 0&&_e.set(_t.isProcessing||Oe.useManualTiming?_t.timestamp:performance.now()),Et),set:n=>{Et=n,queueMicrotask(ma)}},Wr=new Set;function Yr(n,t,e){n||Wr.has(t)||(console.warn(t),Wr.add(t))}class Gr{constructor(){this.subscriptions=[]}add(t){return Zi(this.subscriptions,t),()=>Vr(this.subscriptions,t)}notify(t,e,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,e,r);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,e,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function $r(n,t){return t?n*(1e3/t):0}const qr=30,va=n=>!isNaN(parseFloat(n));class ga{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,a=!0)=>{var s,o;const i=_e.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),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=_e.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=va(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Yr(!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 Gr);const r=this.events[t].add(e);return t==="change"?()=>{r(),Ne.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}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=_e.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>qr)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,qr);return $r(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 et(n,t){return new ga(n,t)}function ya(n,t,e){n.hasValue(t)?n.getValue(t).set(e):n.addValue(t,et(e))}function ba(n){return da(n)?n[n.length-1]||0:n}function _a(n,t){let s=ua(n,t)||{},{transitionEnd:r={},transition:a={}}=s,i=Ae(s,["transitionEnd","transition"]);i=K(K({},i),r);for(const o in i){const c=ba(i[o]);ya(n,o,c)}}function Ea(n){return!!(ve(n)&&n.add)}function Ca(n,t){const e=n.getValue("willChange");if(Ea(e))return e.add(t);if(!e&&Oe.WillChange){const r=new Oe.WillChange("auto");n.addValue("willChange",r),r.add(t)}}const Ft=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),wa="data-"+Ft("framerAppearId");function Aa(n){return n.props[wa]}const Ta=n=>n!==null;function Ia(n,{repeat:t,repeatType:e="loop"},r){const a=n.filter(Ta),i=t&&e!=="loop"&&t%2===1?0:a.length-1;return a[i]}const Be=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],je=new Set(Be),xa={type:"spring",stiffness:500,damping:25,restSpeed:10},Oa=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Na={type:"keyframes",duration:.8},La={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Pa=(n,{keyframes:t})=>t.length>2?Na:je.has(n)?n.startsWith("scale")?Oa(t[1]):xa:La;function ka(u){var h=u,{when:n,delay:t,delayChildren:e,staggerChildren:r,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 Qr(n,t){var e,r;return(r=(e=n==null?void 0:n[t])!=null?e:n==null?void 0:n.default)!=null?r:n}const Xr=n=>t=>typeof t=="string"&&t.startsWith(n),Zr=Xr("--"),Ra=Xr("var(--"),Bt=n=>Ra(n)?Sa.test(n.split("/*")[0].trim()):!1,Sa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Re=(n,t,e)=>e>t?t:e<n?n:e,ze={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},tt=ee(K({},ze),{transform:n=>Re(0,1,n)}),Ct=ee(K({},ze),{default:1}),rt=n=>Math.round(n*1e5)/1e5,jt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ma(n){return n==null}const Da=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zt=(n,t)=>e=>!!(typeof e=="string"&&Da.test(e)&&e.startsWith(n)||t&&!Ma(e)&&Object.prototype.hasOwnProperty.call(e,t)),Jr=(n,t,e)=>r=>{if(typeof r!="string")return r;const[a,i,s,o]=r.match(jt);return{[n]:parseFloat(a),[t]:parseFloat(i),[e]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},Va=n=>Re(0,255,n),Kt=ee(K({},ze),{transform:n=>Math.round(Va(n))}),Se={test:zt("rgb","red"),parse:Jr("red","green","blue"),transform:({red:n,green:t,blue:e,alpha:r=1})=>"rgba("+Kt.transform(n)+", "+Kt.transform(t)+", "+Kt.transform(e)+", "+rt(tt.transform(r))+")"};function Ua(n){let t="",e="",r="",a="";return n.length>5?(t=n.substring(1,3),e=n.substring(3,5),r=n.substring(5,7),a=n.substring(7,9)):(t=n.substring(1,2),e=n.substring(2,3),r=n.substring(3,4),a=n.substring(4,5),t+=t,e+=e,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const Ht={test:zt("#"),parse:Ua,transform:Se.transform},nt=n=>({test:t=>typeof t=="string"&&t.endsWith(n)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${n}`}),Le=nt("deg"),Ke=nt("%"),Z=nt("px"),Fa=nt("vh"),Ba=nt("vw"),en=ee(K({},Ke),{parse:n=>Ke.parse(n)/100,transform:n=>Ke.transform(n*100)}),He={test:zt("hsl","hue"),parse:Jr("hue","saturation","lightness"),transform:({hue:n,saturation:t,lightness:e,alpha:r=1})=>"hsla("+Math.round(n)+", "+Ke.transform(rt(t))+", "+Ke.transform(rt(e))+", "+rt(tt.transform(r))+")"},fe={test:n=>Se.test(n)||Ht.test(n)||He.test(n),parse:n=>Se.test(n)?Se.parse(n):He.test(n)?He.parse(n):Ht.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Se.transform(n):He.transform(n)},ja=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function za(n){var t,e;return isNaN(n)&&typeof n=="string"&&(((t=n.match(jt))==null?void 0:t.length)||0)+(((e=n.match(ja))==null?void 0:e.length)||0)>0}const tn="number",rn="color",Ka="var",Ha="var(",nn="${}",Wa=/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 it(n){const t=n.toString(),e=[],r={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(Wa,c=>(fe.test(c)?(r.color.push(i),a.push(rn),e.push(fe.parse(c))):c.startsWith(Ha)?(r.var.push(i),a.push(Ka),e.push(c)):(r.number.push(i),a.push(tn),e.push(parseFloat(c))),++i,nn)).split(nn);return{values:e,split:o,indexes:r,types:a}}function an(n){return it(n).values}function sn(n){const{split:t,types:e}=it(n),r=t.length;return a=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],a[s]!==void 0){const o=e[s];o===tn?i+=rt(a[s]):o===rn?i+=fe.transform(a[s]):i+=a[s]}return i}}const Ya=n=>typeof n=="number"?0:n;function Ga(n){const t=an(n);return sn(n)(t.map(Ya))}const We={test:za,parse:an,createTransformer:sn,getAnimatableNone:Ga};function Wt(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*(2/3-e)*6:n}function $a({hue:n,saturation:t,lightness:e,alpha:r}){n/=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=Wt(c,o,n+1/3),i=Wt(c,o,n),s=Wt(c,o,n-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function wt(n,t){return e=>e>0?t:n}const Yt=(n,t,e)=>{const r=n*n,a=e*(t*t-r)+r;return a<0?0:Math.sqrt(a)},qa=[Ht,Se,He],Qa=n=>qa.find(t=>t.test(n));function on(n){const t=Qa(n);if(Ze(!!t,`'${n}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let e=t.parse(n);return t===He&&(e=$a(e)),e}const cn=(n,t)=>{const e=on(n),r=on(t);if(!e||!r)return wt(n,t);const a=K({},e);return i=>(a.red=Yt(e.red,r.red,i),a.green=Yt(e.green,r.green,i),a.blue=Yt(e.blue,r.blue,i),a.alpha=Xe(e.alpha,r.alpha,i),Se.transform(a))},Gt=new Set(["none","hidden"]);function Xa(n,t){return Gt.has(n)?e=>e<=0?n:t:e=>e>=1?t:n}const Za=(n,t)=>e=>t(n(e)),$t=(...n)=>n.reduce(Za);function Ja(n,t){return e=>Xe(n,t,e)}function qt(n){return typeof n=="number"?Ja:typeof n=="string"?Bt(n)?wt:fe.test(n)?cn:rs:Array.isArray(n)?ln:typeof n=="object"?fe.test(n)?cn:es:wt}function ln(n,t){const e=[...n],r=e.length,a=n.map((i,s)=>qt(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)e[s]=a[s](i);return e}}function es(n,t){const e=K(K({},n),t),r={};for(const a in e)n[a]!==void 0&&t[a]!==void 0&&(r[a]=qt(n[a])(n[a],t[a]));return a=>{for(const i in r)e[i]=r[i](a);return e}}function ts(n,t){var a;const e=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=n.indexes[s][r[s]],c=(a=n.values[o])!=null?a:0;e[i]=c,r[s]++}return e}const rs=(n,t)=>{const e=We.createTransformer(t),r=it(n),a=it(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?Gt.has(n)&&!a.values.length||Gt.has(t)&&!r.values.length?Xa(n,t):$t(ln(ts(r,a),a.values),e):(Ze(!0,`Complex values '${n}' 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.`),wt(n,t))};function dn(n,t,e){return typeof n=="number"&&typeof t=="number"&&typeof e=="number"?Xe(n,t,e):qt(n)(n,t)}const ns=n=>{const t=({timestamp:e})=>n(e);return{start:(e=!0)=>Ne.update(t,e),stop:()=>Ut(t),now:()=>_t.isProcessing?_t.timestamp:_e.now()}},un=(n,t,e=10)=>{let r="";const a=Math.max(Math.round(t/e),2);for(let i=0;i<a;i++)r+=n(i/(a-1))+", ";return`linear(${r.substring(0,r.length-2)})`},is=5;function pn(n,t,e){const r=Math.max(t-is,0);return $r(e-n(r),t-r)}const le={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},Qt=.001;function as({duration:n=le.duration,bounce:t=le.bounce,velocity:e=le.velocity,mass:r=le.mass}){let a,i;Ze(n<=we(le.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=Re(le.minDamping,le.maxDamping,s),n=Re(le.minDuration,le.maxDuration,Ie(n)),s<1?(a=l=>{const d=l*s,u=d*n,h=d-e,p=Xt(l,s),f=Math.exp(-u);return Qt-h/p*f},i=l=>{const u=l*s*n,h=u*e+e,p=Math.pow(s,2)*Math.pow(l,2)*n,f=Math.exp(-u),m=Xt(Math.pow(l,2),s);return(-a(l)+Qt>0?-1:1)*((h-p)*f)/m}):(a=l=>{const d=Math.exp(-l*n),u=(l-e)*n+1;return-Qt+d*u},i=l=>{const d=Math.exp(-l*n),u=(e-l)*(n*n);return d*u});const o=5/n,c=os(a,i,o);if(n=we(n),isNaN(c))return{stiffness:le.stiffness,damping:le.damping,duration:n};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:s*2*Math.sqrt(r*l),duration:n}}}const ss=12;function os(n,t,e){let r=e;for(let a=1;a<ss;a++)r=r-n(r)/t(r);return r}function Xt(n,t){return n*Math.sqrt(1-t*t)}const cs=["duration","bounce"],ls=["stiffness","damping","mass"];function hn(n,t){return t.some(e=>n[e]!==void 0)}function ds(n){let t=K({velocity:le.velocity,stiffness:le.stiffness,damping:le.damping,mass:le.mass,isResolvedFromDuration:!1},n);if(!hn(n,ls)&&hn(n,cs))if(n.visualDuration){const e=n.visualDuration,r=2*Math.PI/(e*1.2),a=r*r,i=2*Re(.05,1,1-(n.bounce||0))*Math.sqrt(a);t=ee(K({},t),{mass:le.mass,stiffness:a,damping:i})}else{const e=as(n);t=ee(K(K({},t),e),{mass:le.mass}),t.isResolvedFromDuration=!0}return t}function at(n=le.visualDuration,t=le.bounce){const e=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:t}:n;let{restSpeed:r,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}=ds(ee(K({},e),{velocity:-Ie(e.velocity||0)})),f=h||0,m=l/(2*Math.sqrt(c*d)),v=s-i,y=Ie(Math.sqrt(c/d)),A=Math.abs(v)<5;r||(r=A?le.restSpeed.granular:le.restSpeed.default),a||(a=A?le.restDelta.granular:le.restDelta.default);let x;if(m<1){const I=Xt(y,m);x=P=>{const O=Math.exp(-m*y*P);return s-O*((f+m*y*v)/I*Math.sin(I*P)+v*Math.cos(I*P))}}else if(m===1)x=I=>s-Math.exp(-y*I)*(v+(f+y*v)*I);else{const I=y*Math.sqrt(m*m-1);x=P=>{const O=Math.exp(-m*y*P),S=Math.min(I*P,300);return s-O*((f+m*y*v)*Math.sinh(S)+I*v*Math.cosh(S))/I}}const N={calculatedDuration:p&&u||null,next:I=>{const P=x(I);if(p)o.done=I>=u;else{let O=I===0?f:0;m<1&&(O=I===0?we(f):pn(x,I,P));const S=Math.abs(O)<=r,F=Math.abs(s-P)<=a;o.done=S&&F}return o.value=o.done?s:P,o},toString:()=>{const I=Math.min(Vt(N),yt),P=un(O=>N.next(I*O).value,I,30);return I+"ms "+P},toTransition:()=>{}};return N}at.applyToOptions=n=>{const t=Br(n,100,at);return n.ease=t.ease,n.duration=we(t.duration),n.type="keyframes",n};function Zt({keyframes:n,velocity:t=0,power:e=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:c,restDelta:l=.5,restSpeed:d}){const u=n[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,y=s===void 0?v:s(v);y!==v&&(m=y-u);const A=S=>-m*Math.exp(-S/r),x=S=>y+A(S),N=S=>{const F=A(S),W=x(S);h.done=Math.abs(F)<=l,h.value=h.done?y:W};let I,P;const O=S=>{p(h.value)&&(I=S,P=at({keyframes:[h.value,f(h.value)],velocity:pn(x,S,h.value),damping:a,stiffness:i,restDelta:l,restSpeed:d}))};return O(0),{calculatedDuration:null,next:S=>{let F=!1;return!P&&I===void 0&&(F=!0,N(S),O(S)),I!==void 0&&S>=I?P.next(S-I):(!F&&N(S),h)}}}function us(n,t,e){const r=[],a=e||Oe.mix||dn,i=n.length-1;for(let s=0;s<i;s++){let o=a(n[s],n[s+1]);if(t){const c=Array.isArray(t)?t[s]||Fe:t;o=$t(c,o)}r.push(o)}return r}function ps(n,t,{clamp:e=!0,ease:r,mixer:a}={}){const i=n.length;if(xe(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=n[0]===n[1];n[0]>n[i-1]&&(n=[...n].reverse(),t=[...t].reverse());const o=us(t,r,a),c=o.length,l=d=>{if(s&&d<n[0])return t[0];let u=0;if(c>1)for(;u<n.length-2&&!(d<n[u+1]);u++);const h=Mt(n[u],n[u+1],d);return o[u](h)};return e?d=>l(Re(n[0],n[i-1],d)):l}function hs(n,t){return n.map(e=>e*t)}const fn=(n,t,e)=>(((1-3*e+3*t)*n+(3*e-6*t))*n+3*t)*n,fs=1e-7,ms=12;function vs(n,t,e,r,a){let i,s,o=0;do s=t+(e-t)/2,i=fn(s,r,a)-n,i>0?e=s:t=s;while(Math.abs(i)>fs&&++o<ms);return s}function st(n,t,e,r){if(n===t&&e===r)return Fe;const a=i=>vs(i,0,1,n,e);return i=>i===0||i===1?i:fn(a(i),t,r)}const gs=st(.42,0,1,1),ys=st(0,0,.58,1),mn=st(.42,0,.58,1),vn=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,gn=n=>t=>1-n(1-t),yn=st(.33,1.53,.69,.99),Jt=gn(yn),bn=vn(Jt),_n=n=>(n*=2)<1?.5*Jt(n):.5*(2-Math.pow(2,-10*(n-1))),er=n=>1-Math.sin(Math.acos(n)),bs=gn(er),En=vn(er),Cn=n=>Array.isArray(n)&&typeof n[0]=="number",wn={linear:Fe,easeIn:gs,easeInOut:mn,easeOut:ys,circIn:er,circInOut:En,circOut:bs,backIn:Jt,backInOut:bn,backOut:yn,anticipate:_n},_s=n=>typeof n=="string",An=n=>{if(Cn(n)){xe(n.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,e,r,a]=n;return st(t,e,r,a)}else if(_s(n))return xe(wn[n]!==void 0,`Invalid easing type '${n}'`),wn[n];return n};function Es(n,t){return n.map(()=>t||mn).splice(0,n.length-1)}function Ye({duration:n=300,keyframes:t,times:e,ease:r="easeInOut"}){const a=Mr(r)?r.map(An):An(r),i={done:!1,value:t[0]},s=hs(e&&e.length===t.length?e:Fr(t),n),o=ps(s,t,{ease:Array.isArray(a)?a:Es(t,a)});return{calculatedDuration:n,next:c=>(i.value=o(c),i.done=c>=n,i)}}const Cs=n=>n!==null;function tr(n,{repeat:t,repeatType:e="loop"},r,a=1){const i=n.filter(Cs),o=a<0||t&&e!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const ws={decay:Zt,inertia:Zt,tween:Ye,keyframes:Ye,spring:at};function Tn(n){typeof n.type=="string"&&(n.type=ws[n.type])}class rr{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 As=n=>n/100;class nr extends rr{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,a;const{motionValue:e}=this.options;e&&e.updatedAt!==_e.now()&&this.tick(_e.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(r=this.options).onStop)==null||a.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Tn(t);const{type:e=Ye,repeat:r=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=t;let{keyframes:o}=t;const c=e||Ye;process.env.NODE_ENV!=="production"&&c!==Ye&&xe(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),c!==Ye&&typeof o[0]!="number"&&(this.mixKeyframes=$t(As,dn(o[0],o[1])),o=[0,100]);const l=c(ee(K({},t),{keyframes:o}));i==="mirror"&&(this.mirroredGenerator=c(ee(K({},t),{keyframes:[...o].reverse(),velocity:-s}))),l.calculatedDuration===null&&(l.calculatedDuration=Vt(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(r+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:r,totalDuration:a,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return r.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 y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?y<0:y>a;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let x=this.currentTime,N=r;if(u){const S=Math.min(this.currentTime,a)/o;let F=Math.floor(S),W=S%1;!W&&S>=1&&(W=1),W===1&&F--,F=Math.min(F,u+1),!!(F%2)&&(h==="reverse"?(W=1-W,p&&(W-=p/o)):h==="mirror"&&(N=s)),x=Re(0,1,W)*o}const I=A?{done:!1,value:d[0]}:N.next(x);i&&(I.value=i(I.value));let{done:P}=I;!A&&c!==null&&(P=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return O&&f!==Zt&&(I.value=tr(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 Ie(this.calculatedDuration)}get time(){return Ie(this.currentTime)}set time(t){var e;t=we(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(_e.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Ie(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=ns,startTime:e}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(i=(a=this.options).onPlay)==null||i.call(a);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=e!=null?e:r),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(_e.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 Ts(n){var t;for(let e=1;e<n.length;e++)(t=n[e])!=null||(n[e]=n[e-1])}const Me=n=>n*180/Math.PI,ir=n=>{const t=Me(Math.atan2(n[1],n[0]));return ar(t)},Is={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:ir,rotateZ:ir,skewX:n=>Me(Math.atan(n[1])),skewY:n=>Me(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},ar=n=>(n=n%360,n<0&&(n+=360),n),In=ir,xn=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),On=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),xs={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:xn,scaleY:On,scale:n=>(xn(n)+On(n))/2,rotateX:n=>ar(Me(Math.atan2(n[6],n[5]))),rotateY:n=>ar(Me(Math.atan2(-n[2],n[0]))),rotateZ:In,rotate:In,skewX:n=>Me(Math.atan(n[4])),skewY:n=>Me(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function sr(n){return n.includes("scale")?1:0}function or(n,t){if(!n||n==="none")return sr(t);const e=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(e)r=xs,a=e;else{const o=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Is,a=o}if(!a)return sr(t);const i=r[t],s=a[1].split(",").map(Ns);return typeof i=="function"?i(s):s[i]}const Os=(n,t)=>{const{transform:e="none"}=getComputedStyle(n);return or(e,t)};function Ns(n){return parseFloat(n.trim())}const Nn=n=>n===ze||n===Z,Ls=new Set(["x","y","z"]),Ps=Be.filter(n=>!Ls.has(n));function ks(n){const t=[];return Ps.forEach(e=>{const r=n.getValue(e);r!==void 0&&(t.push([e,r.get()]),r.set(e.startsWith("scale")?1:0))}),t}const De={width:({x:n},{paddingLeft:t="0",paddingRight:e="0"})=>n.max-n.min-parseFloat(t)-parseFloat(e),height:({y:n},{paddingTop:t="0",paddingBottom:e="0"})=>n.max-n.min-parseFloat(t)-parseFloat(e),top:(n,{top:t})=>parseFloat(t),left:(n,{left:t})=>parseFloat(t),bottom:({y:n},{top:t})=>parseFloat(t)+(n.max-n.min),right:({x:n},{left:t})=>parseFloat(t)+(n.max-n.min),x:(n,{transform:t})=>or(t,"x"),y:(n,{transform:t})=>or(t,"y")};De.translateX=De.x,De.translateY=De.y;const Ve=new Set;let cr=!1,lr=!1,dr=!1;function Ln(){if(lr){const n=Array.from(Ve).filter(r=>r.needsMeasurement),t=new Set(n.map(r=>r.element)),e=new Map;t.forEach(r=>{const a=ks(r);a.length&&(e.set(r,a),r.render())}),n.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=e.get(r);a&&a.forEach(([i,s])=>{var o;(o=r.getValue(i))==null||o.set(s)})}),n.forEach(r=>r.measureEndState()),n.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}lr=!1,cr=!1,Ve.forEach(n=>n.complete(dr)),Ve.clear()}function Pn(){Ve.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(lr=!0)})}function Rs(){dr=!0,Pn(),Ln(),dr=!1}class ur{constructor(t,e,r,a,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=r,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Ve.add(this),cr||(cr=!0,Ne.read(Pn),Ne.resolveKeyframes(Ln))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:r,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(r&&e){const o=r.readValue(e,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),a&&i===void 0&&a.set(t[0])}Ts(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ve.delete(this)}cancel(){this.state==="scheduled"&&(Ve.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ss=n=>n.startsWith("--");function Ms(n,t,e){Ss(t)?n.style.setProperty(t,e):n.style[t]=e}function pr(n){let t;return()=>(t===void 0&&(t=n()),t)}const Ds=pr(()=>window.ScrollTimeline!==void 0),Vs={};function Us(n,t){const e=pr(n);return()=>{var r;return(r=Vs[t])!=null?r:e()}}const kn=Us(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(n){return!1}return!0},"linearEasing"),ot=([n,t,e,r])=>`cubic-bezier(${n}, ${t}, ${e}, ${r})`,Rn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ot([0,.65,.55,1]),circOut:ot([.55,0,1,.45]),backIn:ot([.31,.01,.66,-.59]),backOut:ot([.33,1.53,.69,.99])};function Sn(n,t){if(n)return typeof n=="function"?kn()?un(n,t):"ease-out":Cn(n)?ot(n):Array.isArray(n)?n.map(e=>Sn(e,t)||Rn.easeOut):Rn[n]}function Fs(n,t,e,{delay:r=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=Sn(o,a);Array.isArray(u)&&(d.easing=u);const h={delay:r,duration:a,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),n.animate(d,h)}function Bs(e){var r=e,{type:n}=r,t=Ae(r,["type"]);var a,i;return Dt(n)&&kn()?n.applyToOptions(t):((a=t.duration)!=null||(t.duration=300),(i=t.ease)!=null||(t.ease="easeOut"),t)}class js extends rr{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:r,keyframes:a,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:o,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,xe(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const l=Bs(t);this.animation=Fs(e,r,a,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=tr(a,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):Ms(e,r,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,r;const t=((r=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:r.call(e).duration)||0;return Ie(Number(t))}get time(){return Ie(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=we(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 r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ds()?(this.animation.timeline=t,Fe):e(this)}}const Mn={anticipate:_n,backInOut:bn,circInOut:En};function zs(n){return n in Mn}function Ks(n){typeof n.ease=="string"&&zs(n.ease)&&(n.ease=Mn[n.ease])}const Dn=10;class Hs extends js{constructor(t){Ks(t),Tn(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){var d;const l=this.options,{motionValue:e,onUpdate:r,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 nr(ee(K({},s),{autoplay:!1})),c=we((d=this.finishedTime)!=null?d:this.time);e.setWithVelocity(o.sample(c-Dn).value,o.sample(c).value,Dn),o.stop()}}const Vn=(n,t)=>t==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(We.test(n)||n==="0")&&!n.startsWith("url("));function Ws(n){const t=n[0];if(n.length===1)return!0;for(let e=0;e<n.length;e++)if(n[e]!==t)return!0}function Ys(n,t,e,r){const a=n[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=n[n.length-1],s=Vn(a,t),o=Vn(i,t);return Ze(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:Ws(n)||(e==="spring"||Dt(e))&&r}function Un(n){return typeof n=="object"&&n!==null}function Gs(n){return Un(n)&&"offsetHeight"in n}const $s=new Set(["opacity","clipPath","filter","transform"]),qs=pr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Qs(n){var l;const{motionValue:t,name:e,repeatDelay:r,repeatType:a,damping:i,type:s}=n;if(!Gs((l=t==null?void 0:t.owner)==null?void 0:l.current))return!1;const{onUpdate:o,transformTemplate:c}=t.owner.getProps();return qs()&&e&&$s.has(e)&&(e!=="transform"||!c)&&!o&&!r&&a!=="mirror"&&i!==0&&s!=="inertia"}const Xs=40;class Zs extends rr{constructor(h){var p=h,{autoplay:t=!0,delay:e=0,type:r="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 y,A;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(A=this.keyframeResolver)==null||A.cancel()},this.createdAt=_e.now();const f=K({autoplay:t,delay:e,type:r,repeat:a,repeatDelay:i,repeatType:s,name:c,motionValue:l,element:d},u),m=(d==null?void 0:d.KeyframeResolver)||ur;this.keyframeResolver=new m(o,(y,A,x)=>this.onKeyframesResolved(y,A,f,!x),c,l,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,e,r,a){this.keyframeResolver=void 0;const{name:i,type:s,velocity:o,delay:c,isHandoff:l,onUpdate:d}=r;this.resolvedAt=_e.now(),Ys(t,i,s,o)||((Oe.instantAnimations||!c)&&(d==null||d(tr(t,r,e))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const u=a?this.resolvedAt?this.resolvedAt-this.createdAt>Xs?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=ee(K({startTime:u,finalKeyframe:e},r),{keyframes:t}),p=!l&&Qs(h)?new Hs(ee(K({},h),{element:h.motionValue.owner.current})):new nr(h);p.finished.then(()=>this.notifyFinished()).catch(Fe),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(),Rs()),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 Fn=(n,t,e,r={},a,i)=>s=>{const o=Qr(r,n)||{},c=o.delay||r.delay||0;let{elapsed:l=0}=r;l=l-we(c);const d=ee(K({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:n,motionValue:t,element:i?void 0:a});ka(o)||Object.assign(d,Pa(n,d)),d.duration&&(d.duration=we(d.duration)),d.repeatDelay&&(d.repeatDelay=we(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)),(Oe.instantAnimations||Oe.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!i&&t.get()!==void 0){const h=Ia(d.keyframes,o);if(h!==void 0){Ne.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new nr(d):new Zs(d)},Bn=new Set(["width","height","top","left","right","bottom",...Be]);function Js({protectedKeys:n,needsAnimating:t},e){const r=n.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,r}function eo(n,t,{delay:e=0,transitionOverride:r,type:a}={}){var u;let d=t,{transition:i=n.getDefaultTransition(),transitionEnd:s}=d,o=Ae(d,["transition","transitionEnd"]);r&&(i=r);const c=[],l=a&&n.animationState&&n.animationState.getState()[a];for(const h in o){const p=n.getValue(h,(u=n.latestValues[h])!=null?u:null),f=o[h];if(f===void 0||l&&Js(l,h))continue;const m=K({delay:e},Qr(i||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(f)&&f===v&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const x=Aa(n);if(x){const N=window.MotionHandoffAnimation(x,h,Ne);N!==null&&(m.startTime=N,y=!0)}}Ca(n,h),p.start(Fn(h,p,f,n.shouldReduceMotion&&Bn.has(h)?{type:!1}:m,n,y));const A=p.animation;A&&c.push(A)}return s&&Promise.all(c).then(()=>{Ne.update(()=>{s&&_a(n,s)})}),c}function to({top:n,left:t,right:e,bottom:r}){return{x:{min:t,max:e},y:{min:n,max:r}}}function ro(n,t){if(!t)return n;const e=t({x:n.left,y:n.top}),r=t({x:n.right,y:n.bottom});return{top:e.y,left:e.x,bottom:r.y,right:r.x}}function no(n,t){return to(ro(n.getBoundingClientRect(),t))}const jn={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"]},hr={};for(const n in jn)hr[n]={isEnabled:t=>jn[n].some(e=>!!t[e])};const zn=()=>({min:0,max:0}),fr=()=>({x:zn(),y:zn()}),io=typeof window!="undefined",mr={current:null},Kn={current:!1};function ao(){if(Kn.current=!0,!!io)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),t=()=>mr.current=n.matches;n.addListener(t),t()}else mr.current=!1}function so(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function oo(n){return typeof n=="string"||Array.isArray(n)}const co=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Hn(n){return so(n.animate)||co.some(t=>oo(n[t]))}function lo(n){return!!(Hn(n)||n.variants)}function uo(n,t,e){for(const r in t){const a=t[r],i=e[r];if(ve(a))n.addValue(r,a);else if(ve(i))n.addValue(r,et(a,{owner:n}));else if(i!==a)if(n.hasValue(r)){const s=n.getValue(r);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=n.getStaticValue(r);n.addValue(r,et(s!==void 0?s:a,{owner:n}))}}for(const r in e)t[r]===void 0&&n.removeValue(r);return t}const Wn=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),Yn=n=>/^0[^.\s]+$/u.test(n),po={test:n=>n==="auto",parse:n=>n},Gn=n=>t=>t.test(n),$n=[ze,Z,Ke,Le,Ba,Fa,po],qn=n=>$n.find(Gn(n)),ho=[...$n,fe,We],fo=n=>ho.find(Gn(n)),mo=new Set(["brightness","contrast","saturate","opacity"]);function vo(n){const[t,e]=n.slice(0,-1).split("(");if(t==="drop-shadow")return n;const[r]=e.match(jt)||[];if(!r)return n;const a=e.replace(r,"");let i=mo.has(t)?1:0;return r!==e&&(i*=100),t+"("+i+a+")"}const go=/\b([a-z-]*)\(.*?\)/gu,vr=ee(K({},We),{getAnimatableNone:n=>{const t=n.match(go);return t?t.map(vo).join(" "):n}}),Qn=ee(K({},ze),{transform:Math.round}),gr=ee(K({borderWidth:Z,borderTopWidth:Z,borderRightWidth:Z,borderBottomWidth:Z,borderLeftWidth:Z,borderRadius:Z,radius:Z,borderTopLeftRadius:Z,borderTopRightRadius:Z,borderBottomRightRadius:Z,borderBottomLeftRadius:Z,width:Z,maxWidth:Z,height:Z,maxHeight:Z,top:Z,right:Z,bottom:Z,left:Z,padding:Z,paddingTop:Z,paddingRight:Z,paddingBottom:Z,paddingLeft:Z,margin:Z,marginTop:Z,marginRight:Z,marginBottom:Z,marginLeft:Z,backgroundPositionX:Z,backgroundPositionY:Z},{rotate:Le,rotateX:Le,rotateY:Le,rotateZ:Le,scale:Ct,scaleX:Ct,scaleY:Ct,scaleZ:Ct,skew:Le,skewX:Le,skewY:Le,distance:Z,translateX:Z,translateY:Z,translateZ:Z,x:Z,y:Z,z:Z,perspective:Z,transformPerspective:Z,opacity:tt,originX:en,originY:en,originZ:Z}),{zIndex:Qn,fillOpacity:tt,strokeOpacity:tt,numOctaves:Qn}),yo=ee(K({},gr),{color:fe,backgroundColor:fe,outlineColor:fe,fill:fe,stroke:fe,borderColor:fe,borderTopColor:fe,borderRightColor:fe,borderBottomColor:fe,borderLeftColor:fe,filter:vr,WebkitFilter:vr}),Xn=n=>yo[n];function Zn(n,t){let e=Xn(n);return e!==vr&&(e=We),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const Jn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ei{scrapeMotionValuesFromProps(t,e,r){return{}}constructor({parent:t,props:e,presenceContext:r,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=ur,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=_e.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Ne.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=s;this.latestValues=c,this.baseTarget=K({},c),this.initialValues=e.initial?K({},c):{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Hn(e),this.isVariantNode=lo(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&&ve(f)&&f.set(c[p],!1)}}mount(t){this.current=t,Je.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,r)=>this.bindToMotionValue(r,e)),Kn.current||ao(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:mr.current,process.env.NODE_ENV!=="production"&&Yr(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(),Ut(this.notifyUpdate),Ut(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 r=je.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Ne.preRender(this.notifyUpdate),r&&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 hr){const e=hr[t];if(!e)continue;const{isEnabled:r,Feature:a}=e;if(!this.features[t]&&a&&r(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):fr()}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 r=0;r<Jn.length;r++){const a=Jn[r];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=uo(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 r=this.values.get(t);e!==r&&(r&&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 r=this.values.get(t);return r===void 0&&e!==void 0&&(r=et(e===null?void 0:e,{owner:this}),this.addValue(t,r)),r}readValue(t,e){var a;let r=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 r!=null&&(typeof r=="string"&&(Wn(r)||Yn(r))?r=parseFloat(r):!fo(r)&&We.test(e)&&(r=Zn(t,e)),this.setBaseTarget(t,ve(r)?r.get():r)),ve(r)?r.get():r}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var i;const{initial:e}=this.props;let r;if(typeof e=="string"||typeof e=="object"){const s=Hr(this.props,e,(i=this.presenceContext)==null?void 0:i.custom);s&&(r=s[t])}if(e&&r!==void 0)return r;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ve(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new Gr),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const bo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _o(n){const t=bo.exec(n);if(!t)return[,];const[,e,r,a]=t;return[`--${e!=null?e:r}`,a]}const Eo=4;function ti(n,t,e=1){xe(e<=Eo,`Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`);const[r,a]=_o(n);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Wn(s)?parseFloat(s):s}return Bt(a)?ti(a,t,e+1):a}function Co(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Yn(n):!0}const wo=new Set(["auto","none","0"]);function Ao(n,t,e){let r=0,a;for(;r<n.length&&!a;){const i=n[r];typeof i=="string"&&!wo.has(i)&&it(i).values.length&&(a=n[r]),r++}if(a&&e)for(const i of t)n[i]=Zn(e,a)}class To extends ur{constructor(t,e,r,a,i){super(t,e,r,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:r}=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(),Bt(l))){const d=ti(l,e.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Bn.has(r)||t.length!==2)return;const[a,i]=t,s=qn(a),o=qn(i);if(s!==o)if(Nn(s)&&Nn(o))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else De[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||Co(t[a]))&&r.push(a);r.length&&Ao(t,r,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=De[r](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const a=e[e.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var o;const{element:t,name:e,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const a=t.getValue(e);a&&a.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=De[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 ri extends ei{constructor(){super(...arguments),this.KeyframeResolver=To}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:r}){delete e[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ve(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const ni=(n,t)=>t&&typeof n=="number"?t.transform(n):n,Io={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xo=Be.length;function Oo(n,t,e){let r="",a=!0;for(let i=0;i<xo;i++){const s=Be[i],o=n[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=ni(o,gr[s]);if(!c){a=!1;const d=Io[s]||s;r+=`${d}(${l}) `}e&&(t[s]=l)}}return r=r.trim(),e?r=e(t,a?"":r):a&&(r="none"),r}function ii(n,t,e){const{style:r,vars:a,transformOrigin:i}=n;let s=!1,o=!1;for(const c in t){const l=t[c];if(je.has(c)){s=!0;continue}else if(Zr(c)){a[c]=l;continue}else{const d=ni(l,gr[c]);c.startsWith("origin")?(o=!0,i[c]=d):r[c]=d}}if(t.transform||(s||e?r.transform=Oo(t,n.transform,e):r.transform&&(r.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${l} ${d}`}}function ai(n,{style:t,vars:e},r,a){Object.assign(n.style,t,a&&a.getProjectionStyles(r));for(const i in e)n.style.setProperty(i,e[i])}const No={};function Lo(n,{layout:t,layoutId:e}){return je.has(n)||n.startsWith("origin")||(t||e!==void 0)&&(!!No[n]||n==="opacity")}function si(n,t,e){var i;const{style:r}=n,a={};for(const s in r)(ve(r[s])||t.style&&ve(t.style[s])||Lo(s,n)||((i=e==null?void 0:e.getValue(s))==null?void 0:i.liveStyle)!==void 0)&&(a[s]=r[s]);return a}function Po(n){return window.getComputedStyle(n)}class ko extends ri{constructor(){super(...arguments),this.type="html",this.renderInstance=ai}readValueFromInstance(t,e){var r;if(je.has(e))return(r=this.projection)!=null&&r.isProjecting?sr(e):Os(t,e);{const a=Po(t),i=(Zr(e)?a.getPropertyValue(e):a[e])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return no(t,e)}build(t,e,r){ii(t,e,r.transformTemplate)}scrapeMotionValuesFromProps(t,e,r){return si(t,e,r)}}function Ro(n,t){return n in t}class So extends ei{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(Ro(e,t)){const r=t[e];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return fr()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Mo={offset:"stroke-dashoffset",array:"stroke-dasharray"},Do={offset:"strokeDashoffset",array:"strokeDasharray"};function Vo(n,t,e=1,r=0,a=!0){n.pathLength=1;const i=a?Mo:Do;n[i.offset]=Z.transform(-r);const s=Z.transform(t),o=Z.transform(e);n[i.array]=`${s} ${o}`}function Uo(n,u,c,l,d){var h=u,{attrX:t,attrY:e,attrScale:r,pathLength:a,pathSpacing:i=1,pathOffset:s=0}=h,o=Ae(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var m,v;if(ii(n,o,l),c){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:p,style:f}=n;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),r!==void 0&&(p.scale=r),a!==void 0&&Vo(p,a,i,s,!1)}const oi=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"]),Fo=n=>typeof n=="string"&&n.toLowerCase()==="svg";function Bo(n,t,e,r){ai(n,t,void 0,r);for(const a in t.attrs)n.setAttribute(oi.has(a)?a:Ft(a),t.attrs[a])}function jo(n,t,e){const r=si(n,t,e);for(const a in n)if(ve(n[a])||ve(t[a])){const i=Be.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=n[a]}return r}class zo extends ri{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=fr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(je.has(e)){const r=Xn(e);return r&&r.default||0}return e=oi.has(e)?e:Ft(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,r){return jo(t,e,r)}build(t,e,r){Uo(t,e,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,e,r,a){Bo(t,e,r,a)}mount(t){this.isSVGTag=Fo(t.tagName),super.mount(t)}}function ci(n){return Un(n)&&"ownerSVGElement"in n}function Ko(n){return ci(n)&&n.tagName==="svg"}function Ho(n){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=ci(n)&&!Ko(n)?new zo(t):new ko(t);e.mount(n),Je.set(n,e)}function Wo(n){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new So(t);e.mount(n),Je.set(n,e)}function Yo(n,t,e){const r=ve(n)?n:et(n);return r.start(Fn("",r,t,e)),r.animation}function Go(n,t){return ve(n)||typeof n=="number"||typeof n=="string"&&!St(t)}function li(n,t,e,r){const a=[];if(Go(n,t))a.push(Yo(n,St(t)&&t.default||t,e&&(e.default||e)));else{const i=Rr(n,t,r),s=i.length;xe(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const c=i[o],l=c instanceof Element?Ho:Wo;Je.has(c)||l(c);const d=Je.get(c),u=K({},e);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),a.push(...eo(d,ee(K({},t),{transition:u}),{}))}}return a}function $o(n,t,e){const r=[];return aa(n,t,e,{spring:at}).forEach(({keyframes:i,transition:s},o)=>{r.push(...li(o,i,s))}),r}class qo{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 r=0;r<this.animations.length;r++)this.animations[r][t]=e}attachTimeline(t){const e=this.animations.map(r=>r.attachTimeline(t));return()=>{e.forEach((r,a)=>{r&&r(),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 Qo extends qo{then(t,e){return this.finished.finally(t).then(()=>{})}}function Xo(n){return Array.isArray(n)&&n.some(Array.isArray)}function Zo(n){function t(e,r,a){let i=[];return Xo(e)?i=$o(e,r,n):i=li(e,r,a,n),new Qo(i)}return t}const pe=Zo(),re={spinner:"_spinner_k40uq_1",spinnerContainer:"_spinnerContainer_k40uq_5",success:"_success_k40uq_9",successContainer:"_successContainer_k40uq_13",container:"_container_k40uq_17",card:"_card_k40uq_26",warning:"_warning_k40uq_35",svg:"_svg_k40uq_43",srOnly:"_srOnly_k40uq_48",backButton:"_backButton_k40uq_52"};class di{constructor(){w(this,"template",`
3
+ <svg aria-hidden="true" class="${re.spinner}" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
4
4
  <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
5
5
  <path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
6
6
  </svg>
7
- <span class="${te.srOnly}">Loading...</span>
8
- `);w(this,"spinner",document.createElement("div"));this.spinner.setAttribute("role","status"),this.spinner.classList.add(te.spinnerContainer),this.spinner.innerHTML=this.template}addClass(t){this.spinner.classList.add(t)}removeClass(t){this.spinner.classList.remove(t)}render(){return this.spinner}}const pi={loader:"_loader_nwq3e_1"};class el{constructor(){w(this,"loader");this.loader=document.createElement("div"),this.loader.classList.add(pi.loader),this.loader.appendChild(new ui().render())}setClassName(t){t?this.loader.classList.add(t):this.loader.className=pi.loader}render(){return this.loader}}const ye={checkout:"_checkout_5sq3n_1",hidden:"_hidden_5sq3n_7",formInitial:"_formInitial_5sq3n_11",btnsInitial:"_btnsInitial_5sq3n_16"},_r={buttons:"_buttons_1i8cu_1",hidden:"_hidden_1i8cu_5"},Er={applePay:"_applePay_1ce61_1",hidden:"_hidden_1ce61_26"};function Cr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var wr,hi;function tl(){if(hi)return wr;hi=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 wr=r,wr}var pt={},ht={},fi;function mi(){if(fi)return ht;fi=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.clone=void 0;function r(t){return t?JSON.parse(JSON.stringify(t)):null}return ht.clone=r,ht}var ft={},vi;function rl(){if(vi)return ft;vi=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.matches=void 0;function r(n,a,i){var o=String(a).length,s=n.substr(0,o),l=parseInt(s,10);return a=parseInt(String(a).substr(0,s.length),10),i=parseInt(String(i).substr(0,s.length),10),l>=a&&l<=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 ft.matches=e,ft}var gi;function nl(){if(gi)return pt;gi=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.addMatchingCardsToResults=void 0;var r=mi(),t=rl();function e(n,a,i){var o,s;for(o=0;o<a.patterns.length;o++){var l=a.patterns[o];if((0,t.matches)(n,l)){var c=(0,r.clone)(a);Array.isArray(l)?s=String(l[0]).length:s=String(l).length,n.length>=s&&(c.matchStrength=s),i.push(c);break}}}return pt.addMatchingCardsToResults=e,pt}var mt={},yi;function il(){if(yi)return mt;yi=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.isValidInputType=void 0;function r(t){return typeof t=="string"||t instanceof String}return mt.isValidInputType=r,mt}var vt={},bi;function al(){if(bi)return vt;bi=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.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 vt.findBestMatch=t,vt}var gt,_i;function sl(){if(_i)return gt;_i=1;var r=gt&&gt.__assign||function(){return r=Object.assign||function(f){for(var m,v=1,y=arguments.length;v<y;v++){m=arguments[v];for(var A in m)Object.prototype.hasOwnProperty.call(m,A)&&(f[A]=m[A])}return f},r.apply(this,arguments)},t=tl(),e=nl(),n=il(),a=al(),i=mi(),o={},s={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"},l=[s.VISA,s.MASTERCARD,s.AMERICAN_EXPRESS,s.DINERS_CLUB,s.DISCOVER,s.JCB,s.UNIONPAY,s.MAESTRO,s.ELO,s.MIR,s.HIPER,s.HIPERCARD],c=(0,i.clone)(l);function d(f){return o[f]||t[f]}function u(){return c.map(function(f){return(0,i.clone)(d(f))})}function h(f,m){m===void 0&&(m=!1);var v=c.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();c.forEach(function(y){var A=d(y);(0,e.addMatchingCardsToResults)(f,A,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);c.splice(m,1)},p.addCard=function(f){var m=h(f.type,!0);o[f.type]=f,m===-1&&c.push(f.type)},p.updateCard=function(f,m){var v=o[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 y=(0,i.clone)(v);y=r(r({},y),m),o[y.type]=y},p.changeOrder=function(f,m){var v=h(f);c.splice(v,1),c.splice(m,0,f)},p.resetModifications=function(){c=(0,i.clone)(l),o={}},p.types=s,gt=p,gt}var Qe=sl();Qe.updateCard("visa",{lengths:[16]}),Qe.updateCard("unionpay",{gaps:[4,8,12,16]});const ol=(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,o=[0].concat(a,n.length),s=[];for(let l=0;o[l]<n.length;l++){const c=o[l],d=Math.min(o[l+1],n.length);s.push(n.slice(c,d))}return s.join(" ").slice(0,i)},ll=(r,t)=>{const e=Qe.getTypeInfo(t),n=(e==null?void 0:e.code.size)||4;return r.replace(/\D/g,"").slice(0,n)},cl=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}`}const a=t.slice(2,4);return t.length<=2?e:`${e} / ${a}`};var de=(r=>(r.Invalid="invalid",r.Empty="empty",r.Incomplete="incomplete",r.Unsupported="unsupported",r.Expired="expired",r))(de||{}),pe=(r=>(r.Visa="visa",r.Mastercard="mastercard",r.JCB="jcb",r.DinersClub="diners-club",r.UnionPay="unionpay",r.Maestro="maestro",r))(pe||{});const kt=[{name:"Visa",type:"visa",pattern:/^4/,minLength:16,maxLength:16},{name:"MasterCard",type:"mastercard",pattern:/^5[1-5]/,minLength:16,maxLength:16},{name:"JCB",type:"jcb",pattern:/^(?:2131|1800|35\d{3})/,minLength:15,maxLength:16},{name:"Diners Club",type:"diners-club",pattern:/^3(?:0[0-5]|[68][0-9])/,minLength:14,maxLength:16},{name:"Union Pay",type:"unionpay",pattern:/^62[^7]+/,minLength:16,maxLength:19},{name:"Maestro",type:"maestro",pattern:/^(50[^69]|5[68]|5018|5020|5038|627|6304|6759|6761|6763|6[3][^6]+)/,minLength:12,maxLength:19}],Ei=[{name:"American Express",pattern:/^3[47]/,minLength:15,maxLength:15},{name:"Discover",pattern:/^6(?:011|5[0-9]{2})/,minLength:16,maxLength:16}],dl=r=>{var t,e;return(e=(t=Ei.find(n=>n.name==="American Express"))==null?void 0:t.pattern.test(r))!=null?e:!1},ul=r=>{var t,e;return(e=(t=Ei.find(n=>n.name==="Discover"))==null?void 0:t.pattern.test(r))!=null?e:!1},Ci=r=>kt.find(t=>t.pattern.test(r))||null,wi=r=>kt.filter(t=>t.pattern.test(r)),pl=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:de.Empty};if(!/^\d+$/.test(e))return{isValid:!1,cardType:null,error:de.Invalid};if(dl(e)||ul(e))return{isValid:!1,cardType:null,error:de.Unsupported};const n=Ci(e);if(n){if(e.length<n.minLength||e.length>n.maxLength)return{isValid:!1,cardType:n.name,error:de.Incomplete}}else if(e.length<16)return{isValid:!1,cardType:null,error:de.Incomplete};return n&&t&&!t.includes(n.type)?{isValid:!1,cardType:n.name,error:de.Unsupported}:pl(e)?{isValid:!0,cardType:(n==null?void 0:n.name)||null,error:null}:{isValid:!1,cardType:(n==null?void 0:n.name)||null,error:de.Invalid}};var re=(r=>(r.PAYPAL="PAYPAL",r.APPLE_PAY="APPLEPAY",r.GOOGLE_PAY="GPAY",r.CARD="CARD",r.VENMO="VENMO",r))(re||{}),Ar=(r=>(r.PENDING="PENDING",r.FAILED="FAILED",r.AUTHORIZED="AUTHORIZED",r.SETTLING="SETTLING",r.SETTLED="SETTLED",r.DECLINED="DECLINED",r.CANCELLED="CANCELLED",r))(Ar||{}),fe=(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))(fe||{});const Tr=(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],hl=[{type:re.PAYPAL,order:1,is_active:!0},{type:re.APPLE_PAY,order:2,is_active:!0},{type:re.GOOGLE_PAY,order:3,is_active:!0},{type:re.CARD,order:4,is_active:!0}],fl=r=>r.googlePay?re.GOOGLE_PAY:r.applePay?re.APPLE_PAY:r.paypal?re.PAYPAL:r.braintree?re.VENMO:re.CARD,ml=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}},vl=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}},gl=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}},yl=r=>{var e,n,a,i,o,s;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:(o=t.networkToken)==null?void 0:o.number,token_service_provider:(s=t.networkToken)==null?void 0:s.tokenServiceProvider}},bl=r=>{const t=r.braintree;if(t)return{payment_method_nonce:t.nonce}},Ti=r=>{var n,a,i,o,s,l,c,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)||((o=e==null?void 0:e.billingAddress)==null?void 0:o.countryCode)||void 0,line1:((l=(s=t==null?void 0:t.billingContact)==null?void 0:s.addressLines)==null?void 0:l.at(0))||((c=e==null?void 0:e.billingAddress)==null?void 0:c.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}},Ii=r=>{var a,i,o,s,l,c,d,u,h,p,f,m,v,y,A,x,N,I,P;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)||((o=e==null?void 0:e.card)==null?void 0:o.country)||((s=n==null?void 0:n.card)==null?void 0:s.country),currency_code:(t==null?void 0:t.currency)||((l=e==null?void 0:e.card)==null?void 0:l.currency)||((c=n==null?void 0:n.card)==null?void 0:c.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)||((y=e==null?void 0:e.card)==null?void 0:y.expiry.month)):void 0,exp_year:t!=null&&t.expYear||(A=e==null?void 0:e.card)!=null&&A.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)||((N=e==null?void 0:e.card)==null?void 0:N.lastFour)||((I=n==null?void 0:n.card)==null?void 0:I.lastFour),number:(t==null?void 0:t.number)||((P=e==null?void 0:e.card)==null?void 0:P.number)}},xi=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},_l=r=>{var n,a;const t=fl(r),e={client_session:r.clientSession,three_ds_session_id:r.threeDsSessionId,type:t};switch(t){case re.CARD:return J(K({},e),{name:xi(r),card:ml(r)});case re.PAYPAL:return J(K({},e),{paypal:vl(r)});case re.GOOGLE_PAY:return J(K({},e),{card:Ii(r),google_pay:gl(r),billing_address:Ti(r)});case re.APPLE_PAY:return J(K({},e),{name:xi(r),card:Ii(r),apple_pay:yl(r),phone:(a=(n=r.applePay)==null?void 0:n.shippingContact)==null?void 0:a.phoneNumber,billing_address:Ti(r)});case re.VENMO:return J(K({},e),{venmo:bl(r)});default:throw new Error(`Unsupported payment method: ${t}`)}},El=(r,t,e)=>W(this,null,function*(){const n=`${Tr(t)}/payments/create`,a=new Headers;a.append("Content-Type","application/json"),a.append("X-API-Version",e);const i=_l(r);return yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify(i)})).json()}),Cl=(r,t,e)=>W(this,null,function*(){const n=`${Tr(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||""}),wl=(r,t,e)=>W(this,null,function*(){const n=`${Tr(t)}/payments/config?client_session_id=${r}`,a=new Headers;a.append("X-API-Version",e);const o=yield(yield fetch(n,{headers:a})).json();return o.checkout_config||(o.checkout_config=hl),o}),Al=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===re.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)},Tl=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===re.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)},Il=(r=[])=>r.reduce((t,e)=>{switch(e){case pe.Visa:return t.push("visa"),t;case pe.Mastercard:return t.push("masterCard"),t;case pe.JCB:return t.push("jcb"),t;case pe.UnionPay:return t.push("chinaUnionPay"),t;default:return t}},[]),xl=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",nb:"nb-NO",no:"nb-NO",nl:"nl-NL",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ua:"uk-UA",sk:"sk-SK",sv:"sv-SE",th:"th-TH",tr:"tr-TR",vi:"vi-VN",zh:"zh-CN"})[r]||"en-US",kl=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",nb:"no",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",Nl=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",nb:"no_NO",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";class Nt{constructor(){w(this,"template",`
9
- <svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>
10
- <g fill='none' fill-rule='evenodd' transform='matrix(1 0 0 -1 0 12)'>
11
- <circle cx='6' cy='3.2' fill='currentColor' r='1'></circle>
12
- <g stroke='currentColor'>
13
- <circle cx='6' cy='6' r='5.5'></circle>
14
- <path d='m6 9.2v-3.2' stroke-linecap='round' stroke-linejoin='round'></path>
15
- </g>
16
- </g>
17
- </svg>
18
- <span class="${te.srOnly}">Warning</span>
19
- `);w(this,"element",document.createElement("div"));this.element.classList.add(te.warning),this.element.innerHTML=this.template}render(){return this.element}}const ki={container:"_container_94v1h_1",title:"_title_94v1h_10"},_t=class _t{constructor(t){w(this,"element");w(this,"message",document.createElement("p"));w(this,"icon",new Nt);w(this,"hasCustomMessage",!1);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(ki.container),this.message.classList.add(ki.title),this.message.textContent=t.messages().status.error,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:e})=>{this.hasCustomMessage||(this.message.textContent=e.status.error)}),_t.instances.add(this)}setMessage(t){this.message.textContent=t,this.hasCustomMessage=!!t}addClassName(t){this.element.classList.add(t)}removeClassName(t){this.element.classList.remove(t)}hide(){this.element.style.display="none"}show(){this.element.style.display=""}static hideAll(){for(const t of _t.instances)t.element.style.display="none"}render(){return this.element}};w(_t,"instances",new Set);let Te=_t;var Ot={exports:{}},yt={};/**
7
+ <span class="${re.srOnly}">Loading...</span>
8
+ `);w(this,"spinner",document.createElement("div"));this.spinner.setAttribute("role","status"),this.spinner.classList.add(re.spinnerContainer),this.spinner.innerHTML=this.template}addClass(t){this.spinner.classList.add(t)}removeClass(t){this.spinner.classList.remove(t)}render(){return this.spinner}}const ui={loader:"_loader_nwq3e_1"};class Jo{constructor(){w(this,"loader");this.loader=document.createElement("div"),this.loader.classList.add(ui.loader),this.loader.appendChild(new di().render())}setClassName(t){t?this.loader.classList.add(t):this.loader.className=ui.loader}render(){return this.loader}}const ge={checkout:"_checkout_5sq3n_1",hidden:"_hidden_5sq3n_7",formInitial:"_formInitial_5sq3n_11",btnsInitial:"_btnsInitial_5sq3n_16"},yr={buttons:"_buttons_1i8cu_1",hidden:"_hidden_1i8cu_5"},br={applePay:"_applePay_1ce61_1",hidden:"_hidden_1ce61_26"};function _r(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Er,pi;function ec(){if(pi)return Er;pi=1;var n={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 Er=n,Er}var ct={},lt={},hi;function fi(){if(hi)return lt;hi=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.clone=void 0;function n(t){return t?JSON.parse(JSON.stringify(t)):null}return lt.clone=n,lt}var dt={},mi;function tc(){if(mi)return dt;mi=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.matches=void 0;function n(r,a,i){var s=String(a).length,o=r.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(r,a){return a=String(a),a.substring(0,r.length)===r.substring(0,a.length)}function e(r,a){return Array.isArray(a)?n(r,a[0],a[1]):t(r,a)}return dt.matches=e,dt}var vi;function rc(){if(vi)return ct;vi=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.addMatchingCardsToResults=void 0;var n=fi(),t=tc();function e(r,a,i){var s,o;for(s=0;s<a.patterns.length;s++){var c=a.patterns[s];if((0,t.matches)(r,c)){var l=(0,n.clone)(a);Array.isArray(c)?o=String(c[0]).length:o=String(c).length,r.length>=o&&(l.matchStrength=o),i.push(l);break}}}return ct.addMatchingCardsToResults=e,ct}var ut={},gi;function nc(){if(gi)return ut;gi=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.isValidInputType=void 0;function n(t){return typeof t=="string"||t instanceof String}return ut.isValidInputType=n,ut}var pt={},yi;function ic(){if(yi)return pt;yi=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.findBestMatch=void 0;function n(e){var r=e.filter(function(a){return a.matchStrength}).length;return r>0&&r===e.length}function t(e){return n(e)?e.reduce(function(r,a){return!r||Number(r.matchStrength)<Number(a.matchStrength)?a:r}):null}return pt.findBestMatch=t,pt}var ht,bi;function ac(){if(bi)return ht;bi=1;var n=ht&&ht.__assign||function(){return n=Object.assign||function(f){for(var m,v=1,y=arguments.length;v<y;v++){m=arguments[v];for(var A in m)Object.prototype.hasOwnProperty.call(m,A)&&(f[A]=m[A])}return f},n.apply(this,arguments)},t=ec(),e=rc(),r=nc(),a=ic(),i=fi(),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,r.isValidInputType)(f))return m;if(f.length===0)return u();l.forEach(function(y){var A=d(y);(0,e.addMatchingCardsToResults)(f,A,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 y=(0,i.clone)(v);y=n(n({},y),m),s[y.type]=y},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,ht=p,ht}var Ge=ac();Ge.updateCard("visa",{lengths:[16]}),Ge.updateCard("unionpay",{gaps:[4,8,12,16]});const sc=(n,t)=>{const e=Ge.getTypeInfo(t),r=n.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,r.length),o=[];for(let c=0;s[c]<r.length;c++){const l=s[c],d=Math.min(s[c+1],r.length);o.push(r.slice(l,d))}return o.join(" ").slice(0,i)},oc=(n,t)=>{const e=Ge.getTypeInfo(t),r=(e==null?void 0:e.code.size)||4;return n.replace(/\D/g,"").slice(0,r)},cc=n=>{const t=n.replace(/\D/g,"");let e=t.slice(0,2);if(!e)return"";const r=Number(e);if(e!=="01"){if(Number.isNaN(r))return"0";if(r===0||r===1)return`${r}`;if(r>12)return"1";e=r>9?`${r}`:`0${r}`}const a=t.slice(2,4);return t.length<=2?e:`${e} / ${a}`};var ue=(n=>(n.Invalid="invalid",n.Empty="empty",n.Incomplete="incomplete",n.Unsupported="unsupported",n.Expired="expired",n))(ue||{}),he=(n=>(n.Visa="visa",n.Mastercard="mastercard",n.JCB="jcb",n.DinersClub="diners-club",n.UnionPay="unionpay",n.Maestro="maestro",n))(he||{});const At=[{name:"Visa",type:"visa",pattern:/^4/,minLength:16,maxLength:16},{name:"MasterCard",type:"mastercard",pattern:/^5[1-5]/,minLength:16,maxLength:16},{name:"JCB",type:"jcb",pattern:/^(?:2131|1800|35\d{3})/,minLength:15,maxLength:16},{name:"Diners Club",type:"diners-club",pattern:/^3(?:0[0-5]|[68][0-9])/,minLength:14,maxLength:16},{name:"Union Pay",type:"unionpay",pattern:/^62[^7]+/,minLength:16,maxLength:19},{name:"Maestro",type:"maestro",pattern:/^(50[^69]|5[68]|5018|5020|5038|627|6304|6759|6761|6763|6[3][^6]+)/,minLength:12,maxLength:19}],_i=[{name:"American Express",pattern:/^3[47]/,minLength:15,maxLength:15},{name:"Discover",pattern:/^6(?:011|5[0-9]{2})/,minLength:16,maxLength:16}],lc=n=>{var t,e;return(e=(t=_i.find(r=>r.name==="American Express"))==null?void 0:t.pattern.test(n))!=null?e:!1},dc=n=>{var t,e;return(e=(t=_i.find(r=>r.name==="Discover"))==null?void 0:t.pattern.test(n))!=null?e:!1},Ei=n=>At.find(t=>t.pattern.test(n))||null,Ci=n=>At.filter(t=>t.pattern.test(n)),uc=n=>{let t=0,e=!1;for(let r=n.length-1;r>=0;r--){let a=parseInt(n[r]);e&&(a*=2,a>9&&(a-=9)),t+=a,e=!e}return t%10===0},wi=(n,t)=>{const e=n.replace(/\D/g,"");if(!e)return{isValid:!1,cardType:null,error:ue.Empty};if(!/^\d+$/.test(e))return{isValid:!1,cardType:null,error:ue.Invalid};if(lc(e)||dc(e))return{isValid:!1,cardType:null,error:ue.Unsupported};const r=Ei(e);if(r){if(e.length<r.minLength||e.length>r.maxLength)return{isValid:!1,cardType:r.name,error:ue.Incomplete}}else if(e.length<16)return{isValid:!1,cardType:null,error:ue.Incomplete};return r&&t&&!t.includes(r.type)?{isValid:!1,cardType:r.name,error:ue.Unsupported}:uc(e)?{isValid:!0,cardType:(r==null?void 0:r.name)||null,error:null}:{isValid:!1,cardType:(r==null?void 0:r.name)||null,error:ue.Invalid}};var q=(n=>(n.PAYPAL="PAYPAL",n.APPLE_PAY="APPLEPAY",n.GOOGLE_PAY="GPAY",n.CARD="CARD",n.VENMO="VENMO",n))(q||{}),Cr=(n=>(n.PENDING="PENDING",n.FAILED="FAILED",n.AUTHORIZED="AUTHORIZED",n.SETTLING="SETTLING",n.SETTLED="SETTLED",n.DECLINED="DECLINED",n.CANCELLED="CANCELLED",n))(Cr||{}),Tt=(n=>(n.INSUFFICIENT_FUNDS="insufficient_funds",n.AUTHENTICATION_REQUIRED="authentication_required",n.CARD_ISSUER_DECLINE="card_issuer_decline",n.GENERIC_DECLINE="generic_decline",n.WITHDRAWAL_LIMIT_EXCEEDED="withdrawal_limit_exceeded",n.DO_NOT_HONOR="do_not_honor",n.EXPIRED_CARD="expired_card",n.SUSPECTED_FRAUD="suspected_fraud",n.INCORRECT_CVC="incorrect_cvc",n.INVALID_CARD_NUMBER="invalid_card_number",n.ISSUER_UNAVAILABLE="issuer_unavailable",n.CARD_LOST_OR_STOLEN="card_lost_or_stolen",n.CARD_DECLINED="card_declined",n))(Tt||{});const wr=(n="sandbox")=>({develop:"https://dev-api.paynext.com",staging:"https://staging-api.paynext.com",sandbox:"https://sandbox-api.paynext.com",production:"https://api.paynext.com"})[n],pc=[{type:q.PAYPAL,order:1,is_active:!0},{type:q.APPLE_PAY,order:2,is_active:!0},{type:q.GOOGLE_PAY,order:3,is_active:!0},{type:q.CARD,order:4,is_active:!0}],hc=n=>n.googlePay?q.GOOGLE_PAY:n.applePay?q.APPLE_PAY:n.paypal?q.PAYPAL:n.braintree?q.VENMO:q.CARD,fc=n=>{const t=n.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}},mc=n=>{var e;const t=n.paypal;if((e=t==null?void 0:t.billing_agreement_token)!=null&&e.paypalId)return{billing_agreement_token:t.billing_agreement_token.paypalId}},vc=n=>{var e,r;const t=n.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:(r=t.card)!=null&&r.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}},gc=n=>{var e,r,a,i,s,o;const t=n.applePay;if(t)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(r=(e=t.networkToken)==null?void 0:e.expiry)!=null&&r.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}},yc=n=>{const t=n.braintree;if(t)return{payment_method_nonce:t.nonce}},Ai=n=>{var r,a,i,s,o,c,l,d,u,h,p,f,m,v;const{applePay:t,googlePay:e}=n;if(!(!t&&!e))return{city:((r=t==null?void 0:t.billingContact)==null?void 0:r.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}},Ti=n=>{var a,i,s,o,c,l,d,u,h,p,f,m,v,y,A,x,N,I,P;const{card:t,googlePay:e,applePay:r}=n;if(!(!t&&!(e!=null&&e.card)&&!(r!=null&&r.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=r==null?void 0:r.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=r==null?void 0:r.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=r==null?void 0:r.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=r==null?void 0:r.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=r==null?void 0:r.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=r==null?void 0:r.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)||((y=e==null?void 0:e.card)==null?void 0:y.expiry.month)):void 0,exp_year:t!=null&&t.expYear||(A=e==null?void 0:e.card)!=null&&A.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)||((N=e==null?void 0:e.card)==null?void 0:N.lastFour)||((I=r==null?void 0:r.card)==null?void 0:I.lastFour),number:(t==null?void 0:t.number)||((P=e==null?void 0:e.card)==null?void 0:P.number)}},Ii=n=>{var r,a;const{applePay:t,card:e}=n;return(r=t==null?void 0:t.billingContact)!=null&&r.givenName?`${t.billingContact.givenName} ${t.billingContact.familyName||""}`.trim():(a=e==null?void 0:e.metadata)==null?void 0:a.name},bc=n=>{var r,a;const t=hc(n),e={client_session:n.clientSession,three_ds_session_id:n.threeDsSessionId,type:t};switch(t){case q.CARD:return ee(K({},e),{name:Ii(n),card:fc(n)});case q.PAYPAL:return ee(K({},e),{paypal:mc(n)});case q.GOOGLE_PAY:return ee(K({},e),{card:Ti(n),google_pay:vc(n),billing_address:Ai(n)});case q.APPLE_PAY:return ee(K({},e),{name:Ii(n),card:Ti(n),apple_pay:gc(n),phone:(a=(r=n.applePay)==null?void 0:r.shippingContact)==null?void 0:a.phoneNumber,billing_address:Ai(n)});case q.VENMO:return ee(K({},e),{venmo:yc(n)});default:throw new Error(`Unsupported payment method: ${t}`)}},_c=(n,t,e)=>Y(this,null,function*(){const r=`${wr(t)}/payments/create`,a=new Headers;a.append("Content-Type","application/json"),a.append("X-API-Version",e);const i=bc(n);return yield(yield fetch(r,{method:"POST",headers:a,body:JSON.stringify(i)})).json()}),Ec=(n,t,e)=>Y(this,null,function*(){const r=`${wr(t)}/payments/create/billing/agreement`,a=new Headers;return a.append("Content-Type","application/json"),a.append("X-API-Version",e),(yield(yield fetch(r,{method:"POST",headers:a,body:JSON.stringify({client_session:n})})).json()).paypal_agreement_token_response.token_id||""}),Cc=(n,t,e)=>Y(this,null,function*(){const r=`${wr(t)}/payments/config?client_session_id=${n}`,a=new Headers;a.append("X-API-Version",e);const s=yield(yield fetch(r,{headers:a})).json();return s.checkout_config||(s.checkout_config=pc),s}),wc=n=>{var t;return n?typeof n.amount!="number"?(console.error("Transaction amount is missing or invalid for Google Pay"),null):n.currency?n.country?n.merchant_id?n.checkout_config&&!((t=n.checkout_config)==null?void 0:t.find(({is_active:r,type:a})=>r&&a===q.GOOGLE_PAY))?null:{amount:n.amount,currency:n.currency,country:n.country,merchantId:n.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)},Ac=n=>{var t,e;return n?typeof n.amount!="number"?(console.error("Transaction amount is missing or invalid for Apple Pay"),null):n.currency?n.country?n.merchant_id?n.checkout_config&&!((t=n.checkout_config)==null?void 0:t.find(({is_active:a,type:i})=>a&&i===q.APPLE_PAY))?null:{amount:n.amount,currency:n.currency,country:n.country,merchantId:n.merchant_id,lineItems:((e=n.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)},Tc=(n=[])=>n.reduce((t,e)=>{switch(e){case he.Visa:return t.push("visa"),t;case he.Mastercard:return t.push("masterCard"),t;case he.JCB:return t.push("jcb"),t;case he.UnionPay:return t.push("chinaUnionPay"),t;default:return t}},[]),Ic=n=>({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",nb:"nb-NO",no:"nb-NO",nl:"nl-NL",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ua:"uk-UA",sk:"sk-SK",sv:"sv-SE",th:"th-TH",tr:"tr-TR",vi:"vi-VN",zh:"zh-CN"})[n]||"en-US",xc=n=>({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",nb:"no",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"})[n]||"en",Oc=n=>({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",nb:"no_NO",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"})[n]||"en_US";var It={exports:{}},ft={};/**
20
9
  * @license React
21
10
  * react-jsx-runtime.production.js
22
11
  *
@@ -24,7 +13,7 @@
24
13
  *
25
14
  * This source code is licensed under the MIT license found in the
26
15
  * LICENSE file in the root directory of this source tree.
27
- */var Ni;function Ol(){if(Ni)return yt;Ni=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function e(n,a,i){var o=null;if(i!==void 0&&(o=""+i),a.key!==void 0&&(o=""+a.key),"key"in a){i={};for(var s in a)s!=="key"&&(i[s]=a[s])}else i=a;return a=i.ref,{$$typeof:r,type:n,key:o,ref:a!==void 0?a:null,props:i}}return yt.Fragment=t,yt.jsx=e,yt.jsxs=e,yt}var bt={};/**
16
+ */var xi;function Nc(){if(xi)return ft;xi=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function e(r,a,i){var s=null;if(i!==void 0&&(s=""+i),a.key!==void 0&&(s=""+a.key),"key"in a){i={};for(var o in a)o!=="key"&&(i[o]=a[o])}else i=a;return a=i.ref,{$$typeof:n,type:r,key:s,ref:a!==void 0?a:null,props:i}}return ft.Fragment=t,ft.jsx=e,ft.jsxs=e,ft}var mt={};/**
28
17
  * @license React
29
18
  * react-jsx-runtime.development.js
30
19
  *
@@ -32,12 +21,12 @@
32
21
  *
33
22
  * This source code is licensed under the MIT license found in the
34
23
  * LICENSE file in the root directory of this source tree.
35
- */var Oi;function Pl(){return Oi||(Oi=1,process.env.NODE_ENV!=="production"&&function(){function r(g){if(g==null)return null;if(typeof g=="function")return g.$$typeof===q?null:g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case m:return"Fragment";case y:return"Profiler";case v:return"StrictMode";case I:return"Suspense";case P:return"SuspenseList";case U: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 A: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 k: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,b=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.",b),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 o(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 s(g,R){function V(){Z||(Z=!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 l(){var g=r(this.type);return D[g]||(D[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 c(g,R,V,b,T,_,O,M){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:l}):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:O}),Object.defineProperty(g,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g}function d(g,R,V,b,T,_,O,M){var C=R.children;if(C!==void 0)if(b)if(z(C)){for(b=0;b<C.length;b++)u(C[b]);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 j=Object.keys(R).filter(function(ae){return ae!=="key"});b=0<j.length?"{key: someKey, "+j.join(": ..., ")+": ...}":"{key: someKey}",E[C+b]||(j=0<j.length?"{"+j.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
24
+ */var Oi;function Lc(){return Oi||(Oi=1,process.env.NODE_ENV!=="production"&&function(){function n(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 y:return"Profiler";case v:return"StrictMode";case I:return"Suspense";case P:return"SuspenseList";case F: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 A:return(g._context.displayName||"Context")+".Consumer";case N:var k=g.render;return g=g.displayName,g||(g=k.displayName||k.name||"",g=g!==""?"ForwardRef("+g+")":"ForwardRef"),g;case O:return k=g.displayName||null,k!==null?k:n(g.type)||"Memo";case S:k=g._payload,g=g._init;try{return n(g(k))}catch(V){}}return null}function t(g){return""+g}function e(g){try{t(g);var k=!1}catch(T){k=!0}if(k){k=console;var V=k.error,b=typeof Symbol=="function"&&Symbol.toStringTag&&g[Symbol.toStringTag]||g.constructor.name||"Object";return V.call(k,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",b),t(g)}}function r(g){if(g===m)return"<>";if(typeof g=="object"&&g!==null&&g.$$typeof===S)return"<...>";try{var k=n(g);return k?"<"+k+">":"<...>"}catch(V){return"<...>"}}function a(){var g=G.A;return g===null?null:g.getOwner()}function i(){return Error("react-stack-top-frame")}function s(g){if(U.call(g,"key")){var k=Object.getOwnPropertyDescriptor(g,"key").get;if(k&&k.isReactWarning)return!1}return g.key!==void 0}function o(g,k){function V(){J||(J=!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)",k))}V.isReactWarning=!0,Object.defineProperty(g,"key",{get:V,configurable:!0})}function c(){var g=n(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,k,V,b,T,_,L,D){return V=_.ref,g={$$typeof:p,type:g,key:k,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:L}),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,k,V,b,T,_,L,D){var C=k.children;if(C!==void 0)if(b)if(j(C)){for(b=0;b<C.length;b++)u(C[b]);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(U.call(k,"key")){C=n(g);var B=Object.keys(k).filter(function(ae){return ae!=="key"});b=0<B.length?"{key: someKey, "+B.join(": ..., ")+": ...}":"{key: someKey}",E[C+b]||(B=0<B.length?"{"+B.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
36
25
  let props = %s;
37
26
  <%s {...props} />
38
27
  React keys must be passed directly to JSX without using spread:
39
28
  let props = %s;
40
- <%s key={someKey} {...props} />`,b,C,j,C),E[C+b]=!0)}if(C=null,V!==void 0&&(e(V),C=""+V),o(R)&&(e(R.key),C=""+R.key),"key"in R){V={};for(var Q in R)Q!=="key"&&(V[Q]=R[Q])}else V=R;return C&&s(V,typeof g=="function"?g.displayName||g.name||"Unknown":g),c(g,C,_,T,a(),V,O,M)}function u(g){typeof g=="object"&&g!==null&&g.$$typeof===p&&g._store&&(g._store.validated=1)}var h=ie,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),x=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),q=Symbol.for("react.client.reference"),$=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,z=Array.isArray,B=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(g){return g()}};var Z,D={},Y=h.react_stack_bottom_frame.bind(h,i)(),H=B(n(i)),E={};bt.Fragment=m,bt.jsx=function(g,R,V,b,T){var _=1e4>$.recentlyCreatedOwnerStacks++;return d(g,R,V,!1,b,T,_?Error("react-stack-top-frame"):Y,_?B(n(g)):H)},bt.jsxs=function(g,R,V,b,T){var _=1e4>$.recentlyCreatedOwnerStacks++;return d(g,R,V,!0,b,T,_?Error("react-stack-top-frame"):Y,_?B(n(g)):H)}}()),bt}var Pi;function Rl(){return Pi||(Pi=1,process.env.NODE_ENV==="production"?Ot.exports=Ol():Ot.exports=Pl()),Ot.exports}Rl();const Ll=[pe.DinersClub,pe.DinersClub,pe.JCB,pe.Mastercard,pe.Visa,pe.UnionPay,pe.Maestro],Se=r=>{const t=r.errors;return{[fe.INSUFFICIENT_FUNDS]:t==null?void 0:t.insufficientFunds,[fe.AUTHENTICATION_REQUIRED]:t==null?void 0:t.cardholderAuthenticationRequired,[fe.CARD_ISSUER_DECLINE]:t==null?void 0:t.declined,[fe.GENERIC_DECLINE]:t==null?void 0:t.declined,[fe.WITHDRAWAL_LIMIT_EXCEEDED]:t==null?void 0:t.limitExceeded,[fe.DO_NOT_HONOR]:t==null?void 0:t.doNotHonor,[fe.EXPIRED_CARD]:t==null?void 0:t.expiredCard,[fe.SUSPECTED_FRAUD]:t==null?void 0:t.processorDeclinedFraudSuspected,[fe.INCORRECT_CVC]:(t==null?void 0:t.invalidSecurePaymentData)||(t==null?void 0:t.invalidCreditCardNumber),[fe.INVALID_CARD_NUMBER]:t==null?void 0:t.invalidCreditCardNumber,[fe.ISSUER_UNAVAILABLE]:t==null?void 0:t.offlineIssuerDeclined,[fe.CARD_LOST_OR_STOLEN]:t==null?void 0:t.cardReportedAsLostOrStolen,[fe.CARD_DECLINED]:t==null?void 0:t.declined,errorText:t==null?void 0:t.errorText,"Frame closed before tokenization could occur.":t==null?void 0:t.venmoClosed,"Window is closed, can not determine type":t==null?void 0:t.paypalClosed,"Detected popup close":t==null?void 0:t.paypalPopupClosed,Cancelled:t==null?void 0:t.applePayClosed}},Xe=(r,t)=>{var i,o;const e=Se(t),n=((o=(i=t==null?void 0:t.card)==null?void 0:i.status)==null?void 0:o.error)||t.status.error,a=s=>s&&e[s]?e[s]:n;if(r&&typeof r=="object"){const s=r,l=s&&typeof s.status_reason=="object"&&s.status_reason?s.status_reason:s,c=l&&typeof l.decline_code=="string"?l.decline_code:void 0,d=l&&typeof l.message=="string"?l.message:void 0,u=typeof s.message=="string"?s.message:void 0;return c?a(c):d&&e[d]?e[d]:u&&e[u]?e[u]:n}return r instanceof Error?a(r.message):typeof r=="string"?a(r):n};class Sl{constructor(t){w(this,"element");w(this,"events",{ready:new he});w(this,"ev");w(this,"customButtonStyles");w(this,"error");w(this,"isInitialized",!1);this.config=t;const e=this.config.state.styles.getState().ApplePayButton;this.ev=this.config.service.ev,this.customButtonStyles=e,this.error=new Te(this.config.state.translate),this.element=document.createElement("div"),this.element.classList.add(Er.applePay,Er.hidden),this.error.setMessage(""),this.error.render().style.display="none"}init(t){return W(this,null,function*(){if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.translate.locale(),a=Tl(e);if(!a)return!1;const i=t?J(K({},t),{onError:o=>{var u,h;if(!this.isInitialized){console.error("Apple Pay error:",o);return}const s=this.config.state.translate.messages(),l=Xe(o,s),c=Se(s)[l],d=((u=this.config.state.translate.messages().errors)==null?void 0:u.errorText)||"Error";this.error.setMessage(`Apple Pay ${d.toLowerCase()}: ${c!=null?c:l}`),this.error.render().style.display="",(h=t.onError)==null||h.call(t,o)},onCancel:t.onCancel,onSuccess:o=>{var s;this.error.render().style.display="none",(s=t.onSuccess)==null||s.call(t,o)}}):void 0;return yield this.ev.initApple(J(K({},i),{transaction:a,supportedCardTypes:Il(Ll),locale:xl(n||"en")}),this.customButtonStyles),this.ev.isAppleAvailable()?(yield this.ev.renderApple(this.element),this.element.addEventListener("click",()=>Te.hideAll()),this.element.append(this.error.render()),this.isInitialized=!0,this.element.classList.remove(Er.hidden),this.events.ready.emit(),!0):!1})}addEventListener(t,e){return this.events[t].addListener(e)}showExternalError(t){var i;if(!this.isInitialized){console.error("Apple Pay error:",t);return}const e=this.config.state.translate.messages(),n=Se(e)[t],a=((i=this.config.state.translate.messages().errors)==null?void 0:i.errorText)||"Error";this.error.setMessage(`Apple Pay ${a.toLowerCase()}: ${n!=null?n:t}`),this.error.render().style.display=""}render(){return this.element}}const Dl=[{type:re.PAYPAL,is_active:!0,order:1},{type:re.APPLE_PAY,is_active:!0,order:2},{type:re.GOOGLE_PAY,is_active:!0,order:3},{type:re.VENMO,is_active:!0,order:4},{type:re.CARD,is_active:!0,order:5}],Ze={open:{y:0,opacity:1},close:{y:100,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},Pt={open:{y:0,opacity:1},close:{y:-100,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},ve={open:{y:0,opacity:1},close:{y:15,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},Ce={open:{y:0,opacity:1,height:"auto"},close:{y:-15,opacity:0,height:0},transition:{duration:.25,type:"spring",bounce:0}},Ir={googlePay:"_googlePay_gmreq_1",hidden:"_hidden_gmreq_20"};class Ml{constructor(t){w(this,"element");w(this,"events",{ready:new he});w(this,"ev");w(this,"customButtonStyles");w(this,"error");w(this,"isInitialized",!1);this.config=t,this.ev=this.config.service.ev,this.customButtonStyles=this.config.state.styles.getState().GooglePayButton,this.element=document.createElement("div"),this.element.classList.add(Ir.googlePay,Ir.hidden),this.error=new Te(this.config.state.translate),this.error.setMessage(""),this.error.render().style.display="none"}init(t){return W(this,null,function*(){if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.translate.locale(),a=Al(e);if(!a)return!1;const i=t?J(K({},t),{onError:o=>{var c,d;if(!this.isInitialized){console.error("Google Pay error:",o);return}const s=Xe(o,this.config.state.translate.messages()),l=((c=this.config.state.translate.messages().errors)==null?void 0:c.errorText)||"Error";this.error.setMessage(`Google Pay ${l.toLowerCase()}: ${s}`),this.error.render().style.display="",(d=t.onError)==null||d.call(t,o)},onCancel:t.onCancel,onSuccess:o=>{var s;this.error.render().style.display="none",(s=t.onSuccess)==null||s.call(t,o)}}):void 0;return yield this.ev.initGoogle(J(K({},i),{transaction:a,locale:kl(n||"en")}),this.customButtonStyles),yield this.ev.renderGoogle(this.element),this.element.addEventListener("click",()=>Te.hideAll()),this.element.append(this.error.render()),this.element.classList.remove(Ir.hidden),this.isInitialized=!0,this.events.ready.emit(),!0})}addEventListener(t,e){return this.events[t].addListener(e)}showExternalError(t){var n;if(!this.isInitialized){console.error("Google Pay error:",t);return}const e=((n=this.config.state.translate.messages().errors)==null?void 0:n.errorText)||"Error";this.error.setMessage(`Google Pay ${e.toLowerCase()}: ${t}`),this.error.render().style.display=""}render(){return this.element}}const xr={paypal:"_paypal_90mm5_1",hidden:"_hidden_90mm5_12"};class Vl{constructor(t){w(this,"element");w(this,"events",{ready:new he});w(this,"paypal");w(this,"customButtonStyles");w(this,"error");w(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(xr.paypal,xr.hidden),this.error=new Te(this.config.state.translate),this.error.setMessage(""),this.error.render().style.display="none"}init(t){return W(this,null,function*(){var o,s;if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.checkout.getState(),a=()=>W(this,null,function*(){try{return yield Cl(n.clientToken,n.environment,n.apiVersion)}catch(l){throw l}});if(!e||Object.keys(e).length===0)return console.error("PayPal transaction data is empty or invalid"),!1;if(!((o=e==null?void 0:e.paypal_info)!=null&&o.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:Nl(this.config.state.translate.locale())}),!this.paypal.isLoaded())return!1}catch(l){return!1}const i=t?J(K({},t),{onError:l=>{var p,f;if(!this.isInitialized){console.error("PayPal error:",l);return}const c=this.config.state.translate.messages(),d=Xe(l,c),u=Se(c)[d],h=((p=this.config.state.translate.messages().errors)==null?void 0:p.errorText)||"Error";this.error.setMessage(`PayPal ${h.toLowerCase()}: ${u!=null?u:d}`),this.error.render().style.display="",(f=t.onError)==null||f.call(t,l)},onCancel:t.onCancel,onSuccess:l=>{var c;this.error.render().style.display="none",(c=t.onSuccess)==null||c.call(t,l)}}):void 0;try{yield this.paypal.render(this.element,J(K({},i),{createBillingAgreement:a,onApprove:c=>W(this,[c],function*({billingToken:l}){var d;(d=i==null?void 0:i.onSuccess)==null||d.call(i,l||"")}),style:(s=this.customButtonStyles)==null?void 0:s.styles,onCancel:()=>{var l;(l=i==null?void 0:i.onCancel)==null||l.call(i)},onError:l=>{var c;(c=i==null?void 0:i.onError)==null||c.call(i,l)}}))}catch(l){return!1}return this.element.addEventListener("click",()=>Te.hideAll()),this.element.append(this.error.render()),this.element.classList.remove(xr.hidden),this.isInitialized=!0,this.events.ready.emit(),!0})}addEventListener(t,e){return this.events[t].addListener(e)}showExternalError(t){var i;if(!this.isInitialized){console.error("PayPal error:",t);return}const e=this.config.state.translate.messages(),n=Se(e)[t],a=((i=this.config.state.translate.messages().errors)==null?void 0:i.errorText)||"Error";this.error.setMessage(`PayPal ${a.toLowerCase()}: ${n!=null?n:t}`),this.error.render().style.display=""}render(){return this.element}}class Fl{constructor(){w(this,"template",`
29
+ <%s key={someKey} {...props} />`,b,C,B,C),E[C+b]=!0)}if(C=null,V!==void 0&&(e(V),C=""+V),s(k)&&(e(k.key),C=""+k.key),"key"in k){V={};for(var X in k)X!=="key"&&(V[X]=k[X])}else V=k;return C&&o(V,typeof g=="function"?g.displayName||g.name||"Unknown":g),l(g,C,_,T,a(),V,L,D)}function u(g){typeof g=="object"&&g!==null&&g.$$typeof===p&&g._store&&(g._store.validated=1)}var h=ie,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),x=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),W=Symbol.for("react.client.reference"),G=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,j=Array.isArray,z=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(g){return g()}};var J,M={},$=h.react_stack_bottom_frame.bind(h,i)(),H=z(r(i)),E={};mt.Fragment=m,mt.jsx=function(g,k,V,b,T){var _=1e4>G.recentlyCreatedOwnerStacks++;return d(g,k,V,!1,b,T,_?Error("react-stack-top-frame"):$,_?z(r(g)):H)},mt.jsxs=function(g,k,V,b,T){var _=1e4>G.recentlyCreatedOwnerStacks++;return d(g,k,V,!0,b,T,_?Error("react-stack-top-frame"):$,_?z(r(g)):H)}}()),mt}var Ni;function Pc(){return Ni||(Ni=1,process.env.NODE_ENV==="production"?It.exports=Nc():It.exports=Lc()),It.exports}Pc();const kc=[he.DinersClub,he.DinersClub,he.JCB,he.Mastercard,he.Visa,he.UnionPay,he.Maestro],Rc=n=>({}),xt=(n,t)=>{var i,s;const e=Rc(),r=((s=(i=t==null?void 0:t.card)==null?void 0:i.status)==null?void 0:s.error)||t.status.error,a=o=>o&&e[o]?e[o]:r;if(n&&typeof n=="object"){const o=n,c=o&&typeof o.status_reason=="object"&&o.status_reason?o.status_reason:o,l=c&&typeof c.decline_code=="string"?c.decline_code:void 0,d=c&&typeof c.message=="string"?c.message:void 0,u=typeof o.message=="string"?o.message:void 0;return l?a(l):d&&e[d]?e[d]:u&&e[u]?e[u]:r}return n instanceof Error?a(n.message):typeof n=="string"?a(n):r};class Sc{constructor(t){w(this,"element");w(this,"events",{ready:new ce,onPaymentAttempt:new ce});w(this,"ev");w(this,"customButtonStyles");w(this,"isInitialized",!1);w(this,"attemptEmitted",!1);this.config=t;const e=this.config.state.styles.getState().ApplePayButton;this.ev=this.config.service.ev,this.customButtonStyles=e,this.element=document.createElement("div"),this.element.classList.add(br.applePay,br.hidden)}init(t){return Y(this,null,function*(){if(!this.config)return!1;const e=this.config.state.transaction.getState(),r=this.config.state.translate.locale(),a=Ac(e);if(!a)return!1;const i=t?ee(K({},t),{onError:c=>{var d;if(this.emitAttemptOnce(),!this.isInitialized){console.error("Apple Pay error:",c);return}const l=this.config.state.translate.messages();xt(c,l),(d=t.onError)==null||d.call(t,c),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;if(yield this.ev.initApple(ee(K({},i),{transaction:a,supportedCardTypes:Tc(kc),locale:Ic(r||"en")}),this.customButtonStyles),!this.ev.isAppleAvailable())return!1;yield this.ev.renderApple(this.element);const s=c=>{this.emitAttemptOnce()};this.element.addEventListener("pointerdown",s,{capture:!0}),this.element.addEventListener("click",s,{capture:!0}),this.element.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&s()},{capture:!0}),this.element.addEventListener("focusin",s,{capture:!0}),this.isInitialized=!0,this.element.classList.remove(br.hidden),this.events.ready.emit();const o=()=>this.emitAttemptOnce();return window.addEventListener("blur",o,{once:!0}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&this.emitAttemptOnce()},{once:!0}),!0})}addEventListener(t,e){return this.events[t].addListener(e)}emitAttemptOnce(){this.attemptEmitted||(this.attemptEmitted=!0,this.events.onPaymentAttempt.emit(q.APPLE_PAY))}showExternalError(t){if(!this.isInitialized){console.error("Apple Pay error:",t);return}this.config.state.translate.messages()}render(){return this.element}}const Mc=[{type:q.PAYPAL,is_active:!0,order:1},{type:q.APPLE_PAY,is_active:!0,order:2},{type:q.GOOGLE_PAY,is_active:!0,order:3},{type:q.VENMO,is_active:!0,order:4},{type:q.CARD,is_active:!0,order:5}],$e={open:{y:0,opacity:1},close:{y:100,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},Ot={open:{y:0,opacity:1},close:{y:-100,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},me={open:{y:0,opacity:1},close:{y:15,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},Ee={open:{y:0,opacity:1,height:"auto"},close:{y:-15,opacity:0,height:0},transition:{duration:.25,type:"spring",bounce:0}},Ar={googlePay:"_googlePay_gmreq_1",hidden:"_hidden_gmreq_20"};class Dc{constructor(t){w(this,"element");w(this,"events",{ready:new ce,onPaymentAttempt:new ce});w(this,"ev");w(this,"customButtonStyles");w(this,"isInitialized",!1);w(this,"attemptEmitted",!1);this.config=t,this.ev=this.config.service.ev,this.customButtonStyles=this.config.state.styles.getState().GooglePayButton,this.element=document.createElement("div"),this.element.classList.add(Ar.googlePay,Ar.hidden)}init(t){return Y(this,null,function*(){if(!this.config)return!1;const e=this.config.state.transaction.getState(),r=this.config.state.translate.locale(),a=wc(e);if(!a)return!1;const i=t?ee(K({},t),{onError:c=>{var l;if(this.emitAttemptOnce(),!this.isInitialized){console.error("Google Pay error:",c);return}xt(c,this.config.state.translate.messages()),(l=t.onError)==null||l.call(t,c),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;yield this.ev.initGoogle(ee(K({},i),{transaction:a,locale:xc(r||"en")}),this.customButtonStyles),yield this.ev.renderGoogle(this.element);const s=c=>{this.emitAttemptOnce()};this.element.addEventListener("pointerdown",s,{capture:!0}),this.element.addEventListener("click",s,{capture:!0}),this.element.addEventListener("keydown",c=>{(c.key==="Enter"||c.key===" ")&&s()},{capture:!0}),this.element.addEventListener("focusin",s,{capture:!0}),this.element.classList.remove(Ar.hidden),this.isInitialized=!0,this.events.ready.emit();const o=()=>this.emitAttemptOnce();return window.addEventListener("blur",o,{once:!0}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&this.emitAttemptOnce()},{once:!0}),!0})}addEventListener(t,e){return this.events[t].addListener(e)}emitAttemptOnce(){this.attemptEmitted||(this.attemptEmitted=!0,this.events.onPaymentAttempt.emit(q.GOOGLE_PAY))}showExternalError(t){if(!this.isInitialized){console.error("Google Pay error:",t);return}}render(){return this.element}}const Tr={paypal:"_paypal_90mm5_1",hidden:"_hidden_90mm5_12"};class Vc{constructor(t){w(this,"element");w(this,"events",{ready:new ce,onPaymentAttempt:new ce});w(this,"paypal");w(this,"customButtonStyles");w(this,"isInitialized",!1);w(this,"attemptEmitted",!1);w(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(Tr.paypal,Tr.hidden)}init(t){return Y(this,null,function*(){var s,o;if(!this.config)return!1;const e=this.config.state.transaction.getState(),r=this.config.state.checkout.getState(),a=()=>Y(this,null,function*(){try{return yield Ec(r.clientToken,r.environment,r.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:Oc(this.config.state.translate.locale())}),!this.paypal.isLoaded())return!1}catch(c){return!1}const i=t?ee(K({},t),{onError:c=>{var l;if(this.emitAttemptOnce(),!this.isInitialized){console.error("PayPal error:",c);return}(l=t.onError)==null||l.call(t,c),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,ee(K({},i),{createBillingAgreement:a,onClick:()=>{this.emitAttemptOnce()},onApprove:l=>Y(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 l;(l=i==null?void 0:i.onError)==null||l.call(i,c)}}))}catch(c){return!1}return this.setupInterceptOverlay(),this.element.classList.remove(Tr.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(q.PAYPAL))}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",r=>{(r.key==="Enter"||r.key===" ")&&e()},{capture:!0}),this.element.appendChild(t),this.interceptOverlay=t}showExternalError(t){if(!this.isInitialized){console.error("PayPal error:",t);return}}render(){return this.element}}class Uc{constructor(){w(this,"template",`
41
30
  <svg
42
31
  xmlns='http://www.w3.org/2000/svg'
43
32
  fill='none'
@@ -46,16 +35,16 @@ React keys must be passed directly to JSX without using spread:
46
35
  stroke-linecap='round'
47
36
  stroke-linejoin='round'
48
37
  viewBox='0 0 30 20'
49
- class='${te.svg}'
38
+ class='${re.svg}'
50
39
  >
51
40
  <rect x='1' y='1' width='28' height='18' rx='2' ry='2'></rect>
52
41
  <line x1='1' y1='8' x2='27' y2='8'></line>
53
42
  </svg>
54
- <span class="${te.srOnly}">Pay with</span>
55
- `);w(this,"element",document.createElement("div"));this.element.classList.add(te.card),this.element.innerHTML=this.template}render(){return this.element}}const Ri={button:"_button_13xr0_1"};class Ul{constructor(t){w(this,"element");w(this,"icon",new Fl);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(Ri.button,Ri.press),e!=null&&e.className&&this.element.classList.add(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 jl=(r,t,e)=>t.concat(r.filter(n=>t.every(a=>!e(n,a)))),Rt={conteiner:"_conteiner_1j5pe_2",venmo:"_venmo_1j5pe_8",hidden:"_hidden_1j5pe_33"},zl={display:"flex",height:40,borderRadius:12},Bl=`<svg viewBox="2.3 484.3 611.9 117.80000000000001" xmlns="http://www.w3.org/2000/svg">
43
+ <span class="${re.srOnly}">Pay with</span>
44
+ `);w(this,"element",document.createElement("div"));this.element.classList.add(re.card),this.element.innerHTML=this.template}render(){return this.element}}const Li={button:"_button_13xr0_1"};class Fc{constructor(t){w(this,"element");w(this,"icon",new Uc);this.config=t;const e=this.config.state.styles.getState().WalletButton,r=this.config.state.translate;this.element=document.createElement("button"),this.element.classList.add(Li.button,Li.press),e!=null&&e.className&&this.element.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles);const a=document.createElement("span");a.textContent=r.getState().messages.card.compact.button,this.element.append(this.icon.render(),a),r.subscribe(({messages:i})=>{a.textContent=i.card.compact.button})}addEventListener(t){return this.element.addEventListener("click",t)}render(){return this.element}}const Bc=(n,t,e)=>t.concat(n.filter(r=>t.every(a=>!e(r,a)))),Nt={conteiner:"_conteiner_1j5pe_2",venmo:"_venmo_1j5pe_8",hidden:"_hidden_1j5pe_33"},jc={display:"flex",height:40,borderRadius:12},zc=`<svg viewBox="2.3 484.3 611.9 117.80000000000001" xmlns="http://www.w3.org/2000/svg">
56
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"
57
46
  fill="currentColor"/>
58
- </svg>`;class Kl{constructor(t){w(this,"isProcessing",!1);w(this,"container");w(this,"venmoButton");w(this,"events",{ready:new he});w(this,"braintree");w(this,"error");w(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(Rt.conteiner),this.venmoButton=document.createElement("button"),this.venmoButton.classList.add(Rt.venmo,Rt.hidden),e!=null&&e.className&&this.venmoButton.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.venmoButton.style,e.styles),this.venmoButton.setAttribute("aria-label","Venmo"),this.venmoButton.innerHTML=Bl,this.error=new Te(this.config.state.translate),this.error.setMessage(""),this.error.render().style.display="none",this.container.append(this.venmoButton)}init(t){return W(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(Rt.hidden),this.container.append(this.error.render()),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,zl),this.venmoButton.addEventListener("click",()=>W(this,null,function*(){if(Te.hideAll(),!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 W(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;this.error.render().style.display="none",(n=e.onSuccess)==null||n.call(e,t)}handleVenmoError(t,e){var s,l;if(!this.isInitialized)return;const n=this.config.state.translate.messages(),a=Xe(t,n),i=Se(n)[a],o=((s=n.errors)==null?void 0:s.errorText)||"Error";this.error.setMessage(`Venmo ${o.toLowerCase()}: ${i!=null?i:a}`),this.error.render().style.display="",(l=e==null?void 0:e.onError)==null||l.call(e,t)}addEventListener(t,e){return this.events[t].addListener(e)}showExternalError(t){var i;if(!this.isInitialized)return;const e=this.config.state.translate.messages(),n=Se(e)[t],a=((i=e.errors)==null?void 0:i.errorText)||"Error";this.error.setMessage(`Venmo ${a.toLowerCase()}: ${n!=null?n:t}`),this.error.render().style.display=""}render(){return this.container}}class Hl{constructor(t){w(this,"isAppleReady",!0);w(this,"isGoogleReady",!0);w(this,"isPayPalReady",!0);w(this,"isBraintreeReady",!0);w(this,"buttons");w(this,"applePay");w(this,"googlePay");w(this,"paypal");w(this,"card");w(this,"braintree");w(this,"lastInteracted",null);w(this,"events",{ready:new he,open:new he,error:new he,cancel:new he,success:new he});this.config=t,this.buttons=document.createElement("div"),this.buttons.classList.add(_r.buttons,_r.hidden)}init(){return W(this,null,function*(){this.config.state.transaction.subscribe(()=>{this.config.service.ev.isReady&&this.initPaymentMethods().catch(console.error)}),this.config.state.checkout.subscribe(()=>{this.config.service.ev.isReady&&this.initPaymentMethods().catch(console.error)}),this.config.service.ev.addEventListener("ready",()=>{this.initPaymentMethods().catch(console.error)})})}initApple(t){return W(this,null,function*(){if(this.applePay){this.isAppleReady=!1;try{(yield this.applePay.init({onError:n=>this.events.error.emit(n),onCancel:()=>this.events.cancel.emit(),onSuccess:n=>{this.lastInteracted="apple",this.events.success.emit(J(K({},n),{type:"apple"}))}}))?t==null||t.appendChild(this.applePay.render()):t==null||t.remove()}catch(e){console.error(e),t==null||t.remove()}finally{this.isAppleReady=!0}}})}initGoogle(t){return W(this,null,function*(){if(this.googlePay){this.isGoogleReady=!1;try{(yield this.googlePay.init({onError:n=>this.events.error.emit(n),onCancel:()=>this.events.cancel.emit(),onSuccess:n=>{this.lastInteracted="google",this.events.success.emit(J(K({},n),{type:"google"}))}}))?t==null||t.appendChild(this.googlePay.render()):t==null||t.remove()}catch(e){console.error(e),t==null||t.remove()}finally{this.isGoogleReady=!0}}})}initPayPal(t){return W(this,null,function*(){if(this.paypal){this.isPayPalReady=!1;try{const e=this.paypal.render();t==null||t.appendChild(e),(yield this.paypal.init({onError:a=>this.events.error.emit(a),onCancel:()=>this.events.cancel.emit(),onSuccess:a=>{this.lastInteracted="paypal",this.events.success.emit({paypalId:a,type:"paypal"})}}))||t==null||t.remove()}catch(e){t==null||t.remove()}finally{this.isPayPalReady=!0}}})}initBraintreeVenmo(t){return W(this,null,function*(){if(this.braintree){this.isBraintreeReady=!1;try{(yield this.braintree.init({onError:n=>this.events.error.emit(n),onCancel:()=>this.events.cancel.emit(),onSuccess:n=>{this.lastInteracted="venmo",this.events.success.emit({nonce:n==null?void 0:n.nonce,type:"venmo"})}}))?t==null||t.appendChild(this.braintree.render()):t==null||t.remove()}catch(e){console.error(e),t==null||t.remove()}finally{this.isBraintreeReady=!0}}})}initCard(t){return W(this,null,function*(){this.card&&(t==null||t.appendChild(this.card.render()))})}initPaymentMethods(){return W(this,null,function*(){const t=this.config.state.transaction.getState(),e=jl(Dl,(t==null?void 0:t.checkout_config)||[],(l,c)=>l.type===c.type),n=this.config.state.checkout.getState();let a=e.filter(({is_active:l})=>l);(n==null?void 0:n.variant)==="default"&&(a=a.filter(({type:l})=>l!==re.CARD)),this.initializeButtonInstances(a),this.buttons.innerHTML="";const i=a.sort((l,c)=>l.order-c.order),o=new Map;for(const{type:l}of i){const c=document.createElement("div");this.buttons.appendChild(c),o.set(l,c)}const s=i.map(({type:l})=>{const c=o.get(l);switch(l){case re.APPLE_PAY:return this.initApple(c);case re.GOOGLE_PAY:return this.initGoogle(c);case re.PAYPAL:return this.initPayPal(c);case re.VENMO:return this.initBraintreeVenmo(c);case re.CARD:return this.initCard(c);default:throw new Error("Unknown button type")}});yield Promise.all(s),this.handleReady()})}initializeButtonInstances(t){const e=t.map(({type:n})=>n);e.includes(re.APPLE_PAY)&&!this.applePay&&(this.applePay=new Sl(this.config)),e.includes(re.GOOGLE_PAY)&&!this.googlePay&&(this.googlePay=new Ml(this.config)),e.includes(re.PAYPAL)&&!this.paypal&&(this.paypal=new Vl(this.config)),e.includes(re.VENMO)&&!this.braintree&&(this.braintree=new Kl(this.config)),e.includes(re.CARD)&&!this.card&&(this.card=new Ul(this.config),this.card.addEventListener(()=>{this.lastInteracted="card",this.events.open.emit()}))}handleReady(){this.isAppleReady&&this.isGoogleReady&&this.isPayPalReady&&this.isBraintreeReady&&this.events.ready.emit()}addEventListener(t,e){return this.events[t].addListener(e)}showButton(){this.buttons.classList.remove(_r.hidden)}render(){return this.buttons}showExternalError(t){var e,n,a,i;switch(this.lastInteracted){case"apple":(e=this.applePay)==null||e.showExternalError(t);break;case"google":(n=this.googlePay)==null||n.showExternalError(t);break;case"paypal":(a=this.paypal)==null||a.showExternalError(t);break;case"venmo":(i=this.braintree)==null||i.showExternalError(t);break}}}class ql{constructor(){w(this,"template",`
47
+ </svg>`;class Kc{constructor(t){w(this,"isProcessing",!1);w(this,"container");w(this,"venmoButton");w(this,"events",{ready:new ce,onPaymentAttempt:new ce});w(this,"braintree");w(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(Nt.conteiner),this.venmoButton=document.createElement("button"),this.venmoButton.classList.add(Nt.venmo,Nt.hidden),e!=null&&e.className&&this.venmoButton.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.venmoButton.style,e.styles),this.venmoButton.setAttribute("aria-label","Venmo"),this.venmoButton.innerHTML=zc,this.container.append(this.venmoButton)}init(t){return Y(this,null,function*(){var r;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:((r=e==null?void 0:e.brain_tree_info)==null?void 0:r.client_token)||""}),yield this.braintree.createVenmo({}),this.braintree.isBrowserSupported()?(this.displayVenmoButton(t),this.braintree.hasTokenizationResult()?(yield this.handleExistingTokenization(t),!1):(this.venmoButton.classList.remove(Nt.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,jc),this.venmoButton.addEventListener("click",()=>Y(this,null,function*(){if(this.events.onPaymentAttempt.emit(q.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 Y(this,null,function*(){try{const e=yield this.braintree.tokenize();this.handleVenmoSuccess(e,t)}catch(e){this.handleVenmoError(e,t)}})}handleVenmoSuccess(t,e){var r;(r=e.onSuccess)==null||r.call(e,t)}handleVenmoError(t,e){var r;this.isInitialized&&((r=e==null?void 0:e.onError)==null||r.call(e,t))}addEventListener(t,e){return this.events[t].addListener(e)}showExternalError(t){this.isInitialized}render(){return this.container}}class Hc{constructor(t){w(this,"isAppleReady",!0);w(this,"isGoogleReady",!0);w(this,"isPayPalReady",!0);w(this,"isBraintreeReady",!0);w(this,"attempted",new Set);w(this,"buttons");w(this,"applePay");w(this,"googlePay");w(this,"paypal");w(this,"card");w(this,"braintree");w(this,"lastInteracted",null);w(this,"events",{ready:new ce,open:new ce,error:new ce,cancel:new ce,success:new ce,onPaymentAttempt:new ce});this.config=t,this.buttons=document.createElement("div"),this.buttons.classList.add(yr.buttons,yr.hidden)}init(){return Y(this,null,function*(){this.config.state.transaction.subscribe(()=>{this.config.service.ev.isReady&&this.initPaymentMethods().catch(console.error)}),this.config.state.checkout.subscribe(()=>{this.config.service.ev.isReady&&this.initPaymentMethods().catch(console.error)}),this.config.service.ev.addEventListener("ready",()=>{this.initPaymentMethods().catch(console.error)})})}initApple(t){return Y(this,null,function*(){if(this.applePay){this.isAppleReady=!1;try{if(yield this.applePay.init({onError:r=>{this.events.error.emit(r),this.attempted.delete(q.APPLE_PAY)},onCancel:()=>{this.events.cancel.emit(),this.attempted.delete(q.APPLE_PAY)},onSuccess:r=>{this.lastInteracted="apple",this.events.success.emit(ee(K({},r),{type:"apple"})),this.attempted.delete(q.APPLE_PAY)}})){const r=this.applePay.render();t==null||t.appendChild(r);const a=()=>{this.attempted.has(q.APPLE_PAY)||(this.attempted.add(q.APPLE_PAY),this.lastInteracted="apple",this.events.onPaymentAttempt.emit(q.APPLE_PAY))};r.addEventListener("pointerdown",a,{capture:!0}),r.addEventListener("click",a,{capture:!0}),r.addEventListener("keydown",i=>{((i==null?void 0:i.key)==="Enter"||(i==null?void 0:i.key)===" ")&&a()},{capture:!0}),r.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()}finally{this.isAppleReady=!0}}})}initGoogle(t){return Y(this,null,function*(){if(this.googlePay){this.isGoogleReady=!1;try{if(yield this.googlePay.init({onError:r=>{this.events.error.emit(r),this.attempted.delete(q.GOOGLE_PAY)},onCancel:()=>{this.events.cancel.emit(),this.attempted.delete(q.GOOGLE_PAY)},onSuccess:r=>{this.lastInteracted="google",this.events.success.emit(ee(K({},r),{type:"google"})),this.attempted.delete(q.GOOGLE_PAY)}})){const r=this.googlePay.render();t==null||t.appendChild(r);const a=()=>{this.attempted.has(q.GOOGLE_PAY)||(this.attempted.add(q.GOOGLE_PAY),this.lastInteracted="google",this.events.onPaymentAttempt.emit(q.GOOGLE_PAY))};r.addEventListener("pointerdown",a,{capture:!0}),r.addEventListener("click",a,{capture:!0}),r.addEventListener("keydown",i=>{((i==null?void 0:i.key)==="Enter"||(i==null?void 0:i.key)===" ")&&a()},{capture:!0}),r.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()}finally{this.isGoogleReady=!0}}})}initPayPal(t){return Y(this,null,function*(){if(this.paypal){this.isPayPalReady=!1;try{const e=this.paypal.render();t==null||t.appendChild(e),(yield this.paypal.init({onError:a=>this.events.error.emit(a),onCancel:()=>this.events.cancel.emit(),onSuccess:a=>{this.lastInteracted="paypal",this.events.success.emit({paypalId:a,type:"paypal"})}}))||t==null||t.remove()}catch(e){t==null||t.remove()}finally{this.isPayPalReady=!0}}})}initBraintreeVenmo(t){return Y(this,null,function*(){if(this.braintree){this.isBraintreeReady=!1;try{if(yield this.braintree.init({onError:r=>this.events.error.emit(r),onCancel:()=>this.events.cancel.emit(),onSuccess:r=>{this.lastInteracted="venmo",this.events.success.emit({nonce:r==null?void 0:r.nonce,type:"venmo"})}})){const r=this.braintree.render();t==null||t.appendChild(r)}else t==null||t.remove()}catch(e){console.error(e),t==null||t.remove()}finally{this.isBraintreeReady=!0}}})}initCard(t){return Y(this,null,function*(){this.card&&(t==null||t.appendChild(this.card.render()))})}initPaymentMethods(){return Y(this,null,function*(){const t=this.config.state.transaction.getState(),e=Bc(Mc,(t==null?void 0:t.checkout_config)||[],(c,l)=>c.type===l.type),r=this.config.state.checkout.getState();let a=e.filter(({is_active:c})=>c);(r==null?void 0:r.variant)==="default"&&(a=a.filter(({type:c})=>c!==q.CARD)),this.initializeButtonInstances(a),this.buttons.innerHTML="";const i=a.sort((c,l)=>c.order-l.order),s=new Map;for(const{type:c}of i){const l=document.createElement("div");this.buttons.appendChild(l),s.set(c,l)}const o=i.map(({type:c})=>{const l=s.get(c);switch(c){case q.APPLE_PAY:return this.initApple(l);case q.GOOGLE_PAY:return this.initGoogle(l);case q.PAYPAL:return this.initPayPal(l);case q.VENMO:return this.initBraintreeVenmo(l);case q.CARD:return this.initCard(l);default:throw new Error("Unknown button type")}});yield Promise.all(o),this.handleReady()})}initializeButtonInstances(t){const e=t.map(({type:r})=>r);e.includes(q.APPLE_PAY)&&!this.applePay&&(this.applePay=new Sc(this.config),this.applePay.addEventListener("onPaymentAttempt",r=>this.events.onPaymentAttempt.emit(r))),e.includes(q.GOOGLE_PAY)&&!this.googlePay&&(this.googlePay=new Dc(this.config),this.googlePay.addEventListener("onPaymentAttempt",r=>this.events.onPaymentAttempt.emit(r))),e.includes(q.PAYPAL)&&!this.paypal&&(this.paypal=new Vc(this.config),this.paypal.addEventListener("onPaymentAttempt",r=>this.events.onPaymentAttempt.emit(r))),e.includes(q.VENMO)&&!this.braintree&&(this.braintree=new Kc(this.config),this.braintree.addEventListener("onPaymentAttempt",r=>this.events.onPaymentAttempt.emit(r))),e.includes(q.CARD)&&!this.card&&(this.card=new Fc(this.config),this.card.addEventListener(()=>{this.lastInteracted="card",this.events.open.emit()}))}handleReady(){this.isAppleReady&&this.isGoogleReady&&this.isPayPalReady&&this.isBraintreeReady&&this.events.ready.emit()}addEventListener(t,e){return this.events[t].addListener(e)}showButton(){this.buttons.classList.remove(yr.hidden)}render(){return this.buttons}showExternalError(t){var e,r,a,i;switch(this.lastInteracted){case"apple":(e=this.applePay)==null||e.showExternalError(t);break;case"google":(r=this.googlePay)==null||r.showExternalError(t);break;case"paypal":(a=this.paypal)==null||a.showExternalError(t);break;case"venmo":(i=this.braintree)==null||i.showExternalError(t);break}}}class Wc{constructor(){w(this,"template",`
59
48
  <svg
60
49
  xmlns='http://www.w3.org/2000/svg'
61
50
  width='24'
@@ -66,12 +55,23 @@ React keys must be passed directly to JSX without using spread:
66
55
  stroke-width='2'
67
56
  stroke-linecap='round'
68
57
  stroke-linejoin='round'
69
- class='${te.back}'
58
+ class='${re.back}'
70
59
  >
71
60
  <polyline points='15 18 9 12 15 6'></polyline>
72
61
  </svg>
73
- <span class="${te.srOnly}">Back</span>
74
- `);w(this,"element",document.createElement("div"));this.element.classList.add(te.backButton),this.element.innerHTML=this.template}render(){return this.element}}const Wl={button:"_button_125my_1"};class $l{constructor(){w(this,"element");w(this,"icon",new ql);this.element=document.createElement("div"),this.element.classList.add(Wl.button),this.element.appendChild(this.icon.render())}addEventListener(t){return this.element.addEventListener("click",t)}render(){return this.element}}const De={button:"_button_191iv_1",disabled:"_disabled_191iv_17",press:"_press_191iv_22",hidden:"_hidden_191iv_26",spinner:"_spinner_191iv_30"};class Yl{constructor(t,e){w(this,"element");w(this,"spinner",new ui);w(this,"message",document.createElement("span"));this.element=document.createElement("button"),this.element.classList.add(De.button,De.press),e!=null&&e.className&&this.element.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles),this.spinner.addClass(De.spinner),this.spinner.addClass(De.hidden),this.message.textContent=t.messages().card.pay.button,this.element.append(this.spinner.render(),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(De.disabled),this.spinner.removeClass(De.hidden)):(this.element.removeAttribute("disabled"),this.element.classList.remove(De.disabled),this.spinner.addClass(De.hidden))}render(){return this.element}}const xe={cardForm:"_cardForm_6gjbg_1",hidden:"_hidden_6gjbg_5",topOffset:"_topOffset_6gjbg_9"},ce={wrapper:"_wrapper_4knhb_1",inputContainer:"_inputContainer_4knhb_5",input:"_input_4knhb_5",errorInput:"_errorInput_4knhb_24",label:"_label_4knhb_28",labelError:"_labelError_4knhb_32",disabled:"_disabled_4knhb_36",disabledInput:"_disabledInput_4knhb_40",hidden:"_hidden_4knhb_47"};class Gl{constructor(t,e){w(this,"id","paynext-card-input-name");w(this,"element");w(this,"inputContainer",document.createElement("div"));w(this,"input",document.createElement("input"));w(this,"label",document.createElement("label"));w(this,"labelText",document.createElement("span"));w(this,"labelError",document.createElement("span"));w(this,"endContent",document.createElement("div"));w(this,"warning",new Nt);w(this,"placeholderStyle",document.createElement("style"));w(this,"isTouchSubmit",!1);w(this,"isRequired",!1);w(this,"isDisabled",!1);w(this,"isChanged",!1);w(this,"events",{change:new he});var a,i,o,s,l,c,d,u,h;const n=t.messages();if(this.element=document.createElement("div"),this.element.classList.add(ce.wrapper),this.inputContainer.classList.add(ce.inputContainer),(a=e==null?void 0:e.container)!=null&&a.className&&this.inputContainer.classList.add(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(ce.input),(o=e==null?void 0:e.field)!=null&&o.className&&this.input.classList.add(e.field.className),(s=e==null?void 0:e.field)!=null&&s.styles&&Object.assign(this.input.style,e.field.styles),(l=e==null?void 0:e.placeholder)!=null&&l.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(ce.hidden),this.endContent.appendChild(this.warning.render()),this.inputContainer.append(this.input,this.endContent),this.label.setAttribute("for",this.id),this.label.classList.add(ce.label),(c=e==null?void 0:e.label)!=null&&c.className&&this.label.classList.add(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(ce.labelError,ce.hidden),(u=e==null?void 0:e.error)!=null&&u.className&&this.labelError.classList.add(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:de.Empty}handleChange(t){this.isDisabled||(this.isRequired=!1,this.isChanged||(this.isChanged=!0),this.events.change.emit({value:t,isValid:this.validator(t)===null}),this.render())}toggleLabelError(t){return W(this,null,function*(){if(t){this.inputContainer.classList.add(ce.errorInput),this.endContent.classList.remove(ce.hidden),this.labelError.classList.remove(ce.hidden),yield ue(this.labelError,ve.open,ve.transition);return}this.inputContainer.classList.remove(ce.errorInput),this.endContent.classList.add(ce.hidden),yield ue(this.labelError,ve.close,ve.transition),this.labelError.classList.add(ce.hidden)})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.input.setAttribute("disabled","true"),this.input.classList.add(ce.disabledInput),this.inputContainer.classList.add(ce.disabled)):(this.input.removeAttribute("disabled"),this.input.classList.remove(ce.disabledInput),this.inputContainer.classList.remove(ce.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(ce.disabled),this.input.classList.add(ce.disabledInput)):(this.inputContainer.classList.remove(ce.disabled),this.input.classList.remove(ce.disabledInput)),this.element}}const oe={wrapper:"_wrapper_j8wuo_1",inputContainer:"_inputContainer_j8wuo_5",input:"_input_j8wuo_5",endContent:"_endContent_j8wuo_20",errorInput:"_errorInput_j8wuo_24",error:"_error_j8wuo_24",label:"_label_j8wuo_32",labelError:"_labelError_j8wuo_36",disabled:"_disabled_j8wuo_40",disabledInput:"_disabledInput_j8wuo_44",hidden:"_hidden_j8wuo_51"};class Ql{constructor(){w(this,"template",`
62
+ <span class="${re.srOnly}">Back</span>
63
+ `);w(this,"element",document.createElement("div"));this.element.classList.add(re.backButton),this.element.innerHTML=this.template}render(){return this.element}}const Yc={button:"_button_125my_1"};class Gc{constructor(){w(this,"element");w(this,"icon",new Wc);this.element=document.createElement("div"),this.element.classList.add(Yc.button),this.element.appendChild(this.icon.render())}addEventListener(t){return this.element.addEventListener("click",t)}render(){return this.element}}const Pe={button:"_button_191iv_1",disabled:"_disabled_191iv_17",press:"_press_191iv_22",hidden:"_hidden_191iv_26",spinner:"_spinner_191iv_30"};class $c{constructor(t,e){w(this,"element");w(this,"spinner",new di);w(this,"message",document.createElement("span"));this.element=document.createElement("button"),this.element.classList.add(Pe.button,Pe.press),e!=null&&e.className&&this.element.classList.add(e.className),e!=null&&e.styles&&Object.assign(this.element.style,e.styles),this.spinner.addClass(Pe.spinner),this.spinner.addClass(Pe.hidden),this.message.textContent=t.messages().card.pay.button,this.element.append(this.spinner.render(),this.message),t.subscribe(r=>{this.message.textContent=r.messages.card.pay.button})}addEventListener(t){return this.element.addEventListener("click",t)}disable(t){t?(this.element.setAttribute("disabled","true"),this.element.classList.add(Pe.disabled),this.spinner.removeClass(Pe.hidden)):(this.element.removeAttribute("disabled"),this.element.classList.remove(Pe.disabled),this.spinner.addClass(Pe.hidden))}render(){return this.element}}const Ue={cardForm:"_cardForm_6gjbg_1",hidden:"_hidden_6gjbg_5",topOffset:"_topOffset_6gjbg_9"},de={wrapper:"_wrapper_4knhb_1",inputContainer:"_inputContainer_4knhb_5",input:"_input_4knhb_5",errorInput:"_errorInput_4knhb_24",label:"_label_4knhb_28",labelError:"_labelError_4knhb_32",disabled:"_disabled_4knhb_36",disabledInput:"_disabledInput_4knhb_40",hidden:"_hidden_4knhb_47"};class Lt{constructor(){w(this,"template",`
64
+ <svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>
65
+ <g fill='none' fill-rule='evenodd' transform='matrix(1 0 0 -1 0 12)'>
66
+ <circle cx='6' cy='3.2' fill='currentColor' r='1'></circle>
67
+ <g stroke='currentColor'>
68
+ <circle cx='6' cy='6' r='5.5'></circle>
69
+ <path d='m6 9.2v-3.2' stroke-linecap='round' stroke-linejoin='round'></path>
70
+ </g>
71
+ </g>
72
+ </svg>
73
+ <span class="${re.srOnly}">Warning</span>
74
+ `);w(this,"element",document.createElement("div"));this.element.classList.add(re.warning),this.element.innerHTML=this.template}render(){return this.element}}class qc{constructor(t,e){w(this,"id","paynext-card-input-name");w(this,"element");w(this,"inputContainer",document.createElement("div"));w(this,"input",document.createElement("input"));w(this,"label",document.createElement("label"));w(this,"labelText",document.createElement("span"));w(this,"labelError",document.createElement("span"));w(this,"endContent",document.createElement("div"));w(this,"warning",new Lt);w(this,"placeholderStyle",document.createElement("style"));w(this,"isTouchSubmit",!1);w(this,"isRequired",!1);w(this,"isDisabled",!1);w(this,"isChanged",!1);w(this,"events",{change:new ce});var a,i,s,o,c,l,d,u,h;const r=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&&this.inputContainer.classList.add(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",r.card.name.placeholder),this.input.classList.add(de.input),(s=e==null?void 0:e.field)!=null&&s.className&&this.input.classList.add(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&&this.label.classList.add(e.label.className),(d=e==null?void 0:e.label)!=null&&d.styles&&Object.assign(this.label.style,e.label.styles),this.labelText.textContent=r.card.name.label,this.labelError.textContent=r.card.required,this.labelError.classList.add(de.labelError,de.hidden),(u=e==null?void 0:e.error)!=null&&u.className&&this.labelError.classList.add(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:ue.Empty}handleChange(t){this.isDisabled||(this.isRequired=!1,this.isChanged||(this.isChanged=!0),this.events.change.emit({value:t,isValid:this.validator(t)===null}),this.render())}toggleLabelError(t){return Y(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 r=(this.isTouchSubmit||this.isChanged)&&this.isRequired&&!this.isDisabled;return this.toggleLabelError(r),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_j8wuo_1",inputContainer:"_inputContainer_j8wuo_5",input:"_input_j8wuo_5",endContent:"_endContent_j8wuo_20",errorInput:"_errorInput_j8wuo_24",error:"_error_j8wuo_24",label:"_label_j8wuo_32",labelError:"_labelError_j8wuo_36",disabled:"_disabled_j8wuo_40",disabledInput:"_disabledInput_j8wuo_44",hidden:"_hidden_j8wuo_51"};class Qc{constructor(){w(this,"template",`
75
75
  <svg
76
76
  width='28'
77
77
  height='19'
@@ -79,7 +79,7 @@ React keys must be passed directly to JSX without using spread:
79
79
  fill='rgb(220 38 38)'
80
80
  role='presentation'
81
81
  viewBox='0 0 30 20'
82
- class='${te.svg}'
82
+ class='${re.svg}'
83
83
  >
84
84
  <g clip-path='url(#clip0_184_11820)'>
85
85
  <path
@@ -98,8 +98,8 @@ React keys must be passed directly to JSX without using spread:
98
98
  </clip-path>
99
99
  </defs>
100
100
  </svg>
101
- <span class="${te.srOnly}">Unknown card</span>
102
- `);w(this,"element",document.createElement("div"));this.element.classList.add(te.container),this.element.innerHTML=this.template}render(){return this.element}}class Xl{constructor(){w(this,"template",`
101
+ <span class="${re.srOnly}">Unknown card</span>
102
+ `);w(this,"element",document.createElement("div"));this.element.classList.add(re.container),this.element.innerHTML=this.template}render(){return this.element}}class Xc{constructor(){w(this,"template",`
103
103
  <svg
104
104
  xmlns='http://www.w3.org/2000/svg'
105
105
  xmlns-xlink='http://www.w3.org/1999/xlink'
@@ -107,7 +107,7 @@ React keys must be passed directly to JSX without using spread:
107
107
  height='16px'
108
108
  viewBox='0 0 24 16'
109
109
  version='1.1'
110
- class='${te.svg}'
110
+ class='${re.svg}'
111
111
  >
112
112
  <g id='319' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'>
113
113
  <g id='New-Icons' transform='translate(-320.000000, -280.000000)' fill-rule='nonzero'>
@@ -138,9 +138,9 @@ React keys must be passed directly to JSX without using spread:
138
138
  </g>
139
139
  </g>
140
140
  </svg>
141
- <span class="${te.srOnly}">Diners Club</span>
142
- `);w(this,"element",document.createElement("div"));this.element.classList.add(te.container),this.element.innerHTML=this.template}render(){return this.element}}class Zl{constructor(){w(this,"template",`
143
- <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${te.svg}'>
141
+ <span class="${re.srOnly}">Diners Club</span>
142
+ `);w(this,"element",document.createElement("div"));this.element.classList.add(re.container),this.element.innerHTML=this.template}render(){return this.element}}class Zc{constructor(){w(this,"template",`
143
+ <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${re.svg}'>
144
144
  <g fill='none'>
145
145
  <path
146
146
  d='m.20535714 16h4.51785715c1.0278125 0 2.25892857-1.1946667 2.25892857-2.1333333v-13.8666667h-4.51785715c-1.0278125 0-2.25892857 1.19466667-2.25892857 3.2z'
@@ -168,9 +168,9 @@ React keys must be passed directly to JSX without using spread:
168
168
  />
169
169
  </g>
170
170
  </svg>
171
- <span class="${te.srOnly}">JCB</span>
172
- `);w(this,"element",document.createElement("div"));this.element.classList.add(te.container),this.element.innerHTML=this.template}render(){return this.element}}class Jl{constructor(){w(this,"template",`
173
- <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${te.svg}'>
171
+ <span class="${re.srOnly}">JCB</span>
172
+ `);w(this,"element",document.createElement("div"));this.element.classList.add(re.container),this.element.innerHTML=this.template}render(){return this.element}}class Jc{constructor(){w(this,"template",`
173
+ <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${re.svg}'>
174
174
  <g fill='none' fill-rule='evenodd'>
175
175
  <rect fill='#252525' height='16' rx='2' width='24' />
176
176
  <circle cx='9' cy='8' fill='#eb001b' r='5' />
@@ -181,9 +181,9 @@ React keys must be passed directly to JSX without using spread:
181
181
  />
182
182
  </g>
183
183
  </svg>
184
- <span class="${te.srOnly}">MasterCard</span>
185
- `);w(this,"element",document.createElement("div"));this.element.classList.add(te.container),this.element.innerHTML=this.template}render(){return this.element}}class ec{constructor(){w(this,"template",`
186
- <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${te.svg}'>
184
+ <span class="${re.srOnly}">MasterCard</span>
185
+ `);w(this,"element",document.createElement("div"));this.element.classList.add(re.container),this.element.innerHTML=this.template}render(){return this.element}}class el{constructor(){w(this,"template",`
186
+ <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${re.svg}'>
187
187
  <g fill='none'>
188
188
  <path
189
189
  d='m4.54588254.00006676h5.79377466c.8087588 0 1.3117793.72566459 1.1231113 1.61890981l-2.69741608 12.74856503c-.19036262.8901361-1.00010994 1.6164225-1.80943362 1.6164225h-5.79320976c-.80762905 0-1.31177937-.7262864-1.12311135-1.6164225l2.69854581-12.74856503c.18866803-.89324522.9979917-1.61890981 1.80773904-1.61890981'
@@ -203,8 +203,8 @@ React keys must be passed directly to JSX without using spread:
203
203
  />
204
204
  </g>
205
205
  </svg>
206
- <span class="${te.srOnly}">Union Pay</span>
207
- `);w(this,"element",document.createElement("div"));this.element.classList.add(te.container),this.element.innerHTML=this.template}render(){return this.element}}class tc{constructor(){w(this,"template",`
206
+ <span class="${re.srOnly}">Union Pay</span>
207
+ `);w(this,"element",document.createElement("div"));this.element.classList.add(re.container),this.element.innerHTML=this.template}render(){return this.element}}class tl{constructor(){w(this,"template",`
208
208
  <svg
209
209
  xmlns='http://www.w3.org/2000/svg'
210
210
  xmlns-xlink='http://www.w3.org/1999/xlink'
@@ -212,7 +212,7 @@ React keys must be passed directly to JSX without using spread:
212
212
  height='16px'
213
213
  viewBox='0 0 24 16'
214
214
  version='1.1'
215
- class='${te.svg}'
215
+ class='${re.svg}'
216
216
  >
217
217
  <g id='319' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'>
218
218
  <g id='New-Icons' transform='translate(-80.000000, -280.000000)' fill-rule='nonzero'>
@@ -242,14 +242,14 @@ React keys must be passed directly to JSX without using spread:
242
242
  </g>
243
243
  </g>
244
244
  </svg>
245
- <span class="${te.srOnly}">Visa</span>
246
- `);w(this,"element",document.createElement("div"));this.element.classList.add(te.container),this.element.innerHTML=this.template}render(){return this.element}}class rc{constructor(t,e){w(this,"id","paynext-card-input-number");w(this,"initialCardTypes",kt.map(t=>t.type));w(this,"element");w(this,"inputContainer",document.createElement("div"));w(this,"input",document.createElement("input"));w(this,"label",document.createElement("label"));w(this,"labelText",document.createElement("span"));w(this,"labelError",document.createElement("span"));w(this,"endContent",document.createElement("div"));w(this,"error",document.createElement("p"));w(this,"unknownCard",new Ql);w(this,"dinerClub",new Xl);w(this,"jcb",new Zl);w(this,"masterCard",new Jl);w(this,"unionPay",new ec);w(this,"visa",new tc);w(this,"placeholderStyle",document.createElement("style"));w(this,"supportedCardTypes",this.initialCardTypes);w(this,"isTouchSubmit",!1);w(this,"errorMessage","");w(this,"isRequired",!1);w(this,"isDisabled",!1);w(this,"isChanged",!1);w(this,"events",{change:new he});var a,i,o,s,l,c,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&&this.inputContainer.classList.add(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),(o=e==null?void 0:e.field)!=null&&o.className&&this.input.classList.add(e.field.className),(s=e==null?void 0:e.field)!=null&&s.styles&&Object.assign(this.input.style,e.field.styles),(l=e==null?void 0:e.placeholder)!=null&&l.styles&&Object.keys(e.placeholder.styles).length){const p=v=>v.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),f=Object.entries(e.placeholder.styles).map(([v,y])=>`${p(v)}:${y} !important;`).join(""),m=`#${this.id}`;this.placeholderStyle.textContent=`${m}::placeholder{${f}}
245
+ <span class="${re.srOnly}">Visa</span>
246
+ `);w(this,"element",document.createElement("div"));this.element.classList.add(re.container),this.element.innerHTML=this.template}render(){return this.element}}class rl{constructor(t,e){w(this,"id","paynext-card-input-number");w(this,"initialCardTypes",At.map(t=>t.type));w(this,"element");w(this,"inputContainer",document.createElement("div"));w(this,"input",document.createElement("input"));w(this,"label",document.createElement("label"));w(this,"labelText",document.createElement("span"));w(this,"labelError",document.createElement("span"));w(this,"endContent",document.createElement("div"));w(this,"error",document.createElement("p"));w(this,"unknownCard",new Qc);w(this,"dinerClub",new Xc);w(this,"jcb",new Zc);w(this,"masterCard",new Jc);w(this,"unionPay",new el);w(this,"visa",new tl);w(this,"placeholderStyle",document.createElement("style"));w(this,"supportedCardTypes",this.initialCardTypes);w(this,"isTouchSubmit",!1);w(this,"errorMessage","");w(this,"isRequired",!1);w(this,"isDisabled",!1);w(this,"isChanged",!1);w(this,"events",{change:new ce});var a,i,s,o,c,l,d,u,h;this.translate=t;const r=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&&this.inputContainer.classList.add(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&&this.input.classList.add(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,y=>"-"+y.toLowerCase()),f=Object.entries(e.placeholder.styles).map(([v,y])=>`${p(v)}:${y} !important;`).join(""),m=`#${this.id}`;this.placeholderStyle.textContent=`${m}::placeholder{${f}}
247
247
  ${m}::-webkit-input-placeholder{${f}}
248
248
  ${m}::-moz-placeholder{${f}}
249
249
  ${m}:-ms-input-placeholder{${f}}
250
250
  ${m}::-ms-input-placeholder{${f}}
251
- `,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),(c=e==null?void 0:e.label)!=null&&c.className&&this.label.classList.add(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&&this.labelError.classList.add(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=ol(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 W(this,null,function*(){if(t){this.inputContainer.classList.add(oe.errorInput),this.labelError.classList.remove(oe.hidden),yield ue(this.labelError,ve.open,ve.transition);return}yield ue(this.labelError,ve.close,ve.transition),this.labelError.classList.add(oe.hidden)})}toggleErrorMessage(t){return W(this,null,function*(){if(t){this.inputContainer.classList.add(oe.errorInput),this.error.textContent=this.errorMessage,this.error.classList.remove(oe.hidden),yield ue(this.error,Ce.open,Ce.transition);return}yield ue(this.error,Ce.close,Ce.transition),this.error.classList.add(oe.hidden)})}getCardIcons(){return kt.filter(({type:t})=>this.supportedCardTypes.includes(t)).slice(0,3).map(({type:t})=>{switch(t){case pe.Visa:return this.visa.render();case pe.Maestro:case pe.Mastercard:return this.masterCard.render();case pe.DinersClub:return this.dinerClub.render();case pe.JCB:return this.jcb.render();case pe.UnionPay:return this.unionPay.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===de.Empty?(this.errorMessage="",this.isRequired=!0):a===de.Unsupported?(this.errorMessage=e.card.number.error.unsupported,this.isRequired=!1):(this.errorMessage=a===de.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 G={inputContainer:"_inputContainer_1xdj3_5",input:"_input_1xdj3_5",endContent:"_endContent_1xdj3_20",errorInput:"_errorInput_1xdj3_24",error:"_error_1xdj3_24",label:"_label_1xdj3_32",labelError:"_labelError_1xdj3_36",disabled:"_disabled_1xdj3_40",disabledInput:"_disabledInput_1xdj3_44",hidden:"_hidden_1xdj3_51",securityContent:"_securityContent_1xdj3_55"};class nc{constructor(){w(this,"template",`
252
- <svg class='${te.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
251
+ `,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&&this.label.classList.add(e.label.className),(d=e==null?void 0:e.label)!=null&&d.styles&&Object.assign(this.label.style,e.label.styles),this.labelText.textContent=r.card.number.label,this.labelError.textContent=r.card.required,this.labelError.classList.add(oe.labelError,oe.hidden),(u=e==null?void 0:e.error)!=null&&u.className&&this.labelError.classList.add(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=Ci(t).map(i=>i.type),r=Ei(t),a=sc(t,(r==null?void 0:r.type)||"");this.supportedCardTypes=e.length?e:this.initialCardTypes,a.replace(/\D/g,"").length===((r==null?void 0:r.maxLength)||16)&&this.validate(a),this.input.value=a,this.events.change.emit({card:a,cardType:r==null?void 0:r.type,cardTypes:e,isValid:wi(t,this.supportedCardTypes).isValid}),this.render()}toggleLabelError(t){return Y(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 Y(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,Ee.open,Ee.transition);return}yield pe(this.error,Ee.close,Ee.transition),this.error.classList.add(oe.hidden)})}getCardIcons(){return At.filter(({type:t})=>this.supportedCardTypes.includes(t)).slice(0,3).map(({type:t})=>{switch(t){case he.Visa:return this.visa.render();case he.Maestro:case he.Mastercard:return this.masterCard.render();case he.DinersClub:return this.dinerClub.render();case he.JCB:return this.jcb.render();case he.UnionPay:return this.unionPay.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=Ci(this.input.value)[0])==null?void 0:t.type)||""}}validate(t){const e=this.translate.messages(),{isValid:r,error:a}=wi(t,this.supportedCardTypes);return r?(this.isRequired=!1,this.errorMessage="",this.render(),r):(a===ue.Empty?(this.errorMessage="",this.isRequired=!0):a===ue.Unsupported?(this.errorMessage=e.card.number.error.unsupported,this.isRequired=!1):(this.errorMessage=a===ue.Incomplete?e.card.number.error.incomplete:e.card.number.error.invalid,this.isRequired=!1),this.render(),r)}render(){const t=this.isTouchSubmit||this.isChanged,e=t&&!this.isDisabled&&this.isRequired,r=t&&!this.isDisabled&&!!this.errorMessage;return this.toggleLabelError(e),this.toggleErrorMessage(r),!e&&!r?(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_1xdj3_5",input:"_input_1xdj3_5",endContent:"_endContent_1xdj3_20",errorInput:"_errorInput_1xdj3_24",error:"_error_1xdj3_24",label:"_label_1xdj3_32",labelError:"_labelError_1xdj3_36",disabled:"_disabled_1xdj3_40",disabledInput:"_disabledInput_1xdj3_44",hidden:"_hidden_1xdj3_51",securityContent:"_securityContent_1xdj3_55"};class nl{constructor(){w(this,"template",`
252
+ <svg class='${re.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
253
253
  <title>CVC</title>
254
254
  <g fill='none' fill-rule='evenodd'>
255
255
  <g fill='#565656'>
@@ -266,15 +266,15 @@ ${m}::-ms-input-placeholder{${f}}
266
266
  </g>
267
267
  </g>
268
268
  </svg>
269
- <span class="${te.srOnly}">Card CVC</span>
270
- `);w(this,"element",document.createElement("div"));this.element.classList.add(te.container),this.element.innerHTML=this.template}render(){return this.element}}class ic{constructor(t,e){w(this,"cvcId","paynext-card-input-cvc");w(this,"expiryId","paynext-card-input-expiry");w(this,"element");w(this,"expiryWarning",new Nt);w(this,"cvcWarning",new Nt);w(this,"cardCvc",new nc);w(this,"expiryInputContainer",document.createElement("div"));w(this,"expiryInput",document.createElement("input"));w(this,"expiryLabel",document.createElement("label"));w(this,"expiryLabelText",document.createElement("span"));w(this,"expiryLabelError",document.createElement("span"));w(this,"expiryEndContent",document.createElement("div"));w(this,"expiryError",document.createElement("p"));w(this,"cvcInputContainer",document.createElement("div"));w(this,"cvcInput",document.createElement("input"));w(this,"cvcLabel",document.createElement("label"));w(this,"cvcLabelText",document.createElement("span"));w(this,"cvcLabelError",document.createElement("span"));w(this,"cvcEndContent",document.createElement("div"));w(this,"cvcError",document.createElement("p"));w(this,"placeholderStyle",document.createElement("style"));w(this,"cardType",null);w(this,"isTouchSubmit",!1);w(this,"isDisabled",!1);w(this,"expiryErrorMessage","");w(this,"isExpiryRequired",!1);w(this,"isExpiryChanged",!1);w(this,"cvcErrorMessage","");w(this,"isCvcRequired",!1);w(this,"isCvcChanged",!1);w(this,"events",{expiryChange:new he,cvcChange:new he});var o,s,l,c,d,u,h,p,f,m,v,y,A,x,N,I,P;this.translate=t;const n=t.messages();this.element=document.createElement("div"),this.element.classList.add(G.securityContent),this.expiryInputContainer.classList.add(G.inputContainer),(o=e==null?void 0:e.container)!=null&&o.className&&this.expiryInputContainer.classList.add(e.container.className),(s=e==null?void 0:e.container)!=null&&s.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(G.input),(l=e==null?void 0:e.field)!=null&&l.className&&this.expiryInput.classList.add(e.field.className),(c=e==null?void 0:e.field)!=null&&c.styles&&Object.assign(this.expiryInput.style,e.field.styles),this.expiryEndContent.classList.add(G.endContent),this.expiryEndContent.appendChild(this.expiryWarning.render()),this.expiryInputContainer.append(this.expiryInput,this.expiryEndContent),this.expiryLabel.setAttribute("for",this.expiryId),this.expiryLabel.classList.add(G.label),(d=e==null?void 0:e.label)!=null&&d.className&&this.expiryLabel.classList.add(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(G.labelError,G.hidden),this.expiryLabel.append(this.expiryLabelText,this.expiryLabelError),this.expiryError.classList.add(G.error,G.hidden),(h=e==null?void 0:e.error)!=null&&h.className&&this.expiryError.classList.add(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(G.inputContainer),(f=e==null?void 0:e.container)!=null&&f.className&&this.cvcInputContainer.classList.add(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(G.input),(v=e==null?void 0:e.field)!=null&&v.className&&this.cvcInput.classList.add(e.field.className),(y=e==null?void 0:e.field)!=null&&y.styles&&Object.assign(this.cvcInput.style,e.field.styles),(A=e==null?void 0:e.placeholder)!=null&&A.styles&&Object.keys(e.placeholder.styles).length){const k=U=>U.replace(/[A-Z]/g,q=>"-"+q.toLowerCase()),S=Object.entries(e.placeholder.styles).map(([U,q])=>`${k(U)}:${q};`).join("");this.placeholderStyle.textContent=`#${this.expiryId}::placeholder{${S}}#${this.cvcId}::placeholder{${S}}`,this.element.appendChild(this.placeholderStyle)}this.cvcEndContent.classList.add(G.endContent),this.cvcEndContent.appendChild(this.cardCvc.render()),this.cvcInputContainer.append(this.cvcInput,this.cvcEndContent),this.cvcLabel.setAttribute("for",this.cvcId),this.cvcLabel.classList.add(G.label),(x=e==null?void 0:e.label)!=null&&x.className&&this.cvcLabel.classList.add(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(G.labelError,G.hidden),(I=e==null?void 0:e.error)!=null&&I.className&&this.cvcLabel.classList.add(e.error.className),(P=e==null?void 0:e.error)!=null&&P.styles&&Object.assign(this.cvcLabelError.style,e.error.styles),this.cvcLabel.append(this.cvcLabelText,this.cvcLabelError),this.cvcError.classList.add(G.error,G.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",k=>{k.preventDefault();const U=this.expiryInput.value.replace(/\D/g,"");this.handleExpiryChange(U)}),this.expiryInput.addEventListener("paste",k=>{var q;k.preventDefault();const U=(((q=k.clipboardData)==null?void 0:q.getData("text"))||"").replace(/\D/g,"");this.handleExpiryChange(U)}),this.expiryInput.addEventListener("keydown",k=>{this.isDisabled||["Backspace","Delete","Tab","ArrowLeft","ArrowRight","Home","End"].includes(k.key)||k.ctrlKey||k.metaKey||/^\d$/.test(k.key)||k.preventDefault()}),this.expiryInput.addEventListener("blur",()=>this.validateExpiry(this.expiryInput.value)),this.cvcInput.addEventListener("input",k=>{k.preventDefault();const U=this.cvcInput.value.replace(/\D/g,"");this.handleCvcChange(U)}),this.cvcInput.addEventListener("paste",k=>{var q;k.preventDefault();const U=(((q=k.clipboardData)==null?void 0:q.getData("text"))||"").replace(/\D/g,"");this.handleCvcChange(U)}),this.cvcInput.addEventListener("keydown",k=>{this.isDisabled||["Backspace","Delete","Tab","ArrowLeft","ArrowRight","Home","End"].includes(k.key)||k.ctrlKey||k.metaKey||/^\d$/.test(k.key)||k.preventDefault()}),this.cvcInput.addEventListener("blur",()=>this.validateCvc(this.cvcInput.value)),this.translate.subscribe(({messages:k})=>{this.cvcInput.setAttribute("placeholder",k.card.cvc.placeholder),this.expiryInput.setAttribute("placeholder",k.card.expiry.placeholder),this.expiryLabelText.textContent=k.card.expiry.label,this.cvcLabelText.textContent=k.card.cvc.label,this.expiryLabelError.textContent=k.card.required,this.cvcLabelError.textContent=k.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?de.Empty:de.Incomplete}validateCvc(t){const e=this.translate.messages(),n=this.cvcValidator(t);if(n){if(n===de.Empty)this.cvcErrorMessage="",this.isCvcRequired=!0;else{const a=n===de.Incomplete?e.card.cvc.error.incomplete:e.card.cvc.error.invalid;this.cvcErrorMessage=a,this.isCvcRequired=!1}return this.render(),!n}return 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=ll(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 W(this,null,function*(){if(t){this.cvcInputContainer.classList.add(G.errorInput),this.cvcLabelError.classList.remove(G.hidden),yield ue(this.cvcLabelError,ve.open,ve.transition);return}yield ue(this.cvcLabelError,ve.close,ve.transition),this.cvcLabelError.classList.add(G.hidden)})}toggleCvcErrorMessage(t){return W(this,null,function*(){if(t){this.cvcInputContainer.classList.add(G.errorInput),this.cvcError.textContent=this.cvcErrorMessage,this.cvcError.classList.remove(G.hidden),yield ue(this.cvcError,Ce.open,Ce.transition);return}yield ue(this.cvcError,Ce.close,Ce.transition),this.cvcError.classList.add(G.hidden)})}expiryValidator(t){const e=!t,n=t.length<7,a=new Date,[i,o]=t.split(" / ");a.setFullYear(2e3+parseInt(o),parseInt(i)-1,31);const s=a.getTime()<Date.now();return!e&&!n&&!s?null:e?de.Empty:n?de.Incomplete:a.getFullYear()===new Date().getFullYear()?"dateExpired":"expired"}validateExpiry(t){const e=this.translate.messages(),n=this.expiryValidator(t);if(n){if(n===de.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}","date"):n===de.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=cl(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 W(this,null,function*(){if(t){this.expiryInputContainer.classList.add(G.errorInput),this.expiryLabelError.classList.remove(G.hidden),yield ue(this.expiryLabelError,ve.open,ve.transition);return}yield ue(this.expiryLabelError,ve.close,ve.transition),this.expiryLabelError.classList.add(G.hidden)})}toggleExpiryErrorMessage(t){return W(this,null,function*(){if(t){this.expiryInputContainer.classList.add(G.errorInput),this.expiryError.textContent=this.expiryErrorMessage,this.expiryError.classList.remove(G.hidden),yield ue(this.expiryError,Ce.open,Ce.transition);return}yield ue(this.expiryError,Ce.close,Ce.transition),this.expiryError.classList.add(G.hidden)})}addEventListener(t,e){return this.events[t].addListener(e)}disable(t){t?(this.expiryInput.setAttribute("disabled","true"),this.expiryInput.classList.add(G.disabledInput),this.expiryInputContainer.classList.add(G.disabled),this.cvcInput.setAttribute("disabled","true"),this.cvcInput.classList.add(G.disabledInput),this.cvcInputContainer.classList.add(G.disabled)):(this.expiryInput.removeAttribute("disabled"),this.expiryInput.classList.remove(G.disabledInput),this.expiryInputContainer.classList.remove(G.disabled),this.cvcInput.removeAttribute("disabled"),this.cvcInput.classList.remove(G.disabledInput),this.cvcInputContainer.classList.remove(G.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(G.errorInput),this.expiryEndContent.classList.add(G.hidden)):this.expiryEndContent.classList.remove(G.hidden);const a=this.isTouchSubmit||this.isCvcChanged,i=a&&!this.isDisabled&&this.isCvcRequired,o=a&&!this.isDisabled&&!!this.cvcErrorMessage;return this.toggleCvcLabelError(i),this.toggleCvcErrorMessage(o),!i&&!o?(this.cvcInputContainer.classList.remove(G.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(G.disabled),this.expiryInput.classList.add(G.disabledInput),this.cvcInputContainer.classList.add(G.disabled),this.cvcInput.classList.add(G.disabledInput)):(this.expiryInputContainer.classList.remove(G.disabled),this.expiryInput.classList.remove(G.disabledInput),this.cvcInputContainer.classList.remove(G.disabled),this.cvcInput.classList.remove(G.disabledInput)),this.element}}class ac{constructor({translate:t,className:e,stylesState:n,isDefaultVariant:a}){w(this,"element");w(this,"error");w(this,"submit");w(this,"back");w(this,"number");w(this,"name");w(this,"cardSecurity");w(this,"translate");w(this,"isBackVisible",!0);w(this,"events",{submit:new he,close:new he});const i=n.getState();this.translate=t,this.element=document.createElement("form"),this.error=new Te(t),this.submit=new Yl(t,i.SubmitButton),this.back=new $l,this.number=new rc(t,i.Input),this.name=new Gl(t,i.Input),this.cardSecurity=new ic(t,i.Input),this.error.addClassName(xe.hidden),this.element.classList.add(xe.cardForm,e||"");const o=this.back.render();a&&(this.isBackVisible=!1,o.classList.add(xe.hidden),this.element.classList.add(xe.topOffset)),this.element.append(o,this.number.render(),this.cardSecurity.render(),this.name.render(),this.error.render(),this.submit.render()),this.back.addEventListener(()=>this.events.close.emit()),this.number.addEventListener("change",({cardType:s})=>this.cardSecurity.updateCardType(s||null)),this.submit.addEventListener(s=>{s.preventDefault();const{cvc:l,expiry:c}=this.cardSecurity.value(),{value:d,cardType:u}=this.number.value();this.touchSubmit(),this.validate()&&this.events.submit.emit({number:d,expiry:c,cvc:l,name:this.name.value(),cardBrand:u})})}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}showError(t){if(t){const e=Se(this.translate.messages());this.error.setMessage(e[t]||t)}this.error.show(),this.error.removeClassName(xe.hidden)}hideError(){this.error.hide(),this.error.addClassName(xe.hidden)}setDefaultVariant(t){const e=this.back.render();if(t&&this.isBackVisible){e.classList.add(xe.hidden),this.element.classList.add(xe.topOffset),this.isBackVisible=!1;return}!t&&!this.isBackVisible&&(e.classList.remove(xe.hidden),this.element.classList.remove(xe.topOffset),this.isBackVisible=!0)}render(){return this.element}}class sc{constructor(){w(this,"template",`
269
+ <span class="${re.srOnly}">Card CVC</span>
270
+ `);w(this,"element",document.createElement("div"));this.element.classList.add(re.container),this.element.innerHTML=this.template}render(){return this.element}}class il{constructor(t,e){w(this,"cvcId","paynext-card-input-cvc");w(this,"expiryId","paynext-card-input-expiry");w(this,"element");w(this,"expiryWarning",new Lt);w(this,"cvcWarning",new Lt);w(this,"cardCvc",new nl);w(this,"expiryInputContainer",document.createElement("div"));w(this,"expiryInput",document.createElement("input"));w(this,"expiryLabel",document.createElement("label"));w(this,"expiryLabelText",document.createElement("span"));w(this,"expiryLabelError",document.createElement("span"));w(this,"expiryEndContent",document.createElement("div"));w(this,"expiryError",document.createElement("p"));w(this,"cvcInputContainer",document.createElement("div"));w(this,"cvcInput",document.createElement("input"));w(this,"cvcLabel",document.createElement("label"));w(this,"cvcLabelText",document.createElement("span"));w(this,"cvcLabelError",document.createElement("span"));w(this,"cvcEndContent",document.createElement("div"));w(this,"cvcError",document.createElement("p"));w(this,"placeholderStyle",document.createElement("style"));w(this,"cardType",null);w(this,"isTouchSubmit",!1);w(this,"isDisabled",!1);w(this,"expiryErrorMessage","");w(this,"isExpiryRequired",!1);w(this,"isExpiryChanged",!1);w(this,"cvcErrorMessage","");w(this,"isCvcRequired",!1);w(this,"isCvcChanged",!1);w(this,"events",{expiryChange:new ce,cvcChange:new ce});var s,o,c,l,d,u,h,p,f,m,v,y,A,x,N,I,P;this.translate=t;const r=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&&this.expiryInputContainer.classList.add(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",r.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&&this.expiryInput.classList.add(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&&this.expiryLabel.classList.add(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=r.card.expiry.label,this.expiryLabelError.textContent=r.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&&this.expiryError.classList.add(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&&this.cvcInputContainer.classList.add(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",r.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&&this.cvcInput.classList.add(e.field.className),(y=e==null?void 0:e.field)!=null&&y.styles&&Object.assign(this.cvcInput.style,e.field.styles),(A=e==null?void 0:e.placeholder)!=null&&A.styles&&Object.keys(e.placeholder.styles).length){const O=F=>F.replace(/[A-Z]/g,W=>"-"+W.toLowerCase()),S=Object.entries(e.placeholder.styles).map(([F,W])=>`${O(F)}:${W};`).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&&this.cvcLabel.classList.add(e.label.className),(N=e==null?void 0:e.label)!=null&&N.styles&&Object.assign(this.cvcLabel.style,e.label.styles),this.cvcLabelText.textContent=r.card.cvc.label,this.cvcLabelError.textContent=r.card.required,this.cvcLabelError.classList.add(Q.labelError,Q.hidden),(I=e==null?void 0:e.error)!=null&&I.className&&this.cvcLabel.classList.add(e.error.className),(P=e==null?void 0:e.error)!=null&&P.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 F=this.expiryInput.value.replace(/\D/g,"");this.handleExpiryChange(F)}),this.expiryInput.addEventListener("paste",O=>{var W;O.preventDefault();const F=(((W=O.clipboardData)==null?void 0:W.getData("text"))||"").replace(/\D/g,"");this.handleExpiryChange(F)}),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 F=this.cvcInput.value.replace(/\D/g,"");this.handleCvcChange(F)}),this.cvcInput.addEventListener("paste",O=>{var W;O.preventDefault();const F=(((W=O.clipboardData)==null?void 0:W.getData("text"))||"").replace(/\D/g,"");this.handleCvcChange(F)}),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=Ge.getTypeInfo(this.cardType||""),r=!t,a=t.length<((e==null?void 0:e.code.size)||3);return!r&&!a?null:r?ue.Empty:ue.Incomplete}validateCvc(t){const e=this.translate.messages(),r=this.cvcValidator(t);if(r){if(r===ue.Empty)this.cvcErrorMessage="",this.isCvcRequired=!0;else{const a=r===ue.Incomplete?e.card.cvc.error.incomplete:e.card.cvc.error.invalid;this.cvcErrorMessage=a,this.isCvcRequired=!1}return this.render(),!r}return this.isCvcRequired=!1,this.cvcErrorMessage="",this.render(),!r}handleCvcChange(t){if(this.isDisabled)return;this.isCvcRequired=!1,this.cvcErrorMessage="",this.isCvcChanged||(this.isCvcChanged=!0);const e=oc(t,this.cardType||""),r=Ge.getTypeInfo(this.cardType||"");e.length===(r==null?void 0:r.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 Y(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 Y(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,Ee.open,Ee.transition);return}yield pe(this.cvcError,Ee.close,Ee.transition),this.cvcError.classList.add(Q.hidden)})}expiryValidator(t){const e=!t,r=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();return!e&&!r&&!o?null:e?ue.Empty:r?ue.Incomplete:a.getFullYear()===new Date().getFullYear()?"dateExpired":"expired"}validateExpiry(t){const e=this.translate.messages(),r=this.expiryValidator(t);if(r){if(r===ue.Empty)this.expiryErrorMessage="",this.isExpiryRequired=!0;else{let a=e.card.expiry.error.invalid;r==="expired"?a=e.card.expiry.error.expired.replace("{date}","year"):r==="dateExpired"?a=e.card.expiry.error.expired.replace("{date}","date"):r===ue.Incomplete&&(a=e.card.expiry.error.incomplete),this.isExpiryRequired=!1,this.expiryErrorMessage=a}return this.render(),!r}return this.isExpiryRequired=!1,this.expiryErrorMessage="",this.render(),!r}handleExpiryChange(t){if(this.isDisabled)return;this.isExpiryRequired=!1,this.expiryErrorMessage="",this.isExpiryChanged||(this.isExpiryChanged=!0);const e=cc(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 Y(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 Y(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,Ee.open,Ee.transition);return}yield pe(this.expiryError,Ee.close,Ee.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 r=this.validateExpiry(t),a=this.validateCvc(e);return r&&a}updateCardType(t){this.cardType=t,this.handleCvcChange(this.cvcInput.value)}render(){const t=this.isTouchSubmit||this.isExpiryChanged,e=t&&!this.isDisabled&&this.isExpiryRequired,r=t&&!this.isDisabled&&!!this.expiryErrorMessage;this.toggleExpiryLabelError(e),this.toggleExpiryErrorMessage(r),!e&&!r?(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 al{constructor({translate:t,className:e,stylesState:r,isDefaultVariant:a}){w(this,"element");w(this,"submit");w(this,"back");w(this,"number");w(this,"name");w(this,"cardSecurity");w(this,"isBackVisible",!0);w(this,"events",{submit:new ce,close:new ce,onPaymentAttempt:new ce});const i=r.getState();this.element=document.createElement("form"),this.submit=new $c(t,i.SubmitButton),this.back=new Gc,this.number=new rl(t,i.Input),this.name=new qc(t,i.Input),this.cardSecurity=new il(t,i.Input),this.element.classList.add(Ue.cardForm,e||"");const s=this.back.render();a&&(this.isBackVisible=!1,s.classList.add(Ue.hidden),this.element.classList.add(Ue.topOffset)),this.element.append(s,this.number.render(),this.cardSecurity.render(),this.name.render(),this.submit.render()),this.back.addEventListener(()=>this.events.close.emit()),this.number.addEventListener("change",({cardType:o})=>this.cardSecurity.updateCardType(o||null)),this.submit.addEventListener(o=>{o.preventDefault(),this.events.onPaymentAttempt.emit(q.CARD);const{cvc:c,expiry:l}=this.cardSecurity.value(),{value:d,cardType:u}=this.number.value();this.touchSubmit(),this.validate()&&this.events.submit.emit({number:d,expiry:l,cvc:c,name:this.name.value(),cardBrand:u})})}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()),r=this.cardSecurity.validate(this.cardSecurity.value());return t&&e&&r}setDefaultVariant(t){const e=this.back.render();if(t&&this.isBackVisible){e.classList.add(Ue.hidden),this.element.classList.add(Ue.topOffset),this.isBackVisible=!1;return}!t&&!this.isBackVisible&&(e.classList.remove(Ue.hidden),this.element.classList.remove(Ue.topOffset),this.isBackVisible=!0)}render(){return this.element}}class sl{constructor(){w(this,"template",`
271
271
  <svg
272
272
  fill='none'
273
273
  height='24'
274
274
  viewBox='0 0 24 24'
275
275
  width='24'
276
276
  xmlns='http://www.w3.org/2000/svg'
277
- class=${te.success}
277
+ class=${re.success}
278
278
  >
279
279
  <path d='
280
280
  M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2Z
@@ -283,8 +283,8 @@ ${m}::-ms-input-placeholder{${f}}
283
283
  C16.01 8.35 16.49 8.35 16.78 8.64C17.07 8.93 17.07 9.4 16.78 9.7Z
284
284
  '></path>
285
285
  </svg>
286
- <span class="${te.srOnly}">Success</span>
287
- `);w(this,"element",document.createElement("div"));this.element.classList.add(te.successContainer),this.element.innerHTML=this.template}render(){return this.element}}const Li={container:"_container_79xkl_1",title:"_title_79xkl_5"};class oc{constructor(t){w(this,"element");w(this,"message",document.createElement("p"));w(this,"icon",new sc);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(Li.container),this.message.classList.add(Li.title),this.message.textContent=t.messages().status.success,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:e})=>{this.message.textContent=e.status.success})}addClassName(t){this.element.classList.add(t)}removeClassName(t){this.element.classList.remove(t)}render(){return this.element}}class lc{constructor(t){w(this,"isLoading",!1);w(this,"isFormOpen",!1);w(this,"closedHeight",0);w(this,"checkout");w(this,"container",document.createElement("div"));w(this,"loader",new el);w(this,"success");w(this,"buttons");w(this,"form");this.config=t,this.buttons=new Hl(t),this.form=new ac({translate:t.state.translate,className:ye.hidden,stylesState:t.state.styles,isDefaultVariant:t.state.checkout.getState().variant==="default"}),this.success=new oc(t.state.translate),this.success.addClassName(ye.hidden),this.container.append(this.loader.render(),this.buttons.render(),this.form.render()),this.checkout=document.createElement("div"),this.checkout.classList.add(ye.checkout),this.checkout.append(this.container,this.success.render())}init(){return W(this,null,function*(){this.buttons.addEventListener("ready",()=>W(this,null,function*(){var e;this.loader.setClassName(ye.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<292&&(this.checkout.style.height=`${n}px`),this.form.element.classList.remove(ye.hidden),n<292&&(yield(e=this.checkout.animate({height:[`${n}px`,"292px"]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?e:Promise.resolve(),this.checkout.style.height=""),this.isFormOpen=!0}})),this.buttons.addEventListener("open",()=>W(this,null,function*(){var a;if(this.isLoading)return;this.hideError();const t=this.checkout.getBoundingClientRect().height;this.closedHeight=t,t<292&&(this.checkout.style.height=`${t}px`),yield ue(this.buttons.buttons,Pt.close,Pt.transition),this.buttons.buttons.classList.add(ye.hidden),this.form.element.classList.add(ye.formInitial),this.form.element.classList.remove(ye.hidden);const e=t;let n=null;e<292&&(this.checkout.style.height=`${e}px`,n=(a=this.checkout.animate({height:[`${e}px`,"292px"]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?a:Promise.resolve()),yield Promise.all([ue(this.form.element,Ze.open,Ze.transition),n!=null?n:Promise.resolve()]),e<292&&(this.checkout.style.height=""),this.isFormOpen=!0})),this.buttons.addEventListener("error",t=>{const{onCheckoutFail:e}=this.config.state.checkout.getState(),n=this.config.state.translate.messages(),a=Xe(t,n);this.buttons.showExternalError(a),e==null||e({advice_code:"try_again_later",decline_code:fe.GENERIC_DECLINE,message:t.message||t})}),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",()=>W(this,null,function*(){var i;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({height:[`${t}px`,`${this.closedHeight}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?i:Promise.resolve()),yield ue(this.form.element,Ze.close,Ze.transition),this.form.element.classList.add(ye.hidden);const{variant:a}=this.config.state.checkout.getState();if(a!=="default"){this.buttons.buttons.classList.add(ye.btnsInitial),this.buttons.buttons.classList.remove(ye.hidden);const o=ue(this.buttons.buttons,Pt.open,Pt.transition);yield Promise.all([o,e!=null?e:Promise.resolve()])}this.closedHeight>0&&(this.checkout.style.height=""),this.isFormOpen=!1})),this.form.addEventListener("submit",t=>W(this,null,function*(){if(this.isLoading||(this.form.touchSubmit(),!this.form.validate()))return;const n=t.number.replace(/\D/g,""),a=this.config.state.checkout.getState(),i=this.config.service.ev.getEv(),[o,s]=yield Promise.all([i.encrypt(n),i.encrypt(t.cvc)]),[l,c]=t.expiry.split("/");yield this.handleSuccess({clientSession:a.clientToken,card:{firstSixDigits:n.slice(0,6),lastFourDigits:n.slice(-4),expMonth:Number(l),expYear:Number(c),cardBrand:t.cardBrand||"",number:o,cvc:s,type:re.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();console.error("Error: ",t);const n=this.config.state.translate.messages(),a=Xe(t,n);this.buttons.showExternalError(a),this.showError(a),(i=e.onCheckoutFail)==null||i.call(e,t),this.setLoading(!1)}handleSuccess(t){return W(this,null,function*(){var a,i;if(this.isLoading)return;this.hideError(),this.setLoading(!0);const e=this.config.state.checkout.getState(),n=this.config.state.translate.messages();try{const o=yield El(t,e.environment,e.apiVersion);if(o.error)throw new Error(((a=o.error)==null?void 0:a.message)||n.status.error);if(o.three_ds_session_id){yield this.config.service.ev.initThreeDs({threeDsId:o.three_ds_session_id,onSuccess:()=>{this.setLoading(!1),this.handleSuccess(J(K({},t),{threeDsSessionId:o.three_ds_session_id}))},onError:()=>{this.handleError({advice_code:"try_again_later",decline_code:fe.GENERIC_DECLINE,message:"Three DS Error"})}});return}if(o.payment_status===Ar.FAILED||o.payment_status===Ar.DECLINED){this.handleError(o.status_reason.status_reason);return}yield this.showSuccess(),(i=e.onCheckoutComplete)==null||i.call(e,o),this.setLoading(!1)}catch(o){this.handleError({advice_code:"try_again_later",decline_code:fe.GENERIC_DECLINE,message:o.message||o})}})}showSuccess(){return W(this,null,function*(){this.container.classList.add(ye.hidden),this.success.removeClassName(ye.hidden),yield ue(this.success.element,Ze.open,Ze.transition)})}hideError(){this.form.hideError()}showError(t){this.isFormOpen&&this.form.showError(t)}setLoading(t){this.isLoading=t,this.form.setLoading(t),this.loader.setClassName(!t||this.isFormOpen?ye.hidden:"")}render(){return this.checkout}}class cc{constructor(t){w(this,"component");this.config=t}init(){return W(this,null,function*(){const{checkout:t,transaction:e,translate:n,styles:a}=this.config.state,{apiVersion:i}=t.getState();t.subscribe(({clientToken:o,environment:s,locale:l,translate:c,styles:d})=>{l&&n.locale()!==l&&n.setLocale(l),c&&n.overrides()!==c&&n.setMessages(c),d&&a.setState(d),e.updateTransaction(o,s,i).then(u=>{var h,p;if(u)return this.config.service.ev.initEv({teamId:(h=u.evervault)==null?void 0:h.team_id,appId:(p=u.evervault)==null?void 0:p.app_id})}).catch(console.error)})})}mount(){return W(this,null,function*(){return this.component||(this.component=new lc(this.config)),yield this.init(),yield this.component.init(),this.component.render()})}}class Lt{constructor(t){w(this,"initialState");w(this,"state");w(this,"observer",new he);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 dc={clientToken:"",environment:"sandbox",apiVersion:"1.0.0",variant:"default"};class uc extends Lt{constructor(t){super(K(K({},dc),t))}}const pc={};class hc extends Lt{constructor(t){super(K(K({},pc),t))}}class fc extends Lt{constructor(e){super(e||null);w(this,"clientToken","")}updateTransaction(e,n,a){return W(this,null,function*(){if(this.clientToken===e)return this.getState();this.clientToken=e;const i=yield wl(e,n,a);return this.setState(i),i})}}const mc={card:{required:"يتطلب",number:{label:"رقم البطاقة",error:{invalid:"رقم البطاقة غير صالح",incomplete:"رقم البطاقة غير كامل",unsupported:"نوع البطاقة غير المدعوم"}},expiry:{label:"تاريخ الانتهاء",placeholder:"سنة / شهر",error:{invalid:"تاريخ انتهاء صلاحية البطاقة غير صالح",incomplete:"تاريخ انتهاء الصلاحية الخاص ببطاقتك غير كامل",expired:"تاريخ انتهاء صلاحية بطاقتك في الماضي"}},cvc:{label:"رمز الأمان",placeholder:"CVC",error:{incomplete:"رمز الأمان الخاص ببطاقتك غير كامل",invalid:"رمز التحقق من البطاقة (CVC) الخاص ببطاقتك غير صالح"}},name:{label:"اسم حامل البطاقة",placeholder:"الاسم الكامل على البطاقة",error:{invalid:"يرجى إدخال اسمك الكامل"}},pay:{button:"الراتب"},compact:{button:"البطاقة"}},status:{success:"تمت عملية الدفع الخاصة بك بنجاح!",error:"لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."},errors:{doNotHonor:"رفض بدون سبب",insufficientFunds:"رصيد غير كافٍ",limitExceeded:"تجاوز الحد",expiredCard:"انتهت صلاحية البطاقة",invalidCreditCardNumber:"رقم البطاقة غير صالح",processorDeclinedFraudSuspected:"رفض المعالج – اشتباه احتيال",cardholderAuthenticationRequired:"مطلوب مصادقة حامل البطاقة",offlineIssuerDeclined:"رفض المُصدِر أثناء عدم الاتصال",cardReportedAsLostOrStolen:"أُبلغ عن البطاقة كمفقودة أو مسروقة",invalidSecurePaymentData:"بيانات دفع آمنة غير صالحة",declined:"تم رفض بطاقتك. يُرجى تجربة بطاقة أخرى.",errorText:"خطأ",venmoClosed:"تم إغلاق النافذة قبل اكتمال عملية الترميز.",paypalClosed:"النافذة مغلقة، لا يمكن تحديد النوع",paypalPopupClosed:"تم اكتشاف إغلاق النافذة المنبثقة",applePayClosed:"تم الإلغاء"}},vc={card:{required:"ЗАДЪЛЖИТЕЛНО",number:{label:"Информация за картата",error:{invalid:"Номерът на Вашата карта е неправилен",incomplete:"Номерът на Вашата карта е непълен",unsupported:"Неподдържан тип карта"}},expiry:{label:"Дата на валидност",placeholder:"ММ / ГГ",error:{incomplete:"Датата на валидност на вашата карта е непълна",invalid:"Датата на валидност на вашата карта е невалидна",expired:"Датата на валидност на вашата карта е в миналото"}},cvc:{label:"Код за сигурност",placeholder:"CVC",error:{incomplete:"Кодът за сигурност на вашата карта е непълен",invalid:"Кодът за сигурност на вашата карта е невалиден"}},name:{label:"Име на картодържателя",placeholder:"Пълно име върху картата",error:{invalid:"Моля, въведете трите си имена"}},pay:{button:"Платете"},compact:{button:"Карта"}},status:{success:"Успех",error:"Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."},errors:{doNotHonor:"Отказ без основание",insufficientFunds:"Недостатъчни средства",limitExceeded:"Надвишен лимит",expiredCard:"Изтекла карта",invalidCreditCardNumber:"Невалиден номер на карта",processorDeclinedFraudSuspected:"Отказано от процесора – съмнение за измама",cardholderAuthenticationRequired:"Изисква се удостоверяване на картодържателя",offlineIssuerDeclined:"Издателят офлайн отказа",cardReportedAsLostOrStolen:"Картата е докладвана като изгубена или открадната",invalidSecurePaymentData:"Невалидни данни за защитено плащане",declined:"Вашата карта беше отказана. Моля, опитайте с друга карта.",errorText:"Грешка",venmoClosed:"Прозорецът беше затворен преди да се извърши токенизация.",paypalClosed:"Прозорецът е затворен, типът не може да бъде определен",paypalPopupClosed:"Засечено затваряне на изскачащ прозорец",applePayClosed:"Отменено"}},gc={card:{required:"POVINNÝ ÚDAJ",number:{label:"Číslo karty",error:{invalid:"Číslo Vaší karty je neplatné",incomplete:"Číslo vaší karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Datum konce platnosti",placeholder:"MM / RR",error:{incomplete:"Datum konce platnosti vaší karty je neúplné",invalid:"Datum konce platnosti karty je neplatné",expired:"Platnost vaší karty vypršela"}},cvc:{label:"Bezpečnostní kód",placeholder:"CVC",error:{incomplete:"Bezpečnostní kód vaší karty je neúplný",invalid:"CVC vaší karty je neplatné"}},name:{label:"Jméno držitele karty",placeholder:"Celé jméno",error:{invalid:"Uvďte prosím celé své jméno"}},pay:{button:"Platit"},compact:{button:"Karta"}},status:{success:"Úspěch",error:"Váš způsob platby se nám nedaří ověřit. Zvolte prosím jiný způsob platby a zkuste to znovu."},errors:{doNotHonor:"Odmítnuto bez udání důvodu",insufficientFunds:"Nedostatečné prostředky",limitExceeded:"Překročen limit",expiredCard:"Karta s prošlou platností",invalidCreditCardNumber:"Neplatné číslo karty",processorDeclinedFraudSuspected:"Odmítnuto procesorem – podezření na podvod",cardholderAuthenticationRequired:"Je vyžadováno ověření držitele karty",offlineIssuerDeclined:"Vydavatel offline – odmítnuto",cardReportedAsLostOrStolen:"Karta nahlášena jako ztracená nebo odcizená",invalidSecurePaymentData:"Neplatná data zabezpečené platby",declined:"Vaše karta byla odmítnuta. Zkuste prosím jinou kartu.",errorText:"Chyba",venmoClosed:"Okno bylo zavřeno dříve, než došlo k tokenizaci.",paypalClosed:"Okno je zavřené, nelze určit typ",paypalPopupClosed:"Zjištěno zavření vyskakovacího okna",applePayClosed:"Zrušeno"}},yc={card:{required:"PÅKRÆVET",number:{label:"Kortnummer",error:{invalid:"Kortnummeret er ugyldigt",incomplete:"Kortnummeret er ufuldstændigt",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Udløbsdato",placeholder:"MM / ÅÅ",error:{incomplete:"Kortets udløbsdato er ikke komplet",invalid:"Dit korts udløbsdato er ugyldig",expired:"Dit kort er udløbet"}},cvc:{label:"Sikkerhedskode",placeholder:"CVC",error:{incomplete:"Dit korts sikkerhedskode er ikke komplet",invalid:"Dit korts CVC er ugyldigt"}},name:{label:"Kortholderens navn",placeholder:"Fulde navn",error:{invalid:"Angiv dit fulde navn"}},pay:{button:"Betal"},compact:{button:"Kredit- eller betalingskort"}},status:{success:"Succes",error:"Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen."},errors:{doNotHonor:"Afvist uden begrundelse",insufficientFunds:"Utilstrækkelige midler",limitExceeded:"Grænse overskredet",expiredCard:"Kortet er udløbet",invalidCreditCardNumber:"Ugyldigt kortnummer",processorDeclinedFraudSuspected:"Afvist af processor – mistanke om svindel",cardholderAuthenticationRequired:"Kortholdergodkendelse kræves",offlineIssuerDeclined:"Udsteder offline – afvist",cardReportedAsLostOrStolen:"Kortet er meldt mistet eller stjålet",invalidSecurePaymentData:"Ugyldige sikre betalingsdata",declined:"Dit kort blev afvist. Prøv venligst et andet kort.",errorText:"Fejl",venmoClosed:"Vinduet blev lukket, før tokenisering kunne finde sted.",paypalClosed:"Vinduet er lukket, typen kan ikke bestemmes",paypalPopupClosed:"Registreret lukning af pop op‑vindue",applePayClosed:"Annulleret"}},bc={card:{required:"Pflichtfeld",number:{label:"Kartennummer",error:{invalid:"Ihre Kartennummer ist ungültig",incomplete:"Ihre Kartennummer ist unvollständig",unsupported:"Nicht unterstützter Kartentyp"}},expiry:{label:"Ablaufdatum",placeholder:"MM / JJ",error:{incomplete:"Das Ablaufdatum Ihrer Karte ist unvollständig",invalid:"Das Ablaufdatum Ihrer Karte ist ungültig",expired:"Ihre Karte ist ungültig"}},cvc:{label:"Sicherheitscode",placeholder:"CVC",error:{incomplete:"Der Sicherheitscode Ihrer Karte ist unvollständig",invalid:"Die Prüfziffer/CVC Ihrer Karte ist ungültig"}},name:{label:"Name des/der Karteninhaber",placeholder:"Vollständiger Name",error:{invalid:"Bitte geben Sie Ihren vollständigen Namen ein"}},pay:{button:"Bezahlen"},compact:{button:"Kredit- oder Debitkarte"}},status:{success:"Erfolg",error:"Wir können Ihre Zahlungsmethode nicht authentifizieren. Bitte wählen Sie eine andere Zahlungsmethode und versuchen Sie es erneut."},errors:{doNotHonor:"Keine Genehmigung",insufficientFunds:"Unzureichende Deckung",limitExceeded:"Limit überschritten",expiredCard:"Karte abgelaufen",invalidCreditCardNumber:"Ungültige Kartennummer",processorDeclinedFraudSuspected:"Vom Prozessor abgelehnt – Betrugsverdacht",cardholderAuthenticationRequired:"Authentifizierung des Karteninhabers erforderlich",offlineIssuerDeclined:"Offline vom Aussteller abgelehnt",cardReportedAsLostOrStolen:"Karte als verloren oder gestohlen gemeldet",invalidSecurePaymentData:"Ungültige sichere Zahlungsdaten",declined:"Ihre Karte wurde abgelehnt. Bitte versuchen Sie eine andere Karte.",errorText:"Fehler",venmoClosed:"Fenster wurde geschlossen, bevor die Tokenisierung erfolgen konnte.",paypalClosed:"Fenster ist geschlossen, Typ kann nicht bestimmt werden",paypalPopupClosed:"Schließen des Pop-ups erkannt",applePayClosed:"Abgebrochen"}},_c={card:{required:"Απαιτούμενο",number:{label:"Αριθμός κάρτας",error:{invalid:"Ο αριθμός της κάρτας σας δεν είναι έγκυρος",incomplete:"Ο αριθμός της κάρτας σας είναι ελλιπής",unsupported:"Δεν υποστηρίζεται ο τύπος της κάρτας"}},expiry:{label:"Ημερομηνία λήξης",placeholder:"ΜΜ / ΕΕ",error:{incomplete:"Η ημερομηνία λήξης της κάρτας σας είναι ελλιπής",invalid:"Η ημερομηνία λήξης της κάρτας σας δεν είναι έγκυρη",expired:"Η κάρτα σας έχει λήξει"}},cvc:{label:"Κωδικός ασφαλείας",placeholder:"CVC",error:{incomplete:"Ο κωδικός ασφαλείας της κάρτας σας είναι ελλιπής",invalid:"Το CVC της κάρτας σας δεν είναι έγκυρο"}},name:{label:"Όνομα κατόχου κάρτας",placeholder:"Πλήρες όνομα στην κάρτα",error:{invalid:"Συμπληρώστε το ονοματεπώνυμό σας"}},pay:{button:"Πληρωμή"},compact:{button:"Kάρτα"}},status:{success:"Επιτυχία",error:"Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."},errors:{doNotHonor:"Απόρριψη χωρίς αιτιολόγηση",insufficientFunds:"Ανεπαρκή κεφάλαια",limitExceeded:"Υπέρβαση ορίου",expiredCard:"Η κάρτα έχει λήξει",invalidCreditCardNumber:"Μη έγκυρος αριθμός κάρτας",processorDeclinedFraudSuspected:"Απόρριψη από επεξεργαστή – υποψία απάτης",cardholderAuthenticationRequired:"Απαιτείται ταυτοποίηση κατόχου κάρτας",offlineIssuerDeclined:"Ο εκδότης εκτός σύνδεσης – απορρίφθηκε",cardReportedAsLostOrStolen:"Η κάρτα δηλώθηκε χαμένη ή κλεμμένη",invalidSecurePaymentData:"Μη έγκυρα δεδομένα ασφαλούς πληρωμής",declined:"Η κάρτα σας απορρίφθηκε. Παρακαλώ, δοκιμάστε άλλη κάρτα.",errorText:"Σφάλμα",venmoClosed:"Το παράθυρο έκλεισε πριν ολοκληρωθεί η δημιουργία token.",paypalClosed:"Το παράθυρο είναι κλειστό, δεν είναι δυνατός ο προσδιορισμός του τύπου",paypalPopupClosed:"Εντοπίστηκε κλείσιμο αναδυόμενου παραθύρου",applePayClosed:"Ακυρώθηκε"}},Si={card:{required:"REQUIRED",number:{label:"Card number",error:{invalid:"Your card number is invalid",incomplete:"Your card number is incomplete",unsupported:"Unsupported card type"}},expiry:{label:"Expiry date",placeholder:"MM / YY",error:{invalid:"Your card’s expiry date is invalid",incomplete:"Your card’s expiry date is incomplete",expired:"Your card’s expiry {date} is in the past"}},cvc:{label:"Security code",placeholder:"CVC",error:{incomplete:"Your card’s security code is incomplete",invalid:"Your card’s CVC is invalid"}},name:{label:"Cardholder name",placeholder:"Full name on card",error:{invalid:"Please provide your full name"}},pay:{button:"Pay"},compact:{button:"Card"}},status:{success:"Your payment was successful!",error:"We are unable to authenticate your payment method. Please choose a different payment method and try again."},errors:{doNotHonor:"Do Not Honor",insufficientFunds:"Insufficient Funds",limitExceeded:"Limit Exceeded",expiredCard:"Expired Card",invalidCreditCardNumber:"Invalid Credit Card Number",processorDeclinedFraudSuspected:"Processor Declined – Fraud Suspected",cardholderAuthenticationRequired:"Cardholder Authentication Required",offlineIssuerDeclined:"Offline Issuer Declined",cardReportedAsLostOrStolen:"Card reported as lost or stolen",invalidSecurePaymentData:"Invalid Secure Payment Data",declined:"Your card was declined. Please, try a different card.",errorText:"Error",venmoClosed:"Frame closed before tokenization could occur.",paypalClosed:"Window is closed, cannot determine type",paypalPopupClosed:"Detected popup close",applePayClosed:"Cancelled"}},kr={ar:mc,en:Si,bg:vc,cs:gc,da:yc,de:bc,el:_c,es:{card:{required:"OBLIGATORIO",number:{label:"Número de tarjeta",error:{invalid:"El número de tu tarjeta no es válido",incomplete:"El número de tu tarjeta está incompleto",unsupported:"Tipo de tarjeta no soportado"}},expiry:{label:"Fecha de caducidad",placeholder:"MM / AA",error:{incomplete:"La fecha de caducidad de la tarjeta está incompleta",invalid:"La fecha de caducidad de la tarjeta no es válida",expired:"La tarjeta ha caducado"}},cvc:{label:"Código de seguridad",placeholder:"CVC",error:{incomplete:"El código de seguridad de la tarjeta está incompleto",invalid:"El CVC de tu tarjeta no es válido"}},name:{label:"Nombre del titular de la tarjeta",placeholder:"Nombre completo",error:{invalid:"Proporciona tu nombre completo"}},pay:{button:"Pagar"},compact:{button:"Tarjeta"}},status:{success:"Éxito",error:"No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo."},errors:{doNotHonor:"Rechazo sin explicación",insufficientFunds:"Fondos insuficientes",limitExceeded:"Límite excedido",expiredCard:"Tarjeta expirada",invalidCreditCardNumber:"Número de tarjeta inválido",processorDeclinedFraudSuspected:"Rechazado por el procesador – sospecha de fraude",cardholderAuthenticationRequired:"Se requiere autenticación del titular",offlineIssuerDeclined:"Emisor fuera de línea – rechazado",cardReportedAsLostOrStolen:"Tarjeta reportada como perdida o robada",invalidSecurePaymentData:"Datos de pago seguro inválidos",declined:"Tu tarjeta fue rechazada. Por favor, prueba con otra tarjeta.",errorText:"Error",venmoClosed:"La ventana se cerró antes de que pudiera realizarse la tokenización.",paypalClosed:"La ventana está cerrada, no se puede determinar el tipo",paypalPopupClosed:"Cierre de ventana emergente detectado",applePayClosed:"Cancelado"}},et:{card:{required:"NÕUTAV",number:{label:"Kaardi number",error:{invalid:"Teie kaardinumber ei sobi",incomplete:"Teie kaardinumber on puudulik",unsupported:"Toetamata kaardi tüüp"}},expiry:{label:"Aegumiskuupäev",placeholder:"KK / AA",error:{incomplete:"Teie kaardi aegumiskuupäev on puudulik",invalid:"Teie kaardi aegumiskuupäev on kehtetu",expired:"Teie kaart on aegunud"}},cvc:{label:"Turvakood",placeholder:"CVC",error:{incomplete:"Teie kaardi turvakood on puudulik",invalid:"Teie kaardi CVC on kehtetu"}},name:{label:"Kaardiomaniku nimi",placeholder:"Täisnimi",error:{invalid:"Esitage oma täisnimi"}},pay:{button:"Maksa"},compact:{button:"Krediit- või deebetkaart"}},status:{success:"Edu",error:"Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti."},errors:{doNotHonor:"Tagasi lükatud ilma selgituseta",insufficientFunds:"Ebapiisavad vahendid",limitExceeded:"Limite ületatud",expiredCard:"Kaart on aegunud",invalidCreditCardNumber:"Vigane kaardinumber",processorDeclinedFraudSuspected:"Töötleja keeldus – pettuse kahtlus",cardholderAuthenticationRequired:"Nõutav kaardiomaniku autentimine",offlineIssuerDeclined:"Väljastaja võrguühenduseta – tagasi lükatud",cardReportedAsLostOrStolen:"Kaart on märgitud kadunuks või varastatuks",invalidSecurePaymentData:"Vigased turvalise makse andmed",declined:"Teie kaart lükati tagasi. Palun proovige teist kaarti.",errorText:"Viga",venmoClosed:"Aken suleti enne, kui tokeniseerimine sai toimuda.",paypalClosed:"Aken on suletud, tüüpi ei saa määrata",paypalPopupClosed:"Tuvastati hüpikakna sulgemine",applePayClosed:"Tühistatud"}},fi:{card:{required:"PAKOLLINEN",number:{label:"Kortin numero",error:{invalid:"Kortin numero ei kelpaa",incomplete:"Kortin numero on puutteellinen",unsupported:"Ei tuettu korttityyppi"}},expiry:{label:"Erääntymispäivä",placeholder:"KK / VV",error:{incomplete:"Kortin voimassaoloaika on puutteellinen",invalid:"Kortin voimassaoloaika on virheellinen",expired:"Korttisi on vanhentunut"}},cvc:{label:"Turvakoodi",placeholder:"CVC-koodi",error:{incomplete:"Kortin turvakoodi on puutteellinen",invalid:"Kortin CVC ei kelpaa"}},name:{label:"Kortinhaltijan nimi",placeholder:"Koko nimi",error:{invalid:"Anna koko nimesi"}},pay:{button:"Maksa"},compact:{button:"Luotto- tai pankkikortti"}},status:{success:"Menestys",error:"Emme pysty todentamaan maksutapaasi. Valitse toinen maksutapa ja yritä uudelleen."},errors:{doNotHonor:"Hylätty ilman perustetta",insufficientFunds:"Riittämättömät varat",limitExceeded:"Raja ylitetty",expiredCard:"Kortti on vanhentunut",invalidCreditCardNumber:"Virheellinen kortin numero",processorDeclinedFraudSuspected:"Käsittelijä hylkäsi – petosepäily",cardholderAuthenticationRequired:"Kortinhaltijan tunnistautuminen vaaditaan",offlineIssuerDeclined:"Myöntäjä offline – hylätty",cardReportedAsLostOrStolen:"Kortti ilmoitettu kadonneeksi tai varastetuksi",invalidSecurePaymentData:"Virheelliset suojatun maksun tiedot",declined:"Korttisi hylättiin. Ole hyvä ja kokeile toista korttia.",errorText:"Virhe",venmoClosed:"Ikkuna suljettiin ennen kuin tokenisointi ehti tapahtua.",paypalClosed:"Ikkuna on suljettu, tyyppiä ei voi määrittää",paypalPopupClosed:"Havaittiin ponnahdusikkunan sulkeminen",applePayClosed:"Peruutettu"}},fil:{card:{required:"KAILANGAN",number:{label:"Numero ng card",error:{invalid:"Hindi valid ang numero ng kard mo",incomplete:"Ang numero ng iyong kard ay kulang",unsupported:"Hindi sinusuportahang uri ng card"}},expiry:{label:"Petsa ng pagkapaso",placeholder:"BB / TT",error:{incomplete:"Ang petsa ng pagkapaso ng iyong kard ay kulang",invalid:"Hindi valid ang petsa ng pagkapaso ng iyong kard",expired:"Napaso na ang iyong kard"}},cvc:{label:"Security code",placeholder:"CVC",error:{incomplete:"Ang security code ng iyong kard ay kulang",invalid:"Hindi valid ang CVC ng iyong kard"}},name:{label:"Pangalan ng may-ari ng kard",placeholder:"Buong pangalan",error:{invalid:"Pakibigay ang iyong buong pangalan"}},pay:{button:"Magbayad"},compact:{button:"Luotto- tai pankkikortti"}},status:{success:"Tagumpay",error:"Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli."},errors:{doNotHonor:"Tinanggihan nang walang paliwanag",insufficientFunds:"Hindi sapat ang pondo",limitExceeded:"Lumampas sa limitasyon",expiredCard:"Paso na ang kard",invalidCreditCardNumber:"Di-wastong numero ng kard",processorDeclinedFraudSuspected:"Tinanggihan ng prosesor – pinaghihinalaang pandaraya",cardholderAuthenticationRequired:"Kailangan ang pagpapatunay ng may-ari ng kard",offlineIssuerDeclined:"Tinanggihan ng issuer offline",cardReportedAsLostOrStolen:"Iniulat na nawawala o ninakaw ang kard",invalidSecurePaymentData:"Di-wastong secure payment data",declined:"Na-decline ang iyong card. Pakisubukan ang ibang card.",errorText:"Error",venmoClosed:"Isinara ang window bago maisagawa ang tokenization.",paypalClosed:"Sarado ang window, hindi matukoy ang uri",paypalPopupClosed:"Nakita ang pagsasara ng pop-up",applePayClosed:"Kanselado"}},fr:{card:{required:"OBLIGATOIRE",number:{label:"Numéro de la carte",error:{invalid:"Votre numéro de carte n'est pas valide",incomplete:"Votre numéro de carte est incomplet",unsupported:"Type de carte non supporté"}},expiry:{label:"Date d'expiration",placeholder:"MM / AA",error:{incomplete:"La date d'expiration de votre carte est incomplète",invalid:"La date d'expiration de votre carte n'est pas valide",expired:"Votre carte a expiré"}},cvc:{label:"Code de sécurité",placeholder:"CVC",error:{incomplete:"Le code de sécurité de votre carte est incomplet",invalid:"Le code CVC de votre carte n'est pas valide"}},name:{label:"Nom du titulaire de la carte",placeholder:"Nom complet",error:{invalid:"Veuillez indiquer votre nom complet"}},pay:{button:"Payer"},compact:{button:"Carte"}},status:{success:"Succès",error:"Nous ne sommes pas en mesure d'authentifier votre méthode de paiement. Veuillez choisir un autre mode de paiement et réessayer."},errors:{doNotHonor:"Refus sans explication",insufficientFunds:"Fonds insuffisants",limitExceeded:"Limite dépassée",expiredCard:"Carte expirée",invalidCreditCardNumber:"Numéro de carte invalide",processorDeclinedFraudSuspected:"Refusé par le processeur – suspicion de fraude",cardholderAuthenticationRequired:"Authentification du titulaire requise",offlineIssuerDeclined:"Émetteur hors ligne – refus",cardReportedAsLostOrStolen:"Carte déclarée perdue ou volée",invalidSecurePaymentData:"Données de paiement sécurisées invalides",declined:"Votre carte a été refusée. Veuillez essayer une autre carte.",errorText:"Erreur",venmoClosed:"La fenêtre a été fermée avant que la tokenisation ne puisse avoir lieu.",paypalClosed:"La fenêtre est fermée, impossible de déterminer le type",paypalPopupClosed:"Fermeture de fenêtre contextuelle détectée",applePayClosed:"Annulé"}},hr:{card:{required:"POTREBNO",number:{label:"Broj kartice",error:{invalid:"Broj vaše kartice nije valjan",incomplete:"Broj vaše kartice nije potpun",unsupported:"Nepodržana vrsta kartice"}},expiry:{label:"Datum isteka",placeholder:"MM / GG",error:{incomplete:"Datum isteka vaše kartice je nepotpun",invalid:"Datum isteka vaše kartice nije valjan",expired:"Kartica je istekla"}},cvc:{label:"Sigurnosni kod",placeholder:"CVC",error:{incomplete:"Sigurnosni kôd vaše kartice je nepotpun",invalid:"Kontrolni broj (CVC) vaše kartice nije valjan"}},name:{label:"Ime vlasnika kartice",placeholder:"Puno ime",error:{invalid:"Unesite svoje puno ime"}},pay:{button:"Plati"},compact:{button:"Kartica"}},status:{success:"Uspjeh",error:"Ne možemo provjeriti autentičnost vašeg načina plaćanja. Odaberite drugi način plaćanja i pokušajte ponovno."},errors:{doNotHonor:"Odbijeno bez obrazloženja",insufficientFunds:"Nedovoljno sredstava",limitExceeded:"Prekoračen limit",expiredCard:"Kartica je istekla",invalidCreditCardNumber:"Nevažeći broj kartice",processorDeclinedFraudSuspected:"Procesor odbio – sumnja na prijevaru",cardholderAuthenticationRequired:"Potrebna autentikacija vlasnika kartice",offlineIssuerDeclined:"Izdavatelj izvan mreže – odbijeno",cardReportedAsLostOrStolen:"Kartica prijavljena kao izgubljena ili ukradena",invalidSecurePaymentData:"Nevažeći sigurni podaci za plaćanje",declined:"Vaša kartica je odbijena. Molimo, pokušajte s drugom karticom.",errorText:"Pogreška",venmoClosed:"Prozor je zatvoren prije nego što je mogla biti izvršena tokenizacija.",paypalClosed:"Prozor je zatvoren, nije moguće odrediti vrstu",paypalPopupClosed:"Otkriveno zatvaranje skočnog prozora",applePayClosed:"Otkazano"}},hu:{card:{required:"KÖTELEZŐ",number:{label:"Kártya száma",error:{invalid:"A kártyaszáma érvénytelen",incomplete:"A kártyaszáma hiányos",unsupported:"Nem támogatott kártya típusa"}},expiry:{label:"Lejárat dátuma",placeholder:"HH / ÉÉ",error:{incomplete:"A kártyája lejárati dátuma hiányos",invalid:"A kártyája lejárati dátuma érvénytelen",expired:"A kártyája lejárt"}},cvc:{label:"Biztonsági kód",placeholder:"CVC",error:{incomplete:"A kártyája biztonsági kódja hiányos",invalid:"A kártya CVC-kódja érvénytelen"}},name:{label:"Kártyabirtokos neve",placeholder:"Teljes név",error:{invalid:"Adja meg a teljes nevét"}},pay:{button:"Fizetés"},compact:{button:"Hitel- vagy bankkártya"}},status:{success:"Siker",error:"Nem tudjuk hitelesíteni a fizetési módját. Kérjük, válasszon másik fizetési módot, és próbálja meg újra."},errors:{doNotHonor:"Elutasítva indoklás nélkül",insufficientFunds:"Elégtelen fedezet",limitExceeded:"Limit túllépve",expiredCard:"Lejárt kártya",invalidCreditCardNumber:"Érvénytelen kártyaszám",processorDeclinedFraudSuspected:"Feldolgozó elutasította – csalás gyanúja",cardholderAuthenticationRequired:"Kártyabirtokosi hitelesítés szükséges",offlineIssuerDeclined:"Kibocsátó offline – elutasítva",cardReportedAsLostOrStolen:"Kártya elveszettnek vagy ellopottnak jelentve",invalidSecurePaymentData:"Érvénytelen biztonságos fizetési adatok",declined:"A kártyáját elutasították. Kérjük, próbáljon meg egy másik kártyát.",errorText:"Hiba",venmoClosed:"Az ablak bezárult, mielőtt a tokenizáció megtörténhetett volna.",paypalClosed:"Az ablak zárva van, a típust nem lehet meghatározni",paypalPopupClosed:"Észlelt felugró ablak bezárása",applePayClosed:"Megszakítva"}},id:{card:{required:"WAJIB DIISI",number:{label:"Nomor kartu",error:{invalid:"Nomor kartu Anda tidak valid",incomplete:"Nomor kartu Anda tidak lengkap",unsupported:"Tipe kartu tidak didukung"}},expiry:{label:"Tanggal kedaluwarsa",placeholder:"BB / TT",error:{incomplete:"Tanggal kedaluwarsa kartu Anda tidak lengkap",invalid:"Tanggal kedaluwarsa kartu Anda tidak valid",expired:"Kartu Anda telah kedaluwarsa"}},cvc:{label:"Kode keamanan",placeholder:"CVC",error:{incomplete:"Kode keamanan kartu Anda tidak lengkap",invalid:"CVC kartu Anda tidak valid"}},name:{label:"Nama pemegang kartu",placeholder:"Nama lengkap",error:{invalid:"Berikan nama lengkap Anda"}},pay:{button:"Bayar"},compact:{button:"Kartu"}},status:{success:"Sukses",error:"Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi."},errors:{doNotHonor:"Ditolak tanpa alasan",insufficientFunds:"Dana tidak mencukupi",limitExceeded:"Melebihi batas",expiredCard:"Kartu kedaluwarsa",invalidCreditCardNumber:"Nomor kartu tidak valid",processorDeclinedFraudSuspected:"Ditolak prosesor – dicurigai penipuan",cardholderAuthenticationRequired:"Diperlukan autentikasi pemegang kartu",offlineIssuerDeclined:"Penerbit offline menolak",cardReportedAsLostOrStolen:"Kartu dilaporkan hilang atau dicuri",invalidSecurePaymentData:"Data pembayaran aman tidak valid",declined:"Kartu Anda ditolak. Silakan coba kartu yang lain.",errorText:"Kesalahan",venmoClosed:"Jendela ditutup sebelum tokenisasi dapat dilakukan.",paypalClosed:"Jendela ditutup, tidak dapat menentukan tipe",paypalPopupClosed:"Terdeteksi penutupan jendela pop-up",applePayClosed:"Dibatalkan"}},it:{card:{required:"OBBLIGATORIO",number:{label:"Numero di carta",error:{invalid:"Il numero della carta non è valido",incomplete:"Il numero della carta è incompleto",unsupported:"Tipo di carta non supportato"}},expiry:{label:"Data di scadenza",placeholder:"MM / AA",error:{incomplete:"La data di scadenza della carta non è completa",invalid:"La data di scadenza della carta non è valida",expired:"La tua carta è scaduta"}},cvc:{label:"Codice di sicurezza",placeholder:"CVC",error:{incomplete:"Il codice di sicurezza della carta non è completo",invalid:"Il CVC della carta non è valido"}},name:{label:"Nome del titolare della carta",placeholder:"Nome e cognome",error:{invalid:"Inserisci il tuo nome completo"}},pay:{button:"Paga"},compact:{button:"Carta"}},status:{success:"Il successo",error:"Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare."},errors:{doNotHonor:"Rifiutato senza spiegazione",insufficientFunds:"Fondi insufficienti",limitExceeded:"Limite superato",expiredCard:"Carta scaduta",invalidCreditCardNumber:"Numero di carta non valido",processorDeclinedFraudSuspected:"Rifiutato dal processore – sospetto di frode",cardholderAuthenticationRequired:"Autenticazione del titolare richiesta",offlineIssuerDeclined:"Emittente offline – rifiutato",cardReportedAsLostOrStolen:"Carta segnalata come smarrita o rubata",invalidSecurePaymentData:"Dati di pagamento sicuro non validi",declined:"La tua carta è stata rifiutata. Per favore, prova con un'altra carta.",errorText:"Errore",venmoClosed:"La finestra è stata chiusa prima che la tokenizzazione potesse avvenire.",paypalClosed:"La finestra è chiusa, impossibile determinare il tipo",paypalPopupClosed:"Rilevata chiusura del popup",applePayClosed:"Annullato"}},ja:{card:{required:"必須",number:{label:"カード番号",error:{invalid:"カード番号が無効です",incomplete:"カード番号に不備があります",unsupported:"サポートされていないカードタイプ"}},expiry:{label:"有効期限",placeholder:"MM (月) / YY (年)",error:{incomplete:"カードの有効期限に不備があります",invalid:"カードの有効期間の満了月が無効です",expired:"カードの有効期限が切れています"}},cvc:{label:"セキュリティコード",placeholder:"セキュリティコード",error:{incomplete:"カードのセキュリティコードに不備があります",invalid:"カードのセキュリティコードが無効です"}},name:{label:"カード保有者の名前",placeholder:"氏名",error:{invalid:"氏名を入力してください"}},pay:{button:"支払う"},compact:{button:"カード"}},status:{success:"成功",error:"お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"},errors:{doNotHonor:"承認不可(理由なし)",insufficientFunds:"残高不足",limitExceeded:"限度額超過",expiredCard:"カードの有効期限切れ",invalidCreditCardNumber:"無効なカード番号",processorDeclinedFraudSuspected:"プロセッサにより拒否 – 不正の疑い",cardholderAuthenticationRequired:"カード保有者の認証が必要です",offlineIssuerDeclined:"オフラインの発行会社により拒否",cardReportedAsLostOrStolen:"カードは紛失または盗難として報告済み",invalidSecurePaymentData:"無効なセキュア支払いデータ",declined:"カードが拒否されました。別のカードをお試しください。",errorText:"エラー",venmoClosed:"トークン化が行われる前にウィンドウが閉じられました。",paypalClosed:"ウィンドウが閉じられているため、種類を判別できません",paypalPopupClosed:"ポップアップの閉鎖を検出しました",applePayClosed:"キャンセルされました"}},ko:{card:{required:"필수",number:{label:"카드 번호",error:{invalid:"카드 번호가 잘못되었습니다",incomplete:"카드 번호가 불완전합니다",unsupported:"지원되지 않는 카드 유형"}},expiry:{label:"만료 날짜",placeholder:"MM / YY",error:{incomplete:"카드의 유효기간 만료일이 불완전합니다",invalid:"카드의 유효기간 만료일이 잘못되었습니다",expired:"카드가 만료되었습니다"}},cvc:{label:"보안 코드",placeholder:"보안 코드(CVC)",error:{incomplete:"카드의 보안 코드가 불완전합니다",invalid:"카드의 보안 코드(CVC)가 잘못되었습니다"}},name:{label:"카드 소유자 이름",placeholder:"성명",error:{invalid:"성명을 입력하십시오"}},pay:{button:"결제"},compact:{button:"카드 번호"}},status:{success:"성공",error:"결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."},errors:{doNotHonor:"사유 없이 승인 거절",insufficientFunds:"잔액 부족",limitExceeded:"한도 초과",expiredCard:"카드 유효기간 만료",invalidCreditCardNumber:"잘못된 카드 번호",processorDeclinedFraudSuspected:"프로세서 거절 – 사기 의심",cardholderAuthenticationRequired:"카드 소지자 인증 필요",offlineIssuerDeclined:"오프라인 발급사 거절",cardReportedAsLostOrStolen:"카드가 분실 또는 도난으로 신고됨",invalidSecurePaymentData:"잘못된 보안 결제 데이터",declined:"카드가 승인되지 않았습니다. 다른 카드를 사용해 주세요.",errorText:"오류",venmoClosed:"토큰화가 진행되기 전에 창이 닫혔습니다.",paypalClosed:"창이 닫혀 있어 유형을 확인할 수 없습니다",paypalPopupClosed:"팝업 창 닫힘 감지됨",applePayClosed:"취소됨"}},lt:{card:{required:"PRIVALOMA",number:{label:"Kortelės numeris",error:{invalid:"Negaliojantis kortelės numeris",incomplete:"Neišsamus kortelės numeris",unsupported:"Nepalaikomas kortelės tipas"}},expiry:{label:"Galiojimo pabaigos data",placeholder:"mm / MM",error:{incomplete:"Neišsami jūsų kortelės galiojimo pabaigos data",invalid:"Netinkama jūsų kortelės galiojimo pabaigos data",expired:"Kortelė baigė galioti"}},cvc:{label:"Saugos kodas",placeholder:"CVC",error:{incomplete:"Neišsamus jūsų kortelės saugos kodas",invalid:"Jūsų kortelės CVC negalioja"}},name:{label:"Kortelės turėtojo vardas ir pavardė",placeholder:"Vardas ir pavardė",error:{invalid:"Įveskite ir vardą ir pavardę"}},pay:{button:"Mokėti"},compact:{button:"Kortelė"}},status:{success:"Sėkmė",error:"Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą."},errors:{doNotHonor:"Atmesta be paaiškinimo",insufficientFunds:"Nepakanka lėšų",limitExceeded:"Viršyta riba",expiredCard:"Kortelė nebegalioja",invalidCreditCardNumber:"Neteisingas kortelės numeris",processorDeclinedFraudSuspected:"Procesorius atmetė – įtariamas sukčiavimas",cardholderAuthenticationRequired:"Reikalingas kortelės turėtojo autentifikavimas",offlineIssuerDeclined:"Leidėjas neprisijungęs – atmesta",cardReportedAsLostOrStolen:"Kortelė pranešta kaip pamesta ar pavogta",invalidSecurePaymentData:"Neteisingi saugaus mokėjimo duomenys",declined:"Jūsų kortelė buvo atmesta. Prašome pabandyti kitą kortelę.",errorText:"Klaida",venmoClosed:"Langas uždarytas prieš atliekant tokenizaciją.",paypalClosed:"Langas uždarytas, negalima nustatyti tipo",paypalPopupClosed:"Aptiktas iššokančiojo lango uždarymas",applePayClosed:"Atšaukta"}},lv:{card:{required:"OBLIGĀTI",number:{label:"Kartes numurs",error:{invalid:"Kartes numurs nav derīgs",incomplete:"Kartes numurs nav pilnīgs",unsupported:"Nepareizs kartes tips"}},expiry:{label:"Derīguma termiņš",placeholder:"MM / YY",error:{incomplete:"Kartes derīguma termiņa datums nav pilnīgs",invalid:"Kartes derīguma termiņa beigu datums nav derīgs",expired:"Kartes derīgums ir beidzies"}},cvc:{label:"Drošības kods",placeholder:"CVC",error:{incomplete:"Kartes drošības kods nav pilnīgs",invalid:"Kartes CVC nav derīgs"}},name:{label:"Kartes īpašnieka vārds",placeholder:"Vārds, uzvārds",error:{invalid:"Norādiet savu vārdu un uzvārdu"}},pay:{button:"Maksāt"},compact:{button:"Karte"}},status:{success:"Panākumi",error:"Mēs nevaram pārbaudīt jūsu maksājuma metodes autentiskumu. Lūdzu, izvēlieties citu maksājumu metodi un mēģiniet vēlreiz."},errors:{doNotHonor:"Noraidīt bez pamatojuma",insufficientFunds:"Nepietiek līdzekļu",limitExceeded:"Pārsniegts limits",expiredCard:"Karte ir beigusies",invalidCreditCardNumber:"Nederīgs kartes numurs",processorDeclinedFraudSuspected:"Procesors noraidīja – aizdomas par krāpšanu",cardholderAuthenticationRequired:"Nepieciešama kartes turētāja autentifikācija",offlineIssuerDeclined:"Izdevējs bezsaistē – noraidīts",cardReportedAsLostOrStolen:"Karte ziņota kā nozagta vai pazaudēta",invalidSecurePaymentData:"Nederīgi drošas maksāšanas dati",declined:"Jūsu karte tika noraidīta. Lūdzu, mēģiniet citu karti.",errorText:"Kļūda",venmoClosed:"Logs tika aizvērts pirms notika tokenizācija.",paypalClosed:"Logs ir aizvērts, nav iespējams noteikt tipu",paypalPopupClosed:"Konstatēta uznirstošā loga aizvēršana",applePayClosed:"Atcelts"}},ms:{card:{required:"DIPERLUKAN",number:{label:"Nombor kad",error:{invalid:"Nombor kad anda tidak sah",incomplete:"Nombor kad anda tidak lengkap",unsupported:"Tipe kad tidak sah"}},expiry:{label:"Tarikh tamat tempoh",placeholder:"BB / TT",error:{incomplete:"Tarikh tamat tempoh kad anda tidak lengkap",invalid:"Tarikh tamat tempoh kad anda tidak sah",expired:"Kad anda telah tamat tempoh"}},cvc:{label:"Kod keselamatan",placeholder:"CVC",error:{incomplete:"Kod keselamatan kad anda tidak lengkap",invalid:"CVC kad anda tidak sah"}},name:{label:"Nama pemegang kad",placeholder:"Nama penuh",error:{invalid:"Sila berikan nama penuh anda"}},pay:{button:"Bayar"},compact:{button:"Kad"}},status:{success:"Kejayaan",error:"Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi."},errors:{doNotHonor:"Ditolak tanpa alasan",insufficientFunds:"Dana tidak mencukupi",limitExceeded:"Had melebihi",expiredCard:"Kad tamat tempoh",invalidCreditCardNumber:"Nombor kad tidak sah",processorDeclinedFraudSuspected:"Ditolak pemproses – disyaki penipuan",cardholderAuthenticationRequired:"Pengesahan pemegang kad diperlukan",offlineIssuerDeclined:"Penerbit luar talian menolak",cardReportedAsLostOrStolen:"Kad dilaporkan hilang atau dicuri",invalidSecurePaymentData:"Data pembayaran selamat tidak sah",declined:"Kad anda ditolak. Sila cuba kad yang lain.",errorText:"Ralat",venmoClosed:"Tetingkap ditutup sebelum tokenisasi dapat dilakukan.",paypalClosed:"Tetingkap ditutup, jenis tidak dapat ditentukan",paypalPopupClosed:"Pengesan penutupan tetingkap timbul",applePayClosed:"Dibatalkan"}},ru:{card:{required:"ОБЯЗАТЕЛЬНО",number:{label:"Номер карты",error:{invalid:"Неверный номер карты",incomplete:"Номер карты неполон",unsupported:"Неподдерживаемый тип карты"}},expiry:{label:"Срок действия",placeholder:"ММ / ГГ",error:{incomplete:"Срок действия карты указан не полностью",invalid:"Указанный срок действия карты недействителен",expired:"Срок действия карты истек"}},cvc:{label:"Код безопасности",placeholder:"CVC",error:{incomplete:"Код безопасности карты введен не полностью",invalid:"Код CVC карты недействителен"}},name:{label:"Имя владельца карты",placeholder:"Имя, фамилия",error:{invalid:"Введите свое имя и фамилию"}},pay:{button:"Оплатить"},compact:{button:"Кредитная карта"}},status:{success:"Успех",error:"Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."},errors:{doNotHonor:"Отказ без объяснения причин",insufficientFunds:"Недостаточно средств",limitExceeded:"Превышен лимит",expiredCard:"Срок действия карты истёк",invalidCreditCardNumber:"Недействительный номер карты",processorDeclinedFraudSuspected:"Отклонено процессингом – подозрение на мошенничество",cardholderAuthenticationRequired:"Требуется аутентификация держателя карты",offlineIssuerDeclined:"Эмитент офлайн отклонил",cardReportedAsLostOrStolen:"Карта заявлена как утерянная или украденная",invalidSecurePaymentData:"Недействительные данные безопасного платежа",declined:"Ваша карта была отклонена. Пожалуйста, попробуйте другую карту.",errorText:"Ошибка",venmoClosed:"Окно закрыто до выполнения токенизации.",paypalClosed:"Окно закрыто, не удаётся определить тип",paypalPopupClosed:"Обнаружено закрытие всплывающего окна",applePayClosed:"Отменено"}},mt:{card:{required:"MEĦTIEĠ/A",number:{label:"Numru tal-karta",error:{invalid:"In-numru tal-karta tiegħek mhuwiex tajjeb",incomplete:"In-numru tal-karta tiegħek mhuwiex komplut",unsupported:"Tip ta' karta mhux appoġġjat"}},expiry:{label:"Data tal-iskadenza",placeholder:"XX / SS",error:{incomplete:"Id-data tal-iskadenza tal-karta tiegħek mhix sħiħa",invalid:"Id-data tal-iskadenza tal-karta tiegħek mhix tajba",expired:"Il-karta tiegħek skadiet"}},cvc:{label:"Kodiċi tas-sigurtà",placeholder:"CVC",error:{incomplete:"Il-kodiċi tas-sigurtà tal-karta tiegħek mhux sħiħ",invalid:"Is-CVC tal-karta tiegħek mhux tajjeb"}},name:{label:"Isem id-detentur tal-karta",placeholder:"Isem u kunjom",error:{invalid:"Jekk jogħġbok ipprovdi isemek kollu"}},pay:{button:"Ħallas"},compact:{button:"Karta"}},status:{success:"Suċċess",error:"Aħna ma nistgħux jawtentikaw il-metodu tal-ħlas tiegħek. Jekk jogħġbok agħżel metodu ta' ħlas differenti u erġa' pprova."},errors:{doNotHonor:"Miċħud mingħajr spjegazzjoni",insufficientFunds:"Fondijiet insuffiċjenti",limitExceeded:"Limitu eċċessiv",expiredCard:"Karta skaduta",invalidCreditCardNumber:"Numru tal-karta invalidu",processorDeclinedFraudSuspected:"Miċħud mill-proċessur – suspett ta’ frodi",cardholderAuthenticationRequired:"Meħtieġa awtentikazzjoni tad-detentur tal-karta",offlineIssuerDeclined:"Emittent offline – miċħud",cardReportedAsLostOrStolen:"Karta rrappurtata mitlufa jew misruqa",invalidSecurePaymentData:"Dejta ta’ ħlas sigura invalida",declined:"Il-karta tiegħek ġiet miċħuda. Jekk jogħġbok ipprova karta oħra.",errorText:"Żball",venmoClosed:"It-tieqa ngħalqet qabel ma setgħet issir it-tokenizzazzjoni.",paypalClosed:"It-tieqa magħluqa, ma jistax jiġi determinat it-tip",paypalPopupClosed:"Innotata għeluq ta’ pop‑up",applePayClosed:"Ikkanċellat"}},no:{card:{required:"PÅKREVD",number:{label:"Kortnummer",error:{invalid:"Kortnummeret er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Ikke støttet korttype"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{invalid:"Utløpsdatoen er ugyldig",incomplete:"Kortets utløpsdato er ufullstendig",expired:"Kortet har utløpt"}},cvc:{label:"Sikkerhetskode",placeholder:"CVC",error:{incomplete:"Sikkerhetskoden er ufullstendig",invalid:"CVC-koden er ugyldig"}},name:{label:"Kortholders navn",placeholder:"Fullt navn",error:{invalid:"Oppgi fullt navn"}},pay:{button:"Betal"},compact:{button:"Kort"}},status:{success:"Betalingen var vellykket!",error:"Vi kan ikke autentisere betalingsmetoden din. Velg en annen betalingsmetode og prøv igjen."},errors:{doNotHonor:"Avslått uten begrunnelse",insufficientFunds:"Utilstrekkelige midler",limitExceeded:"Grense overskredet",expiredCard:"Kortet er utløpt",invalidCreditCardNumber:"Ugyldig kortnummer",processorDeclinedFraudSuspected:"Avslått av prosessor – mistanke om svindel",cardholderAuthenticationRequired:"Kortholderautentisering kreves",offlineIssuerDeclined:"Utsteder offline – avslått",cardReportedAsLostOrStolen:"Kort rapportert tapt eller stjålet",invalidSecurePaymentData:"Ugyldige sikre betalingsdata",declined:"Kortet ditt ble avvist. Vennligst prøv et annet kort.",errorText:"Feil",venmoClosed:"Vinduet ble lukket før tokenisering kunne gjennomføres.",paypalClosed:"Vinduet er lukket, kan ikke fastslå type",paypalPopupClosed:"Oppdaget lukking av popup‑vindu",applePayClosed:"Avbrutt"}},nb:{card:{required:"PÅKREVET",number:{label:"Kortnummer",error:{invalid:"Kortnummer er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{incomplete:"Kortets utløpsdato er ufullstendig",invalid:"Kortets utløpsdato er ugyldig",expired:"Kortet er utløpt"}},cvc:{label:"Sikkerhetskode",placeholder:"CVC",error:{incomplete:"Kortets sikkerhetskode er ufullstendig",invalid:"Kortets CVC-nummer er ugyldig"}},name:{label:"Kortinnehavers navn",placeholder:"Fullt navn",error:{invalid:"Oppgi fullt navn"}},pay:{button:"Betal"},compact:{button:"Kort"}},status:{success:"Suksess",error:"Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt."},errors:{doNotHonor:"Avslått uten begrunnelse",insufficientFunds:"Utilstrekkelige midler",limitExceeded:"Grense overskredet",expiredCard:"Kortet er utløpt",invalidCreditCardNumber:"Ugyldig kortnummer",processorDeclinedFraudSuspected:"Avslått av prosessor – mistanke om svindel",cardholderAuthenticationRequired:"Kortholderautentisering kreves",offlineIssuerDeclined:"Utsteder offline – avslått",cardReportedAsLostOrStolen:"Kort rapportert tapt eller stjålet",invalidSecurePaymentData:"Ugyldige sikre betalingsdata",declined:"Kortet ditt ble avvist. Vennligst prøv et annet kort.",errorText:"Feil",venmoClosed:"Vinduet ble lukket før tokenisering kunne gjennomføres.",paypalClosed:"Vinduet er lukket, kan ikke fastslå type",paypalPopupClosed:"Oppdaget lukking av popup‑vindu",applePayClosed:"Avbrutt"}},nl:{card:{required:"VEREIST",number:{label:"Kaartnummer",error:{invalid:"Je kaartnummer is ongeldig",incomplete:"Je kaartnummer is onvolledig",unsupported:"Niet ondersteund"}},expiry:{label:"Vervaldatum",placeholder:"MM / JJ",error:{incomplete:"De vervaldatum van je kaart is onvolledig",invalid:"De vervaldatum van je betaalkaart is ongeldig",expired:"Je kaart is vervallen"}},cvc:{label:"Beveiligingscode",placeholder:"CVC",error:{incomplete:"De beveiligingscode van je betaalkaart is onvolledig",invalid:"De CVC-code van je betaalkaart is ongeldig"}},name:{label:"Naam kaarthouder",placeholder:"Volledige naam",error:{invalid:"Geef je volledige naam op"}},pay:{button:"Betalen"},compact:{button:"Kaart"}},status:{success:"Succes",error:"We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw."},errors:{doNotHonor:"Weigering zonder opgaaf van reden",insufficientFunds:"Onvoldoende saldo",limitExceeded:"Limiet overschreden",expiredCard:"Kaart verlopen",invalidCreditCardNumber:"Ongeldig kaartnummer",processorDeclinedFraudSuspected:"Door verwerker geweigerd – vermoedelijke fraude",cardholderAuthenticationRequired:"Authenticatie kaarthouder vereist",offlineIssuerDeclined:"Offline door uitgever geweigerd",cardReportedAsLostOrStolen:"Kaart gemeld als verloren of gestolen",invalidSecurePaymentData:"Ongeldige beveiligde betalingsgegevens",declined:"Uw kaart is geweigerd. Probeer alstublieft een andere kaart.",errorText:"Fout",venmoClosed:"Venster gesloten voordat tokenisatie kon plaatsvinden.",paypalClosed:"Venster is gesloten, type kan niet worden bepaald",paypalPopupClosed:"Detectie van sluiten van pop‑up",applePayClosed:"Geannuleerd"}},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 karty jest niepełna",invalid:"Termin ważności karty jest nieprawidłowy",expired:"Karta straciła ważność"}},cvc:{label:"Kod bezpieczeństwa",placeholder:"Kod CVC",error:{incomplete:"Kod zabezpieczający karty jest niekompletny",invalid:"CVC karty jest nieprawidłowy"}},name:{label:"Imię i nazwisko posiadacza karty",placeholder:"Imię i nazwisko",error:{invalid:"Podaj pełne imię i nazwisko"}},pay:{button:"Zapłać"},compact:{button:"Karta"}},status:{success:"Sukces",error:"Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie."},errors:{doNotHonor:"Odmowa bez podania przyczyny",insufficientFunds:"Niewystarczające środki",limitExceeded:"Przekroczono limit",expiredCard:"Karta wygasła",invalidCreditCardNumber:"Nieprawidłowy numer karty",processorDeclinedFraudSuspected:"Odrzucono przez procesor – podejrzenie oszustwa",cardholderAuthenticationRequired:"Wymagana uwierzytelnienie posiadacza karty",offlineIssuerDeclined:"Wystawca offline – odrzucono",cardReportedAsLostOrStolen:"Karta zgłoszona jako zgubiona lub skradziona",invalidSecurePaymentData:"Nieprawidłowe dane bezpiecznej płatności",declined:"Twoja karta została odrzucona. Proszę, spróbuj innej karty.",errorText:"Błąd",venmoClosed:"Okno zostało zamknięte przed dokonaniem tokenizacji.",paypalClosed:"Okno jest zamknięte, nie można określić typu",paypalPopupClosed:"Wykryto zamknięcie okna podręcznego",applePayClosed:"Anulowano"}},pt:{card:{required:"OBRIGATÓRIO",number:{label:"Número do cartão",error:{invalid:"O número do seu cartão é inválido",incomplete:"O número do seu cartão está incompleto",unsupported:"Tipo de cartão não suportado"}},expiry:{label:"Data de validade",placeholder:"MM / AA",error:{incomplete:"A data de validade do cartão está incompleta",invalid:"A data de validade do seu cartão é inválida",expired:"O seu cartão expirou"}},cvc:{label:"Código de segurança",placeholder:"CVC",error:{incomplete:"O código de segurança de seu cartão está incompleto",invalid:"O CVC do seu cartão é inválido"}},name:{label:"Nome do titular do cartão",placeholder:"Nome completo",error:{invalid:"Forneça o seu nome completo"}},pay:{button:"Pagar"},compact:{button:"Cartão"}},status:{success:"Sucesso",error:"Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente."},errors:{doNotHonor:"Recusado sem explicação",insufficientFunds:"Fundos insuficientes",limitExceeded:"Limite excedido",expiredCard:"Cartão expirado",invalidCreditCardNumber:"Número do cartão inválido",processorDeclinedFraudSuspected:"Recusado pelo processador – suspeita de fraude",cardholderAuthenticationRequired:"Autenticação do titular necessária",offlineIssuerDeclined:"Emissor offline – recusado",cardReportedAsLostOrStolen:"Cartão reportado como perdido ou roubado",invalidSecurePaymentData:"Dados de pagamento seguro inválidos",declined:"O seu cartão foi recusado. Por favor, tente outro cartão.",errorText:"Erro",venmoClosed:"A janela foi fechada antes que a tokenização pudesse ocorrer.",paypalClosed:"A janela está fechada, não é possível determinar o tipo",paypalPopupClosed:"Deteção de fecho de pop‑up",applePayClosed:"Cancelado"}},ro:{card:{required:"NECESAR",number:{label:"Numărul cardului",error:{invalid:"Numărul cardului dvs. nu este valid",incomplete:"Numărul cardului dvs. nu este complet",unsupported:"Tipul cardului nu este acceptat"}},expiry:{label:"Data de expirare",placeholder:"LL / AA",error:{incomplete:"Data de expirare a cardului dvs. este incompletă",invalid:"Data de expirare a cardului dvs. nu este validă",expired:"Cardul dvs. a expirat"}},cvc:{label:"Codul de securitate",placeholder:"CVC",error:{incomplete:"Codul de securitate al cardului dvs. este incomplet",invalid:"Numărul CVC al cardului dvs. nu este valid"}},name:{label:"Nume titular card",placeholder:"Nume complet",error:{invalid:"Vă rugăm să furnizați numele dvs. complet"}},pay:{button:"Plătiți"},compact:{button:"Card"}},status:{success:"Succes",error:"Nu putem să vă autentificăm metoda de plată. Vă rugăm să alegeți o altă metodă de plată și să încercați din nou."},errors:{doNotHonor:"Refuzat fără motiv",insufficientFunds:"Fonduri insuficiente",limitExceeded:"Limită depășită",expiredCard:"Card expirat",invalidCreditCardNumber:"Număr de card invalid",processorDeclinedFraudSuspected:"Refuzat de procesator – suspiciune de fraudă",cardholderAuthenticationRequired:"Este necesară autentificarea titularului cardului",offlineIssuerDeclined:"Emitent offline – refuzat",cardReportedAsLostOrStolen:"Card raportat ca pierdut sau furat",invalidSecurePaymentData:"Date de plată securizată invalide",declined:"Cardul dvs. a fost refuzat. Vă rugăm să încercați un alt card.",errorText:"Eroare",venmoClosed:"Fereastra a fost închisă înainte de efectuarea tokenizării.",paypalClosed:"Fereastra este închisă, nu se poate determina tipul",paypalPopupClosed:"S-a detectat închiderea ferestrei pop‑up",applePayClosed:"Anulat"}},ua:{card:{required:"ОБОВʼЯЗКОВО",number:{label:"Номер картки",error:{invalid:"Невірний номер картки",incomplete:"Номер картки неповний",unsupported:"Непідтримуваний тип картки"}},expiry:{label:"Термін дії",placeholder:"ММ / РР",error:{invalid:"Невірний термін дії картки",incomplete:"Термін дії картки вказано не повністю",expired:"Термін дії картки минув"}},cvc:{label:"Код безпеки",placeholder:"CVC",error:{incomplete:"Код безпеки картки введено не повністю",invalid:"Невірний CVC-код картки"}},name:{label:"Імʼя власника картки",placeholder:"Повне імʼя",error:{invalid:"Вкажіть своє повне імʼя"}},pay:{button:"Сплатити"},compact:{button:"Картка"}},status:{success:"Платіж успішний!",error:"Не вдалося підтвердити ваш спосіб оплати. Будь ласка, оберіть інший спосіб оплати та спробуйте ще раз."},errors:{doNotHonor:"Відмовлено без пояснення",insufficientFunds:"Недостатньо коштів",limitExceeded:"Перевищено ліміт",expiredCard:"Прострочена картка",invalidCreditCardNumber:"Недійсний номер картки",processorDeclinedFraudSuspected:"Відхилено процесором – підозра на шахрайство",cardholderAuthenticationRequired:"Потрібна автентифікація держателя картки",offlineIssuerDeclined:"Емітент офлайн відхилив",cardReportedAsLostOrStolen:"Картку заявлено як втрачено або викрадено",invalidSecurePaymentData:"Недійсні дані безпечного платежу",declined:"Вашу картку відхилено. Будь ласка, спробуйте іншу картку.",errorText:"Помилка",venmoClosed:"Вікно закрито до виконання токенізації.",paypalClosed:"Вікно закрите, неможливо визначити тип",paypalPopupClosed:"Виявлено закриття спливаючого вікна",applePayClosed:"Скасовано"}},sk:{card:{required:"POŽADOVANÉ",number:{label:"Číslo karty",error:{invalid:"Číslo vašej karty je neplatné",incomplete:"Číslo vašej karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Dátum ukončenia platnosti",placeholder:"MM / RR",error:{incomplete:"Dátum vypršania platnosti vašej karty je neúplný",invalid:"Dátum vypršania platnosti vašej karty je neplatný",expired:"Platnosť vašej karty vypršala"}},cvc:{label:"Bezpečnostný kód",placeholder:"CVC",error:{incomplete:"Bezpečnostný kód vašej karty je neúplný",invalid:"Číslo CVC vašej karty je neplatné"}},name:{label:"Držiteľ karty",placeholder:"Celé meno",error:{invalid:"Zadajte vaše celé meno"}},pay:{button:"Zaplatiť"},compact:{button:"Karta"}},status:{success:"Úspech",error:"Nemôžeme overiť váš spôsob platby. Vyberte si iný spôsob platby a skúste to znova."},errors:{doNotHonor:"Odmietnuté bez uvedenia dôvodu",insufficientFunds:"Nedostatočné prostriedky",limitExceeded:"Prekročený limit",expiredCard:"Karta po dobe platnosti",invalidCreditCardNumber:"Neplatné číslo karty",processorDeclinedFraudSuspected:"Odmietnuté procesorom – podozrenie na podvod",cardholderAuthenticationRequired:"Vyžaduje sa autentifikácia držiteľa karty",offlineIssuerDeclined:"Vydavateľ offline – odmietnuté",cardReportedAsLostOrStolen:"Karta nahlásená ako stratená alebo odcudzená",invalidSecurePaymentData:"Neplatné údaje o zabezpečenej platbe",declined:"Vaša karta bola odmietnutá. Prosím, skúste inú kartu.",errorText:"Chyba",venmoClosed:"Okno bolo zatvorené skôr, ako mohlo dôjsť k tokenizácii.",paypalClosed:"Okno je zatvorené, nie je možné určiť typ",paypalPopupClosed:"Zistené zatvorenie vyskakovacieho okna",applePayClosed:"Zrušené"}},sl:{card:{required:"OBVEZNO",number:{label:"Številka kartice",error:{invalid:"Številka vaše kartice ni veljavna",incomplete:"Številka vaše kartice ni popolna",unsupported:"Nepodprta vrsta kartice"}},expiry:{label:"Datum poteka",placeholder:"MM / LL",error:{incomplete:"Datum poteka vaše kartice ni popoln",invalid:"Datum poteka vaše kartice ni veljaven",expired:"Vaša kartica je potekla"}},cvc:{label:"Varnostna koda",placeholder:"CVC",error:{incomplete:"Varnostna koda vaše kartice ni popolna",invalid:"Koda CVC vaše kartice ni veljavna"}},name:{label:"Ime imetnika kartice",placeholder:"Polno ime",error:{invalid:"Vnesite svoje polno ime"}},pay:{button:"Plačaj"},compact:{button:"Kartica"}},status:{success:"Uspeh",error:"Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova."},errors:{doNotHonor:"Zavrnjeno brez pojasnila",insufficientFunds:"Nezadostna sredstva",limitExceeded:"Prekoračena omejitev",expiredCard:"Kartica je potekla",invalidCreditCardNumber:"Neveljavna številka kartice",processorDeclinedFraudSuspected:"Procesor zavrnil – sum goljufije",cardholderAuthenticationRequired:"Zahtevana je overitev imetnika kartice",offlineIssuerDeclined:"Izdajatelj brez povezave – zavrnjeno",cardReportedAsLostOrStolen:"Kartica prijavljena kot izgubljena ali ukradena",invalidSecurePaymentData:"Neveljavni varni plačilni podatki",declined:"Vaša kartica je bila zavrnjena. Prosimo, poskusite z drugo kartico.",errorText:"Napaka",venmoClosed:"Okno je bilo zaprto, preden je lahko prišlo do tokenizacije.",paypalClosed:"Okno je zaprto, vrste ni mogoče določiti",paypalPopupClosed:"Zaznano zaprtje pojavnega okna",applePayClosed:"Preklicano"}},sv:{card:{required:"OBLIGATORISKT",number:{label:"Kortnummer",error:{invalid:"Ditt kortnummer är ogiltigt",incomplete:"Kortnumret är ofullständigt",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Sista giltighetsdag",placeholder:"MM / ÅÅ",error:{incomplete:"Kortets utgångsdatum är ofullständigt",invalid:"Kortets utgångsdatum är ogiltigt",expired:"Ditt kort har gått ut"}},cvc:{label:"Säkerhetskod",placeholder:"CVC",error:{incomplete:"Kortets säkerhetskod är ofullständig",invalid:"Kortets CVC-kod är ogiltig"}},name:{label:"Kortinnehavarens namn",placeholder:"Fullständigt namn",error:{invalid:"Ange ditt fullständiga namn"}},pay:{button:"Betala"},compact:{button:"Kort"}},status:{success:"Framgång",error:"Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen."},errors:{doNotHonor:"Nekad utan förklaring",insufficientFunds:"Otillräckliga medel",limitExceeded:"Gräns överskriden",expiredCard:"Kortet har gått ut",invalidCreditCardNumber:"Ogiltigt kortnummer",processorDeclinedFraudSuspected:"Nekad av processor – misstänkt bedrägeri",cardholderAuthenticationRequired:"Korthavarautentisering krävs",offlineIssuerDeclined:"Utfärdare offline – nekad",cardReportedAsLostOrStolen:"Kort anmält som förlorat eller stulet",invalidSecurePaymentData:"Ogiltiga säkra betalningsdata",declined:"Ditt kort nekades. Vänligen, prova ett annat kort.",errorText:"Fel",venmoClosed:"Fönstret stängdes innan tokenisering kunde utföras.",paypalClosed:"Fönstret är stängt, kan inte avgöra typ",paypalPopupClosed:"Upptäckt stängning av popup‑fönster",applePayClosed:"Avbruten"}},th:{card:{required:"ต้องป้อนข้อมูล",number:{label:"หมายเลขบัตร",error:{invalid:"หมายเลขบัตรของคุณไม่ถูกต้อง",incomplete:"หมายเลขบัตรของคุณไม่ครบถ้วน",unsupported:"ประเภทบัตรของคุณไม่ถูกต้อง"}},expiry:{label:"วันหมดอายุ",placeholder:"ดด / ปป",error:{incomplete:"วันที่หมดอายุของบัตรไม่ครบถ้วน",invalid:"วันที่หมดอายุของบัตรไม่ถูกต้อง",expired:"บัตรของคุณหมดอายุแล้ว"}},cvc:{label:"รหัสความปลอดภัย",placeholder:"CVC",error:{incomplete:"รหัสความปลอดภัยของบัตรไม่ครบถ้วน",invalid:"CVC ของบัตรไม่ถูกต้อง"}},name:{label:"ชื่อเจ้าของบัตร",placeholder:"ชื่อ-นามสกุล",error:{invalid:"โปรดป้อนชื่อ-นามสกุล"}},pay:{button:"ชำระเงิน"},compact:{button:"การ์ด"}},status:{success:"ความสำเร็จ",error:"เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"},errors:{doNotHonor:"ปฏิเสธโดยไม่มีเหตุผล",insufficientFunds:"ยอดเงินไม่เพียงพอ",limitExceeded:"เกินวงเงิน",expiredCard:"บัตรหมดอายุ",invalidCreditCardNumber:"หมายเลขบัตรไม่ถูกต้อง",processorDeclinedFraudSuspected:"ตัวประมวลผลปฏิเสธ – สงสัยการทุจริต",cardholderAuthenticationRequired:"ต้องมีการยืนยันตัวตนของผู้ถือบัตร",offlineIssuerDeclined:"ผู้ออกบัตรออฟไลน์ปฏิเสธ",cardReportedAsLostOrStolen:"บัตรถูกรายงานว่าหายหรือถูกขโมย",invalidSecurePaymentData:"ข้อมูลการชำระเงินที่ปลอดภัยไม่ถูกต้อง",declined:"บัตรของคุณถูกปฏิเสธ กรุณาลองใช้บัตรอื่น.",errorText:"ข้อผิดพลาด",venmoClosed:"หน้าต่างถูกปิดก่อนที่จะทำการสร้างโทเค็นได้.",paypalClosed:"หน้าต่างถูกปิด ไม่สามารถระบุประเภทได้",paypalPopupClosed:"ตรวจพบการปิดหน้าต่างป๊อปอัป",applePayClosed:"ยกเลิกแล้ว"}},tr:{card:{required:"GEREKLI",number:{label:"Kart numarası",error:{invalid:"Kart numaranız geçersiz",incomplete:"Kart numaranız eksik",unsupported:"Desteklenmeyen kart türü"}},expiry:{label:"Son Kullanma Tarihi",placeholder:"AA / YY",error:{incomplete:"Kartınızın son kullanma tarihi eksik",invalid:"Kartınızın son kullanım tarihi geçersiz",expired:"Kartınızın süresi dolmuş"}},cvc:{label:"Güvenlik kodu",placeholder:"CVC",error:{incomplete:"Kartınızın güvenlik kodu eksik",invalid:"Kartınızın CVC'si geçersiz"}},name:{label:"Kart sahibinin adı",placeholder:"Ad ve soyadı",error:{invalid:"Lütfen tam adınızı girin"}},pay:{button:"Öde"},compact:{button:"Kart"}},status:{success:"Başarı",error:"Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin."},errors:{doNotHonor:"Açıklamasız reddedildi",insufficientFunds:"Yetersiz bakiye",limitExceeded:"Limit aşıldı",expiredCard:"Kartın süresi dolmuş",invalidCreditCardNumber:"Geçersiz kart numarası",processorDeclinedFraudSuspected:"İşlemci tarafından reddedildi – şüpheli dolandırıcılık",cardholderAuthenticationRequired:"Kart sahibinin kimlik doğrulaması gerekli",offlineIssuerDeclined:"Çevrimdışı sağlayıcı reddetti",cardReportedAsLostOrStolen:"Kart kayıp veya çalıntı olarak bildirildi",invalidSecurePaymentData:"Geçersiz güvenli ödeme verisi",declined:"Kartınız reddedildi. Lütfen farklı bir kart deneyin.",errorText:"Hata",venmoClosed:"Tokenleştirme gerçekleşmeden önce pencere kapatıldı.",paypalClosed:"Pencere kapalı, tür belirlenemiyor",paypalPopupClosed:"Açılır pencere kapanması algılandı",applePayClosed:"İptal edildi"}},vi:{card:{required:"BẮT BUỘC",number:{label:"Số thẻ",error:{invalid:"Số thẻ của quý vị không hợp lệ",incomplete:"Số thẻ của quý vị 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 trên thẻ không hợp lệ",invalid:"Ngày hết hạn của thẻ không hợp lệ",expired:"Thẻ của quý vị đã hết hạn"}},cvc:{label:"Mã bảo mật",placeholder:"CVC",error:{incomplete:"Mã bảo mật của thẻ không đầy đủ",invalid:"CVC thẻ của bạn không hợp lệ"}},name:{label:"Tên chủ thẻ",placeholder:"Họ và tên",error:{invalid:"Vui lòng cung cấp tên đầy đủ của bạn"}},pay:{button:"Thanh toán"},compact:{button:"Thẻ"}},status:{success:"Thành công",error:"Chúng tôi không thể xác thực phương thức thanh toán của bạn. Vui lòng chọn phương thức thanh toán khác và thử lại."},errors:{doNotHonor:"Từ chối không rõ lý do",insufficientFunds:"Không đủ tiền",limitExceeded:"Vượt quá hạn mức",expiredCard:"Thẻ đã hết hạn",invalidCreditCardNumber:"Số thẻ không hợp lệ",processorDeclinedFraudSuspected:"Bộ xử lý từ chối – nghi ngờ gian lận",cardholderAuthenticationRequired:"Yêu cầu xác thực chủ thẻ",offlineIssuerDeclined:"Đơn vị phát hành ngoại tuyến từ chối",cardReportedAsLostOrStolen:"Thẻ được báo mất hoặc bị đánh cắp",invalidSecurePaymentData:"Dữ liệu thanh toán bảo mật không hợp lệ",declined:"Thẻ của bạn đã bị từ chối. Vui lòng thử thẻ khác.",errorText:"Lỗi",venmoClosed:"Cửa sổ đã đóng trước khi quá trình token hóa có thể diễn ra.",paypalClosed:"Cửa sổ đã đóng, không thể xác định loại",paypalPopupClosed:"Phát hiện đóng cửa sổ bật lên",applePayClosed:"Đã hủy"}},zh:{card:{required:"必填",number:{label:"卡号",error:{invalid:"您的卡号无效",incomplete:"您的银行卡卡号不完整",unsupported:"不支持的卡类型"}},expiry:{label:"有效期",placeholder:"月份 / 年份",error:{incomplete:"您银行卡的有效期不完整",invalid:"您银行卡的有效期无效",expired:"您的银行卡已过期"}},cvc:{label:"安全代码",placeholder:"CVC",error:{incomplete:"您银行卡的安全码不完整",invalid:"您银行卡的 CVC 无效"}},name:{label:"持卡人姓名",placeholder:"全名",error:{invalid:"请提供您的全名"}},pay:{button:"支付"},compact:{button:"卡片"}},status:{success:"成功",error:"我们无法验证您的付款方式。请选择其他付款方式并重试。"},errors:{doNotHonor:"无理由拒绝",insufficientFunds:"资金不足",limitExceeded:"超出限额",expiredCard:"卡片已过期",invalidCreditCardNumber:"卡号无效",processorDeclinedFraudSuspected:"处理方拒绝 – 疑似欺诈",cardholderAuthenticationRequired:"需要持卡人身份验证",offlineIssuerDeclined:"离线发卡机构拒绝",cardReportedAsLostOrStolen:"卡片已被报告丢失或被盗",invalidSecurePaymentData:"无效的安全支付数据",declined:"您的银行卡已被拒绝。请尝试使用另一张卡。",errorText:"错误",venmoClosed:"在完成令牌化之前窗口已关闭。",paypalClosed:"窗口已关闭,无法确定类型",paypalPopupClosed:"检测到弹出窗口关闭",applePayClosed:"已取消"}}},Nr=()=>{const r=navigator==null?void 0:navigator.language.split("-")[0];return kr[r]||kr.en},Di=(r,t={})=>{var i,o,s,l,c,d,u,h,p,f,m,v,y,A,x,N,I,P,k,S,U,q,$,F,z,B,Z,D,Y,H,E,g,R,V,b,T,_,O,M,C,j,Q,ae,L,ee,be,Ki,Hi;if(!r)return Nr();const e=kr[r]||Nr(),n=Object.keys(Si.errors||{}).reduce((qi,Hc)=>(qi[Hc]=e.status.error,qi),{}),a=K(K(K({},n),e.errors||{}),t.errors||{});return{card:{required:((i=t==null?void 0:t.card)==null?void 0:i.required)||e.card.required,number:{label:((s=(o=t==null?void 0:t.card)==null?void 0:o.number)==null?void 0:s.label)||e.card.number.label,error:{invalid:((d=(c=(l=t==null?void 0:t.card)==null?void 0:l.number)==null?void 0:c.error)==null?void 0:d.invalid)||e.card.number.error.invalid,incomplete:((p=(h=(u=t==null?void 0:t.card)==null?void 0:u.number)==null?void 0:h.error)==null?void 0:p.incomplete)||e.card.number.error.incomplete,unsupported:((v=(m=(f=t==null?void 0:t.card)==null?void 0:f.number)==null?void 0:m.error)==null?void 0:v.unsupported)||e.card.number.error.unsupported}},expiry:{label:((A=(y=t==null?void 0:t.card)==null?void 0:y.expiry)==null?void 0:A.label)||e.card.expiry.label,placeholder:((N=(x=t==null?void 0:t.card)==null?void 0:x.expiry)==null?void 0:N.placeholder)||e.card.expiry.placeholder,error:{invalid:((k=(P=(I=t==null?void 0:t.card)==null?void 0:I.expiry)==null?void 0:P.error)==null?void 0:k.invalid)||e.card.expiry.error.invalid,incomplete:((q=(U=(S=t==null?void 0:t.card)==null?void 0:S.expiry)==null?void 0:U.error)==null?void 0:q.incomplete)||e.card.expiry.error.incomplete,expired:((z=(F=($=t==null?void 0:t.card)==null?void 0:$.expiry)==null?void 0:F.error)==null?void 0:z.expired)||e.card.expiry.error.expired}},cvc:{label:((Z=(B=t==null?void 0:t.card)==null?void 0:B.cvc)==null?void 0:Z.label)||e.card.cvc.label,placeholder:((Y=(D=t==null?void 0:t.card)==null?void 0:D.cvc)==null?void 0:Y.placeholder)||e.card.cvc.placeholder,error:{incomplete:((g=(E=(H=t==null?void 0:t.card)==null?void 0:H.cvc)==null?void 0:E.error)==null?void 0:g.incomplete)||e.card.cvc.error.incomplete,invalid:((b=(V=(R=t==null?void 0:t.card)==null?void 0:R.cvc)==null?void 0:V.error)==null?void 0:b.invalid)||e.card.cvc.error.invalid}},name:{label:((_=(T=t==null?void 0:t.card)==null?void 0:T.name)==null?void 0:_.label)||e.card.name.label,placeholder:((M=(O=t==null?void 0:t.card)==null?void 0:O.name)==null?void 0:M.placeholder)||e.card.name.placeholder,error:{invalid:((Q=(j=(C=t==null?void 0:t.card)==null?void 0:C.name)==null?void 0:j.error)==null?void 0:Q.invalid)||e.card.name.error.invalid}},pay:{button:((L=(ae=t==null?void 0:t.card)==null?void 0:ae.pay)==null?void 0:L.button)||e.card.pay.button},compact:{button:((be=(ee=t==null?void 0:t.card)==null?void 0:ee.compact)==null?void 0:be.button)||e.card.compact.button}},status:{success:((Ki=t==null?void 0:t.status)==null?void 0:Ki.success)||e.status.success,error:((Hi=t==null?void 0:t.status)==null?void 0:Hi.error)||e.status.error},errors:a}};class Ec extends Lt{constructor(){super({messages:Nr(),locale:(navigator==null?void 0:navigator.language.split("-")[0])||"en"})}setMessages(t){const e=this.locale(),n=Di(e,t);this.setState({locale:e,messages:n,overrides:t})}setLocale(t){const e=this.overrides(),n=Di(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"}}/*!
286
+ <span class="${re.srOnly}">Success</span>
287
+ `);w(this,"element",document.createElement("div"));this.element.classList.add(re.successContainer),this.element.innerHTML=this.template}render(){return this.element}}const Pi={container:"_container_79xkl_1",title:"_title_79xkl_5"};class ol{constructor(t){w(this,"element");w(this,"message",document.createElement("p"));w(this,"icon",new sl);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(Pi.container),this.message.classList.add(Pi.title),this.message.textContent=t.messages().status.success,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:e})=>{this.message.textContent=e.status.success})}addClassName(t){this.element.classList.add(t)}removeClassName(t){this.element.classList.remove(t)}render(){return this.element}}const ki={container:"_container_1cz9d_1",title:"_title_1cz9d_10"},vt=class vt{constructor(t){w(this,"element");w(this,"message",document.createElement("p"));w(this,"icon",new Lt);w(this,"hasCustomMessage",!1);this.translate=t,this.element=document.createElement("div"),this.element.classList.add(ki.container),this.message.classList.add(ki.title),this.message.textContent=t.messages().status.error,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:e})=>{this.hasCustomMessage||(this.message.textContent=e.status.error)}),vt.instances.add(this)}setMessage(t){this.message.textContent=t,this.hasCustomMessage=!!t}addClassName(t){this.element.classList.add(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 vt.instances)t.element.style.display="none"}render(){return this.element}};w(vt,"instances",new Set);let Ir=vt;class cl{constructor(t){w(this,"isLoading",!1);w(this,"isFormOpen",!1);w(this,"closedHeight",0);w(this,"checkout");w(this,"container",document.createElement("div"));w(this,"loader",new Jo);w(this,"success");w(this,"buttons");w(this,"form");w(this,"error");w(this,"errorPrevHeight",null);this.config=t,this.buttons=new Hc(t),this.form=new al({translate:t.state.translate,className:ge.hidden,stylesState:t.state.styles,isDefaultVariant:t.state.checkout.getState().variant==="default"}),this.success=new ol(t.state.translate),this.success.addClassName(ge.hidden),this.error=new Ir(t.state.translate),this.error.hide(),this.container.append(this.loader.render(),this.buttons.render(),this.form.render()),this.checkout=document.createElement("div"),this.checkout.classList.add(ge.checkout),this.checkout.append(this.container,this.error.render(),this.success.render())}init(){return Y(this,null,function*(){this.buttons.addEventListener("onPaymentAttempt",t=>{var r;const e=this.config.state.checkout.getState();(r=e.onCheckoutAttempt)==null||r.call(e,{paymentMethod:t}),this.hideError()}),this.buttons.addEventListener("ready",()=>Y(this,null,function*(){var e;this.loader.setClassName(ge.hidden);const{variant:t}=this.config.state.checkout.getState();if(this.form.setDefaultVariant(t==="default"),this.buttons.showButton(),t==="default"){const r=this.checkout.getBoundingClientRect().height;r<292&&(this.checkout.style.height=`${r}px`),this.form.element.classList.remove(ge.hidden),r<292&&(yield(e=this.checkout.animate({height:[`${r}px`,"292px"]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?e:Promise.resolve(),this.checkout.style.height=""),this.isFormOpen=!0}})),this.buttons.addEventListener("open",()=>Y(this,null,function*(){var a;if(this.isLoading)return;this.hideError();const t=this.checkout.getBoundingClientRect().height;this.closedHeight=t,t<292&&(this.checkout.style.height=`${t}px`),yield pe(this.buttons.buttons,Ot.close,Ot.transition),this.buttons.buttons.classList.add(ge.hidden),this.form.element.classList.add(ge.formInitial),this.form.element.classList.remove(ge.hidden);const e=t;let r=null;e<292&&(this.checkout.style.height=`${e}px`,r=(a=this.checkout.animate({height:[`${e}px`,"292px"]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?a:Promise.resolve()),yield Promise.all([pe(this.form.element,$e.open,$e.transition),r!=null?r:Promise.resolve()]),e<292&&(this.checkout.style.height=""),this.isFormOpen=!0})),this.buttons.addEventListener("error",t=>{const{onCheckoutFail:e}=this.config.state.checkout.getState(),r=this.config.state.translate.messages(),a=xt(t,r);this.showError(a),e==null||e({status:"failed",status_reason:{advice_code:"try_again_later",decline_code:Tt.GENERIC_DECLINE,message:t.message||t}})}),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",()=>Y(this,null,function*(){var i;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({height:[`${t}px`,`${this.closedHeight}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?i:Promise.resolve()),yield pe(this.form.element,$e.close,$e.transition),this.form.element.classList.add(ge.hidden);const{variant:a}=this.config.state.checkout.getState();if(a!=="default"){this.buttons.buttons.classList.add(ge.btnsInitial),this.buttons.buttons.classList.remove(ge.hidden);const s=pe(this.buttons.buttons,Ot.open,Ot.transition);yield Promise.all([s,e!=null?e:Promise.resolve()])}this.closedHeight>0&&(this.checkout.style.height=""),this.isFormOpen=!1})),this.form.addEventListener("submit",t=>Y(this,null,function*(){if(this.isLoading||(this.form.touchSubmit(),this.hideError(),!this.form.validate()))return;const r=t.number.replace(/\D/g,""),a=this.config.state.checkout.getState(),i=this.config.service.ev.getEv(),[s,o]=yield Promise.all([i.encrypt(r),i.encrypt(t.cvc)]),[c,l]=t.expiry.split("/");yield this.handleSuccess({clientSession:a.clientToken,card:{firstSixDigits:r.slice(0,6),lastFourDigits:r.slice(-4),expMonth:Number(c),expYear:Number(l),cardBrand:t.cardBrand||"",number:s,cvc:o,type:q.CARD,metadata:{name:t.name,userAgent:navigator==null?void 0:navigator.userAgent}}})})),this.form.addEventListener("onPaymentAttempt",t=>{var r;const e=this.config.state.checkout.getState();(r=e.onCheckoutAttempt)==null||r.call(e,{paymentMethod:t}),this.hideError()}),yield this.buttons.init()})}handleError(t){var i;const e=this.config.state.checkout.getState();console.error("Error: ",t);const r=this.config.state.translate.messages(),a=xt(t,r);this.showError(a),(i=e.onCheckoutFail)==null||i.call(e,t),this.setLoading(!1)}handleSuccess(t){return Y(this,null,function*(){var a,i;if(this.isLoading)return;this.hideError(),this.setLoading(!0);const e=this.config.state.checkout.getState(),r=this.config.state.translate.messages();try{const s=yield _c(t,e.environment,e.apiVersion);if(s.error)throw new Error(((a=s.error)==null?void 0:a.message)||r.status.error);if(s.three_ds_session_id){yield this.config.service.ev.initThreeDs({threeDsId:s.three_ds_session_id,onSuccess:()=>{this.setLoading(!1),this.handleSuccess(ee(K({},t),{threeDsSessionId:s.three_ds_session_id}))},onError:()=>{this.handleError({status:"failed",status_reason:{advice_code:"try_again_later",decline_code:Tt.GENERIC_DECLINE,message:"Three DS Error"}})}});return}if(s.payment_status===Cr.FAILED||s.payment_status===Cr.DECLINED){this.handleError(s.status_reason);return}yield this.showSuccess(),(i=e.onCheckoutComplete)==null||i.call(e,s),this.setLoading(!1)}catch(s){this.handleError({status:"failed",status_reason:{advice_code:"try_again_later",decline_code:Tt.GENERIC_DECLINE,message:s.message||s}})}})}showSuccess(){return Y(this,null,function*(){this.container.classList.add(ge.hidden),this.success.removeClassName(ge.hidden),yield pe(this.success.element,$e.open,$e.transition)})}hideError(){var t;if(this.error.hide(),this.errorPrevHeight!==null){const e=this.checkout.getBoundingClientRect().height;this.checkout.style.height=`${e}px`,((t=this.checkout.animate({height:[`${e}px`,`${this.errorPrevHeight}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?t:Promise.resolve()).then(()=>{this.checkout.style.height="",this.errorPrevHeight=null}).catch(()=>{this.checkout.style.height="",this.errorPrevHeight=null})}}showError(t){var e;if(t&&this.error.setMessage(t),this.error.show(),this.errorPrevHeight===null){const r=this.checkout.getBoundingClientRect().height;this.errorPrevHeight=r;const a=r+92;this.checkout.style.height=`${r}px`,((e=this.checkout.animate({height:[`${r}px`,`${a}px`]},{duration:250,easing:"ease-out",fill:"forwards"}).finished)!=null?e:Promise.resolve()).then(()=>{}).catch(()=>{})}}setLoading(t){this.isLoading=t,this.form.setLoading(t),this.loader.setClassName(!t||this.isFormOpen?ge.hidden:"")}render(){return this.checkout}}class ll{constructor(t){w(this,"component");this.config=t}init(){return Y(this,null,function*(){const{checkout:t,transaction:e,translate:r,styles:a}=this.config.state,{apiVersion:i}=t.getState();t.subscribe(({clientToken:s,environment:o,locale:c,translate:l,styles:d})=>{c&&r.locale()!==c&&r.setLocale(c),l&&r.overrides()!==l&&r.setMessages(l),d&&a.setState(d),e.updateTransaction(s,o,i).then(u=>{var h,p;if(u)return this.config.service.ev.initEv({teamId:(h=u.evervault)==null?void 0:h.team_id,appId:(p=u.evervault)==null?void 0:p.app_id})}).catch(console.error)})})}mount(){return Y(this,null,function*(){return this.component||(this.component=new cl(this.config)),yield this.init(),yield this.component.init(),this.component.render()})}}class Pt{constructor(t){w(this,"initialState");w(this,"state");w(this,"observer",new ce);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 dl={clientToken:"",environment:"sandbox",apiVersion:"1.0.0",variant:"default"};class ul extends Pt{constructor(t){super(K(K({},dl),t))}}const pl={};class hl extends Pt{constructor(t){super(K(K({},pl),t))}}class fl extends Pt{constructor(e){super(e||null);w(this,"clientToken","")}updateTransaction(e,r,a){return Y(this,null,function*(){if(this.clientToken===e)return this.getState();this.clientToken=e;const i=yield Cc(e,r,a);return this.setState(i),i})}}const ml={card:{required:"يتطلب",number:{label:"رقم البطاقة",error:{invalid:"رقم البطاقة غير صالح",incomplete:"رقم البطاقة غير كامل",unsupported:"نوع البطاقة غير المدعوم"}},expiry:{label:"تاريخ الانتهاء",placeholder:"سنة / شهر",error:{invalid:"تاريخ انتهاء صلاحية البطاقة غير صالح",incomplete:"تاريخ انتهاء الصلاحية الخاص ببطاقتك غير كامل",expired:"تاريخ انتهاء صلاحية بطاقتك في الماضي"}},cvc:{label:"رمز الأمان",placeholder:"CVC",error:{incomplete:"رمز الأمان الخاص ببطاقتك غير كامل",invalid:"رمز التحقق من البطاقة (CVC) الخاص ببطاقتك غير صالح"}},name:{label:"اسم حامل البطاقة",placeholder:"الاسم الكامل على البطاقة",error:{invalid:"يرجى إدخال اسمك الكامل"}},pay:{button:"الراتب"},compact:{button:"البطاقة"}},status:{success:"تمت عملية الدفع الخاصة بك بنجاح!",error:"لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."}},vl={card:{required:"ЗАДЪЛЖИТЕЛНО",number:{label:"Информация за картата",error:{invalid:"Номерът на Вашата карта е неправилен",incomplete:"Номерът на Вашата карта е непълен",unsupported:"Неподдържан тип карта"}},expiry:{label:"Дата на валидност",placeholder:"ММ / ГГ",error:{incomplete:"Датата на валидност на вашата карта е непълна",invalid:"Датата на валидност на вашата карта е невалидна",expired:"Датата на валидност на вашата карта е в миналото"}},cvc:{label:"Код за сигурност",placeholder:"CVC",error:{incomplete:"Кодът за сигурност на вашата карта е непълен",invalid:"Кодът за сигурност на вашата карта е невалиден"}},name:{label:"Име на картодържателя",placeholder:"Пълно име върху картата",error:{invalid:"Моля, въведете трите си имена"}},pay:{button:"Платете"},compact:{button:"Карта"}},status:{success:"Успех",error:"Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."}},gl={card:{required:"POVINNÝ ÚDAJ",number:{label:"Číslo karty",error:{invalid:"Číslo Vaší karty je neplatné",incomplete:"Číslo vaší karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Datum konce platnosti",placeholder:"MM / RR",error:{incomplete:"Datum konce platnosti vaší karty je neúplné",invalid:"Datum konce platnosti karty je neplatné",expired:"Platnost vaší karty vypršela"}},cvc:{label:"Bezpečnostní kód",placeholder:"CVC",error:{incomplete:"Bezpečnostní kód vaší karty je neúplný",invalid:"CVC vaší karty je neplatné"}},name:{label:"Jméno držitele karty",placeholder:"Celé jméno",error:{invalid:"Uvďte prosím celé své jméno"}},pay:{button:"Platit"},compact:{button:"Karta"}},status:{success:"Úspěch",error:"Váš způsob platby se nám nedaří ověřit. Zvolte prosím jiný způsob platby a zkuste to znovu."}},yl={card:{required:"PÅKRÆVET",number:{label:"Kortnummer",error:{invalid:"Kortnummeret er ugyldigt",incomplete:"Kortnummeret er ufuldstændigt",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Udløbsdato",placeholder:"MM / ÅÅ",error:{incomplete:"Kortets udløbsdato er ikke komplet",invalid:"Dit korts udløbsdato er ugyldig",expired:"Dit kort er udløbet"}},cvc:{label:"Sikkerhedskode",placeholder:"CVC",error:{incomplete:"Dit korts sikkerhedskode er ikke komplet",invalid:"Dit korts CVC er ugyldigt"}},name:{label:"Kortholderens navn",placeholder:"Fulde navn",error:{invalid:"Angiv dit fulde navn"}},pay:{button:"Betal"},compact:{button:"Kredit- eller betalingskort"}},status:{success:"Succes",error:"Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen."}},bl={card:{required:"Pflichtfeld",number:{label:"Kartennummer",error:{invalid:"Ihre Kartennummer ist ungültig",incomplete:"Ihre Kartennummer ist unvollständig",unsupported:"Nicht unterstützter Kartentyp"}},expiry:{label:"Ablaufdatum",placeholder:"MM / JJ",error:{incomplete:"Das Ablaufdatum Ihrer Karte ist unvollständig",invalid:"Das Ablaufdatum Ihrer Karte ist ungültig",expired:"Ihre Karte ist ungültig"}},cvc:{label:"Sicherheitscode",placeholder:"CVC",error:{incomplete:"Der Sicherheitscode Ihrer Karte ist unvollständig",invalid:"Die Prüfziffer/CVC Ihrer Karte ist ungültig"}},name:{label:"Name des/der Karteninhaber",placeholder:"Vollständiger Name",error:{invalid:"Bitte geben Sie Ihren vollständigen Namen ein"}},pay:{button:"Bezahlen"},compact:{button:"Kredit- oder Debitkarte"}},status:{success:"Erfolg",error:"Wir können Ihre Zahlungsmethode nicht authentifizieren. Bitte wählen Sie eine andere Zahlungsmethode und versuchen Sie es erneut."}},_l={card:{required:"Απαιτούμενο",number:{label:"Αριθμός κάρτας",error:{invalid:"Ο αριθμός της κάρτας σας δεν είναι έγκυρος",incomplete:"Ο αριθμός της κάρτας σας είναι ελλιπής",unsupported:"Δεν υποστηρίζεται ο τύπος της κάρτας"}},expiry:{label:"Ημερομηνία λήξης",placeholder:"ΜΜ / ΕΕ",error:{incomplete:"Η ημερομηνία λήξης της κάρτας σας είναι ελλιπής",invalid:"Η ημερομηνία λήξης της κάρτας σας δεν είναι έγκυρη",expired:"Η κάρτα σας έχει λήξει"}},cvc:{label:"Κωδικός ασφαλείας",placeholder:"CVC",error:{incomplete:"Ο κωδικός ασφαλείας της κάρτας σας είναι ελλιπής",invalid:"Το CVC της κάρτας σας δεν είναι έγκυρο"}},name:{label:"Όνομα κατόχου κάρτας",placeholder:"Πλήρες όνομα στην κάρτα",error:{invalid:"Συμπληρώστε το ονοματεπώνυμό σας"}},pay:{button:"Πληρωμή"},compact:{button:"Kάρτα"}},status:{success:"Επιτυχία",error:"Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."}},Ri={card:{required:"REQUIRED",number:{label:"Card number",error:{invalid:"Your card number is invalid",incomplete:"Your card number is incomplete",unsupported:"Unsupported card type"}},expiry:{label:"Expiry date",placeholder:"MM / YY",error:{invalid:"Your card’s expiry date is invalid",incomplete:"Your card’s expiry date is incomplete",expired:"Your card’s expiry {date} is in the past"}},cvc:{label:"Security code",placeholder:"CVC",error:{incomplete:"Your card’s security code is incomplete",invalid:"Your card’s CVC is invalid"}},name:{label:"Cardholder name",placeholder:"Full name on card",error:{invalid:"Please provide your full name"}},pay:{button:"Pay"},compact:{button:"Card"}},status:{success:"Your payment was successful!",error:"We are unable to authenticate your payment method. Please choose a different payment method and try again."}},xr={ar:ml,en:Ri,bg:vl,cs:gl,da:yl,de:bl,el:_l,es:{card:{required:"OBLIGATORIO",number:{label:"Número de tarjeta",error:{invalid:"El número de tu tarjeta no es válido",incomplete:"El número de tu tarjeta está incompleto",unsupported:"Tipo de tarjeta no soportado"}},expiry:{label:"Fecha de caducidad",placeholder:"MM / AA",error:{incomplete:"La fecha de caducidad de la tarjeta está incompleta",invalid:"La fecha de caducidad de la tarjeta no es válida",expired:"La tarjeta ha caducado"}},cvc:{label:"Código de seguridad",placeholder:"CVC",error:{incomplete:"El código de seguridad de la tarjeta está incompleto",invalid:"El CVC de tu tarjeta no es válido"}},name:{label:"Nombre del titular de la tarjeta",placeholder:"Nombre completo",error:{invalid:"Proporciona tu nombre completo"}},pay:{button:"Pagar"},compact:{button:"Tarjeta"}},status:{success:"Éxito",error:"No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo."}},et:{card:{required:"NÕUTAV",number:{label:"Kaardi number",error:{invalid:"Teie kaardinumber ei sobi",incomplete:"Teie kaardinumber on puudulik",unsupported:"Toetamata kaardi tüüp"}},expiry:{label:"Aegumiskuupäev",placeholder:"KK / AA",error:{incomplete:"Teie kaardi aegumiskuupäev on puudulik",invalid:"Teie kaardi aegumiskuupäev on kehtetu",expired:"Teie kaart on aegunud"}},cvc:{label:"Turvakood",placeholder:"CVC",error:{incomplete:"Teie kaardi turvakood on puudulik",invalid:"Teie kaardi CVC on kehtetu"}},name:{label:"Kaardiomaniku nimi",placeholder:"Täisnimi",error:{invalid:"Esitage oma täisnimi"}},pay:{button:"Maksa"},compact:{button:"Krediit- või deebetkaart"}},status:{success:"Edu",error:"Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti."}},fi:{card:{required:"PAKOLLINEN",number:{label:"Kortin numero",error:{invalid:"Kortin numero ei kelpaa",incomplete:"Kortin numero on puutteellinen",unsupported:"Ei tuettu korttityyppi"}},expiry:{label:"Erääntymispäivä",placeholder:"KK / VV",error:{incomplete:"Kortin voimassaoloaika on puutteellinen",invalid:"Kortin voimassaoloaika on virheellinen",expired:"Korttisi on vanhentunut"}},cvc:{label:"Turvakoodi",placeholder:"CVC-koodi",error:{incomplete:"Kortin turvakoodi on puutteellinen",invalid:"Kortin CVC ei kelpaa"}},name:{label:"Kortinhaltijan nimi",placeholder:"Koko nimi",error:{invalid:"Anna koko nimesi"}},pay:{button:"Maksa"},compact:{button:"Luotto- tai pankkikortti"}},status:{success:"Menestys",error:"Emme pysty todentamaan maksutapaasi. Valitse toinen maksutapa ja yritä uudelleen."}},fil:{card:{required:"KAILANGAN",number:{label:"Numero ng card",error:{invalid:"Hindi valid ang numero ng kard mo",incomplete:"Ang numero ng iyong kard ay kulang",unsupported:"Hindi sinusuportahang uri ng card"}},expiry:{label:"Petsa ng pagkapaso",placeholder:"BB / TT",error:{incomplete:"Ang petsa ng pagkapaso ng iyong kard ay kulang",invalid:"Hindi valid ang petsa ng pagkapaso ng iyong kard",expired:"Napaso na ang iyong kard"}},cvc:{label:"Security code",placeholder:"CVC",error:{incomplete:"Ang security code ng iyong kard ay kulang",invalid:"Hindi valid ang CVC ng iyong kard"}},name:{label:"Pangalan ng may-ari ng kard",placeholder:"Buong pangalan",error:{invalid:"Pakibigay ang iyong buong pangalan"}},pay:{button:"Magbayad"},compact:{button:"Luotto- tai pankkikortti"}},status:{success:"Tagumpay",error:"Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli."}},fr:{card:{required:"OBLIGATOIRE",number:{label:"Numéro de la carte",error:{invalid:"Votre numéro de carte n'est pas valide",incomplete:"Votre numéro de carte est incomplet",unsupported:"Type de carte non supporté"}},expiry:{label:"Date d'expiration",placeholder:"MM / AA",error:{incomplete:"La date d'expiration de votre carte est incomplète",invalid:"La date d'expiration de votre carte n'est pas valide",expired:"Votre carte a expiré"}},cvc:{label:"Code de sécurité",placeholder:"CVC",error:{incomplete:"Le code de sécurité de votre carte est incomplet",invalid:"Le code CVC de votre carte n'est pas valide"}},name:{label:"Nom du titulaire de la carte",placeholder:"Nom complet",error:{invalid:"Veuillez indiquer votre nom complet"}},pay:{button:"Payer"},compact:{button:"Carte"}},status:{success:"Succès",error:"Nous ne sommes pas en mesure d'authentifier votre méthode de paiement. Veuillez choisir un autre mode de paiement et réessayer."}},hr:{card:{required:"POTREBNO",number:{label:"Broj kartice",error:{invalid:"Broj vaše kartice nije valjan",incomplete:"Broj vaše kartice nije potpun",unsupported:"Nepodržana vrsta kartice"}},expiry:{label:"Datum isteka",placeholder:"MM / GG",error:{incomplete:"Datum isteka vaše kartice je nepotpun",invalid:"Datum isteka vaše kartice nije valjan",expired:"Kartica je istekla"}},cvc:{label:"Sigurnosni kod",placeholder:"CVC",error:{incomplete:"Sigurnosni kôd vaše kartice je nepotpun",invalid:"Kontrolni broj (CVC) vaše kartice nije valjan"}},name:{label:"Ime vlasnika kartice",placeholder:"Puno ime",error:{invalid:"Unesite svoje puno ime"}},pay:{button:"Plati"},compact:{button:"Kartica"}},status:{success:"Uspjeh",error:"Ne možemo provjeriti autentičnost vašeg načina plaćanja. Odaberite drugi način plaćanja i pokušajte ponovno."}},hu:{card:{required:"KÖTELEZŐ",number:{label:"Kártya száma",error:{invalid:"A kártyaszáma érvénytelen",incomplete:"A kártyaszáma hiányos",unsupported:"Nem támogatott kártya típusa"}},expiry:{label:"Lejárat dátuma",placeholder:"HH / ÉÉ",error:{incomplete:"A kártyája lejárati dátuma hiányos",invalid:"A kártyája lejárati dátuma érvénytelen",expired:"A kártyája lejárt"}},cvc:{label:"Biztonsági kód",placeholder:"CVC",error:{incomplete:"A kártyája biztonsági kódja hiányos",invalid:"A kártya CVC-kódja érvénytelen"}},name:{label:"Kártyabirtokos neve",placeholder:"Teljes név",error:{invalid:"Adja meg a teljes nevét"}},pay:{button:"Fizetés"},compact:{button:"Hitel- vagy bankkártya"}},status:{success:"Siker",error:"Nem tudjuk hitelesíteni a fizetési módját. Kérjük, válasszon másik fizetési módot, és próbálja meg újra."}},id:{card:{required:"WAJIB DIISI",number:{label:"Nomor kartu",error:{invalid:"Nomor kartu Anda tidak valid",incomplete:"Nomor kartu Anda tidak lengkap",unsupported:"Tipe kartu tidak didukung"}},expiry:{label:"Tanggal kedaluwarsa",placeholder:"BB / TT",error:{incomplete:"Tanggal kedaluwarsa kartu Anda tidak lengkap",invalid:"Tanggal kedaluwarsa kartu Anda tidak valid",expired:"Kartu Anda telah kedaluwarsa"}},cvc:{label:"Kode keamanan",placeholder:"CVC",error:{incomplete:"Kode keamanan kartu Anda tidak lengkap",invalid:"CVC kartu Anda tidak valid"}},name:{label:"Nama pemegang kartu",placeholder:"Nama lengkap",error:{invalid:"Berikan nama lengkap Anda"}},pay:{button:"Bayar"},compact:{button:"Kartu"}},status:{success:"Sukses",error:"Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi."}},it:{card:{required:"OBBLIGATORIO",number:{label:"Numero di carta",error:{invalid:"Il numero della carta non è valido",incomplete:"Il numero della carta è incompleto",unsupported:"Tipo di carta non supportato"}},expiry:{label:"Data di scadenza",placeholder:"MM / AA",error:{incomplete:"La data di scadenza della carta non è completa",invalid:"La data di scadenza della carta non è valida",expired:"La tua carta è scaduta"}},cvc:{label:"Codice di sicurezza",placeholder:"CVC",error:{incomplete:"Il codice di sicurezza della carta non è completo",invalid:"Il CVC della carta non è valido"}},name:{label:"Nome del titolare della carta",placeholder:"Nome e cognome",error:{invalid:"Inserisci il tuo nome completo"}},pay:{button:"Paga"},compact:{button:"Carta"}},status:{success:"Il successo",error:"Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare."}},ja:{card:{required:"必須",number:{label:"カード番号",error:{invalid:"カード番号が無効です",incomplete:"カード番号に不備があります",unsupported:"サポートされていないカードタイプ"}},expiry:{label:"有効期限",placeholder:"MM (月) / YY (年)",error:{incomplete:"カードの有効期限に不備があります",invalid:"カードの有効期間の満了月が無効です",expired:"カードの有効期限が切れています"}},cvc:{label:"セキュリティコード",placeholder:"セキュリティコード",error:{incomplete:"カードのセキュリティコードに不備があります",invalid:"カードのセキュリティコードが無効です"}},name:{label:"カード保有者の名前",placeholder:"氏名",error:{invalid:"氏名を入力してください"}},pay:{button:"支払う"},compact:{button:"カード"}},status:{success:"成功",error:"お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"}},ko:{card:{required:"필수",number:{label:"카드 번호",error:{invalid:"카드 번호가 잘못되었습니다",incomplete:"카드 번호가 불완전합니다",unsupported:"지원되지 않는 카드 유형"}},expiry:{label:"만료 날짜",placeholder:"MM / YY",error:{incomplete:"카드의 유효기간 만료일이 불완전합니다",invalid:"카드의 유효기간 만료일이 잘못되었습니다",expired:"카드가 만료되었습니다"}},cvc:{label:"보안 코드",placeholder:"보안 코드(CVC)",error:{incomplete:"카드의 보안 코드가 불완전합니다",invalid:"카드의 보안 코드(CVC)가 잘못되었습니다"}},name:{label:"카드 소유자 이름",placeholder:"성명",error:{invalid:"성명을 입력하십시오"}},pay:{button:"결제"},compact:{button:"카드 번호"}},status:{success:"성공",error:"결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."}},lt:{card:{required:"PRIVALOMA",number:{label:"Kortelės numeris",error:{invalid:"Negaliojantis kortelės numeris",incomplete:"Neišsamus kortelės numeris",unsupported:"Nepalaikomas kortelės tipas"}},expiry:{label:"Galiojimo pabaigos data",placeholder:"mm / MM",error:{incomplete:"Neišsami jūsų kortelės galiojimo pabaigos data",invalid:"Netinkama jūsų kortelės galiojimo pabaigos data",expired:"Kortelė baigė galioti"}},cvc:{label:"Saugos kodas",placeholder:"CVC",error:{incomplete:"Neišsamus jūsų kortelės saugos kodas",invalid:"Jūsų kortelės CVC negalioja"}},name:{label:"Kortelės turėtojo vardas ir pavardė",placeholder:"Vardas ir pavardė",error:{invalid:"Įveskite ir vardą ir pavardę"}},pay:{button:"Mokėti"},compact:{button:"Kortelė"}},status:{success:"Sėkmė",error:"Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą."}},lv:{card:{required:"OBLIGĀTI",number:{label:"Kartes numurs",error:{invalid:"Kartes numurs nav derīgs",incomplete:"Kartes numurs nav pilnīgs",unsupported:"Nepareizs kartes tips"}},expiry:{label:"Derīguma termiņš",placeholder:"MM / YY",error:{incomplete:"Kartes derīguma termiņa datums nav pilnīgs",invalid:"Kartes derīguma termiņa beigu datums nav derīgs",expired:"Kartes derīgums ir beidzies"}},cvc:{label:"Drošības kods",placeholder:"CVC",error:{incomplete:"Kartes drošības kods nav pilnīgs",invalid:"Kartes CVC nav derīgs"}},name:{label:"Kartes īpašnieka vārds",placeholder:"Vārds, uzvārds",error:{invalid:"Norādiet savu vārdu un uzvārdu"}},pay:{button:"Maksāt"},compact:{button:"Karte"}},status:{success:"Panākumi",error:"Mēs nevaram pārbaudīt jūsu maksājuma metodes autentiskumu. Lūdzu, izvēlieties citu maksājumu metodi un mēģiniet vēlreiz."}},ms:{card:{required:"DIPERLUKAN",number:{label:"Nombor kad",error:{invalid:"Nombor kad anda tidak sah",incomplete:"Nombor kad anda tidak lengkap",unsupported:"Tipe kad tidak sah"}},expiry:{label:"Tarikh tamat tempoh",placeholder:"BB / TT",error:{incomplete:"Tarikh tamat tempoh kad anda tidak lengkap",invalid:"Tarikh tamat tempoh kad anda tidak sah",expired:"Kad anda telah tamat tempoh"}},cvc:{label:"Kod keselamatan",placeholder:"CVC",error:{incomplete:"Kod keselamatan kad anda tidak lengkap",invalid:"CVC kad anda tidak sah"}},name:{label:"Nama pemegang kad",placeholder:"Nama penuh",error:{invalid:"Sila berikan nama penuh anda"}},pay:{button:"Bayar"},compact:{button:"Kad"}},status:{success:"Kejayaan",error:"Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi."}},ru:{card:{required:"ОБЯЗАТЕЛЬНО",number:{label:"Номер карты",error:{invalid:"Неверный номер карты",incomplete:"Номер карты неполон",unsupported:"Неподдерживаемый тип карты"}},expiry:{label:"Срок действия",placeholder:"ММ / ГГ",error:{incomplete:"Срок действия карты указан не полностью",invalid:"Указанный срок действия карты недействителен",expired:"Срок действия карты истек"}},cvc:{label:"Код безопасности",placeholder:"CVC",error:{incomplete:"Код безопасности карты введен не полностью",invalid:"Код CVC карты недействителен"}},name:{label:"Имя владельца карты",placeholder:"Имя, фамилия",error:{invalid:"Введите свое имя и фамилию"}},pay:{button:"Оплатить"},compact:{button:"Кредитная карта"}},status:{success:"Успех",error:"Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."}},mt:{card:{required:"MEĦTIEĠ/A",number:{label:"Numru tal-karta",error:{invalid:"In-numru tal-karta tiegħek mhuwiex tajjeb",incomplete:"In-numru tal-karta tiegħek mhuwiex komplut",unsupported:"Tip ta' karta mhux appoġġjat"}},expiry:{label:"Data tal-iskadenza",placeholder:"XX / SS",error:{incomplete:"Id-data tal-iskadenza tal-karta tiegħek mhix sħiħa",invalid:"Id-data tal-iskadenza tal-karta tiegħek mhix tajba",expired:"Il-karta tiegħek skadiet"}},cvc:{label:"Kodiċi tas-sigurtà",placeholder:"CVC",error:{incomplete:"Il-kodiċi tas-sigurtà tal-karta tiegħek mhux sħiħ",invalid:"Is-CVC tal-karta tiegħek mhux tajjeb"}},name:{label:"Isem id-detentur tal-karta",placeholder:"Isem u kunjom",error:{invalid:"Jekk jogħġbok ipprovdi isemek kollu"}},pay:{button:"Ħallas"},compact:{button:"Karta"}},status:{success:"Suċċess",error:"Aħna ma nistgħux jawtentikaw il-metodu tal-ħlas tiegħek. Jekk jogħġbok agħżel metodu ta' ħlas differenti u erġa' pprova."}},no:{card:{required:"PÅKREVD",number:{label:"Kortnummer",error:{invalid:"Kortnummeret er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Ikke støttet korttype"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{invalid:"Utløpsdatoen er ugyldig",incomplete:"Kortets utløpsdato er ufullstendig",expired:"Kortet har utløpt"}},cvc:{label:"Sikkerhetskode",placeholder:"CVC",error:{incomplete:"Sikkerhetskoden er ufullstendig",invalid:"CVC-koden er ugyldig"}},name:{label:"Kortholders navn",placeholder:"Fullt navn",error:{invalid:"Oppgi fullt navn"}},pay:{button:"Betal"},compact:{button:"Kort"}},status:{success:"Betalingen var vellykket!",error:"Vi kan ikke autentisere betalingsmetoden din. Velg en annen betalingsmetode og prøv igjen."}},nb:{card:{required:"PÅKREVET",number:{label:"Kortnummer",error:{invalid:"Kortnummer er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{incomplete:"Kortets utløpsdato er ufullstendig",invalid:"Kortets utløpsdato er ugyldig",expired:"Kortet er utløpt"}},cvc:{label:"Sikkerhetskode",placeholder:"CVC",error:{incomplete:"Kortets sikkerhetskode er ufullstendig",invalid:"Kortets CVC-nummer er ugyldig"}},name:{label:"Kortinnehavers navn",placeholder:"Fullt navn",error:{invalid:"Oppgi fullt navn"}},pay:{button:"Betal"},compact:{button:"Kort"}},status:{success:"Suksess",error:"Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt."}},nl:{card:{required:"VEREIST",number:{label:"Kaartnummer",error:{invalid:"Je kaartnummer is ongeldig",incomplete:"Je kaartnummer is onvolledig",unsupported:"Niet ondersteund"}},expiry:{label:"Vervaldatum",placeholder:"MM / JJ",error:{incomplete:"De vervaldatum van je kaart is onvolledig",invalid:"De vervaldatum van je betaalkaart is ongeldig",expired:"Je kaart is vervallen"}},cvc:{label:"Beveiligingscode",placeholder:"CVC",error:{incomplete:"De beveiligingscode van je betaalkaart is onvolledig",invalid:"De CVC-code van je betaalkaart is ongeldig"}},name:{label:"Naam kaarthouder",placeholder:"Volledige naam",error:{invalid:"Geef je volledige naam op"}},pay:{button:"Betalen"},compact:{button:"Kaart"}},status:{success:"Succes",error:"We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw."}},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 karty jest niepełna",invalid:"Termin ważności karty jest nieprawidłowy",expired:"Karta straciła ważność"}},cvc:{label:"Kod bezpieczeństwa",placeholder:"Kod CVC",error:{incomplete:"Kod zabezpieczający karty jest niekompletny",invalid:"CVC karty jest nieprawidłowy"}},name:{label:"Imię i nazwisko posiadacza karty",placeholder:"Imię i nazwisko",error:{invalid:"Podaj pełne imię i nazwisko"}},pay:{button:"Zapłać"},compact:{button:"Karta"}},status:{success:"Sukces",error:"Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie."}},pt:{card:{required:"OBRIGATÓRIO",number:{label:"Número do cartão",error:{invalid:"O número do seu cartão é inválido",incomplete:"O número do seu cartão está incompleto",unsupported:"Tipo de cartão não suportado"}},expiry:{label:"Data de validade",placeholder:"MM / AA",error:{incomplete:"A data de validade do cartão está incompleta",invalid:"A data de validade do seu cartão é inválida",expired:"O seu cartão expirou"}},cvc:{label:"Código de segurança",placeholder:"CVC",error:{incomplete:"O código de segurança de seu cartão está incompleto",invalid:"O CVC do seu cartão é inválido"}},name:{label:"Nome do titular do cartão",placeholder:"Nome completo",error:{invalid:"Forneça o seu nome completo"}},pay:{button:"Pagar"},compact:{button:"Cartão"}},status:{success:"Sucesso",error:"Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente."}},ro:{card:{required:"NECESAR",number:{label:"Numărul cardului",error:{invalid:"Numărul cardului dvs. nu este valid",incomplete:"Numărul cardului dvs. nu este complet",unsupported:"Tipul cardului nu este acceptat"}},expiry:{label:"Data de expirare",placeholder:"LL / AA",error:{incomplete:"Data de expirare a cardului dvs. este incompletă",invalid:"Data de expirare a cardului dvs. nu este validă",expired:"Cardul dvs. a expirat"}},cvc:{label:"Codul de securitate",placeholder:"CVC",error:{incomplete:"Codul de securitate al cardului dvs. este incomplet",invalid:"Numărul CVC al cardului dvs. nu este valid"}},name:{label:"Nume titular card",placeholder:"Nume complet",error:{invalid:"Vă rugăm să furnizați numele dvs. complet"}},pay:{button:"Plătiți"},compact:{button:"Card"}},status:{success:"Succes",error:"Nu putem să vă autentificăm metoda de plată. Vă rugăm să alegeți o altă metodă de plată și să încercați din nou."}},ua:{card:{required:"ОБОВʼЯЗКОВО",number:{label:"Номер картки",error:{invalid:"Невірний номер картки",incomplete:"Номер картки неповний",unsupported:"Непідтримуваний тип картки"}},expiry:{label:"Термін дії",placeholder:"ММ / РР",error:{invalid:"Невірний термін дії картки",incomplete:"Термін дії картки вказано не повністю",expired:"Термін дії картки минув"}},cvc:{label:"Код безпеки",placeholder:"CVC",error:{incomplete:"Код безпеки картки введено не повністю",invalid:"Невірний CVC-код картки"}},name:{label:"Імʼя власника картки",placeholder:"Повне імʼя",error:{invalid:"Вкажіть своє повне імʼя"}},pay:{button:"Сплатити"},compact:{button:"Картка"}},status:{success:"Платіж успішний!",error:"Не вдалося підтвердити ваш спосіб оплати. Будь ласка, оберіть інший спосіб оплати та спробуйте ще раз."}},sk:{card:{required:"POŽADOVANÉ",number:{label:"Číslo karty",error:{invalid:"Číslo vašej karty je neplatné",incomplete:"Číslo vašej karty je neúplné",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Dátum ukončenia platnosti",placeholder:"MM / RR",error:{incomplete:"Dátum vypršania platnosti vašej karty je neúplný",invalid:"Dátum vypršania platnosti vašej karty je neplatný",expired:"Platnosť vašej karty vypršala"}},cvc:{label:"Bezpečnostný kód",placeholder:"CVC",error:{incomplete:"Bezpečnostný kód vašej karty je neúplný",invalid:"Číslo CVC vašej karty je neplatné"}},name:{label:"Držiteľ karty",placeholder:"Celé meno",error:{invalid:"Zadajte vaše celé meno"}},pay:{button:"Zaplatiť"},compact:{button:"Karta"}},status:{success:"Úspech",error:"Nemôžeme overiť váš spôsob platby. Vyberte si iný spôsob platby a skúste to znova."}},sl:{card:{required:"OBVEZNO",number:{label:"Številka kartice",error:{invalid:"Številka vaše kartice ni veljavna",incomplete:"Številka vaše kartice ni popolna",unsupported:"Nepodprta vrsta kartice"}},expiry:{label:"Datum poteka",placeholder:"MM / LL",error:{incomplete:"Datum poteka vaše kartice ni popoln",invalid:"Datum poteka vaše kartice ni veljaven",expired:"Vaša kartica je potekla"}},cvc:{label:"Varnostna koda",placeholder:"CVC",error:{incomplete:"Varnostna koda vaše kartice ni popolna",invalid:"Koda CVC vaše kartice ni veljavna"}},name:{label:"Ime imetnika kartice",placeholder:"Polno ime",error:{invalid:"Vnesite svoje polno ime"}},pay:{button:"Plačaj"},compact:{button:"Kartica"}},status:{success:"Uspeh",error:"Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova."}},sv:{card:{required:"OBLIGATORISKT",number:{label:"Kortnummer",error:{invalid:"Ditt kortnummer är ogiltigt",incomplete:"Kortnumret är ofullständigt",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Sista giltighetsdag",placeholder:"MM / ÅÅ",error:{incomplete:"Kortets utgångsdatum är ofullständigt",invalid:"Kortets utgångsdatum är ogiltigt",expired:"Ditt kort har gått ut"}},cvc:{label:"Säkerhetskod",placeholder:"CVC",error:{incomplete:"Kortets säkerhetskod är ofullständig",invalid:"Kortets CVC-kod är ogiltig"}},name:{label:"Kortinnehavarens namn",placeholder:"Fullständigt namn",error:{invalid:"Ange ditt fullständiga namn"}},pay:{button:"Betala"},compact:{button:"Kort"}},status:{success:"Framgång",error:"Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen."}},th:{card:{required:"ต้องป้อนข้อมูล",number:{label:"หมายเลขบัตร",error:{invalid:"หมายเลขบัตรของคุณไม่ถูกต้อง",incomplete:"หมายเลขบัตรของคุณไม่ครบถ้วน",unsupported:"ประเภทบัตรของคุณไม่ถูกต้อง"}},expiry:{label:"วันหมดอายุ",placeholder:"ดด / ปป",error:{incomplete:"วันที่หมดอายุของบัตรไม่ครบถ้วน",invalid:"วันที่หมดอายุของบัตรไม่ถูกต้อง",expired:"บัตรของคุณหมดอายุแล้ว"}},cvc:{label:"รหัสความปลอดภัย",placeholder:"CVC",error:{incomplete:"รหัสความปลอดภัยของบัตรไม่ครบถ้วน",invalid:"CVC ของบัตรไม่ถูกต้อง"}},name:{label:"ชื่อเจ้าของบัตร",placeholder:"ชื่อ-นามสกุล",error:{invalid:"โปรดป้อนชื่อ-นามสกุล"}},pay:{button:"ชำระเงิน"},compact:{button:"การ์ด"}},status:{success:"ความสำเร็จ",error:"เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"}},tr:{card:{required:"GEREKLI",number:{label:"Kart numarası",error:{invalid:"Kart numaranız geçersiz",incomplete:"Kart numaranız eksik",unsupported:"Desteklenmeyen kart türü"}},expiry:{label:"Son Kullanma Tarihi",placeholder:"AA / YY",error:{incomplete:"Kartınızın son kullanma tarihi eksik",invalid:"Kartınızın son kullanım tarihi geçersiz",expired:"Kartınızın süresi dolmuş"}},cvc:{label:"Güvenlik kodu",placeholder:"CVC",error:{incomplete:"Kartınızın güvenlik kodu eksik",invalid:"Kartınızın CVC'si geçersiz"}},name:{label:"Kart sahibinin adı",placeholder:"Ad ve soyadı",error:{invalid:"Lütfen tam adınızı girin"}},pay:{button:"Öde"},compact:{button:"Kart"}},status:{success:"Başarı",error:"Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin."}},vi:{card:{required:"BẮT BUỘC",number:{label:"Số thẻ",error:{invalid:"Số thẻ của quý vị không hợp lệ",incomplete:"Số thẻ của quý vị 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 trên thẻ không hợp lệ",invalid:"Ngày hết hạn của thẻ không hợp lệ",expired:"Thẻ của quý vị đã hết hạn"}},cvc:{label:"Mã bảo mật",placeholder:"CVC",error:{incomplete:"Mã bảo mật của thẻ không đầy đủ",invalid:"CVC thẻ của bạn không hợp lệ"}},name:{label:"Tên chủ thẻ",placeholder:"Họ và tên",error:{invalid:"Vui lòng cung cấp tên đầy đủ của bạn"}},pay:{button:"Thanh toán"},compact:{button:"Thẻ"}},status:{success:"Thành công",error:"Chúng tôi không thể xác thực phương thức thanh toán của bạn. Vui lòng chọn phương thức thanh toán khác và thử lại."}},zh:{card:{required:"必填",number:{label:"卡号",error:{invalid:"您的卡号无效",incomplete:"您的银行卡卡号不完整",unsupported:"不支持的卡类型"}},expiry:{label:"有效期",placeholder:"月份 / 年份",error:{incomplete:"您银行卡的有效期不完整",invalid:"您银行卡的有效期无效",expired:"您的银行卡已过期"}},cvc:{label:"安全代码",placeholder:"CVC",error:{incomplete:"您银行卡的安全码不完整",invalid:"您银行卡的 CVC 无效"}},name:{label:"持卡人姓名",placeholder:"全名",error:{invalid:"请提供您的全名"}},pay:{button:"支付"},compact:{button:"卡片"}},status:{success:"成功",error:"我们无法验证您的付款方式。请选择其他付款方式并重试。"}}},Or=()=>{const n=navigator==null?void 0:navigator.language.split("-")[0];return xr[n]||xr.en},Si=(n,t={})=>{var i,s,o,c,l,d,u,h,p,f,m,v,y,A,x,N,I,P,O,S,F,W,G,U,j,z,J,M,$,H,E,g,k,V,b,T,_,L,D,C,B,X,ae,R,te,ye,zi,Ki;if(!n)return Or();const e=xr[n]||Or(),r=Object.keys(Ri.errors||{}).reduce((Hi,Hl)=>(Hi[Hl]=e.status.error,Hi),{}),a=K(K(K({},r),e.errors||{}),t.errors||{});return{card:{required:((i=t==null?void 0:t.card)==null?void 0:i.required)||e.card.required,number:{label:((o=(s=t==null?void 0:t.card)==null?void 0:s.number)==null?void 0:o.label)||e.card.number.label,error:{invalid:((d=(l=(c=t==null?void 0:t.card)==null?void 0:c.number)==null?void 0:l.error)==null?void 0:d.invalid)||e.card.number.error.invalid,incomplete:((p=(h=(u=t==null?void 0:t.card)==null?void 0:u.number)==null?void 0:h.error)==null?void 0:p.incomplete)||e.card.number.error.incomplete,unsupported:((v=(m=(f=t==null?void 0:t.card)==null?void 0:f.number)==null?void 0:m.error)==null?void 0:v.unsupported)||e.card.number.error.unsupported}},expiry:{label:((A=(y=t==null?void 0:t.card)==null?void 0:y.expiry)==null?void 0:A.label)||e.card.expiry.label,placeholder:((N=(x=t==null?void 0:t.card)==null?void 0:x.expiry)==null?void 0:N.placeholder)||e.card.expiry.placeholder,error:{invalid:((O=(P=(I=t==null?void 0:t.card)==null?void 0:I.expiry)==null?void 0:P.error)==null?void 0:O.invalid)||e.card.expiry.error.invalid,incomplete:((W=(F=(S=t==null?void 0:t.card)==null?void 0:S.expiry)==null?void 0:F.error)==null?void 0:W.incomplete)||e.card.expiry.error.incomplete,expired:((j=(U=(G=t==null?void 0:t.card)==null?void 0:G.expiry)==null?void 0:U.error)==null?void 0:j.expired)||e.card.expiry.error.expired}},cvc:{label:((J=(z=t==null?void 0:t.card)==null?void 0:z.cvc)==null?void 0:J.label)||e.card.cvc.label,placeholder:(($=(M=t==null?void 0:t.card)==null?void 0:M.cvc)==null?void 0:$.placeholder)||e.card.cvc.placeholder,error:{incomplete:((g=(E=(H=t==null?void 0:t.card)==null?void 0:H.cvc)==null?void 0:E.error)==null?void 0:g.incomplete)||e.card.cvc.error.incomplete,invalid:((b=(V=(k=t==null?void 0:t.card)==null?void 0:k.cvc)==null?void 0:V.error)==null?void 0:b.invalid)||e.card.cvc.error.invalid}},name:{label:((_=(T=t==null?void 0:t.card)==null?void 0:T.name)==null?void 0:_.label)||e.card.name.label,placeholder:((D=(L=t==null?void 0:t.card)==null?void 0:L.name)==null?void 0:D.placeholder)||e.card.name.placeholder,error:{invalid:((X=(B=(C=t==null?void 0:t.card)==null?void 0:C.name)==null?void 0:B.error)==null?void 0:X.invalid)||e.card.name.error.invalid}},pay:{button:((R=(ae=t==null?void 0:t.card)==null?void 0:ae.pay)==null?void 0:R.button)||e.card.pay.button},compact:{button:((ye=(te=t==null?void 0:t.card)==null?void 0:te.compact)==null?void 0:ye.button)||e.card.compact.button}},status:{success:((zi=t==null?void 0:t.status)==null?void 0:zi.success)||e.status.success,error:((Ki=t==null?void 0:t.status)==null?void 0:Ki.error)||e.status.error},errors:a}};class El extends Pt{constructor(){super({messages:Or(),locale:(navigator==null?void 0:navigator.language.split("-")[0])||"en"})}setMessages(t){const e=this.locale(),r=Si(e,t);this.setState({locale:e,messages:r,overrides:t})}setLocale(t){const e=this.overrides(),r=Si(t,e);this.setState({locale:t,messages:r,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"}}/*!
288
288
  * paypal-js v8.4.2 (2025-09-04T17:21:30.135Z)
289
289
  * Copyright 2020-present, PayPal, Inc. All rights reserved.
290
290
  *
@@ -299,7 +299,7 @@ ${m}::-ms-input-placeholder{${f}}
299
299
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
300
300
  * See the License for the specific language governing permissions and
301
301
  * limitations under the License.
302
- */function Cc(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(r);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(r,n[a])&&(e[n[a]]=r[n[a]]);return e}typeof SuppressedError=="function"&&SuppressedError;function wc(r,t){var e=document.querySelector('script[src="'.concat(r,'"]'));if(e===null)return null;var n=Mi(r,t),a=e.cloneNode();if(delete a.dataset.uidAuto,Object.keys(a.dataset).length!==Object.keys(n.dataset).length)return null;var i=!0;return Object.keys(a.dataset).forEach(function(o){a.dataset[o]!==n.dataset[o]&&(i=!1)}),i?e:null}function Ac(r){var t=r.url,e=r.attributes,n=r.onSuccess,a=r.onError,i=Mi(t,e);i.onerror=a,i.onload=n,document.head.insertBefore(i,document.head.firstElementChild)}function Tc(r){var t=r.sdkBaseUrl,e=r.environment,n=Cc(r,["sdkBaseUrl","environment"]),a=t||kc(e),i=n,o=Object.keys(i).filter(function(c){return typeof i[c]!="undefined"&&i[c]!==null&&i[c]!==""}).reduce(function(c,d){var u=i[d].toString();return d=Ic(d),d.substring(0,4)==="data"||d==="crossorigin"?c.attributes[d]=u:c.queryParams[d]=u,c},{queryParams:{},attributes:{}}),s=o.queryParams,l=o.attributes;return s["merchant-id"]&&s["merchant-id"].indexOf(",")!==-1&&(l["data-merchant-id"]=s["merchant-id"],s["merchant-id"]="*"),{url:"".concat(a,"?").concat(xc(s)),attributes:l}}function Ic(r){var t=function(e,n){return(n?"-":"")+e.toLowerCase()};return r.replace(/[A-Z]+(?![a-z])|[A-Z]/g,t)}function xc(r){var t="";return Object.keys(r).forEach(function(e){t.length!==0&&(t+="&"),t+=e+"="+r[e]}),t}function kc(r){return r==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}function Mi(r,t){t===void 0&&(t={});var e=document.createElement("script");return e.src=r,Object.keys(t).forEach(function(n){e.setAttribute(n,t[n]),n==="data-csp-nonce"&&e.setAttribute("nonce",t["data-csp-nonce"])}),e}function Nc(r,t){if(t===void 0&&(t=Promise),Fi(r,t),typeof document=="undefined")return t.resolve(null);var e=Tc(r),n=e.url,a=e.attributes,i=a["data-namespace"]||"paypal",o=Vi(i);return a["data-js-sdk-library"]||(a["data-js-sdk-library"]="paypal-js"),wc(n,a)&&o?t.resolve(o):Oc({url:n,attributes:a},t).then(function(){var s=Vi(i);if(s)return s;throw new Error("The window.".concat(i," global variable is not available."))})}function Oc(r,t){t===void 0&&(t=Promise),Fi(r,t);var e=r.url,n=r.attributes;if(typeof e!="string"||e.length===0)throw new Error("Invalid url.");if(typeof n!="undefined"&&typeof n!="object")throw new Error("Expected attributes to be an object.");return new t(function(a,i){if(typeof document=="undefined")return a();Ac({url:e,attributes:n,onSuccess:function(){return a()},onError:function(){var o=new Error('The script "'.concat(e,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return i(o)}})})}function Vi(r){return window[r]}function Fi(r,t){if(typeof r!="object"||r===null)throw new Error("Expected an options object.");var e=r.environment;if(e&&e!=="production"&&e!=="sandbox")throw new Error('The `environment` option must be either "production" or "sandbox".');if(typeof t!="undefined"&&typeof t!="function")throw new Error("Expected PromisePonyfill to be a function.")}const Pc={layout:"vertical",tagline:!1,height:40,borderRadius:12};class Rc{constructor(){w(this,"paypal",null)}init(t){return W(this,null,function*(){try{this.paypal=yield Nc(t)}catch(e){throw this.paypal=null,e}})}isLoaded(){return this.paypal!==null&&this.paypal.Buttons!==void 0}render(t,e){return W(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=K(K({},Pc),(e==null?void 0:e.style)||{}),o=J(K({fundingSource:"paypal"},e),{style:i}),s=(a=(n=this.paypal).Buttons)==null?void 0:a.call(n,o);if(!s)throw new Error("PayPal Buttons instance is null");console.log("PayPalService: Buttons instance created, calling render()..."),yield s.render(t)}})}}function we(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Or={exports:{}},Ui;function Lc(){return Ui||(Ui=1,function(r,t){(function(e){r.exports=e()})(function(){return function(){function e(n,a,i){function o(c,d){if(!a[c]){if(!n[c]){var u=typeof we=="function"&&we;if(!d&&u)return u(c,!0);if(s)return s(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var p=a[c]={exports:{}};n[c][0].call(p.exports,function(f){var m=n[c][1][f];return o(m||f)},p,p.exports,e,n,a,i)}return a[c].exports}for(var s=typeof we=="function"&&we,l=0;l<i.length;l++)o(i[l]);return o}return e}()({1:[function(e,n,a){var i={};function o(s){var l,c=JSON.stringify(s);if(!s.forceScriptReload&&(l=i[c],l))return l;var d=document.createElement("script"),u=s.dataAttributes||{},h=s.container||document.head;return d.src=s.src,d.id=s.id||"",d.async=!0,s.type&&d.setAttribute("type","".concat(s.type)),s.crossorigin&&d.setAttribute("crossorigin","".concat(s.crossorigin)),s.integrity&&d.setAttribute("integrity","".concat(s.integrity)),Object.keys(u).forEach(function(p){d.setAttribute("data-".concat(p),"".concat(u[p]))}),l=new Promise(function(p,f){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){f(new Error("".concat(s.src," failed to load.")))}),d.addEventListener("abort",function(){f(new Error("".concat(s.src," has aborted.")))}),h.appendChild(d)}),i[c]=l,l}o.clearCache=function(){i={}},n.exports=o},{}],2:[function(e,n,a){n.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,n,a){function i(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(o){var s=Math.random()*16|0,l=o==="x"?s:s&3|8;return l.toString(16)})}n.exports=i},{}],4:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(o){return function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];setTimeout(function(){try{o.apply(void 0,s)}catch(c){console.log("Error in callback function"),console.log(c)}},1)}}a.deferred=i},{}],5:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(o){var s=!1;return function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];s||(s=!0,o.apply(void 0,l))}}a.once=i},{}],6:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(o,s){if(!s)return o;o.then(function(l){return s(null,l)}).catch(function(l){return s(l)})}a.promiseOrCallback=i},{}],7:[function(e,n,a){var i=e("./lib/deferred"),o=e("./lib/once"),s=e("./lib/promise-or-callback");function l(c){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=o.once(i.deferred(h))),s.promiseOrCallback(c.apply(this,d),h)}}l.wrapPrototype=function(c,d){d===void 0&&(d={});var u=d.ignoreMethods||[],h=d.transformPrivateMethods===!0,p=Object.getOwnPropertyNames(c.prototype).filter(function(f){var m,v=f!=="constructor"&&typeof c.prototype[f]=="function",y=u.indexOf(f)===-1;return h?m=!0:m=f.charAt(0)!=="_",v&&m&&y});return p.forEach(function(f){var m=c.prototype[f];c.prototype[f]=l(m)}),c},n.exports=l},{"./lib/deferred":4,"./lib/once":5,"./lib/promise-or-callback":6}],8:[function(e,n,a){(function(i,o){typeof a=="object"&&typeof n!="undefined"?o(a):(i=typeof globalThis!="undefined"?globalThis:i||self,o(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
302
+ */function Cl(n,t){var e={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(n);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(n,r[a])&&(e[r[a]]=n[r[a]]);return e}typeof SuppressedError=="function"&&SuppressedError;function wl(n,t){var e=document.querySelector('script[src="'.concat(n,'"]'));if(e===null)return null;var r=Mi(n,t),a=e.cloneNode();if(delete a.dataset.uidAuto,Object.keys(a.dataset).length!==Object.keys(r.dataset).length)return null;var i=!0;return Object.keys(a.dataset).forEach(function(s){a.dataset[s]!==r.dataset[s]&&(i=!1)}),i?e:null}function Al(n){var t=n.url,e=n.attributes,r=n.onSuccess,a=n.onError,i=Mi(t,e);i.onerror=a,i.onload=r,document.head.insertBefore(i,document.head.firstElementChild)}function Tl(n){var t=n.sdkBaseUrl,e=n.environment,r=Cl(n,["sdkBaseUrl","environment"]),a=t||Ol(e),i=r,s=Object.keys(i).filter(function(l){return typeof i[l]!="undefined"&&i[l]!==null&&i[l]!==""}).reduce(function(l,d){var u=i[d].toString();return d=Il(d),d.substring(0,4)==="data"||d==="crossorigin"?l.attributes[d]=u:l.queryParams[d]=u,l},{queryParams:{},attributes:{}}),o=s.queryParams,c=s.attributes;return o["merchant-id"]&&o["merchant-id"].indexOf(",")!==-1&&(c["data-merchant-id"]=o["merchant-id"],o["merchant-id"]="*"),{url:"".concat(a,"?").concat(xl(o)),attributes:c}}function Il(n){var t=function(e,r){return(r?"-":"")+e.toLowerCase()};return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g,t)}function xl(n){var t="";return Object.keys(n).forEach(function(e){t.length!==0&&(t+="&"),t+=e+"="+n[e]}),t}function Ol(n){return n==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}function Mi(n,t){t===void 0&&(t={});var e=document.createElement("script");return e.src=n,Object.keys(t).forEach(function(r){e.setAttribute(r,t[r]),r==="data-csp-nonce"&&e.setAttribute("nonce",t["data-csp-nonce"])}),e}function Nl(n,t){if(t===void 0&&(t=Promise),Vi(n,t),typeof document=="undefined")return t.resolve(null);var e=Tl(n),r=e.url,a=e.attributes,i=a["data-namespace"]||"paypal",s=Di(i);return a["data-js-sdk-library"]||(a["data-js-sdk-library"]="paypal-js"),wl(r,a)&&s?t.resolve(s):Ll({url:r,attributes:a},t).then(function(){var o=Di(i);if(o)return o;throw new Error("The window.".concat(i," global variable is not available."))})}function Ll(n,t){t===void 0&&(t=Promise),Vi(n,t);var e=n.url,r=n.attributes;if(typeof e!="string"||e.length===0)throw new Error("Invalid url.");if(typeof r!="undefined"&&typeof r!="object")throw new Error("Expected attributes to be an object.");return new t(function(a,i){if(typeof document=="undefined")return a();Al({url:e,attributes:r,onSuccess:function(){return a()},onError:function(){var s=new Error('The script "'.concat(e,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return i(s)}})})}function Di(n){return window[n]}function Vi(n,t){if(typeof n!="object"||n===null)throw new Error("Expected an options object.");var e=n.environment;if(e&&e!=="production"&&e!=="sandbox")throw new Error('The `environment` option must be either "production" or "sandbox".');if(typeof t!="undefined"&&typeof t!="function")throw new Error("Expected PromisePonyfill to be a function.")}const Pl={layout:"vertical",tagline:!1,height:40,borderRadius:12};class kl{constructor(){w(this,"paypal",null)}init(t){return Y(this,null,function*(){try{this.paypal=yield Nl(t)}catch(e){throw this.paypal=null,e}})}isLoaded(){return this.paypal!==null&&this.paypal.Buttons!==void 0}render(t,e){return Y(this,null,function*(){var r,a;if(!t.isConnected)throw new Error("PayPal parent element must be connected to DOM before render()");if(this.paypal){const i=K(K({},Pl),(e==null?void 0:e.style)||{}),s=ee(K({fundingSource:"paypal"},e),{style:i}),o=(a=(r=this.paypal).Buttons)==null?void 0:a.call(r,s);if(!o)throw new Error("PayPal Buttons instance is null");console.log("PayPalService: Buttons instance created, calling render()..."),yield o.render(t)}})}}function Ce(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Nr={exports:{}},Ui;function Rl(){return Ui||(Ui=1,function(n,t){(function(e){n.exports=e()})(function(){return function(){function e(r,a,i){function s(l,d){if(!a[l]){if(!r[l]){var u=typeof Ce=="function"&&Ce;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:{}};r[l][0].call(p.exports,function(f){var m=r[l][1][f];return s(m||f)},p,p.exports,e,r,a,i)}return a[l].exports}for(var o=typeof Ce=="function"&&Ce,c=0;c<i.length;c++)s(i[c]);return s}return e}()({1:[function(e,r,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={}},r.exports=s},{}],2:[function(e,r,a){r.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,r,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)})}r.exports=i},{}],4:[function(e,r,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},{}],5:[function(e,r,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},{}],6:[function(e,r,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},{}],7:[function(e,r,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",y=u.indexOf(f)===-1;return h?m=!0:m=f.charAt(0)!=="_",v&&m&&y});return p.forEach(function(f){var m=l.prototype[f];l.prototype[f]=c(m)}),l},r.exports=c},{"./lib/deferred":4,"./lib/once":5,"./lib/promise-or-callback":6}],8:[function(e,r,a){(function(i,s){typeof a=="object"&&typeof r!="undefined"?s(a):(i=typeof globalThis!="undefined"?globalThis:i||self,s(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
303
303
  Copyright (c) Microsoft Corporation.
304
304
 
305
305
  Permission to use, copy, modify, and/or distribute this software for any
@@ -312,7 +312,7 @@ ${m}::-ms-input-placeholder{${f}}
312
312
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
313
313
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
314
314
  PERFORMANCE OF THIS SOFTWARE.
315
- ***************************************************************************** */function o(b,T,_,O){function M(C){return C instanceof _?C:new _(function(j){j(C)})}return new(_||(_=Promise))(function(C,j){function Q(ee){try{L(O.next(ee))}catch(be){j(be)}}function ae(ee){try{L(O.throw(ee))}catch(be){j(be)}}function L(ee){ee.done?C(ee.value):M(ee.value).then(Q,ae)}L((O=O.apply(b,[])).next())})}function s(b,T){var _={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},O,M,C,j;return j={next:Q(0),throw:Q(1),return:Q(2)},typeof Symbol=="function"&&(j[Symbol.iterator]=function(){return this}),j;function Q(L){return function(ee){return ae([L,ee])}}function ae(L){if(O)throw new TypeError("Generator is already executing.");for(;_;)try{if(O=1,M&&(C=L[0]&2?M.return:L[0]?M.throw||((C=M.return)&&C.call(M),0):M.next)&&!(C=C.call(M,L[1])).done)return C;switch(M=0,C&&(L=[L[0]&2,C.value]),L[0]){case 0:case 1:C=L;break;case 4:return _.label++,{value:L[1],done:!1};case 5:_.label++,M=L[1],L=[0];continue;case 7:L=_.ops.pop(),_.trys.pop();continue;default:if(C=_.trys,!(C=C.length>0&&C[C.length-1])&&(L[0]===6||L[0]===2)){_=0;continue}if(L[0]===3&&(!C||L[1]>C[0]&&L[1]<C[3])){_.label=L[1];break}if(L[0]===6&&_.label<C[1]){_.label=C[1],C=L;break}if(C&&_.label<C[2]){_.label=C[2],_.ops.push(L);break}C[2]&&_.ops.pop(),_.trys.pop();continue}L=T.call(b,_)}catch(ee){L=[6,ee],M=0}finally{O=C=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}}var l={},c={};function d(b){var T,_=JSON.stringify(b);if(!b.forceScriptReload&&(T=c[_],T))return T;var O=document.createElement("script"),M=b.dataAttributes||{},C=b.container||document.head;return O.src=b.src,O.id=b.id||"",O.async=!0,b.type&&O.setAttribute("type","".concat(b.type)),b.crossorigin&&O.setAttribute("crossorigin","".concat(b.crossorigin)),Object.keys(M).forEach(function(j){O.setAttribute("data-".concat(j),"".concat(M[j]))}),T=new Promise(function(j,Q){O.addEventListener("load",function(){j(O)}),O.addEventListener("error",function(){Q(new Error("".concat(b.src," failed to load.")))}),O.addEventListener("abort",function(){Q(new Error("".concat(b.src," has aborted.")))}),C.appendChild(O)}),c[_]=T,T}d.clearCache=function(){c={}};var u=d,h=function(T){var _=document.querySelector('link[href="'.concat(T.href,'"]'));if(_)return Promise.resolve(_);_=document.createElement("link");var O=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),O.firstChild?O.insertBefore(_,O.firstChild):O.appendChild(_),Promise.resolve(_)};Object.defineProperty(l,"__esModule",{value:!0}),l.loadStylesheet=f=l.loadScript=void 0;var p=u,f=l.loadScript=p,m=h;l.loadStylesheet=m;var v="https://www.paypalobjects.com",y={minified:"axo.min",unminified:"axo"},A="fastlane",x="connect-boba",N="".concat(x,"/locales/"),I={AXO_ASSET_NAME:y,AXO_ASSET_PATH:x,LOCALE_PATH:N,CDNX_PROD:v},P={BT:"BT",PPCP:"PPCP"};function k(){return typeof window.define=="function"&&!!window.define.amd}function S(){return k()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function U(b,T,_){var O,M;return _===void 0&&(_=!0),o(this,void 0,void 0,function(){var C,j;return s(this,function(Q){if(C=$(),C&&C[b.module]){if(T&&((O=C[b.module])===null||O===void 0?void 0:O.VERSION)!==T)throw j=(M=C[b.module])===null||M===void 0?void 0:M.VERSION,new Error("".concat(b.module," already loaded with version ").concat(j," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(b.module," without specifying version"));return[2,q(b,T,_)]})})}function q(b,T,_){if(_===void 0&&(_=!0),k()){var O=_?b.amdModule.minified:b.amdModule.unminified;return new Promise(function(C,j){window.require([O],C,j)})}var M=_?b.script.minified:b.script.unminified;return f({id:"".concat(b.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(M)})}function $(){return window==null?void 0:window.braintree}var F,z,B={Client:"client",HostedCardFields:"hostedFields"},Z="braintree",D=(F={},F[B.Client]="client",F[B.HostedCardFields]="hosted-fields",F),Y=(z={},z[B.Client]={id:"client",module:B.Client,amdModule:{unminified:"".concat(Z,"/").concat(D[B.Client]),minified:"".concat(Z,"/").concat(D[B.Client],".min")},script:{unminified:"".concat(D[B.Client],".js"),minified:"".concat(D[B.Client],".min.js")}},z[B.HostedCardFields]={id:"hcf",module:B.HostedCardFields,amdModule:{unminified:"".concat(Z,"/").concat(D[B.HostedCardFields]),minified:"".concat(Z,"/").concat(D[B.HostedCardFields],".min")},script:{unminified:"".concat(D[B.HostedCardFields],".js"),minified:"".concat(D[B.HostedCardFields],".min.js")}},z);function H(b){return o(this,void 0,void 0,function(){var T,_,O,M;return s(this,function(C){switch(C.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=b.btSdkVersion,_=b.minified,O=R(b),M=V(b),b.platform!==P.BT?[3,2]:[4,Promise.all([U(Y.hostedFields,T,_),E(O,_)])];case 1:return C.sent(),[3,5];case 2:return b.platform!==P.PPCP?[3,4]:[4,Promise.all([U(Y.client,T,_),U(Y.hostedFields,T,_),E(O,_)])];case 3:return C.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:M}}]}})})}function E(b,T){var _;if(T===void 0&&(T=!0),k()){S()&&requirejs.config({paths:(_={},_[A]=b,_)});var O="".concat(A,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(M,C){window.require([O],M,C)})}return f({id:"axo-id",src:b,forceScriptReload:!0})}function g(b){var T=b.assetUrl,_=b.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function R(b){var T,_=(b==null?void 0:b.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,O=k()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:O,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(b){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=H})},{}],9:[function(e,n,a){var i=e("./constants").BRAINTREE_VERSION,o=e("./request/graphql"),s=e("./request"),l=e("../lib/is-verified-domain"),c=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"),y=e("../lib/assign").assign,A=e("../lib/analytics"),x=e("./errors"),N=e("../lib/constants").VERSION,I=e("../lib/constants").GRAPHQL_URLS,P=e("../lib/methods"),k=e("../lib/convert-methods-to-error"),S=e("../lib/assets"),U=e("../lib/constants").FRAUDNET_FNCLS,q=e("../lib/constants").FRAUDNET_SOURCE,$=e("../lib/constants").FRAUDNET_URL,F={};function z(D){var Y,H;if(D=D||{},Y=JSON.stringify(D),H=D.gatewayConfiguration,!H)throw new c(x.CLIENT_MISSING_GATEWAY_CONFIGURATION);if(["assetsUrl","clientApiUrl","configUrl"].forEach(function(E){if(E in H&&!l(H[E]))throw new c({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(Y)},this._request=s,this._configuration=this.getConfiguration(),this._clientApiBaseUrl=H.clientApiUrl+"/v1/",H.graphQL){if(!l(H.graphQL.url))throw new c({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 o({graphQL:H.graphQL})}}z.initialize=function(D){var Y,H,E=F[D.authorization];if(E)return A.sendEvent(E,"custom.client.load.cached"),E;try{H=h(D.authorization)}catch(g){return Promise.reject(new c(x.CLIENT_INVALID_AUTHORIZATION))}return E=u(H,D.sessionId).then(function(g){return D.debug&&(g.isDebug=!0),g.authorization=D.authorization,Y=new z(g),Y}),F[D.authorization]=E,A.sendEvent(E,"custom.client.load.initialized"),E.then(function(g){return A.sendEvent(Y,"custom.client.load.succeeded"),g}).catch(function(g){return delete F[D.authorization],Promise.reject(g)})},z.clearCache=function(){F={}},z.prototype._findOrCreateFraudnetJSON=function(D){var Y=document.querySelector('script[fncls="'+U+'"]'),H,E,g,R;Y||(Y=document.body.appendChild(document.createElement("script")),Y.type="application/json",Y.setAttribute("fncls",U)),H=this.getConfiguration(),E={rda_tenant:"bt_card",mid:H.gatewayConfiguration.merchantId},g=H.authorizationFingerprint,g&&g.split("&").forEach(function(V){var b=V.split("=");b[0]==="customer_id"&&b.length>1&&(E.cid=b[1])}),R={f:D.substr(0,32),fp:E,bu:!1,s:q},Y.text=JSON.stringify(R)},z.prototype.request=function(D,Y){var H=this,E=new Promise(function(g,R){var V,b,T,_,O=!!(D.endpoint==="payment_methods/credit_cards"&&H.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);if(D.api!=="graphQLApi"&&(D.method?D.endpoint||(V="options.endpoint"):V="options.method"),V)throw new c({type:x.CLIENT_OPTION_REQUIRED.type,code:x.CLIENT_OPTION_REQUIRED.code,message:V+" is required when making a request."});if("api"in D?b=D.api:b="clientApi",_={method:D.method,graphQL:H._graphQL,timeout:D.timeout,metadata:H._configuration.analyticsMetadata},b==="clientApi")T=H._clientApiBaseUrl,_.data=p.addMetadata(H._configuration,D.data);else if(b==="graphQLApi")T=I[H._configuration.gatewayConfiguration.environment],D.endpoint="",_.method="post",_.data=y({clientSdkMetadata:{platform:H._configuration.analyticsMetadata.platform,source:H._configuration.analyticsMetadata.source,integration:H._configuration.analyticsMetadata.integration,sessionId:H._configuration.analyticsMetadata.sessionId,version:N}},D.data),_.headers=Z(H._configuration);else throw new c({type:x.CLIENT_OPTION_INVALID.type,code:x.CLIENT_OPTION_INVALID.code,message:"options.api is invalid."});_.url=T+D.endpoint,_.sendAnalyticsEvent=function(M){A.sendEvent(H,M)},H._request(_,function(M,C,j){var Q,ae;if(ae=B(j,M),ae){R(ae);return}if(b==="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}Q=y({_httpStatus:j},C),O&&Q.creditCards&&Q.creditCards.length>0&&(H._findOrCreateFraudnetJSON(Q.creditCards[0].nonce),S.loadScript({src:$,forceScriptReload:!0})),g(Q)})});if(typeof Y=="function"){Y=m(v(Y)),E.then(function(g){Y(null,g,g._httpStatus)}).catch(function(g){var R=g&&g.details&&g.details.httpStatus;Y(g,null,R)});return}return E};function B(D,Y){var H;if(D===-1?H=new c(x.CLIENT_REQUEST_TIMEOUT):D===401?H=new c(x.CLIENT_AUTHORIZATION_INVALID):D===403?H=new c(x.CLIENT_AUTHORIZATION_INSUFFICIENT):D===429?H=new c(x.CLIENT_RATE_LIMITED):D>=500?H=new c(x.CLIENT_GATEWAY_NETWORK):(D<200||D>=400)&&(H=d(Y,{type:x.CLIENT_REQUEST_ERROR.type,code:x.CLIENT_REQUEST_ERROR.code,message:x.CLIENT_REQUEST_ERROR.message})),H)return H.details=H.details||{},H.details.httpStatus=D,H}z.prototype.toJSON=function(){return this.getConfiguration()},z.prototype.getVersion=function(){return N},z.prototype.teardown=f(function(){var D=this;return delete F[D.getConfiguration().authorization],k(D,P(z.prototype)),Promise.resolve()});function Z(D){var Y=D.authorizationFingerprint||D.authorization;return{Authorization:"Bearer "+Y,"Braintree-Version":i}}n.exports=z},{"../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"),o=e("@braintree/wrap-promise"),s=e("./request"),l=e("@braintree/uuid"),c=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,y){return new Promise(function(A,x){var N,I,P,k,S=y||l(),U={merchantAppId:window.location.host,platform:c.PLATFORM,sdkVersion:c.VERSION,source:c.SOURCE,integration:c.INTEGRATION,integrationType:c.INTEGRATION,sessionId:S};I=v.attrs,P=v.configUrl,I._meta=U,I.braintreeLibraryVersion=c.BRAINTREE_LIBRARY_VERSION,I.configVersion="3",k={url:P,method:"GET",data:I},I.authorizationFingerprint&&v.graphQL?(p(v.graphQL.date,f)&&(k.graphQL=new u({graphQL:{url:v.graphQL.url,features:["configuration"]}})),k.metadata=U):I.tokenizationKey&&(k.graphQL=new u({graphQL:{url:h[v.environment],features:["configuration"]}}),k.metadata=U),s(k,function(q,$,F){var z;if(q){F===403?z=d.CLIENT_AUTHORIZATION_INSUFFICIENT:F===401?z=d.CLIENT_AUTHORIZATION_INVALID:z=d.CLIENT_GATEWAY_NETWORK,x(new i({type:z.type,code:z.code,message:z.message,details:{originalError:q}}));return}N={authorizationType:I.tokenizationKey?"TOKENIZATION_KEY":"CLIENT_TOKEN",authorizationFingerprint:I.authorizationFingerprint,analyticsMetadata:U,gatewayConfiguration:$},A(N)})})}n.exports={getConfiguration:o(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"),o=e("./client"),s="3.126.0",l=e("@braintree/wrap-promise"),c=e("../lib/errors");function d(u){return u.authorization?o.initialize(u):Promise.reject(new i({type:c.INSTANTIATION_OPTION_REQUIRED.type,code:c.INSTANTIATION_OPTION_REQUIRED.code,message:"options.authorization is required when instantiating a client."}))}n.exports={create:l(d),VERSION:s}},{"../lib/braintree-error":33,"../lib/errors":40,"./client":9,"@braintree/wrap-promise":7}],14:[function(e,n,a){var i=e("../../lib/querystring"),o=e("../../lib/assign").assign,s=e("./prep-body"),l=e("./parse-body"),c=e("./xhr"),d=c.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 y(x,N,I){var P,k,S,U,q,$,F,z=x.url,B=x.graphQL,Z=x.timeout,D=c.getRequestObject(),Y=I,H=!!(B&&B.isGraphQLRequest(z,x.data));x.headers=o({"Content-Type":"application/json"},x.headers),H?S=new u(x):S=new h(x),z=S.getUrl(),U=S.getBody(),q=S.getMethod(),$=S.getHeaders(),q==="GET"&&(z=i.queryify(z,U),U=null),d?D.onreadystatechange=function(){if(D.readyState===4){if(D.status===0&&H){delete x.graphQL,y(x,N,I);return}if(F=l(D.responseText),k=S.adaptResponseBody(F),P=S.determineStatus(D.status,F),P>=400||P<200){if(H&&v(F)){delete x.graphQL,y(x,N,I);return}if(N<p&&m(P)){N++,y(x,N,I);return}Y(k||"error",null,P||500)}else Y(null,k,P)}}:(x.headers&&(z=i.queryify(z,$)),D.onload=function(){Y(null,l(D.responseText),D.status)},D.onerror=function(){Y("error",null,500)},D.onprogress=function(){},D.ontimeout=function(){Y("timeout",null,-1)});try{D.open(q,z,!0)}catch(E){if(!H)throw E;delete x.graphQL,y(x,N,I);return}D.timeout=Z,d&&Object.keys($).forEach(function(E){D.setRequestHeader(E,$[E])});try{D.send(s(q,U))}catch(E){}}function A(x,N){y(x,0,N)}n.exports={request:A}},{"../../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(o){this._url=o.url,this._data=o.data,this._method=o.method,this._headers=o.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(o){return o},i.prototype.determineStatus=function(o){return o},n.exports=i},{}],16:[function(e,n,a){var i=e("./error"),o=e("../../../../lib/assign").assign,s={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 l(u,h){var p;return u.data&&!u.errors?p=c(u,h):p=i(u),p}function c(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,s.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,s.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,s.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=o({},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,s.visaCheckout)}),p.masterpass&&(f.masterpass={merchantCheckoutId:p.masterpass.merchantCheckoutId,supportedNetworks:d(p.masterpass.supportedCardBrands,s.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=l},{"../../../../lib/assign":32,"./error":19}],17:[function(e,n,a){var i=e("./error"),o={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"},s={YES:"Yes",NO:"No",UNKNOWN:"Unknown"},l={PSDTWO:"psd2"};function c(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,y;return m&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(A){m[A]?m[A]=s[m[A]]:m[A]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(A){m[A]||(m[A]="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:o[p.brandCode]||"Unknown",lastFour:p.last4||"",lastTwo:f},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(y=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:l[y]||y.toLowerCase()}),v}n.exports=c},{"./error":19}],18:[function(e,n,a){var i=e("./error"),o={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"},s={YES:"Yes",NO:"No",UNKNOWN:"Unknown"},l={PSDTWO:"psd2"};function c(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,y;return m&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(A){m[A]?m[A]=s[m[A]]:m[A]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(A){m[A]||(m[A]="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:o[p.brandCode]||"Unknown",lastFour:p.last4||"",lastTwo:f},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(y=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:l[y]||y.toLowerCase()}),v}n.exports=c},{"./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=s(u):p?h=o(u):h={error:{message:"There was a problem serving your request"},fieldErrors:[]},h}function o(u){return{error:{message:u.errors[0].message},fieldErrors:[]}}function s(u){var h=l(u.errors);return h.length===0?{error:{message:u.errors[0].message}}:{error:{message:d(h)},fieldErrors:h}}function l(u){var h=[];return u.forEach(function(p){p.extensions&&p.extensions.inputPath&&c(p.extensions.inputPath.slice(1),p,h)}),h}function c(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(y){y.field===v&&(f=y)}),f||(f={field:v,fieldErrors:[]},p.push(f)),c(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 o(){return{query:i,operationName:"ClientConfiguration"}}n.exports=o},{}],21:[function(e,n,a){var i=e("../../../../lib/assign").assign;function o(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 s(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,y=p.email,A="hasBuyerConsent"in f&&f.hasBuyerConsent,x=p.shippingAddress,N=l(u,h),I=i({},N.input,{email:y,optIn:A,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 l(u,h){var p=u.creditCard,f=p&&p.billingAddress,m=p&&p.expirationDate,v=p&&(p.expirationMonth||m&&m.split("/")[0].trim()),y=p&&(p.expirationYear||m&&m.split("/")[1].trim()),A={input:{creditCard:{number:p&&p.number,expirationMonth:v,expirationYear:y,cvv:p&&p.cvv,cardholderName:p&&p.cardholderName},options:{}}};return h.hasAuthenticationInsight&&(A.authenticationInsightInput={merchantAccountId:u.merchantAccountId}),f&&(A.input.creditCard.billingAddress=f),A.input=c(u,A.input),A}function c(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:o(h),variables:s(u,h),operationName:"TokenizeCreditCardForPayPalConnect"}}n.exports=d},{"../../../../lib/assign":32}],22:[function(e,n,a){var i=e("../../../../lib/assign").assign;function o(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 s(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()),y={input:{creditCard:{number:h&&h.number,expirationMonth:m,expirationYear:v,cvv:h&&h.cvv,cardholderName:h&&h.cardholderName},options:{}}};return u.hasAuthenticationInsight&&(y.authenticationInsightInput={merchantAccountId:d.merchantAccountId}),p&&(y.input.creditCard.billingAddress=p),y.input=l(d,y.input),y}function l(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 c(d){var u={hasAuthenticationInsight:!!(d.authenticationInsight&&d.merchantAccountId)};return{query:o(u),variables:s(d,u),operationName:"TokenizeCreditCard"}}n.exports=c},{"../../../../lib/assign":32}],23:[function(e,n,a){var i={tokenize_credit_cards:"payment_methods/credit_cards",configuration:"configuration"},o=["creditCard.options.unionPayEnrollment"];function s(c){this._config=c.graphQL}s.prototype.getGraphQLEndpoint=function(){return this._config.url},s.prototype.isGraphQLRequest=function(c,d){var u,h=this.getClientApiPath(c);return!this._isGraphQLEnabled()||!h||(u=this._config.features.some(function(p){return i[p]===h}),l(d))?!1:u},s.prototype.getClientApiPath=function(c){var d,u="/client_api/v1/",h=c.split(u);return h.length>1&&(d=h[1].split("?")[0]),d},s.prototype._isGraphQLEnabled=function(){return!!this._config};function l(c){return o.some(function(d){var u=d.split(".").reduce(function(h,p){return h&&h[p]},c);return u!==void 0})}n.exports=s},{}],24:[function(e,n,a){var i=e("../../constants").BRAINTREE_VERSION,o=e("../../../lib/assign").assign,s=e("../../../lib/snake-case-to-camel-case"),l=e("../../../lib/is-fastlane-checkout"),c=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):c(N)},configuration:p},v={"payment_methods/credit_cards":function(N,I,P){return P?u(N,I):d(N,I)},configuration:f};function y(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")}y.prototype.getUrl=function(){return this._graphQL.getGraphQLEndpoint()},y.prototype.getBody=function(){var N=x(this._data),I=this._generator(N,l(this._data.creditCard)),P=o({clientSdkMetadata:this._clientSdkMetadata},I);return JSON.stringify(P)},y.prototype.getMethod=function(){return"POST"},y.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},o({},this._headers,I)},y.prototype.adaptResponseBody=function(N){return this._adapter(N,this,"creditCard"in this._data&&l(this._data.creditCard))},y.prototype.determineStatus=function(N,I){var P,k;return N===200?(k=I.errors&&I.errors[0]&&I.errors[0].extensions&&I.errors[0].extensions.errorClass,I.data&&!I.errors?P=200:k==="VALIDATION"?P=422:k==="AUTHORIZATION"?P=403:k==="AUTHENTICATION"?P=401:A(k,I)?P=403:P=500):N?P=N:P=500,this._sendAnalyticsEvent("graphql.status."+N),this._sendAnalyticsEvent("graphql.determinedStatus."+P),P};function A(N,I){return!N&&I.errors[0].message}function x(N){var I={};return Object.keys(N).forEach(function(P){var k=s(P);typeof N[P]=="object"?I[k]=x(N[P]):typeof N[P]=="number"?I[k]=String(N[P]):I[k]=N[P]}),I}n.exports=y},{"../../../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"),o=e("./ajax-driver");n.exports=function(s,l){l=i(l||Function.prototype),s.method=(s.method||"GET").toUpperCase(),s.timeout=s.timeout==null?6e4:s.timeout,s.data=s.data||{},o.request(s,l)}},{"../../lib/once":46,"./ajax-driver":14}],26:[function(e,n,a){n.exports=function(i){try{i=JSON.parse(i)}catch(o){}return i}},{}],27:[function(e,n,a){n.exports=function(i,o){if(typeof i!="string")throw new Error("Method must be a string");return i.toLowerCase()!=="get"&&o!=null&&(o=typeof o=="string"?o:JSON.stringify(o)),o}},{}],28:[function(e,n,a){var i=typeof window!="undefined"&&window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest;function o(){return i?new window.XMLHttpRequest:new window.XDomainRequest}n.exports={isAvailable:i,getRequestObject:o}},{}],29:[function(e,n,a){var i=e("./create-authorization-data"),o=e("./json-clone"),s=e("./constants");function l(d,u){var h,p=u?o(u):{},f=i(d.authorization).attrs,m=o(d.analyticsMetadata);p.braintreeLibraryVersion=s.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 c(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:s.VERSION,component:"braintreeclientsdk",merchant_sdk_env:p?"production":"sandbox",merchant_id:u.gatewayConfiguration.merchantId,event_source:"web",platform:s.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:l,addEventMetadata:c}},{"./constants":34,"./create-authorization-data":37,"./json-clone":44}],30:[function(e,n,a){var i=e("./constants"),o=e("./add-metadata"),s=e("./assign").assign;function l(u,h,p){return c(u,h,{},p)}function c(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 y=v._request,A=i.ANALYTICS_URL,x=i.ANALYTICS_PREFIX+h,N=v.getConfiguration(),I=N.gatewayConfiguration.environment==="production",P={events:[],tracking:[]},k=o.addEventMetadata(v,P);return k.event_name=x,k.t=m,P.events=[{level:"info",event:x,payload:s({env:I?"production":"sandbox",timestamp:m},p)}],P.tracking=[k],p&&typeof p=="object"&&(P.tracking=[d(k,p)]),y({url:A,method:"post",data:P,timeout:i.ANALYTICS_REQUEST_TIMEOUT_MS},f)}).catch(function(v){f&&f(v)})}function d(u,h){var p={},f=s({},h);return Object.keys(f).forEach(function(m){i.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(m)===-1&&delete f[m]}),p=s(u,f),p}n.exports={sendEvent:l,sendEventPlus:c}},{"./add-metadata":29,"./assign":32,"./constants":34}],31:[function(e,n,a){var i=e("@braintree/asset-loader/load-script"),o=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:i,loadFastlane:o.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:o;function o(s){var l,c,d;for(l=1;l<arguments.length;l++){c=arguments[l];for(d in c)c.hasOwnProperty(d)&&(s[d]=c[d])}return s}n.exports={assign:i,_assign:o}},{}],33:[function(e,n,a){var i=e("./enumerate");function o(s){if(!o.types.hasOwnProperty(s.type))throw new Error(s.type+" is not a valid type.");if(!s.code)throw new Error("Error code required.");if(!s.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=s.code,this.message=s.message,this.type=s.type,this.details=s.details}o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),o.findRootError=function(s){return s instanceof o&&s.details&&s.details.originalError?o.findRootError(s.details.originalError):s},n.exports=o},{"./enumerate":39}],34:[function(e,n,a){var i="3.126.0",o="web",s={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},l={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},c={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:o+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:l,CLIENT_API_URLS:s,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:c,INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:o,BRAINTREE_LIBRARY_VERSION:"braintree/"+o+"/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],35:[function(e,n,a){var i=e("./braintree-error"),o=e("./errors");n.exports=function(s,l){l.forEach(function(c){s[c]=function(){throw new i({type:o.METHOD_CALLED_AFTER_TEARDOWN.type,code:o.METHOD_CALLED_AFTER_TEARDOWN.code,message:c+" cannot be called after teardown."})}})}},{"./braintree-error":33,"./errors":40}],36:[function(e,n,a){var i=e("./braintree-error");function o(s,l){return s instanceof i?s:new i({type:l.type,code:l.code,message:l.message,details:{originalError:s}})}n.exports=o},{"./braintree-error":33}],37:[function(e,n,a){var i=e("../lib/vendor/polyfill").atob,o=e("../lib/constants").CLIENT_API_URLS;function s(d){return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(d)}function l(d){var u=d.split("_"),h=u[0],p=u.slice(2).join("_");return{merchantId:p,environment:h}}function c(d){var u,h,p={attrs:{},configUrl:""};return s(d)?(h=l(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=o[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=c},{"../lib/constants":34,"../lib/vendor/polyfill":49}],38:[function(e,n,a){n.exports=function(i){return function(){var o=arguments;setTimeout(function(){i.apply(null,o)},1)}}},{}],39:[function(e,n,a){function i(o,s){return s=s==null?"":s,o.reduce(function(l,c){return l[c]=s+c,l},{})}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(s){var l=s.split("-");return new Date(l[0],l[1],l[2])}function o(s,l){return i(s)<=i(l)}n.exports=o},{}],42:[function(e,n,a){n.exports=function(i){return i&&i.hasOwnProperty("fastlane")&&i.fastlane}},{}],43:[function(e,n,a){var i,o={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function s(c){return c.split(".").slice(-2).join(".")}function l(c){var d;return c=c.toLowerCase(),/^https:/.test(c)?(i=i||document.createElement("a"),i.href=c,d=s(i.hostname),o.hasOwnProperty(d)):!1}n.exports=l},{}],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(o){return typeof i[o]=="function"})}},{}],46:[function(e,n,a){function i(o){var s=!1;return function(){s||(s=!0,o.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 o(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.toString.call(u)==="[object Array]"||!1}function s(u){return u=u||window.location.href,/\?/.test(u)}function l(u){var h,p;return u=u||window.location.href,s(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(f,m){var v=m.split("="),y=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return f[y]=A,f},{}),p):{}}function c(u,h){var p,f,m,v=[];for(m in u)u.hasOwnProperty(m)&&(f=u[m],h?o(u)?p=h+"[]":p=h+"["+m+"]":p=m,typeof f=="object"?v.push(c(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+=c(h)),u}n.exports={parse:l,stringify:c,queryify:d,hasQueryParams:s}},{}],48:[function(e,n,a){n.exports=function(i){return i.indexOf("_")===-1?i:i.toLowerCase().replace(/(\_\w)/g,function(o){return o[1].toUpperCase()})}},{}],49:[function(e,n,a){var i=typeof atob=="function"?atob:o;function o(s){var l,c,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})?$/,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="";if(!v.test(s))throw new Error("Non base64 encoded input passed to window.atob polyfill");m=0;do u=y.indexOf(s.charAt(m++)),h=y.indexOf(s.charAt(m++)),p=y.indexOf(s.charAt(m++)),f=y.indexOf(s.charAt(m++)),l=(u&63)<<2|h>>4&3,c=(h&15)<<4|p>>2&15,d=(p&3)<<6|f&63,A+=String.fromCharCode(l)+(c?String.fromCharCode(c):"")+(d?String.fromCharCode(d):"");while(m<s.length);return A}n.exports={atob:function(s){return i.call(window,s)},_atob:o}},{}]},{},[13])(13)})}(Or)),Or.exports}var Sc=Lc();const Dc=Cr(Sc);var Pr={exports:{}},ji;function Mc(){return ji||(ji=1,function(r,t){(function(e){r.exports=e()})(function(){return function(){function e(n,a,i){function o(c,d){if(!a[c]){if(!n[c]){var u=typeof we=="function"&&we;if(!d&&u)return u(c,!0);if(s)return s(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var p=a[c]={exports:{}};n[c][0].call(p.exports,function(f){var m=n[c][1][f];return o(m||f)},p,p.exports,e,n,a,i)}return a[c].exports}for(var s=typeof we=="function"&&we,l=0;l<i.length;l++)o(i[l]);return o}return e}()({1:[function(e,n,a){var i={};function o(s){var l,c=JSON.stringify(s);if(!s.forceScriptReload&&(l=i[c],l))return l;var d=document.createElement("script"),u=s.dataAttributes||{},h=s.container||document.head;return d.src=s.src,d.id=s.id||"",d.async=!0,s.type&&d.setAttribute("type","".concat(s.type)),s.crossorigin&&d.setAttribute("crossorigin","".concat(s.crossorigin)),s.integrity&&d.setAttribute("integrity","".concat(s.integrity)),Object.keys(u).forEach(function(p){d.setAttribute("data-".concat(p),"".concat(u[p]))}),l=new Promise(function(p,f){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){f(new Error("".concat(s.src," failed to load.")))}),d.addEventListener("abort",function(){f(new Error("".concat(s.src," has aborted.")))}),h.appendChild(d)}),i[c]=l,l}o.clearCache=function(){i={}},n.exports=o},{}],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(o){return function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];setTimeout(function(){try{o.apply(void 0,s)}catch(c){console.log("Error in callback function"),console.log(c)}},1)}}a.deferred=i},{}],4:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(o){var s=!1;return function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];s||(s=!0,o.apply(void 0,l))}}a.once=i},{}],5:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(o,s){if(!s)return o;o.then(function(l){return s(null,l)}).catch(function(l){return s(l)})}a.promiseOrCallback=i},{}],6:[function(e,n,a){var i=e("./lib/deferred"),o=e("./lib/once"),s=e("./lib/promise-or-callback");function l(c){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=o.once(i.deferred(h))),s.promiseOrCallback(c.apply(this,d),h)}}l.wrapPrototype=function(c,d){d===void 0&&(d={});var u=d.ignoreMethods||[],h=d.transformPrivateMethods===!0,p=Object.getOwnPropertyNames(c.prototype).filter(function(f){var m,v=f!=="constructor"&&typeof c.prototype[f]=="function",y=u.indexOf(f)===-1;return h?m=!0:m=f.charAt(0)!=="_",v&&m&&y});return p.forEach(function(f){var m=c.prototype[f];c.prototype[f]=l(m)}),c},n.exports=l},{"./lib/deferred":3,"./lib/once":4,"./lib/promise-or-callback":5}],7:[function(e,n,a){(function(i,o){typeof a=="object"&&typeof n!="undefined"?o(a):(i=typeof globalThis!="undefined"?globalThis:i||self,o(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
315
+ ***************************************************************************** */function s(b,T,_,L){function D(C){return C instanceof _?C:new _(function(B){B(C)})}return new(_||(_=Promise))(function(C,B){function X(te){try{R(L.next(te))}catch(ye){B(ye)}}function ae(te){try{R(L.throw(te))}catch(ye){B(ye)}}function R(te){te.done?C(te.value):D(te.value).then(X,ae)}R((L=L.apply(b,[])).next())})}function o(b,T){var _={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},L,D,C,B;return B={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function X(R){return function(te){return ae([R,te])}}function ae(R){if(L)throw new TypeError("Generator is already executing.");for(;_;)try{if(L=1,D&&(C=R[0]&2?D.return:R[0]?D.throw||((C=D.return)&&C.call(D),0):D.next)&&!(C=C.call(D,R[1])).done)return C;switch(D=0,C&&(R=[R[0]&2,C.value]),R[0]){case 0:case 1:C=R;break;case 4:return _.label++,{value:R[1],done:!1};case 5:_.label++,D=R[1],R=[0];continue;case 7:R=_.ops.pop(),_.trys.pop();continue;default:if(C=_.trys,!(C=C.length>0&&C[C.length-1])&&(R[0]===6||R[0]===2)){_=0;continue}if(R[0]===3&&(!C||R[1]>C[0]&&R[1]<C[3])){_.label=R[1];break}if(R[0]===6&&_.label<C[1]){_.label=C[1],C=R;break}if(C&&_.label<C[2]){_.label=C[2],_.ops.push(R);break}C[2]&&_.ops.pop(),_.trys.pop();continue}R=T.call(b,_)}catch(te){R=[6,te],D=0}finally{L=C=0}if(R[0]&5)throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}}var c={},l={};function d(b){var T,_=JSON.stringify(b);if(!b.forceScriptReload&&(T=l[_],T))return T;var L=document.createElement("script"),D=b.dataAttributes||{},C=b.container||document.head;return L.src=b.src,L.id=b.id||"",L.async=!0,b.type&&L.setAttribute("type","".concat(b.type)),b.crossorigin&&L.setAttribute("crossorigin","".concat(b.crossorigin)),Object.keys(D).forEach(function(B){L.setAttribute("data-".concat(B),"".concat(D[B]))}),T=new Promise(function(B,X){L.addEventListener("load",function(){B(L)}),L.addEventListener("error",function(){X(new Error("".concat(b.src," failed to load.")))}),L.addEventListener("abort",function(){X(new Error("".concat(b.src," has aborted.")))}),C.appendChild(L)}),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 L=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),L.firstChild?L.insertBefore(_,L.firstChild):L.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",y={minified:"axo.min",unminified:"axo"},A="fastlane",x="connect-boba",N="".concat(x,"/locales/"),I={AXO_ASSET_NAME:y,AXO_ASSET_PATH:x,LOCALE_PATH:N,CDNX_PROD:v},P={BT:"BT",PPCP:"PPCP"};function O(){return typeof window.define=="function"&&!!window.define.amd}function S(){return O()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function F(b,T,_){var L,D;return _===void 0&&(_=!0),s(this,void 0,void 0,function(){var C,B;return o(this,function(X){if(C=G(),C&&C[b.module]){if(T&&((L=C[b.module])===null||L===void 0?void 0:L.VERSION)!==T)throw B=(D=C[b.module])===null||D===void 0?void 0:D.VERSION,new Error("".concat(b.module," already loaded with version ").concat(B," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(b.module," without specifying version"));return[2,W(b,T,_)]})})}function W(b,T,_){if(_===void 0&&(_=!0),O()){var L=_?b.amdModule.minified:b.amdModule.unminified;return new Promise(function(C,B){window.require([L],C,B)})}var D=_?b.script.minified:b.script.unminified;return f({id:"".concat(b.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(D)})}function G(){return window==null?void 0:window.braintree}var U,j,z={Client:"client",HostedCardFields:"hostedFields"},J="braintree",M=(U={},U[z.Client]="client",U[z.HostedCardFields]="hosted-fields",U),$=(j={},j[z.Client]={id:"client",module:z.Client,amdModule:{unminified:"".concat(J,"/").concat(M[z.Client]),minified:"".concat(J,"/").concat(M[z.Client],".min")},script:{unminified:"".concat(M[z.Client],".js"),minified:"".concat(M[z.Client],".min.js")}},j[z.HostedCardFields]={id:"hcf",module:z.HostedCardFields,amdModule:{unminified:"".concat(J,"/").concat(M[z.HostedCardFields]),minified:"".concat(J,"/").concat(M[z.HostedCardFields],".min")},script:{unminified:"".concat(M[z.HostedCardFields],".js"),minified:"".concat(M[z.HostedCardFields],".min.js")}},j);function H(b){return s(this,void 0,void 0,function(){var T,_,L,D;return o(this,function(C){switch(C.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=b.btSdkVersion,_=b.minified,L=k(b),D=V(b),b.platform!==P.BT?[3,2]:[4,Promise.all([F($.hostedFields,T,_),E(L,_)])];case 1:return C.sent(),[3,5];case 2:return b.platform!==P.PPCP?[3,4]:[4,Promise.all([F($.client,T,_),F($.hostedFields,T,_),E(L,_)])];case 3:return C.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:D}}]}})})}function E(b,T){var _;if(T===void 0&&(T=!0),O()){S()&&requirejs.config({paths:(_={},_[A]=b,_)});var L="".concat(A,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(D,C){window.require([L],D,C)})}return f({id:"axo-id",src:b,forceScriptReload:!0})}function g(b){var T=b.assetUrl,_=b.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function k(b){var T,_=(b==null?void 0:b.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,L=O()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:L,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(b){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=H})},{}],9:[function(e,r,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"),y=e("../lib/assign").assign,A=e("../lib/analytics"),x=e("./errors"),N=e("../lib/constants").VERSION,I=e("../lib/constants").GRAPHQL_URLS,P=e("../lib/methods"),O=e("../lib/convert-methods-to-error"),S=e("../lib/assets"),F=e("../lib/constants").FRAUDNET_FNCLS,W=e("../lib/constants").FRAUDNET_SOURCE,G=e("../lib/constants").FRAUDNET_URL,U={};function j(M){var $,H;if(M=M||{},$=JSON.stringify(M),H=M.gatewayConfiguration,!H)throw new l(x.CLIENT_MISSING_GATEWAY_CONFIGURATION);if(["assetsUrl","clientApiUrl","configUrl"].forEach(function(E){if(E in H&&!c(H[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($)},this._request=o,this._configuration=this.getConfiguration(),this._clientApiBaseUrl=H.clientApiUrl+"/v1/",H.graphQL){if(!c(H.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:H.graphQL})}}j.initialize=function(M){var $,H,E=U[M.authorization];if(E)return A.sendEvent(E,"custom.client.load.cached"),E;try{H=h(M.authorization)}catch(g){return Promise.reject(new l(x.CLIENT_INVALID_AUTHORIZATION))}return E=u(H,M.sessionId).then(function(g){return M.debug&&(g.isDebug=!0),g.authorization=M.authorization,$=new j(g),$}),U[M.authorization]=E,A.sendEvent(E,"custom.client.load.initialized"),E.then(function(g){return A.sendEvent($,"custom.client.load.succeeded"),g}).catch(function(g){return delete U[M.authorization],Promise.reject(g)})},j.clearCache=function(){U={}},j.prototype._findOrCreateFraudnetJSON=function(M){var $=document.querySelector('script[fncls="'+F+'"]'),H,E,g,k;$||($=document.body.appendChild(document.createElement("script")),$.type="application/json",$.setAttribute("fncls",F)),H=this.getConfiguration(),E={rda_tenant:"bt_card",mid:H.gatewayConfiguration.merchantId},g=H.authorizationFingerprint,g&&g.split("&").forEach(function(V){var b=V.split("=");b[0]==="customer_id"&&b.length>1&&(E.cid=b[1])}),k={f:M.substr(0,32),fp:E,bu:!1,s:W},$.text=JSON.stringify(k)},j.prototype.request=function(M,$){var H=this,E=new Promise(function(g,k){var V,b,T,_,L=!!(M.endpoint==="payment_methods/credit_cards"&&H.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?b=M.api:b="clientApi",_={method:M.method,graphQL:H._graphQL,timeout:M.timeout,metadata:H._configuration.analyticsMetadata},b==="clientApi")T=H._clientApiBaseUrl,_.data=p.addMetadata(H._configuration,M.data);else if(b==="graphQLApi")T=I[H._configuration.gatewayConfiguration.environment],M.endpoint="",_.method="post",_.data=y({clientSdkMetadata:{platform:H._configuration.analyticsMetadata.platform,source:H._configuration.analyticsMetadata.source,integration:H._configuration.analyticsMetadata.integration,sessionId:H._configuration.analyticsMetadata.sessionId,version:N}},M.data),_.headers=J(H._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){A.sendEvent(H,D)},H._request(_,function(D,C,B){var X,ae;if(ae=z(B,D),ae){k(ae);return}if(b==="graphQLApi"&&C.errors){k(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}X=y({_httpStatus:B},C),L&&X.creditCards&&X.creditCards.length>0&&(H._findOrCreateFraudnetJSON(X.creditCards[0].nonce),S.loadScript({src:G,forceScriptReload:!0})),g(X)})});if(typeof $=="function"){$=m(v($)),E.then(function(g){$(null,g,g._httpStatus)}).catch(function(g){var k=g&&g.details&&g.details.httpStatus;$(g,null,k)});return}return E};function z(M,$){var H;if(M===-1?H=new l(x.CLIENT_REQUEST_TIMEOUT):M===401?H=new l(x.CLIENT_AUTHORIZATION_INVALID):M===403?H=new l(x.CLIENT_AUTHORIZATION_INSUFFICIENT):M===429?H=new l(x.CLIENT_RATE_LIMITED):M>=500?H=new l(x.CLIENT_GATEWAY_NETWORK):(M<200||M>=400)&&(H=d($,{type:x.CLIENT_REQUEST_ERROR.type,code:x.CLIENT_REQUEST_ERROR.code,message:x.CLIENT_REQUEST_ERROR.message})),H)return H.details=H.details||{},H.details.httpStatus=M,H}j.prototype.toJSON=function(){return this.getConfiguration()},j.prototype.getVersion=function(){return N},j.prototype.teardown=f(function(){var M=this;return delete U[M.getConfiguration().authorization],O(M,P(j.prototype)),Promise.resolve()});function J(M){var $=M.authorizationFingerprint||M.authorization;return{Authorization:"Bearer "+$,"Braintree-Version":i}}r.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,r,a){r.exports={BRAINTREE_VERSION:"2018-05-10"}},{}],11:[function(e,r,a){var i=e("../lib/braintree-error");r.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,r,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,y){return new Promise(function(A,x){var N,I,P,O,S=y||c(),F={merchantAppId:window.location.host,platform:l.PLATFORM,sdkVersion:l.VERSION,source:l.SOURCE,integration:l.INTEGRATION,integrationType:l.INTEGRATION,sessionId:S};I=v.attrs,P=v.configUrl,I._meta=F,I.braintreeLibraryVersion=l.BRAINTREE_LIBRARY_VERSION,I.configVersion="3",O={url:P,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=F):I.tokenizationKey&&(O.graphQL=new u({graphQL:{url:h[v.environment],features:["configuration"]}}),O.metadata=F),o(O,function(W,G,U){var j;if(W){U===403?j=d.CLIENT_AUTHORIZATION_INSUFFICIENT:U===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:F,gatewayConfiguration:G},A(N)})})}r.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,r,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."}))}r.exports={create:c(d),VERSION:o}},{"../lib/braintree-error":33,"../lib/errors":40,"./client":9,"@braintree/wrap-promise":7}],14:[function(e,r,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 y(x,N,I){var P,O,S,F,W,G,U,j=x.url,z=x.graphQL,J=x.timeout,M=l.getRequestObject(),$=I,H=!!(z&&z.isGraphQLRequest(j,x.data));x.headers=s({"Content-Type":"application/json"},x.headers),H?S=new u(x):S=new h(x),j=S.getUrl(),F=S.getBody(),W=S.getMethod(),G=S.getHeaders(),W==="GET"&&(j=i.queryify(j,F),F=null),d?M.onreadystatechange=function(){if(M.readyState===4){if(M.status===0&&H){delete x.graphQL,y(x,N,I);return}if(U=c(M.responseText),O=S.adaptResponseBody(U),P=S.determineStatus(M.status,U),P>=400||P<200){if(H&&v(U)){delete x.graphQL,y(x,N,I);return}if(N<p&&m(P)){N++,y(x,N,I);return}$(O||"error",null,P||500)}else $(null,O,P)}}:(x.headers&&(j=i.queryify(j,G)),M.onload=function(){$(null,c(M.responseText),M.status)},M.onerror=function(){$("error",null,500)},M.onprogress=function(){},M.ontimeout=function(){$("timeout",null,-1)});try{M.open(W,j,!0)}catch(E){if(!H)throw E;delete x.graphQL,y(x,N,I);return}M.timeout=J,d&&Object.keys(G).forEach(function(E){M.setRequestHeader(E,G[E])});try{M.send(o(W,F))}catch(E){}}function A(x,N){y(x,0,N)}r.exports={request:A}},{"../../lib/assign":32,"../../lib/querystring":47,"./default-request":15,"./graphql/request":24,"./parse-body":26,"./prep-body":27,"./xhr":28}],15:[function(e,r,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},r.exports=i},{}],16:[function(e,r,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},[])}r.exports=c},{"../../../../lib/assign":32,"./error":19}],17:[function(e,r,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,y;return m&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(A){m[A]?m[A]=o[m[A]]:m[A]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(A){m[A]||(m[A]="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&&(y=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:c[y]||y.toLowerCase()}),v}r.exports=l},{"./error":19}],18:[function(e,r,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,y;return m&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(A){m[A]?m[A]=o[m[A]]:m[A]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(A){m[A]||(m[A]="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&&(y=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:c[y]||y.toLowerCase()}),v}r.exports=l},{"./error":19}],19:[function(e,r,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(y){y.field===v&&(f=y)}),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]}r.exports=i},{}],20:[function(e,r,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"}}r.exports=s},{}],21:[function(e,r,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,y=p.email,A="hasBuyerConsent"in f&&f.hasBuyerConsent,x=p.shippingAddress,N=c(u,h),I=i({},N.input,{email:y,optIn:A,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()),y=p&&(p.expirationYear||m&&m.split("/")[1].trim()),A={input:{creditCard:{number:p&&p.number,expirationMonth:v,expirationYear:y,cvv:p&&p.cvv,cardholderName:p&&p.cardholderName},options:{}}};return h.hasAuthenticationInsight&&(A.authenticationInsightInput={merchantAccountId:u.merchantAccountId}),f&&(A.input.creditCard.billingAddress=f),A.input=l(u,A.input),A}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"}}r.exports=d},{"../../../../lib/assign":32}],22:[function(e,r,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()),y={input:{creditCard:{number:h&&h.number,expirationMonth:m,expirationYear:v,cvv:h&&h.cvv,cardholderName:h&&h.cardholderName},options:{}}};return u.hasAuthenticationInsight&&(y.authenticationInsightInput={merchantAccountId:d.merchantAccountId}),p&&(y.input.creditCard.billingAddress=p),y.input=c(d,y.input),y}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"}}r.exports=l},{"../../../../lib/assign":32}],23:[function(e,r,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})}r.exports=o},{}],24:[function(e,r,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,P){return P?u(N,I):d(N,I)},configuration:f};function y(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")}y.prototype.getUrl=function(){return this._graphQL.getGraphQLEndpoint()},y.prototype.getBody=function(){var N=x(this._data),I=this._generator(N,c(this._data.creditCard)),P=s({clientSdkMetadata:this._clientSdkMetadata},I);return JSON.stringify(P)},y.prototype.getMethod=function(){return"POST"},y.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)},y.prototype.adaptResponseBody=function(N){return this._adapter(N,this,"creditCard"in this._data&&c(this._data.creditCard))},y.prototype.determineStatus=function(N,I){var P,O;return N===200?(O=I.errors&&I.errors[0]&&I.errors[0].extensions&&I.errors[0].extensions.errorClass,I.data&&!I.errors?P=200:O==="VALIDATION"?P=422:O==="AUTHORIZATION"?P=403:O==="AUTHENTICATION"?P=401:A(O,I)?P=403:P=500):N?P=N:P=500,this._sendAnalyticsEvent("graphql.status."+N),this._sendAnalyticsEvent("graphql.determinedStatus."+P),P};function A(N,I){return!N&&I.errors[0].message}function x(N){var I={};return Object.keys(N).forEach(function(P){var O=o(P);typeof N[P]=="object"?I[O]=x(N[P]):typeof N[P]=="number"?I[O]=String(N[P]):I[O]=N[P]}),I}r.exports=y},{"../../../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,r,a){var i=e("../../lib/once"),s=e("./ajax-driver");r.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,r,a){r.exports=function(i){try{i=JSON.parse(i)}catch(s){}return i}},{}],27:[function(e,r,a){r.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,r,a){var i=typeof window!="undefined"&&window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest;function s(){return i?new window.XMLHttpRequest:new window.XDomainRequest}r.exports={isAvailable:i,getRequestObject:s}},{}],29:[function(e,r,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}r.exports={addMetadata:c,addEventMetadata:l}},{"./constants":34,"./create-authorization-data":37,"./json-clone":44}],30:[function(e,r,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 y=v._request,A=i.ANALYTICS_URL,x=i.ANALYTICS_PREFIX+h,N=v.getConfiguration(),I=N.gatewayConfiguration.environment==="production",P={events:[],tracking:[]},O=s.addEventMetadata(v,P);return O.event_name=x,O.t=m,P.events=[{level:"info",event:x,payload:o({env:I?"production":"sandbox",timestamp:m},p)}],P.tracking=[O],p&&typeof p=="object"&&(P.tracking=[d(O,p)]),y({url:A,method:"post",data:P,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}r.exports={sendEvent:c,sendEventPlus:l}},{"./add-metadata":29,"./assign":32,"./constants":34}],31:[function(e,r,a){var i=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");r.exports={loadScript:i,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":8}],32:[function(e,r,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}r.exports={assign:i,_assign:s}},{}],33:[function(e,r,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},r.exports=s},{"./enumerate":39}],34:[function(e,r,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"};r.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,r,a){var i=e("./braintree-error"),s=e("./errors");r.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,r,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}})}r.exports=s},{"./braintree-error":33}],37:[function(e,r,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}r.exports=l},{"../lib/constants":34,"../lib/vendor/polyfill":49}],38:[function(e,r,a){r.exports=function(i){return function(){var s=arguments;setTimeout(function(){i.apply(null,s)},1)}}},{}],39:[function(e,r,a){function i(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}r.exports=i},{}],40:[function(e,r,a){var i=e("./braintree-error");r.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,r,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)}r.exports=s},{}],42:[function(e,r,a){r.exports=function(i){return i&&i.hasOwnProperty("fastlane")&&i.fastlane}},{}],43:[function(e,r,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}r.exports=c},{}],44:[function(e,r,a){r.exports=function(i){return JSON.parse(JSON.stringify(i))}},{}],45:[function(e,r,a){r.exports=function(i){return Object.keys(i).filter(function(s){return typeof i[s]=="function"})}},{}],46:[function(e,r,a){function i(s){var o=!1;return function(){o||(o=!0,s.apply(null,arguments))}}r.exports=i},{}],47:[function(e,r,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("="),y=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return f[y]=A,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}r.exports={parse:c,stringify:l,queryify:d,hasQueryParams:o}},{}],48:[function(e,r,a){r.exports=function(i){return i.indexOf("_")===-1?i:i.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],49:[function(e,r,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})?$/,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");m=0;do u=y.indexOf(o.charAt(m++)),h=y.indexOf(o.charAt(m++)),p=y.indexOf(o.charAt(m++)),f=y.indexOf(o.charAt(m++)),c=(u&63)<<2|h>>4&3,l=(h&15)<<4|p>>2&15,d=(p&3)<<6|f&63,A+=String.fromCharCode(c)+(l?String.fromCharCode(l):"")+(d?String.fromCharCode(d):"");while(m<o.length);return A}r.exports={atob:function(o){return i.call(window,o)},_atob:s}},{}]},{},[13])(13)})}(Nr)),Nr.exports}var Sl=Rl();const Ml=_r(Sl);var Lr={exports:{}},Fi;function Dl(){return Fi||(Fi=1,function(n,t){(function(e){n.exports=e()})(function(){return function(){function e(r,a,i){function s(l,d){if(!a[l]){if(!r[l]){var u=typeof Ce=="function"&&Ce;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:{}};r[l][0].call(p.exports,function(f){var m=r[l][1][f];return s(m||f)},p,p.exports,e,r,a,i)}return a[l].exports}for(var o=typeof Ce=="function"&&Ce,c=0;c<i.length;c++)s(i[c]);return s}return e}()({1:[function(e,r,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={}},r.exports=s},{}],2:[function(e,r,a){r.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,r,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,r,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,r,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,r,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",y=u.indexOf(f)===-1;return h?m=!0:m=f.charAt(0)!=="_",v&&m&&y});return p.forEach(function(f){var m=l.prototype[f];l.prototype[f]=c(m)}),l},r.exports=c},{"./lib/deferred":3,"./lib/once":4,"./lib/promise-or-callback":5}],7:[function(e,r,a){(function(i,s){typeof a=="object"&&typeof r!="undefined"?s(a):(i=typeof globalThis!="undefined"?globalThis:i||self,s(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
316
316
  Copyright (c) Microsoft Corporation.
317
317
 
318
318
  Permission to use, copy, modify, and/or distribute this software for any
@@ -325,7 +325,7 @@ ${m}::-ms-input-placeholder{${f}}
325
325
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
326
326
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
327
327
  PERFORMANCE OF THIS SOFTWARE.
328
- ***************************************************************************** */function o(b,T,_,O){function M(C){return C instanceof _?C:new _(function(j){j(C)})}return new(_||(_=Promise))(function(C,j){function Q(ee){try{L(O.next(ee))}catch(be){j(be)}}function ae(ee){try{L(O.throw(ee))}catch(be){j(be)}}function L(ee){ee.done?C(ee.value):M(ee.value).then(Q,ae)}L((O=O.apply(b,[])).next())})}function s(b,T){var _={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},O,M,C,j;return j={next:Q(0),throw:Q(1),return:Q(2)},typeof Symbol=="function"&&(j[Symbol.iterator]=function(){return this}),j;function Q(L){return function(ee){return ae([L,ee])}}function ae(L){if(O)throw new TypeError("Generator is already executing.");for(;_;)try{if(O=1,M&&(C=L[0]&2?M.return:L[0]?M.throw||((C=M.return)&&C.call(M),0):M.next)&&!(C=C.call(M,L[1])).done)return C;switch(M=0,C&&(L=[L[0]&2,C.value]),L[0]){case 0:case 1:C=L;break;case 4:return _.label++,{value:L[1],done:!1};case 5:_.label++,M=L[1],L=[0];continue;case 7:L=_.ops.pop(),_.trys.pop();continue;default:if(C=_.trys,!(C=C.length>0&&C[C.length-1])&&(L[0]===6||L[0]===2)){_=0;continue}if(L[0]===3&&(!C||L[1]>C[0]&&L[1]<C[3])){_.label=L[1];break}if(L[0]===6&&_.label<C[1]){_.label=C[1],C=L;break}if(C&&_.label<C[2]){_.label=C[2],_.ops.push(L);break}C[2]&&_.ops.pop(),_.trys.pop();continue}L=T.call(b,_)}catch(ee){L=[6,ee],M=0}finally{O=C=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}}var l={},c={};function d(b){var T,_=JSON.stringify(b);if(!b.forceScriptReload&&(T=c[_],T))return T;var O=document.createElement("script"),M=b.dataAttributes||{},C=b.container||document.head;return O.src=b.src,O.id=b.id||"",O.async=!0,b.type&&O.setAttribute("type","".concat(b.type)),b.crossorigin&&O.setAttribute("crossorigin","".concat(b.crossorigin)),Object.keys(M).forEach(function(j){O.setAttribute("data-".concat(j),"".concat(M[j]))}),T=new Promise(function(j,Q){O.addEventListener("load",function(){j(O)}),O.addEventListener("error",function(){Q(new Error("".concat(b.src," failed to load.")))}),O.addEventListener("abort",function(){Q(new Error("".concat(b.src," has aborted.")))}),C.appendChild(O)}),c[_]=T,T}d.clearCache=function(){c={}};var u=d,h=function(T){var _=document.querySelector('link[href="'.concat(T.href,'"]'));if(_)return Promise.resolve(_);_=document.createElement("link");var O=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),O.firstChild?O.insertBefore(_,O.firstChild):O.appendChild(_),Promise.resolve(_)};Object.defineProperty(l,"__esModule",{value:!0}),l.loadStylesheet=f=l.loadScript=void 0;var p=u,f=l.loadScript=p,m=h;l.loadStylesheet=m;var v="https://www.paypalobjects.com",y={minified:"axo.min",unminified:"axo"},A="fastlane",x="connect-boba",N="".concat(x,"/locales/"),I={AXO_ASSET_NAME:y,AXO_ASSET_PATH:x,LOCALE_PATH:N,CDNX_PROD:v},P={BT:"BT",PPCP:"PPCP"};function k(){return typeof window.define=="function"&&!!window.define.amd}function S(){return k()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function U(b,T,_){var O,M;return _===void 0&&(_=!0),o(this,void 0,void 0,function(){var C,j;return s(this,function(Q){if(C=$(),C&&C[b.module]){if(T&&((O=C[b.module])===null||O===void 0?void 0:O.VERSION)!==T)throw j=(M=C[b.module])===null||M===void 0?void 0:M.VERSION,new Error("".concat(b.module," already loaded with version ").concat(j," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(b.module," without specifying version"));return[2,q(b,T,_)]})})}function q(b,T,_){if(_===void 0&&(_=!0),k()){var O=_?b.amdModule.minified:b.amdModule.unminified;return new Promise(function(C,j){window.require([O],C,j)})}var M=_?b.script.minified:b.script.unminified;return f({id:"".concat(b.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(M)})}function $(){return window==null?void 0:window.braintree}var F,z,B={Client:"client",HostedCardFields:"hostedFields"},Z="braintree",D=(F={},F[B.Client]="client",F[B.HostedCardFields]="hosted-fields",F),Y=(z={},z[B.Client]={id:"client",module:B.Client,amdModule:{unminified:"".concat(Z,"/").concat(D[B.Client]),minified:"".concat(Z,"/").concat(D[B.Client],".min")},script:{unminified:"".concat(D[B.Client],".js"),minified:"".concat(D[B.Client],".min.js")}},z[B.HostedCardFields]={id:"hcf",module:B.HostedCardFields,amdModule:{unminified:"".concat(Z,"/").concat(D[B.HostedCardFields]),minified:"".concat(Z,"/").concat(D[B.HostedCardFields],".min")},script:{unminified:"".concat(D[B.HostedCardFields],".js"),minified:"".concat(D[B.HostedCardFields],".min.js")}},z);function H(b){return o(this,void 0,void 0,function(){var T,_,O,M;return s(this,function(C){switch(C.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=b.btSdkVersion,_=b.minified,O=R(b),M=V(b),b.platform!==P.BT?[3,2]:[4,Promise.all([U(Y.hostedFields,T,_),E(O,_)])];case 1:return C.sent(),[3,5];case 2:return b.platform!==P.PPCP?[3,4]:[4,Promise.all([U(Y.client,T,_),U(Y.hostedFields,T,_),E(O,_)])];case 3:return C.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:M}}]}})})}function E(b,T){var _;if(T===void 0&&(T=!0),k()){S()&&requirejs.config({paths:(_={},_[A]=b,_)});var O="".concat(A,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(M,C){window.require([O],M,C)})}return f({id:"axo-id",src:b,forceScriptReload:!0})}function g(b){var T=b.assetUrl,_=b.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function R(b){var T,_=(b==null?void 0:b.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,O=k()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:O,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(b){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=H})},{}],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,o=e("../lib/constants").FRAUDNET_SOURCE,s=e("../lib/constants").FRAUDNET_URL,l=e("../lib/assets").loadScript,c=32,d;function u(y){var A=new p;return y=y||{},!y.sessionId&&d?(A.sessionId=d,Promise.resolve(A)):A.initialize(y)}function h(){d=null}function p(){}p.prototype.initialize=function(y){var A=y.environment,x=this;return this.sessionId=y.sessionId||y.clientSessionId,this.sessionId&&(this.sessionId=this.sessionId.substring(0,c)),y.sessionId||(d=this.sessionId),this._beaconId=m(this.sessionId),this._parameterBlock=v(this.sessionId,this._beaconId,A,y.cb1),l({src:s}).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(y){y&&y.parentNode&&y.parentNode.removeChild(y)}function m(y){var A=new Date().getTime()/1e3;return"https://b.stats.paypal.com/counter.cgi?i=127.0.0.1&p="+y+"&t="+A+"&a=14"}function v(y,A,x,N){var I=document.body.appendChild(document.createElement("script")),P={f:y,s:o,b:A,cb1:N};return x!=="production"&&(P.sandbox=!0),I.type="application/json",I.setAttribute("fncls",i),I.text=JSON.stringify(P),I}n.exports={setup:u,clearSessionIdCache:h}},{"../lib/assets":11,"../lib/constants":14}],10:[function(e,n,a){var i=e("./fraudnet"),o=e("../lib/braintree-error"),s=e("../lib/basic-component-verification"),l=e("../lib/create-deferred-client"),c=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(A){var x="Data Collector",N={_instances:[]},I={};return s.verify({name:x,client:A.client,authorization:A.authorization}).then(function(){return N._instantiatedWithAClient=!A.useDeferredClient,N._createPromise=l.create({authorization:A.authorization,client:A.client,debug:A.debug,assetsUrl:c.create(A.authorization),name:x}).then(function(P){var k=P.getConfiguration();return i.setup({sessionId:A.riskCorrelationId||A.clientMetadataId||A.correlationId,clientSessionId:k.analyticsMetadata.sessionId,environment:k.gatewayConfiguration.environment,cb1:A.cb1}).then(function(S){S&&(I.correlation_id=S.sessionId,N._instances.push(S))})}).then(function(){return N._instances.length===0?Promise.reject(new o(f.DATA_COLLECTOR_REQUIRES_CREATE_OPTIONS)):(N.deviceData=JSON.stringify(I),N.rawDeviceData=I,N)}),N.teardown=v(N),N.getDeviceData=y(N),N._instantiatedWithAClient?N._createPromise:N})}function v(A){return p(function(){return A._createPromise.then(function(){A._instances.forEach(function(N){N&&N.teardown()}),u(A,d(A))})})}function y(A){return p(function(N){return N=N||{},A._createPromise.then(function(){return N.raw?Promise.resolve(A.rawDeviceData):Promise.resolve(A.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"),o=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:i,loadFastlane:o.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":7}],12:[function(e,n,a){var i=e("./braintree-error"),o=e("./errors"),s="3.126.0";function l(c){var d,u,h;return c?(h=c.name,d=c.client,u=c.authorization,!d&&!u?Promise.reject(new i({type:o.INSTANTIATION_OPTION_REQUIRED.type,code:o.INSTANTIATION_OPTION_REQUIRED.code,message:"options.client is required when instantiating "+h+"."})):!u&&d.getVersion()!==s?Promise.reject(new i({type:o.INCOMPATIBLE_VERSIONS.type,code:o.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+d.getVersion()+") and "+h+" (version "+s+") components must be from the same SDK version."})):Promise.resolve()):Promise.reject(new i({type:o.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:o.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:"Options must be passed to basicComponentVerification function."}))}n.exports={verify:l}},{"./braintree-error":13,"./errors":19}],13:[function(e,n,a){var i=e("./enumerate");function o(s){if(!o.types.hasOwnProperty(s.type))throw new Error(s.type+" is not a valid type.");if(!s.code)throw new Error("Error code required.");if(!s.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=s.code,this.message=s.message,this.type=s.type,this.details=s.details}o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),o.findRootError=function(s){return s instanceof o&&s.details&&s.details.originalError?o.findRootError(s.details.originalError):s},n.exports=o},{"./enumerate":18}],14:[function(e,n,a){var i="3.126.0",o="web",s={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},l={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},c={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:o+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:l,CLIENT_API_URLS:s,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:c,INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:o,BRAINTREE_LIBRARY_VERSION:"braintree/"+o+"/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],15:[function(e,n,a){var i=e("./braintree-error"),o=e("./errors");n.exports=function(s,l){l.forEach(function(c){s[c]=function(){throw new i({type:o.METHOD_CALLED_AFTER_TEARDOWN.type,code:o.METHOD_CALLED_AFTER_TEARDOWN.code,message:c+" cannot be called after teardown."})}})}},{"./braintree-error":13,"./errors":19}],16:[function(e,n,a){var i=e("./constants").ASSETS_URLS;function o(s){return i.production}n.exports={create:o}},{"./constants":14}],17:[function(e,n,a){var i=e("./braintree-error"),o=e("./assets"),s=e("./errors"),l="3.126.0";function c(d){var u=Promise.resolve();return d.client?Promise.resolve(d.client):(window.braintree&&window.braintree.client||(u=o.loadScript({src:d.assetsUrl+"/web/"+l+"/js/client.min.js"}).catch(function(h){return Promise.reject(new i({type:s.CLIENT_SCRIPT_FAILED_TO_LOAD.type,code:s.CLIENT_SCRIPT_FAILED_TO_LOAD.code,message:s.CLIENT_SCRIPT_FAILED_TO_LOAD.message,details:{originalError:h}}))})),u.then(function(){return window.braintree.client.VERSION!==l?Promise.reject(new i({type:s.INCOMPATIBLE_VERSIONS.type,code:s.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+window.braintree.client.VERSION+") and "+d.name+" (version "+l+") components must be from the same SDK version."})):window.braintree.client.create({authorization:d.authorization,debug:d.debug})}))}n.exports={create:c}},{"./assets":11,"./braintree-error":13,"./errors":19}],18:[function(e,n,a){function i(o,s){return s=s==null?"":s,o.reduce(function(l,c){return l[c]=s+c,l},{})}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(o){return typeof i[o]=="function"})}},{}]},{},[10])(10)})}(Pr)),Pr.exports}var Vc=Mc();const Fc=Cr(Vc);var Rr={exports:{}},zi;function Uc(){return zi||(zi=1,function(r,t){(function(e){r.exports=e()})(function(){return function(){function e(n,a,i){function o(c,d){if(!a[c]){if(!n[c]){var u=typeof we=="function"&&we;if(!d&&u)return u(c,!0);if(s)return s(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var p=a[c]={exports:{}};n[c][0].call(p.exports,function(f){var m=n[c][1][f];return o(m||f)},p,p.exports,e,n,a,i)}return a[c].exports}for(var s=typeof we=="function"&&we,l=0;l<i.length;l++)o(i[l]);return o}return e}()({1:[function(e,n,a){var i={};function o(s){var l,c=JSON.stringify(s);if(!s.forceScriptReload&&(l=i[c],l))return l;var d=document.createElement("script"),u=s.dataAttributes||{},h=s.container||document.head;return d.src=s.src,d.id=s.id||"",d.async=!0,s.type&&d.setAttribute("type","".concat(s.type)),s.crossorigin&&d.setAttribute("crossorigin","".concat(s.crossorigin)),s.integrity&&d.setAttribute("integrity","".concat(s.integrity)),Object.keys(u).forEach(function(p){d.setAttribute("data-".concat(p),"".concat(u[p]))}),l=new Promise(function(p,f){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){f(new Error("".concat(s.src," failed to load.")))}),d.addEventListener("abort",function(){f(new Error("".concat(s.src," has aborted.")))}),h.appendChild(d)}),i[c]=l,l}o.clearCache=function(){i={}},n.exports=o},{}],2:[function(e,n,a){n.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,n,a){n.exports=function(o){return o=o||window.navigator.userAgent,/Android/i.test(o)}},{}],4:[function(e,n,a){var i=e("./is-edge"),o=e("./is-samsung"),s=e("./is-duckduckgo"),l=e("./is-opera"),c=e("./is-silk");n.exports=function(u){return u=u||window.navigator.userAgent,(u.indexOf("Chrome")!==-1||u.indexOf("CriOS")!==-1)&&!i(u)&&!o(u)&&!s(u)&&!l(u)&&!c(u)}},{"./is-duckduckgo":5,"./is-edge":6,"./is-opera":14,"./is-samsung":15,"./is-silk":16}],5:[function(e,n,a){n.exports=function(o){return o=o||window.navigator.userAgent,o.indexOf("DuckDuckGo/")!==-1}},{}],6:[function(e,n,a){n.exports=function(o){return o=o||window.navigator.userAgent,o.indexOf("Edge/")!==-1||o.indexOf("Edg/")!==-1}},{}],7:[function(e,n,a){n.exports=function(o){return o=o||window.navigator.userAgent,/FxiOS/i.test(o)}},{}],8:[function(e,n,a){var i=e("./is-ios");function o(s){return/\bGSA\b/.test(s)}n.exports=function(l){return l=l||window.navigator.userAgent,i(l)&&o(l)}},{"./is-ios":12}],9:[function(e,n,a){var i=e("./is-ios"),o=e("./is-ios-firefox"),s=/webkit/i;function l(u){return s.test(u)}function c(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)&&l(h)&&!c(h)&&!o(h)&&!d(h)}},{"./is-ios":12,"./is-ios-firefox":7}],10:[function(e,n,a){var i=e("./is-ios"),o=e("./is-ios-google-search-app");n.exports=function(l){return l=l||window.navigator.userAgent,i(l)?o(l)?!0:/.+AppleWebKit(?!.*Safari)/i.test(l):!1}},{"./is-ios":12,"./is-ios-google-search-app":8}],11:[function(e,n,a){var i=e("./is-ios-webview");n.exports=function(s,l){return l=typeof l!="undefined"?l:window.statusbar.visible,i(s)&&l}},{"./is-ios-webview":10}],12:[function(e,n,a){var i=e("./is-ipados");n.exports=function(s,l,c){l===void 0&&(l=!0),s=s||window.navigator.userAgent;var d=/iPhone|iPod|iPad/i.test(s);return l?d||i(s,c):d}},{"./is-ipados":13}],13:[function(e,n,a){n.exports=function(o,s){return o=o||window.navigator.userAgent,s=s||window.document,/Mac|iPad/i.test(o)&&"ontouchend"in s}},{}],14:[function(e,n,a){n.exports=function(o){return o=o||window.navigator.userAgent,o.indexOf("OPR/")!==-1||o.indexOf("Opera/")!==-1||o.indexOf("OPT/")!==-1}},{}],15:[function(e,n,a){n.exports=function(o){return o=o||window.navigator.userAgent,/SamsungBrowser/i.test(o)}},{}],16:[function(e,n,a){n.exports=function(o){return o=o||window.navigator.userAgent,o.indexOf("Silk/")!==-1}},{}],17:[function(e,n,a){var i=48,o=e("./is-android"),s=e("./is-ios-firefox"),l=e("./is-ios-webview"),c=e("./is-chrome"),d=e("./is-samsung"),u=e("./is-duckduckgo");function h(v){v=v||window.navigator.userAgent;var y=v.match(/CriOS\/(\d+)\./);if(!y)return!1;var A=parseInt(y[1],10);return A<i}function p(v){return v=v||window.navigator.userAgent,v.indexOf("Opera Mini")>-1}function f(v){var y=/Version\/[\d.]+/i;return v=v||window.navigator.userAgent,o(v)?y.test(v)&&!p(v)&&!u(v):!1}function m(v){return!c(v)&&!d(v)&&/samsung/i.test(v)}n.exports=function(y){return y=y||window.navigator.userAgent,!(l(y)||s(y)||f(y)||p(y)||h(y)||m(y))}},{"./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,o=function(){function s(l){var c=this;if(typeof l=="function"){this._promise=new s.Promise(l);return}this._promise=new s.Promise(function(d,u){c._resolveFunction=d,c._rejectFunction=u}),l=l||{},this._onResolve=l.onResolve||s.defaultOnResolve,this._onReject=l.onReject||s.defaultOnReject,s.shouldCatchExceptions(l)&&this._promise.catch(function(){}),this._resetState()}return s.defaultOnResolve=function(l){return s.Promise.resolve(l)},s.defaultOnReject=function(l){return s.Promise.reject(l)},s.setPromise=function(l){s.Promise=l},s.shouldCatchExceptions=function(l){return l.hasOwnProperty("suppressUnhandledPromiseMessage")?!!l.suppressUnhandledPromiseMessage:!!s.suppressUnhandledPromiseMessage},s.all=function(l){return s.Promise.all(l)},s.allSettled=function(l){return s.Promise.allSettled(l)},s.race=function(l){return s.Promise.race(l)},s.reject=function(l){return s.Promise.reject(l)},s.resolve=function(l){return s.Promise.resolve(l)},s.prototype.then=function(){for(var l,c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];return(l=this._promise).then.apply(l,c)},s.prototype.catch=function(){for(var l,c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];return(l=this._promise).catch.apply(l,c)},s.prototype.resolve=function(l){var c=this;return this.isFulfilled?this:(this._setResolved(),s.Promise.resolve().then(function(){return c._onResolve(l)}).then(function(d){c._resolveFunction(d)}).catch(function(d){c._resetState(),c.reject(d)}),this)},s.prototype.reject=function(l){var c=this;return this.isFulfilled?this:(this._setRejected(),s.Promise.resolve().then(function(){return c._onReject(l)}).then(function(d){c._setResolved(),c._resolveFunction(d)}).catch(function(d){return c._rejectFunction(d)}),this)},s.prototype._resetState=function(){this.isFulfilled=!1,this.isResolved=!1,this.isRejected=!1},s.prototype._setResolved=function(){this.isFulfilled=!0,this.isResolved=!0,this.isRejected=!1},s.prototype._setRejected=function(){this.isFulfilled=!0,this.isResolved=!1,this.isRejected=!0},s.Promise=i,s}();n.exports=o},{}],27:[function(e,n,a){var i=e("./lib/set-attributes"),o=e("./lib/default-attributes"),s=e("./lib/assign");n.exports=function(c){c===void 0&&(c={});var d=document.createElement("iframe"),u=(0,s.assign)({},o.defaultAttributes,c);return u.style&&typeof u.style!="string"&&((0,s.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(o){for(var s=[],l=1;l<arguments.length;l++)s[l-1]=arguments[l];return s.forEach(function(c){typeof c=="object"&&Object.keys(c).forEach(function(d){o[d]=c[d]})}),o}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(o,s){for(var l in s)if(s.hasOwnProperty(l)){var c=s[l];c==null?o.removeAttribute(l):o.setAttribute(l,c)}}a.setAttributes=i},{}],31:[function(e,n,a){function i(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(o){var s=Math.random()*16|0,l=o==="x"?s:s&3|8;return l.toString(16)})}n.exports=i},{}],32:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(o){return function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];setTimeout(function(){try{o.apply(void 0,s)}catch(c){console.log("Error in callback function"),console.log(c)}},1)}}a.deferred=i},{}],33:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(o){var s=!1;return function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];s||(s=!0,o.apply(void 0,l))}}a.once=i},{}],34:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0});function i(o,s){if(!s)return o;o.then(function(l){return s(null,l)}).catch(function(l){return s(l)})}a.promiseOrCallback=i},{}],35:[function(e,n,a){var i=e("./lib/deferred"),o=e("./lib/once"),s=e("./lib/promise-or-callback");function l(c){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=o.once(i.deferred(h))),s.promiseOrCallback(c.apply(this,d),h)}}l.wrapPrototype=function(c,d){d===void 0&&(d={});var u=d.ignoreMethods||[],h=d.transformPrivateMethods===!0,p=Object.getOwnPropertyNames(c.prototype).filter(function(f){var m,v=f!=="constructor"&&typeof c.prototype[f]=="function",y=u.indexOf(f)===-1;return h?m=!0:m=f.charAt(0)!=="_",v&&m&&y});return p.forEach(function(f){var m=c.prototype[f];c.prototype[f]=l(m)}),c},n.exports=l},{"./lib/deferred":32,"./lib/once":33,"./lib/promise-or-callback":34}],36:[function(e,n,a){(function(i,o){typeof a=="object"&&typeof n!="undefined"?o(a):(i=typeof globalThis!="undefined"?globalThis:i||self,o(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
328
+ ***************************************************************************** */function s(b,T,_,L){function D(C){return C instanceof _?C:new _(function(B){B(C)})}return new(_||(_=Promise))(function(C,B){function X(te){try{R(L.next(te))}catch(ye){B(ye)}}function ae(te){try{R(L.throw(te))}catch(ye){B(ye)}}function R(te){te.done?C(te.value):D(te.value).then(X,ae)}R((L=L.apply(b,[])).next())})}function o(b,T){var _={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},L,D,C,B;return B={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function X(R){return function(te){return ae([R,te])}}function ae(R){if(L)throw new TypeError("Generator is already executing.");for(;_;)try{if(L=1,D&&(C=R[0]&2?D.return:R[0]?D.throw||((C=D.return)&&C.call(D),0):D.next)&&!(C=C.call(D,R[1])).done)return C;switch(D=0,C&&(R=[R[0]&2,C.value]),R[0]){case 0:case 1:C=R;break;case 4:return _.label++,{value:R[1],done:!1};case 5:_.label++,D=R[1],R=[0];continue;case 7:R=_.ops.pop(),_.trys.pop();continue;default:if(C=_.trys,!(C=C.length>0&&C[C.length-1])&&(R[0]===6||R[0]===2)){_=0;continue}if(R[0]===3&&(!C||R[1]>C[0]&&R[1]<C[3])){_.label=R[1];break}if(R[0]===6&&_.label<C[1]){_.label=C[1],C=R;break}if(C&&_.label<C[2]){_.label=C[2],_.ops.push(R);break}C[2]&&_.ops.pop(),_.trys.pop();continue}R=T.call(b,_)}catch(te){R=[6,te],D=0}finally{L=C=0}if(R[0]&5)throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}}var c={},l={};function d(b){var T,_=JSON.stringify(b);if(!b.forceScriptReload&&(T=l[_],T))return T;var L=document.createElement("script"),D=b.dataAttributes||{},C=b.container||document.head;return L.src=b.src,L.id=b.id||"",L.async=!0,b.type&&L.setAttribute("type","".concat(b.type)),b.crossorigin&&L.setAttribute("crossorigin","".concat(b.crossorigin)),Object.keys(D).forEach(function(B){L.setAttribute("data-".concat(B),"".concat(D[B]))}),T=new Promise(function(B,X){L.addEventListener("load",function(){B(L)}),L.addEventListener("error",function(){X(new Error("".concat(b.src," failed to load.")))}),L.addEventListener("abort",function(){X(new Error("".concat(b.src," has aborted.")))}),C.appendChild(L)}),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 L=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),L.firstChild?L.insertBefore(_,L.firstChild):L.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",y={minified:"axo.min",unminified:"axo"},A="fastlane",x="connect-boba",N="".concat(x,"/locales/"),I={AXO_ASSET_NAME:y,AXO_ASSET_PATH:x,LOCALE_PATH:N,CDNX_PROD:v},P={BT:"BT",PPCP:"PPCP"};function O(){return typeof window.define=="function"&&!!window.define.amd}function S(){return O()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function F(b,T,_){var L,D;return _===void 0&&(_=!0),s(this,void 0,void 0,function(){var C,B;return o(this,function(X){if(C=G(),C&&C[b.module]){if(T&&((L=C[b.module])===null||L===void 0?void 0:L.VERSION)!==T)throw B=(D=C[b.module])===null||D===void 0?void 0:D.VERSION,new Error("".concat(b.module," already loaded with version ").concat(B," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(b.module," without specifying version"));return[2,W(b,T,_)]})})}function W(b,T,_){if(_===void 0&&(_=!0),O()){var L=_?b.amdModule.minified:b.amdModule.unminified;return new Promise(function(C,B){window.require([L],C,B)})}var D=_?b.script.minified:b.script.unminified;return f({id:"".concat(b.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(D)})}function G(){return window==null?void 0:window.braintree}var U,j,z={Client:"client",HostedCardFields:"hostedFields"},J="braintree",M=(U={},U[z.Client]="client",U[z.HostedCardFields]="hosted-fields",U),$=(j={},j[z.Client]={id:"client",module:z.Client,amdModule:{unminified:"".concat(J,"/").concat(M[z.Client]),minified:"".concat(J,"/").concat(M[z.Client],".min")},script:{unminified:"".concat(M[z.Client],".js"),minified:"".concat(M[z.Client],".min.js")}},j[z.HostedCardFields]={id:"hcf",module:z.HostedCardFields,amdModule:{unminified:"".concat(J,"/").concat(M[z.HostedCardFields]),minified:"".concat(J,"/").concat(M[z.HostedCardFields],".min")},script:{unminified:"".concat(M[z.HostedCardFields],".js"),minified:"".concat(M[z.HostedCardFields],".min.js")}},j);function H(b){return s(this,void 0,void 0,function(){var T,_,L,D;return o(this,function(C){switch(C.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=b.btSdkVersion,_=b.minified,L=k(b),D=V(b),b.platform!==P.BT?[3,2]:[4,Promise.all([F($.hostedFields,T,_),E(L,_)])];case 1:return C.sent(),[3,5];case 2:return b.platform!==P.PPCP?[3,4]:[4,Promise.all([F($.client,T,_),F($.hostedFields,T,_),E(L,_)])];case 3:return C.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:D}}]}})})}function E(b,T){var _;if(T===void 0&&(T=!0),O()){S()&&requirejs.config({paths:(_={},_[A]=b,_)});var L="".concat(A,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(D,C){window.require([L],D,C)})}return f({id:"axo-id",src:b,forceScriptReload:!0})}function g(b){var T=b.assetUrl,_=b.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function k(b){var T,_=(b==null?void 0:b.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,L=O()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:L,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(b){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=H})},{}],8:[function(e,r,a){var i=e("../lib/braintree-error");r.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,r,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(y){var A=new p;return y=y||{},!y.sessionId&&d?(A.sessionId=d,Promise.resolve(A)):A.initialize(y)}function h(){d=null}function p(){}p.prototype.initialize=function(y){var A=y.environment,x=this;return this.sessionId=y.sessionId||y.clientSessionId,this.sessionId&&(this.sessionId=this.sessionId.substring(0,l)),y.sessionId||(d=this.sessionId),this._beaconId=m(this.sessionId),this._parameterBlock=v(this.sessionId,this._beaconId,A,y.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(y){y&&y.parentNode&&y.parentNode.removeChild(y)}function m(y){var A=new Date().getTime()/1e3;return"https://b.stats.paypal.com/counter.cgi?i=127.0.0.1&p="+y+"&t="+A+"&a=14"}function v(y,A,x,N){var I=document.body.appendChild(document.createElement("script")),P={f:y,s,b:A,cb1:N};return x!=="production"&&(P.sandbox=!0),I.type="application/json",I.setAttribute("fncls",i),I.text=JSON.stringify(P),I}r.exports={setup:u,clearSessionIdCache:h}},{"../lib/assets":11,"../lib/constants":14}],10:[function(e,r,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(A){var x="Data Collector",N={_instances:[]},I={};return o.verify({name:x,client:A.client,authorization:A.authorization}).then(function(){return N._instantiatedWithAClient=!A.useDeferredClient,N._createPromise=c.create({authorization:A.authorization,client:A.client,debug:A.debug,assetsUrl:l.create(A.authorization),name:x}).then(function(P){var O=P.getConfiguration();return i.setup({sessionId:A.riskCorrelationId||A.clientMetadataId||A.correlationId,clientSessionId:O.analyticsMetadata.sessionId,environment:O.gatewayConfiguration.environment,cb1:A.cb1}).then(function(S){S&&(I.correlation_id=S.sessionId,N._instances.push(S))})}).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=y(N),N._instantiatedWithAClient?N._createPromise:N})}function v(A){return p(function(){return A._createPromise.then(function(){A._instances.forEach(function(N){N&&N.teardown()}),u(A,d(A))})})}function y(A){return p(function(N){return N=N||{},A._createPromise.then(function(){return N.raw?Promise.resolve(A.rawDeviceData):Promise.resolve(A.deviceData)})})}r.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,r,a){var i=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");r.exports={loadScript:i,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":7}],12:[function(e,r,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."}))}r.exports={verify:c}},{"./braintree-error":13,"./errors":19}],13:[function(e,r,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},r.exports=s},{"./enumerate":18}],14:[function(e,r,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"};r.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,r,a){var i=e("./braintree-error"),s=e("./errors");r.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,r,a){var i=e("./constants").ASSETS_URLS;function s(o){return i.production}r.exports={create:s}},{"./constants":14}],17:[function(e,r,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})}))}r.exports={create:l}},{"./assets":11,"./braintree-error":13,"./errors":19}],18:[function(e,r,a){function i(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}r.exports=i},{}],19:[function(e,r,a){var i=e("./braintree-error");r.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,r,a){r.exports=function(i){return Object.keys(i).filter(function(s){return typeof i[s]=="function"})}},{}]},{},[10])(10)})}(Lr)),Lr.exports}var Vl=Dl();const Ul=_r(Vl);var Pr={exports:{}},Bi;function Fl(){return Bi||(Bi=1,function(n,t){(function(e){n.exports=e()})(function(){return function(){function e(r,a,i){function s(l,d){if(!a[l]){if(!r[l]){var u=typeof Ce=="function"&&Ce;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:{}};r[l][0].call(p.exports,function(f){var m=r[l][1][f];return s(m||f)},p,p.exports,e,r,a,i)}return a[l].exports}for(var o=typeof Ce=="function"&&Ce,c=0;c<i.length;c++)s(i[c]);return s}return e}()({1:[function(e,r,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={}},r.exports=s},{}],2:[function(e,r,a){r.exports=e("./dist/load-script")},{"./dist/load-script":1}],3:[function(e,r,a){r.exports=function(s){return s=s||window.navigator.userAgent,/Android/i.test(s)}},{}],4:[function(e,r,a){var i=e("./is-edge"),s=e("./is-samsung"),o=e("./is-duckduckgo"),c=e("./is-opera"),l=e("./is-silk");r.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,r,a){r.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("DuckDuckGo/")!==-1}},{}],6:[function(e,r,a){r.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Edge/")!==-1||s.indexOf("Edg/")!==-1}},{}],7:[function(e,r,a){r.exports=function(s){return s=s||window.navigator.userAgent,/FxiOS/i.test(s)}},{}],8:[function(e,r,a){var i=e("./is-ios");function s(o){return/\bGSA\b/.test(o)}r.exports=function(c){return c=c||window.navigator.userAgent,i(c)&&s(c)}},{"./is-ios":12}],9:[function(e,r,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}r.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,r,a){var i=e("./is-ios"),s=e("./is-ios-google-search-app");r.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,r,a){var i=e("./is-ios-webview");r.exports=function(o,c){return c=typeof c!="undefined"?c:window.statusbar.visible,i(o)&&c}},{"./is-ios-webview":10}],12:[function(e,r,a){var i=e("./is-ipados");r.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,r,a){r.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,r,a){r.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("OPR/")!==-1||s.indexOf("Opera/")!==-1||s.indexOf("OPT/")!==-1}},{}],15:[function(e,r,a){r.exports=function(s){return s=s||window.navigator.userAgent,/SamsungBrowser/i.test(s)}},{}],16:[function(e,r,a){r.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Silk/")!==-1}},{}],17:[function(e,r,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 y=v.match(/CriOS\/(\d+)\./);if(!y)return!1;var A=parseInt(y[1],10);return A<i}function p(v){return v=v||window.navigator.userAgent,v.indexOf("Opera Mini")>-1}function f(v){var y=/Version\/[\d.]+/i;return v=v||window.navigator.userAgent,s(v)?y.test(v)&&!p(v)&&!u(v):!1}function m(v){return!l(v)&&!d(v)&&/samsung/i.test(v)}r.exports=function(y){return y=y||window.navigator.userAgent,!(c(y)||o(y)||f(y)||p(y)||h(y)||m(y))}},{"./is-android":3,"./is-chrome":4,"./is-duckduckgo":5,"./is-ios-firefox":7,"./is-ios-webview":10,"./is-samsung":15}],18:[function(e,r,a){r.exports=e("./dist/is-android")},{"./dist/is-android":3}],19:[function(e,r,a){r.exports=e("./dist/is-chrome")},{"./dist/is-chrome":4}],20:[function(e,r,a){r.exports=e("./dist/is-ios-safari")},{"./dist/is-ios-safari":9}],21:[function(e,r,a){r.exports=e("./dist/is-ios-webview")},{"./dist/is-ios-webview":10}],22:[function(e,r,a){r.exports=e("./dist/is-ios-wkwebview")},{"./dist/is-ios-wkwebview":11}],23:[function(e,r,a){r.exports=e("./dist/is-ios")},{"./dist/is-ios":12}],24:[function(e,r,a){r.exports=e("./dist/is-samsung")},{"./dist/is-samsung":15}],25:[function(e,r,a){r.exports=e("./dist/supports-popups")},{"./dist/supports-popups":17}],26:[function(e,r,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}();r.exports=s},{}],27:[function(e,r,a){var i=e("./lib/set-attributes"),s=e("./lib/default-attributes"),o=e("./lib/assign");r.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,r,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,r,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,r,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,r,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)})}r.exports=i},{}],32:[function(e,r,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,r,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,r,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,r,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",y=u.indexOf(f)===-1;return h?m=!0:m=f.charAt(0)!=="_",v&&m&&y});return p.forEach(function(f){var m=l.prototype[f];l.prototype[f]=c(m)}),l},r.exports=c},{"./lib/deferred":32,"./lib/once":33,"./lib/promise-or-callback":34}],36:[function(e,r,a){(function(i,s){typeof a=="object"&&typeof r!="undefined"?s(a):(i=typeof globalThis!="undefined"?globalThis:i||self,s(i.loadAxo={}))})(this,function(i){/*! *****************************************************************************
329
329
  Copyright (c) Microsoft Corporation.
330
330
 
331
331
  Permission to use, copy, modify, and/or distribute this software for any
@@ -338,7 +338,7 @@ ${m}::-ms-input-placeholder{${f}}
338
338
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
339
339
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
340
340
  PERFORMANCE OF THIS SOFTWARE.
341
- ***************************************************************************** */function o(b,T,_,O){function M(C){return C instanceof _?C:new _(function(j){j(C)})}return new(_||(_=Promise))(function(C,j){function Q(ee){try{L(O.next(ee))}catch(be){j(be)}}function ae(ee){try{L(O.throw(ee))}catch(be){j(be)}}function L(ee){ee.done?C(ee.value):M(ee.value).then(Q,ae)}L((O=O.apply(b,[])).next())})}function s(b,T){var _={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},O,M,C,j;return j={next:Q(0),throw:Q(1),return:Q(2)},typeof Symbol=="function"&&(j[Symbol.iterator]=function(){return this}),j;function Q(L){return function(ee){return ae([L,ee])}}function ae(L){if(O)throw new TypeError("Generator is already executing.");for(;_;)try{if(O=1,M&&(C=L[0]&2?M.return:L[0]?M.throw||((C=M.return)&&C.call(M),0):M.next)&&!(C=C.call(M,L[1])).done)return C;switch(M=0,C&&(L=[L[0]&2,C.value]),L[0]){case 0:case 1:C=L;break;case 4:return _.label++,{value:L[1],done:!1};case 5:_.label++,M=L[1],L=[0];continue;case 7:L=_.ops.pop(),_.trys.pop();continue;default:if(C=_.trys,!(C=C.length>0&&C[C.length-1])&&(L[0]===6||L[0]===2)){_=0;continue}if(L[0]===3&&(!C||L[1]>C[0]&&L[1]<C[3])){_.label=L[1];break}if(L[0]===6&&_.label<C[1]){_.label=C[1],C=L;break}if(C&&_.label<C[2]){_.label=C[2],_.ops.push(L);break}C[2]&&_.ops.pop(),_.trys.pop();continue}L=T.call(b,_)}catch(ee){L=[6,ee],M=0}finally{O=C=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}}var l={},c={};function d(b){var T,_=JSON.stringify(b);if(!b.forceScriptReload&&(T=c[_],T))return T;var O=document.createElement("script"),M=b.dataAttributes||{},C=b.container||document.head;return O.src=b.src,O.id=b.id||"",O.async=!0,b.type&&O.setAttribute("type","".concat(b.type)),b.crossorigin&&O.setAttribute("crossorigin","".concat(b.crossorigin)),Object.keys(M).forEach(function(j){O.setAttribute("data-".concat(j),"".concat(M[j]))}),T=new Promise(function(j,Q){O.addEventListener("load",function(){j(O)}),O.addEventListener("error",function(){Q(new Error("".concat(b.src," failed to load.")))}),O.addEventListener("abort",function(){Q(new Error("".concat(b.src," has aborted.")))}),C.appendChild(O)}),c[_]=T,T}d.clearCache=function(){c={}};var u=d,h=function(T){var _=document.querySelector('link[href="'.concat(T.href,'"]'));if(_)return Promise.resolve(_);_=document.createElement("link");var O=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),O.firstChild?O.insertBefore(_,O.firstChild):O.appendChild(_),Promise.resolve(_)};Object.defineProperty(l,"__esModule",{value:!0}),l.loadStylesheet=f=l.loadScript=void 0;var p=u,f=l.loadScript=p,m=h;l.loadStylesheet=m;var v="https://www.paypalobjects.com",y={minified:"axo.min",unminified:"axo"},A="fastlane",x="connect-boba",N="".concat(x,"/locales/"),I={AXO_ASSET_NAME:y,AXO_ASSET_PATH:x,LOCALE_PATH:N,CDNX_PROD:v},P={BT:"BT",PPCP:"PPCP"};function k(){return typeof window.define=="function"&&!!window.define.amd}function S(){return k()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function U(b,T,_){var O,M;return _===void 0&&(_=!0),o(this,void 0,void 0,function(){var C,j;return s(this,function(Q){if(C=$(),C&&C[b.module]){if(T&&((O=C[b.module])===null||O===void 0?void 0:O.VERSION)!==T)throw j=(M=C[b.module])===null||M===void 0?void 0:M.VERSION,new Error("".concat(b.module," already loaded with version ").concat(j," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(b.module," without specifying version"));return[2,q(b,T,_)]})})}function q(b,T,_){if(_===void 0&&(_=!0),k()){var O=_?b.amdModule.minified:b.amdModule.unminified;return new Promise(function(C,j){window.require([O],C,j)})}var M=_?b.script.minified:b.script.unminified;return f({id:"".concat(b.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(M)})}function $(){return window==null?void 0:window.braintree}var F,z,B={Client:"client",HostedCardFields:"hostedFields"},Z="braintree",D=(F={},F[B.Client]="client",F[B.HostedCardFields]="hosted-fields",F),Y=(z={},z[B.Client]={id:"client",module:B.Client,amdModule:{unminified:"".concat(Z,"/").concat(D[B.Client]),minified:"".concat(Z,"/").concat(D[B.Client],".min")},script:{unminified:"".concat(D[B.Client],".js"),minified:"".concat(D[B.Client],".min.js")}},z[B.HostedCardFields]={id:"hcf",module:B.HostedCardFields,amdModule:{unminified:"".concat(Z,"/").concat(D[B.HostedCardFields]),minified:"".concat(Z,"/").concat(D[B.HostedCardFields],".min")},script:{unminified:"".concat(D[B.HostedCardFields],".js"),minified:"".concat(D[B.HostedCardFields],".min.js")}},z);function H(b){return o(this,void 0,void 0,function(){var T,_,O,M;return s(this,function(C){switch(C.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=b.btSdkVersion,_=b.minified,O=R(b),M=V(b),b.platform!==P.BT?[3,2]:[4,Promise.all([U(Y.hostedFields,T,_),E(O,_)])];case 1:return C.sent(),[3,5];case 2:return b.platform!==P.PPCP?[3,4]:[4,Promise.all([U(Y.client,T,_),U(Y.hostedFields,T,_),E(O,_)])];case 3:return C.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:M}}]}})})}function E(b,T){var _;if(T===void 0&&(T=!0),k()){S()&&requirejs.config({paths:(_={},_[A]=b,_)});var O="".concat(A,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(M,C){window.require([O],M,C)})}return f({id:"axo-id",src:b,forceScriptReload:!0})}function g(b){var T=b.assetUrl,_=b.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function R(b){var T,_=(b==null?void 0:b.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,O=k()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:O,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(b){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=H})},{}],37:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.Framebus=void 0;var i=e("./lib"),o=typeof window!="undefined"&&window.Promise,s=function(){function l(c){c===void 0&&(c={}),this.origin=c.origin||"*",this.channel=c.channel||"",this.verifyDomain=c.verifyDomain,this.targetFrames=c.targetFrames||[],this.limitBroadcastToFramesArray=!!c.targetFrames,this.isDestroyed=!1,this.listeners=[],this.hasAdditionalChecksForOnListeners=!!(this.verifyDomain||this.limitBroadcastToFramesArray)}return l.setPromise=function(c){l.Promise=c},l.target=function(c){return new l(c)},l.prototype.addTargetFrame=function(c){this.limitBroadcastToFramesArray&&this.targetFrames.push(c)},l.prototype.include=function(c){return c==null||c.Window==null||c.constructor!==c.Window?!1:(i.childWindows.push(c),!0)},l.prototype.target=function(c){return l.target(c)},l.prototype.emit=function(c,d,u){if(this.isDestroyed)return!1;var h=this.origin;if(c=this.namespaceEvent(c),(0,i.isntString)(c)||(0,i.isntString)(h))return!1;typeof d=="function"&&(u=d,d=void 0);var p=(0,i.packagePayload)(c,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},l.prototype.emitAsPromise=function(c,d){var u=this;return new l.Promise(function(h,p){var f=u.emit(c,d,function(m){h(m)});f||p(new Error('Listener not added for "'.concat(c,'"')))})},l.prototype.on=function(c,d){if(this.isDestroyed)return!1;var u=this,h=this.origin,p=d;return c=this.namespaceEvent(c),(0,i.subscriptionArgsInvalid)(c,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:c,handler:p,originalHandler:d}),i.subscribers[h]=i.subscribers[h]||{},i.subscribers[h][c]=i.subscribers[h][c]||[],i.subscribers[h][c].push(p),!0)},l.prototype.off=function(c,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)}c=this.namespaceEvent(c);var f=this.origin;if((0,i.subscriptionArgsInvalid)(c,u,f))return!1;var m=i.subscribers[f]&&i.subscribers[f][c];if(!m)return!1;for(var h=0;h<m.length;h++)if(m[h]===u)return m.splice(h,1),!0;return!1},l.prototype.teardown=function(){if(!this.isDestroyed){this.isDestroyed=!0;for(var c=0;c<this.listeners.length;c++){var d=this.listeners[c];this.off(d.eventName,d.handler)}this.listeners.length=0}},l.prototype.passesVerifyDomainCheck=function(c){return this.verifyDomain?this.checkOrigin(c):!0},l.prototype.targetFramesAsWindows=function(){return this.limitBroadcastToFramesArray?this.targetFrames.map(function(c){return c instanceof HTMLIFrameElement?c.contentWindow:c}).filter(function(c){return c}):[]},l.prototype.hasMatchingTargetFrame=function(c){if(!this.limitBroadcastToFramesArray)return!0;var d=this.targetFramesAsWindows().find(function(u){return u===c});return!!d},l.prototype.checkOrigin=function(c){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===c?!0:this.verifyDomain?this.verifyDomain(c):!0},l.prototype.namespaceEvent=function(c){return this.channel?"".concat(this.channel,":").concat(c):c},l.Promise=o,l}();a.Framebus=s},{"./lib":45}],38:[function(e,n,a){var i=e("./lib"),o=e("./framebus");(0,i.attach)(),n.exports=o.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("./"),o=!1;function s(){o||typeof window=="undefined"||(o=!0,window.addEventListener("message",i.onMessage,!1))}a.attach=s;function l(){o=!1,window.removeEventListener("message",i.onMessage,!1)}a.detach=l},{"./":45}],40:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.broadcastToChildWindows=void 0;var i=e("./");function o(s,l,c){for(var d=i.childWindows.length-1;d>=0;d--){var u=i.childWindows[d];u.closed?i.childWindows.splice(d,1):c!==u&&(0,i.broadcast)(s,{origin:l,frame:u.top})}}a.broadcastToChildWindows=o},{"./":45}],41:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.broadcast=void 0;var i=e("./");function o(s,l){var c=0,d,u=l.origin,h=l.frame;try{for(h.postMessage(s,u),(0,i.hasOpener)(h)&&h.opener.top!==window.top&&o(s,{origin:u,frame:h.opener.top});d=h.frames[c];)o(s,{origin:u,frame:d}),c++}catch(p){}}a.broadcast=o},{"./":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 o(s,l,c,d,u){if(i.subscribers[s]&&i.subscribers[s][l]){var h=[];c&&h.push(c),d&&h.push(d);for(var p=0;p<i.subscribers[s][l].length;p++)i.subscribers[s][l][p].apply(u,h)}}a.dispatch=o},{"./":45}],44:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.hasOpener=void 0;function i(o){return!(o.top!==o||o.opener==null||o.opener===o||o.opener.closed===!0)}a.hasOpener=i},{}],45:[function(e,n,a){var i=this&&this.__createBinding||(Object.create?function(s,l,c,d){d===void 0&&(d=c);var u=Object.getOwnPropertyDescriptor(l,c);(!u||("get"in u?!l.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return l[c]}}),Object.defineProperty(s,d,u)}:function(s,l,c,d){d===void 0&&(d=c),s[d]=l[c]}),o=this&&this.__exportStar||function(s,l){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(l,c)&&i(l,s,c)};Object.defineProperty(a,"__esModule",{value:!0}),o(e("./attach"),a),o(e("./broadcast-to-child-windows"),a),o(e("./broadcast"),a),o(e("./constants"),a),o(e("./dispatch"),a),o(e("./has-opener"),a),o(e("./is-not-string"),a),o(e("./message"),a),o(e("./package-payload"),a),o(e("./send-message"),a),o(e("./subscribe-replier"),a),o(e("./subscription-args-invalid"),a),o(e("./types"),a),o(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(o){return typeof o!="string"}a.isntString=i},{}],47:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.onMessage=void 0;var i=e("./");function o(s){if(!(0,i.isntString)(s.data)){var l=(0,i.unpackPayload)(s);if(l){var c=l.eventData,d=l.reply;(0,i.dispatch)("*",l.event,c,d,s),(0,i.dispatch)(s.origin,l.event,c,d,s),(0,i.broadcastToChildWindows)(s.data,l.origin,s.source)}}}a.onMessage=o},{"./":45}],48:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.packagePayload=void 0;var i=e("./");function o(s,l,c,d){var u,h={event:s,origin:l};typeof d=="function"&&(h.reply=(0,i.subscribeReplier)(d,l)),h.eventData=c;try{u=i.prefix+JSON.stringify(h)}catch(p){throw new Error("Could not stringify event: ".concat(p.message))}return u}a.packagePayload=o},{"./":45}],49:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.sendMessage=void 0;function i(o,s,l){try{o.postMessage(s,l)}catch(c){}}a.sendMessage=i},{}],50:[function(e,n,a){var i=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(a,"__esModule",{value:!0}),a.subscribeReplier=void 0;var o=e("../framebus"),s=i(e("@braintree/uuid"));function l(c,d){var u=(0,s.default)();function h(p,f){c(p,f),o.Framebus.target({origin:d}).off(u,h)}return o.Framebus.target({origin:d}).on(u,h),u}a.subscribeReplier=l},{"../framebus":37,"@braintree/uuid":31}],51:[function(e,n,a){Object.defineProperty(a,"__esModule",{value:!0}),a.subscriptionArgsInvalid=void 0;var i=e("./");function o(s,l,c){return(0,i.isntString)(s)||typeof l!="function"?!0:(0,i.isntString)(c)}a.subscriptionArgsInvalid=o},{"./":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 o(s){var l;if(s.data.slice(0,i.prefix.length)!==i.prefix)return!1;try{l=JSON.parse(s.data.slice(i.prefix.length))}catch(h){return!1}if(l.reply){var c=s.origin,d=s.source,u=l.reply;l.reply=function(p){if(d){var f=(0,i.packagePayload)(u,c,p);f&&d.postMessage(f,c)}}}return l}a.unpackPayload=o},{"./":45}],54:[function(e,n,a){var i=e("./create-authorization-data"),o=e("./json-clone"),s=e("./constants");function l(d,u){var h,p=u?o(u):{},f=i(d.authorization).attrs,m=o(d.analyticsMetadata);p.braintreeLibraryVersion=s.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 c(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:s.VERSION,component:"braintreeclientsdk",merchant_sdk_env:p?"production":"sandbox",merchant_id:u.gatewayConfiguration.merchantId,event_source:"web",platform:s.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:l,addEventMetadata:c}},{"./constants":60,"./create-authorization-data":63,"./json-clone":80}],55:[function(e,n,a){var i=e("./constants"),o=e("./add-metadata"),s=e("./assign").assign;function l(u,h,p){return c(u,h,{},p)}function c(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 y=v._request,A=i.ANALYTICS_URL,x=i.ANALYTICS_PREFIX+h,N=v.getConfiguration(),I=N.gatewayConfiguration.environment==="production",P={events:[],tracking:[]},k=o.addEventMetadata(v,P);return k.event_name=x,k.t=m,P.events=[{level:"info",event:x,payload:s({env:I?"production":"sandbox",timestamp:m},p)}],P.tracking=[k],p&&typeof p=="object"&&(P.tracking=[d(k,p)]),y({url:A,method:"post",data:P,timeout:i.ANALYTICS_REQUEST_TIMEOUT_MS},f)}).catch(function(v){f&&f(v)})}function d(u,h){var p={},f=s({},h);return Object.keys(f).forEach(function(m){i.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(m)===-1&&delete f[m]}),p=s(u,f),p}n.exports={sendEvent:l,sendEventPlus:c}},{"./add-metadata":54,"./assign":57,"./constants":60}],56:[function(e,n,a){var i=e("@braintree/asset-loader/load-script"),o=e("@paypal/accelerated-checkout-loader");n.exports={loadScript:i,loadFastlane:o.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:o;function o(s){var l,c,d;for(l=1;l<arguments.length;l++){c=arguments[l];for(d in c)c.hasOwnProperty(d)&&(s[d]=c[d])}return s}n.exports={assign:i,_assign:o}},{}],58:[function(e,n,a){var i=e("./braintree-error"),o=e("./errors"),s="3.126.0";function l(c){var d,u,h;return c?(h=c.name,d=c.client,u=c.authorization,!d&&!u?Promise.reject(new i({type:o.INSTANTIATION_OPTION_REQUIRED.type,code:o.INSTANTIATION_OPTION_REQUIRED.code,message:"options.client is required when instantiating "+h+"."})):!u&&d.getVersion()!==s?Promise.reject(new i({type:o.INCOMPATIBLE_VERSIONS.type,code:o.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+d.getVersion()+") and "+h+" (version "+s+") components must be from the same SDK version."})):Promise.resolve()):Promise.reject(new i({type:o.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:o.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:"Options must be passed to basicComponentVerification function."}))}n.exports={verify:l}},{"./braintree-error":59,"./errors":66}],59:[function(e,n,a){var i=e("./enumerate");function o(s){if(!o.types.hasOwnProperty(s.type))throw new Error(s.type+" is not a valid type.");if(!s.code)throw new Error("Error code required.");if(!s.message)throw new Error("Error message required.");this.name="BraintreeError",this.code=s.code,this.message=s.message,this.type=s.type,this.details=s.details}o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o.types=i(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),o.findRootError=function(s){return s instanceof o&&s.details&&s.details.originalError?o.findRootError(s.details.originalError):s},n.exports=o},{"./enumerate":65}],60:[function(e,n,a){var i="3.126.0",o="web",s={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},l={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},c={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:o+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:l,CLIENT_API_URLS:s,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:c,INTEGRATION_TIMEOUT_MS:6e4,VERSION:i,INTEGRATION:"custom",SOURCE:"client",PLATFORM:o,BRAINTREE_LIBRARY_VERSION:"braintree/"+o+"/"+i,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],61:[function(e,n,a){var i=e("./braintree-error"),o=e("./errors");n.exports=function(s,l){l.forEach(function(c){s[c]=function(){throw new i({type:o.METHOD_CALLED_AFTER_TEARDOWN.type,code:o.METHOD_CALLED_AFTER_TEARDOWN.code,message:c+" cannot be called after teardown."})}})}},{"./braintree-error":59,"./errors":66}],62:[function(e,n,a){var i=e("./constants").ASSETS_URLS;function o(s){return i.production}n.exports={create:o}},{"./constants":60}],63:[function(e,n,a){var i=e("../lib/vendor/polyfill").atob,o=e("../lib/constants").CLIENT_API_URLS;function s(d){return/^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(d)}function l(d){var u=d.split("_"),h=u[0],p=u.slice(2).join("_");return{merchantId:p,environment:h}}function c(d){var u,h,p={attrs:{},configUrl:""};return s(d)?(h=l(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=o[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=c},{"../lib/constants":60,"../lib/vendor/polyfill":86}],64:[function(e,n,a){var i=e("./braintree-error"),o=e("./assets"),s=e("./errors"),l="3.126.0";function c(d){var u=Promise.resolve();return d.client?Promise.resolve(d.client):(window.braintree&&window.braintree.client||(u=o.loadScript({src:d.assetsUrl+"/web/"+l+"/js/client.min.js"}).catch(function(h){return Promise.reject(new i({type:s.CLIENT_SCRIPT_FAILED_TO_LOAD.type,code:s.CLIENT_SCRIPT_FAILED_TO_LOAD.code,message:s.CLIENT_SCRIPT_FAILED_TO_LOAD.message,details:{originalError:h}}))})),u.then(function(){return window.braintree.client.VERSION!==l?Promise.reject(new i({type:s.INCOMPATIBLE_VERSIONS.type,code:s.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+window.braintree.client.VERSION+") and "+d.name+" (version "+l+") components must be from the same SDK version."})):window.braintree.client.create({authorization:d.authorization,debug:d.debug})}))}n.exports={create:c}},{"./assets":56,"./braintree-error":59,"./errors":66}],65:[function(e,n,a){function i(o,s){return s=s==null?"":s,o.reduce(function(l,c){return l[c]=s+c,l},{})}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"),o=e("./strategies/popup-bridge"),s=e("./strategies/modal"),l=e("framebus"),c=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,y=e("../../constants").BUS_CONFIGURATION_REQUEST_EVENT,A=["name","dispatchFrameUrl","openFrameUrl"];function x(){}function N(P){if(!P)throw new Error("Valid configuration is required");if(A.forEach(function(k){if(!P.hasOwnProperty(k))throw new Error("A valid frame "+k+" must be provided")}),!/^[\w_]+$/.test(P.name))throw new Error("A valid frame name must be provided")}function I(P){N(P),this._serviceId=h().replace(/-/g,""),this._options={name:P.name+"_"+this._serviceId,dispatchFrameUrl:P.dispatchFrameUrl,openFrameUrl:P.openFrameUrl,height:P.height,width:P.width,top:P.top,left:P.left},this.state=P.state||{},this._bus=new l({channel:this._serviceId}),this._setBusEvents()}I.prototype.initialize=function(P){var k=function(){P(),this._bus.off(c.DISPATCH_FRAME_READY,k)}.bind(this);this._bus.on(c.DISPATCH_FRAME_READY,k),this._writeDispatchFrame()},I.prototype._writeDispatchFrame=function(){var P=u.DISPATCH_FRAME_NAME+"_"+this._serviceId,k=this._options.dispatchFrameUrl;this._dispatchFrame=p({"aria-hidden":!0,name:P,title:P,src:k,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(c.DISPATCH_FRAME_REPORT,function(P,k){this._onCompleteCallback&&this._onCompleteCallback.call(null,P.err,P.payload),this._frame.close(),this._onCompleteCallback=null,k&&k()}.bind(this)),this._bus.on(y,function(P){P(this.state)}.bind(this))},I.prototype.open=function(P,k){if(P=P||{},this._frame=this._getFrameForEnvironment(P),this._frame.initialize(k),!(this._frame instanceof o)){if(v(this.state,P.state),this._onCompleteCallback=k,this._frame.open(),this.isFrameClosed()){this._cleanupFrame(),k&&k(new f(d.FRAME_SERVICE_FRAME_OPEN_FAILED));return}this._pollForPopupClose()}},I.prototype.redirect=function(P){this._frame&&!this.isFrameClosed()&&this._frame.redirect(P)},I.prototype.close=function(){this.isFrameClosed()||this._frame.close()},I.prototype.focus=function(){this.isFrameClosed()||this._frame.focus()},I.prototype.createHandler=function(P){return P=P||{},{close:function(){P.beforeClose&&P.beforeClose(),this.close()}.bind(this),focus:function(){P.beforeFocus&&P.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(P){var k=m.supportsPopups(),S=!!window.popupBridge,U=v({},this._options,P);return S?new o(U):k?new i(U):new s(U)},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(s,l){var c=new i(s);c.initialize(function(){l(c)})}}},{"./frame-service":67}],69:[function(e,n,a){var i=e("@braintree/iframer"),o=e("../../../assign").assign,s=e("../../shared/browser-detection"),l={position:"fixed",top:0,left:0,bottom:0,padding:0,margin:0,border:0,outline:"none",zIndex:20001,background:"#FFFFFF"};function c(){}function d(u){this._closed=null,this._frame=null,this._options=u||{},this._container=this._options.container||document.body}d.prototype.initialize=c,d.prototype.open=function(){var u={src:this._options.openFrameUrl,name:this._options.name,scrolling:"yes",height:"100%",width:"100%",style:o({},l),title:"Lightbox Frame"};s.isIos()?(s.isIosWKWebview()&&(this._lockScrolling(),u.style={}),this._el=document.createElement("div"),o(this._el.style,l,{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=c,d.prototype.close=function(){this._container.removeChild(this._el),this._frame=null,this._closed=!0,s.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"),o=e("../../shared/errors");function s(){}function l(c){this._closed=null,this._options=c}l.prototype.initialize=function(c){var d=this;window.popupBridge.onComplete=function(u,h){var p=!h&&!u;if(d._closed=!0,u||p){c(new i(o.FRAME_SERVICE_FRAME_CLOSED));return}c(null,h)}},l.prototype.open=function(c){var d;c=c||{},d=c.openFrameUrl||this._options.openFrameUrl,this._closed=!1,window.popupBridge.open(d)},l.prototype.focus=s,l.prototype.close=s,l.prototype.isClosed=function(){return!!this._closed},l.prototype.redirect=function(c){this.open({openFrameUrl:c})},n.exports=l},{"../../../braintree-error":59,"../../shared/errors":76}],71:[function(e,n,a){var i=e("../../../shared/constants"),o=e("./position");function s(l,c,d){return typeof c!="undefined"?c:o[l](d)}n.exports=function(c){var d=c.height||i.DEFAULT_POPUP_HEIGHT,u=c.width||i.DEFAULT_POPUP_WIDTH,h=s("top",c.top,d),p=s("left",c.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 o(){}function s(l){this._frame=null,this._options=l||{}}s.prototype.initialize=o,s.prototype.open=function(){this._frame=window.open(this._options.openFrameUrl,this._options.name,i(this._options))},s.prototype.focus=function(){this._frame.focus()},s.prototype.close=function(){this._frame.closed||this._frame.close()},s.prototype.isClosed=function(){return!this._frame||!!this._frame.closed},s.prototype.redirect=function(l){this._frame.location.href=l},n.exports=s},{"./compose-options":71}],73:[function(e,n,a){function i(l){var c=window.outerHeight||document.documentElement.clientHeight,d=window.screenY==null?window.screenTop:window.screenY;return s(c,l,d)}function o(l){var c=window.outerWidth||document.documentElement.clientWidth,d=window.screenX==null?window.screenLeft:window.screenX;return s(c,l,d)}function s(l,c,d){return(l-c)/2+d}n.exports={top:i,left:o,center:s}},{}],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(o){o=o||window;try{return o.self!==o.top}catch(s){return!0}}},{}],79:[function(e,n,a){var i,o={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function s(c){return c.split(".").slice(-2).join(".")}function l(c){var d;return c=c.toLowerCase(),/^https:/.test(c)?(i=i||document.createElement("a"),i.href=c,d=s(i.hostname),o.hasOwnProperty(d)):!1}n.exports=l},{}],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(o){return typeof i[o]=="function"})}},{}],82:[function(e,n,a){function i(u){var h;for(h in u)if(u.hasOwnProperty(h))return!0;return!1}function o(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.toString.call(u)==="[object Array]"||!1}function s(u){return u=u||window.location.href,/\?/.test(u)}function l(u){var h,p;return u=u||window.location.href,s(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(f,m){var v=m.split("="),y=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return f[y]=A,f},{}),p):{}}function c(u,h){var p,f,m,v=[];for(m in u)u.hasOwnProperty(m)&&(f=u[m],h?o(u)?p=h+"[]":p=h+"["+m+"]":p=m,typeof f=="object"?v.push(c(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+=c(h)),u}n.exports={parse:l,stringify:c,queryify:d,hasQueryParams:s}},{}],83:[function(e,n,a){n.exports=function(i){return i.indexOf("_")===-1?i:i.toLowerCase().replace(/(\_\w)/g,function(o){return o[1].toUpperCase()})}},{}],84:[function(e,n,a){var i=e("./querystring");function o(){return i.parse(window.location.href)}n.exports={getUrlParams:o}},{"./querystring":82}],85:[function(e,n,a){function i(o){return o?"":".min"}n.exports=i},{}],86:[function(e,n,a){var i=typeof atob=="function"?atob:o;function o(s){var l,c,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})?$/,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="";if(!v.test(s))throw new Error("Non base64 encoded input passed to window.atob polyfill");m=0;do u=y.indexOf(s.charAt(m++)),h=y.indexOf(s.charAt(m++)),p=y.indexOf(s.charAt(m++)),f=y.indexOf(s.charAt(m++)),l=(u&63)<<2|h>>4&3,c=(h&15)<<4|p>>2&15,d=(p&3)<<6|f&63,A+=String.fromCharCode(l)+(c?String.fromCharCode(c):"")+(d?String.fromCharCode(d):"");while(m<s.length);return A}n.exports={atob:function(s){return i.call(window,s)},_atob:o}},{}],87:[function(e,n,a){var i=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},o=i(e("./venmo-desktop"));n.exports=function(l){var c=new o.default(l);return c.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!) {
341
+ ***************************************************************************** */function s(b,T,_,L){function D(C){return C instanceof _?C:new _(function(B){B(C)})}return new(_||(_=Promise))(function(C,B){function X(te){try{R(L.next(te))}catch(ye){B(ye)}}function ae(te){try{R(L.throw(te))}catch(ye){B(ye)}}function R(te){te.done?C(te.value):D(te.value).then(X,ae)}R((L=L.apply(b,[])).next())})}function o(b,T){var _={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},L,D,C,B;return B={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(B[Symbol.iterator]=function(){return this}),B;function X(R){return function(te){return ae([R,te])}}function ae(R){if(L)throw new TypeError("Generator is already executing.");for(;_;)try{if(L=1,D&&(C=R[0]&2?D.return:R[0]?D.throw||((C=D.return)&&C.call(D),0):D.next)&&!(C=C.call(D,R[1])).done)return C;switch(D=0,C&&(R=[R[0]&2,C.value]),R[0]){case 0:case 1:C=R;break;case 4:return _.label++,{value:R[1],done:!1};case 5:_.label++,D=R[1],R=[0];continue;case 7:R=_.ops.pop(),_.trys.pop();continue;default:if(C=_.trys,!(C=C.length>0&&C[C.length-1])&&(R[0]===6||R[0]===2)){_=0;continue}if(R[0]===3&&(!C||R[1]>C[0]&&R[1]<C[3])){_.label=R[1];break}if(R[0]===6&&_.label<C[1]){_.label=C[1],C=R;break}if(C&&_.label<C[2]){_.label=C[2],_.ops.push(R);break}C[2]&&_.ops.pop(),_.trys.pop();continue}R=T.call(b,_)}catch(te){R=[6,te],D=0}finally{L=C=0}if(R[0]&5)throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}}var c={},l={};function d(b){var T,_=JSON.stringify(b);if(!b.forceScriptReload&&(T=l[_],T))return T;var L=document.createElement("script"),D=b.dataAttributes||{},C=b.container||document.head;return L.src=b.src,L.id=b.id||"",L.async=!0,b.type&&L.setAttribute("type","".concat(b.type)),b.crossorigin&&L.setAttribute("crossorigin","".concat(b.crossorigin)),Object.keys(D).forEach(function(B){L.setAttribute("data-".concat(B),"".concat(D[B]))}),T=new Promise(function(B,X){L.addEventListener("load",function(){B(L)}),L.addEventListener("error",function(){X(new Error("".concat(b.src," failed to load.")))}),L.addEventListener("abort",function(){X(new Error("".concat(b.src," has aborted.")))}),C.appendChild(L)}),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 L=T.container||document.head;return _.setAttribute("rel","stylesheet"),_.setAttribute("type","text/css"),_.setAttribute("href",T.href),_.setAttribute("id",T.id),L.firstChild?L.insertBefore(_,L.firstChild):L.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",y={minified:"axo.min",unminified:"axo"},A="fastlane",x="connect-boba",N="".concat(x,"/locales/"),I={AXO_ASSET_NAME:y,AXO_ASSET_PATH:x,LOCALE_PATH:N,CDNX_PROD:v},P={BT:"BT",PPCP:"PPCP"};function O(){return typeof window.define=="function"&&!!window.define.amd}function S(){return O()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function F(b,T,_){var L,D;return _===void 0&&(_=!0),s(this,void 0,void 0,function(){var C,B;return o(this,function(X){if(C=G(),C&&C[b.module]){if(T&&((L=C[b.module])===null||L===void 0?void 0:L.VERSION)!==T)throw B=(D=C[b.module])===null||D===void 0?void 0:D.VERSION,new Error("".concat(b.module," already loaded with version ").concat(B," cannot load version ").concat(T));return[2,!0]}if(!T)throw new Error("Attempted to load ".concat(b.module," without specifying version"));return[2,W(b,T,_)]})})}function W(b,T,_){if(_===void 0&&(_=!0),O()){var L=_?b.amdModule.minified:b.amdModule.unminified;return new Promise(function(C,B){window.require([L],C,B)})}var D=_?b.script.minified:b.script.unminified;return f({id:"".concat(b.id,"-").concat(T),src:"https://js.braintreegateway.com/web/".concat(T,"/js/").concat(D)})}function G(){return window==null?void 0:window.braintree}var U,j,z={Client:"client",HostedCardFields:"hostedFields"},J="braintree",M=(U={},U[z.Client]="client",U[z.HostedCardFields]="hosted-fields",U),$=(j={},j[z.Client]={id:"client",module:z.Client,amdModule:{unminified:"".concat(J,"/").concat(M[z.Client]),minified:"".concat(J,"/").concat(M[z.Client],".min")},script:{unminified:"".concat(M[z.Client],".js"),minified:"".concat(M[z.Client],".min.js")}},j[z.HostedCardFields]={id:"hcf",module:z.HostedCardFields,amdModule:{unminified:"".concat(J,"/").concat(M[z.HostedCardFields]),minified:"".concat(J,"/").concat(M[z.HostedCardFields],".min")},script:{unminified:"".concat(M[z.HostedCardFields],".js"),minified:"".concat(M[z.HostedCardFields],".min.js")}},j);function H(b){return s(this,void 0,void 0,function(){var T,_,L,D;return o(this,function(C){switch(C.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),T=b.btSdkVersion,_=b.minified,L=k(b),D=V(b),b.platform!==P.BT?[3,2]:[4,Promise.all([F($.hostedFields,T,_),E(L,_)])];case 1:return C.sent(),[3,5];case 2:return b.platform!==P.PPCP?[3,4]:[4,Promise.all([F($.client,T,_),F($.hostedFields,T,_),E(L,_)])];case 3:return C.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:D}}]}})})}function E(b,T){var _;if(T===void 0&&(T=!0),O()){S()&&requirejs.config({paths:(_={},_[A]=b,_)});var L="".concat(A,"/").concat(T?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified);return new Promise(function(D,C){window.require([L],D,C)})}return f({id:"axo-id",src:b,forceScriptReload:!0})}function g(b){var T=b.assetUrl,_=b.bundleId;return _?"https://cdn-".concat(_,".static.engineering.dev.paypalinc.com/").concat(T):"".concat(I.CDNX_PROD,"/").concat(T)}function k(b){var T,_=(b==null?void 0:b.minified)!==!1?I.AXO_ASSET_NAME.minified:I.AXO_ASSET_NAME.unminified,L=O()?I.AXO_ASSET_PATH:"".concat(I.AXO_ASSET_PATH,"/").concat(_,".js");return g({assetUrl:L,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}function V(b){var T;return g({assetUrl:I.LOCALE_PATH,bundleId:(T=b==null?void 0:b.metadata)===null||T===void 0?void 0:T.bundleIdOverride})}i.constants=I,i.loadAxo=H})},{}],37:[function(e,r,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,r,a){var i=e("./lib"),s=e("./framebus");(0,i.attach)(),r.exports=s.Framebus},{"./framebus":37,"./lib":45}],39:[function(e,r,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,r,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,r,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,r,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,r,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,r,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,r,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,r,a){Object.defineProperty(a,"__esModule",{value:!0}),a.isntString=void 0;function i(s){return typeof s!="string"}a.isntString=i},{}],47:[function(e,r,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,r,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,r,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,r,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,r,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,r,a){Object.defineProperty(a,"__esModule",{value:!0})},{}],53:[function(e,r,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,r,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}r.exports={addMetadata:c,addEventMetadata:l}},{"./constants":60,"./create-authorization-data":63,"./json-clone":80}],55:[function(e,r,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 y=v._request,A=i.ANALYTICS_URL,x=i.ANALYTICS_PREFIX+h,N=v.getConfiguration(),I=N.gatewayConfiguration.environment==="production",P={events:[],tracking:[]},O=s.addEventMetadata(v,P);return O.event_name=x,O.t=m,P.events=[{level:"info",event:x,payload:o({env:I?"production":"sandbox",timestamp:m},p)}],P.tracking=[O],p&&typeof p=="object"&&(P.tracking=[d(O,p)]),y({url:A,method:"post",data:P,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}r.exports={sendEvent:c,sendEventPlus:l}},{"./add-metadata":54,"./assign":57,"./constants":60}],56:[function(e,r,a){var i=e("@braintree/asset-loader/load-script"),s=e("@paypal/accelerated-checkout-loader");r.exports={loadScript:i,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":36}],57:[function(e,r,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}r.exports={assign:i,_assign:s}},{}],58:[function(e,r,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."}))}r.exports={verify:c}},{"./braintree-error":59,"./errors":66}],59:[function(e,r,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},r.exports=s},{"./enumerate":65}],60:[function(e,r,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"};r.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,r,a){var i=e("./braintree-error"),s=e("./errors");r.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,r,a){var i=e("./constants").ASSETS_URLS;function s(o){return i.production}r.exports={create:s}},{"./constants":60}],63:[function(e,r,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}r.exports=l},{"../lib/constants":60,"../lib/vendor/polyfill":86}],64:[function(e,r,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})}))}r.exports={create:l}},{"./assets":56,"./braintree-error":59,"./errors":66}],65:[function(e,r,a){function i(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}r.exports=i},{}],66:[function(e,r,a){var i=e("./braintree-error");r.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,r,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,y=e("../../constants").BUS_CONFIGURATION_REQUEST_EVENT,A=["name","dispatchFrameUrl","openFrameUrl"];function x(){}function N(P){if(!P)throw new Error("Valid configuration is required");if(A.forEach(function(O){if(!P.hasOwnProperty(O))throw new Error("A valid frame "+O+" must be provided")}),!/^[\w_]+$/.test(P.name))throw new Error("A valid frame name must be provided")}function I(P){N(P),this._serviceId=h().replace(/-/g,""),this._options={name:P.name+"_"+this._serviceId,dispatchFrameUrl:P.dispatchFrameUrl,openFrameUrl:P.openFrameUrl,height:P.height,width:P.width,top:P.top,left:P.left},this.state=P.state||{},this._bus=new c({channel:this._serviceId}),this._setBusEvents()}I.prototype.initialize=function(P){var O=function(){P(),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 P=u.DISPATCH_FRAME_NAME+"_"+this._serviceId,O=this._options.dispatchFrameUrl;this._dispatchFrame=p({"aria-hidden":!0,name:P,title:P,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(P,O){this._onCompleteCallback&&this._onCompleteCallback.call(null,P.err,P.payload),this._frame.close(),this._onCompleteCallback=null,O&&O()}.bind(this)),this._bus.on(y,function(P){P(this.state)}.bind(this))},I.prototype.open=function(P,O){if(P=P||{},this._frame=this._getFrameForEnvironment(P),this._frame.initialize(O),!(this._frame instanceof s)){if(v(this.state,P.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(P){this._frame&&!this.isFrameClosed()&&this._frame.redirect(P)},I.prototype.close=function(){this.isFrameClosed()||this._frame.close()},I.prototype.focus=function(){this.isFrameClosed()||this._frame.focus()},I.prototype.createHandler=function(P){return P=P||{},{close:function(){P.beforeClose&&P.beforeClose(),this.close()}.bind(this),focus:function(){P.beforeFocus&&P.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(P){var O=m.supportsPopups(),S=!!window.popupBridge,F=v({},this._options,P);return S?new s(F):O?new i(F):new o(F)},r.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,r,a){var i=e("./frame-service");r.exports={create:function(o,c){var l=new i(o);l.initialize(function(){c(l)})}}},{"./frame-service":67}],69:[function(e,r,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)},r.exports=d},{"../../../assign":57,"../../shared/browser-detection":74,"@braintree/iframer":27}],70:[function(e,r,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})},r.exports=c},{"../../../braintree-error":59,"../../shared/errors":76}],71:[function(e,r,a){var i=e("../../../shared/constants"),s=e("./position");function o(c,l,d){return typeof l!="undefined"?l:s[c](d)}r.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,r,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},r.exports=o},{"./compose-options":71}],73:[function(e,r,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}r.exports={top:i,left:s,center:o}},{}],74:[function(e,r,a){r.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,r,a){r.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,r,a){var i=e("../../braintree-error");r.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,r,a){var i=e("../../enumerate");r.exports=i(["DISPATCH_FRAME_READY","DISPATCH_FRAME_REPORT"],"frameService:")},{"../../enumerate":65}],78:[function(e,r,a){r.exports=function(s){s=s||window;try{return s.self!==s.top}catch(o){return!0}}},{}],79:[function(e,r,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}r.exports=c},{}],80:[function(e,r,a){r.exports=function(i){return JSON.parse(JSON.stringify(i))}},{}],81:[function(e,r,a){r.exports=function(i){return Object.keys(i).filter(function(s){return typeof i[s]=="function"})}},{}],82:[function(e,r,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("="),y=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return f[y]=A,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}r.exports={parse:c,stringify:l,queryify:d,hasQueryParams:o}},{}],83:[function(e,r,a){r.exports=function(i){return i.indexOf("_")===-1?i:i.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],84:[function(e,r,a){var i=e("./querystring");function s(){return i.parse(window.location.href)}r.exports={getUrlParams:s}},{"./querystring":82}],85:[function(e,r,a){function i(s){return s?"":".min"}r.exports=i},{}],86:[function(e,r,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})?$/,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");m=0;do u=y.indexOf(o.charAt(m++)),h=y.indexOf(o.charAt(m++)),p=y.indexOf(o.charAt(m++)),f=y.indexOf(o.charAt(m++)),c=(u&63)<<2|h>>4&3,l=(h&15)<<4|p>>2&15,d=(p&3)<<6|f&63,A+=String.fromCharCode(c)+(l?String.fromCharCode(l):"")+(d?String.fromCharCode(d):"");while(m<o.length);return A}r.exports={atob:function(o){return i.call(window,o)},_atob:s}},{}],87:[function(e,r,a){var i=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},s=i(e("./venmo-desktop"));r.exports=function(c){var l=new s.default(c);return l.initialize()}},{"./venmo-desktop":89}],88:[function(e,r,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!) {
342
342
  createVenmoQRCodePaymentContext(input: $input) {
343
343
  clientMutationId
344
344
  venmoQRCodePaymentContext {
@@ -408,12 +408,12 @@ ${m}::-ms-input-placeholder{${f}}
408
408
  }
409
409
  }
410
410
  }
411
- }`},{}],89:[function(e,n,a){var i=this&&this.__assign||function(){return i=Object.assign||function(m){for(var v,y=1,A=arguments.length;y<A;y++){v=arguments[y];for(var x in v)Object.prototype.hasOwnProperty.call(v,x)&&(m[x]=v[x])}return m},i.apply(this,arguments)},o=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(a,"__esModule",{value:!0});var s=o(e("framebus")),l=o(e("@braintree/iframer")),c=o(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=c.default(),this.profileId=v.profileId,this.displayName=v.displayName,this.paymentMethodUsage=v.paymentMethodUsage,this.shouldUseLegacyQRCodeMutation=!this.paymentMethodUsage;var y=v.url+"#"+this.env+"_"+this.id;this.bus=new s.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=l.default({src:y,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(y){v.bus.on(d.VENMO_DESKTOP_IFRAME_READY,function(){y(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 y=new this.Promise(function(A,x){v.launchDesktopPromiseRejectFunction=x;var N=function(){v.bus.off(d.VENMO_DESKTOP_CUSTOMER_CANCELED,P),v.bus.off(d.VENMO_DESKTOP_UNKNOWN_ERROR,I)},I=function(k){N(),v.sendEvent("venmo.tokenize.desktop.unknown-error"),x({allowUIToHandleError:!1,reason:"UNKNOWN_ERROR",err:k})},P=function(){N(),v.updateVenmoDesktopPaymentContext("CANCELED"),v.sendEvent("venmo.tokenize.desktop.status-change.canceled-from-modal"),x({allowUIToHandleError:!1,reason:"CUSTOMER_CANCELED"})};v.completedHandler=function(k){N(),A(k)},v.bus.on(d.VENMO_DESKTOP_CUSTOMER_CANCELED,P),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(),y.then(function(A){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,A}).catch(function(A){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,v.Promise.reject(A)})},m.prototype.triggerCompleted=function(v){var y=this;this.isHidden||setTimeout(function(){y.completedHandler&&y.completedHandler(v),delete y.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,y){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_QR_CODE,{id:v,merchantId:y}),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(y){var A=new Date(y.expiresAt).getTime()-new Date(y.createdAt).getTime(),x=Date.now()+A;return v.displayQRCode(y.id,y.merchantId),v.pollForStatusChange(y.status,x)}).then(function(y){if(y){var A=y.userName||"";A="@"+A.replace("@",""),v.triggerCompleted({paymentMethodNonce:y.paymentMethodId,username:A,payerInfo:y.payerInfo,id:v.venmoContextId||""})}}).catch(function(y){y.allowUIToHandleError||(v.sendEvent("venmo.tokenize.desktop.unhandled-error"),v.triggerRejected(y))})},m.prototype.pollForStatusChange=function(v,y){var A=this;return this.venmoContextId?Date.now()>y?this.updateVenmoDesktopPaymentContext("EXPIRED").then(function(){return A.displayError("Something went wrong"),A.sendEvent("venmo.tokenize.desktop.status-change.sdk-timeout"),A.Promise.reject({allowUIToHandleError:!0,reason:"TIMEOUT"})}):this.lookupVenmoDesktopPaymentContext().then(function(x){if(!A.venmoContextId||!x)return A.Promise.resolve();var N=x.status;if(N!==v)switch(v=N,A.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 A.displayError(I),A.Promise.reject({allowUIToHandleError:!0,reason:v});case"SCANNED":A.authorizing();break;case"APPROVED":return A.authorize(),A.Promise.resolve(x)}return new A.Promise(function(P,k){setTimeout(function(){A.pollForStatusChange(v,y).then(P).catch(k)},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(y){return y.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext})},m.prototype.createPaymentContextFromGraphQL=function(v){var y={intent:v,paymentMethodUsage:this.paymentMethodUsage,customerClient:"DESKTOP"};return this.profileId&&(y.merchantProfileId=this.profileId),this.displayName&&(y.displayName=this.displayName),this.apiRequest(u.CREATE_PAYMENT_CONTEXT_QUERY,{input:y}).then(function(A){return A.createVenmoPaymentContext.venmoPaymentContext})},m.prototype.createVenmoDesktopPaymentContext=function(){var v=this,y=this.shouldUseLegacyQRCodeMutation?this.createPaymentContextFromGraphqlLegacyQRCodeMutation("PAY_FROM_APP"):this.createPaymentContextFromGraphQL("PAY_FROM_APP");return y.then(function(A){v.venmoContextId=A.id;var x=v.profileId||A.merchantId;return{id:A.id,status:A.status,merchantId:x,createdAt:A.createdAt,expiresAt:A.expiresAt}})},m.prototype.updateVenmoDesktopPaymentContext=function(v,y){if(y===void 0&&(y={}),!this.venmoContextId)return this.Promise.resolve();var A={input:i({id:this.venmoContextId,status:v},y)},x=this.shouldUseLegacyQRCodeMutation?u.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:u.UPDATE_PAYMENT_CONTEXT_QUERY;return this.apiRequest(x,A).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(y){return y.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"),o=e("../lib/basic-component-verification"),s=e("../lib/create-deferred-client"),l=e("../lib/create-assets-url"),c=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(y){var A="Venmo";return o.verify({name:A,client:y.client,authorization:y.authorization}).then(function(){var x,N;return y.profileId&&typeof y.profileId!="string"?Promise.reject(new u(c.VENMO_INVALID_PROFILE_ID)):y.deepLinkReturnUrl&&typeof y.deepLinkReturnUrl!="string"?Promise.reject(new u(c.VENMO_INVALID_DEEP_LINK_RETURN_URL)):(x=s.create({authorization:y.authorization,client:y.client,debug:y.debug,assetsUrl:l.create(y.authorization),name:A}).then(function(I){var P=I.getConfiguration();return y.client=I,P.gatewayConfiguration.payWithVenmo?I:Promise.reject(new u(c.VENMO_NOT_ENABLED))}),y.createPromise=x,N=new h(y),i.sendEvent(x,"venmo.initialized"),x.then(function(){return N}))})}function v(y){return p.isBrowserSupported(y)}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"),o=e("@braintree/browser-detection/is-chrome"),s=e("@braintree/browser-detection/is-ios"),l=e("@braintree/browser-detection/is-ios-safari"),c=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 s()?c()||!l():!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 s()&&o()}n.exports={isAndroid:i,isAndroidWebview:u,isChrome:o,isIos:s,isIosChrome:f,isSamsung:d,isIosSafari:l,isIosWebview:c,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 o(s){return s.useAllowDesktopWebLogin?i.VENMO_WEB_LOGIN_URL:s.mobileWebFallBack?i.VENMO_APP_OR_MOBILE_AUTH_URL:i.VENMO_MOBILE_APP_AUTH_ONLY_URL}n.exports=o},{"./constants":92}],96:[function(e,n,a){var i=e("./browser-detection"),o=e("../../lib/in-iframe");function s(l){var c,d,u,h,p,f=i.isAndroid(),m=f||i.isIos(),v=f&&i.isChrome(),y=i.isIosSafari()||v;return l=l||{},d=(l.allowDesktopWebLogin||l.allowDesktop)===!0,h=l.hasOwnProperty("allowNewBrowserTab")?l.allowNewBrowserTab:!0,p=l.hasOwnProperty("allowWebviews")?l.allowWebviews:!0,u=h&&!o(),c=!u&&i.isIosChrome()||i.isFacebookOwnedBrowserOnAndroid()||i.isSamsung(),c||!p&&(i.isAndroidWebview()||i.isIosWebview())?!1:m?h?m:y:d}n.exports={isBrowserSupported:s}},{"../../lib/in-iframe":78,"./browser-detection":91}],97:[function(e,n,a){var i=e("../../lib/frame-service/external"),o=e("../../lib/use-min"),s=e("@braintree/extended-promise"),l=e("../shared/errors"),c=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">
411
+ }`},{}],89:[function(e,r,a){var i=this&&this.__assign||function(){return i=Object.assign||function(m){for(var v,y=1,A=arguments.length;y<A;y++){v=arguments[y];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 y=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:y,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(y){v.bus.on(d.VENMO_DESKTOP_IFRAME_READY,function(){y(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 y=new this.Promise(function(A,x){v.launchDesktopPromiseRejectFunction=x;var N=function(){v.bus.off(d.VENMO_DESKTOP_CUSTOMER_CANCELED,P),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})},P=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(),A(O)},v.bus.on(d.VENMO_DESKTOP_CUSTOMER_CANCELED,P),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(),y.then(function(A){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,A}).catch(function(A){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,v.Promise.reject(A)})},m.prototype.triggerCompleted=function(v){var y=this;this.isHidden||setTimeout(function(){y.completedHandler&&y.completedHandler(v),delete y.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,y){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_QR_CODE,{id:v,merchantId:y}),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(y){var A=new Date(y.expiresAt).getTime()-new Date(y.createdAt).getTime(),x=Date.now()+A;return v.displayQRCode(y.id,y.merchantId),v.pollForStatusChange(y.status,x)}).then(function(y){if(y){var A=y.userName||"";A="@"+A.replace("@",""),v.triggerCompleted({paymentMethodNonce:y.paymentMethodId,username:A,payerInfo:y.payerInfo,id:v.venmoContextId||""})}}).catch(function(y){y.allowUIToHandleError||(v.sendEvent("venmo.tokenize.desktop.unhandled-error"),v.triggerRejected(y))})},m.prototype.pollForStatusChange=function(v,y){var A=this;return this.venmoContextId?Date.now()>y?this.updateVenmoDesktopPaymentContext("EXPIRED").then(function(){return A.displayError("Something went wrong"),A.sendEvent("venmo.tokenize.desktop.status-change.sdk-timeout"),A.Promise.reject({allowUIToHandleError:!0,reason:"TIMEOUT"})}):this.lookupVenmoDesktopPaymentContext().then(function(x){if(!A.venmoContextId||!x)return A.Promise.resolve();var N=x.status;if(N!==v)switch(v=N,A.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 A.displayError(I),A.Promise.reject({allowUIToHandleError:!0,reason:v});case"SCANNED":A.authorizing();break;case"APPROVED":return A.authorize(),A.Promise.resolve(x)}return new A.Promise(function(P,O){setTimeout(function(){A.pollForStatusChange(v,y).then(P).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(y){return y.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext})},m.prototype.createPaymentContextFromGraphQL=function(v){var y={intent:v,paymentMethodUsage:this.paymentMethodUsage,customerClient:"DESKTOP"};return this.profileId&&(y.merchantProfileId=this.profileId),this.displayName&&(y.displayName=this.displayName),this.apiRequest(u.CREATE_PAYMENT_CONTEXT_QUERY,{input:y}).then(function(A){return A.createVenmoPaymentContext.venmoPaymentContext})},m.prototype.createVenmoDesktopPaymentContext=function(){var v=this,y=this.shouldUseLegacyQRCodeMutation?this.createPaymentContextFromGraphqlLegacyQRCodeMutation("PAY_FROM_APP"):this.createPaymentContextFromGraphQL("PAY_FROM_APP");return y.then(function(A){v.venmoContextId=A.id;var x=v.profileId||A.merchantId;return{id:A.id,status:A.status,merchantId:x,createdAt:A.createdAt,expiresAt:A.expiresAt}})},m.prototype.updateVenmoDesktopPaymentContext=function(v,y){if(y===void 0&&(y={}),!this.venmoContextId)return this.Promise.resolve();var A={input:i({id:this.venmoContextId,status:v},y)},x=this.shouldUseLegacyQRCodeMutation?u.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:u.UPDATE_PAYMENT_CONTEXT_QUERY;return this.apiRequest(x,A).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(y){return y.node})},m}();a.default=f},{"../shared/events":94,"./queries":88,"@braintree/iframer":27,"@braintree/uuid":31,framebus:38}],90:[function(e,r,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(y){var A="Venmo";return s.verify({name:A,client:y.client,authorization:y.authorization}).then(function(){var x,N;return y.profileId&&typeof y.profileId!="string"?Promise.reject(new u(l.VENMO_INVALID_PROFILE_ID)):y.deepLinkReturnUrl&&typeof y.deepLinkReturnUrl!="string"?Promise.reject(new u(l.VENMO_INVALID_DEEP_LINK_RETURN_URL)):(x=o.create({authorization:y.authorization,client:y.client,debug:y.debug,assetsUrl:c.create(y.authorization),name:A}).then(function(I){var P=I.getConfiguration();return y.client=I,P.gatewayConfiguration.payWithVenmo?I:Promise.reject(new u(l.VENMO_NOT_ENABLED))}),y.createPromise=x,N=new h(y),i.sendEvent(x,"venmo.initialized"),x.then(function(){return N}))})}function v(y){return p.isBrowserSupported(y)}r.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,r,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()}r.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,r,a){r.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,r,a){var i=e("../../lib/braintree-error");r.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,r,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,r,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}r.exports=s},{"./constants":92}],96:[function(e,r,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(),y=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:y:d}r.exports={isBrowserSupported:o}},{"../../lib/in-iframe":78,"./browser-detection":91}],97:[function(e,r,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">
412
412
  <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"/>
413
413
  <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"/>
414
414
  <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"/>
415
415
  <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"/>
416
416
  <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"/>
417
- </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"};s.suppressUnhandledPromiseMessage=!0;function v(k){var S=k.frameServiceInstance,U=k.venmoUrl,q=k.checkForStatusChange,$=k.cancelTokenization,F=k.checkPaymentContextStatus,z=new s;return document.getElementById(m.continueButton).addEventListener("click",function(){S.focus()}),document.getElementById(m.cancelButton).addEventListener("click",function(){S.close(),$(),A()}),S.open({},function(B){var Z=1;B?z.reject(B):q(Z).then(function(D){z.resolve(D)}).catch(function(D){F().then(function(Y){Y.status==="CREATED"?z.reject(new c(l.VENMO_CUSTOMER_CANCELED)):z.reject(D)})}),S.close(),A()}),S.redirect(U),z}function y(){var k=Math.round((window.outerHeight-f)/2)+window.screenTop,S=Math.round((window.outerWidth-p)/2)+window.screenLeft;return{top:k,left:S}}function A(){document.getElementById("venmo-desktop-web-backdrop").classList.add("hidden")}function x(){var k=["#"+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;","}"],U=["#"+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;","}"],q=["#"+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;","}"],z=k.concat(S,U,q,$,F);return z.join(`
418
- `)}function N(k){var S=document.getElementById(m.backdrop),U,q,$,F,z,B,Z,D;if(S){S.classList.remove("hidden");return}U=document.createElement("style"),q=document.createElement("div"),$=document.createElement("div"),F=document.createElement("div"),z=document.createElement("div"),B=document.createElement("div"),Z=document.createElement("button"),D=document.createElement("button"),k&&(U.nonce=k),U.id="venmo-desktop-web__injected-styles",U.innerHTML=x(),q.id=m.backdrop,$.id=m.backdropContainer,F.id=m.venmoLogo,F.innerHTML=u,z.id=m.message,z.innerText="What would you like to do?",B.id=m.instructions,B.innerText=h,Z.id=m.continueButton,Z.innerText="Continue payment",D.id=m.cancelButton,D.innerText="Cancel payment",document.head.appendChild(U),$.appendChild(F),$.appendChild(z),$.appendChild(B),$.appendChild(Z),$.appendChild(D),q.appendChild($),document.body.appendChild(q),q.addEventListener("click",function(Y){Y.stopPropagation()})}function I(k){return N(k.styleCspNonce),v(k)}function P(k){var S=new s,U="venmoDesktopWebLogin",q=k.assetsUrl,$=k.debug||!1,F=y(),z=q+"/web/"+d+"/html";return i.create({name:U,dispatchFrameUrl:z+"/dispatch-frame"+o($)+".html",openFrameUrl:z+"/venmo-landing-frame"+o($)+".html",top:F.top,left:F.left,height:f,width:p},function(B){S.resolve(B)}),S}n.exports={runWebLogin:I,openPopup:v,setupDesktopWebLogin:P,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"),o=e("../lib/assign").assign,s=e("./shared/supports-venmo"),l=e("./shared/browser-detection"),c=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"),y=e("../lib/in-iframe"),A=e("@braintree/extended-promise"),x=e("./shared/get-venmo-url"),N=e("./shared/web-login-backdrop"),I=e("../lib/snake-case-to-camel-case"),P=e("../lib/url-params"),k=e("./external/"),S=e("./external/queries"),U="3.126.0",q=250,$=3e5;A.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=y()||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 k({url:V.assetsUrl+"/web/"+U+"/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(b,T){return R.request({api:"graphQLApi",data:{query:b,variables:T}}).then(function(_){return _.data})},sendEvent:function(b){i.sendEvent(g._createPromise,b)},verifyDomain:h}).then(function(b){return g._venmoDesktopInstance=b,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=q,this._mobilePollingExpiresThreshold=$,this._createPromise=this._createPromise.then(function(R){var V,b,T=g._cannotHaveReturnUrls?"manual-return":"mobile-payment-context",_=R.getConfiguration();return b=N.setupDesktopWebLogin({assetsUrl:_.gatewayConfiguration.assetsUrl,debug:_.isDebug}).then(function(O){g._frameServiceInstance=O}).catch(function(O){return O}),g._mobilePollingContextEnvironment=_.gatewayConfiguration.environment.toUpperCase(),V=g._createVenmoPaymentContext(R).then(function(){return i.sendEvent(g._createPromise,"venmo."+T+".presented"),R}).catch(function(O){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:z(O)?O.details.originalError[0].message:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.message,details:{originalError:O}}))}),A.all([b,V]).then(function(O){var M=O[1];return Promise.resolve(M)}).catch(function(O){return Promise.reject(O)})}))}function z(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,b,T=E.getConfiguration(),_=T.gatewayConfiguration.payWithVenmo,O=!1,M=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"}),b={subTotalAmount:this._subTotalAmount,discountAmount:this._discountAmount,taxAmount:this._taxAmount,shippingAmount:this._shippingAmount,totalAmount:this._totalAmount,lineItems:this._lineItems},O=Object.keys(b).some(function(C){return b[C]!==void 0}),V=E.request({api:"graphQLApi",data:{query:S.CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{paymentMethodUsage:this._paymentMethodUsage,intent:"CONTINUE",customerClient:M,isFinalAmount:this._isFinalAmount,displayName:this._displayName,paysheetDetails:{collectCustomerBillingAddress:this._collectCustomerBillingAddress,collectCustomerShippingAddress:this._collectCustomerShippingAddress,transactionDetails:O?b:void 0}}}}}).then(function(C){return C.data.createVenmoPaymentContext.venmoPaymentContext})}return V.then(function(C){var j=new Date(C.expiresAt)-new Date(C.createdAt),Q=j*.6666;clearTimeout(R._refreshPaymentContextTimeout),R._refreshPaymentContextTimeout=setTimeout(function(){R._tokenizationInProgress||R._createVenmoPaymentContext(E,!0)},Q),!(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){H()?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"),y()?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"),l.doesNotSupportWindowOpenInIos()||this._shouldUseRedirectStrategy()||this._mobileWebFallBack&&l.isAndroid()&&l.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,""),b=g.gatewayConfiguration.payWithVenmo,T=g.analyticsMetadata,_=b.accessToken,O={_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/"+U+"/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||b.merchantId,R.braintree_access_token=_,R.braintree_environment=b.environment,R.braintree_sdk_data=btoa(JSON.stringify(O)),x({useAllowDesktopWebLogin:this._useAllowDesktopWebLogin,mobileWebFallBack:this._mobileWebFallBack})+"?"+u.stringify(R)}.bind(this))},F.prototype.isBrowserSupported=function(){return s.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=B(E),R=P.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!(l.isIos()||l.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(b){return g._createVenmoPaymentContext(b)}).then(function(){return g._tokenizationInProgress=!1,g._venmoWindow=null,D(V)})}).catch(function(V){return g._createPromise.then(function(b){return g._createVenmoPaymentContext(b)}).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 A,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=o({},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?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(b,T){E<g._maxRetryCount?(E++,g._checkPaymentContextStatusAndProcessResult(E).then(b).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,b){setTimeout(function(){E._pollForStatusChange().then(V).catch(b)},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 A,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 l.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 A,this._previousHash=window.location.hash;function b(T){var _;g.processHashChangeFlowResults(T).catch(function(O){_=O}).then(function(O){!g._ignoreHistoryChanges&&window.location.hash!==g._previousHash&&(window.location.hash=g._previousHash),g._removeVisibilityEventListener(),_?g._tokenizePromise.reject(_):g._tokenizePromise.resolve(O),delete g._tokenizePromise})}return this._onHashChangeListener=function(T){var _=T.newURL.split("#")[1];g._hasTokenizationResult(_)&&(R=!0,clearTimeout(V),b(_))},window.addEventListener("hashchange",this._onHashChangeListener,!1),this._visibilityChangeListener=function(){var T=E.processResultsDelay||c.DEFAULT_PROCESS_RESULTS_DELAY;window.document.hidden||(g._venmoWindow&&!g._venmoWindow.closed&&g._venmoWindow.close(),R||(V=setTimeout(b,T)))},this.getUrl().then(function(T){return g.appSwitch(T),setTimeout(function(){window.document.addEventListener(Y(),g._visibilityChangeListener)},c.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 A,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(Y(),this._visibilityChangeListener),delete this._visibilityChangeListener,delete this._onHashChangeListener},F.prototype.processHashChangeFlowResults=function(E){var g=this,R=B(E);return new Promise(function(V,b){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"),b(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"),b(new v(d.VENMO_APP_CANCELED))):(i.sendEvent(g._createPromise,"venmo.appswitch.cancel-or-unavailable"),b(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"),b(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 B(E){var g=(E||window.location.hash.substring(1)).split("&"),R=g.reduce(function(V,b){var T=b.split("="),_=decodeURIComponent(T[0]).replace(/\W/g,""),O=I(_),M=decodeURIComponent(T[1]);return V[O]=M,V},{});return R.resourceId&&(R.id=R.resourceId),R}function Z(E){return E=E||"","@"+E.replace("@","")}function D(E){var g={nonce:E.paymentMethodNonce,type:"VenmoAccount",details:{username:Z(E.username),paymentContextId:E.id}};return E.payerInfo&&(g.details.payerInfo=E.payerInfo,g.details.payerInfo.userName=Z(E.payerInfo.userName)),g}function Y(){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 H(){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)})}(Rr)),Rr.exports}var jc=Uc();const zc=Cr(jc);class Bc{constructor(){w(this,"client",null);w(this,"venmoInstance",null);w(this,"deviceData",null)}init(t){return W(this,null,function*(){try{this.client=yield Dc.create({authorization:t.authorization});try{const e=yield Fc.create({client:this.client,paypal:!0});this.deviceData=e.deviceData||null}catch(e){console.warn("Braintree device data collection failed:",e),this.deviceData=null}}catch(e){throw console.error("Failed to initialize Braintree client:",e),e}})}createVenmo(t){return W(this,null,function*(){if(!this.client)throw new Error("Braintree client must be initialized before creating Venmo instance");try{return this.venmoInstance=yield zc.create(K({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 W(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(K({},a),{device_data:this.deviceData||void 0}),o=a,s=(o==null?void 0:o.billingAddress)||(o==null?void 0:o.billing_address);if(s){const l={city:s.adminArea2,country:s.countryCode,line1:s.line1,line2:s.line2,postal_code:s.postalCode,state:s.adminArea1};i.billing_address=l}t(i)}})})})}}class Bi{constructor(){w(this,"ev",new Gi);w(this,"paypal",new Rc);w(this,"braintree",new Bc);w(this,"state",{translate:new Ec,checkout:new uc,transaction:new fc,styles:new hc});w(this,"checkout",new cc({state:this.state,service:{ev:this.ev,paypal:this.paypal,braintree:this.braintree}}))}clearState(){Object.values(this.state).forEach(t=>t.clearState())}}const Kc=Object.freeze(Object.defineProperty({__proto__:null,Core:Bi},Symbol.toStringTag,{value:"Module"}));ne.Core=Bi,ne.PayNextCheckout=_e,ne.PaymentMethod=re,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
417
+ </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 S=O.frameServiceInstance,F=O.venmoUrl,W=O.checkForStatusChange,G=O.cancelTokenization,U=O.checkPaymentContextStatus,j=new o;return document.getElementById(m.continueButton).addEventListener("click",function(){S.focus()}),document.getElementById(m.cancelButton).addEventListener("click",function(){S.close(),G(),A()}),S.open({},function(z){var J=1;z?j.reject(z):W(J).then(function(M){j.resolve(M)}).catch(function(M){U().then(function($){$.status==="CREATED"?j.reject(new l(c.VENMO_CUSTOMER_CANCELED)):j.reject(M)})}),S.close(),A()}),S.redirect(F),j}function y(){var O=Math.round((window.outerHeight-f)/2)+window.screenTop,S=Math.round((window.outerWidth-p)/2)+window.screenLeft;return{top:O,left:S}}function A(){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);","}"],S=["#"+m.backdropContainer+" {","display: flex;","align-content: center;","justify-content: center;","align-items: center;","width: 100%;","height: 100%;","flex-direction: column;","}"],F=["#"+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;","}"],G=["#"+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;","}"],U=["#"+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(S,F,W,G,U);return j.join(`
418
+ `)}function N(O){var S=document.getElementById(m.backdrop),F,W,G,U,j,z,J,M;if(S){S.classList.remove("hidden");return}F=document.createElement("style"),W=document.createElement("div"),G=document.createElement("div"),U=document.createElement("div"),j=document.createElement("div"),z=document.createElement("div"),J=document.createElement("button"),M=document.createElement("button"),O&&(F.nonce=O),F.id="venmo-desktop-web__injected-styles",F.innerHTML=x(),W.id=m.backdrop,G.id=m.backdropContainer,U.id=m.venmoLogo,U.innerHTML=u,j.id=m.message,j.innerText="What would you like to do?",z.id=m.instructions,z.innerText=h,J.id=m.continueButton,J.innerText="Continue payment",M.id=m.cancelButton,M.innerText="Cancel payment",document.head.appendChild(F),G.appendChild(U),G.appendChild(j),G.appendChild(z),G.appendChild(J),G.appendChild(M),W.appendChild(G),document.body.appendChild(W),W.addEventListener("click",function($){$.stopPropagation()})}function I(O){return N(O.styleCspNonce),v(O)}function P(O){var S=new o,F="venmoDesktopWebLogin",W=O.assetsUrl,G=O.debug||!1,U=y(),j=W+"/web/"+d+"/html";return i.create({name:F,dispatchFrameUrl:j+"/dispatch-frame"+s(G)+".html",openFrameUrl:j+"/venmo-landing-frame"+s(G)+".html",top:U.top,left:U.left,height:f,width:p},function(z){S.resolve(z)}),S}r.exports={runWebLogin:I,openPopup:v,setupDesktopWebLogin:P,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,r,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"),y=e("../lib/in-iframe"),A=e("@braintree/extended-promise"),x=e("./shared/get-venmo-url"),N=e("./shared/web-login-backdrop"),I=e("../lib/snake-case-to-camel-case"),P=e("../lib/url-params"),O=e("./external/"),S=e("./external/queries"),F="3.126.0",W=250,G=3e5;A.suppressUnhandledPromiseMessage=!0;function U(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=y()||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(k){var V=k.getConfiguration().gatewayConfiguration;return O({url:V.assetsUrl+"/web/"+F+"/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(b,T){return k.request({api:"graphQLApi",data:{query:b,variables:T}}).then(function(_){return _.data})},sendEvent:function(b){i.sendEvent(g._createPromise,b)},verifyDomain:h}).then(function(b){return g._venmoDesktopInstance=b,i.sendEvent(g._createPromise,"venmo.desktop-flow.presented"),k}).catch(function(){return i.sendEvent(g._createPromise,"venmo.desktop-flow.setup-failed"),g._useDesktopQRFlow=!1,k})}):this._shouldCreateVenmoPaymentContext&&(this._mobilePollingInterval=W,this._mobilePollingExpiresThreshold=G,this._createPromise=this._createPromise.then(function(k){var V,b,T=g._cannotHaveReturnUrls?"manual-return":"mobile-payment-context",_=k.getConfiguration();return b=N.setupDesktopWebLogin({assetsUrl:_.gatewayConfiguration.assetsUrl,debug:_.isDebug}).then(function(L){g._frameServiceInstance=L}).catch(function(L){return L}),g._mobilePollingContextEnvironment=_.gatewayConfiguration.environment.toUpperCase(),V=g._createVenmoPaymentContext(k).then(function(){return i.sendEvent(g._createPromise,"venmo."+T+".presented"),k}).catch(function(L){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(L)?L.details.originalError[0].message:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.message,details:{originalError:L}}))}),A.all([b,V]).then(function(L){var D=L[1];return Promise.resolve(D)}).catch(function(L){return Promise.reject(L)})}))}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"}U.prototype._createVenmoPaymentContext=function(E,g){var k=this,V,b,T=E.getConfiguration(),_=T.gatewayConfiguration.payWithVenmo,L=!1,D=k._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"}),b={subTotalAmount:this._subTotalAmount,discountAmount:this._discountAmount,taxAmount:this._taxAmount,shippingAmount:this._shippingAmount,totalAmount:this._totalAmount,lineItems:this._lineItems},L=Object.keys(b).some(function(C){return b[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:L?b:void 0}}}}}).then(function(C){return C.data.createVenmoPaymentContext.venmoPaymentContext})}return V.then(function(C){var B=new Date(C.expiresAt)-new Date(C.createdAt),X=B*.6666;clearTimeout(k._refreshPaymentContextTimeout),k._refreshPaymentContextTimeout=setTimeout(function(){k._tokenizationInProgress||k._createVenmoPaymentContext(E,!0)},X),!(g&&k._tokenizationInProgress)&&(k._venmoPaymentContextStatus=C.status,k._venmoPaymentContextId=C.id)})},U.prototype._popupBridgeIsInstalled=function(){return window.popupBridge&&typeof window.popupBridge.open=="function"},U.prototype._venmoNativeAppIsInstalled=function(){return!!(window.popupBridge&&(window.parent&&window.parent.popupBridge.isVenmoInstalled||window.popupBridge.isVenmoInstalled))},U.prototype._handleDeepLinkAppSwitch=function(E){H()?this._handleIosWebviewDeepLink(E):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(E):(i.sendEvent(this._createPromise,"venmo.appswitch.start.webview"),this._venmoWindow=window.open(E))},U.prototype._handleIosWebviewDeepLink=function(E){i.sendEvent(this._createPromise,"venmo.appswitch.start.ios-webview"),y()?this._handleIosWebviewInIframe(E):!this._venmoNativeAppIsInstalled()&&this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(E):window.location.href=E},U.prototype._handleIosWebviewInIframe=function(E){this._venmoNativeAppIsInstalled()?this._handleIFrameBreakout(E):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(E):this._handleIFrameBreakout(E)},U.prototype._handlePopupBridgeAppSwitch=function(E){i.sendEvent(this._createPromise,"venmo.appswitch.start.popup-bridge"),window.popupBridge.open(E)},U.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)},U.prototype._handleIFrameBreakout=function(E){window.top.location.href=E},U.prototype.appSwitch=function(E){this._deepLinkReturnUrl?this._handleDeepLinkAppSwitch(E):this._handleBrowserAppSwitch(E)},U.prototype.getUrl=function(){return this._createPromise.then(function(E){var g=E.getConfiguration(),k={},V=this._deepLinkReturnUrl||window.location.href.replace(window.location.hash,""),b=g.gatewayConfiguration.payWithVenmo,T=g.analyticsMetadata,_=b.accessToken,L={_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:k.resource_id=this._venmoPaymentContextId),this._shouldIncludeReturnUrls()||this._useAllowDesktopWebLogin?(this._useAllowDesktopWebLogin&&(V=this._assetsUrl+"/web/"+F+"/html/redirect-frame.html"),k["x-success"]=V+"#venmoSuccess=1",k["x-cancel"]=V+"#venmoCancel=1",k["x-error"]=V+"#venmoError=1"):(k["x-success"]="NOOP",k["x-cancel"]="NOOP",k["x-error"]="NOOP"),this._allowAndroidRecreation?k.allowAndroidRecreation=1:k.allowAndroidRecreation=0,k.ua=window.navigator.userAgent,k.braintree_merchant_id=this._profileId||b.merchantId,k.braintree_access_token=_,k.braintree_environment=b.environment,k.braintree_sdk_data=btoa(JSON.stringify(L)),x({useAllowDesktopWebLogin:this._useAllowDesktopWebLogin,mobileWebFallBack:this._mobileWebFallBack})+"?"+u.stringify(k)}.bind(this))},U.prototype.isBrowserSupported=function(){return o.isBrowserSupported({allowNewBrowserTab:this._allowNewBrowserTab,allowWebviews:this._allowWebviews,allowDesktop:this._allowDesktop,allowDesktopWebLogin:this._allowDesktopWebLogin})},U.prototype.hasTokenizationResult=function(){return this._hasTokenizationResult()},U.prototype._hasTokenizationResult=function(E){var g=z(E),k=P.getUrlParams();return k.resource_id?this._venmoPaymentContextId=k.resource_id:g.id&&(this._venmoPaymentContextId=g.id),typeof(g.venmoSuccess||g.venmoError||g.venmoCancel)!="undefined"},U.prototype._shouldIncludeReturnUrls=function(){return this._deepLinkReturnUrl?!0:!this._cannotHaveReturnUrls},U.prototype._isDesktop=function(){return!(c.isIos()||c.isAndroid())},U.prototype.tokenize=function(E){var g=this,k;return E=E||{},this._tokenizationInProgress===!0?Promise.reject(new v(d.VENMO_TOKENIZATION_REQUEST_ACTIVE)):(this._tokenizationInProgress=!0,this._useDesktopQRFlow?k=this._tokenizeForDesktopQRFlow(E):this._useAllowDesktopWebLogin?k=this._tokenizeWebLoginWithRedirect(E):this._cannotHaveReturnUrls?k=this._tokenizeForMobileWithManualReturn():k=this._tokenizeForMobileWithHashChangeListeners(E),k.then(function(V){return g._createPromise.then(function(b){return g._createVenmoPaymentContext(b)}).then(function(){return g._tokenizationInProgress=!1,g._venmoWindow=null,M(V)})}).catch(function(V){return g._createPromise.then(function(b){return g._createVenmoPaymentContext(b)}).then(function(){return g._tokenizationInProgress=!1,g._venmoWindow=null,Promise.reject(V)})}))},U.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))},U.prototype._tokenizeWebLoginWithRedirect=function(){var E=this,g;return i.sendEventPlus(E._createPromise,"venmo.tokenize.web-login.start",{context_id:E._venmoPaymentContextId}),this._tokenizePromise=new A,this.getUrl().then(function(k){return g={checkForStatusChange:E._checkPaymentContextStatusAndProcessResult.bind(E),cancelTokenization:E.cancelTokenization.bind(E),frameServiceInstance:E._frameServiceInstance,venmoUrl:k,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})},U.prototype._queryPaymentContextStatus=function(E){var g=this;return this._createPromise.then(function(k){var V=g._shouldUseLegacyFlow?S.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:S.VENMO_PAYMENT_CONTEXT_STATUS_QUERY;return k.request({api:"graphQLApi",data:{query:V,variables:{id:E}}})}).then(function(k){return k.data.node})},U.prototype._checkPaymentContextStatusAndProcessResult=function(E){var g=this;return g._checkPaymentContextStatus().then(function(k){var V=k.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(k);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(b,T){E<g._maxRetryCount?(E++,g._checkPaymentContextStatusAndProcessResult(E).then(b).catch(T)):T(new v(d.VENMO_TOKENIZATION_FAILED))})})},U.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)})},U.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 k=g.status;if(k!==E._venmoPaymentContextStatus)switch(E._venmoPaymentContextStatus=k,i.sendEventPlus(E._createPromise,"venmo.tokenize.manual-return.status-change."+k.toLowerCase(),{context_id:E._venmoPaymentContextId}),k){case"EXPIRED":case"FAILED":case"CANCELED":return Promise.reject(new v(d["VENMO_MOBILE_POLLING_TOKENIZATION_"+k]));case"APPROVED":return Promise.resolve(g)}return new Promise(function(V,b){setTimeout(function(){E._pollForStatusChange().then(V).catch(b)},E._mobilePollingInterval)})}):Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID))},U.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 A,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})},U.prototype._shouldUseRedirectStrategy=function(){return c.isIos()?this._mobileWebFallBack===!0?!0:this._useRedirectForIOS:!1},U.prototype._tokenizeForMobileWithHashChangeListeners=function(E){var g=this,k,V;if(this.hasTokenizationResult())return this.processHashChangeFlowResults();i.sendEvent(this._createPromise,"venmo.tokenize.mobile.start"),this._tokenizePromise=new A,this._previousHash=window.location.hash;function b(T){var _;g.processHashChangeFlowResults(T).catch(function(L){_=L}).then(function(L){!g._ignoreHistoryChanges&&window.location.hash!==g._previousHash&&(window.location.hash=g._previousHash),g._removeVisibilityEventListener(),_?g._tokenizePromise.reject(_):g._tokenizePromise.resolve(L),delete g._tokenizePromise})}return this._onHashChangeListener=function(T){var _=T.newURL.split("#")[1];g._hasTokenizationResult(_)&&(k=!0,clearTimeout(V),b(_))},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(),k||(V=setTimeout(b,T)))},this.getUrl().then(function(T){return g.appSwitch(T),setTimeout(function(){window.document.addEventListener($(),g._visibilityChangeListener)},l.DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY),g._tokenizePromise})},U.prototype._tokenizeForDesktopQRFlow=function(){var E=this;return i.sendEvent(this._createPromise,"venmo.tokenize.desktop.start"),this._tokenizePromise=new A,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},U.prototype._cancelMobilePaymentContext=function(){var E=this;return this._createPromise.then(function(g){var k;return E._venmoPaymentContextId?(k=E._shouldUseLegacyFlow?S.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:S.UPDATE_PAYMENT_CONTEXT_QUERY,g.request({api:"graphQLApi",data:{query:k,variables:{input:{id:E._venmoPaymentContextId,status:"CANCELED"}}}})):Promise.resolve()})},U.prototype._cancelVenmoDesktopContext=function(){var E=this;return this._createPromise.then(function(){return E._venmoDesktopInstance&&E._venmoDesktopInstance.updateVenmoDesktopPaymentContext("CANCELED"),Promise.resolve()})},U.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(U.prototype))}.bind(this))},U.prototype._removeVisibilityEventListener=function(){window.removeEventListener("hashchange",this._onHashChangeListener),window.document.removeEventListener($(),this._visibilityChangeListener),delete this._visibilityChangeListener,delete this._onHashChangeListener},U.prototype.processHashChangeFlowResults=function(E){var g=this,k=z(E);return new Promise(function(V,b){g._shouldUseLegacyFlow?k.venmoSuccess?(i.sendEvent(g._createPromise,"venmo.appswitch.handle.success"),window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:succeeded"),V(k)):k.venmoError?(i.sendEvent(g._createPromise,"venmo.appswitch.handle.error"),window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:failed"),b(new v({type:d.VENMO_APP_FAILED.type,code:d.VENMO_APP_FAILED.code,message:d.VENMO_APP_FAILED.message,details:{originalError:{message:decodeURIComponent(k.errorMessage),code:k.errorCode}}}))):k.venmoCancel?(i.sendEvent(g._createPromise,"venmo.appswitch.handle.cancel"),window.popupBridge&&i.sendEvent(g._createPromise,"popup-bridge:venmo:canceled"),b(new v(d.VENMO_APP_CANCELED))):(i.sendEvent(g._createPromise,"venmo.appswitch.cancel-or-unavailable"),b(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"),b(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(k)}),g._clearFragmentParameters()})},U.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 z(E){var g=(E||window.location.hash.substring(1)).split("&"),k=g.reduce(function(V,b){var T=b.split("="),_=decodeURIComponent(T[0]).replace(/\W/g,""),L=I(_),D=decodeURIComponent(T[1]);return V[L]=D,V},{});return k.resourceId&&(k.id=k.resourceId),k}function J(E){return E=E||"","@"+E.replace("@","")}function M(E){var g={nonce:E.paymentMethodNonce,type:"VenmoAccount",details:{username:J(E.username),paymentContextId:E.id}};return E.payerInfo&&(g.details.payerInfo=E.payerInfo,g.details.payerInfo.userName=J(E.payerInfo.userName)),g}function $(){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 H(){return window.navigator.platform&&/iPhone|iPad|iPod/.test(window.navigator.platform)}r.exports=m.wrapPrototype(U)},{"../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)})}(Pr)),Pr.exports}var Bl=Fl();const jl=_r(Bl);class zl{constructor(){w(this,"client",null);w(this,"venmoInstance",null);w(this,"deviceData",null)}init(t){return Y(this,null,function*(){try{this.client=yield Ml.create({authorization:t.authorization});try{const e=yield Ul.create({client:this.client,paypal:!0});this.deviceData=e.deviceData||null}catch(e){console.warn("Braintree device data collection failed:",e),this.deviceData=null}}catch(e){throw console.error("Failed to initialize Braintree client:",e),e}})}createVenmo(t){return Y(this,null,function*(){if(!this.client)throw new Error("Braintree client must be initialized before creating Venmo instance");try{return this.venmoInstance=yield jl.create(K({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 Y(this,null,function*(){if(!this.venmoInstance)throw new Error("Venmo instance not initialized");return new Promise((t,e)=>{this.venmoInstance.tokenize(void 0,(r,a)=>{if(r)e(r);else{const i=ee(K({},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 ji{constructor(){w(this,"ev",new $i);w(this,"paypal",new kl);w(this,"braintree",new zl);w(this,"state",{translate:new El,checkout:new ul,transaction:new fl,styles:new hl});w(this,"checkout",new ll({state:this.state,service:{ev:this.ev,paypal:this.paypal,braintree:this.braintree}}))}clearState(){Object.values(this.state).forEach(t=>t.clearState())}}const Kl=Object.freeze(Object.defineProperty({__proto__:null,Core:ji},Symbol.toStringTag,{value:"Module"}));ne.Core=ji,ne.PayNextCheckout=be,ne.PaymentMethod=q,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
419
419
  //# sourceMappingURL=index.umd.js.map