@paynext/sdk 0.0.47 → 0.0.49
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/README.md +7 -6
- package/dist/index.d.ts +6 -2
- package/dist/index.es.js +930 -924
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +22 -22
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(ee,re){typeof exports=="object"&&typeof module!="undefined"?re(exports):typeof define=="function"&&define.amd?define(["exports"],re):(ee=typeof globalThis!="undefined"?globalThis:ee||self,re(ee["PayNext TS SDK"]={}))})(this,function(ee){"use strict";var pd=Object.defineProperty,hd=Object.defineProperties;var md=Object.getOwnPropertyDescriptors;var Pt=Object.getOwnPropertySymbols;var Va=Object.prototype.hasOwnProperty,Fa=Object.prototype.propertyIsEnumerable;var Nr=(ee,re,ne)=>re in ee?pd(ee,re,{enumerable:!0,configurable:!0,writable:!0,value:ne}):ee[re]=ne,Q=(ee,re)=>{for(var ne in re||(re={}))Va.call(re,ne)&&Nr(ee,ne,re[ne]);if(Pt)for(var ne of Pt(re))Fa.call(re,ne)&&Nr(ee,ne,re[ne]);return ee},ae=(ee,re)=>hd(ee,md(re));var Ce=(ee,re)=>{var ne={};for(var ge in ee)Va.call(ee,ge)&&re.indexOf(ge)<0&&(ne[ge]=ee[ge]);if(ee!=null&&Pt)for(var ge of Pt(ee))re.indexOf(ge)<0&&Fa.call(ee,ge)&&(ne[ge]=ee[ge]);return ne};var b=(ee,re,ne)=>Nr(ee,typeof re!="symbol"?re+"":re,ne);var z=(ee,re,ne)=>new Promise((ge,He)=>{var kt=ie=>{try{We(ne.next(ie))}catch(Ge){He(Ge)}},Rt=ie=>{try{We(ne.throw(ie))}catch(Ge){He(Ge)}},We=ie=>ie.done?ge(ie.value):Promise.resolve(ie.value).then(kt,Rt);We((ne=ne.apply(ee,re)).next())});var re=document.createElement("style");re.textContent=`._spinner_1waxg_1{height:100%;width:100%}@keyframes _spin_1waxg_1{to{transform:rotate(360deg)}}._spinner_1waxg_1{animation:_spin_1waxg_1 1s linear infinite;fill:#9ca3af;--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}._spinner_1waxg_1:is(._dark_1waxg_1 *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}._spinnerContainer_1waxg_5{height:40px;width:40px}._success_1waxg_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_1waxg_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_1waxg_13:is(._dark_1waxg_1 *){--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._container_1waxg_17{width:30px;height:20px;display:flex;margin:0 1px;align-items:center;justify-content:center}._card_1waxg_26{width:28px;height:19px;display:flex;margin:0 1px;align-items:center;justify-content:center}._warning_1waxg_35{width:16px;height:16px;display:flex;align-items:center;justify-content:center}._svg_1waxg_43{width:100%;height:100%}._srOnly_1waxg_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}._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_1m9xd_1{border-radius:12px;height:40px;overflow:hidden;position:relative;background-color:#000}._applePay_1m9xd_1:hover{filter:contrast(.575) brightness(1.2)}._applePay_1m9xd_1 iframe{width:calc(100% + 12px)!important;height:44px!important;border:none;display:block;transform:translateY(-2px);margin:0 -6px}._hidden_1m9xd_22{display:none!important}._googlePay_1j5ka_1{border-radius:12px;height:40px;overflow:hidden;background-color:#000}._googlePay_1j5ka_1 iframe{width:100%!important;height:44px!important;border:none!important;border-radius:12px!important;display:block;transform:translateY(-2px)}._hidden_1j5ka_17{display:none!important}._paypal_1al9c_1{overflow:hidden;border-radius:12px;height:40px;background-color:#ffc439}._hidden_1al9c_8{display:none}._button_1br9w_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_1br9w_1{transition-property:none}}._button_1br9w_1 span{margin-left:.25rem}._button_1br9w_1:hover{opacity:.7}._press_1br9w_21{transform:scale(.95)}._venmo_10t25_1{overflow:hidden;border-radius:12px;height:40px;background-color:#2b67bc;width:100%;color:#fff;font-size:16px;text-align:center;cursor:pointer;transition:background-color .3s ease;&:hover{background-color:#5683c1}}._hidden_10t25_17{display:none}._button_125my_1{cursor:pointer}._button_rx9be_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_rx9be_1{transition-property:none}}._button_rx9be_1 span{margin-left:.25rem}._disabled_rx9be_17,._button_rx9be_1:hover{opacity:.7}._press_rx9be_22{transform:scale(.95)}._hidden_rx9be_26{display:none!important}._spinner_rx9be_30{width:24px;height:24px}._cardForm_isqbi_1{display:grid;gap:.75rem;padding-top:0}._hidden_isqbi_5{display:none!important}._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_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))}._container_hoha1_1{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center}._title_hoha1_5{margin-top:.5rem;font-weight:300}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(re);let ne=null;function ge(){return z(this,null,function*(){return ne||(ne=new Promise((r,e)=>{const t=document.createElement("script");if(t.src="https://js.evervault.com/v2",t.onload=()=>r(),t.onerror=()=>{ne=null,e()},!document.head)throw new Error("Expected document.head not to be null. Evervault.js requires a <head> element.");document.head.appendChild(t)}),ne)})}function He(){return z(this,null,function*(){if(window.Evervault)return window.Evervault;try{return yield ge(),window.Evervault}catch(r){throw new Error("Failed to load Evervault.js")}})}function kt(r,e,t){return z(this,null,function*(){const n=yield He();return new n(r,e,t)})}Promise.resolve().then(()=>{He()});let Rt=class{constructor(e){b(this,"apple",null);b(this,"isAvailable",!1);b(this,"onReady");this.ev=e}init(l){return z(this,arguments,function*({transaction:e,locale:t,supportedCardTypes:n,onReady:i,onError:a,onSuccess:s,onCancel:o}){const c=this.ev.transactions.create(e);this.apple=this.ev.ui.applePay(c,{locale:t,borderRadius:12,size:{width:"100%",height:"40px"},allowedCardNetworks:n,requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(p,m)=>z(this,[p,m],function*(u,{fail:h}){try{s==null||s(u)}catch(f){console.error(f),h({message:"Cannot pay with payment credentials"})}})});const d=yield this.apple.availability();this.isAvailable=!0,console.log("Apple Pay availability",d),this.isAvailable||console.error("Apple Pay is not available",d),a&&this.apple.on("error",a),o&&this.apple.on("cancel",o),this.onReady=i})}render(e){return z(this,null,function*(){var t;!this.apple||!this.isAvailable||(e.innerHTML="",yield this.apple.mount(e),(t=this.onReady)==null||t.call(this))})}},We=class{constructor(e){b(this,"google",null);this.ev=e}init(o){return z(this,arguments,function*({transaction:e,locale:t,onReady:n,onError:i,onSuccess:a,onCancel:s}){const l=this.ev.transactions.create(e);this.google=this.ev.ui.googlePay(l,{locale:t,size:{width:"100%",height:"42px"},borderRadius:12,billingAddress:{phoneNumber:!0},process:(u,h)=>z(this,[u,h],function*(c,{fail:d}){try{a==null||a(c)}catch(p){console.error(p),d({message:"Cannot pay with payment credentials"})}})}),s&&this.google.on("cancel",s),n&&this.google.on("ready",n),i&&this.google.on("error",i)})}render(e){return z(this,null,function*(){this.google&&(e.innerHTML="",this.google.mount(e))})}};class ie{constructor(){b(this,"listeners",[])}removeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}addListener(e){return this.listeners.push(e),()=>this.removeListener(e)}emit(e){for(const t of this.listeners)t(e)}clear(){this.listeners=[]}}class Ge{constructor(e){b(this,"threeDs",null);this.ev=e}init(a){return z(this,arguments,function*({threeDsId:e,onReady:t,onSuccess:n,onError:i}){this.threeDs=this.ev.ui.threeDSecure(e),this.threeDs.on("ready",()=>t==null?void 0:t()),this.threeDs.on("success",()=>n==null?void 0:n()),this.threeDs.on("failure",()=>i==null?void 0:i()),this.threeDs.on("error",()=>i==null?void 0:i())})}render(e){return z(this,null,function*(){this.threeDs&&this.threeDs.mount(e)})}}class Ua{constructor(){b(this,"isReady",!1);b(this,"ev",null);b(this,"apple",null);b(this,"google",null);b(this,"threeDs",null);b(this,"events",{ready:new ie})}isShouldLoad({teamId:e,appId:t}){var n,i;return((n=this.ev)==null?void 0:n.config.appId)!==t||((i=this.ev)==null?void 0:i.config.teamId)!==e}initEv(e){return z(this,null,function*(){this.isShouldLoad(e)&&(this.isReady=!1,this.ev=yield kt(e.teamId,e.appId),this.apple=new Rt(this.ev),this.google=new We(this.ev),this.events.ready.emit(),this.isReady=!0)})}initThreeDs(e){return z(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new Ge(this.ev),yield this.threeDs.init(e),yield this.threeDs.render()})}initApple(e){return z(this,null,function*(){if(!this.apple)throw new Error("Evervault should be init before using Apple Pay");yield this.apple.init(e)})}initGoogle(e){return z(this,null,function*(){if(!this.google)throw new Error("Evervault should be init before using Google Pay");yield this.google.init(e)})}isAppleAvailable(){var e;return!!((e=this.apple)!=null&&e.isAvailable)}addEventListener(e,t){return this.events[e].addListener(t)}renderApple(e){return z(this,null,function*(){var t;return yield(t=this.apple)==null?void 0:t.render(e)})}renderGoogle(e){return z(this,null,function*(){var t;return yield(t=this.google)==null?void 0:t.render(e)})}getEv(){if(!this.ev)throw new Error("Evervault should be init before getting instance");return this.ev}}function St(r){return typeof r=="object"&&!Array.isArray(r)}function Ba(r,e,t){var n;if(r instanceof EventTarget)return[r];if(typeof r=="string"){let i=document;const a=(n=t==null?void 0:t[r])!=null?n:i.querySelectorAll(r);return a?Array.from(a):[]}return Array.from(r)}function Lr(r,e,t,n){return typeof r=="string"&&St(e)?Ba(r,t,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function ja(r,e,t){return r*(e+1)}function Pr(r,e,t,n){var i;return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,r+parseFloat(e)):e==="<"?t:(i=n.get(e))!=null?i:r}const Ye=(r,e,t)=>r+(e-r)*t,za=(r,e,t)=>{const n=e-r;return((t-r)%n+n)%n+r},kr=r=>Array.isArray(r)&&typeof r[0]!="number";function Rr(r,e){return kr(r)?r[za(0,r.length,e)]:r}function Ka(r,e){r.indexOf(e)===-1&&r.push(e)}function Sr(r,e){const t=r.indexOf(e);t>-1&&r.splice(t,1)}function qa(r,e,t){for(let n=0;n<r.length;n++){const i=r[n];i.at>e&&i.at<t&&(Sr(r,i),n--)}}function Ha(r,e,t,n,i,a){qa(r,i,a);for(let s=0;s<e.length;s++)r.push({value:e[s],at:Ye(i,a,n[s]),easing:Rr(t,s)})}function Wa(r,e){for(let t=0;t<r.length;t++)r[t]=r[t]/(e+1)}function Ga(r,e){return r.at===e.at?r.value===null?1:e.value===null?-1:0:r.at-e.at}const fe=r=>!!(r&&r.getVelocity),Mt=(r,e,t)=>{const n=e-r;return n===0?1:(t-r)/n};function Mr(r,e){const t=r[r.length-1];for(let n=1;n<=e;n++){const i=Mt(0,e,n);r.push(Ye(t,1,i))}}function Dr(r){const e=[0];return Mr(e,r.length-1),e}function Dt(r){return typeof r=="function"&&"applyToOptions"in r}const _t=2e4;function Vt(r){let e=0;const t=50;let n=r.next(e);for(;!n.done&&e<_t;)e+=t,n=r.next(e);return e>=_t?1/0:e}const Ee=r=>r*1e3,Te=r=>r/1e3;function Vr(r,e=100,t){const n=t(ae(Q({},r),{keyframes:[0,e]})),i=Math.min(Vt(n),_t);return{type:"keyframes",ease:a=>n.next(i*a).value/e,duration:Te(i)}}let $e=()=>{},Ae=()=>{};process.env.NODE_ENV!=="production"&&($e=(r,e)=>{!r&&typeof console!="undefined"&&console.warn(e)},Ae=(r,e)=>{if(!r)throw new Error(e)});const Ya="easeInOut",$a=20;function Qa(r,a={},n,i){var s=a,{defaultTransition:e={}}=s,t=Ce(s,["defaultTransition"]);const o=e.duration||.3,l=new Map,c=new Map,d={},u=new Map;let h=0,p=0,m=0;for(let f=0;f<r.length;f++){const v=r[f];if(typeof v=="string"){u.set(v,p);continue}else if(!Array.isArray(v)){u.set(v.name,Pr(p,v.at,h,u));continue}let[y,T,A={}]=v;A.at!==void 0&&(p=Pr(p,A.at,h,u));let N=0;const w=(I,L,S,B=0,G=0)=>{const q=Za(I),V=L,{delay:M=0,times:F=Dr(q),type:K="keyframes",repeat:J,repeatType:R,repeatDelay:W=0}=V,j=Ce(V,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:g=e.ease||"easeOut",duration:_}=L;const k=typeof M=="function"?M(B,G):M,U=q.length,E=Dt(K)?K:i==null?void 0:i[K];if(U<=2&&E){let O=100;if(U===2&&es(q)){const le=q[1]-q[0];O=Math.abs(le)}const H=Q({},j);_!==void 0&&(H.duration=Ee(_));const X=Vr(H,O,E);g=X.ease,_=X.duration}_!=null||(_=o);const x=p+k;F.length===1&&F[0]===0&&(F[1]=1);const C=F.length-q.length;if(C>0&&Mr(F,C),q.length===1&&q.unshift(null),J){Ae(J<$a,"Repeat count too high, must be less than 20"),_=ja(_,J);const O=[...q],H=[...F];g=Array.isArray(g)?[...g]:[g];const X=[...g];for(let le=0;le<J;le++){q.push(...O);for(let D=0;D<O.length;D++)F.push(H[D]+(le+1)),g.push(D===0?"linear":Rr(X,D-1))}Wa(F,J)}const P=x+_;Ha(S,q,g,F,x,P),N=Math.max(k+_,N),m=Math.max(P,m)};if(fe(y)){const I=Fr(y,c);w(T,A,Ur("default",I))}else{const I=Lr(y,T,n,d),L=I.length;for(let S=0;S<L;S++){T=T,A=A;const B=I[S],G=Fr(B,c);for(const q in T)w(T[q],Xa(A,q),Ur(q,G),S,L)}}h=p,p+=N}return c.forEach((f,v)=>{for(const y in f){const T=f[y];T.sort(Ga);const A=[],N=[],w=[];for(let L=0;L<T.length;L++){const{at:S,value:B,easing:G}=T[L];A.push(B),N.push(Mt(0,m,S)),w.push(G||"easeOut")}N[0]!==0&&(N.unshift(0),A.unshift(A[0]),w.unshift(Ya)),N[N.length-1]!==1&&(N.push(1),A.push(null)),l.has(v)||l.set(v,{keyframes:{},transition:{}});const I=l.get(v);I.keyframes[y]=A,I.transition[y]=Q(ae(Q({},e),{duration:m,ease:w,times:N}),t)}}),l}function Fr(r,e){return!e.has(r)&&e.set(r,{}),e.get(r)}function Ur(r,e){return e[r]||(e[r]=[]),e[r]}function Za(r){return Array.isArray(r)?r:[r]}function Xa(r,e){return r&&r[e]?Q(Q({},r),r[e]):Q({},r)}const Ja=r=>typeof r=="number",es=r=>r.every(Ja),Qe=new WeakMap,ts=r=>Array.isArray(r);function Br(r){const e=[{},{}];return r==null||r.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function jr(r,e,t,n){if(typeof e=="function"){const[i,a]=Br(n);e=e(t!==void 0?t:r.custom,i,a)}if(typeof e=="string"&&(e=r.variants&&r.variants[e]),typeof e=="function"){const[i,a]=Br(n);e=e(t!==void 0?t:r.custom,i,a)}return e}function rs(r,e,t){const n=r.getProps();return jr(n,e,n.custom,r)}const Et=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ns(r,e){let t=new Set,n=new Set,i=!1,a=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(d){s.has(d)&&(c.schedule(d),r()),d(o)}const c={schedule:(d,u=!1,h=!1)=>{const m=h&&i?t:n;return u&&s.add(d),m.has(d)||m.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(o=d,i){a=!0;return}i=!0,[t,n]=[n,t],t.forEach(l),t.clear(),i=!1,a&&(a=!1,c.process(d))}};return c}const Ie={},is=40;function as(r,e){let t=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>t=!0,s=Et.reduce((A,N)=>(A[N]=ns(a),A),{}),{setup:o,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:p,postRender:m}=s,f=()=>{const A=Ie.useManualTiming?i.timestamp:performance.now();t=!1,Ie.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(A-i.timestamp,is),1)),i.timestamp=A,i.isProcessing=!0,o.process(i),l.process(i),c.process(i),d.process(i),u.process(i),h.process(i),p.process(i),m.process(i),i.isProcessing=!1,t&&e&&(n=!1,r(f))},v=()=>{t=!0,n=!0,i.isProcessing||r(f)};return{schedule:Et.reduce((A,N)=>{const w=s[N];return A[N]=(I,L=!1,S=!1)=>(t||v(),w.schedule(I,L,S)),A},{}),cancel:A=>{for(let N=0;N<Et.length;N++)s[Et[N]].cancel(A)},state:i,steps:s}}const Me=r=>r,{schedule:xe,cancel:Ft,state:Ct}=as(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:Me,!0);let wt;function ss(){wt=void 0}const be={now:()=>(wt===void 0&&be.set(Ct.isProcessing||Ie.useManualTiming?Ct.timestamp:performance.now()),wt),set:r=>{wt=r,queueMicrotask(ss)}},zr=new Set;function Kr(r,e,t){r||zr.has(e)||(console.warn(e),zr.add(e))}class qr{constructor(){this.subscriptions=[]}add(e){return Ka(this.subscriptions,e),()=>Sr(this.subscriptions,e)}notify(e,t,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,t,n);else for(let a=0;a<i;a++){const s=this.subscriptions[a];s&&s(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Hr(r,e){return e?r*(1e3/e):0}const Wr=30,os=r=>!isNaN(parseFloat(r));class ls{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{var s,o;const a=be.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();i&&((o=this.events.renderRequest)==null||o.notify(this.current))},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=be.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=os(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Kr(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new qr);const n=this.events[e].add(t);return e==="change"?()=>{n(),xe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Wr)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,Wr);return Hr(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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 e,t;(e=this.dependents)==null||e.clear(),(t=this.events.destroy)==null||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ze(r,e){return new ls(r,e)}function cs(r,e,t){r.hasValue(e)?r.getValue(e).set(t):r.addValue(e,Ze(t))}function ds(r){return ts(r)?r[r.length-1]||0:r}function us(r,e){let s=rs(r,e)||{},{transitionEnd:n={},transition:i={}}=s,a=Ce(s,["transitionEnd","transition"]);a=Q(Q({},a),n);for(const o in a){const l=ds(a[o]);cs(r,o,l)}}function ps(r){return!!(fe(r)&&r.add)}function hs(r,e){const t=r.getValue("willChange");if(ps(t))return t.add(e);if(!t&&Ie.WillChange){const n=new Ie.WillChange("auto");r.addValue("willChange",n),n.add(e)}}const Ut=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ms="data-"+Ut("framerAppearId");function fs(r){return r.props[ms]}const vs=r=>r!==null;function gs(r,{repeat:e,repeatType:t="loop"},n){const i=r.filter(vs),a=e&&t!=="loop"&&e%2===1?0:i.length-1;return i[a]}const De=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ve=new Set(De),ys={type:"spring",stiffness:500,damping:25,restSpeed:10},bs=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),_s={type:"keyframes",duration:.8},Es={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Cs=(r,{keyframes:e})=>e.length>2?_s:Ve.has(r)?r.startsWith("scale")?bs(e[1]):ys:Es;function ws(u){var h=u,{when:r,delay:e,delayChildren:t,staggerChildren:n,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:o,from:l,elapsed:c}=h,d=Ce(h,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}function Gr(r,e){var t,n;return(n=(t=r==null?void 0:r[e])!=null?t:r==null?void 0:r.default)!=null?n:r}const Yr=r=>e=>typeof e=="string"&&e.startsWith(r),$r=Yr("--"),Ts=Yr("var(--"),Bt=r=>Ts(r)?As.test(r.split("/*")[0].trim()):!1,As=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Le=(r,e,t)=>t>e?e:t<r?r:t,Fe={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},Xe=ae(Q({},Fe),{transform:r=>Le(0,1,r)}),Tt=ae(Q({},Fe),{default:1}),Je=r=>Math.round(r*1e5)/1e5,jt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Is(r){return r==null}const xs=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zt=(r,e)=>t=>!!(typeof t=="string"&&xs.test(t)&&t.startsWith(r)||e&&!Is(t)&&Object.prototype.hasOwnProperty.call(t,e)),Qr=(r,e,t)=>n=>{if(typeof n!="string")return n;const[i,a,s,o]=n.match(jt);return{[r]:parseFloat(i),[e]:parseFloat(a),[t]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},Os=r=>Le(0,255,r),Kt=ae(Q({},Fe),{transform:r=>Math.round(Os(r))}),Pe={test:zt("rgb","red"),parse:Qr("red","green","blue"),transform:({red:r,green:e,blue:t,alpha:n=1})=>"rgba("+Kt.transform(r)+", "+Kt.transform(e)+", "+Kt.transform(t)+", "+Je(Xe.transform(n))+")"};function Ns(r){let e="",t="",n="",i="";return r.length>5?(e=r.substring(1,3),t=r.substring(3,5),n=r.substring(5,7),i=r.substring(7,9)):(e=r.substring(1,2),t=r.substring(2,3),n=r.substring(3,4),i=r.substring(4,5),e+=e,t+=t,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const qt={test:zt("#"),parse:Ns,transform:Pe.transform},et=r=>({test:e=>typeof e=="string"&&e.endsWith(r)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${r}`}),Oe=et("deg"),Ue=et("%"),$=et("px"),Ls=et("vh"),Ps=et("vw"),Zr=ae(Q({},Ue),{parse:r=>Ue.parse(r)/100,transform:r=>Ue.transform(r*100)}),Be={test:zt("hsl","hue"),parse:Qr("hue","saturation","lightness"),transform:({hue:r,saturation:e,lightness:t,alpha:n=1})=>"hsla("+Math.round(r)+", "+Ue.transform(Je(e))+", "+Ue.transform(Je(t))+", "+Je(Xe.transform(n))+")"},he={test:r=>Pe.test(r)||qt.test(r)||Be.test(r),parse:r=>Pe.test(r)?Pe.parse(r):Be.test(r)?Be.parse(r):qt.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Pe.transform(r):Be.transform(r)},ks=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Rs(r){var e,t;return isNaN(r)&&typeof r=="string"&&(((e=r.match(jt))==null?void 0:e.length)||0)+(((t=r.match(ks))==null?void 0:t.length)||0)>0}const Xr="number",Jr="color",Ss="var",Ms="var(",en="${}",Ds=/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 tt(r){const e=r.toString(),t=[],n={color:[],number:[],var:[]},i=[];let a=0;const o=e.replace(Ds,l=>(he.test(l)?(n.color.push(a),i.push(Jr),t.push(he.parse(l))):l.startsWith(Ms)?(n.var.push(a),i.push(Ss),t.push(l)):(n.number.push(a),i.push(Xr),t.push(parseFloat(l))),++a,en)).split(en);return{values:t,split:o,indexes:n,types:i}}function tn(r){return tt(r).values}function rn(r){const{split:e,types:t}=tt(r),n=e.length;return i=>{let a="";for(let s=0;s<n;s++)if(a+=e[s],i[s]!==void 0){const o=t[s];o===Xr?a+=Je(i[s]):o===Jr?a+=he.transform(i[s]):a+=i[s]}return a}}const Vs=r=>typeof r=="number"?0:r;function Fs(r){const e=tn(r);return rn(r)(e.map(Vs))}const je={test:Rs,parse:tn,createTransformer:rn,getAnimatableNone:Fs};function Ht(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*(2/3-t)*6:r}function Us({hue:r,saturation:e,lightness:t,alpha:n}){r/=360,e/=100,t/=100;let i=0,a=0,s=0;if(!e)i=a=s=t;else{const o=t<.5?t*(1+e):t+e-t*e,l=2*t-o;i=Ht(l,o,r+1/3),a=Ht(l,o,r),s=Ht(l,o,r-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:n}}function At(r,e){return t=>t>0?e:r}const Wt=(r,e,t)=>{const n=r*r,i=t*(e*e-n)+n;return i<0?0:Math.sqrt(i)},Bs=[qt,Pe,Be],js=r=>Bs.find(e=>e.test(r));function nn(r){const e=js(r);if($e(!!e,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let t=e.parse(r);return e===Be&&(t=Us(t)),t}const an=(r,e)=>{const t=nn(r),n=nn(e);if(!t||!n)return At(r,e);const i=Q({},t);return a=>(i.red=Wt(t.red,n.red,a),i.green=Wt(t.green,n.green,a),i.blue=Wt(t.blue,n.blue,a),i.alpha=Ye(t.alpha,n.alpha,a),Pe.transform(i))},Gt=new Set(["none","hidden"]);function zs(r,e){return Gt.has(r)?t=>t<=0?r:e:t=>t>=1?e:r}const Ks=(r,e)=>t=>e(r(t)),Yt=(...r)=>r.reduce(Ks);function qs(r,e){return t=>Ye(r,e,t)}function $t(r){return typeof r=="number"?qs:typeof r=="string"?Bt(r)?At:he.test(r)?an:Gs:Array.isArray(r)?sn:typeof r=="object"?he.test(r)?an:Hs:At}function sn(r,e){const t=[...r],n=t.length,i=r.map((a,s)=>$t(a)(a,e[s]));return a=>{for(let s=0;s<n;s++)t[s]=i[s](a);return t}}function Hs(r,e){const t=Q(Q({},r),e),n={};for(const i in t)r[i]!==void 0&&e[i]!==void 0&&(n[i]=$t(r[i])(r[i],e[i]));return i=>{for(const a in n)t[a]=n[a](i);return t}}function Ws(r,e){var i;const t=[],n={color:0,var:0,number:0};for(let a=0;a<e.values.length;a++){const s=e.types[a],o=r.indexes[s][n[s]],l=(i=r.values[o])!=null?i:0;t[a]=l,n[s]++}return t}const Gs=(r,e)=>{const t=je.createTransformer(e),n=tt(r),i=tt(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Gt.has(r)&&!i.values.length||Gt.has(e)&&!n.values.length?zs(r,e):Yt(sn(Ws(n,i),i.values),t):($e(!0,`Complex values '${r}' and '${e}' 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.`),At(r,e))};function on(r,e,t){return typeof r=="number"&&typeof e=="number"&&typeof t=="number"?Ye(r,e,t):$t(r)(r,e)}const Ys=r=>{const e=({timestamp:t})=>r(t);return{start:(t=!0)=>xe.update(e,t),stop:()=>Ft(e),now:()=>Ct.isProcessing?Ct.timestamp:be.now()}},ln=(r,e,t=10)=>{let n="";const i=Math.max(Math.round(e/t),2);for(let a=0;a<i;a++)n+=r(a/(i-1))+", ";return`linear(${n.substring(0,n.length-2)})`},$s=5;function cn(r,e,t){const n=Math.max(e-$s,0);return Hr(t-r(n),e-n)}const oe={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},dn=.001;function Qs({duration:r=oe.duration,bounce:e=oe.bounce,velocity:t=oe.velocity,mass:n=oe.mass}){let i,a;$e(r<=Ee(oe.maxDuration),"Spring duration must be 10 seconds or less");let s=1-e;s=Le(oe.minDamping,oe.maxDamping,s),r=Le(oe.minDuration,oe.maxDuration,Te(r)),s<1?(i=c=>{const d=c*s,u=d*r,h=d-t,p=Qt(c,s),m=Math.exp(-u);return dn-h/p*m},a=c=>{const u=c*s*r,h=u*t+t,p=Math.pow(s,2)*Math.pow(c,2)*r,m=Math.exp(-u),f=Qt(Math.pow(c,2),s);return(-i(c)+dn>0?-1:1)*((h-p)*m)/f}):(i=c=>{const d=Math.exp(-c*r),u=(c-t)*r+1;return-.001+d*u},a=c=>{const d=Math.exp(-c*r),u=(t-c)*(r*r);return d*u});const o=5/r,l=Xs(i,a,o);if(r=Ee(r),isNaN(l))return{stiffness:oe.stiffness,damping:oe.damping,duration:r};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:s*2*Math.sqrt(n*c),duration:r}}}const Zs=12;function Xs(r,e,t){let n=t;for(let i=1;i<Zs;i++)n=n-r(n)/e(n);return n}function Qt(r,e){return r*Math.sqrt(1-e*e)}const Js=["duration","bounce"],eo=["stiffness","damping","mass"];function un(r,e){return e.some(t=>r[t]!==void 0)}function to(r){let e=Q({velocity:oe.velocity,stiffness:oe.stiffness,damping:oe.damping,mass:oe.mass,isResolvedFromDuration:!1},r);if(!un(r,eo)&&un(r,Js))if(r.visualDuration){const t=r.visualDuration,n=2*Math.PI/(t*1.2),i=n*n,a=2*Le(.05,1,1-(r.bounce||0))*Math.sqrt(i);e=ae(Q({},e),{mass:oe.mass,stiffness:i,damping:a})}else{const t=Qs(r);e=ae(Q(Q({},e),t),{mass:oe.mass}),e.isResolvedFromDuration=!0}return e}function rt(r=oe.visualDuration,e=oe.bounce){const t=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:e}:r;let{restSpeed:n,restDelta:i}=t;const a=t.keyframes[0],s=t.keyframes[t.keyframes.length-1],o={done:!1,value:a},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=to(ae(Q({},t),{velocity:-Te(t.velocity||0)})),m=h||0,f=c/(2*Math.sqrt(l*d)),v=s-a,y=Te(Math.sqrt(l/d)),T=Math.abs(v)<5;n||(n=T?oe.restSpeed.granular:oe.restSpeed.default),i||(i=T?oe.restDelta.granular:oe.restDelta.default);let A;if(f<1){const w=Qt(y,f);A=I=>{const L=Math.exp(-f*y*I);return s-L*((m+f*y*v)/w*Math.sin(w*I)+v*Math.cos(w*I))}}else if(f===1)A=w=>s-Math.exp(-y*w)*(v+(m+y*v)*w);else{const w=y*Math.sqrt(f*f-1);A=I=>{const L=Math.exp(-f*y*I),S=Math.min(w*I,300);return s-L*((m+f*y*v)*Math.sinh(S)+w*v*Math.cosh(S))/w}}const N={calculatedDuration:p&&u||null,next:w=>{const I=A(w);if(p)o.done=w>=u;else{let L=w===0?m:0;f<1&&(L=w===0?Ee(m):cn(A,w,I));const S=Math.abs(L)<=n,B=Math.abs(s-I)<=i;o.done=S&&B}return o.value=o.done?s:I,o},toString:()=>{const w=Math.min(Vt(N),_t),I=ln(L=>N.next(w*L).value,w,30);return w+"ms "+I},toTransition:()=>{}};return N}rt.applyToOptions=r=>{const e=Vr(r,100,rt);return r.ease=e.ease,r.duration=Ee(e.duration),r.type="keyframes",r};function Zt({keyframes:r,velocity:e=0,power:t=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:c=.5,restSpeed:d}){const u=r[0],h={done:!1,value:u},p=S=>o!==void 0&&S<o||l!==void 0&&S>l,m=S=>o===void 0?l:l===void 0||Math.abs(o-S)<Math.abs(l-S)?o:l;let f=t*e;const v=u+f,y=s===void 0?v:s(v);y!==v&&(f=y-u);const T=S=>-f*Math.exp(-S/n),A=S=>y+T(S),N=S=>{const B=T(S),G=A(S);h.done=Math.abs(B)<=c,h.value=h.done?y:G};let w,I;const L=S=>{p(h.value)&&(w=S,I=rt({keyframes:[h.value,m(h.value)],velocity:cn(A,S,h.value),damping:i,stiffness:a,restDelta:c,restSpeed:d}))};return L(0),{calculatedDuration:null,next:S=>{let B=!1;return!I&&w===void 0&&(B=!0,N(S),L(S)),w!==void 0&&S>=w?I.next(S-w):(!B&&N(S),h)}}}function ro(r,e,t){const n=[],i=t||Ie.mix||on,a=r.length-1;for(let s=0;s<a;s++){let o=i(r[s],r[s+1]);if(e){const l=Array.isArray(e)?e[s]||Me:e;o=Yt(l,o)}n.push(o)}return n}function no(r,e,{clamp:t=!0,ease:n,mixer:i}={}){const a=r.length;if(Ae(a===e.length,"Both input and output ranges must be the same length"),a===1)return()=>e[0];if(a===2&&e[0]===e[1])return()=>e[1];const s=r[0]===r[1];r[0]>r[a-1]&&(r=[...r].reverse(),e=[...e].reverse());const o=ro(e,n,i),l=o.length,c=d=>{if(s&&d<r[0])return e[0];let u=0;if(l>1)for(;u<r.length-2&&!(d<r[u+1]);u++);const h=Mt(r[u],r[u+1],d);return o[u](h)};return t?d=>c(Le(r[0],r[a-1],d)):c}function io(r,e){return r.map(t=>t*e)}const pn=(r,e,t)=>(((1-3*t+3*e)*r+(3*t-6*e))*r+3*e)*r,ao=1e-7,so=12;function oo(r,e,t,n,i){let a,s,o=0;do s=e+(t-e)/2,a=pn(s,n,i)-r,a>0?t=s:e=s;while(Math.abs(a)>ao&&++o<so);return s}function nt(r,e,t,n){if(r===e&&t===n)return Me;const i=a=>oo(a,0,1,r,t);return a=>a===0||a===1?a:pn(i(a),e,n)}const lo=nt(.42,0,1,1),co=nt(0,0,.58,1),hn=nt(.42,0,.58,1),mn=r=>e=>e<=.5?r(2*e)/2:(2-r(2*(1-e)))/2,fn=r=>e=>1-r(1-e),vn=nt(.33,1.53,.69,.99),Xt=fn(vn),gn=mn(Xt),yn=r=>(r*=2)<1?.5*Xt(r):.5*(2-Math.pow(2,-10*(r-1))),Jt=r=>1-Math.sin(Math.acos(r)),uo=fn(Jt),bn=mn(Jt),_n=r=>Array.isArray(r)&&typeof r[0]=="number",En={linear:Me,easeIn:lo,easeInOut:hn,easeOut:co,circIn:Jt,circInOut:bn,circOut:uo,backIn:Xt,backInOut:gn,backOut:vn,anticipate:yn},po=r=>typeof r=="string",Cn=r=>{if(_n(r)){Ae(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,t,n,i]=r;return nt(e,t,n,i)}else if(po(r))return Ae(En[r]!==void 0,`Invalid easing type '${r}'`),En[r];return r};function ho(r,e){return r.map(()=>e||hn).splice(0,r.length-1)}function ze({duration:r=300,keyframes:e,times:t,ease:n="easeInOut"}){const i=kr(n)?n.map(Cn):Cn(n),a={done:!1,value:e[0]},s=io(t&&t.length===e.length?t:Dr(e),r),o=no(s,e,{ease:Array.isArray(i)?i:ho(e,i)});return{calculatedDuration:r,next:l=>(a.value=o(l),a.done=l>=r,a)}}const mo=r=>r!==null;function er(r,{repeat:e,repeatType:t="loop"},n,i=1){const a=r.filter(mo),o=i<0||e&&t!=="loop"&&e%2===1?0:a.length-1;return!o||n===void 0?a[o]:n}const fo={decay:Zt,inertia:Zt,tween:ze,keyframes:ze,spring:rt};function wn(r){typeof r.type=="string"&&(r.type=fo[r.type])}class tr{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const vo=r=>r/100;class rr extends tr{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,i;const{motionValue:t}=this.options;t&&t.updatedAt!==be.now()&&this.tick(be.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;wn(e);const{type:t=ze,repeat:n=0,repeatDelay:i=0,repeatType:a,velocity:s=0}=e;let{keyframes:o}=e;const l=t||ze;process.env.NODE_ENV!=="production"&&l!==ze&&Ae(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),l!==ze&&typeof o[0]!="number"&&(this.mixKeyframes=Yt(vo,on(o[0],o[1])),o=[0,100]);const c=l(ae(Q({},e),{keyframes:o}));a==="mirror"&&(this.mirroredGenerator=l(ae(Q({},e),{keyframes:[...o].reverse(),velocity:-s}))),c.calculatedDuration===null&&(c.calculatedDuration=Vt(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=c}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:i,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:c=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let A=this.currentTime,N=n;if(u){const S=Math.min(this.currentTime,i)/o;let B=Math.floor(S),G=S%1;!G&&S>=1&&(G=1),G===1&&B--,B=Math.min(B,u+1),!!(B%2)&&(h==="reverse"?(G=1-G,p&&(G-=p/o)):h==="mirror"&&(N=s)),A=Le(0,1,G)*o}const w=T?{done:!1,value:d[0]}:N.next(A);a&&(w.value=a(w.value));let{done:I}=w;!T&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return L&&m!==Zt&&(w.value=er(d,this.options,v,this.speed)),f&&f(w.value),L&&this.finish(),w}then(e,t){return this.finished.then(e,t)}get duration(){return Te(this.calculatedDuration)}get time(){return Te(this.currentTime)}set time(e){var t;e=Ee(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(t=this.driver)==null||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(be.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Te(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:e=Ys,startTime:t}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),(a=(i=this.options).onPlay)==null||a.call(i);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=t!=null?t: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(be.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",(t=(e=this.options).onComplete)==null||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(t=(e=this.options).onCancel)==null||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(t=this.driver)==null||t.stop(),e.observe(this)}}function go(r){var e;for(let t=1;t<r.length;t++)(e=r[t])!=null||(r[t]=r[t-1])}const ke=r=>r*180/Math.PI,nr=r=>{const e=ke(Math.atan2(r[1],r[0]));return ir(e)},yo={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:nr,rotateZ:nr,skewX:r=>ke(Math.atan(r[1])),skewY:r=>ke(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},ir=r=>(r=r%360,r<0&&(r+=360),r),Tn=nr,An=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),In=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),bo={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:An,scaleY:In,scale:r=>(An(r)+In(r))/2,rotateX:r=>ir(ke(Math.atan2(r[6],r[5]))),rotateY:r=>ir(ke(Math.atan2(-r[2],r[0]))),rotateZ:Tn,rotate:Tn,skewX:r=>ke(Math.atan(r[4])),skewY:r=>ke(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function ar(r){return r.includes("scale")?1:0}function sr(r,e){if(!r||r==="none")return ar(e);const t=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(t)n=bo,i=t;else{const o=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=yo,i=o}if(!i)return ar(e);const a=n[e],s=i[1].split(",").map(Eo);return typeof a=="function"?a(s):s[a]}const _o=(r,e)=>{const{transform:t="none"}=getComputedStyle(r);return sr(t,e)};function Eo(r){return parseFloat(r.trim())}const xn=r=>r===Fe||r===$,Co=new Set(["x","y","z"]),wo=De.filter(r=>!Co.has(r));function To(r){const e=[];return wo.forEach(t=>{const n=r.getValue(t);n!==void 0&&(e.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),e}const Re={width:({x:r},{paddingLeft:e="0",paddingRight:t="0"})=>r.max-r.min-parseFloat(e)-parseFloat(t),height:({y:r},{paddingTop:e="0",paddingBottom:t="0"})=>r.max-r.min-parseFloat(e)-parseFloat(t),top:(r,{top:e})=>parseFloat(e),left:(r,{left:e})=>parseFloat(e),bottom:({y:r},{top:e})=>parseFloat(e)+(r.max-r.min),right:({x:r},{left:e})=>parseFloat(e)+(r.max-r.min),x:(r,{transform:e})=>sr(e,"x"),y:(r,{transform:e})=>sr(e,"y")};Re.translateX=Re.x,Re.translateY=Re.y;const Se=new Set;let or=!1,lr=!1,cr=!1;function On(){if(lr){const r=Array.from(Se).filter(n=>n.needsMeasurement),e=new Set(r.map(n=>n.element)),t=new Map;e.forEach(n=>{const i=To(n);i.length&&(t.set(n,i),n.render())}),r.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();const i=t.get(n);i&&i.forEach(([a,s])=>{var o;(o=n.getValue(a))==null||o.set(s)})}),r.forEach(n=>n.measureEndState()),r.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}lr=!1,or=!1,Se.forEach(r=>r.complete(cr)),Se.clear()}function Nn(){Se.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(lr=!0)})}function Ao(){cr=!0,Nn(),On(),cr=!1}class dr{constructor(e,t,n,i,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Se.add(this),or||(or=!0,xe.read(Nn),xe.resolveKeyframes(On))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;if(e[0]===null){const a=i==null?void 0:i.get(),s=e[e.length-1];if(a!==void 0)e[0]=a;else if(n&&t){const o=n.readValue(t,s);o!=null&&(e[0]=o)}e[0]===void 0&&(e[0]=s),i&&a===void 0&&i.set(e[0])}go(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Se.delete(this)}cancel(){this.state==="scheduled"&&(Se.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Io=r=>r.startsWith("--");function xo(r,e,t){Io(e)?r.style.setProperty(e,t):r.style[e]=t}function ur(r){let e;return()=>(e===void 0&&(e=r()),e)}const Oo=ur(()=>window.ScrollTimeline!==void 0),No={};function Lo(r,e){const t=ur(r);return()=>{var n;return(n=No[e])!=null?n:t()}}const Ln=Lo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),it=([r,e,t,n])=>`cubic-bezier(${r}, ${e}, ${t}, ${n})`,Pn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:it([0,.65,.55,1]),circOut:it([.55,0,1,.45]),backIn:it([.31,.01,.66,-.59]),backOut:it([.33,1.53,.69,.99])};function kn(r,e){if(r)return typeof r=="function"?Ln()?ln(r,e):"ease-out":_n(r)?it(r):Array.isArray(r)?r.map(t=>kn(t,e)||Pn.easeOut):Pn[r]}function Po(r,e,t,{delay:n=0,duration:i=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:l}={},c=void 0){const d={[e]:t};l&&(d.offset=l);const u=kn(o,i);Array.isArray(u)&&(d.easing=u);const h={delay:n,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),r.animate(d,h)}function ko(t){var n=t,{type:r}=n,e=Ce(n,["type"]);var i,a;return Dt(r)&&Ln()?r.applyToOptions(e):((i=e.duration)!=null||(e.duration=300),(a=e.ease)!=null||(e.ease="easeOut"),e)}class Ro extends tr{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:n,keyframes:i,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:o,onComplete:l}=e;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=e,Ae(typeof e.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=ko(e);this.animation=Po(t,n,i,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=er(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):xo(t,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 e,t;(t=(e=this.animation).finish)==null||t.call(e)}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t;this.isPseudoElement||(t=(e=this.animation).commitStyles)==null||t.call(e)}get duration(){var t,n;const e=((n=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:n.call(t).duration)||0;return Te(Number(e))}get time(){return Te(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Ee(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Oo()?(this.animation.timeline=e,Me):t(this)}}const Rn={anticipate:yn,backInOut:gn,circInOut:bn};function So(r){return r in Rn}function Mo(r){typeof r.ease=="string"&&So(r.ease)&&(r.ease=Rn[r.ease])}const Sn=10;class Do extends Ro{constructor(e){Mo(e),wn(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){var d;const c=this.options,{motionValue:t,onUpdate:n,onComplete:i,element:a}=c,s=Ce(c,["motionValue","onUpdate","onComplete","element"]);if(!t)return;if(e!==void 0){t.set(e);return}const o=new rr(ae(Q({},s),{autoplay:!1})),l=Ee((d=this.finishedTime)!=null?d:this.time);t.setWithVelocity(o.sample(l-Sn).value,o.sample(l).value,Sn),o.stop()}}const Mn=(r,e)=>e==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&(je.test(r)||r==="0")&&!r.startsWith("url("));function Vo(r){const e=r[0];if(r.length===1)return!0;for(let t=0;t<r.length;t++)if(r[t]!==e)return!0}function Fo(r,e,t,n){const i=r[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const a=r[r.length-1],s=Mn(i,e),o=Mn(a,e);return $e(s===o,`You are trying to animate ${e} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`),!s||!o?!1:Vo(r)||(t==="spring"||Dt(t))&&n}function Dn(r){return typeof r=="object"&&r!==null}function Uo(r){return Dn(r)&&"offsetHeight"in r}const Bo=new Set(["opacity","clipPath","filter","transform"]),jo=ur(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function zo(r){var c;const{motionValue:e,name:t,repeatDelay:n,repeatType:i,damping:a,type:s}=r;if(!Uo((c=e==null?void 0:e.owner)==null?void 0:c.current))return!1;const{onUpdate:o,transformTemplate:l}=e.owner.getProps();return jo()&&t&&Bo.has(t)&&(t!=="transform"||!l)&&!o&&!n&&i!=="mirror"&&a!==0&&s!=="inertia"}const Ko=40;class qo extends tr{constructor(h){var p=h,{autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",keyframes:o,name:l,motionValue:c,element:d}=p,u=Ce(p,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var y,T;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(T=this.keyframeResolver)==null||T.cancel()},this.createdAt=be.now();const m=Q({autoplay:e,delay:t,type:n,repeat:i,repeatDelay:a,repeatType:s,name:l,motionValue:c,element:d},u),f=(d==null?void 0:d.KeyframeResolver)||dr;this.keyframeResolver=new f(o,(y,T,A)=>this.onKeyframesResolved(y,T,m,!A),l,c,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,t,n,i){this.keyframeResolver=void 0;const{name:a,type:s,velocity:o,delay:l,isHandoff:c,onUpdate:d}=n;this.resolvedAt=be.now(),Fo(e,a,s,o)||((Ie.instantAnimations||!l)&&(d==null||d(er(e,n,t))),e[0]=e[e.length-1],n.duration=0,n.repeat=0);const u=i?this.resolvedAt?this.resolvedAt-this.createdAt>Ko?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=ae(Q({startTime:u,finalKeyframe:t},n),{keyframes:e}),p=!c&&zo(h)?new Do(ae(Q({},h),{element:h.motionValue.owner.current})):new rr(h);p.finished.then(()=>this.notifyFinished()).catch(Me),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(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Ao()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Vn=(r,e,t,n={},i,a)=>s=>{const o=Gr(n,r)||{},l=o.delay||n.delay||0;let{elapsed:c=0}=n;c=c-Ee(l);const d=ae(Q({keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity()},o),{delay:-c,onUpdate:h=>{e.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:r,motionValue:e,element:a?void 0:i});ws(o)||Object.assign(d,Cs(r,d)),d.duration&&(d.duration=Ee(d.duration)),d.repeatDelay&&(d.repeatDelay=Ee(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)),(Ie.instantAnimations||Ie.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!a&&e.get()!==void 0){const h=gs(d.keyframes,o);if(h!==void 0){xe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new rr(d):new qo(d)},Fn=new Set(["width","height","top","left","right","bottom",...De]);function Ho({protectedKeys:r,needsAnimating:e},t){const n=r.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,n}function Wo(r,e,{delay:t=0,transitionOverride:n,type:i}={}){var u;let d=e,{transition:a=r.getDefaultTransition(),transitionEnd:s}=d,o=Ce(d,["transition","transitionEnd"]);n&&(a=n);const l=[],c=i&&r.animationState&&r.animationState.getState()[i];for(const h in o){const p=r.getValue(h,(u=r.latestValues[h])!=null?u:null),m=o[h];if(m===void 0||c&&Ho(c,h))continue;const f=Q({delay:t},Gr(a||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(m)&&m===v&&!f.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const A=fs(r);if(A){const N=window.MotionHandoffAnimation(A,h,xe);N!==null&&(f.startTime=N,y=!0)}}hs(r,h),p.start(Vn(h,p,m,r.shouldReduceMotion&&Fn.has(h)?{type:!1}:f,r,y));const T=p.animation;T&&l.push(T)}return s&&Promise.all(l).then(()=>{xe.update(()=>{s&&us(r,s)})}),l}function Go({top:r,left:e,right:t,bottom:n}){return{x:{min:e,max:t},y:{min:r,max:n}}}function Yo(r,e){if(!e)return r;const t=e({x:r.left,y:r.top}),n=e({x:r.right,y:r.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function $o(r,e){return Go(Yo(r.getBoundingClientRect(),e))}const Un={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"]},pr={};for(const r in Un)pr[r]={isEnabled:e=>Un[r].some(t=>!!e[t])};const Bn=()=>({min:0,max:0}),hr=()=>({x:Bn(),y:Bn()}),Qo=typeof window!="undefined",mr={current:null},jn={current:!1};function Zo(){if(jn.current=!0,!!Qo)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),e=()=>mr.current=r.matches;r.addListener(e),e()}else mr.current=!1}function Xo(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function Jo(r){return typeof r=="string"||Array.isArray(r)}const el=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function zn(r){return Xo(r.animate)||el.some(e=>Jo(r[e]))}function tl(r){return!!(zn(r)||r.variants)}function rl(r,e,t){for(const n in e){const i=e[n],a=t[n];if(fe(i))r.addValue(n,i);else if(fe(a))r.addValue(n,Ze(i,{owner:r}));else if(a!==i)if(r.hasValue(n)){const s=r.getValue(n);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=r.getStaticValue(n);r.addValue(n,Ze(s!==void 0?s:i,{owner:r}))}}for(const n in t)e[n]===void 0&&r.removeValue(n);return e}const Kn=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),qn=r=>/^0[^.\s]+$/u.test(r),nl={test:r=>r==="auto",parse:r=>r},Hn=r=>e=>e.test(r),Wn=[Fe,$,Ue,Oe,Ps,Ls,nl],Gn=r=>Wn.find(Hn(r)),il=[...Wn,he,je],al=r=>il.find(Hn(r)),sl=new Set(["brightness","contrast","saturate","opacity"]);function ol(r){const[e,t]=r.slice(0,-1).split("(");if(e==="drop-shadow")return r;const[n]=t.match(jt)||[];if(!n)return r;const i=t.replace(n,"");let a=sl.has(e)?1:0;return n!==t&&(a*=100),e+"("+a+i+")"}const ll=/\b([a-z-]*)\(.*?\)/gu,fr=ae(Q({},je),{getAnimatableNone:r=>{const e=r.match(ll);return e?e.map(ol).join(" "):r}}),Yn=ae(Q({},Fe),{transform:Math.round}),vr=ae(Q({borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,radius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,backgroundPositionX:$,backgroundPositionY:$},{rotate:Oe,rotateX:Oe,rotateY:Oe,rotateZ:Oe,scale:Tt,scaleX:Tt,scaleY:Tt,scaleZ:Tt,skew:Oe,skewX:Oe,skewY:Oe,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:Xe,originX:Zr,originY:Zr,originZ:$}),{zIndex:Yn,fillOpacity:Xe,strokeOpacity:Xe,numOctaves:Yn}),cl=ae(Q({},vr),{color:he,backgroundColor:he,outlineColor:he,fill:he,stroke:he,borderColor:he,borderTopColor:he,borderRightColor:he,borderBottomColor:he,borderLeftColor:he,filter:fr,WebkitFilter:fr}),$n=r=>cl[r];function Qn(r,e){let t=$n(r);return t!==fr&&(t=je),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const Zn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xn{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:a,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=dr,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=be.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,xe.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=s;this.latestValues=l,this.baseTarget=Q({},l),this.initialValues=t.initial?Q({},l):{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=!!a,this.isControllingVariants=zn(t),this.isVariantNode=tl(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const h=this.scrapeMotionValuesFromProps(t,{},this),{willChange:d}=h,u=Ce(h,["willChange"]);for(const p in u){const m=u[p];l[p]!==void 0&&fe(m)&&m.set(l[p],!1)}}mount(e){this.current=e,Qe.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,n)=>this.bindToMotionValue(n,t)),jn.current||Zo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:mr.current,process.env.NODE_ENV!=="production"&&Kr(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(),Ft(this.notifyUpdate),Ft(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Ve.has(e);n&&this.onBindTransform&&this.onBindTransform();const i=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&xe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=t.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),a(),s&&s(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in pr){const t=pr[e];if(!t)continue;const{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){const a=this.features[e];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):hr()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<Zn.length;n++){const i=Zn[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,s=e[a];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=rl(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Ze(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var i;let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!=null?i:this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n=="string"&&(Kn(n)||qn(n))?n=parseFloat(n):!al(n)&&je.test(t)&&(n=Qn(e,t)),this.setBaseTarget(e,fe(n)?n.get():n)),fe(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var a;const{initial:t}=this.props;let n;if(typeof t=="string"||typeof t=="object"){const s=jr(this.props,t,(a=this.presenceContext)==null?void 0:a.custom);s&&(n=s[e])}if(t&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!fe(i)?i:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new qr),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}const dl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ul(r){const e=dl.exec(r);if(!e)return[,];const[,t,n,i]=e;return[`--${t!=null?t:n}`,i]}const pl=4;function Jn(r,e,t=1){Ae(t<=pl,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,i]=ul(r);if(!n)return;const a=window.getComputedStyle(e).getPropertyValue(n);if(a){const s=a.trim();return Kn(s)?parseFloat(s):s}return Bt(i)?Jn(i,e,t+1):i}function hl(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||qn(r):!0}const ml=new Set(["auto","none","0"]);function fl(r,e,t){let n=0,i;for(;n<r.length&&!i;){const a=r[n];typeof a=="string"&&!ml.has(a)&&tt(a).values.length&&(i=r[n]),n++}if(i&&t)for(const a of e)r[a]=Qn(t,i)}class vl extends dr{constructor(e,t,n,i,a){super(e,t,n,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Bt(c))){const d=Jn(c,t.current);d!==void 0&&(e[l]=d),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Fn.has(n)||e.length!==2)return;const[i,a]=e,s=Gn(i),o=Gn(a);if(s!==o)if(xn(s)&&xn(o))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else Re[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let i=0;i<e.length;i++)(e[i]===null||hl(e[i]))&&n.push(i);n.length&&fl(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Re[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const i=t[t.length-1];i!==void 0&&e.getValue(n,i).jump(i,!1)}measureEndState(){var o;const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);const a=n.length-1,s=n[a];n[a]=Re[t](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}class ei extends Xn{constructor(){super(...arguments),this.KeyframeResolver=vl}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;fe(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}const ti=(r,e)=>e&&typeof r=="number"?e.transform(r):r,gl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yl=De.length;function bl(r,e,t){let n="",i=!0;for(let a=0;a<yl;a++){const s=De[a],o=r[s];if(o===void 0)continue;let l=!0;if(typeof o=="number"?l=o===(s.startsWith("scale")?1:0):l=parseFloat(o)===0,!l||t){const c=ti(o,vr[s]);if(!l){i=!1;const d=gl[s]||s;n+=`${d}(${c}) `}t&&(e[s]=c)}}return n=n.trim(),t?n=t(e,i?"":n):i&&(n="none"),n}function ri(r,e,t){const{style:n,vars:i,transformOrigin:a}=r;let s=!1,o=!1;for(const l in e){const c=e[l];if(Ve.has(l)){s=!0;continue}else if($r(l)){i[l]=c;continue}else{const d=ti(c,vr[l]);l.startsWith("origin")?(o=!0,a[l]=d):n[l]=d}}if(e.transform||(s||t?n.transform=bl(e,r.transform,t):n.transform&&(n.transform="none")),o){const{originX:l="50%",originY:c="50%",originZ:d=0}=a;n.transformOrigin=`${l} ${c} ${d}`}}function ni(r,{style:e,vars:t},n,i){Object.assign(r.style,e,i&&i.getProjectionStyles(n));for(const a in t)r.style.setProperty(a,t[a])}const _l={};function El(r,{layout:e,layoutId:t}){return Ve.has(r)||r.startsWith("origin")||(e||t!==void 0)&&(!!_l[r]||r==="opacity")}function ii(r,e,t){var a;const{style:n}=r,i={};for(const s in n)(fe(n[s])||e.style&&fe(e.style[s])||El(s,r)||((a=t==null?void 0:t.getValue(s))==null?void 0:a.liveStyle)!==void 0)&&(i[s]=n[s]);return i}function Cl(r){return window.getComputedStyle(r)}class wl extends ei{constructor(){super(...arguments),this.type="html",this.renderInstance=ni}readValueFromInstance(e,t){var n;if(Ve.has(t))return(n=this.projection)!=null&&n.isProjecting?ar(t):_o(e,t);{const i=Cl(e),a=($r(t)?i.getPropertyValue(t):i[t])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(e,{transformPagePoint:t}){return $o(e,t)}build(e,t,n){ri(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ii(e,t,n)}}function Tl(r,e){return r in e}class Al extends Xn{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(Tl(t,e)){const n=e[t];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return hr()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}}const Il={offset:"stroke-dashoffset",array:"stroke-dasharray"},xl={offset:"strokeDashoffset",array:"strokeDasharray"};function Ol(r,e,t=1,n=0,i=!0){r.pathLength=1;const a=i?Il:xl;r[a.offset]=$.transform(-n);const s=$.transform(e),o=$.transform(t);r[a.array]=`${s} ${o}`}function Nl(r,u,l,c,d){var h=u,{attrX:e,attrY:t,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:s=0}=h,o=Ce(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var f,v;if(ri(r,o,c),l){r.style.viewBox&&(r.attrs.viewBox=r.style.viewBox);return}r.attrs=r.style,r.style={};const{attrs:p,style:m}=r;p.transform&&(m.transform=p.transform,delete p.transform),(m.transform||p.transformOrigin)&&(m.transformOrigin=(f=p.transformOrigin)!=null?f:"50% 50%",delete p.transformOrigin),m.transform&&(m.transformBox=(v=d==null?void 0:d.transformBox)!=null?v:"fill-box",delete p.transformBox),e!==void 0&&(p.x=e),t!==void 0&&(p.y=t),n!==void 0&&(p.scale=n),i!==void 0&&Ol(p,i,a,s,!1)}const ai=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"]),Ll=r=>typeof r=="string"&&r.toLowerCase()==="svg";function Pl(r,e,t,n){ni(r,e,void 0,n);for(const i in e.attrs)r.setAttribute(ai.has(i)?i:Ut(i),e.attrs[i])}function kl(r,e,t){const n=ii(r,e,t);for(const i in r)if(fe(r[i])||fe(e[i])){const a=De.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=r[i]}return n}class Rl extends ei{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=hr}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Ve.has(t)){const n=$n(t);return n&&n.default||0}return t=ai.has(t)?t:Ut(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return kl(e,t,n)}build(e,t,n){Nl(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,i){Pl(e,t,n,i)}mount(e){this.isSVGTag=Ll(e.tagName),super.mount(e)}}function si(r){return Dn(r)&&"ownerSVGElement"in r}function Sl(r){return si(r)&&r.tagName==="svg"}function Ml(r){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},t=si(r)&&!Sl(r)?new Rl(e):new wl(e);t.mount(r),Qe.set(r,t)}function Dl(r){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},t=new Al(e);t.mount(r),Qe.set(r,t)}function Vl(r,e,t){const n=fe(r)?r:Ze(r);return n.start(Vn("",n,e,t)),n.animation}function Fl(r,e){return fe(r)||typeof r=="number"||typeof r=="string"&&!St(e)}function oi(r,e,t,n){const i=[];if(Fl(r,e))i.push(Vl(r,St(e)&&e.default||e,t&&(t.default||t)));else{const a=Lr(r,e,n),s=a.length;Ae(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const l=a[o],c=l instanceof Element?Ml:Dl;Qe.has(l)||c(l);const d=Qe.get(l),u=Q({},t);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),i.push(...Wo(d,ae(Q({},e),{transition:u}),{}))}}return i}function Ul(r,e,t){const n=[];return Qa(r,e,t,{spring:rt}).forEach(({keyframes:a,transition:s},o)=>{n.push(...oi(o,a,s))}),n}class Bl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){const t=this.animations.map(n=>n.attachTimeline(e));return()=>{t.forEach((n,i)=>{n&&n(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class jl extends Bl{then(e,t){return this.finished.finally(e).then(()=>{})}}function zl(r){return Array.isArray(r)&&r.some(Array.isArray)}function Kl(r){function e(t,n,i){let a=[];return zl(t)?a=Ul(t,n,r):a=oi(t,n,i,r),new jl(a)}return e}const de=Kl(),Z={spinner:"_spinner_1waxg_1",spinnerContainer:"_spinnerContainer_1waxg_5",success:"_success_1waxg_9",successContainer:"_successContainer_1waxg_13",container:"_container_1waxg_17",card:"_card_1waxg_26",warning:"_warning_1waxg_35",svg:"_svg_1waxg_43",srOnly:"_srOnly_1waxg_48"};class li{constructor(){b(this,"template",`
|
|
1
|
+
(function(ee,re){typeof exports=="object"&&typeof module!="undefined"?re(exports):typeof define=="function"&&define.amd?define(["exports"],re):(ee=typeof globalThis!="undefined"?globalThis:ee||self,re(ee["PayNext TS SDK"]={}))})(this,function(ee){"use strict";var hd=Object.defineProperty,md=Object.defineProperties;var fd=Object.getOwnPropertyDescriptors;var Pt=Object.getOwnPropertySymbols;var Fa=Object.prototype.hasOwnProperty,Ua=Object.prototype.propertyIsEnumerable;var Nr=(ee,re,ne)=>re in ee?hd(ee,re,{enumerable:!0,configurable:!0,writable:!0,value:ne}):ee[re]=ne,Q=(ee,re)=>{for(var ne in re||(re={}))Fa.call(re,ne)&&Nr(ee,ne,re[ne]);if(Pt)for(var ne of Pt(re))Ua.call(re,ne)&&Nr(ee,ne,re[ne]);return ee},ae=(ee,re)=>md(ee,fd(re));var Ce=(ee,re)=>{var ne={};for(var ge in ee)Fa.call(ee,ge)&&re.indexOf(ge)<0&&(ne[ge]=ee[ge]);if(ee!=null&&Pt)for(var ge of Pt(ee))re.indexOf(ge)<0&&Ua.call(ee,ge)&&(ne[ge]=ee[ge]);return ne};var b=(ee,re,ne)=>Nr(ee,typeof re!="symbol"?re+"":re,ne);var z=(ee,re,ne)=>new Promise((ge,He)=>{var kt=ie=>{try{We(ne.next(ie))}catch(Ge){He(Ge)}},Rt=ie=>{try{We(ne.throw(ie))}catch(Ge){He(Ge)}},We=ie=>ie.done?ge(ie.value):Promise.resolve(ie.value).then(kt,Rt);We((ne=ne.apply(ee,re)).next())});var re=document.createElement("style");re.textContent=`._spinner_1waxg_1{height:100%;width:100%}@keyframes _spin_1waxg_1{to{transform:rotate(360deg)}}._spinner_1waxg_1{animation:_spin_1waxg_1 1s linear infinite;fill:#9ca3af;--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}._spinner_1waxg_1:is(._dark_1waxg_1 *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}._spinnerContainer_1waxg_5{height:40px;width:40px}._success_1waxg_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_1waxg_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_1waxg_13:is(._dark_1waxg_1 *){--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._container_1waxg_17{width:30px;height:20px;display:flex;margin:0 1px;align-items:center;justify-content:center}._card_1waxg_26{width:28px;height:19px;display:flex;margin:0 1px;align-items:center;justify-content:center}._warning_1waxg_35{width:16px;height:16px;display:flex;align-items:center;justify-content:center}._svg_1waxg_43{width:100%;height:100%}._srOnly_1waxg_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}._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_1m9xd_1{border-radius:12px;height:40px;overflow:hidden;position:relative;background-color:#000}._applePay_1m9xd_1:hover{filter:contrast(.575) brightness(1.2)}._applePay_1m9xd_1 iframe{width:calc(100% + 12px)!important;height:44px!important;border:none;display:block;transform:translateY(-2px);margin:0 -6px}._hidden_1m9xd_22{display:none!important}._googlePay_1j5ka_1{border-radius:12px;height:40px;overflow:hidden;background-color:#000}._googlePay_1j5ka_1 iframe{width:100%!important;height:44px!important;border:none!important;border-radius:12px!important;display:block;transform:translateY(-2px)}._hidden_1j5ka_17{display:none!important}._paypal_1al9c_1{overflow:hidden;border-radius:12px;height:40px;background-color:#ffc439}._hidden_1al9c_8{display:none}._button_1br9w_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_1br9w_1{transition-property:none}}._button_1br9w_1 span{margin-left:.25rem}._button_1br9w_1:hover{opacity:.7}._press_1br9w_21{transform:scale(.95)}._venmo_10t25_1{overflow:hidden;border-radius:12px;height:40px;background-color:#2b67bc;width:100%;color:#fff;font-size:16px;text-align:center;cursor:pointer;transition:background-color .3s ease;&:hover{background-color:#5683c1}}._hidden_10t25_17{display:none}._button_125my_1{cursor:pointer}._button_rx9be_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_rx9be_1{transition-property:none}}._button_rx9be_1 span{margin-left:.25rem}._disabled_rx9be_17,._button_rx9be_1:hover{opacity:.7}._press_rx9be_22{transform:scale(.95)}._hidden_rx9be_26{display:none!important}._spinner_rx9be_30{width:24px;height:24px}._cardForm_isqbi_1{display:grid;gap:.75rem;padding-top:0}._hidden_isqbi_5{display:none!important}._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_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))}._container_hoha1_1{display:flex;width:100%;flex-direction:column;align-items:center;justify-content:center}._title_hoha1_5{margin-top:.5rem;font-weight:300}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(re);let ne=null;function ge(){return z(this,null,function*(){return ne||(ne=new Promise((r,e)=>{const t=document.createElement("script");if(t.src="https://js.evervault.com/v2",t.onload=()=>r(),t.onerror=()=>{ne=null,e()},!document.head)throw new Error("Expected document.head not to be null. Evervault.js requires a <head> element.");document.head.appendChild(t)}),ne)})}function He(){return z(this,null,function*(){if(window.Evervault)return window.Evervault;try{return yield ge(),window.Evervault}catch(r){throw new Error("Failed to load Evervault.js")}})}function kt(r,e,t){return z(this,null,function*(){const n=yield He();return new n(r,e,t)})}Promise.resolve().then(()=>{He()});let Rt=class{constructor(e){b(this,"apple",null);b(this,"isAvailable",!1);b(this,"onReady");this.ev=e}init(c){return z(this,arguments,function*({transaction:e,locale:t,supportedCardTypes:n,onReady:i,onError:a,onSuccess:s,onCancel:o}){const l=this.ev.transactions.create(e);this.apple=this.ev.ui.applePay(l,{locale:t,borderRadius:12,size:{width:"100%",height:"40px"},allowedCardNetworks:n,requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(p,m)=>z(this,[p,m],function*(u,{fail:h}){try{s==null||s(u)}catch(f){console.error(f),h({message:"Cannot pay with payment credentials"})}})});const d=yield this.apple.availability();this.isAvailable=!0,console.log("Apple Pay availability",d),this.isAvailable||console.error("Apple Pay is not available",d),a&&this.apple.on("error",a),o&&this.apple.on("cancel",o),this.onReady=i})}render(e){return z(this,null,function*(){var t;!this.apple||!this.isAvailable||(e.innerHTML="",yield this.apple.mount(e),(t=this.onReady)==null||t.call(this))})}},We=class{constructor(e){b(this,"google",null);this.ev=e}init(o){return z(this,arguments,function*({transaction:e,locale:t,onReady:n,onError:i,onSuccess:a,onCancel:s}){const c=this.ev.transactions.create(e);this.google=this.ev.ui.googlePay(c,{locale:t,size:{width:"100%",height:"42px"},borderRadius:12,billingAddress:{phoneNumber:!0},process:(u,h)=>z(this,[u,h],function*(l,{fail:d}){try{a==null||a(l)}catch(p){console.error(p),d({message:"Cannot pay with payment credentials"})}})}),s&&this.google.on("cancel",s),n&&this.google.on("ready",n),i&&this.google.on("error",i)})}render(e){return z(this,null,function*(){this.google&&(e.innerHTML="",this.google.mount(e))})}};class ie{constructor(){b(this,"listeners",[])}removeListener(e){this.listeners=this.listeners.filter(t=>t!==e)}addListener(e){return this.listeners.push(e),()=>this.removeListener(e)}emit(e){for(const t of this.listeners)t(e)}clear(){this.listeners=[]}}class Ge{constructor(e){b(this,"threeDs",null);this.ev=e}init(a){return z(this,arguments,function*({threeDsId:e,onReady:t,onSuccess:n,onError:i}){this.threeDs=this.ev.ui.threeDSecure(e),this.threeDs.on("ready",()=>t==null?void 0:t()),this.threeDs.on("success",()=>n==null?void 0:n()),this.threeDs.on("failure",()=>i==null?void 0:i()),this.threeDs.on("error",()=>i==null?void 0:i())})}render(e){return z(this,null,function*(){this.threeDs&&this.threeDs.mount(e)})}}class Ba{constructor(){b(this,"isReady",!1);b(this,"ev",null);b(this,"apple",null);b(this,"google",null);b(this,"threeDs",null);b(this,"events",{ready:new ie})}isShouldLoad({teamId:e,appId:t}){var n,i;return((n=this.ev)==null?void 0:n.config.appId)!==t||((i=this.ev)==null?void 0:i.config.teamId)!==e}initEv(e){return z(this,null,function*(){this.isShouldLoad(e)&&(this.isReady=!1,this.ev=yield kt(e.teamId,e.appId),this.apple=new Rt(this.ev),this.google=new We(this.ev),this.events.ready.emit(),this.isReady=!0)})}initThreeDs(e){return z(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new Ge(this.ev),yield this.threeDs.init(e),yield this.threeDs.render()})}initApple(e){return z(this,null,function*(){if(!this.apple)throw new Error("Evervault should be init before using Apple Pay");yield this.apple.init(e)})}initGoogle(e){return z(this,null,function*(){if(!this.google)throw new Error("Evervault should be init before using Google Pay");yield this.google.init(e)})}isAppleAvailable(){var e;return!!((e=this.apple)!=null&&e.isAvailable)}addEventListener(e,t){return this.events[e].addListener(t)}renderApple(e){return z(this,null,function*(){var t;return yield(t=this.apple)==null?void 0:t.render(e)})}renderGoogle(e){return z(this,null,function*(){var t;return yield(t=this.google)==null?void 0:t.render(e)})}getEv(){if(!this.ev)throw new Error("Evervault should be init before getting instance");return this.ev}}function St(r){return typeof r=="object"&&!Array.isArray(r)}function ja(r,e,t){var n;if(r instanceof EventTarget)return[r];if(typeof r=="string"){let i=document;const a=(n=t==null?void 0:t[r])!=null?n:i.querySelectorAll(r);return a?Array.from(a):[]}return Array.from(r)}function Lr(r,e,t,n){return typeof r=="string"&&St(e)?ja(r,t,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function za(r,e,t){return r*(e+1)}function Pr(r,e,t,n){var i;return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,r+parseFloat(e)):e==="<"?t:(i=n.get(e))!=null?i:r}const Ye=(r,e,t)=>r+(e-r)*t,Ka=(r,e,t)=>{const n=e-r;return((t-r)%n+n)%n+r},kr=r=>Array.isArray(r)&&typeof r[0]!="number";function Rr(r,e){return kr(r)?r[Ka(0,r.length,e)]:r}function qa(r,e){r.indexOf(e)===-1&&r.push(e)}function Sr(r,e){const t=r.indexOf(e);t>-1&&r.splice(t,1)}function Ha(r,e,t){for(let n=0;n<r.length;n++){const i=r[n];i.at>e&&i.at<t&&(Sr(r,i),n--)}}function Wa(r,e,t,n,i,a){Ha(r,i,a);for(let s=0;s<e.length;s++)r.push({value:e[s],at:Ye(i,a,n[s]),easing:Rr(t,s)})}function Ga(r,e){for(let t=0;t<r.length;t++)r[t]=r[t]/(e+1)}function Ya(r,e){return r.at===e.at?r.value===null?1:e.value===null?-1:0:r.at-e.at}const fe=r=>!!(r&&r.getVelocity),Mt=(r,e,t)=>{const n=e-r;return n===0?1:(t-r)/n};function Mr(r,e){const t=r[r.length-1];for(let n=1;n<=e;n++){const i=Mt(0,e,n);r.push(Ye(t,1,i))}}function Dr(r){const e=[0];return Mr(e,r.length-1),e}function Dt(r){return typeof r=="function"&&"applyToOptions"in r}const _t=2e4;function Vt(r){let e=0;const t=50;let n=r.next(e);for(;!n.done&&e<_t;)e+=t,n=r.next(e);return e>=_t?1/0:e}const Ee=r=>r*1e3,Ae=r=>r/1e3;function Vr(r,e=100,t){const n=t(ae(Q({},r),{keyframes:[0,e]})),i=Math.min(Vt(n),_t);return{type:"keyframes",ease:a=>n.next(i*a).value/e,duration:Ae(i)}}let $e=()=>{},Te=()=>{};process.env.NODE_ENV!=="production"&&($e=(r,e)=>{!r&&typeof console!="undefined"&&console.warn(e)},Te=(r,e)=>{if(!r)throw new Error(e)});const $a="easeInOut",Qa=20;function Za(r,a={},n,i){var s=a,{defaultTransition:e={}}=s,t=Ce(s,["defaultTransition"]);const o=e.duration||.3,c=new Map,l=new Map,d={},u=new Map;let h=0,p=0,m=0;for(let f=0;f<r.length;f++){const v=r[f];if(typeof v=="string"){u.set(v,p);continue}else if(!Array.isArray(v)){u.set(v.name,Pr(p,v.at,h,u));continue}let[y,A,T={}]=v;T.at!==void 0&&(p=Pr(p,T.at,h,u));let N=0;const w=(I,L,S,B=0,G=0)=>{const q=Xa(I),V=L,{delay:M=0,times:F=Dr(q),type:K="keyframes",repeat:J,repeatType:R,repeatDelay:W=0}=V,j=Ce(V,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:g=e.ease||"easeOut",duration:_}=L;const k=typeof M=="function"?M(B,G):M,U=q.length,E=Dt(K)?K:i==null?void 0:i[K];if(U<=2&&E){let O=100;if(U===2&&ts(q)){const le=q[1]-q[0];O=Math.abs(le)}const H=Q({},j);_!==void 0&&(H.duration=Ee(_));const X=Vr(H,O,E);g=X.ease,_=X.duration}_!=null||(_=o);const x=p+k;F.length===1&&F[0]===0&&(F[1]=1);const C=F.length-q.length;if(C>0&&Mr(F,C),q.length===1&&q.unshift(null),J){Te(J<Qa,"Repeat count too high, must be less than 20"),_=za(_,J);const O=[...q],H=[...F];g=Array.isArray(g)?[...g]:[g];const X=[...g];for(let le=0;le<J;le++){q.push(...O);for(let D=0;D<O.length;D++)F.push(H[D]+(le+1)),g.push(D===0?"linear":Rr(X,D-1))}Ga(F,J)}const P=x+_;Wa(S,q,g,F,x,P),N=Math.max(k+_,N),m=Math.max(P,m)};if(fe(y)){const I=Fr(y,l);w(A,T,Ur("default",I))}else{const I=Lr(y,A,n,d),L=I.length;for(let S=0;S<L;S++){A=A,T=T;const B=I[S],G=Fr(B,l);for(const q in A)w(A[q],Ja(T,q),Ur(q,G),S,L)}}h=p,p+=N}return l.forEach((f,v)=>{for(const y in f){const A=f[y];A.sort(Ya);const T=[],N=[],w=[];for(let L=0;L<A.length;L++){const{at:S,value:B,easing:G}=A[L];T.push(B),N.push(Mt(0,m,S)),w.push(G||"easeOut")}N[0]!==0&&(N.unshift(0),T.unshift(T[0]),w.unshift($a)),N[N.length-1]!==1&&(N.push(1),T.push(null)),c.has(v)||c.set(v,{keyframes:{},transition:{}});const I=c.get(v);I.keyframes[y]=T,I.transition[y]=Q(ae(Q({},e),{duration:m,ease:w,times:N}),t)}}),c}function Fr(r,e){return!e.has(r)&&e.set(r,{}),e.get(r)}function Ur(r,e){return e[r]||(e[r]=[]),e[r]}function Xa(r){return Array.isArray(r)?r:[r]}function Ja(r,e){return r&&r[e]?Q(Q({},r),r[e]):Q({},r)}const es=r=>typeof r=="number",ts=r=>r.every(es),Qe=new WeakMap,rs=r=>Array.isArray(r);function Br(r){const e=[{},{}];return r==null||r.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function jr(r,e,t,n){if(typeof e=="function"){const[i,a]=Br(n);e=e(t!==void 0?t:r.custom,i,a)}if(typeof e=="string"&&(e=r.variants&&r.variants[e]),typeof e=="function"){const[i,a]=Br(n);e=e(t!==void 0?t:r.custom,i,a)}return e}function ns(r,e,t){const n=r.getProps();return jr(n,e,n.custom,r)}const Et=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function is(r,e){let t=new Set,n=new Set,i=!1,a=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(d){s.has(d)&&(l.schedule(d),r()),d(o)}const l={schedule:(d,u=!1,h=!1)=>{const m=h&&i?t:n;return u&&s.add(d),m.has(d)||m.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(o=d,i){a=!0;return}i=!0,[t,n]=[n,t],t.forEach(c),t.clear(),i=!1,a&&(a=!1,l.process(d))}};return l}const Ie={},as=40;function ss(r,e){let t=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>t=!0,s=Et.reduce((T,N)=>(T[N]=is(a),T),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:d,update:u,preRender:h,render:p,postRender:m}=s,f=()=>{const T=Ie.useManualTiming?i.timestamp:performance.now();t=!1,Ie.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(T-i.timestamp,as),1)),i.timestamp=T,i.isProcessing=!0,o.process(i),c.process(i),l.process(i),d.process(i),u.process(i),h.process(i),p.process(i),m.process(i),i.isProcessing=!1,t&&e&&(n=!1,r(f))},v=()=>{t=!0,n=!0,i.isProcessing||r(f)};return{schedule:Et.reduce((T,N)=>{const w=s[N];return T[N]=(I,L=!1,S=!1)=>(t||v(),w.schedule(I,L,S)),T},{}),cancel:T=>{for(let N=0;N<Et.length;N++)s[Et[N]].cancel(T)},state:i,steps:s}}const Me=r=>r,{schedule:xe,cancel:Ft,state:Ct}=ss(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:Me,!0);let wt;function os(){wt=void 0}const be={now:()=>(wt===void 0&&be.set(Ct.isProcessing||Ie.useManualTiming?Ct.timestamp:performance.now()),wt),set:r=>{wt=r,queueMicrotask(os)}},zr=new Set;function Kr(r,e,t){r||zr.has(e)||(console.warn(e),zr.add(e))}class qr{constructor(){this.subscriptions=[]}add(e){return qa(this.subscriptions,e),()=>Sr(this.subscriptions,e)}notify(e,t,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,t,n);else for(let a=0;a<i;a++){const s=this.subscriptions[a];s&&s(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Hr(r,e){return e?r*(1e3/e):0}const Wr=30,ls=r=>!isNaN(parseFloat(r));class cs{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,i=!0)=>{var s,o;const a=be.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();i&&((o=this.events.renderRequest)==null||o.notify(this.current))},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=be.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ls(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Kr(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new qr);const n=this.events[e].add(t);return e==="change"?()=>{n(),xe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Wr)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,Wr);return Hr(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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 e,t;(e=this.dependents)==null||e.clear(),(t=this.events.destroy)==null||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ze(r,e){return new cs(r,e)}function ds(r,e,t){r.hasValue(e)?r.getValue(e).set(t):r.addValue(e,Ze(t))}function us(r){return rs(r)?r[r.length-1]||0:r}function ps(r,e){let s=ns(r,e)||{},{transitionEnd:n={},transition:i={}}=s,a=Ce(s,["transitionEnd","transition"]);a=Q(Q({},a),n);for(const o in a){const c=us(a[o]);ds(r,o,c)}}function hs(r){return!!(fe(r)&&r.add)}function ms(r,e){const t=r.getValue("willChange");if(hs(t))return t.add(e);if(!t&&Ie.WillChange){const n=new Ie.WillChange("auto");r.addValue("willChange",n),n.add(e)}}const Ut=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),fs="data-"+Ut("framerAppearId");function vs(r){return r.props[fs]}const gs=r=>r!==null;function ys(r,{repeat:e,repeatType:t="loop"},n){const i=r.filter(gs),a=e&&t!=="loop"&&e%2===1?0:i.length-1;return i[a]}const De=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ve=new Set(De),bs={type:"spring",stiffness:500,damping:25,restSpeed:10},_s=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),Es={type:"keyframes",duration:.8},Cs={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ws=(r,{keyframes:e})=>e.length>2?Es:Ve.has(r)?r.startsWith("scale")?_s(e[1]):bs:Cs;function As(u){var h=u,{when:r,delay:e,delayChildren:t,staggerChildren:n,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:o,from:c,elapsed:l}=h,d=Ce(h,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}function Gr(r,e){var t,n;return(n=(t=r==null?void 0:r[e])!=null?t:r==null?void 0:r.default)!=null?n:r}const Yr=r=>e=>typeof e=="string"&&e.startsWith(r),$r=Yr("--"),Ts=Yr("var(--"),Bt=r=>Ts(r)?Is.test(r.split("/*")[0].trim()):!1,Is=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Le=(r,e,t)=>t>e?e:t<r?r:t,Fe={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},Xe=ae(Q({},Fe),{transform:r=>Le(0,1,r)}),At=ae(Q({},Fe),{default:1}),Je=r=>Math.round(r*1e5)/1e5,jt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xs(r){return r==null}const Os=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zt=(r,e)=>t=>!!(typeof t=="string"&&Os.test(t)&&t.startsWith(r)||e&&!xs(t)&&Object.prototype.hasOwnProperty.call(t,e)),Qr=(r,e,t)=>n=>{if(typeof n!="string")return n;const[i,a,s,o]=n.match(jt);return{[r]:parseFloat(i),[e]:parseFloat(a),[t]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},Ns=r=>Le(0,255,r),Kt=ae(Q({},Fe),{transform:r=>Math.round(Ns(r))}),Pe={test:zt("rgb","red"),parse:Qr("red","green","blue"),transform:({red:r,green:e,blue:t,alpha:n=1})=>"rgba("+Kt.transform(r)+", "+Kt.transform(e)+", "+Kt.transform(t)+", "+Je(Xe.transform(n))+")"};function Ls(r){let e="",t="",n="",i="";return r.length>5?(e=r.substring(1,3),t=r.substring(3,5),n=r.substring(5,7),i=r.substring(7,9)):(e=r.substring(1,2),t=r.substring(2,3),n=r.substring(3,4),i=r.substring(4,5),e+=e,t+=t,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const qt={test:zt("#"),parse:Ls,transform:Pe.transform},et=r=>({test:e=>typeof e=="string"&&e.endsWith(r)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${r}`}),Oe=et("deg"),Ue=et("%"),$=et("px"),Ps=et("vh"),ks=et("vw"),Zr=ae(Q({},Ue),{parse:r=>Ue.parse(r)/100,transform:r=>Ue.transform(r*100)}),Be={test:zt("hsl","hue"),parse:Qr("hue","saturation","lightness"),transform:({hue:r,saturation:e,lightness:t,alpha:n=1})=>"hsla("+Math.round(r)+", "+Ue.transform(Je(e))+", "+Ue.transform(Je(t))+", "+Je(Xe.transform(n))+")"},he={test:r=>Pe.test(r)||qt.test(r)||Be.test(r),parse:r=>Pe.test(r)?Pe.parse(r):Be.test(r)?Be.parse(r):qt.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Pe.transform(r):Be.transform(r)},Rs=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ss(r){var e,t;return isNaN(r)&&typeof r=="string"&&(((e=r.match(jt))==null?void 0:e.length)||0)+(((t=r.match(Rs))==null?void 0:t.length)||0)>0}const Xr="number",Jr="color",Ms="var",Ds="var(",en="${}",Vs=/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 tt(r){const e=r.toString(),t=[],n={color:[],number:[],var:[]},i=[];let a=0;const o=e.replace(Vs,c=>(he.test(c)?(n.color.push(a),i.push(Jr),t.push(he.parse(c))):c.startsWith(Ds)?(n.var.push(a),i.push(Ms),t.push(c)):(n.number.push(a),i.push(Xr),t.push(parseFloat(c))),++a,en)).split(en);return{values:t,split:o,indexes:n,types:i}}function tn(r){return tt(r).values}function rn(r){const{split:e,types:t}=tt(r),n=e.length;return i=>{let a="";for(let s=0;s<n;s++)if(a+=e[s],i[s]!==void 0){const o=t[s];o===Xr?a+=Je(i[s]):o===Jr?a+=he.transform(i[s]):a+=i[s]}return a}}const Fs=r=>typeof r=="number"?0:r;function Us(r){const e=tn(r);return rn(r)(e.map(Fs))}const je={test:Ss,parse:tn,createTransformer:rn,getAnimatableNone:Us};function Ht(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*(2/3-t)*6:r}function Bs({hue:r,saturation:e,lightness:t,alpha:n}){r/=360,e/=100,t/=100;let i=0,a=0,s=0;if(!e)i=a=s=t;else{const o=t<.5?t*(1+e):t+e-t*e,c=2*t-o;i=Ht(c,o,r+1/3),a=Ht(c,o,r),s=Ht(c,o,r-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:n}}function Tt(r,e){return t=>t>0?e:r}const Wt=(r,e,t)=>{const n=r*r,i=t*(e*e-n)+n;return i<0?0:Math.sqrt(i)},js=[qt,Pe,Be],zs=r=>js.find(e=>e.test(r));function nn(r){const e=zs(r);if($e(!!e,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let t=e.parse(r);return e===Be&&(t=Bs(t)),t}const an=(r,e)=>{const t=nn(r),n=nn(e);if(!t||!n)return Tt(r,e);const i=Q({},t);return a=>(i.red=Wt(t.red,n.red,a),i.green=Wt(t.green,n.green,a),i.blue=Wt(t.blue,n.blue,a),i.alpha=Ye(t.alpha,n.alpha,a),Pe.transform(i))},Gt=new Set(["none","hidden"]);function Ks(r,e){return Gt.has(r)?t=>t<=0?r:e:t=>t>=1?e:r}const qs=(r,e)=>t=>e(r(t)),Yt=(...r)=>r.reduce(qs);function Hs(r,e){return t=>Ye(r,e,t)}function $t(r){return typeof r=="number"?Hs:typeof r=="string"?Bt(r)?Tt:he.test(r)?an:Ys:Array.isArray(r)?sn:typeof r=="object"?he.test(r)?an:Ws:Tt}function sn(r,e){const t=[...r],n=t.length,i=r.map((a,s)=>$t(a)(a,e[s]));return a=>{for(let s=0;s<n;s++)t[s]=i[s](a);return t}}function Ws(r,e){const t=Q(Q({},r),e),n={};for(const i in t)r[i]!==void 0&&e[i]!==void 0&&(n[i]=$t(r[i])(r[i],e[i]));return i=>{for(const a in n)t[a]=n[a](i);return t}}function Gs(r,e){var i;const t=[],n={color:0,var:0,number:0};for(let a=0;a<e.values.length;a++){const s=e.types[a],o=r.indexes[s][n[s]],c=(i=r.values[o])!=null?i:0;t[a]=c,n[s]++}return t}const Ys=(r,e)=>{const t=je.createTransformer(e),n=tt(r),i=tt(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Gt.has(r)&&!i.values.length||Gt.has(e)&&!n.values.length?Ks(r,e):Yt(sn(Gs(n,i),i.values),t):($e(!0,`Complex values '${r}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Tt(r,e))};function on(r,e,t){return typeof r=="number"&&typeof e=="number"&&typeof t=="number"?Ye(r,e,t):$t(r)(r,e)}const $s=r=>{const e=({timestamp:t})=>r(t);return{start:(t=!0)=>xe.update(e,t),stop:()=>Ft(e),now:()=>Ct.isProcessing?Ct.timestamp:be.now()}},ln=(r,e,t=10)=>{let n="";const i=Math.max(Math.round(e/t),2);for(let a=0;a<i;a++)n+=r(a/(i-1))+", ";return`linear(${n.substring(0,n.length-2)})`},Qs=5;function cn(r,e,t){const n=Math.max(e-Qs,0);return Hr(t-r(n),e-n)}const oe={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},dn=.001;function Zs({duration:r=oe.duration,bounce:e=oe.bounce,velocity:t=oe.velocity,mass:n=oe.mass}){let i,a;$e(r<=Ee(oe.maxDuration),"Spring duration must be 10 seconds or less");let s=1-e;s=Le(oe.minDamping,oe.maxDamping,s),r=Le(oe.minDuration,oe.maxDuration,Ae(r)),s<1?(i=l=>{const d=l*s,u=d*r,h=d-t,p=Qt(l,s),m=Math.exp(-u);return dn-h/p*m},a=l=>{const u=l*s*r,h=u*t+t,p=Math.pow(s,2)*Math.pow(l,2)*r,m=Math.exp(-u),f=Qt(Math.pow(l,2),s);return(-i(l)+dn>0?-1:1)*((h-p)*m)/f}):(i=l=>{const d=Math.exp(-l*r),u=(l-t)*r+1;return-.001+d*u},a=l=>{const d=Math.exp(-l*r),u=(t-l)*(r*r);return d*u});const o=5/r,c=Js(i,a,o);if(r=Ee(r),isNaN(c))return{stiffness:oe.stiffness,damping:oe.damping,duration:r};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:s*2*Math.sqrt(n*l),duration:r}}}const Xs=12;function Js(r,e,t){let n=t;for(let i=1;i<Xs;i++)n=n-r(n)/e(n);return n}function Qt(r,e){return r*Math.sqrt(1-e*e)}const eo=["duration","bounce"],to=["stiffness","damping","mass"];function un(r,e){return e.some(t=>r[t]!==void 0)}function ro(r){let e=Q({velocity:oe.velocity,stiffness:oe.stiffness,damping:oe.damping,mass:oe.mass,isResolvedFromDuration:!1},r);if(!un(r,to)&&un(r,eo))if(r.visualDuration){const t=r.visualDuration,n=2*Math.PI/(t*1.2),i=n*n,a=2*Le(.05,1,1-(r.bounce||0))*Math.sqrt(i);e=ae(Q({},e),{mass:oe.mass,stiffness:i,damping:a})}else{const t=Zs(r);e=ae(Q(Q({},e),t),{mass:oe.mass}),e.isResolvedFromDuration=!0}return e}function rt(r=oe.visualDuration,e=oe.bounce){const t=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:e}:r;let{restSpeed:n,restDelta:i}=t;const a=t.keyframes[0],s=t.keyframes[t.keyframes.length-1],o={done:!1,value:a},{stiffness:c,damping:l,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=ro(ae(Q({},t),{velocity:-Ae(t.velocity||0)})),m=h||0,f=l/(2*Math.sqrt(c*d)),v=s-a,y=Ae(Math.sqrt(c/d)),A=Math.abs(v)<5;n||(n=A?oe.restSpeed.granular:oe.restSpeed.default),i||(i=A?oe.restDelta.granular:oe.restDelta.default);let T;if(f<1){const w=Qt(y,f);T=I=>{const L=Math.exp(-f*y*I);return s-L*((m+f*y*v)/w*Math.sin(w*I)+v*Math.cos(w*I))}}else if(f===1)T=w=>s-Math.exp(-y*w)*(v+(m+y*v)*w);else{const w=y*Math.sqrt(f*f-1);T=I=>{const L=Math.exp(-f*y*I),S=Math.min(w*I,300);return s-L*((m+f*y*v)*Math.sinh(S)+w*v*Math.cosh(S))/w}}const N={calculatedDuration:p&&u||null,next:w=>{const I=T(w);if(p)o.done=w>=u;else{let L=w===0?m:0;f<1&&(L=w===0?Ee(m):cn(T,w,I));const S=Math.abs(L)<=n,B=Math.abs(s-I)<=i;o.done=S&&B}return o.value=o.done?s:I,o},toString:()=>{const w=Math.min(Vt(N),_t),I=ln(L=>N.next(w*L).value,w,30);return w+"ms "+I},toTransition:()=>{}};return N}rt.applyToOptions=r=>{const e=Vr(r,100,rt);return r.ease=e.ease,r.duration=Ee(e.duration),r.type="keyframes",r};function Zt({keyframes:r,velocity:e=0,power:t=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:c,restDelta:l=.5,restSpeed:d}){const u=r[0],h={done:!1,value:u},p=S=>o!==void 0&&S<o||c!==void 0&&S>c,m=S=>o===void 0?c:c===void 0||Math.abs(o-S)<Math.abs(c-S)?o:c;let f=t*e;const v=u+f,y=s===void 0?v:s(v);y!==v&&(f=y-u);const A=S=>-f*Math.exp(-S/n),T=S=>y+A(S),N=S=>{const B=A(S),G=T(S);h.done=Math.abs(B)<=l,h.value=h.done?y:G};let w,I;const L=S=>{p(h.value)&&(w=S,I=rt({keyframes:[h.value,m(h.value)],velocity:cn(T,S,h.value),damping:i,stiffness:a,restDelta:l,restSpeed:d}))};return L(0),{calculatedDuration:null,next:S=>{let B=!1;return!I&&w===void 0&&(B=!0,N(S),L(S)),w!==void 0&&S>=w?I.next(S-w):(!B&&N(S),h)}}}function no(r,e,t){const n=[],i=t||Ie.mix||on,a=r.length-1;for(let s=0;s<a;s++){let o=i(r[s],r[s+1]);if(e){const c=Array.isArray(e)?e[s]||Me:e;o=Yt(c,o)}n.push(o)}return n}function io(r,e,{clamp:t=!0,ease:n,mixer:i}={}){const a=r.length;if(Te(a===e.length,"Both input and output ranges must be the same length"),a===1)return()=>e[0];if(a===2&&e[0]===e[1])return()=>e[1];const s=r[0]===r[1];r[0]>r[a-1]&&(r=[...r].reverse(),e=[...e].reverse());const o=no(e,n,i),c=o.length,l=d=>{if(s&&d<r[0])return e[0];let u=0;if(c>1)for(;u<r.length-2&&!(d<r[u+1]);u++);const h=Mt(r[u],r[u+1],d);return o[u](h)};return t?d=>l(Le(r[0],r[a-1],d)):l}function ao(r,e){return r.map(t=>t*e)}const pn=(r,e,t)=>(((1-3*t+3*e)*r+(3*t-6*e))*r+3*e)*r,so=1e-7,oo=12;function lo(r,e,t,n,i){let a,s,o=0;do s=e+(t-e)/2,a=pn(s,n,i)-r,a>0?t=s:e=s;while(Math.abs(a)>so&&++o<oo);return s}function nt(r,e,t,n){if(r===e&&t===n)return Me;const i=a=>lo(a,0,1,r,t);return a=>a===0||a===1?a:pn(i(a),e,n)}const co=nt(.42,0,1,1),uo=nt(0,0,.58,1),hn=nt(.42,0,.58,1),mn=r=>e=>e<=.5?r(2*e)/2:(2-r(2*(1-e)))/2,fn=r=>e=>1-r(1-e),vn=nt(.33,1.53,.69,.99),Xt=fn(vn),gn=mn(Xt),yn=r=>(r*=2)<1?.5*Xt(r):.5*(2-Math.pow(2,-10*(r-1))),Jt=r=>1-Math.sin(Math.acos(r)),po=fn(Jt),bn=mn(Jt),_n=r=>Array.isArray(r)&&typeof r[0]=="number",En={linear:Me,easeIn:co,easeInOut:hn,easeOut:uo,circIn:Jt,circInOut:bn,circOut:po,backIn:Xt,backInOut:gn,backOut:vn,anticipate:yn},ho=r=>typeof r=="string",Cn=r=>{if(_n(r)){Te(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,t,n,i]=r;return nt(e,t,n,i)}else if(ho(r))return Te(En[r]!==void 0,`Invalid easing type '${r}'`),En[r];return r};function mo(r,e){return r.map(()=>e||hn).splice(0,r.length-1)}function ze({duration:r=300,keyframes:e,times:t,ease:n="easeInOut"}){const i=kr(n)?n.map(Cn):Cn(n),a={done:!1,value:e[0]},s=ao(t&&t.length===e.length?t:Dr(e),r),o=io(s,e,{ease:Array.isArray(i)?i:mo(e,i)});return{calculatedDuration:r,next:c=>(a.value=o(c),a.done=c>=r,a)}}const fo=r=>r!==null;function er(r,{repeat:e,repeatType:t="loop"},n,i=1){const a=r.filter(fo),o=i<0||e&&t!=="loop"&&e%2===1?0:a.length-1;return!o||n===void 0?a[o]:n}const vo={decay:Zt,inertia:Zt,tween:ze,keyframes:ze,spring:rt};function wn(r){typeof r.type=="string"&&(r.type=vo[r.type])}class tr{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const go=r=>r/100;class rr extends tr{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,i;const{motionValue:t}=this.options;t&&t.updatedAt!==be.now()&&this.tick(be.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;wn(e);const{type:t=ze,repeat:n=0,repeatDelay:i=0,repeatType:a,velocity:s=0}=e;let{keyframes:o}=e;const c=t||ze;process.env.NODE_ENV!=="production"&&c!==ze&&Te(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),c!==ze&&typeof o[0]!="number"&&(this.mixKeyframes=Yt(go,on(o[0],o[1])),o=[0,100]);const l=c(ae(Q({},e),{keyframes:o}));a==="mirror"&&(this.mirroredGenerator=c(ae(Q({},e),{keyframes:[...o].reverse(),velocity:-s}))),l.calculatedDuration===null&&(l.calculatedDuration=Vt(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:i,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,N=n;if(u){const S=Math.min(this.currentTime,i)/o;let B=Math.floor(S),G=S%1;!G&&S>=1&&(G=1),G===1&&B--,B=Math.min(B,u+1),!!(B%2)&&(h==="reverse"?(G=1-G,p&&(G-=p/o)):h==="mirror"&&(N=s)),T=Le(0,1,G)*o}const w=A?{done:!1,value:d[0]}:N.next(T);a&&(w.value=a(w.value));let{done:I}=w;!A&&c!==null&&(I=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return L&&m!==Zt&&(w.value=er(d,this.options,v,this.speed)),f&&f(w.value),L&&this.finish(),w}then(e,t){return this.finished.then(e,t)}get duration(){return Ae(this.calculatedDuration)}get time(){return Ae(this.currentTime)}set time(e){var t;e=Ee(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(t=this.driver)==null||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(be.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Ae(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:e=$s,startTime:t}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),(a=(i=this.options).onPlay)==null||a.call(i);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=t!=null?t: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(be.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",(t=(e=this.options).onComplete)==null||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(t=(e=this.options).onCancel)==null||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(t=this.driver)==null||t.stop(),e.observe(this)}}function yo(r){var e;for(let t=1;t<r.length;t++)(e=r[t])!=null||(r[t]=r[t-1])}const ke=r=>r*180/Math.PI,nr=r=>{const e=ke(Math.atan2(r[1],r[0]));return ir(e)},bo={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:nr,rotateZ:nr,skewX:r=>ke(Math.atan(r[1])),skewY:r=>ke(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},ir=r=>(r=r%360,r<0&&(r+=360),r),An=nr,Tn=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),In=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),_o={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tn,scaleY:In,scale:r=>(Tn(r)+In(r))/2,rotateX:r=>ir(ke(Math.atan2(r[6],r[5]))),rotateY:r=>ir(ke(Math.atan2(-r[2],r[0]))),rotateZ:An,rotate:An,skewX:r=>ke(Math.atan(r[4])),skewY:r=>ke(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function ar(r){return r.includes("scale")?1:0}function sr(r,e){if(!r||r==="none")return ar(e);const t=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(t)n=_o,i=t;else{const o=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=bo,i=o}if(!i)return ar(e);const a=n[e],s=i[1].split(",").map(Co);return typeof a=="function"?a(s):s[a]}const Eo=(r,e)=>{const{transform:t="none"}=getComputedStyle(r);return sr(t,e)};function Co(r){return parseFloat(r.trim())}const xn=r=>r===Fe||r===$,wo=new Set(["x","y","z"]),Ao=De.filter(r=>!wo.has(r));function To(r){const e=[];return Ao.forEach(t=>{const n=r.getValue(t);n!==void 0&&(e.push([t,n.get()]),n.set(t.startsWith("scale")?1:0))}),e}const Re={width:({x:r},{paddingLeft:e="0",paddingRight:t="0"})=>r.max-r.min-parseFloat(e)-parseFloat(t),height:({y:r},{paddingTop:e="0",paddingBottom:t="0"})=>r.max-r.min-parseFloat(e)-parseFloat(t),top:(r,{top:e})=>parseFloat(e),left:(r,{left:e})=>parseFloat(e),bottom:({y:r},{top:e})=>parseFloat(e)+(r.max-r.min),right:({x:r},{left:e})=>parseFloat(e)+(r.max-r.min),x:(r,{transform:e})=>sr(e,"x"),y:(r,{transform:e})=>sr(e,"y")};Re.translateX=Re.x,Re.translateY=Re.y;const Se=new Set;let or=!1,lr=!1,cr=!1;function On(){if(lr){const r=Array.from(Se).filter(n=>n.needsMeasurement),e=new Set(r.map(n=>n.element)),t=new Map;e.forEach(n=>{const i=To(n);i.length&&(t.set(n,i),n.render())}),r.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();const i=t.get(n);i&&i.forEach(([a,s])=>{var o;(o=n.getValue(a))==null||o.set(s)})}),r.forEach(n=>n.measureEndState()),r.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}lr=!1,or=!1,Se.forEach(r=>r.complete(cr)),Se.clear()}function Nn(){Se.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(lr=!0)})}function Io(){cr=!0,Nn(),On(),cr=!1}class dr{constructor(e,t,n,i,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Se.add(this),or||(or=!0,xe.read(Nn),xe.resolveKeyframes(On))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;if(e[0]===null){const a=i==null?void 0:i.get(),s=e[e.length-1];if(a!==void 0)e[0]=a;else if(n&&t){const o=n.readValue(t,s);o!=null&&(e[0]=o)}e[0]===void 0&&(e[0]=s),i&&a===void 0&&i.set(e[0])}yo(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Se.delete(this)}cancel(){this.state==="scheduled"&&(Se.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const xo=r=>r.startsWith("--");function Oo(r,e,t){xo(e)?r.style.setProperty(e,t):r.style[e]=t}function ur(r){let e;return()=>(e===void 0&&(e=r()),e)}const No=ur(()=>window.ScrollTimeline!==void 0),Lo={};function Po(r,e){const t=ur(r);return()=>{var n;return(n=Lo[e])!=null?n:t()}}const Ln=Po(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),it=([r,e,t,n])=>`cubic-bezier(${r}, ${e}, ${t}, ${n})`,Pn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:it([0,.65,.55,1]),circOut:it([.55,0,1,.45]),backIn:it([.31,.01,.66,-.59]),backOut:it([.33,1.53,.69,.99])};function kn(r,e){if(r)return typeof r=="function"?Ln()?ln(r,e):"ease-out":_n(r)?it(r):Array.isArray(r)?r.map(t=>kn(t,e)||Pn.easeOut):Pn[r]}function ko(r,e,t,{delay:n=0,duration:i=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:c}={},l=void 0){const d={[e]:t};c&&(d.offset=c);const u=kn(o,i);Array.isArray(u)&&(d.easing=u);const h={delay:n,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),r.animate(d,h)}function Ro(t){var n=t,{type:r}=n,e=Ce(n,["type"]);var i,a;return Dt(r)&&Ln()?r.applyToOptions(e):((i=e.duration)!=null||(e.duration=300),(a=e.ease)!=null||(e.ease="easeOut"),e)}class So extends tr{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:n,keyframes:i,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:o,onComplete:c}=e;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=e,Te(typeof e.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const l=Ro(e);this.animation=ko(t,n,i,l,a),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=er(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):Oo(t,n,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;(t=(e=this.animation).finish)==null||t.call(e)}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t;this.isPseudoElement||(t=(e=this.animation).commitStyles)==null||t.call(e)}get duration(){var t,n;const e=((n=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:n.call(t).duration)||0;return Ae(Number(e))}get time(){return Ae(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Ee(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&No()?(this.animation.timeline=e,Me):t(this)}}const Rn={anticipate:yn,backInOut:gn,circInOut:bn};function Mo(r){return r in Rn}function Do(r){typeof r.ease=="string"&&Mo(r.ease)&&(r.ease=Rn[r.ease])}const Sn=10;class Vo extends So{constructor(e){Do(e),wn(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){var d;const l=this.options,{motionValue:t,onUpdate:n,onComplete:i,element:a}=l,s=Ce(l,["motionValue","onUpdate","onComplete","element"]);if(!t)return;if(e!==void 0){t.set(e);return}const o=new rr(ae(Q({},s),{autoplay:!1})),c=Ee((d=this.finishedTime)!=null?d:this.time);t.setWithVelocity(o.sample(c-Sn).value,o.sample(c).value,Sn),o.stop()}}const Mn=(r,e)=>e==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&(je.test(r)||r==="0")&&!r.startsWith("url("));function Fo(r){const e=r[0];if(r.length===1)return!0;for(let t=0;t<r.length;t++)if(r[t]!==e)return!0}function Uo(r,e,t,n){const i=r[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const a=r[r.length-1],s=Mn(i,e),o=Mn(a,e);return $e(s===o,`You are trying to animate ${e} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`),!s||!o?!1:Fo(r)||(t==="spring"||Dt(t))&&n}function Dn(r){return typeof r=="object"&&r!==null}function Bo(r){return Dn(r)&&"offsetHeight"in r}const jo=new Set(["opacity","clipPath","filter","transform"]),zo=ur(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ko(r){var l;const{motionValue:e,name:t,repeatDelay:n,repeatType:i,damping:a,type:s}=r;if(!Bo((l=e==null?void 0:e.owner)==null?void 0:l.current))return!1;const{onUpdate:o,transformTemplate:c}=e.owner.getProps();return zo()&&t&&jo.has(t)&&(t!=="transform"||!c)&&!o&&!n&&i!=="mirror"&&a!==0&&s!=="inertia"}const qo=40;class Ho extends tr{constructor(h){var p=h,{autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",keyframes:o,name:c,motionValue:l,element:d}=p,u=Ce(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=be.now();const m=Q({autoplay:e,delay:t,type:n,repeat:i,repeatDelay:a,repeatType:s,name:c,motionValue:l,element:d},u),f=(d==null?void 0:d.KeyframeResolver)||dr;this.keyframeResolver=new f(o,(y,A,T)=>this.onKeyframesResolved(y,A,m,!T),c,l,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,t,n,i){this.keyframeResolver=void 0;const{name:a,type:s,velocity:o,delay:c,isHandoff:l,onUpdate:d}=n;this.resolvedAt=be.now(),Uo(e,a,s,o)||((Ie.instantAnimations||!c)&&(d==null||d(er(e,n,t))),e[0]=e[e.length-1],n.duration=0,n.repeat=0);const u=i?this.resolvedAt?this.resolvedAt-this.createdAt>qo?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=ae(Q({startTime:u,finalKeyframe:t},n),{keyframes:e}),p=!l&&Ko(h)?new Vo(ae(Q({},h),{element:h.motionValue.owner.current})):new rr(h);p.finished.then(()=>this.notifyFinished()).catch(Me),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(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Io()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Vn=(r,e,t,n={},i,a)=>s=>{const o=Gr(n,r)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Ee(c);const d=ae(Q({keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity()},o),{delay:-l,onUpdate:h=>{e.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:r,motionValue:e,element:a?void 0:i});As(o)||Object.assign(d,ws(r,d)),d.duration&&(d.duration=Ee(d.duration)),d.repeatDelay&&(d.repeatDelay=Ee(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)),(Ie.instantAnimations||Ie.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!a&&e.get()!==void 0){const h=ys(d.keyframes,o);if(h!==void 0){xe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new rr(d):new Ho(d)},Fn=new Set(["width","height","top","left","right","bottom",...De]);function Wo({protectedKeys:r,needsAnimating:e},t){const n=r.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,n}function Go(r,e,{delay:t=0,transitionOverride:n,type:i}={}){var u;let d=e,{transition:a=r.getDefaultTransition(),transitionEnd:s}=d,o=Ce(d,["transition","transitionEnd"]);n&&(a=n);const c=[],l=i&&r.animationState&&r.animationState.getState()[i];for(const h in o){const p=r.getValue(h,(u=r.latestValues[h])!=null?u:null),m=o[h];if(m===void 0||l&&Wo(l,h))continue;const f=Q({delay:t},Gr(a||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(m)&&m===v&&!f.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const T=vs(r);if(T){const N=window.MotionHandoffAnimation(T,h,xe);N!==null&&(f.startTime=N,y=!0)}}ms(r,h),p.start(Vn(h,p,m,r.shouldReduceMotion&&Fn.has(h)?{type:!1}:f,r,y));const A=p.animation;A&&c.push(A)}return s&&Promise.all(c).then(()=>{xe.update(()=>{s&&ps(r,s)})}),c}function Yo({top:r,left:e,right:t,bottom:n}){return{x:{min:e,max:t},y:{min:r,max:n}}}function $o(r,e){if(!e)return r;const t=e({x:r.left,y:r.top}),n=e({x:r.right,y:r.bottom});return{top:t.y,left:t.x,bottom:n.y,right:n.x}}function Qo(r,e){return Yo($o(r.getBoundingClientRect(),e))}const Un={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"]},pr={};for(const r in Un)pr[r]={isEnabled:e=>Un[r].some(t=>!!e[t])};const Bn=()=>({min:0,max:0}),hr=()=>({x:Bn(),y:Bn()}),Zo=typeof window!="undefined",mr={current:null},jn={current:!1};function Xo(){if(jn.current=!0,!!Zo)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),e=()=>mr.current=r.matches;r.addListener(e),e()}else mr.current=!1}function Jo(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function el(r){return typeof r=="string"||Array.isArray(r)}const tl=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function zn(r){return Jo(r.animate)||tl.some(e=>el(r[e]))}function rl(r){return!!(zn(r)||r.variants)}function nl(r,e,t){for(const n in e){const i=e[n],a=t[n];if(fe(i))r.addValue(n,i);else if(fe(a))r.addValue(n,Ze(i,{owner:r}));else if(a!==i)if(r.hasValue(n)){const s=r.getValue(n);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=r.getStaticValue(n);r.addValue(n,Ze(s!==void 0?s:i,{owner:r}))}}for(const n in t)e[n]===void 0&&r.removeValue(n);return e}const Kn=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),qn=r=>/^0[^.\s]+$/u.test(r),il={test:r=>r==="auto",parse:r=>r},Hn=r=>e=>e.test(r),Wn=[Fe,$,Ue,Oe,ks,Ps,il],Gn=r=>Wn.find(Hn(r)),al=[...Wn,he,je],sl=r=>al.find(Hn(r)),ol=new Set(["brightness","contrast","saturate","opacity"]);function ll(r){const[e,t]=r.slice(0,-1).split("(");if(e==="drop-shadow")return r;const[n]=t.match(jt)||[];if(!n)return r;const i=t.replace(n,"");let a=ol.has(e)?1:0;return n!==t&&(a*=100),e+"("+a+i+")"}const cl=/\b([a-z-]*)\(.*?\)/gu,fr=ae(Q({},je),{getAnimatableNone:r=>{const e=r.match(cl);return e?e.map(ll).join(" "):r}}),Yn=ae(Q({},Fe),{transform:Math.round}),vr=ae(Q({borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,radius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,backgroundPositionX:$,backgroundPositionY:$},{rotate:Oe,rotateX:Oe,rotateY:Oe,rotateZ:Oe,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:Oe,skewX:Oe,skewY:Oe,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:Xe,originX:Zr,originY:Zr,originZ:$}),{zIndex:Yn,fillOpacity:Xe,strokeOpacity:Xe,numOctaves:Yn}),dl=ae(Q({},vr),{color:he,backgroundColor:he,outlineColor:he,fill:he,stroke:he,borderColor:he,borderTopColor:he,borderRightColor:he,borderBottomColor:he,borderLeftColor:he,filter:fr,WebkitFilter:fr}),$n=r=>dl[r];function Qn(r,e){let t=$n(r);return t!==fr&&(t=je),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const Zn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Xn{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:a,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=dr,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=be.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,xe.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=s;this.latestValues=c,this.baseTarget=Q({},c),this.initialValues=t.initial?Q({},c):{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.blockInitialAnimation=!!a,this.isControllingVariants=zn(t),this.isVariantNode=rl(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const h=this.scrapeMotionValuesFromProps(t,{},this),{willChange:d}=h,u=Ce(h,["willChange"]);for(const p in u){const m=u[p];c[p]!==void 0&&fe(m)&&m.set(c[p],!1)}}mount(e){this.current=e,Qe.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,n)=>this.bindToMotionValue(n,t)),jn.current||Xo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:mr.current,process.env.NODE_ENV!=="production"&&Kr(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(),Ft(this.notifyUpdate),Ft(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Ve.has(e);n&&this.onBindTransform&&this.onBindTransform();const i=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&xe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),a=t.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),a(),s&&s(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in pr){const t=pr[e];if(!t)continue;const{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){const a=this.features[e];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):hr()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<Zn.length;n++){const i=Zn[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,s=e[a];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=nl(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Ze(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var i;let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!=null?i:this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n=="string"&&(Kn(n)||qn(n))?n=parseFloat(n):!sl(n)&&je.test(t)&&(n=Qn(e,t)),this.setBaseTarget(e,fe(n)?n.get():n)),fe(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var a;const{initial:t}=this.props;let n;if(typeof t=="string"||typeof t=="object"){const s=jr(this.props,t,(a=this.presenceContext)==null?void 0:a.custom);s&&(n=s[e])}if(t&&n!==void 0)return n;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!fe(i)?i:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new qr),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}const ul=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pl(r){const e=ul.exec(r);if(!e)return[,];const[,t,n,i]=e;return[`--${t!=null?t:n}`,i]}const hl=4;function Jn(r,e,t=1){Te(t<=hl,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,i]=pl(r);if(!n)return;const a=window.getComputedStyle(e).getPropertyValue(n);if(a){const s=a.trim();return Kn(s)?parseFloat(s):s}return Bt(i)?Jn(i,e,t+1):i}function ml(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||qn(r):!0}const fl=new Set(["auto","none","0"]);function vl(r,e,t){let n=0,i;for(;n<r.length&&!i;){const a=r[n];typeof a=="string"&&!fl.has(a)&&tt(a).values.length&&(i=r[n]),n++}if(i&&t)for(const a of e)r[a]=Qn(t,i)}class gl extends dr{constructor(e,t,n,i,a){super(e,t,n,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let l=e[c];if(typeof l=="string"&&(l=l.trim(),Bt(l))){const d=Jn(l,t.current);d!==void 0&&(e[c]=d),c===e.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!Fn.has(n)||e.length!==2)return;const[i,a]=e,s=Gn(i),o=Gn(a);if(s!==o)if(xn(s)&&xn(o))for(let c=0;c<e.length;c++){const l=e[c];typeof l=="string"&&(e[c]=parseFloat(l))}else Re[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let i=0;i<e.length;i++)(e[i]===null||ml(e[i]))&&n.push(i);n.length&&vl(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Re[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const i=t[t.length-1];i!==void 0&&e.getValue(n,i).jump(i,!1)}measureEndState(){var o;const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);const a=n.length-1,s=n[a];n[a]=Re[t](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([c,l])=>{e.getValue(c).set(l)}),this.resolveNoneKeyframes()}}class ei extends Xn{constructor(){super(...arguments),this.KeyframeResolver=gl}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;fe(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}const ti=(r,e)=>e&&typeof r=="number"?e.transform(r):r,yl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},bl=De.length;function _l(r,e,t){let n="",i=!0;for(let a=0;a<bl;a++){const s=De[a],o=r[s];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(s.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||t){const l=ti(o,vr[s]);if(!c){i=!1;const d=yl[s]||s;n+=`${d}(${l}) `}t&&(e[s]=l)}}return n=n.trim(),t?n=t(e,i?"":n):i&&(n="none"),n}function ri(r,e,t){const{style:n,vars:i,transformOrigin:a}=r;let s=!1,o=!1;for(const c in e){const l=e[c];if(Ve.has(c)){s=!0;continue}else if($r(c)){i[c]=l;continue}else{const d=ti(l,vr[c]);c.startsWith("origin")?(o=!0,a[c]=d):n[c]=d}}if(e.transform||(s||t?n.transform=_l(e,r.transform,t):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:d=0}=a;n.transformOrigin=`${c} ${l} ${d}`}}function ni(r,{style:e,vars:t},n,i){Object.assign(r.style,e,i&&i.getProjectionStyles(n));for(const a in t)r.style.setProperty(a,t[a])}const El={};function Cl(r,{layout:e,layoutId:t}){return Ve.has(r)||r.startsWith("origin")||(e||t!==void 0)&&(!!El[r]||r==="opacity")}function ii(r,e,t){var a;const{style:n}=r,i={};for(const s in n)(fe(n[s])||e.style&&fe(e.style[s])||Cl(s,r)||((a=t==null?void 0:t.getValue(s))==null?void 0:a.liveStyle)!==void 0)&&(i[s]=n[s]);return i}function wl(r){return window.getComputedStyle(r)}class Al extends ei{constructor(){super(...arguments),this.type="html",this.renderInstance=ni}readValueFromInstance(e,t){var n;if(Ve.has(t))return(n=this.projection)!=null&&n.isProjecting?ar(t):Eo(e,t);{const i=wl(e),a=($r(t)?i.getPropertyValue(t):i[t])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Qo(e,t)}build(e,t,n){ri(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ii(e,t,n)}}function Tl(r,e){return r in e}class Il extends Xn{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(Tl(t,e)){const n=e[t];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return hr()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}}const xl={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ol={offset:"strokeDashoffset",array:"strokeDasharray"};function Nl(r,e,t=1,n=0,i=!0){r.pathLength=1;const a=i?xl:Ol;r[a.offset]=$.transform(-n);const s=$.transform(e),o=$.transform(t);r[a.array]=`${s} ${o}`}function Ll(r,u,c,l,d){var h=u,{attrX:e,attrY:t,attrScale:n,pathLength:i,pathSpacing:a=1,pathOffset:s=0}=h,o=Ce(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var f,v;if(ri(r,o,l),c){r.style.viewBox&&(r.attrs.viewBox=r.style.viewBox);return}r.attrs=r.style,r.style={};const{attrs:p,style:m}=r;p.transform&&(m.transform=p.transform,delete p.transform),(m.transform||p.transformOrigin)&&(m.transformOrigin=(f=p.transformOrigin)!=null?f:"50% 50%",delete p.transformOrigin),m.transform&&(m.transformBox=(v=d==null?void 0:d.transformBox)!=null?v:"fill-box",delete p.transformBox),e!==void 0&&(p.x=e),t!==void 0&&(p.y=t),n!==void 0&&(p.scale=n),i!==void 0&&Nl(p,i,a,s,!1)}const ai=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"]),Pl=r=>typeof r=="string"&&r.toLowerCase()==="svg";function kl(r,e,t,n){ni(r,e,void 0,n);for(const i in e.attrs)r.setAttribute(ai.has(i)?i:Ut(i),e.attrs[i])}function Rl(r,e,t){const n=ii(r,e,t);for(const i in r)if(fe(r[i])||fe(e[i])){const a=De.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[a]=r[i]}return n}class Sl extends ei{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=hr}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Ve.has(t)){const n=$n(t);return n&&n.default||0}return t=ai.has(t)?t:Ut(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Rl(e,t,n)}build(e,t,n){Ll(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,i){kl(e,t,n,i)}mount(e){this.isSVGTag=Pl(e.tagName),super.mount(e)}}function si(r){return Dn(r)&&"ownerSVGElement"in r}function Ml(r){return si(r)&&r.tagName==="svg"}function Dl(r){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},t=si(r)&&!Ml(r)?new Sl(e):new Al(e);t.mount(r),Qe.set(r,t)}function Vl(r){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},t=new Il(e);t.mount(r),Qe.set(r,t)}function Fl(r,e,t){const n=fe(r)?r:Ze(r);return n.start(Vn("",n,e,t)),n.animation}function Ul(r,e){return fe(r)||typeof r=="number"||typeof r=="string"&&!St(e)}function oi(r,e,t,n){const i=[];if(Ul(r,e))i.push(Fl(r,St(e)&&e.default||e,t&&(t.default||t)));else{const a=Lr(r,e,n),s=a.length;Te(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const c=a[o],l=c instanceof Element?Dl:Vl;Qe.has(c)||l(c);const d=Qe.get(c),u=Q({},t);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),i.push(...Go(d,ae(Q({},e),{transition:u}),{}))}}return i}function Bl(r,e,t){const n=[];return Za(r,e,t,{spring:rt}).forEach(({keyframes:a,transition:s},o)=>{n.push(...oi(o,a,s))}),n}class jl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){const t=this.animations.map(n=>n.attachTimeline(e));return()=>{t.forEach((n,i)=>{n&&n(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class zl extends jl{then(e,t){return this.finished.finally(e).then(()=>{})}}function Kl(r){return Array.isArray(r)&&r.some(Array.isArray)}function ql(r){function e(t,n,i){let a=[];return Kl(t)?a=Bl(t,n,r):a=oi(t,n,i,r),new zl(a)}return e}const de=ql(),Z={spinner:"_spinner_1waxg_1",spinnerContainer:"_spinnerContainer_1waxg_5",success:"_success_1waxg_9",successContainer:"_successContainer_1waxg_13",container:"_container_1waxg_17",card:"_card_1waxg_26",warning:"_warning_1waxg_35",svg:"_svg_1waxg_43",srOnly:"_srOnly_1waxg_48"};class li{constructor(){b(this,"template",`
|
|
3
3
|
<svg aria-hidden="true" class="${Z.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
7
|
<span class="${Z.srOnly}">Loading...</span>
|
|
8
|
-
`);b(this,"spinner",document.createElement("div"));this.spinner.setAttribute("role","status"),this.spinner.classList.add(Z.spinnerContainer),this.spinner.innerHTML=this.template}addClass(e){this.spinner.classList.add(e)}removeClass(e){this.spinner.classList.remove(e)}render(){return this.spinner}}const ci={loader:"_loader_nwq3e_1"};class ql{constructor(){b(this,"loader");this.loader=document.createElement("div"),this.loader.classList.add(ci.loader),this.loader.appendChild(new li().render())}setClassName(e){e?this.loader.classList.add(e):this.loader.className=ci.loader}render(){return this.loader}}const pe={checkout:"_checkout_5sq3n_1",hidden:"_hidden_5sq3n_7",formInitial:"_formInitial_5sq3n_11",btnsInitial:"_btnsInitial_5sq3n_16"},gr={buttons:"_buttons_1i8cu_1",hidden:"_hidden_1i8cu_5"},yr={applePay:"_applePay_1m9xd_1",hidden:"_hidden_1m9xd_22"};class Hl{constructor(e){b(this,"element");b(this,"events",{ready:new ie});this.ev=e,this.element=document.createElement("div"),this.element.classList.add(yr.applePay,yr.hidden)}init(e){return z(this,null,function*(){e&&(yield this.ev.initApple(e),this.ev.isAppleAvailable()&&(yield this.ev.renderApple(this.element),this.element.classList.remove(yr.hidden),this.events.ready.emit()))})}addEventListener(e,t){return this.events[e].addListener(t)}render(){return this.element}}const Wl=[{type:"paypal",is_active:!0,order:1},{type:"apple-pay",is_active:!0,order:2},{type:"google-pay",is_active:!0,order:3},{type:"card",is_active:!0,order:4}],Ke={open:{y:0,opacity:1},close:{y:100,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},It={open:{y:0,opacity:1},close:{y:-100,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},me={open:{y:0,opacity:1},close:{y:15,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},_e={open:{y:0,opacity:1,height:"auto"},close:{y:-15,opacity:0,height:0},transition:{duration:.5,type:"spring",bounce:0}};function di(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var br,ui;function Gl(){if(ui)return br;ui=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 br=r,br}var at={},st={},pi;function hi(){if(pi)return st;pi=1,Object.defineProperty(st,"__esModule",{value:!0}),st.clone=void 0;function r(e){return e?JSON.parse(JSON.stringify(e)):null}return st.clone=r,st}var ot={},mi;function Yl(){if(mi)return ot;mi=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.matches=void 0;function r(n,i,a){var s=String(i).length,o=n.substr(0,s),l=parseInt(o,10);return i=parseInt(String(i).substr(0,o.length),10),a=parseInt(String(a).substr(0,o.length),10),l>=i&&l<=a}function e(n,i){return i=String(i),i.substring(0,n.length)===n.substring(0,i.length)}function t(n,i){return Array.isArray(i)?r(n,i[0],i[1]):e(n,i)}return ot.matches=t,ot}var fi;function $l(){if(fi)return at;fi=1,Object.defineProperty(at,"__esModule",{value:!0}),at.addMatchingCardsToResults=void 0;var r=hi(),e=Yl();function t(n,i,a){var s,o;for(s=0;s<i.patterns.length;s++){var l=i.patterns[s];if((0,e.matches)(n,l)){var c=(0,r.clone)(i);Array.isArray(l)?o=String(l[0]).length:o=String(l).length,n.length>=o&&(c.matchStrength=o),a.push(c);break}}}return at.addMatchingCardsToResults=t,at}var lt={},vi;function Ql(){if(vi)return lt;vi=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.isValidInputType=void 0;function r(e){return typeof e=="string"||e instanceof String}return lt.isValidInputType=r,lt}var ct={},gi;function Zl(){if(gi)return ct;gi=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.findBestMatch=void 0;function r(t){var n=t.filter(function(i){return i.matchStrength}).length;return n>0&&n===t.length}function e(t){return r(t)?t.reduce(function(n,i){return!n||Number(n.matchStrength)<Number(i.matchStrength)?i:n}):null}return ct.findBestMatch=e,ct}var dt,yi;function Xl(){if(yi)return dt;yi=1;var r=dt&&dt.__assign||function(){return r=Object.assign||function(m){for(var f,v=1,y=arguments.length;v<y;v++){f=arguments[v];for(var T in f)Object.prototype.hasOwnProperty.call(f,T)&&(m[T]=f[T])}return m},r.apply(this,arguments)},e=Gl(),t=$l(),n=Ql(),i=Zl(),a=hi(),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"},l=[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],c=(0,a.clone)(l);function d(m){return s[m]||e[m]}function u(){return c.map(function(m){return(0,a.clone)(d(m))})}function h(m,f){f===void 0&&(f=!1);var v=c.indexOf(m);if(!f&&v===-1)throw new Error('"'+m+'" is not a supported card type.');return v}function p(m){var f=[];if(!(0,n.isValidInputType)(m))return f;if(m.length===0)return u();c.forEach(function(y){var T=d(y);(0,t.addMatchingCardsToResults)(m,T,f)});var v=(0,i.findBestMatch)(f);return v?[v]:f}return p.getTypeInfo=function(m){return(0,a.clone)(d(m))},p.removeCard=function(m){var f=h(m);c.splice(f,1)},p.addCard=function(m){var f=h(m.type,!0);s[m.type]=m,f===-1&&c.push(m.type)},p.updateCard=function(m,f){var v=s[m]||e[m];if(!v)throw new Error('"'.concat(m,"\" is not a recognized type. Use `addCard` instead.'"));if(f.type&&v.type!==f.type)throw new Error("Cannot overwrite type parameter.");var y=(0,a.clone)(v);y=r(r({},y),f),s[y.type]=y},p.changeOrder=function(m,f){var v=h(m);c.splice(v,1),c.splice(f,0,m)},p.resetModifications=function(){c=(0,a.clone)(l),s={}},p.types=o,dt=p,dt}var qe=Xl();qe.updateCard("visa",{lengths:[16]}),qe.updateCard("unionpay",{gaps:[4,8,12,16]});const Jl=(r,e)=>{const t=qe.getTypeInfo(e),n=r.replace(/\D/g,""),i=(t==null?void 0:t.gaps)||[4,8,12],a=t?Math.max(...t.lengths)+i.length:19,s=[0].concat(i,n.length),o=[];for(let l=0;s[l]<n.length;l++){const c=s[l],d=Math.min(s[l+1],n.length);o.push(n.slice(c,d))}return o.join(" ").slice(0,a)},ec=(r,e)=>{const t=qe.getTypeInfo(e),n=(t==null?void 0:t.code.size)||4;return r.replace(/\D/g,"").slice(0,n)},tc=(r,e)=>{const t=r.replace(/\D/g,"");let n=t.slice(0,2);if(!n)return"";const i=Number(n);if(n!=="01"){if(Number.isNaN(i))return"0";if(i===0||i===1)return`${i}`;if(i>12)return"1";n=i>9?`${i}`:`0${i}`}if(r.length<e.length){const s=Number(r[r.length-1]);if(Number.isNaN(s))return n}const a=t.slice(2,4);return`${n} / ${a}`};var ue=(r=>(r.Invalid="invalid",r.Empty="empty",r.Incomplete="incomplete",r.Unsupported="unsupported",r.Expired="expired",r))(ue||{}),ve=(r=>(r.Visa="visa",r.Mastercard="mastercard",r.AmericanExpress="american-express",r.Discover="discover",r.JCB="jcb",r.DinersClub="diners-club",r.UnionPay="unionpay",r.Maestro="maestro",r))(ve||{});const xt=[{name:"Visa",type:"visa",pattern:/^4/,minLength:16,maxLength:16},{name:"MasterCard",type:"mastercard",pattern:/^5[1-5]/,minLength:16,maxLength:16},{name:"American Express",type:"american-express",pattern:/^3[47]/,minLength:15,maxLength:15},{name:"Discover",type:"discover",pattern:/^6(?:011|5[0-9]{2})/,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}],bi=r=>xt.find(e=>e.pattern.test(r))||null,_i=r=>xt.filter(e=>e.pattern.test(r)),rc=r=>{let e=0,t=!1;for(let n=r.length-1;n>=0;n--){let i=parseInt(r[n]);t&&(i*=2,i>9&&(i-=9)),e+=i,t=!t}return e%10===0},Ei=(r,e)=>{const t=r.replace(/\D/g,"");if(!t)return{isValid:!1,cardType:null,error:ue.Empty};if(!/^\d+$/.test(t))return{isValid:!1,cardType:null,error:ue.Invalid};const n=bi(t);if(n){if(t.length<n.minLength||t.length>n.maxLength)return{isValid:!1,cardType:n.name,error:ue.Incomplete}}else if(t.length<16)return{isValid:!1,cardType:null,error:ue.Incomplete};return n&&e&&!e.includes(n.type)?{isValid:!1,cardType:n.name,error:"unsupported"}:rc(t)?{isValid:!0,cardType:(n==null?void 0:n.name)||null,error:null}:{isValid:!1,cardType:(n==null?void 0:n.name)||null,error:ue.Invalid}},nc=r=>{var e;return!r||typeof r.amount!="number"||!r.currency||!r.country||!r.merchant_id||r.checkout_config&&!((e=r.checkout_config)==null?void 0:e.find(({is_active:n,type:i})=>n&&i==="google-pay"))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:[]}},ic=r=>{var e,t;return!r||typeof r.amount!="number"||!r.currency||!r.country||!r.merchant_id||r.checkout_config&&!((e=r.checkout_config)==null?void 0:e.find(({is_active:i,type:a})=>i&&a==="apple-pay"))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:((t=r.apple_pay_info)==null?void 0:t.line_items)||[]}},ac=(r=[])=>r.reduce((e,t)=>{switch(t){case ve.Visa:return e.push("visa"),e;case ve.Mastercard:return e.push("masterCard"),e;case ve.AmericanExpress:return e.push("amex"),e;case ve.Discover:return e.push("discover"),e;case ve.JCB:return e.push("jcb"),e;case ve.UnionPay:return e.push("chinaUnionPay"),e;default:return e}},[]),_r={googlePay:"_googlePay_1j5ka_1",hidden:"_hidden_1j5ka_17"};class sc{constructor(e){b(this,"element");b(this,"events",{ready:new ie});this.ev=e,this.element=document.createElement("div"),this.element.classList.add(_r.googlePay,_r.hidden)}init(e){return z(this,null,function*(){e&&(yield this.ev.initGoogle(e),yield this.ev.renderGoogle(this.element),this.element.classList.remove(_r.hidden),this.events.ready.emit())})}addEventListener(e,t){return this.events[e].addListener(t)}render(){return this.element}}const Er={paypal:"_paypal_1al9c_1",hidden:"_hidden_1al9c_8"};class oc{constructor(e){b(this,"element");b(this,"events",{ready:new ie});this.paypal=e,this.element=document.createElement("div"),this.element.classList.add(Er.paypal,Er.hidden)}init(e){return z(this,null,function*(){e&&(yield this.paypal.init({clientId:e.clientId,vault:!0}),yield this.paypal.render(this.element,ae(Q({},e),{onApprove:n=>z(this,[n],function*({billingToken:t}){var i;(i=e.onSuccess)==null||i.call(e,t||"")}),onCancel:e.onCancel,onError:e.onError})),this.element.classList.remove(Er.hidden),this.events.ready.emit())})}addEventListener(e,t){return this.events[e].addListener(t)}render(){return this.element}}const lc=r=>({ar:"ar-AB",en:"en-GB",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",nl:"nl-NL",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",sk:"sk-SK",sv:"sv-SE",th:"th-TH",tr:"tr-TR",vi:"vi-VN",zh:"zh-CN"})[r]||"en-US",cc=r=>({en:"en",ar:"ar",cs:"cs",da:"da",de:"de",el:"el",es:"es",fi:"fi",fr:"fr",hr:"hr",id:"id",it:"it",ja:"ja",ko:"ko",ms:"ms",ru:"ru",nl:"nl",pl:"pl",pt:"pt",sv:"sv",th:"th",tr:"tr",zh:"zh"})[r]||"en";class dc{constructor(){b(this,"template",`
|
|
8
|
+
`);b(this,"spinner",document.createElement("div"));this.spinner.setAttribute("role","status"),this.spinner.classList.add(Z.spinnerContainer),this.spinner.innerHTML=this.template}addClass(e){this.spinner.classList.add(e)}removeClass(e){this.spinner.classList.remove(e)}render(){return this.spinner}}const ci={loader:"_loader_nwq3e_1"};class Hl{constructor(){b(this,"loader");this.loader=document.createElement("div"),this.loader.classList.add(ci.loader),this.loader.appendChild(new li().render())}setClassName(e){e?this.loader.classList.add(e):this.loader.className=ci.loader}render(){return this.loader}}const pe={checkout:"_checkout_5sq3n_1",hidden:"_hidden_5sq3n_7",formInitial:"_formInitial_5sq3n_11",btnsInitial:"_btnsInitial_5sq3n_16"},gr={buttons:"_buttons_1i8cu_1",hidden:"_hidden_1i8cu_5"},yr={applePay:"_applePay_1m9xd_1",hidden:"_hidden_1m9xd_22"};class Wl{constructor(e){b(this,"element");b(this,"events",{ready:new ie});this.ev=e,this.element=document.createElement("div"),this.element.classList.add(yr.applePay,yr.hidden)}init(e){return z(this,null,function*(){e&&(yield this.ev.initApple(e),this.ev.isAppleAvailable()&&(yield this.ev.renderApple(this.element),this.element.classList.remove(yr.hidden),this.events.ready.emit()))})}addEventListener(e,t){return this.events[e].addListener(t)}render(){return this.element}}const Gl=[{type:"paypal",is_active:!0,order:1},{type:"apple-pay",is_active:!0,order:2},{type:"google-pay",is_active:!0,order:3},{type:"card",is_active:!0,order:4}],Ke={open:{y:0,opacity:1},close:{y:100,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},It={open:{y:0,opacity:1},close:{y:-100,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},me={open:{y:0,opacity:1},close:{y:15,opacity:0},transition:{duration:.5,type:"spring",bounce:0}},_e={open:{y:0,opacity:1,height:"auto"},close:{y:-15,opacity:0,height:0},transition:{duration:.5,type:"spring",bounce:0}};function di(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var br,ui;function Yl(){if(ui)return br;ui=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 br=r,br}var at={},st={},pi;function hi(){if(pi)return st;pi=1,Object.defineProperty(st,"__esModule",{value:!0}),st.clone=void 0;function r(e){return e?JSON.parse(JSON.stringify(e)):null}return st.clone=r,st}var ot={},mi;function $l(){if(mi)return ot;mi=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.matches=void 0;function r(n,i,a){var s=String(i).length,o=n.substr(0,s),c=parseInt(o,10);return i=parseInt(String(i).substr(0,o.length),10),a=parseInt(String(a).substr(0,o.length),10),c>=i&&c<=a}function e(n,i){return i=String(i),i.substring(0,n.length)===n.substring(0,i.length)}function t(n,i){return Array.isArray(i)?r(n,i[0],i[1]):e(n,i)}return ot.matches=t,ot}var fi;function Ql(){if(fi)return at;fi=1,Object.defineProperty(at,"__esModule",{value:!0}),at.addMatchingCardsToResults=void 0;var r=hi(),e=$l();function t(n,i,a){var s,o;for(s=0;s<i.patterns.length;s++){var c=i.patterns[s];if((0,e.matches)(n,c)){var l=(0,r.clone)(i);Array.isArray(c)?o=String(c[0]).length:o=String(c).length,n.length>=o&&(l.matchStrength=o),a.push(l);break}}}return at.addMatchingCardsToResults=t,at}var lt={},vi;function Zl(){if(vi)return lt;vi=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.isValidInputType=void 0;function r(e){return typeof e=="string"||e instanceof String}return lt.isValidInputType=r,lt}var ct={},gi;function Xl(){if(gi)return ct;gi=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.findBestMatch=void 0;function r(t){var n=t.filter(function(i){return i.matchStrength}).length;return n>0&&n===t.length}function e(t){return r(t)?t.reduce(function(n,i){return!n||Number(n.matchStrength)<Number(i.matchStrength)?i:n}):null}return ct.findBestMatch=e,ct}var dt,yi;function Jl(){if(yi)return dt;yi=1;var r=dt&&dt.__assign||function(){return r=Object.assign||function(m){for(var f,v=1,y=arguments.length;v<y;v++){f=arguments[v];for(var A in f)Object.prototype.hasOwnProperty.call(f,A)&&(m[A]=f[A])}return m},r.apply(this,arguments)},e=Yl(),t=Ql(),n=Zl(),i=Xl(),a=hi(),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,a.clone)(c);function d(m){return s[m]||e[m]}function u(){return l.map(function(m){return(0,a.clone)(d(m))})}function h(m,f){f===void 0&&(f=!1);var v=l.indexOf(m);if(!f&&v===-1)throw new Error('"'+m+'" is not a supported card type.');return v}function p(m){var f=[];if(!(0,n.isValidInputType)(m))return f;if(m.length===0)return u();l.forEach(function(y){var A=d(y);(0,t.addMatchingCardsToResults)(m,A,f)});var v=(0,i.findBestMatch)(f);return v?[v]:f}return p.getTypeInfo=function(m){return(0,a.clone)(d(m))},p.removeCard=function(m){var f=h(m);l.splice(f,1)},p.addCard=function(m){var f=h(m.type,!0);s[m.type]=m,f===-1&&l.push(m.type)},p.updateCard=function(m,f){var v=s[m]||e[m];if(!v)throw new Error('"'.concat(m,"\" is not a recognized type. Use `addCard` instead.'"));if(f.type&&v.type!==f.type)throw new Error("Cannot overwrite type parameter.");var y=(0,a.clone)(v);y=r(r({},y),f),s[y.type]=y},p.changeOrder=function(m,f){var v=h(m);l.splice(v,1),l.splice(f,0,m)},p.resetModifications=function(){l=(0,a.clone)(c),s={}},p.types=o,dt=p,dt}var qe=Jl();qe.updateCard("visa",{lengths:[16]}),qe.updateCard("unionpay",{gaps:[4,8,12,16]});const ec=(r,e)=>{const t=qe.getTypeInfo(e),n=r.replace(/\D/g,""),i=(t==null?void 0:t.gaps)||[4,8,12],a=t?Math.max(...t.lengths)+i.length:19,s=[0].concat(i,n.length),o=[];for(let c=0;s[c]<n.length;c++){const l=s[c],d=Math.min(s[c+1],n.length);o.push(n.slice(l,d))}return o.join(" ").slice(0,a)},tc=(r,e)=>{const t=qe.getTypeInfo(e),n=(t==null?void 0:t.code.size)||4;return r.replace(/\D/g,"").slice(0,n)},rc=(r,e)=>{const t=r.replace(/\D/g,"");let n=t.slice(0,2);if(!n)return"";const i=Number(n);if(n!=="01"){if(Number.isNaN(i))return"0";if(i===0||i===1)return`${i}`;if(i>12)return"1";n=i>9?`${i}`:`0${i}`}if(r.length<e.length){const s=Number(r[r.length-1]);if(Number.isNaN(s))return n}const a=t.slice(2,4);return`${n} / ${a}`};var ue=(r=>(r.Invalid="invalid",r.Empty="empty",r.Incomplete="incomplete",r.Unsupported="unsupported",r.Expired="expired",r))(ue||{}),ve=(r=>(r.Visa="visa",r.Mastercard="mastercard",r.AmericanExpress="american-express",r.Discover="discover",r.JCB="jcb",r.DinersClub="diners-club",r.UnionPay="unionpay",r.Maestro="maestro",r))(ve||{});const xt=[{name:"Visa",type:"visa",pattern:/^4/,minLength:16,maxLength:16},{name:"MasterCard",type:"mastercard",pattern:/^5[1-5]/,minLength:16,maxLength:16},{name:"American Express",type:"american-express",pattern:/^3[47]/,minLength:15,maxLength:15},{name:"Discover",type:"discover",pattern:/^6(?:011|5[0-9]{2})/,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}],bi=r=>xt.find(e=>e.pattern.test(r))||null,_i=r=>xt.filter(e=>e.pattern.test(r)),nc=r=>{let e=0,t=!1;for(let n=r.length-1;n>=0;n--){let i=parseInt(r[n]);t&&(i*=2,i>9&&(i-=9)),e+=i,t=!t}return e%10===0},Ei=(r,e)=>{const t=r.replace(/\D/g,"");if(!t)return{isValid:!1,cardType:null,error:ue.Empty};if(!/^\d+$/.test(t))return{isValid:!1,cardType:null,error:ue.Invalid};const n=bi(t);if(n){if(t.length<n.minLength||t.length>n.maxLength)return{isValid:!1,cardType:n.name,error:ue.Incomplete}}else if(t.length<16)return{isValid:!1,cardType:null,error:ue.Incomplete};return n&&e&&!e.includes(n.type)?{isValid:!1,cardType:n.name,error:"unsupported"}:nc(t)?{isValid:!0,cardType:(n==null?void 0:n.name)||null,error:null}:{isValid:!1,cardType:(n==null?void 0:n.name)||null,error:ue.Invalid}},ic=r=>{var e;return!r||typeof r.amount!="number"||!r.currency||!r.country||!r.merchant_id||r.checkout_config&&!((e=r.checkout_config)==null?void 0:e.find(({is_active:n,type:i})=>n&&i==="google-pay"))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:[]}},ac=r=>{var e,t;return!r||typeof r.amount!="number"||!r.currency||!r.country||!r.merchant_id||r.checkout_config&&!((e=r.checkout_config)==null?void 0:e.find(({is_active:i,type:a})=>i&&a==="apple-pay"))?null:{amount:r.amount,currency:r.currency,country:r.country,merchantId:r.merchant_id,lineItems:((t=r.apple_pay_info)==null?void 0:t.line_items)||[]}},sc=(r=[])=>r.reduce((e,t)=>{switch(t){case ve.Visa:return e.push("visa"),e;case ve.Mastercard:return e.push("masterCard"),e;case ve.AmericanExpress:return e.push("amex"),e;case ve.Discover:return e.push("discover"),e;case ve.JCB:return e.push("jcb"),e;case ve.UnionPay:return e.push("chinaUnionPay"),e;default:return e}},[]),_r={googlePay:"_googlePay_1j5ka_1",hidden:"_hidden_1j5ka_17"};class oc{constructor(e){b(this,"element");b(this,"events",{ready:new ie});this.ev=e,this.element=document.createElement("div"),this.element.classList.add(_r.googlePay,_r.hidden)}init(e){return z(this,null,function*(){e&&(yield this.ev.initGoogle(e),yield this.ev.renderGoogle(this.element),this.element.classList.remove(_r.hidden),this.events.ready.emit())})}addEventListener(e,t){return this.events[e].addListener(t)}render(){return this.element}}const Er={paypal:"_paypal_1al9c_1",hidden:"_hidden_1al9c_8"};class lc{constructor(e){b(this,"element");b(this,"events",{ready:new ie});this.paypal=e,this.element=document.createElement("div"),this.element.classList.add(Er.paypal,Er.hidden)}init(e){return z(this,null,function*(){e&&(yield this.paypal.init({clientId:e.clientId,vault:!0}),yield this.paypal.render(this.element,ae(Q({},e),{onApprove:n=>z(this,[n],function*({billingToken:t}){var i;(i=e.onSuccess)==null||i.call(e,t||"")}),onCancel:e.onCancel,onError:e.onError})),this.element.classList.remove(Er.hidden),this.events.ready.emit())})}addEventListener(e,t){return this.events[e].addListener(t)}render(){return this.element}}const cc=r=>({ar:"ar-AB",en:"en-GB",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",nl:"nl-NL",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",sk:"sk-SK",sv:"sv-SE",th:"th-TH",tr:"tr-TR",vi:"vi-VN",zh:"zh-CN"})[r]||"en-US",dc=r=>({en:"en",ar:"ar",cs:"cs",da:"da",de:"de",el:"el",es:"es",fi:"fi",fr:"fr",hr:"hr",id:"id",it:"it",ja:"ja",ko:"ko",ms:"ms",ru:"ru",nl:"nl",pl:"pl",pt:"pt",sv:"sv",th:"th",tr:"tr",zh:"zh"})[r]||"en";class uc{constructor(){b(this,"template",`
|
|
9
9
|
<svg
|
|
10
10
|
xmlns='http://www.w3.org/2000/svg'
|
|
11
11
|
fill='none'
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<line x1='1' y1='8' x2='27' y2='8'></line>
|
|
21
21
|
</svg>
|
|
22
22
|
<span class="${Z.srOnly}">Pay with</span>
|
|
23
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.card),this.element.innerHTML=this.template}render(){return this.element}}const Ot={button:"_button_1br9w_1",press:"_press_1br9w_21"};class uc{constructor(e){b(this,"element");b(this,"icon",new dc);this.element=document.createElement("button"),this.element.classList.add(Ot.button);const t=document.createElement("span");t.textContent=e.getState().messages.card.compact.button,this.element.append(this.icon.render(),t),this.element.addEventListener("mousedown",()=>this.element.classList.add(Ot.press)),this.element.addEventListener("mouseup",()=>this.element.classList.remove(Ot.press)),this.element.addEventListener("mouseout",()=>this.element.classList.remove(Ot.press)),e.subscribe(({messages:n})=>{t.textContent=n.card.compact.button})}addEventListener(e){return this.element.addEventListener("click",e)}render(){return this.element}}const pc=(r,e,t)=>e.concat(r.filter(n=>e.every(i=>!t(n,i)))),Cr=(r="sandbox")=>({develop:"https://api-dev.paynext.com/v1",sandbox:"https://api-sandbox.paynext.com/v1",production:"https://api.paynext.com/v1"})[r],hc=[{type:"paypal",order:1,is_active:!0},{type:"apple-pay",order:2,is_active:!0},{type:"google-pay",order:3,is_active:!0},{type:"card",order:4,is_active:!0}],mc=(r,e="sandbox")=>z(this,null,function*(){var s,o,l,c,d,u,h,p,m,f,v,y,T,A,N,w,I,L,S,B,G,q,M,F,K,J,R,W,j,g,_,k,U,E,x,C,P,V,O,H,X,le,D,te,ye,ut,pt,ht,mt,ft,vt,gt,yt,bt,Ri,Si,Mi,Di,Vi,Fi,Ui,Bi,ji,zi,Ki,qi,Hi,Wi,Gi,Yi,$i,Qi,Zi,Xi,Ji,ea,ta,ra,na,ia,aa,sa,oa,la,ca,da,ua,pa,ha,ma,fa,va,ga,ya,ba,_a,Ea,Ca,wa,Ta,Aa,Ia,xa,Oa,Na,La,Pa,ka,Ra,Sa,Ma,Da;const t=`${Cr(e)}/payments/create`,n=new Headers;return n.append("Content-Type","application/json"),yield(yield fetch(t,{method:"POST",headers:n,body:JSON.stringify({client_session:r.clientSession,three_ds_session_id:r.threeDsSessionId,type:r.googlePay?"GPAY":r.applePay?"APPLEPAY":r.paypal?"PAYPAL":"CARD",name:(o=(s=r.applePay)==null?void 0:s.billingContact)!=null&&o.givenName?((u=(d=r.applePay)==null?void 0:d.billingContact)==null?void 0:u.givenName)+" "+((p=(h=r.applePay)==null?void 0:h.billingContact)==null?void 0:p.familyName):(c=(l=r.card)==null?void 0:l.metadata)==null?void 0:c.name,phone:(f=(m=r.applePay)==null?void 0:m.shippingContact)==null?void 0:f.phoneNumber,billing_address:r.applePay||r.googlePay?{city:((y=(v=r.applePay)==null?void 0:v.billingContact)==null?void 0:y.locality)||((A=(T=r==null?void 0:r.googlePay)==null?void 0:T.billingAddress)==null?void 0:A.locality)||void 0,country:((w=(N=r.applePay)==null?void 0:N.billingContact)==null?void 0:w.countryCode)||((L=(I=r==null?void 0:r.googlePay)==null?void 0:I.billingAddress)==null?void 0:L.countryCode)||void 0,line1:((G=(B=(S=r.applePay)==null?void 0:S.billingContact)==null?void 0:B.addressLines)==null?void 0:G.at(0))||((M=(q=r==null?void 0:r.googlePay)==null?void 0:q.billingAddress)==null?void 0:M.address1)||void 0,line2:((J=(K=(F=r.applePay)==null?void 0:F.billingContact)==null?void 0:K.addressLines)==null?void 0:J.at(1))||((W=(R=r==null?void 0:r.googlePay)==null?void 0:R.billingAddress)==null?void 0:W.address2)||void 0,postal_code:((g=(j=r.applePay)==null?void 0:j.billingContact)==null?void 0:g.postalCode)||((k=(_=r==null?void 0:r.googlePay)==null?void 0:_.billingAddress)==null?void 0:k.postalCode)||void 0,state:((E=(U=r.applePay)==null?void 0:U.billingContact)==null?void 0:E.administrativeArea)||((C=(x=r==null?void 0:r.googlePay)==null?void 0:x.billingAddress)==null?void 0:C.administrativeArea)||void 0}:void 0,card:r.card||(P=r.googlePay)!=null&&P.card||(V=r.applePay)!=null&&V.card?{bin:(O=r.card)==null?void 0:O.firstSixDigits,bin_data:{brand:((H=r.card)==null?void 0:H.cardBrand)||((le=(X=r.googlePay)==null?void 0:X.card)==null?void 0:le.brand)||((te=(D=r.applePay)==null?void 0:D.card)==null?void 0:te.brand),country:((ye=r.card)==null?void 0:ye.country)||((pt=(ut=r.googlePay)==null?void 0:ut.card)==null?void 0:pt.country)||((mt=(ht=r.applePay)==null?void 0:ht.card)==null?void 0:mt.country),currency_code:((ft=r.card)==null?void 0:ft.currency)||((gt=(vt=r.googlePay)==null?void 0:vt.card)==null?void 0:gt.currency)||((bt=(yt=r.applePay)==null?void 0:yt.card)==null?void 0:bt.currency),funding:((Ri=r.card)==null?void 0:Ri.funding)||((Mi=(Si=r.googlePay)==null?void 0:Si.card)==null?void 0:Mi.funding)||((Vi=(Di=r.applePay)==null?void 0:Di.card)==null?void 0:Vi.funding),issuer:((Fi=r.card)==null?void 0:Fi.issuer)||((Bi=(Ui=r.googlePay)==null?void 0:Ui.card)==null?void 0:Bi.issuer)||((zi=(ji=r.applePay)==null?void 0:ji.card)==null?void 0:zi.issuer),type:((Ki=r.card)==null?void 0:Ki.type)||((Hi=(qi=r.googlePay)==null?void 0:qi.card)==null?void 0:Hi.segment)||((Gi=(Wi=r.applePay)==null?void 0:Wi.card)==null?void 0:Gi.segment)},cvc:(Yi=r.card)==null?void 0:Yi.cvc,exp_month:($i=r.card)!=null&&$i.expMonth||(Zi=(Qi=r.googlePay)==null?void 0:Qi.card)!=null&&Zi.expiry.month?Number(((Xi=r.card)==null?void 0:Xi.expMonth)||((ea=(Ji=r.googlePay)==null?void 0:Ji.card)==null?void 0:ea.expiry.month)):void 0,exp_year:(ta=r.card)!=null&&ta.expYear||(na=(ra=r.googlePay)==null?void 0:ra.card)!=null&&na.expiry.year?Number(((ia=r.card)==null?void 0:ia.expYear)||((sa=(aa=r.googlePay)==null?void 0:aa.card)==null?void 0:sa.expiry.year)):void 0,last4:((oa=r.card)==null?void 0:oa.lastFourDigits)||((ca=(la=r.googlePay)==null?void 0:la.card)==null?void 0:ca.lastFour)||((ua=(da=r.applePay)==null?void 0:da.card)==null?void 0:ua.lastFour),number:((pa=r.card)==null?void 0:pa.number)||((ma=(ha=r.googlePay)==null?void 0:ha.card)==null?void 0:ma.number)}:void 0,paypal:(fa=r.paypal)!=null&&fa.billing_agreement_token.paypalId?{billing_agreement_token:(va=r.paypal)==null?void 0:va.billing_agreement_token.paypalId}:void 0,google_pay:r.googlePay&&r.googlePay.token?{cryptogram:r.googlePay.cryptogram,eci:r.googlePay.eci,exp_month:(ya=(ga=r.googlePay)==null?void 0:ga.card)!=null&&ya.expiry.month||(ba=r.googlePay)!=null&&ba.token.expiry.month?Number(r.googlePay.card.expiry.month||r.googlePay.token.expiry.month):void 0,exp_year:(Ea=(_a=r.googlePay)==null?void 0:_a.card)!=null&&Ea.expiry.year||(Ca=r.googlePay)!=null&&Ca.token.expiry.year?Number(r.googlePay.card.expiry.year||r.googlePay.token.expiry.year):void 0,token:(Ta=(wa=r.googlePay)==null?void 0:wa.token)==null?void 0:Ta.number,token_service_provider:(Ia=(Aa=r.googlePay)==null?void 0:Aa.token)==null?void 0:Ia.tokenServiceProvider}:void 0,apple_pay:r.applePay?{cryptogram:r.applePay.cryptogram,eci:r.applePay.eci,exp_month:(Na=(Oa=(xa=r.applePay)==null?void 0:xa.networkToken)==null?void 0:Oa.expiry)!=null&&Na.month?Number(r.applePay.networkToken.expiry.month):void 0,exp_year:(ka=(Pa=(La=r.applePay)==null?void 0:La.networkToken)==null?void 0:Pa.expiry)!=null&&ka.year?Number(r.applePay.networkToken.expiry.year):void 0,token:(Sa=(Ra=r.applePay)==null?void 0:Ra.networkToken)==null?void 0:Sa.number,token_service_provider:(Da=(Ma=r.applePay)==null?void 0:Ma.networkToken)==null?void 0:Da.tokenServiceProvider}:void 0,braintree:r.braintree?{payment_method_nonce:r.braintree.nonce}:void 0})})).json()}),fc=(r,e="sandbox")=>z(this,null,function*(){const t=`${Cr(e)}/payments/create/billing/agreement`,n=new Headers;return n.append("Content-Type","application/json"),(yield(yield fetch(t,{method:"POST",headers:n,body:JSON.stringify({client_session:r})})).json()).paypal_agreement_token_response.token_id||""}),vc=(r,e="sandbox")=>z(this,null,function*(){const t=`${Cr(e)}/payments/config?client_session_id=${r}`,i=yield(yield fetch(t)).json();return i.checkout_config||(i.checkout_config=hc),i});var Ci=(r=>(r.Card="CARD",r))(Ci||{});const wr={venmo:"_venmo_10t25_1",hidden:"_hidden_10t25_17"},gc={display:"block",height:40,borderRadius:12};class yc{constructor(e){b(this,"isProcessing",!1);b(this,"element");b(this,"venmoButton");b(this,"events",{ready:new ie});this.braintree=e,this.element=document.createElement("div"),this.venmoButton=document.createElement("button"),this.venmoButton.classList.add(wr.venmo,wr.hidden),this.venmoButton.textContent="Venmo",this.element.appendChild(this.venmoButton)}init(e){return z(this,null,function*(){if(e){console.log("Initializing Braintree Venmo with config:",e);try{if(yield this.braintree.init({authorization:e.authorization}),yield this.braintree.createVenmo(),!this.braintree.isBrowserSupported()){console.log("Browser does not support Venmo"),this.handleVenmoError(new Error("Browser does not support Venmo"));return}if(this.displayVenmoButton(e),this.braintree.hasTokenizationResult()){yield this.handleExistingTokenization(e);return}this.element.classList.remove(wr.hidden),this.events.ready.emit()}catch(t){console.error("Error initializing Venmo:",t),this.handleVenmoError(t)}}})}displayVenmoButton(e){Object.assign(this.venmoButton.style,gc),this.venmoButton.addEventListener("click",()=>z(this,null,function*(){if(!this.isProcessing){this.isProcessing=!0,this.venmoButton.disabled=!0;try{const t=yield this.braintree.tokenize();this.handleVenmoSuccess(t,e)}catch(t){this.handleVenmoError(t,e)}finally{this.isProcessing=!1,this.venmoButton.disabled=!1}}}))}handleExistingTokenization(e){return z(this,null,function*(){try{const t=yield this.braintree.tokenize();this.handleVenmoSuccess(t,e)}catch(t){this.handleVenmoError(t,e)}})}handleVenmoSuccess(e,t){var n;console.log("Venmo payment successful:",e),(n=t.onSuccess)==null||n.call(t,e)}handleVenmoError(e,t){var n;console.error("Venmo error:",e),(n=t==null?void 0:t.onError)==null||n.call(t,e)}addEventListener(e,t){return this.events[e].addListener(t)}render(){return this.element}}class bc{constructor(e){b(this,"isAppleReady",!0);b(this,"isGoogleReady",!0);b(this,"isPayPalReady",!0);b(this,"isBraintreeReady",!0);b(this,"buttons");b(this,"applePay");b(this,"googlePay");b(this,"paypal");b(this,"card");b(this,"braintree");b(this,"events",{ready:new ie,open:new ie,error:new ie,cancel:new ie,success:new ie});this.config=e,this.applePay=new Hl(e.service.ev),this.paypal=new oc(e.service.paypal),this.googlePay=new sc(e.service.ev),this.braintree=new yc(e.service.braintree),this.card=new uc(e.state.translate),this.buttons=document.createElement("div"),this.buttons.classList.add(gr.buttons,gr.hidden)}init(){return z(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)}),this.card.addEventListener(()=>this.events.open.emit())})}initApple(){return z(this,null,function*(){this.isAppleReady=!1,this.buttons.appendChild(this.applePay.render());const e=this.config.state.transaction.getState(),{locale:t,supportedCardTypes:n}=this.config.state.checkout.getState(),i=ic(e);try{if(!i)return;yield this.applePay.init({transaction:i,supportedCardTypes:ac(n),locale:lc(t||"en"),onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:a=>this.events.success.emit(ae(Q({},a),{type:"apple"}))})}catch(a){console.error(a)}finally{this.isAppleReady=!0}})}initGoogle(){return z(this,null,function*(){this.isGoogleReady=!1,this.buttons.appendChild(this.googlePay.render());const e=this.config.state.transaction.getState(),{locale:t}=this.config.state.checkout.getState(),n=nc(e);try{if(!n)return;yield this.googlePay.init({transaction:n,locale:cc(t||"en"),onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:i=>this.events.success.emit(ae(Q({},i),{type:"google"}))})}catch(i){console.error(i)}finally{this.isGoogleReady=!0}})}initPayPal(){return z(this,null,function*(){var i,a;this.isPayPalReady=!1,this.buttons.appendChild(this.paypal.render());const e=this.config.state.transaction.getState(),t=this.config.state.checkout.getState(),n=()=>z(this,null,function*(){return yield fc(t.clientToken,t.environment)});try{if(!e)return;yield this.paypal.init({clientId:((i=e==null?void 0:e.paypal_info)==null?void 0:i.client_id)||"",environment:((a=e==null?void 0:e.paypal_info)==null?void 0:a.environment)||"sandbox",createBillingAgreement:n,onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:s=>this.events.success.emit({paypalId:s,type:"paypal"})})}catch(s){console.error(s)}finally{this.isPayPalReady=!0}})}initBraintreeVenmo(){return z(this,null,function*(){var t;this.isBraintreeReady=!1,this.buttons.appendChild(this.braintree.render());const e=this.config.state.transaction.getState();console.log("----- init braintree venmo: ",e);try{if(!e)return;yield this.braintree.init({authorization:((t=e==null?void 0:e.brain_tree_info)==null?void 0:t.client_token)||"",onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:n=>this.events.success.emit({nonce:n.nonce,type:"venmo"})})}catch(n){console.error(n)}finally{this.isBraintreeReady=!0}})}initCard(){return z(this,null,function*(){this.buttons.appendChild(this.card.render())})}initPaymentMethods(){return z(this,null,function*(){const e=this.config.state.transaction.getState(),n=pc(Wl,(e==null?void 0:e.checkout_config)||[],(i,a)=>i.type===a.type).filter(({is_active:i})=>i).sort((i,a)=>i.order-a.order).map(({type:i})=>{switch(i){case"apple-pay":return this.initApple();case"google-pay":return this.initGoogle();case"paypal":return this.initPayPal();case"venmo":return this.initBraintreeVenmo();case"card":return this.initCard();default:throw new Error("Unknown button type")}});yield Promise.all(n),this.handleReady()})}handleReady(){this.isAppleReady&&this.isGoogleReady&&this.isPayPalReady&&this.isBraintreeReady&&this.events.ready.emit()}addEventListener(e,t){return this.events[e].addListener(t)}showButton(){this.buttons.classList.remove(gr.hidden)}render(){return this.buttons}}class _c{constructor(){b(this,"template",`
|
|
23
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.card),this.element.innerHTML=this.template}render(){return this.element}}const Ot={button:"_button_1br9w_1",press:"_press_1br9w_21"};class pc{constructor(e){b(this,"element");b(this,"icon",new uc);this.element=document.createElement("button"),this.element.classList.add(Ot.button);const t=document.createElement("span");t.textContent=e.getState().messages.card.compact.button,this.element.append(this.icon.render(),t),this.element.addEventListener("mousedown",()=>this.element.classList.add(Ot.press)),this.element.addEventListener("mouseup",()=>this.element.classList.remove(Ot.press)),this.element.addEventListener("mouseout",()=>this.element.classList.remove(Ot.press)),e.subscribe(({messages:n})=>{t.textContent=n.card.compact.button})}addEventListener(e){return this.element.addEventListener("click",e)}render(){return this.element}}const hc=(r,e,t)=>e.concat(r.filter(n=>e.every(i=>!t(n,i)))),Cr=(r="sandbox")=>({develop:"https://api-dev.paynext.com",sandbox:"https://api-sandbox.paynext.com",staging:"https://api-staging.paynext.com",production:"https://api.paynext.com"})[r],mc=[{type:"paypal",order:1,is_active:!0},{type:"apple-pay",order:2,is_active:!0},{type:"google-pay",order:3,is_active:!0},{type:"card",order:4,is_active:!0}],fc=(r,e,t)=>z(this,null,function*(){var o,c,l,d,u,h,p,m,f,v,y,A,T,N,w,I,L,S,B,G,q,M,F,K,J,R,W,j,g,_,k,U,E,x,C,P,V,O,H,X,le,D,te,ye,ut,pt,ht,mt,ft,vt,gt,yt,bt,Ri,Si,Mi,Di,Vi,Fi,Ui,Bi,ji,zi,Ki,qi,Hi,Wi,Gi,Yi,$i,Qi,Zi,Xi,Ji,ea,ta,ra,na,ia,aa,sa,oa,la,ca,da,ua,pa,ha,ma,fa,va,ga,ya,ba,_a,Ea,Ca,wa,Aa,Ta,Ia,xa,Oa,Na,La,Pa,ka,Ra,Sa,Ma,Da,Va;const n=`${Cr(e)}/internal/payments/create`,i=new Headers;return i.append("Content-Type","application/json"),i.append("X-API-Version",t),yield(yield fetch(n,{method:"POST",headers:i,body:JSON.stringify({client_session:r.clientSession,three_ds_session_id:r.threeDsSessionId,type:r.googlePay?"GPAY":r.applePay?"APPLEPAY":r.paypal?"PAYPAL":"CARD",name:(c=(o=r.applePay)==null?void 0:o.billingContact)!=null&&c.givenName?((h=(u=r.applePay)==null?void 0:u.billingContact)==null?void 0:h.givenName)+" "+((m=(p=r.applePay)==null?void 0:p.billingContact)==null?void 0:m.familyName):(d=(l=r.card)==null?void 0:l.metadata)==null?void 0:d.name,phone:(v=(f=r.applePay)==null?void 0:f.shippingContact)==null?void 0:v.phoneNumber,billing_address:r.applePay||r.googlePay?{city:((A=(y=r.applePay)==null?void 0:y.billingContact)==null?void 0:A.locality)||((N=(T=r==null?void 0:r.googlePay)==null?void 0:T.billingAddress)==null?void 0:N.locality)||void 0,country:((I=(w=r.applePay)==null?void 0:w.billingContact)==null?void 0:I.countryCode)||((S=(L=r==null?void 0:r.googlePay)==null?void 0:L.billingAddress)==null?void 0:S.countryCode)||void 0,line1:((q=(G=(B=r.applePay)==null?void 0:B.billingContact)==null?void 0:G.addressLines)==null?void 0:q.at(0))||((F=(M=r==null?void 0:r.googlePay)==null?void 0:M.billingAddress)==null?void 0:F.address1)||void 0,line2:((R=(J=(K=r.applePay)==null?void 0:K.billingContact)==null?void 0:J.addressLines)==null?void 0:R.at(1))||((j=(W=r==null?void 0:r.googlePay)==null?void 0:W.billingAddress)==null?void 0:j.address2)||void 0,postal_code:((_=(g=r.applePay)==null?void 0:g.billingContact)==null?void 0:_.postalCode)||((U=(k=r==null?void 0:r.googlePay)==null?void 0:k.billingAddress)==null?void 0:U.postalCode)||void 0,state:((x=(E=r.applePay)==null?void 0:E.billingContact)==null?void 0:x.administrativeArea)||((P=(C=r==null?void 0:r.googlePay)==null?void 0:C.billingAddress)==null?void 0:P.administrativeArea)||void 0}:void 0,card:r.card||(V=r.googlePay)!=null&&V.card||(O=r.applePay)!=null&&O.card?{bin:(H=r.card)==null?void 0:H.firstSixDigits,bin_data:{brand:((X=r.card)==null?void 0:X.cardBrand)||((D=(le=r.googlePay)==null?void 0:le.card)==null?void 0:D.brand)||((ye=(te=r.applePay)==null?void 0:te.card)==null?void 0:ye.brand),country:((ut=r.card)==null?void 0:ut.country)||((ht=(pt=r.googlePay)==null?void 0:pt.card)==null?void 0:ht.country)||((ft=(mt=r.applePay)==null?void 0:mt.card)==null?void 0:ft.country),currency_code:((vt=r.card)==null?void 0:vt.currency)||((yt=(gt=r.googlePay)==null?void 0:gt.card)==null?void 0:yt.currency)||((Ri=(bt=r.applePay)==null?void 0:bt.card)==null?void 0:Ri.currency),funding:((Si=r.card)==null?void 0:Si.funding)||((Di=(Mi=r.googlePay)==null?void 0:Mi.card)==null?void 0:Di.funding)||((Fi=(Vi=r.applePay)==null?void 0:Vi.card)==null?void 0:Fi.funding),issuer:((Ui=r.card)==null?void 0:Ui.issuer)||((ji=(Bi=r.googlePay)==null?void 0:Bi.card)==null?void 0:ji.issuer)||((Ki=(zi=r.applePay)==null?void 0:zi.card)==null?void 0:Ki.issuer),type:((qi=r.card)==null?void 0:qi.type)||((Wi=(Hi=r.googlePay)==null?void 0:Hi.card)==null?void 0:Wi.segment)||((Yi=(Gi=r.applePay)==null?void 0:Gi.card)==null?void 0:Yi.segment)},cvc:($i=r.card)==null?void 0:$i.cvc,exp_month:(Qi=r.card)!=null&&Qi.expMonth||(Xi=(Zi=r.googlePay)==null?void 0:Zi.card)!=null&&Xi.expiry.month?Number(((Ji=r.card)==null?void 0:Ji.expMonth)||((ta=(ea=r.googlePay)==null?void 0:ea.card)==null?void 0:ta.expiry.month)):void 0,exp_year:(ra=r.card)!=null&&ra.expYear||(ia=(na=r.googlePay)==null?void 0:na.card)!=null&&ia.expiry.year?Number(((aa=r.card)==null?void 0:aa.expYear)||((oa=(sa=r.googlePay)==null?void 0:sa.card)==null?void 0:oa.expiry.year)):void 0,last4:((la=r.card)==null?void 0:la.lastFourDigits)||((da=(ca=r.googlePay)==null?void 0:ca.card)==null?void 0:da.lastFour)||((pa=(ua=r.applePay)==null?void 0:ua.card)==null?void 0:pa.lastFour),number:((ha=r.card)==null?void 0:ha.number)||((fa=(ma=r.googlePay)==null?void 0:ma.card)==null?void 0:fa.number)}:void 0,paypal:(va=r.paypal)!=null&&va.billing_agreement_token.paypalId?{billing_agreement_token:(ga=r.paypal)==null?void 0:ga.billing_agreement_token.paypalId}:void 0,google_pay:r.googlePay&&r.googlePay.token?{cryptogram:r.googlePay.cryptogram,eci:r.googlePay.eci,exp_month:(ba=(ya=r.googlePay)==null?void 0:ya.card)!=null&&ba.expiry.month||(_a=r.googlePay)!=null&&_a.token.expiry.month?Number(r.googlePay.card.expiry.month||r.googlePay.token.expiry.month):void 0,exp_year:(Ca=(Ea=r.googlePay)==null?void 0:Ea.card)!=null&&Ca.expiry.year||(wa=r.googlePay)!=null&&wa.token.expiry.year?Number(r.googlePay.card.expiry.year||r.googlePay.token.expiry.year):void 0,token:(Ta=(Aa=r.googlePay)==null?void 0:Aa.token)==null?void 0:Ta.number,token_service_provider:(xa=(Ia=r.googlePay)==null?void 0:Ia.token)==null?void 0:xa.tokenServiceProvider}:void 0,apple_pay:r.applePay?{cryptogram:r.applePay.cryptogram,eci:r.applePay.eci,exp_month:(La=(Na=(Oa=r.applePay)==null?void 0:Oa.networkToken)==null?void 0:Na.expiry)!=null&&La.month?Number(r.applePay.networkToken.expiry.month):void 0,exp_year:(Ra=(ka=(Pa=r.applePay)==null?void 0:Pa.networkToken)==null?void 0:ka.expiry)!=null&&Ra.year?Number(r.applePay.networkToken.expiry.year):void 0,token:(Ma=(Sa=r.applePay)==null?void 0:Sa.networkToken)==null?void 0:Ma.number,token_service_provider:(Va=(Da=r.applePay)==null?void 0:Da.networkToken)==null?void 0:Va.tokenServiceProvider}:void 0,braintree:r.braintree?{payment_method_nonce:r.braintree.nonce}:void 0})})).json()}),vc=(r,e,t)=>z(this,null,function*(){const n=`${Cr(e)}/internal/payments/create/billing/agreement`,i=new Headers;return i.append("Content-Type","application/json"),i.append("X-API-Version",t),(yield(yield fetch(n,{method:"POST",headers:i,body:JSON.stringify({client_session:r})})).json()).paypal_agreement_token_response.token_id||""}),gc=(r,e,t)=>z(this,null,function*(){const n=`${Cr(e)}/internal/payments/config?client_session_id=${r}`,i=new Headers;i.append("X-API-Version",t);const s=yield(yield fetch(n,{headers:i})).json();return s.checkout_config||(s.checkout_config=mc),s});var Ci=(r=>(r.Card="CARD",r))(Ci||{});const wr={venmo:"_venmo_10t25_1",hidden:"_hidden_10t25_17"},yc={display:"block",height:40,borderRadius:12};class bc{constructor(e){b(this,"isProcessing",!1);b(this,"element");b(this,"venmoButton");b(this,"events",{ready:new ie});this.braintree=e,this.element=document.createElement("div"),this.venmoButton=document.createElement("button"),this.venmoButton.classList.add(wr.venmo,wr.hidden),this.venmoButton.textContent="Venmo",this.element.appendChild(this.venmoButton)}init(e){return z(this,null,function*(){if(e){console.log("Initializing Braintree Venmo with config:",e);try{if(yield this.braintree.init({authorization:e.authorization}),yield this.braintree.createVenmo({deepLinkReturnUrl:"https://payment-staging.paynext.com"}),!this.braintree.isBrowserSupported()){console.log("Browser does not support Venmo"),this.handleVenmoError(new Error("Browser does not support Venmo"));return}if(this.displayVenmoButton(e),this.braintree.hasTokenizationResult()){yield this.handleExistingTokenization(e);return}this.element.classList.remove(wr.hidden),this.events.ready.emit()}catch(t){console.error("Error initializing Venmo:",t),this.handleVenmoError(t)}}})}displayVenmoButton(e){Object.assign(this.venmoButton.style,yc),this.venmoButton.addEventListener("click",()=>z(this,null,function*(){if(!this.isProcessing){this.isProcessing=!0,this.venmoButton.disabled=!0;try{const t=yield this.braintree.tokenize();this.handleVenmoSuccess(t,e)}catch(t){this.handleVenmoError(t,e)}finally{this.isProcessing=!1,this.venmoButton.disabled=!1}}}))}handleExistingTokenization(e){return z(this,null,function*(){try{const t=yield this.braintree.tokenize();this.handleVenmoSuccess(t,e)}catch(t){this.handleVenmoError(t,e)}})}handleVenmoSuccess(e,t){var n;console.log("Venmo payment successful:",e),(n=t.onSuccess)==null||n.call(t,e)}handleVenmoError(e,t){var n;console.error("Venmo error:",e),(n=t==null?void 0:t.onError)==null||n.call(t,e)}addEventListener(e,t){return this.events[e].addListener(t)}render(){return this.element}}class _c{constructor(e){b(this,"isAppleReady",!0);b(this,"isGoogleReady",!0);b(this,"isPayPalReady",!0);b(this,"isBraintreeReady",!0);b(this,"buttons");b(this,"applePay");b(this,"googlePay");b(this,"paypal");b(this,"card");b(this,"braintree");b(this,"events",{ready:new ie,open:new ie,error:new ie,cancel:new ie,success:new ie});this.config=e,this.applePay=new Wl(e.service.ev),this.paypal=new lc(e.service.paypal),this.googlePay=new oc(e.service.ev),this.braintree=new bc(e.service.braintree),this.card=new pc(e.state.translate),this.buttons=document.createElement("div"),this.buttons.classList.add(gr.buttons,gr.hidden)}init(){return z(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)}),this.card.addEventListener(()=>this.events.open.emit())})}initApple(){return z(this,null,function*(){this.isAppleReady=!1,this.buttons.appendChild(this.applePay.render());const e=this.config.state.transaction.getState(),{locale:t,supportedCardTypes:n}=this.config.state.checkout.getState(),i=ac(e);try{if(!i)return;yield this.applePay.init({transaction:i,supportedCardTypes:sc(n),locale:cc(t||"en"),onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:a=>this.events.success.emit(ae(Q({},a),{type:"apple"}))})}catch(a){console.error(a)}finally{this.isAppleReady=!0}})}initGoogle(){return z(this,null,function*(){this.isGoogleReady=!1,this.buttons.appendChild(this.googlePay.render());const e=this.config.state.transaction.getState(),{locale:t}=this.config.state.checkout.getState(),n=ic(e);try{if(!n)return;yield this.googlePay.init({transaction:n,locale:dc(t||"en"),onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:i=>this.events.success.emit(ae(Q({},i),{type:"google"}))})}catch(i){console.error(i)}finally{this.isGoogleReady=!0}})}initPayPal(){return z(this,null,function*(){var i,a;this.isPayPalReady=!1,this.buttons.appendChild(this.paypal.render());const e=this.config.state.transaction.getState(),t=this.config.state.checkout.getState(),n=()=>z(this,null,function*(){return yield vc(t.clientToken,t.environment,t.apiVersion)});try{if(!e)return;yield this.paypal.init({clientId:((i=e==null?void 0:e.paypal_info)==null?void 0:i.client_id)||"",environment:((a=e==null?void 0:e.paypal_info)==null?void 0:a.environment)||"sandbox",createBillingAgreement:n,onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:s=>this.events.success.emit({paypalId:s,type:"paypal"})})}catch(s){console.error(s)}finally{this.isPayPalReady=!0}})}initBraintreeVenmo(){return z(this,null,function*(){var t;this.isBraintreeReady=!1,this.buttons.appendChild(this.braintree.render());const e=this.config.state.transaction.getState();console.log("----- init braintree venmo: ",e);try{if(!e)return;yield this.braintree.init({authorization:((t=e==null?void 0:e.brain_tree_info)==null?void 0:t.client_token)||"",onError:()=>this.events.error.emit(),onCancel:()=>this.events.cancel.emit(),onSuccess:n=>this.events.success.emit({nonce:n.nonce,type:"venmo"})})}catch(n){console.error(n)}finally{this.isBraintreeReady=!0}})}initCard(){return z(this,null,function*(){this.buttons.appendChild(this.card.render())})}initPaymentMethods(){return z(this,null,function*(){const e=this.config.state.transaction.getState(),n=hc(Gl,(e==null?void 0:e.checkout_config)||[],(i,a)=>i.type===a.type).filter(({is_active:i})=>i).sort((i,a)=>i.order-a.order).map(({type:i})=>{switch(i){case"apple-pay":return this.initApple();case"google-pay":return this.initGoogle();case"paypal":return this.initPayPal();case"venmo":return this.initBraintreeVenmo();case"card":return this.initCard();default:throw new Error("Unknown button type")}});yield Promise.all(n),this.handleReady()})}handleReady(){this.isAppleReady&&this.isGoogleReady&&this.isPayPalReady&&this.isBraintreeReady&&this.events.ready.emit()}addEventListener(e,t){return this.events[e].addListener(t)}showButton(){this.buttons.classList.remove(gr.hidden)}render(){return this.buttons}}class Ec{constructor(){b(this,"template",`
|
|
24
24
|
<svg
|
|
25
25
|
xmlns='http://www.w3.org/2000/svg'
|
|
26
26
|
width='24'
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<polyline points='15 18 9 12 15 6'></polyline>
|
|
37
37
|
</svg>
|
|
38
38
|
<span class="${Z.srOnly}">Back</span>
|
|
39
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}const
|
|
39
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}const Cc={button:"_button_125my_1"};class wc{constructor(){b(this,"element");b(this,"icon",new Ec);this.element=document.createElement("div"),this.element.classList.add(Cc.button),this.element.appendChild(this.icon.render())}addEventListener(e){return this.element.addEventListener("click",e)}render(){return this.element}}const we={button:"_button_rx9be_1",disabled:"_disabled_rx9be_17",press:"_press_rx9be_22",hidden:"_hidden_rx9be_26",spinner:"_spinner_rx9be_30"};class Ac{constructor(e){b(this,"element");b(this,"spinner",new li);b(this,"message",document.createElement("span"));this.element=document.createElement("button"),this.element.classList.add(we.button),this.spinner.addClass(we.spinner),this.spinner.addClass(we.hidden),this.message.textContent=e.messages().card.pay.button,this.element.append(this.spinner.render(),this.message),this.element.addEventListener("mousedown",()=>this.element.classList.add(we.press)),this.element.addEventListener("mouseup",()=>this.element.classList.remove(we.press)),this.element.addEventListener("mouseout",()=>this.element.classList.remove(we.press)),e.subscribe(t=>{this.message.textContent=t.messages.card.pay.button})}addEventListener(e){return this.element.addEventListener("click",e)}disable(e){e?(this.element.setAttribute("disabled","true"),this.element.classList.add(we.disabled),this.spinner.removeClass(we.hidden)):(this.element.removeAttribute("disabled"),this.element.classList.remove(we.disabled),this.spinner.addClass(we.hidden))}render(){return this.element}}const Nt={cardForm:"_cardForm_isqbi_1",hidden:"_hidden_isqbi_5"},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 Ar{constructor(){b(this,"template",`
|
|
40
40
|
<svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>
|
|
41
41
|
<g fill='none' fill-rule='evenodd' transform='matrix(1 0 0 -1 0 12)'>
|
|
42
42
|
<circle cx='6' cy='3.2' fill='currentColor' r='1'></circle>
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
</g>
|
|
48
48
|
</svg>
|
|
49
49
|
<span class="${Z.srOnly}">Warning</span>
|
|
50
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.warning),this.element.innerHTML=this.template}render(){return this.element}}class Tc{constructor(e){b(this,"id","paynext-card-input-name");b(this,"element");b(this,"inputContainer",document.createElement("div"));b(this,"input",document.createElement("input"));b(this,"label",document.createElement("label"));b(this,"labelText",document.createElement("span"));b(this,"labelError",document.createElement("span"));b(this,"endContent",document.createElement("div"));b(this,"warning",new
|
|
50
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.warning),this.element.innerHTML=this.template}render(){return this.element}}class Tc{constructor(e){b(this,"id","paynext-card-input-name");b(this,"element");b(this,"inputContainer",document.createElement("div"));b(this,"input",document.createElement("input"));b(this,"label",document.createElement("label"));b(this,"labelText",document.createElement("span"));b(this,"labelError",document.createElement("span"));b(this,"endContent",document.createElement("div"));b(this,"warning",new Ar);b(this,"isTouchSubmit",!1);b(this,"isRequired",!1);b(this,"isDisabled",!1);b(this,"isChanged",!1);b(this,"events",{change:new ie});const t=e.messages();this.element=document.createElement("div"),this.element.classList.add(ce.wrapper),this.inputContainer.classList.add(ce.inputContainer),this.input.setAttribute("id",this.id),this.input.setAttribute("auto-complete","cc-name"),this.input.setAttribute("placeholder",t.card.name.placeholder),this.input.classList.add(ce.input),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),this.labelText.textContent=t.card.name.label,this.labelError.textContent=t.card.name.error.required,this.labelError.classList.add(ce.labelError,ce.hidden),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)),e.subscribe(({messages:n})=>{this.input.setAttribute("placeholder",n.card.name.placeholder),this.labelText.textContent=n.card.name.label,this.labelError.textContent=n.card.name.error.required})}validator(e){return e?null:ue.Empty}handleChange(e){this.isDisabled||(this.isRequired=!1,this.isChanged||(this.isChanged=!0),this.events.change.emit({value:e,isValid:this.validator(e)===null}),this.render())}toggleLabelError(e){return z(this,null,function*(){if(e){this.inputContainer.classList.add(ce.errorInput),this.endContent.classList.remove(ce.hidden),this.labelError.classList.remove(ce.hidden),yield de(this.labelError,me.open,me.transition);return}this.inputContainer.classList.remove(ce.errorInput),this.endContent.classList.add(ce.hidden),yield de(this.labelError,me.close,me.transition),this.labelError.classList.add(ce.hidden)})}addEventListener(e,t){return this.events[e].addListener(t)}disable(e){e?(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(e){const t=this.validator(e);return this.isRequired=!!t,this.render(),!t}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 se={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 Ic{constructor(){b(this,"template",`
|
|
51
51
|
<svg
|
|
52
52
|
width='28'
|
|
53
53
|
height='19'
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
</defs>
|
|
76
76
|
</svg>
|
|
77
77
|
<span class="${Z.srOnly}">Unknown card</span>
|
|
78
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class
|
|
78
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class xc{constructor(){b(this,"template",`
|
|
79
79
|
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' class='${Z.svg}'>
|
|
80
80
|
<g fill='none' fill-rule='evenodd'>
|
|
81
81
|
<rect fill='#016fd0' height='16' rx='2' width='24' />
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
</g>
|
|
103
103
|
</svg>
|
|
104
104
|
<span class="${Z.srOnly}">Amex</span>
|
|
105
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class
|
|
105
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Oc{constructor(){b(this,"template",`
|
|
106
106
|
<svg
|
|
107
107
|
xmlns='http://www.w3.org/2000/svg'
|
|
108
108
|
xmlns-xlink='http://www.w3.org/1999/xlink'
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
</g>
|
|
143
143
|
</svg>
|
|
144
144
|
<span class="${Z.srOnly}">Diners Club</span>
|
|
145
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class
|
|
145
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Nc{constructor(){b(this,"template",`
|
|
146
146
|
<svg
|
|
147
147
|
xmlns='http://www.w3.org/2000/svg'
|
|
148
148
|
xmlns-xlink='http://www.w3.org/1999/xlink'
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
</g>
|
|
188
188
|
</svg>
|
|
189
189
|
<span class="${Z.srOnly}">Discover</span>
|
|
190
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class
|
|
190
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Lc{constructor(){b(this,"template",`
|
|
191
191
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${Z.svg}'>
|
|
192
192
|
<g fill='none'>
|
|
193
193
|
<path
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
</g>
|
|
218
218
|
</svg>
|
|
219
219
|
<span class="${Z.srOnly}">JCB</span>
|
|
220
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class
|
|
220
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Pc{constructor(){b(this,"template",`
|
|
221
221
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
222
222
|
<g fill='none' fill-rule='evenodd'>
|
|
223
223
|
<rect fill='#252525' height='16' rx='2' width='24' />
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
</g>
|
|
231
231
|
</svg>
|
|
232
232
|
<span class="${Z.srOnly}">MasterCard</span>
|
|
233
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class
|
|
233
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class kc{constructor(){b(this,"template",`
|
|
234
234
|
<svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
|
|
235
235
|
<g fill='none'>
|
|
236
236
|
<path
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
</g>
|
|
253
253
|
</svg>
|
|
254
254
|
<span class="${Z.srOnly}">Union Pay</span>
|
|
255
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class
|
|
255
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Rc{constructor(){b(this,"template",`
|
|
256
256
|
<svg
|
|
257
257
|
xmlns='http://www.w3.org/2000/svg'
|
|
258
258
|
xmlns-xlink='http://www.w3.org/1999/xlink'
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
</g>
|
|
292
292
|
</svg>
|
|
293
293
|
<span class="${Z.srOnly}">Visa</span>
|
|
294
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class
|
|
294
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Sc{constructor(e){b(this,"id","paynext-card-input-number");b(this,"initialCardTypes",xt.map(e=>e.type));b(this,"element");b(this,"inputContainer",document.createElement("div"));b(this,"input",document.createElement("input"));b(this,"label",document.createElement("label"));b(this,"labelText",document.createElement("span"));b(this,"labelError",document.createElement("span"));b(this,"endContent",document.createElement("div"));b(this,"error",document.createElement("p"));b(this,"unknownCard",new Ic);b(this,"amex",new xc);b(this,"dinerClub",new Oc);b(this,"discover",new Nc);b(this,"jcb",new Lc);b(this,"masterCard",new Pc);b(this,"unionPay",new kc);b(this,"visa",new Rc);b(this,"supportedCardTypes",this.initialCardTypes);b(this,"isTouchSubmit",!1);b(this,"errorMessage","");b(this,"isRequired",!1);b(this,"isDisabled",!1);b(this,"isChanged",!1);b(this,"events",{change:new ie});this.translate=e;const t=e.messages();this.element=document.createElement("div"),this.element.classList.add(se.wrapper),this.inputContainer.classList.add(se.inputContainer),this.input.setAttribute("id",this.id),this.input.setAttribute("auto-complete","cc-number"),this.input.setAttribute("placeholder","1234 1234 1234 1234"),this.input.classList.add(se.input),this.endContent.classList.add(se.endContent),this.endContent.append(...this.getCardIcons()),this.inputContainer.append(this.input,this.endContent),this.label.setAttribute("for",this.id),this.label.classList.add(se.label),this.labelText.textContent=t.card.number.label,this.labelError.textContent=t.card.number.error.required,this.labelError.classList.add(se.labelError,se.hidden),this.label.append(this.labelText,this.labelError),this.error.classList.add(se.error,se.hidden),this.element.append(this.label,this.inputContainer,this.error),this.input.addEventListener("input",n=>{n.stopPropagation(),this.handleChange(this.input.value)}),this.input.addEventListener("paste",n=>{var i;n.preventDefault(),this.handleChange(((i=n.clipboardData)==null?void 0:i.getData("text"))||"")}),this.input.addEventListener("blur",()=>this.validate(this.input.value)),this.translate.subscribe(({messages:n})=>{this.labelText.textContent=n.card.number.label,this.labelError.textContent=n.card.number.error.required,this.render()})}handleChange(e){if(this.isDisabled)return;this.isRequired=!1,this.errorMessage="",this.isChanged||(this.isChanged=!0);const t=_i(e).map(a=>a.type),n=bi(e),i=ec(e,(n==null?void 0:n.type)||"");i.replace(/\D/g,"").length===((n==null?void 0:n.maxLength)||16)&&this.validate(i),this.supportedCardTypes=t.length?t:this.initialCardTypes,this.input.value=i,this.events.change.emit({card:i,cardType:n==null?void 0:n.type,cardTypes:t,isValid:Ei(e,this.supportedCardTypes).isValid}),this.render()}toggleLabelError(e){return z(this,null,function*(){if(e){this.inputContainer.classList.add(se.errorInput),this.labelError.classList.remove(se.hidden),yield de(this.labelError,me.open,me.transition);return}yield de(this.labelError,me.close,me.transition),this.labelError.classList.add(se.hidden)})}toggleErrorMessage(e){return z(this,null,function*(){if(e){this.inputContainer.classList.add(se.errorInput),this.error.textContent=this.errorMessage,this.error.classList.remove(se.hidden),yield de(this.error,_e.open,_e.transition);return}yield de(this.error,_e.close,_e.transition),this.error.classList.add(se.hidden)})}getCardIcons(){return xt.filter(({type:e})=>this.supportedCardTypes.includes(e)).slice(0,3).map(({type:e})=>{switch(e){case ve.Visa:return this.visa.render();case ve.Maestro:case ve.Mastercard:return this.masterCard.render();case ve.DinersClub:return this.dinerClub.render();case ve.JCB:return this.jcb.render();case ve.AmericanExpress:return this.amex.render();case ve.Discover:return this.discover.render();case ve.UnionPay:return this.unionPay.render()}})}addEventListener(e,t){return this.events[e].addListener(t)}disable(e){e?(this.input.setAttribute("disabled","true"),this.input.classList.add(se.disabledInput),this.inputContainer.classList.add(se.disabled)):(this.input.removeAttribute("disabled"),this.input.classList.remove(se.disabledInput),this.inputContainer.classList.remove(se.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){var e;return{value:this.input.value,cardType:((e=_i(this.input.value)[0])==null?void 0:e.type)||""}}validate(e){const t=this.translate.messages(),{isValid:n,error:i}=Ei(e,this.supportedCardTypes);return n?(this.isRequired=!1,this.errorMessage="",this.render(),n):(i===ue.Empty?(this.errorMessage="",this.isRequired=!0):i===ue.Unsupported?(this.errorMessage=t.card.number.error.unsupported,this.isRequired=!1):(this.errorMessage=i===ue.Incomplete?t.card.number.error.incomplete:t.card.number.error.invalid,this.isRequired=!1),this.render(),n)}render(){const e=this.isTouchSubmit||this.isChanged,t=e&&!this.isDisabled&&this.isRequired,n=e&&!this.isDisabled&&!!this.errorMessage;return this.toggleLabelError(t),this.toggleErrorMessage(n),!t&&!n?(this.inputContainer.classList.remove(se.errorInput),this.endContent.innerHTML="",this.endContent.append(...this.getCardIcons())):(this.endContent.innerHTML="",this.endContent.appendChild(this.unknownCard.render())),this.isDisabled?(this.inputContainer.classList.add(se.disabled),this.input.classList.add(se.disabledInput)):(this.inputContainer.classList.remove(se.disabled),this.input.classList.remove(se.disabledInput)),this.element}}const Y={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 Mc{constructor(){b(this,"template",`
|
|
295
295
|
<svg class='${Z.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
|
|
296
296
|
<title>CVC</title>
|
|
297
297
|
<g fill='none' fill-rule='evenodd'>
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
</g>
|
|
311
311
|
</svg>
|
|
312
312
|
<span class="${Z.srOnly}">Card CVC</span>
|
|
313
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Mc{constructor(e){b(this,"cvcId","paynext-card-input-cvc");b(this,"expiryId","paynext-card-input-expiry");b(this,"element");b(this,"warning",new Tr);b(this,"cardCvc",new Sc);b(this,"expiryInputContainer",document.createElement("div"));b(this,"expiryInput",document.createElement("input"));b(this,"expiryLabel",document.createElement("label"));b(this,"expiryLabelText",document.createElement("span"));b(this,"expiryLabelError",document.createElement("span"));b(this,"expiryEndContent",document.createElement("div"));b(this,"expiryError",document.createElement("p"));b(this,"cvcInputContainer",document.createElement("div"));b(this,"cvcInput",document.createElement("input"));b(this,"cvcLabel",document.createElement("label"));b(this,"cvcLabelText",document.createElement("span"));b(this,"cvcLabelError",document.createElement("span"));b(this,"cvcEndContent",document.createElement("div"));b(this,"cvcError",document.createElement("p"));b(this,"cardType",null);b(this,"isTouchSubmit",!1);b(this,"isDisabled",!1);b(this,"expiryPrevValue","");b(this,"expiryErrorMessage","");b(this,"isExpiryRequired",!1);b(this,"isExpiryChanged",!1);b(this,"cvcErrorMessage","");b(this,"isCvcRequired",!1);b(this,"isCvcChanged",!1);b(this,"events",{expiryChange:new ie,cvcChange:new ie});this.translate=e;const t=e.messages();this.element=document.createElement("div"),this.element.classList.add(Y.securityContent),this.expiryInputContainer.classList.add(Y.inputContainer),this.expiryInput.setAttribute("id",this.expiryId),this.expiryInput.setAttribute("auto-complete","cc-expiry"),this.expiryInput.setAttribute("placeholder",t.card.expiry.placeholder),this.expiryInput.classList.add(Y.input),this.expiryEndContent.classList.add(Y.endContent),this.expiryEndContent.appendChild(this.warning.render()),this.expiryInputContainer.append(this.expiryInput,this.expiryEndContent),this.expiryLabel.setAttribute("for",this.expiryId),this.expiryLabel.classList.add(Y.label),this.expiryLabelText.textContent=t.card.expiry.label,this.expiryLabelError.textContent=t.card.expiry.error.required,this.expiryLabelError.classList.add(Y.labelError,Y.hidden),this.expiryLabel.append(this.expiryLabelText,this.expiryLabelError),this.expiryError.classList.add(Y.error,Y.hidden);const n=document.createElement("div");n.appendChild(this.cvcError),this.cvcInputContainer.classList.add(Y.inputContainer),this.cvcInput.setAttribute("id",this.cvcId),this.cvcInput.setAttribute("auto-complete","cc-cvc"),this.cvcInput.setAttribute("placeholder",t.card.cvc.placeholder),this.cvcInput.classList.add(Y.input),this.cvcEndContent.classList.add(Y.endContent),this.cvcEndContent.appendChild(this.cardCvc.render()),this.cvcInputContainer.append(this.cvcInput,this.cvcEndContent),this.cvcLabel.setAttribute("for",this.cvcId),this.cvcLabel.classList.add(Y.label),this.cvcLabelText.textContent=t.card.cvc.label,this.cvcLabelError.textContent=t.card.cvc.error.required,this.cvcLabelError.classList.add(Y.labelError,Y.hidden),this.cvcLabel.append(this.cvcLabelText,this.cvcLabelError),this.cvcError.classList.add(Y.error,Y.hidden);const i=document.createElement("div");i.appendChild(this.cvcError),this.element.append(this.expiryLabel,this.cvcLabel,this.expiryInputContainer,this.cvcInputContainer,n,i),this.expiryInput.addEventListener("input",a=>{a.preventDefault(),this.handleExpiryChange(this.expiryInput.value)}),this.expiryInput.addEventListener("paste",a=>{var s;a.preventDefault(),this.handleExpiryChange(((s=a.clipboardData)==null?void 0:s.getData("text"))||"")}),this.expiryInput.addEventListener("blur",()=>this.validateExpiry(this.expiryInput.value)),this.cvcInput.addEventListener("input",a=>{a.preventDefault(),this.handleCvcChange(this.cvcInput.value)}),this.cvcInput.addEventListener("paste",a=>{var s;a.preventDefault(),this.handleCvcChange(((s=a.clipboardData)==null?void 0:s.getData("text"))||"")}),this.cvcInput.addEventListener("blur",()=>this.validateCvc(this.cvcInput.value)),this.translate.subscribe(({messages:a})=>{this.cvcInput.setAttribute("placeholder",a.card.cvc.placeholder),this.expiryInput.setAttribute("placeholder",a.card.expiry.placeholder),this.expiryLabelText.textContent=a.card.expiry.label,this.cvcLabelText.textContent=a.card.cvc.label,this.expiryLabelError.textContent=a.card.expiry.error.required,this.cvcLabelError.textContent=a.card.cvc.error.required,this.render()})}cvcValidator(e){const t=qe.getTypeInfo(this.cardType||""),n=!e,i=e.length<((t==null?void 0:t.code.size)||3);return!n&&!i?null:n?ue.Empty:ue.Incomplete}validateCvc(e){const t=this.translate.messages(),n=this.cvcValidator(e);if(n){if(n===ue.Empty)this.cvcErrorMessage="",this.isCvcRequired=!0;else{const i=n===ue.Incomplete?t.card.cvc.error.incomplete:t.card.cvc.error.invalid;this.cvcErrorMessage=i,this.isCvcRequired=!1}return this.render(),!n}return this.isCvcRequired=!1,this.cvcErrorMessage="",this.render(),!n}handleCvcChange(e){if(this.isDisabled)return;this.isCvcRequired=!1,this.cvcErrorMessage="",this.isCvcChanged||(this.isCvcChanged=!0);const t=ec(e,this.cardType||""),n=qe.getTypeInfo(this.cardType||"");t.length===(n==null?void 0:n.code.size)&&this.validateCvc(t),this.events.cvcChange.emit({value:t,isValid:this.cvcValidator(t)===null}),this.cvcInput.value=t,this.render()}toggleCvcLabelError(e){return z(this,null,function*(){if(e){this.cvcInputContainer.classList.add(Y.errorInput),this.cvcLabelError.classList.remove(Y.hidden),yield de(this.cvcLabelError,me.open,me.transition);return}yield de(this.cvcLabelError,me.close,me.transition)})}toggleCvcErrorMessage(e){return z(this,null,function*(){if(e){this.cvcInputContainer.classList.add(Y.errorInput),this.cvcError.textContent=this.cvcErrorMessage,this.cvcError.classList.remove(Y.hidden),yield de(this.cvcError,_e.open,_e.transition);return}yield de(this.cvcError,_e.close,_e.transition)})}expiryValidator(e){const t=!e,n=e.length<7,i=new Date,[a,s]=e.split(" / ");i.setFullYear(2e3+parseInt(s),parseInt(a)-1,31);const o=i.getTime()<Date.now();return!t&&!n&&!o?null:t?ue.Empty:n?ue.Incomplete:i.getFullYear()===new Date().getFullYear()?"dateExpired":"expired"}validateExpiry(e){const t=this.translate.messages(),n=this.expiryValidator(e);if(n){if(n===ue.Empty)this.expiryErrorMessage="",this.isExpiryRequired=!0;else{let i=t.card.expiry.error.invalid;n==="expired"?i=t.card.expiry.error.expired.replace("{date}","year"):n==="dateExpired"?i=t.card.expiry.error.expired.replace("{date}","date"):n===ue.Incomplete&&(i=t.card.expiry.error.incomplete),this.isExpiryRequired=!1,this.expiryErrorMessage=i}return this.render(),!n}return this.isExpiryRequired=!1,this.expiryErrorMessage="",this.render(),!n}handleExpiryChange(e){if(this.isDisabled)return;this.isExpiryRequired=!1,this.expiryErrorMessage="",this.isExpiryChanged||(this.isExpiryChanged=!0);const t=tc(e,this.expiryPrevValue);t.length===7&&this.validateExpiry(t),this.events.expiryChange.emit({value:t,isValid:this.expiryValidator(t)===null}),this.expiryPrevValue=t,this.expiryInput.value=t,this.render()}toggleExpiryLabelError(e){return z(this,null,function*(){if(e){this.expiryInputContainer.classList.add(Y.errorInput),this.expiryLabelError.classList.remove(Y.hidden),yield de(this.expiryLabelError,me.open,me.transition);return}yield de(this.expiryLabelError,me.close,me.transition),this.expiryLabelError.classList.add(Y.hidden)})}toggleExpiryErrorMessage(e){return z(this,null,function*(){if(e){this.expiryInputContainer.classList.add(Y.errorInput),this.expiryError.textContent=this.expiryErrorMessage,this.expiryError.classList.remove(Y.hidden),yield de(this.expiryError,_e.open,_e.transition);return}yield de(this.expiryError,_e.close,_e.transition),this.expiryError.classList.add(Y.hidden)})}addEventListener(e,t){return this.events[e].addListener(t)}disable(e){e?(this.expiryInput.setAttribute("disabled","true"),this.expiryInput.classList.add(Y.disabledInput),this.expiryInputContainer.classList.add(Y.disabled),this.cvcInput.setAttribute("disabled","true"),this.cvcInput.classList.add(Y.disabledInput),this.cvcInputContainer.classList.add(Y.disabled)):(this.expiryInput.removeAttribute("disabled"),this.expiryInput.classList.remove(Y.disabledInput),this.expiryInputContainer.classList.remove(Y.disabled),this.cvcInput.removeAttribute("disabled"),this.cvcInput.classList.remove(Y.disabledInput),this.cvcInputContainer.classList.remove(Y.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){return{expiry:this.expiryInput.value,cvc:this.cvcInput.value}}validate({expiry:e,cvc:t}){const n=this.validateExpiry(e),i=this.validateCvc(t);return n&&i}updateCardType(e){this.cardType=e,this.handleCvcChange(this.cvcInput.value)}render(){const e=this.isTouchSubmit||this.isExpiryChanged,t=e&&!this.isDisabled&&this.isExpiryRequired,n=e&&!this.isDisabled&&!!this.expiryErrorMessage;this.toggleExpiryLabelError(t),this.toggleExpiryErrorMessage(n),!t&&!n?(this.expiryInputContainer.classList.remove(Y.errorInput),this.expiryEndContent.classList.add(Y.hidden)):this.expiryEndContent.classList.remove(Y.hidden);const i=this.isTouchSubmit||this.isCvcChanged,a=i&&!this.isDisabled&&this.isCvcRequired,s=i&&!this.isDisabled&&!!this.cvcErrorMessage;return this.toggleCvcLabelError(a),this.toggleCvcErrorMessage(s),!a&&!s?(this.cvcInputContainer.classList.remove(Y.errorInput),this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.cardCvc.render())):(this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.warning.render())),this.isDisabled?(this.expiryInputContainer.classList.add(Y.disabled),this.expiryInput.classList.add(Y.disabledInput),this.cvcInputContainer.classList.add(Y.disabled),this.cvcInput.classList.add(Y.disabledInput)):(this.expiryInputContainer.classList.remove(Y.disabled),this.expiryInput.classList.remove(Y.disabledInput),this.cvcInputContainer.classList.remove(Y.disabled),this.cvcInput.classList.remove(Y.disabledInput)),this.element}}const wi={container:"_container_94v1h_1",title:"_title_94v1h_10"};class Ti{constructor(e){b(this,"element");b(this,"message",document.createElement("p"));b(this,"icon",new Tr);this.translate=e,this.element=document.createElement("div"),this.element.classList.add(wi.container),this.message.classList.add(wi.title),this.message.textContent=e.messages().status.error,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:t})=>{this.message.textContent=t.status.success})}addClassName(e){this.element.classList.add(e)}removeClassName(e){this.element.classList.remove(e)}render(){return this.element}}class Dc{constructor(e,t){b(this,"element");b(this,"error");b(this,"submit");b(this,"back");b(this,"number");b(this,"name");b(this,"cardSecurity");b(this,"events",{submit:new ie,close:new ie});this.element=document.createElement("form"),this.error=new Ti(e),this.submit=new wc(e),this.back=new Cc,this.number=new Rc(e),this.name=new Tc(e),this.cardSecurity=new Mc(e),this.error.addClassName(Nt.hidden),this.element.classList.add(Nt.cardForm,t||""),this.element.append(this.back.render(),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:n})=>this.cardSecurity.updateCardType(n||null)),this.submit.addEventListener(n=>{n.preventDefault();const{cvc:i,expiry:a}=this.cardSecurity.value(),{value:s,cardType:o}=this.number.value();this.events.submit.emit({number:s,expiry:a,cvc:i,name:this.name.value(),cardBrand:o})})}addEventListener(e,t){return this.events[e].addListener(t)}setLoading(e){this.cardSecurity.disable(e),this.name.disable(e),this.number.disable(e),this.submit.disable(e)}touchSubmit(){this.cardSecurity.touchSubmit(),this.name.touchSubmit(),this.number.touchSubmit()}validate(){const e=this.number.validate(this.number.value().value),t=this.name.validate(this.name.value()),n=this.cardSecurity.validate(this.cardSecurity.value());return e&&t&&n}showError(){this.error.removeClassName(Nt.hidden)}hideError(){this.error.addClassName(Nt.hidden)}render(){return this.element}}class Vc{constructor(){b(this,"template",`
|
|
313
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.container),this.element.innerHTML=this.template}render(){return this.element}}class Dc{constructor(e){b(this,"cvcId","paynext-card-input-cvc");b(this,"expiryId","paynext-card-input-expiry");b(this,"element");b(this,"warning",new Ar);b(this,"cardCvc",new Mc);b(this,"expiryInputContainer",document.createElement("div"));b(this,"expiryInput",document.createElement("input"));b(this,"expiryLabel",document.createElement("label"));b(this,"expiryLabelText",document.createElement("span"));b(this,"expiryLabelError",document.createElement("span"));b(this,"expiryEndContent",document.createElement("div"));b(this,"expiryError",document.createElement("p"));b(this,"cvcInputContainer",document.createElement("div"));b(this,"cvcInput",document.createElement("input"));b(this,"cvcLabel",document.createElement("label"));b(this,"cvcLabelText",document.createElement("span"));b(this,"cvcLabelError",document.createElement("span"));b(this,"cvcEndContent",document.createElement("div"));b(this,"cvcError",document.createElement("p"));b(this,"cardType",null);b(this,"isTouchSubmit",!1);b(this,"isDisabled",!1);b(this,"expiryPrevValue","");b(this,"expiryErrorMessage","");b(this,"isExpiryRequired",!1);b(this,"isExpiryChanged",!1);b(this,"cvcErrorMessage","");b(this,"isCvcRequired",!1);b(this,"isCvcChanged",!1);b(this,"events",{expiryChange:new ie,cvcChange:new ie});this.translate=e;const t=e.messages();this.element=document.createElement("div"),this.element.classList.add(Y.securityContent),this.expiryInputContainer.classList.add(Y.inputContainer),this.expiryInput.setAttribute("id",this.expiryId),this.expiryInput.setAttribute("auto-complete","cc-expiry"),this.expiryInput.setAttribute("placeholder",t.card.expiry.placeholder),this.expiryInput.classList.add(Y.input),this.expiryEndContent.classList.add(Y.endContent),this.expiryEndContent.appendChild(this.warning.render()),this.expiryInputContainer.append(this.expiryInput,this.expiryEndContent),this.expiryLabel.setAttribute("for",this.expiryId),this.expiryLabel.classList.add(Y.label),this.expiryLabelText.textContent=t.card.expiry.label,this.expiryLabelError.textContent=t.card.expiry.error.required,this.expiryLabelError.classList.add(Y.labelError,Y.hidden),this.expiryLabel.append(this.expiryLabelText,this.expiryLabelError),this.expiryError.classList.add(Y.error,Y.hidden);const n=document.createElement("div");n.appendChild(this.cvcError),this.cvcInputContainer.classList.add(Y.inputContainer),this.cvcInput.setAttribute("id",this.cvcId),this.cvcInput.setAttribute("auto-complete","cc-cvc"),this.cvcInput.setAttribute("placeholder",t.card.cvc.placeholder),this.cvcInput.classList.add(Y.input),this.cvcEndContent.classList.add(Y.endContent),this.cvcEndContent.appendChild(this.cardCvc.render()),this.cvcInputContainer.append(this.cvcInput,this.cvcEndContent),this.cvcLabel.setAttribute("for",this.cvcId),this.cvcLabel.classList.add(Y.label),this.cvcLabelText.textContent=t.card.cvc.label,this.cvcLabelError.textContent=t.card.cvc.error.required,this.cvcLabelError.classList.add(Y.labelError,Y.hidden),this.cvcLabel.append(this.cvcLabelText,this.cvcLabelError),this.cvcError.classList.add(Y.error,Y.hidden);const i=document.createElement("div");i.appendChild(this.cvcError),this.element.append(this.expiryLabel,this.cvcLabel,this.expiryInputContainer,this.cvcInputContainer,n,i),this.expiryInput.addEventListener("input",a=>{a.preventDefault(),this.handleExpiryChange(this.expiryInput.value)}),this.expiryInput.addEventListener("paste",a=>{var s;a.preventDefault(),this.handleExpiryChange(((s=a.clipboardData)==null?void 0:s.getData("text"))||"")}),this.expiryInput.addEventListener("blur",()=>this.validateExpiry(this.expiryInput.value)),this.cvcInput.addEventListener("input",a=>{a.preventDefault(),this.handleCvcChange(this.cvcInput.value)}),this.cvcInput.addEventListener("paste",a=>{var s;a.preventDefault(),this.handleCvcChange(((s=a.clipboardData)==null?void 0:s.getData("text"))||"")}),this.cvcInput.addEventListener("blur",()=>this.validateCvc(this.cvcInput.value)),this.translate.subscribe(({messages:a})=>{this.cvcInput.setAttribute("placeholder",a.card.cvc.placeholder),this.expiryInput.setAttribute("placeholder",a.card.expiry.placeholder),this.expiryLabelText.textContent=a.card.expiry.label,this.cvcLabelText.textContent=a.card.cvc.label,this.expiryLabelError.textContent=a.card.expiry.error.required,this.cvcLabelError.textContent=a.card.cvc.error.required,this.render()})}cvcValidator(e){const t=qe.getTypeInfo(this.cardType||""),n=!e,i=e.length<((t==null?void 0:t.code.size)||3);return!n&&!i?null:n?ue.Empty:ue.Incomplete}validateCvc(e){const t=this.translate.messages(),n=this.cvcValidator(e);if(n){if(n===ue.Empty)this.cvcErrorMessage="",this.isCvcRequired=!0;else{const i=n===ue.Incomplete?t.card.cvc.error.incomplete:t.card.cvc.error.invalid;this.cvcErrorMessage=i,this.isCvcRequired=!1}return this.render(),!n}return this.isCvcRequired=!1,this.cvcErrorMessage="",this.render(),!n}handleCvcChange(e){if(this.isDisabled)return;this.isCvcRequired=!1,this.cvcErrorMessage="",this.isCvcChanged||(this.isCvcChanged=!0);const t=tc(e,this.cardType||""),n=qe.getTypeInfo(this.cardType||"");t.length===(n==null?void 0:n.code.size)&&this.validateCvc(t),this.events.cvcChange.emit({value:t,isValid:this.cvcValidator(t)===null}),this.cvcInput.value=t,this.render()}toggleCvcLabelError(e){return z(this,null,function*(){if(e){this.cvcInputContainer.classList.add(Y.errorInput),this.cvcLabelError.classList.remove(Y.hidden),yield de(this.cvcLabelError,me.open,me.transition);return}yield de(this.cvcLabelError,me.close,me.transition)})}toggleCvcErrorMessage(e){return z(this,null,function*(){if(e){this.cvcInputContainer.classList.add(Y.errorInput),this.cvcError.textContent=this.cvcErrorMessage,this.cvcError.classList.remove(Y.hidden),yield de(this.cvcError,_e.open,_e.transition);return}yield de(this.cvcError,_e.close,_e.transition)})}expiryValidator(e){const t=!e,n=e.length<7,i=new Date,[a,s]=e.split(" / ");i.setFullYear(2e3+parseInt(s),parseInt(a)-1,31);const o=i.getTime()<Date.now();return!t&&!n&&!o?null:t?ue.Empty:n?ue.Incomplete:i.getFullYear()===new Date().getFullYear()?"dateExpired":"expired"}validateExpiry(e){const t=this.translate.messages(),n=this.expiryValidator(e);if(n){if(n===ue.Empty)this.expiryErrorMessage="",this.isExpiryRequired=!0;else{let i=t.card.expiry.error.invalid;n==="expired"?i=t.card.expiry.error.expired.replace("{date}","year"):n==="dateExpired"?i=t.card.expiry.error.expired.replace("{date}","date"):n===ue.Incomplete&&(i=t.card.expiry.error.incomplete),this.isExpiryRequired=!1,this.expiryErrorMessage=i}return this.render(),!n}return this.isExpiryRequired=!1,this.expiryErrorMessage="",this.render(),!n}handleExpiryChange(e){if(this.isDisabled)return;this.isExpiryRequired=!1,this.expiryErrorMessage="",this.isExpiryChanged||(this.isExpiryChanged=!0);const t=rc(e,this.expiryPrevValue);t.length===7&&this.validateExpiry(t),this.events.expiryChange.emit({value:t,isValid:this.expiryValidator(t)===null}),this.expiryPrevValue=t,this.expiryInput.value=t,this.render()}toggleExpiryLabelError(e){return z(this,null,function*(){if(e){this.expiryInputContainer.classList.add(Y.errorInput),this.expiryLabelError.classList.remove(Y.hidden),yield de(this.expiryLabelError,me.open,me.transition);return}yield de(this.expiryLabelError,me.close,me.transition),this.expiryLabelError.classList.add(Y.hidden)})}toggleExpiryErrorMessage(e){return z(this,null,function*(){if(e){this.expiryInputContainer.classList.add(Y.errorInput),this.expiryError.textContent=this.expiryErrorMessage,this.expiryError.classList.remove(Y.hidden),yield de(this.expiryError,_e.open,_e.transition);return}yield de(this.expiryError,_e.close,_e.transition),this.expiryError.classList.add(Y.hidden)})}addEventListener(e,t){return this.events[e].addListener(t)}disable(e){e?(this.expiryInput.setAttribute("disabled","true"),this.expiryInput.classList.add(Y.disabledInput),this.expiryInputContainer.classList.add(Y.disabled),this.cvcInput.setAttribute("disabled","true"),this.cvcInput.classList.add(Y.disabledInput),this.cvcInputContainer.classList.add(Y.disabled)):(this.expiryInput.removeAttribute("disabled"),this.expiryInput.classList.remove(Y.disabledInput),this.expiryInputContainer.classList.remove(Y.disabled),this.cvcInput.removeAttribute("disabled"),this.cvcInput.classList.remove(Y.disabledInput),this.cvcInputContainer.classList.remove(Y.disabled))}touchSubmit(){this.isTouchSubmit=!0,this.render()}value(){return{expiry:this.expiryInput.value,cvc:this.cvcInput.value}}validate({expiry:e,cvc:t}){const n=this.validateExpiry(e),i=this.validateCvc(t);return n&&i}updateCardType(e){this.cardType=e,this.handleCvcChange(this.cvcInput.value)}render(){const e=this.isTouchSubmit||this.isExpiryChanged,t=e&&!this.isDisabled&&this.isExpiryRequired,n=e&&!this.isDisabled&&!!this.expiryErrorMessage;this.toggleExpiryLabelError(t),this.toggleExpiryErrorMessage(n),!t&&!n?(this.expiryInputContainer.classList.remove(Y.errorInput),this.expiryEndContent.classList.add(Y.hidden)):this.expiryEndContent.classList.remove(Y.hidden);const i=this.isTouchSubmit||this.isCvcChanged,a=i&&!this.isDisabled&&this.isCvcRequired,s=i&&!this.isDisabled&&!!this.cvcErrorMessage;return this.toggleCvcLabelError(a),this.toggleCvcErrorMessage(s),!a&&!s?(this.cvcInputContainer.classList.remove(Y.errorInput),this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.cardCvc.render())):(this.cvcEndContent.innerHTML="",this.cvcEndContent.appendChild(this.warning.render())),this.isDisabled?(this.expiryInputContainer.classList.add(Y.disabled),this.expiryInput.classList.add(Y.disabledInput),this.cvcInputContainer.classList.add(Y.disabled),this.cvcInput.classList.add(Y.disabledInput)):(this.expiryInputContainer.classList.remove(Y.disabled),this.expiryInput.classList.remove(Y.disabledInput),this.cvcInputContainer.classList.remove(Y.disabled),this.cvcInput.classList.remove(Y.disabledInput)),this.element}}const wi={container:"_container_94v1h_1",title:"_title_94v1h_10"};class Ai{constructor(e){b(this,"element");b(this,"message",document.createElement("p"));b(this,"icon",new Ar);this.translate=e,this.element=document.createElement("div"),this.element.classList.add(wi.container),this.message.classList.add(wi.title),this.message.textContent=e.messages().status.error,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:t})=>{this.message.textContent=t.status.success})}addClassName(e){this.element.classList.add(e)}removeClassName(e){this.element.classList.remove(e)}render(){return this.element}}class Vc{constructor(e,t){b(this,"element");b(this,"error");b(this,"submit");b(this,"back");b(this,"number");b(this,"name");b(this,"cardSecurity");b(this,"events",{submit:new ie,close:new ie});this.element=document.createElement("form"),this.error=new Ai(e),this.submit=new Ac(e),this.back=new wc,this.number=new Sc(e),this.name=new Tc(e),this.cardSecurity=new Dc(e),this.error.addClassName(Nt.hidden),this.element.classList.add(Nt.cardForm,t||""),this.element.append(this.back.render(),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:n})=>this.cardSecurity.updateCardType(n||null)),this.submit.addEventListener(n=>{n.preventDefault();const{cvc:i,expiry:a}=this.cardSecurity.value(),{value:s,cardType:o}=this.number.value();this.events.submit.emit({number:s,expiry:a,cvc:i,name:this.name.value(),cardBrand:o})})}addEventListener(e,t){return this.events[e].addListener(t)}setLoading(e){this.cardSecurity.disable(e),this.name.disable(e),this.number.disable(e),this.submit.disable(e)}touchSubmit(){this.cardSecurity.touchSubmit(),this.name.touchSubmit(),this.number.touchSubmit()}validate(){const e=this.number.validate(this.number.value().value),t=this.name.validate(this.name.value()),n=this.cardSecurity.validate(this.cardSecurity.value());return e&&t&&n}showError(){this.error.removeClassName(Nt.hidden)}hideError(){this.error.addClassName(Nt.hidden)}render(){return this.element}}class Fc{constructor(){b(this,"template",`
|
|
314
314
|
<svg
|
|
315
315
|
fill='none'
|
|
316
316
|
height='24'
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
'></path>
|
|
328
328
|
</svg>
|
|
329
329
|
<span class="${Z.srOnly}">Success</span>
|
|
330
|
-
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.successContainer),this.element.innerHTML=this.template}render(){return this.element}}const Ai={container:"_container_hoha1_1",title:"_title_hoha1_5"};class Fc{constructor(e){b(this,"element");b(this,"message",document.createElement("p"));b(this,"icon",new Vc);this.translate=e,this.element=document.createElement("div"),this.element.classList.add(Ai.container),this.message.classList.add(Ai.title),this.message.textContent=e.messages().status.success,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:t})=>{this.message.textContent=t.status.success})}addClassName(e){this.element.classList.add(e)}removeClassName(e){this.element.classList.remove(e)}render(){return this.element}}class Uc{constructor(e){b(this,"isLoading",!1);b(this,"isFormOpen",!1);b(this,"checkout");b(this,"container",document.createElement("div"));b(this,"loader",new ql);b(this,"error");b(this,"success");b(this,"buttons");b(this,"form");this.config=e,this.buttons=new bc(e),this.form=new Dc(e.state.translate,pe.hidden),this.error=new Ti(e.state.translate),this.success=new Fc(e.state.translate),this.error.addClassName(pe.hidden),this.success.addClassName(pe.hidden),this.container.append(this.loader.render(),this.buttons.render(),this.form.render()),this.checkout=document.createElement("div"),this.checkout.classList.add(pe.checkout),this.checkout.append(this.container,this.error.render(),this.success.render())}init(){return z(this,null,function*(){this.buttons.addEventListener("ready",()=>{this.loader.setClassName(pe.hidden),this.buttons.showButton()}),this.buttons.addEventListener("open",()=>z(this,null,function*(){this.isLoading||(this.hideError(),yield de(this.buttons.buttons,It.close,It.transition),this.buttons.buttons.classList.add(pe.hidden),this.form.element.classList.add(pe.formInitial),this.form.element.classList.remove(pe.hidden),yield de(this.form.element,Ke.open,Ke.transition),this.isFormOpen=!0)})),this.buttons.addEventListener("error",()=>{const{onCheckoutFail:e}=this.config.state.checkout.getState(),t=this.config.state.translate.messages();e==null||e(new Error(t.status.error))}),this.buttons.addEventListener("success",e=>{const{clientToken:t}=this.config.state.checkout.getState();switch(e.type){case"apple":return this.handleSuccess({clientSession:t,applePay:e});case"google":return this.handleSuccess({clientSession:t,googlePay:e});case"paypal":return this.handleSuccess({clientSession:t,paypal:{billing_agreement_token:e}});case"venmo":return console.log("----- venmo success data",e),this.handleSuccess({clientSession:t,braintree:{nonce:e}})}}),this.form.addEventListener("close",()=>z(this,null,function*(){this.isLoading||(this.hideError(),yield de(this.form.element,Ke.close,Ke.transition),this.form.element.classList.add(pe.hidden),this.buttons.buttons.classList.add(pe.btnsInitial),this.buttons.buttons.classList.remove(pe.hidden),yield de(this.buttons.buttons,It.open,It.transition),this.isFormOpen=!1)})),this.form.addEventListener("submit",e=>z(this,null,function*(){if(this.isLoading||(this.form.touchSubmit(),!this.form.validate()))return;const n=e.number.replace(/\D/g,""),i=this.config.state.checkout.getState(),a=this.config.service.ev.getEv(),[s,o]=yield Promise.all([a.encrypt(n),a.encrypt(e.cvc)]),[l,c]=e.expiry.split("/");yield this.handleSuccess({clientSession:i.clientToken,card:{firstSixDigits:n.slice(0,6),lastFourDigits:n.slice(-4),expMonth:Number(l),expYear:Number(c),cardBrand:e.cardBrand||"",number:s,cvc:o,type:Ci.Card,metadata:{name:e.name,userAgent:navigator==null?void 0:navigator.userAgent}}})})),yield this.buttons.init()})}handleError(e){var i;const t=this.config.state.checkout.getState(),n=this.config.state.translate.messages();console.error(e),this.showError(),(i=t.onCheckoutFail)==null||i.call(t,new Error(n.status.error)),this.setLoading(!1)}handleSuccess(e){return z(this,null,function*(){var i;if(this.isLoading)return;this.hideError(),this.setLoading(!0);const t=this.config.state.checkout.getState(),n=this.config.state.translate.messages();try{const a=yield mc(e,t.environment);if(a.error)throw new Error(n.status.error);if(a.three_ds_session_id){yield this.config.service.ev.initThreeDs({threeDsId:a.three_ds_session_id,onSuccess:()=>{this.setLoading(!1),this.handleSuccess(ae(Q({},e),{threeDsSessionId:a.three_ds_session_id}))},onError:()=>{this.handleError("Three DS Error")}});return}this.showSuccess(),(i=t.onCheckoutComplete)==null||i.call(t,a),this.setLoading(!1)}catch(a){this.handleError(a)}})}showSuccess(){return z(this,null,function*(){this.container.classList.add(pe.hidden),this.error.addClassName(pe.hidden),this.success.removeClassName(pe.hidden),yield de(this.success.element,Ke.open,Ke.transition)})}hideError(){this.error.addClassName(pe.hidden),this.form.hideError()}showError(){this.isFormOpen||this.error.removeClassName(pe.hidden),this.form.showError()}setLoading(e){this.isLoading=e,this.form.setLoading(e),this.loader.setClassName(!e||this.isFormOpen?pe.hidden:"")}render(){return this.checkout}}class Bc{constructor(e){b(this,"component");this.config=e,this.component=new Uc(e)}init(){return z(this,null,function*(){const{checkout:e,transaction:t,translate:n,styles:i}=this.config.state;e.subscribe(({clientToken:a,environment:s,locale:o,translate:l,styles:c})=>{o&&n.locale()!==o&&n.setLocale(o),l&&n.overrides()!==l&&n.setMessages(l),c&&i.setState(c),t.updateTransaction(a,s||"sandbox").then(d=>{var u,h;if(d)return this.config.service.ev.initEv({teamId:(u=d.evervault)==null?void 0:u.team_id,appId:(h=d.evervault)==null?void 0:h.app_id})}).catch(console.error)})})}mount(){return z(this,null,function*(){return yield this.init(),yield this.component.init(),this.component.render()})}}class Lt{constructor(e){b(this,"initialState");b(this,"state");b(this,"observer",new ie);this.initialState=e,this.state=e}getState(){return this.state}setState(e){this.state=e,this.observer.emit(e)}clearState(){this.state=this.initialState,this.observer.clear()}subscribe(e){return this.observer.addListener(e)}}const jc={clientToken:"",environment:"sandbox"};class zc extends Lt{constructor(e){super(e||jc)}}const Kc={};class qc extends Lt{constructor(e){super(e||Kc)}}class Hc extends Lt{constructor(t){super(t||null);b(this,"clientToken","")}updateTransaction(t,n="sandbox"){return z(this,null,function*(){if(this.clientToken===t)return this.getState();this.clientToken=t;const i=yield vc(t,n);return this.setState(i),i})}}const Ar={ar:{card:{title:"طريقة الدفع",number:{label:"رقم البطاقة",error:{required:"يتطلب",invalid:"رقم البطاقة غير صالح",incomplete:"رقم البطاقة غير كامل",unsupported:"نوع البطاقة غير المدعوم"}},expiry:{label:"تاريخ الانتهاء",placeholder:"سنة / شهر",error:{required:"يتطلب",invalid:"تاريخ انتهاء صلاحية البطاقة غير صالح",incomplete:"تاريخ انتهاء الصلاحية الخاص ببطاقتك غير كامل",expired:"تاريخ انتهاء صلاحية بطاقتك في الماضي"}},cvc:{label:"رمز الأمان",placeholder:"CVC",error:{required:"يتطلب",incomplete:"رمز الأمان الخاص ببطاقتك غير كامل",invalid:"رمز التحقق من البطاقة (CVC) الخاص ببطاقتك غير صالح"}},name:{label:"اسم حامل البطاقة",placeholder:"الاسم الكامل على البطاقة",error:{required:"يتطلب",invalid:"يرجى إدخال اسمك الكامل"}},pay:{button:"الراتب"},compact:{button:"البطاقة"}},status:{success:"تمت عملية الدفع الخاصة بك بنجاح!",error:"لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."}},en:{card:{title:"Payment method",number:{label:"Card number",error:{required:"REQUIRED",invalid:"Your card number is invalid",incomplete:"Your card number is incomplete",unsupported:"Unsupported card type"}},expiry:{label:"Expiry date",placeholder:"MM / YY",error:{required:"REQUIRED",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:{required:"REQUIRED",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:{required:"REQUIRED",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."}},bg:{card:{title:"Метод на плащане",number:{label:"Информация за картата",error:{required:"ЗАДЪЛЖИТЕЛНО",invalid:"Номерът на Вашата карта е неправилен",incomplete:"Номерът на Вашата карта е непълен",unsupported:"Неподдържан тип карта"}},expiry:{label:"Дата на валидност",placeholder:"ММ / ГГ",error:{required:"ЗАДЪЛЖИТЕЛНО",incomplete:"Датата на валидност на вашата карта е непълна",invalid:"Датата на валидност на вашата карта е невалидна",expired:"Датата на валидност на вашата карта е в миналото"}},cvc:{label:"Код за сигурност",placeholder:"CVC",error:{required:"ЗАДЪЛЖИТЕЛНО",incomplete:"Кодът за сигурност на вашата карта е непълен",invalid:"Кодът за сигурност на вашата карта е невалиден"}},name:{label:"Име на картодържателя",placeholder:"Пълно име върху картата",error:{required:"ЗАДЪЛЖИТЕЛНО",invalid:"Моля, въведете трите си имена"}},pay:{button:"Платете"},compact:{button:"Карта"}},status:{success:"Успех",error:"Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."}},cs:{card:{title:"Způsob platby",number:{label:"Číslo karty",error:{required:"POVINNÝ ÚDAJ",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:{required:"POVINNÝ ÚDAJ",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:{required:"POVINNÝ ÚDAJ",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:{required:"POVINNÝ ÚDAJ",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."}},da:{card:{title:"Betalingsmetode",number:{label:"Kortnummer",error:{required:"PÅKRÆVET",invalid:"Kortnummeret er ugyldigt",incomplete:"Kortnummeret er ufuldstændigt",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Udløbsdato",placeholder:"MM / ÅÅ",error:{required:"PÅKRÆVET",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:{required:"PÅKRÆVET",incomplete:"Dit korts sikkerhedskode er ikke komplet",invalid:"Dit korts CVC er ugyldigt"}},name:{label:"Kortholderens navn",placeholder:"Fulde navn",error:{required:"PÅKRÆVET",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."}},de:{card:{title:"Zahlungsmethode",number:{label:"Kartennummer",error:{required:"Pflichtfeld",invalid:"Ihre Kartennummer ist ungültig",incomplete:"Ihre Kartennummer ist unvollständig",unsupported:"Nicht unterstützter Kartentyp"}},expiry:{label:"Ablaufdatum",placeholder:"MM / JJ",error:{required:"Pflichtfeld",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:{required:"Pflichtfeld",incomplete:"Der Sicherheitscode Ihrer Karte ist unvollständig",invalid:"Die Prüfziffer/CVC Ihrer Karte ist ungültig"}},name:{label:"Name des/der Karteninhaber/in",placeholder:"Vollständiger Name",error:{required:"Pflichtfeld",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."}},el:{card:{title:"Μέθοδος πληρωμής",number:{label:"Αριθμός κάρτας",error:{required:"Απαιτούμενο",invalid:"Ο αριθμός της κάρτας σας δεν είναι έγκυρος",incomplete:"Ο αριθμός της κάρτας σας είναι ελλιπής",unsupported:"Δεν υποστηρίζεται ο τύπος της κάρτας"}},expiry:{label:"Ημερομηνία λήξης",placeholder:"ΜΜ / ΕΕ",error:{required:"Απαιτούμενο",incomplete:"Η ημερομηνία λήξης της κάρτας σας είναι ελλιπής",invalid:"Η ημερομηνία λήξης της κάρτας σας δεν είναι έγκυρη",expired:"Η κάρτα σας έχει λήξει"}},cvc:{label:"Κωδικός ασφαλείας",placeholder:"CVC",error:{required:"Απαιτούμενο",incomplete:"Ο κωδικός ασφαλείας της κάρτας σας είναι ελλιπής",invalid:"Το CVC της κάρτας σας δεν είναι έγκυρο"}},name:{label:"Όνομα κατόχου κάρτας",placeholder:"Πλήρες όνομα στην κάρτα",error:{required:"Απαιτούμενο",invalid:"Συμπληρώστε το ονοματεπώνυμό σας"}},pay:{button:"Πληρωμή"},compact:{button:"Kάρτα"}},status:{success:"Επιτυχία",error:"Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."}},es:{card:{title:"Método de pago",number:{label:"Número de tarjeta",error:{required:"OBLIGATORIO",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:{required:"OBLIGATORIO",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:{required:"OBLIGATORIO",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:{required:"OBLIGATORIO",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:{title:"Makseviis",number:{label:"Kaardi number",error:{required:"NÕUTAV",invalid:"Teie kaardinumber ei sobi",incomplete:"Teie kaardinumber on puudulik",unsupported:"Toetamata kaardi tüüp"}},expiry:{label:"Aegumiskuupäev",placeholder:"KK / AA",error:{required:"NÕUTAV",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:{required:"NÕUTAV",incomplete:"Teie kaardi turvakood on puudulik",invalid:"Teie kaardi CVC on kehtetu"}},name:{label:"Kaardiomaniku nimi",placeholder:"Täisnimi",error:{required:"NÕUTAV",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:{title:"Maksutapa",number:{label:"Kortin numero",error:{required:"PAKOLLINEN",invalid:"Kortin numero ei kelpaa",incomplete:"Kortin numero on puutteellinen",unsupported:"Ei tuettu korttityyppi"}},expiry:{label:"Erääntymispäivä",placeholder:"KK / VV",error:{required:"PAKOLLINEN",incomplete:"Kortin voimassaoloaika on puutteellinen",invalid:"Kortin voimassaoloaika on virheellinen",expired:"Korttisi on vanhentunut"}},cvc:{label:"Turvakoodi",placeholder:"CVC-koodi",error:{required:"PAKOLLINEN",incomplete:"Kortin turvakoodi on puutteellinen",invalid:"Kortin CVC ei kelpaa"}},name:{label:"Kortinhaltijan nimi",placeholder:"Koko nimi",error:{required:"PAKOLLINEN",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:{title:"Paraan ng pagbabayad",number:{label:"Numero ng card",error:{required:"KAILANGAN",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:{required:"KAILANGAN",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:{required:"KAILANGAN",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:{required:"KAILANGAN",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:{title:"Moyen de paiement",number:{label:"Numéro de la carte",error:{required:"OBLIGATOIRE",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:{required:"OBLIGATOIRE",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:{required:"OBLIGATOIRE",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:{required:"OBLIGATOIRE",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:{title:"Način plaćanja",number:{label:"Broj kartice",error:{required:"POTREBNO",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:{required:"POTREBNO",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:{required:"POTREBNO",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:{required:"POTREBNO",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:{title:"Fizetési mód",number:{label:"Kártya száma",error:{required:"KÖTELEZŐ",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:{required:"KÖTELEZŐ",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:{required:"KÖTELEZŐ",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:{required:"KÖTELEZŐ",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:{title:"Metode pembayaran",number:{label:"Nomor kartu",error:{required:"WAJIB DIISI",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:{required:"WAJIB DIISI",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:{required:"WAJIB DIISI",incomplete:"Kode keamanan kartu Anda tidak lengkap",invalid:"CVC kartu Anda tidak valid"}},name:{label:"Nama pemegang kartu",placeholder:"Nama lengkap",error:{required:"WAJIB DIISI",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:{title:"Modalità di pagamento",number:{label:"Numero di carta",error:{required:"OBBLIGATORIO",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:{required:"OBBLIGATORIO",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:{required:"OBBLIGATORIO",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:{required:"OBBLIGATORIO",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:{title:"支払い方法",number:{label:"カード番号",error:{required:"必須",invalid:"カード番号が無効です",incomplete:"カード番号に不備があります",unsupported:"サポートされていないカードタイプ"}},expiry:{label:"有効期限",placeholder:"MM (月) / YY (年)",error:{required:"必須",incomplete:"カードの有効期限に不備があります",invalid:"カードの有効期間の満了月が無効です",expired:"カードの有効期限が切れています"}},cvc:{label:"セキュリティコード",placeholder:"セキュリティコード",error:{required:"必須",incomplete:"カードのセキュリティコードに不備があります",invalid:"カードのセキュリティコードが無効です"}},name:{label:"カード保有者の名前",placeholder:"氏名",error:{required:"必須",invalid:"氏名を入力してください"}},pay:{button:"支払う"},compact:{button:"カード"}},status:{success:"成功",error:"お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"}},ko:{card:{title:"결제 방식",number:{label:"카드 번호",error:{required:"필수",invalid:"카드 번호가 잘못되었습니다",incomplete:"카드 번호가 불완전합니다",unsupported:"지원되지 않는 카드 유형"}},expiry:{label:"만료 날짜",placeholder:"MM / YY",error:{required:"필수",incomplete:"카드의 유효기간 만료일이 불완전합니다",invalid:"카드의 유효기간 만료일이 잘못되었습니다",expired:"카드가 만료되었습니다"}},cvc:{label:"보안 코드",placeholder:"보안 코드(CVC)",error:{required:"필수",incomplete:"카드의 보안 코드가 불완전합니다",invalid:"카드의 보안 코드(CVC)가 잘못되었습니다"}},name:{label:"카드 소유자 이름",placeholder:"성명",error:{required:"필수",invalid:"성명을 입력하십시오"}},pay:{button:"결제"},compact:{button:"카드 번호"}},status:{success:"성공",error:"결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."}},lt:{card:{title:"Mokėjimo būdas",number:{label:"Kortelės numeris",error:{required:"PRIVALOMA",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:{required:"PRIVALOMA",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:{required:"PRIVALOMA",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:{required:"PRIVALOMA",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:{title:"Maksājumu veids",number:{label:"Kartes numurs",error:{required:"OBLIGĀTI",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:{required:"OBLIGĀTI",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:{required:"OBLIGĀTI",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:{required:"OBLIGĀTI",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:{title:"Kaedah pembayaran",number:{label:"Nombor kad",error:{required:"DIPERLUKAN",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:{required:"DIPERLUKAN",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:{required:"DIPERLUKAN",incomplete:"Kod keselamatan kad anda tidak lengkap",invalid:"CVC kad anda tidak sah"}},name:{label:"Nama pemegang kad",placeholder:"Nama penuh",error:{required:"DIPERLUKAN",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:{title:"Метод оплаты",number:{label:"Номер карты",error:{required:"ОБЯЗАТЕЛЬНО",invalid:"Недопустимый номер карты",incomplete:"Номер карты неполон",unsupported:"Неподдерживаемый тип карты"}},expiry:{label:"Срок действия",placeholder:"ММ / ГГ",error:{required:"ОБЯЗАТЕЛЬНО",incomplete:"Срок действия карты указан не полностью",invalid:"Указанный срок действия карты недействителен",expired:"Срок действия карты истек"}},cvc:{label:"Код безопасности",placeholder:"CVC",error:{required:"ОБЯЗАТЕЛЬНО",incomplete:"Код безопасности карты введен не полностью",invalid:"Код CVC карты недействителен"}},name:{label:"Имя владельца карты",placeholder:"Имя, фамилия",error:{required:"ОБЯЗАТЕЛЬНО",invalid:"Введите свое имя и фамилию"}},pay:{button:"Оплатить"},compact:{button:"Кредитная карта"}},status:{success:"Успех",error:"Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."}},mt:{card:{title:"Metodu tal-ħlas",number:{label:"Numru tal-karta",error:{required:"MEĦTIEĠ/A",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:{required:"MEĦTIEĠ/A",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:{required:"MEĦTIEĠ/A",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:{required:"MEĦTIEĠ/A",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."}},nb:{card:{title:"Betalingsmetode",number:{label:"Kortnummer",error:{required:"PÅKREVET",invalid:"Kortnummer er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{required:"PÅKREVET",incomplete:"Kortets utløpsdato er ufullstendig",invalid:"Kortets utløpsdato er ugyldig",expired:"Kortet er utløpt"}},cvc:{label:"Sikkerhetskode",placeholder:"CVC",error:{required:"PÅKREVET",incomplete:"Kortets sikkerhetskode er ufullstendig",invalid:"Kortets CVC-nummer er ugyldig"}},name:{label:"Kortinnehavers navn",placeholder:"Fullt navn",error:{required:"PÅKREVET",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:{title:"Betaalmethode",number:{label:"Kaartnummer",error:{required:"VEREIST",invalid:"Je kaartnummer is ongeldig",incomplete:"Je kaartnummer is onvolledig",unsupported:"Niet ondersteund"}},expiry:{label:"Vervaldatum",placeholder:"MM / JJ",error:{required:"VEREIST",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:{required:"VEREIST",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:{required:"VEREIST",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:{title:"Metoda płatności",number:{label:"Numer karty",error:{required:"WYMAGANE",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:{required:"WYMAGANE",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:{required:"WYMAGANE",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:{required:"WYMAGANE",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:{title:"Forma de pagamento",number:{label:"Número do cartão",error:{required:"OBRIGATÓRIO",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:{required:"OBRIGATÓRIO",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:{required:"OBRIGATÓRIO",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:{required:"OBRIGATÓRIO",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:{title:"Metoda de plată",number:{label:"Numărul cardului",error:{required:"NECESAR",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:{required:"NECESAR",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:{required:"NECESAR",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:{required:"NECESAR",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."}},sk:{card:{title:"Spôsob platby",number:{label:"Číslo karty",error:{required:"POŽADOVANÉ",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:{required:"POŽADOVANÉ",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:{required:"POŽADOVANÉ",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:{required:"POŽADOVANÉ",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:{title:"Način plačila",number:{label:"Številka kartice",error:{required:"OBVEZNO",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:{required:"OBVEZNO",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:{required:"OBVEZNO",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:{required:"OBVEZNO",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:{title:"Betalningsmetod",number:{label:"Kortnummer",error:{required:"OBLIGATORISKT",invalid:"Ditt kortnummer är ogiltigt",incomplete:"Kortnumret är ofullständigt",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Sista giltighetsdag",placeholder:"MM / ÅÅ",error:{required:"OBLIGATORISKT",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:{required:"OBLIGATORISKT",incomplete:"Kortets säkerhetskod är ofullständig",invalid:"Kortets CVC-kod är ogiltig"}},name:{label:"Kortinnehavarens namn",placeholder:"Fullständigt namn",error:{required:"OBLIGATORISKT",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:{title:"วิธีการชำระเงิน",number:{label:"หมายเลขบัตร",error:{required:"ต้องป้อนข้อมูล",invalid:"หมายเลขบัตรของคุณไม่ถูกต้อง",incomplete:"หมายเลขบัตรของคุณไม่ครบถ้วน",unsupported:"ประเภทบัตรของคุณไม่ถูกต้อง"}},expiry:{label:"วันหมดอายุ",placeholder:"ดด / ปป",error:{required:"ต้องป้อนข้อมูล",incomplete:"วันที่หมดอายุของบัตรไม่ครบถ้วน",invalid:"วันที่หมดอายุของบัตรไม่ถูกต้อง",expired:"บัตรของคุณหมดอายุแล้ว"}},cvc:{label:"รหัสความปลอดภัย",placeholder:"CVC",error:{required:"ต้องป้อนข้อมูล",incomplete:"รหัสความปลอดภัยของบัตรไม่ครบถ้วน",invalid:"CVC ของบัตรไม่ถูกต้อง"}},name:{label:"ชื่อเจ้าของบัตร",placeholder:"ชื่อ-นามสกุล",error:{required:"ต้องป้อนข้อมูล",invalid:"โปรดป้อนชื่อ-นามสกุล"}},pay:{button:"ชำระเงิน"},compact:{button:"การ์ด"}},status:{success:"ความสำเร็จ",error:"เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"}},tr:{card:{title:"Ödeme yöntemi",number:{label:"Kart numarası",error:{required:"GEREKLI",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:{required:"GEREKLI",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:{required:"GEREKLI",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:{required:"GEREKLI",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:{title:"Phương thức thanh toán",number:{label:"Số thẻ",error:{required:"BẮT BUỘC",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:{required:"BẮT BUỘC",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:{required:"BẮT BUỘC",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:{required:"BẮT BUỘC",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:{title:"支付方式",number:{label:"卡号",error:{required:"必填",invalid:"您的卡号无效",incomplete:"您的银行卡卡号不完整",unsupported:"不支持的卡类型"}},expiry:{label:"有效期",placeholder:"月份 / 年份",error:{required:"必填",incomplete:"您银行卡的有效期不完整",invalid:"您银行卡的有效期无效",expired:"您的银行卡已过期"}},cvc:{label:"安全代码",placeholder:"CVC",error:{required:"必填",incomplete:"您银行卡的安全码不完整",invalid:"您银行卡的 CVC 无效"}},name:{label:"持卡人姓名",placeholder:"全名",error:{required:"必填",invalid:"请提供您的全名"}},pay:{button:"支付"},compact:{button:"卡片"}},status:{success:"成功",error:"我们无法验证您的付款方式。请选择其他付款方式并重试。"}}},Ir=()=>{const r=navigator==null?void 0:navigator.language.split("-")[0];return Ar[r]||Ar.en},Ii=(r,e={})=>{var n,i,a,s,o,l,c,d,u,h,p,m,f,v,y,T,A,N,w,I,L,S,B,G,q,M,F,K,J,R,W,j,g,_,k,U,E,x,C,P,V,O,H,X,le,D,te,ye,ut,pt,ht,mt,ft,vt,gt,yt,bt;if(!r)return Ir();const t=Ar[r]||Ir();return{card:{title:((n=e==null?void 0:e.card)==null?void 0:n.title)||t.card.title,number:{label:((a=(i=e==null?void 0:e.card)==null?void 0:i.number)==null?void 0:a.label)||t.card.number.label,error:{required:((l=(o=(s=e==null?void 0:e.card)==null?void 0:s.number)==null?void 0:o.error)==null?void 0:l.required)||t.card.number.error.required,invalid:((u=(d=(c=e==null?void 0:e.card)==null?void 0:c.number)==null?void 0:d.error)==null?void 0:u.invalid)||t.card.number.error.invalid,incomplete:((m=(p=(h=e==null?void 0:e.card)==null?void 0:h.number)==null?void 0:p.error)==null?void 0:m.incomplete)||t.card.number.error.incomplete,unsupported:((y=(v=(f=e==null?void 0:e.card)==null?void 0:f.number)==null?void 0:v.error)==null?void 0:y.unsupported)||t.card.number.error.unsupported}},expiry:{label:((A=(T=e==null?void 0:e.card)==null?void 0:T.expiry)==null?void 0:A.label)||t.card.expiry.label,placeholder:((w=(N=e==null?void 0:e.card)==null?void 0:N.expiry)==null?void 0:w.placeholder)||t.card.expiry.placeholder,error:{required:((S=(L=(I=e==null?void 0:e.card)==null?void 0:I.expiry)==null?void 0:L.error)==null?void 0:S.required)||t.card.expiry.error.required,invalid:((q=(G=(B=e==null?void 0:e.card)==null?void 0:B.expiry)==null?void 0:G.error)==null?void 0:q.invalid)||t.card.expiry.error.invalid,incomplete:((K=(F=(M=e==null?void 0:e.card)==null?void 0:M.expiry)==null?void 0:F.error)==null?void 0:K.incomplete)||t.card.expiry.error.incomplete,expired:((W=(R=(J=e==null?void 0:e.card)==null?void 0:J.expiry)==null?void 0:R.error)==null?void 0:W.expired)||t.card.expiry.error.expired}},cvc:{label:((g=(j=e==null?void 0:e.card)==null?void 0:j.cvc)==null?void 0:g.label)||t.card.cvc.label,placeholder:((k=(_=e==null?void 0:e.card)==null?void 0:_.cvc)==null?void 0:k.label)||t.card.cvc.label,error:{required:((E=(U=e==null?void 0:e.card)==null?void 0:U.cvc)==null?void 0:E.label)||t.card.cvc.label,incomplete:((C=(x=e==null?void 0:e.card)==null?void 0:x.cvc)==null?void 0:C.label)||t.card.cvc.label,invalid:((V=(P=e==null?void 0:e.card)==null?void 0:P.cvc)==null?void 0:V.label)||t.card.cvc.label}},name:{label:((H=(O=e==null?void 0:e.card)==null?void 0:O.name)==null?void 0:H.label)||t.card.name.label,placeholder:((le=(X=e==null?void 0:e.card)==null?void 0:X.name)==null?void 0:le.placeholder)||t.card.name.placeholder,error:{required:((ye=(te=(D=e==null?void 0:e.card)==null?void 0:D.name)==null?void 0:te.error)==null?void 0:ye.required)||t.card.name.error.required,invalid:((ht=(pt=(ut=e==null?void 0:e.card)==null?void 0:ut.name)==null?void 0:pt.error)==null?void 0:ht.invalid)||t.card.name.error.invalid}},pay:{button:((ft=(mt=e==null?void 0:e.card)==null?void 0:mt.pay)==null?void 0:ft.button)||t.card.pay.button},compact:{button:((gt=(vt=e==null?void 0:e.card)==null?void 0:vt.compact)==null?void 0:gt.button)||t.card.compact.button}},status:{success:((yt=e==null?void 0:e.status)==null?void 0:yt.success)||t.status.success,error:((bt=e==null?void 0:e.status)==null?void 0:bt.error)||t.status.error}}};class Wc extends Lt{constructor(){super({messages:Ir(),locale:(navigator==null?void 0:navigator.language.split("-")[0])||"en"})}setMessages(e){const t=this.locale(),n=Ii(t,e);this.setState({locale:t,messages:n,overrides:e})}setLocale(e){const t=this.overrides(),n=Ii(e,t);this.setState({locale:e,messages:n,overrides:t})}overrides(){const{overrides:e}=this.getState();return e}messages(){const{messages:e}=this.getState();return e}locale(){const{locale:e}=this.getState();return e}dir(){return this.locale()==="ar"?"rtl":"ltr"}}/*!
|
|
330
|
+
`);b(this,"element",document.createElement("div"));this.element.classList.add(Z.successContainer),this.element.innerHTML=this.template}render(){return this.element}}const Ti={container:"_container_hoha1_1",title:"_title_hoha1_5"};class Uc{constructor(e){b(this,"element");b(this,"message",document.createElement("p"));b(this,"icon",new Fc);this.translate=e,this.element=document.createElement("div"),this.element.classList.add(Ti.container),this.message.classList.add(Ti.title),this.message.textContent=e.messages().status.success,this.element.append(this.icon.render(),this.message),this.translate.subscribe(({messages:t})=>{this.message.textContent=t.status.success})}addClassName(e){this.element.classList.add(e)}removeClassName(e){this.element.classList.remove(e)}render(){return this.element}}class Bc{constructor(e){b(this,"isLoading",!1);b(this,"isFormOpen",!1);b(this,"checkout");b(this,"container",document.createElement("div"));b(this,"loader",new Hl);b(this,"error");b(this,"success");b(this,"buttons");b(this,"form");this.config=e,this.buttons=new _c(e),this.form=new Vc(e.state.translate,pe.hidden),this.error=new Ai(e.state.translate),this.success=new Uc(e.state.translate),this.error.addClassName(pe.hidden),this.success.addClassName(pe.hidden),this.container.append(this.loader.render(),this.buttons.render(),this.form.render()),this.checkout=document.createElement("div"),this.checkout.classList.add(pe.checkout),this.checkout.append(this.container,this.error.render(),this.success.render())}init(){return z(this,null,function*(){this.buttons.addEventListener("ready",()=>{this.loader.setClassName(pe.hidden),this.buttons.showButton()}),this.buttons.addEventListener("open",()=>z(this,null,function*(){this.isLoading||(this.hideError(),yield de(this.buttons.buttons,It.close,It.transition),this.buttons.buttons.classList.add(pe.hidden),this.form.element.classList.add(pe.formInitial),this.form.element.classList.remove(pe.hidden),yield de(this.form.element,Ke.open,Ke.transition),this.isFormOpen=!0)})),this.buttons.addEventListener("error",()=>{const{onCheckoutFail:e}=this.config.state.checkout.getState(),t=this.config.state.translate.messages();e==null||e(new Error(t.status.error))}),this.buttons.addEventListener("success",e=>{const{clientToken:t}=this.config.state.checkout.getState();switch(e.type){case"apple":return this.handleSuccess({clientSession:t,applePay:e});case"google":return this.handleSuccess({clientSession:t,googlePay:e});case"paypal":return this.handleSuccess({clientSession:t,paypal:{billing_agreement_token:e}});case"venmo":return console.log("----- venmo success data",e),this.handleSuccess({clientSession:t,braintree:{nonce:e}})}}),this.form.addEventListener("close",()=>z(this,null,function*(){this.isLoading||(this.hideError(),yield de(this.form.element,Ke.close,Ke.transition),this.form.element.classList.add(pe.hidden),this.buttons.buttons.classList.add(pe.btnsInitial),this.buttons.buttons.classList.remove(pe.hidden),yield de(this.buttons.buttons,It.open,It.transition),this.isFormOpen=!1)})),this.form.addEventListener("submit",e=>z(this,null,function*(){if(this.isLoading||(this.form.touchSubmit(),!this.form.validate()))return;const n=e.number.replace(/\D/g,""),i=this.config.state.checkout.getState(),a=this.config.service.ev.getEv(),[s,o]=yield Promise.all([a.encrypt(n),a.encrypt(e.cvc)]),[c,l]=e.expiry.split("/");yield this.handleSuccess({clientSession:i.clientToken,card:{firstSixDigits:n.slice(0,6),lastFourDigits:n.slice(-4),expMonth:Number(c),expYear:Number(l),cardBrand:e.cardBrand||"",number:s,cvc:o,type:Ci.Card,metadata:{name:e.name,userAgent:navigator==null?void 0:navigator.userAgent}}})})),yield this.buttons.init()})}handleError(e){var i;const t=this.config.state.checkout.getState(),n=this.config.state.translate.messages();console.error(e),this.showError(),(i=t.onCheckoutFail)==null||i.call(t,new Error(n.status.error)),this.setLoading(!1)}handleSuccess(e){return z(this,null,function*(){var i;if(this.isLoading)return;this.hideError(),this.setLoading(!0);const t=this.config.state.checkout.getState(),n=this.config.state.translate.messages();try{const a=yield fc(e,t.environment,t.apiVersion);if(a.error)throw new Error(n.status.error);if(a.three_ds_session_id){yield this.config.service.ev.initThreeDs({threeDsId:a.three_ds_session_id,onSuccess:()=>{this.setLoading(!1),this.handleSuccess(ae(Q({},e),{threeDsSessionId:a.three_ds_session_id}))},onError:()=>{this.handleError("Three DS Error")}});return}this.showSuccess(),(i=t.onCheckoutComplete)==null||i.call(t,a),this.setLoading(!1)}catch(a){this.handleError(a)}})}showSuccess(){return z(this,null,function*(){this.container.classList.add(pe.hidden),this.error.addClassName(pe.hidden),this.success.removeClassName(pe.hidden),yield de(this.success.element,Ke.open,Ke.transition)})}hideError(){this.error.addClassName(pe.hidden),this.form.hideError()}showError(){this.isFormOpen||this.error.removeClassName(pe.hidden),this.form.showError()}setLoading(e){this.isLoading=e,this.form.setLoading(e),this.loader.setClassName(!e||this.isFormOpen?pe.hidden:"")}render(){return this.checkout}}class jc{constructor(e){b(this,"component");this.config=e,this.component=new Bc(e)}init(){return z(this,null,function*(){const{checkout:e,transaction:t,translate:n,styles:i}=this.config.state,{apiVersion:a}=e.getState();e.subscribe(({clientToken:s,environment:o,locale:c,translate:l,styles:d})=>{c&&n.locale()!==c&&n.setLocale(c),l&&n.overrides()!==l&&n.setMessages(l),d&&i.setState(d),t.updateTransaction(s,o,a).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 z(this,null,function*(){return yield this.init(),yield this.component.init(),this.component.render()})}}class Lt{constructor(e){b(this,"initialState");b(this,"state");b(this,"observer",new ie);this.initialState=e,this.state=e}getState(){return this.state}setState(e){this.state=e,this.observer.emit(e)}clearState(){this.state=this.initialState,this.observer.clear()}subscribe(e){return this.observer.addListener(e)}}const zc={clientToken:"",environment:"sandbox",apiVersion:"1.0.0"};class Kc extends Lt{constructor(e){super(Q(Q({},zc),e))}}const qc={};class Hc extends Lt{constructor(e){super(e||qc)}}class Wc extends Lt{constructor(t){super(t||null);b(this,"clientToken","")}updateTransaction(t,n,i){return z(this,null,function*(){if(this.clientToken===t)return this.getState();this.clientToken=t;const a=yield gc(t,n,i);return this.setState(a),a})}}const Tr={ar:{card:{title:"طريقة الدفع",number:{label:"رقم البطاقة",error:{required:"يتطلب",invalid:"رقم البطاقة غير صالح",incomplete:"رقم البطاقة غير كامل",unsupported:"نوع البطاقة غير المدعوم"}},expiry:{label:"تاريخ الانتهاء",placeholder:"سنة / شهر",error:{required:"يتطلب",invalid:"تاريخ انتهاء صلاحية البطاقة غير صالح",incomplete:"تاريخ انتهاء الصلاحية الخاص ببطاقتك غير كامل",expired:"تاريخ انتهاء صلاحية بطاقتك في الماضي"}},cvc:{label:"رمز الأمان",placeholder:"CVC",error:{required:"يتطلب",incomplete:"رمز الأمان الخاص ببطاقتك غير كامل",invalid:"رمز التحقق من البطاقة (CVC) الخاص ببطاقتك غير صالح"}},name:{label:"اسم حامل البطاقة",placeholder:"الاسم الكامل على البطاقة",error:{required:"يتطلب",invalid:"يرجى إدخال اسمك الكامل"}},pay:{button:"الراتب"},compact:{button:"البطاقة"}},status:{success:"تمت عملية الدفع الخاصة بك بنجاح!",error:"لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."}},en:{card:{title:"Payment method",number:{label:"Card number",error:{required:"REQUIRED",invalid:"Your card number is invalid",incomplete:"Your card number is incomplete",unsupported:"Unsupported card type"}},expiry:{label:"Expiry date",placeholder:"MM / YY",error:{required:"REQUIRED",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:{required:"REQUIRED",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:{required:"REQUIRED",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."}},bg:{card:{title:"Метод на плащане",number:{label:"Информация за картата",error:{required:"ЗАДЪЛЖИТЕЛНО",invalid:"Номерът на Вашата карта е неправилен",incomplete:"Номерът на Вашата карта е непълен",unsupported:"Неподдържан тип карта"}},expiry:{label:"Дата на валидност",placeholder:"ММ / ГГ",error:{required:"ЗАДЪЛЖИТЕЛНО",incomplete:"Датата на валидност на вашата карта е непълна",invalid:"Датата на валидност на вашата карта е невалидна",expired:"Датата на валидност на вашата карта е в миналото"}},cvc:{label:"Код за сигурност",placeholder:"CVC",error:{required:"ЗАДЪЛЖИТЕЛНО",incomplete:"Кодът за сигурност на вашата карта е непълен",invalid:"Кодът за сигурност на вашата карта е невалиден"}},name:{label:"Име на картодържателя",placeholder:"Пълно име върху картата",error:{required:"ЗАДЪЛЖИТЕЛНО",invalid:"Моля, въведете трите си имена"}},pay:{button:"Платете"},compact:{button:"Карта"}},status:{success:"Успех",error:"Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."}},cs:{card:{title:"Způsob platby",number:{label:"Číslo karty",error:{required:"POVINNÝ ÚDAJ",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:{required:"POVINNÝ ÚDAJ",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:{required:"POVINNÝ ÚDAJ",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:{required:"POVINNÝ ÚDAJ",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."}},da:{card:{title:"Betalingsmetode",number:{label:"Kortnummer",error:{required:"PÅKRÆVET",invalid:"Kortnummeret er ugyldigt",incomplete:"Kortnummeret er ufuldstændigt",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Udløbsdato",placeholder:"MM / ÅÅ",error:{required:"PÅKRÆVET",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:{required:"PÅKRÆVET",incomplete:"Dit korts sikkerhedskode er ikke komplet",invalid:"Dit korts CVC er ugyldigt"}},name:{label:"Kortholderens navn",placeholder:"Fulde navn",error:{required:"PÅKRÆVET",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."}},de:{card:{title:"Zahlungsmethode",number:{label:"Kartennummer",error:{required:"Pflichtfeld",invalid:"Ihre Kartennummer ist ungültig",incomplete:"Ihre Kartennummer ist unvollständig",unsupported:"Nicht unterstützter Kartentyp"}},expiry:{label:"Ablaufdatum",placeholder:"MM / JJ",error:{required:"Pflichtfeld",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:{required:"Pflichtfeld",incomplete:"Der Sicherheitscode Ihrer Karte ist unvollständig",invalid:"Die Prüfziffer/CVC Ihrer Karte ist ungültig"}},name:{label:"Name des/der Karteninhaber/in",placeholder:"Vollständiger Name",error:{required:"Pflichtfeld",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."}},el:{card:{title:"Μέθοδος πληρωμής",number:{label:"Αριθμός κάρτας",error:{required:"Απαιτούμενο",invalid:"Ο αριθμός της κάρτας σας δεν είναι έγκυρος",incomplete:"Ο αριθμός της κάρτας σας είναι ελλιπής",unsupported:"Δεν υποστηρίζεται ο τύπος της κάρτας"}},expiry:{label:"Ημερομηνία λήξης",placeholder:"ΜΜ / ΕΕ",error:{required:"Απαιτούμενο",incomplete:"Η ημερομηνία λήξης της κάρτας σας είναι ελλιπής",invalid:"Η ημερομηνία λήξης της κάρτας σας δεν είναι έγκυρη",expired:"Η κάρτα σας έχει λήξει"}},cvc:{label:"Κωδικός ασφαλείας",placeholder:"CVC",error:{required:"Απαιτούμενο",incomplete:"Ο κωδικός ασφαλείας της κάρτας σας είναι ελλιπής",invalid:"Το CVC της κάρτας σας δεν είναι έγκυρο"}},name:{label:"Όνομα κατόχου κάρτας",placeholder:"Πλήρες όνομα στην κάρτα",error:{required:"Απαιτούμενο",invalid:"Συμπληρώστε το ονοματεπώνυμό σας"}},pay:{button:"Πληρωμή"},compact:{button:"Kάρτα"}},status:{success:"Επιτυχία",error:"Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."}},es:{card:{title:"Método de pago",number:{label:"Número de tarjeta",error:{required:"OBLIGATORIO",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:{required:"OBLIGATORIO",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:{required:"OBLIGATORIO",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:{required:"OBLIGATORIO",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:{title:"Makseviis",number:{label:"Kaardi number",error:{required:"NÕUTAV",invalid:"Teie kaardinumber ei sobi",incomplete:"Teie kaardinumber on puudulik",unsupported:"Toetamata kaardi tüüp"}},expiry:{label:"Aegumiskuupäev",placeholder:"KK / AA",error:{required:"NÕUTAV",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:{required:"NÕUTAV",incomplete:"Teie kaardi turvakood on puudulik",invalid:"Teie kaardi CVC on kehtetu"}},name:{label:"Kaardiomaniku nimi",placeholder:"Täisnimi",error:{required:"NÕUTAV",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:{title:"Maksutapa",number:{label:"Kortin numero",error:{required:"PAKOLLINEN",invalid:"Kortin numero ei kelpaa",incomplete:"Kortin numero on puutteellinen",unsupported:"Ei tuettu korttityyppi"}},expiry:{label:"Erääntymispäivä",placeholder:"KK / VV",error:{required:"PAKOLLINEN",incomplete:"Kortin voimassaoloaika on puutteellinen",invalid:"Kortin voimassaoloaika on virheellinen",expired:"Korttisi on vanhentunut"}},cvc:{label:"Turvakoodi",placeholder:"CVC-koodi",error:{required:"PAKOLLINEN",incomplete:"Kortin turvakoodi on puutteellinen",invalid:"Kortin CVC ei kelpaa"}},name:{label:"Kortinhaltijan nimi",placeholder:"Koko nimi",error:{required:"PAKOLLINEN",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:{title:"Paraan ng pagbabayad",number:{label:"Numero ng card",error:{required:"KAILANGAN",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:{required:"KAILANGAN",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:{required:"KAILANGAN",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:{required:"KAILANGAN",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:{title:"Moyen de paiement",number:{label:"Numéro de la carte",error:{required:"OBLIGATOIRE",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:{required:"OBLIGATOIRE",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:{required:"OBLIGATOIRE",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:{required:"OBLIGATOIRE",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:{title:"Način plaćanja",number:{label:"Broj kartice",error:{required:"POTREBNO",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:{required:"POTREBNO",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:{required:"POTREBNO",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:{required:"POTREBNO",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:{title:"Fizetési mód",number:{label:"Kártya száma",error:{required:"KÖTELEZŐ",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:{required:"KÖTELEZŐ",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:{required:"KÖTELEZŐ",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:{required:"KÖTELEZŐ",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:{title:"Metode pembayaran",number:{label:"Nomor kartu",error:{required:"WAJIB DIISI",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:{required:"WAJIB DIISI",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:{required:"WAJIB DIISI",incomplete:"Kode keamanan kartu Anda tidak lengkap",invalid:"CVC kartu Anda tidak valid"}},name:{label:"Nama pemegang kartu",placeholder:"Nama lengkap",error:{required:"WAJIB DIISI",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:{title:"Modalità di pagamento",number:{label:"Numero di carta",error:{required:"OBBLIGATORIO",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:{required:"OBBLIGATORIO",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:{required:"OBBLIGATORIO",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:{required:"OBBLIGATORIO",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:{title:"支払い方法",number:{label:"カード番号",error:{required:"必須",invalid:"カード番号が無効です",incomplete:"カード番号に不備があります",unsupported:"サポートされていないカードタイプ"}},expiry:{label:"有効期限",placeholder:"MM (月) / YY (年)",error:{required:"必須",incomplete:"カードの有効期限に不備があります",invalid:"カードの有効期間の満了月が無効です",expired:"カードの有効期限が切れています"}},cvc:{label:"セキュリティコード",placeholder:"セキュリティコード",error:{required:"必須",incomplete:"カードのセキュリティコードに不備があります",invalid:"カードのセキュリティコードが無効です"}},name:{label:"カード保有者の名前",placeholder:"氏名",error:{required:"必須",invalid:"氏名を入力してください"}},pay:{button:"支払う"},compact:{button:"カード"}},status:{success:"成功",error:"お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"}},ko:{card:{title:"결제 방식",number:{label:"카드 번호",error:{required:"필수",invalid:"카드 번호가 잘못되었습니다",incomplete:"카드 번호가 불완전합니다",unsupported:"지원되지 않는 카드 유형"}},expiry:{label:"만료 날짜",placeholder:"MM / YY",error:{required:"필수",incomplete:"카드의 유효기간 만료일이 불완전합니다",invalid:"카드의 유효기간 만료일이 잘못되었습니다",expired:"카드가 만료되었습니다"}},cvc:{label:"보안 코드",placeholder:"보안 코드(CVC)",error:{required:"필수",incomplete:"카드의 보안 코드가 불완전합니다",invalid:"카드의 보안 코드(CVC)가 잘못되었습니다"}},name:{label:"카드 소유자 이름",placeholder:"성명",error:{required:"필수",invalid:"성명을 입력하십시오"}},pay:{button:"결제"},compact:{button:"카드 번호"}},status:{success:"성공",error:"결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."}},lt:{card:{title:"Mokėjimo būdas",number:{label:"Kortelės numeris",error:{required:"PRIVALOMA",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:{required:"PRIVALOMA",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:{required:"PRIVALOMA",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:{required:"PRIVALOMA",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:{title:"Maksājumu veids",number:{label:"Kartes numurs",error:{required:"OBLIGĀTI",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:{required:"OBLIGĀTI",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:{required:"OBLIGĀTI",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:{required:"OBLIGĀTI",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:{title:"Kaedah pembayaran",number:{label:"Nombor kad",error:{required:"DIPERLUKAN",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:{required:"DIPERLUKAN",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:{required:"DIPERLUKAN",incomplete:"Kod keselamatan kad anda tidak lengkap",invalid:"CVC kad anda tidak sah"}},name:{label:"Nama pemegang kad",placeholder:"Nama penuh",error:{required:"DIPERLUKAN",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:{title:"Метод оплаты",number:{label:"Номер карты",error:{required:"ОБЯЗАТЕЛЬНО",invalid:"Недопустимый номер карты",incomplete:"Номер карты неполон",unsupported:"Неподдерживаемый тип карты"}},expiry:{label:"Срок действия",placeholder:"ММ / ГГ",error:{required:"ОБЯЗАТЕЛЬНО",incomplete:"Срок действия карты указан не полностью",invalid:"Указанный срок действия карты недействителен",expired:"Срок действия карты истек"}},cvc:{label:"Код безопасности",placeholder:"CVC",error:{required:"ОБЯЗАТЕЛЬНО",incomplete:"Код безопасности карты введен не полностью",invalid:"Код CVC карты недействителен"}},name:{label:"Имя владельца карты",placeholder:"Имя, фамилия",error:{required:"ОБЯЗАТЕЛЬНО",invalid:"Введите свое имя и фамилию"}},pay:{button:"Оплатить"},compact:{button:"Кредитная карта"}},status:{success:"Успех",error:"Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."}},mt:{card:{title:"Metodu tal-ħlas",number:{label:"Numru tal-karta",error:{required:"MEĦTIEĠ/A",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:{required:"MEĦTIEĠ/A",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:{required:"MEĦTIEĠ/A",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:{required:"MEĦTIEĠ/A",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."}},nb:{card:{title:"Betalingsmetode",number:{label:"Kortnummer",error:{required:"PÅKREVET",invalid:"Kortnummer er ugyldig",incomplete:"Kortnummeret er ufullstendig",unsupported:"Ikke understøttet korttype"}},expiry:{label:"Utløpsdato",placeholder:"MM / ÅÅ",error:{required:"PÅKREVET",incomplete:"Kortets utløpsdato er ufullstendig",invalid:"Kortets utløpsdato er ugyldig",expired:"Kortet er utløpt"}},cvc:{label:"Sikkerhetskode",placeholder:"CVC",error:{required:"PÅKREVET",incomplete:"Kortets sikkerhetskode er ufullstendig",invalid:"Kortets CVC-nummer er ugyldig"}},name:{label:"Kortinnehavers navn",placeholder:"Fullt navn",error:{required:"PÅKREVET",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:{title:"Betaalmethode",number:{label:"Kaartnummer",error:{required:"VEREIST",invalid:"Je kaartnummer is ongeldig",incomplete:"Je kaartnummer is onvolledig",unsupported:"Niet ondersteund"}},expiry:{label:"Vervaldatum",placeholder:"MM / JJ",error:{required:"VEREIST",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:{required:"VEREIST",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:{required:"VEREIST",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:{title:"Metoda płatności",number:{label:"Numer karty",error:{required:"WYMAGANE",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:{required:"WYMAGANE",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:{required:"WYMAGANE",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:{required:"WYMAGANE",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:{title:"Forma de pagamento",number:{label:"Número do cartão",error:{required:"OBRIGATÓRIO",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:{required:"OBRIGATÓRIO",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:{required:"OBRIGATÓRIO",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:{required:"OBRIGATÓRIO",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:{title:"Metoda de plată",number:{label:"Numărul cardului",error:{required:"NECESAR",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:{required:"NECESAR",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:{required:"NECESAR",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:{required:"NECESAR",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."}},sk:{card:{title:"Spôsob platby",number:{label:"Číslo karty",error:{required:"POŽADOVANÉ",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:{required:"POŽADOVANÉ",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:{required:"POŽADOVANÉ",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:{required:"POŽADOVANÉ",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:{title:"Način plačila",number:{label:"Številka kartice",error:{required:"OBVEZNO",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:{required:"OBVEZNO",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:{required:"OBVEZNO",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:{required:"OBVEZNO",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:{title:"Betalningsmetod",number:{label:"Kortnummer",error:{required:"OBLIGATORISKT",invalid:"Ditt kortnummer är ogiltigt",incomplete:"Kortnumret är ofullständigt",unsupported:"Nepodporovaný typ karty"}},expiry:{label:"Sista giltighetsdag",placeholder:"MM / ÅÅ",error:{required:"OBLIGATORISKT",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:{required:"OBLIGATORISKT",incomplete:"Kortets säkerhetskod är ofullständig",invalid:"Kortets CVC-kod är ogiltig"}},name:{label:"Kortinnehavarens namn",placeholder:"Fullständigt namn",error:{required:"OBLIGATORISKT",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:{title:"วิธีการชำระเงิน",number:{label:"หมายเลขบัตร",error:{required:"ต้องป้อนข้อมูล",invalid:"หมายเลขบัตรของคุณไม่ถูกต้อง",incomplete:"หมายเลขบัตรของคุณไม่ครบถ้วน",unsupported:"ประเภทบัตรของคุณไม่ถูกต้อง"}},expiry:{label:"วันหมดอายุ",placeholder:"ดด / ปป",error:{required:"ต้องป้อนข้อมูล",incomplete:"วันที่หมดอายุของบัตรไม่ครบถ้วน",invalid:"วันที่หมดอายุของบัตรไม่ถูกต้อง",expired:"บัตรของคุณหมดอายุแล้ว"}},cvc:{label:"รหัสความปลอดภัย",placeholder:"CVC",error:{required:"ต้องป้อนข้อมูล",incomplete:"รหัสความปลอดภัยของบัตรไม่ครบถ้วน",invalid:"CVC ของบัตรไม่ถูกต้อง"}},name:{label:"ชื่อเจ้าของบัตร",placeholder:"ชื่อ-นามสกุล",error:{required:"ต้องป้อนข้อมูล",invalid:"โปรดป้อนชื่อ-นามสกุล"}},pay:{button:"ชำระเงิน"},compact:{button:"การ์ด"}},status:{success:"ความสำเร็จ",error:"เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"}},tr:{card:{title:"Ödeme yöntemi",number:{label:"Kart numarası",error:{required:"GEREKLI",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:{required:"GEREKLI",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:{required:"GEREKLI",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:{required:"GEREKLI",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:{title:"Phương thức thanh toán",number:{label:"Số thẻ",error:{required:"BẮT BUỘC",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:{required:"BẮT BUỘC",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:{required:"BẮT BUỘC",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:{required:"BẮT BUỘC",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:{title:"支付方式",number:{label:"卡号",error:{required:"必填",invalid:"您的卡号无效",incomplete:"您的银行卡卡号不完整",unsupported:"不支持的卡类型"}},expiry:{label:"有效期",placeholder:"月份 / 年份",error:{required:"必填",incomplete:"您银行卡的有效期不完整",invalid:"您银行卡的有效期无效",expired:"您的银行卡已过期"}},cvc:{label:"安全代码",placeholder:"CVC",error:{required:"必填",incomplete:"您银行卡的安全码不完整",invalid:"您银行卡的 CVC 无效"}},name:{label:"持卡人姓名",placeholder:"全名",error:{required:"必填",invalid:"请提供您的全名"}},pay:{button:"支付"},compact:{button:"卡片"}},status:{success:"成功",error:"我们无法验证您的付款方式。请选择其他付款方式并重试。"}}},Ir=()=>{const r=navigator==null?void 0:navigator.language.split("-")[0];return Tr[r]||Tr.en},Ii=(r,e={})=>{var n,i,a,s,o,c,l,d,u,h,p,m,f,v,y,A,T,N,w,I,L,S,B,G,q,M,F,K,J,R,W,j,g,_,k,U,E,x,C,P,V,O,H,X,le,D,te,ye,ut,pt,ht,mt,ft,vt,gt,yt,bt;if(!r)return Ir();const t=Tr[r]||Ir();return{card:{title:((n=e==null?void 0:e.card)==null?void 0:n.title)||t.card.title,number:{label:((a=(i=e==null?void 0:e.card)==null?void 0:i.number)==null?void 0:a.label)||t.card.number.label,error:{required:((c=(o=(s=e==null?void 0:e.card)==null?void 0:s.number)==null?void 0:o.error)==null?void 0:c.required)||t.card.number.error.required,invalid:((u=(d=(l=e==null?void 0:e.card)==null?void 0:l.number)==null?void 0:d.error)==null?void 0:u.invalid)||t.card.number.error.invalid,incomplete:((m=(p=(h=e==null?void 0:e.card)==null?void 0:h.number)==null?void 0:p.error)==null?void 0:m.incomplete)||t.card.number.error.incomplete,unsupported:((y=(v=(f=e==null?void 0:e.card)==null?void 0:f.number)==null?void 0:v.error)==null?void 0:y.unsupported)||t.card.number.error.unsupported}},expiry:{label:((T=(A=e==null?void 0:e.card)==null?void 0:A.expiry)==null?void 0:T.label)||t.card.expiry.label,placeholder:((w=(N=e==null?void 0:e.card)==null?void 0:N.expiry)==null?void 0:w.placeholder)||t.card.expiry.placeholder,error:{required:((S=(L=(I=e==null?void 0:e.card)==null?void 0:I.expiry)==null?void 0:L.error)==null?void 0:S.required)||t.card.expiry.error.required,invalid:((q=(G=(B=e==null?void 0:e.card)==null?void 0:B.expiry)==null?void 0:G.error)==null?void 0:q.invalid)||t.card.expiry.error.invalid,incomplete:((K=(F=(M=e==null?void 0:e.card)==null?void 0:M.expiry)==null?void 0:F.error)==null?void 0:K.incomplete)||t.card.expiry.error.incomplete,expired:((W=(R=(J=e==null?void 0:e.card)==null?void 0:J.expiry)==null?void 0:R.error)==null?void 0:W.expired)||t.card.expiry.error.expired}},cvc:{label:((g=(j=e==null?void 0:e.card)==null?void 0:j.cvc)==null?void 0:g.label)||t.card.cvc.label,placeholder:((k=(_=e==null?void 0:e.card)==null?void 0:_.cvc)==null?void 0:k.label)||t.card.cvc.label,error:{required:((E=(U=e==null?void 0:e.card)==null?void 0:U.cvc)==null?void 0:E.label)||t.card.cvc.label,incomplete:((C=(x=e==null?void 0:e.card)==null?void 0:x.cvc)==null?void 0:C.label)||t.card.cvc.label,invalid:((V=(P=e==null?void 0:e.card)==null?void 0:P.cvc)==null?void 0:V.label)||t.card.cvc.label}},name:{label:((H=(O=e==null?void 0:e.card)==null?void 0:O.name)==null?void 0:H.label)||t.card.name.label,placeholder:((le=(X=e==null?void 0:e.card)==null?void 0:X.name)==null?void 0:le.placeholder)||t.card.name.placeholder,error:{required:((ye=(te=(D=e==null?void 0:e.card)==null?void 0:D.name)==null?void 0:te.error)==null?void 0:ye.required)||t.card.name.error.required,invalid:((ht=(pt=(ut=e==null?void 0:e.card)==null?void 0:ut.name)==null?void 0:pt.error)==null?void 0:ht.invalid)||t.card.name.error.invalid}},pay:{button:((ft=(mt=e==null?void 0:e.card)==null?void 0:mt.pay)==null?void 0:ft.button)||t.card.pay.button},compact:{button:((gt=(vt=e==null?void 0:e.card)==null?void 0:vt.compact)==null?void 0:gt.button)||t.card.compact.button}},status:{success:((yt=e==null?void 0:e.status)==null?void 0:yt.success)||t.status.success,error:((bt=e==null?void 0:e.status)==null?void 0:bt.error)||t.status.error}}};class Gc extends Lt{constructor(){super({messages:Ir(),locale:(navigator==null?void 0:navigator.language.split("-")[0])||"en"})}setMessages(e){const t=this.locale(),n=Ii(t,e);this.setState({locale:t,messages:n,overrides:e})}setLocale(e){const t=this.overrides(),n=Ii(e,t);this.setState({locale:e,messages:n,overrides:t})}overrides(){const{overrides:e}=this.getState();return e}messages(){const{messages:e}=this.getState();return e}locale(){const{locale:e}=this.getState();return e}dir(){return this.locale()==="ar"?"rtl":"ltr"}}/*!
|
|
331
331
|
* paypal-js v8.2.0 (2025-01-23T17:26:53.747Z)
|
|
332
332
|
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
333
333
|
*
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
343
343
|
* See the License for the specific language governing permissions and
|
|
344
344
|
* limitations under the License.
|
|
345
|
-
*/function
|
|
345
|
+
*/function Yc(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t}typeof SuppressedError=="function"&&SuppressedError;function $c(r,e){var t=document.querySelector('script[src="'.concat(r,'"]'));if(t===null)return null;var n=xi(r,e),i=t.cloneNode();if(delete i.dataset.uidAuto,Object.keys(i.dataset).length!==Object.keys(n.dataset).length)return null;var a=!0;return Object.keys(i.dataset).forEach(function(s){i.dataset[s]!==n.dataset[s]&&(a=!1)}),a?t:null}function Qc(r){var e=r.url,t=r.attributes,n=r.onSuccess,i=r.onError,a=xi(e,t);a.onerror=i,a.onload=n,document.head.insertBefore(a,document.head.firstElementChild)}function Zc(r){var e=r.sdkBaseUrl,t=r.environment,n=Yc(r,["sdkBaseUrl","environment"]),i=e||ed(t),a=n,s=Object.keys(a).filter(function(l){return typeof a[l]!="undefined"&&a[l]!==null&&a[l]!==""}).reduce(function(l,d){var u=a[d].toString();return d=Xc(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(i,"?").concat(Jc(o)),attributes:c}}function Xc(r){var e=function(t,n){return(n?"-":"")+t.toLowerCase()};return r.replace(/[A-Z]+(?![a-z])|[A-Z]/g,e)}function Jc(r){var e="";return Object.keys(r).forEach(function(t){e.length!==0&&(e+="&"),e+=t+"="+r[t]}),e}function ed(r){return r==="sandbox"?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}function xi(r,e){e===void 0&&(e={});var t=document.createElement("script");return t.src=r,Object.keys(e).forEach(function(n){t.setAttribute(n,e[n]),n==="data-csp-nonce"&&t.setAttribute("nonce",e["data-csp-nonce"])}),t}function td(r,e){if(e===void 0&&(e=Promise),Ni(r,e),typeof document=="undefined")return e.resolve(null);var t=Zc(r),n=t.url,i=t.attributes,a=i["data-namespace"]||"paypal",s=Oi(a);return i["data-js-sdk-library"]||(i["data-js-sdk-library"]="paypal-js"),$c(n,i)&&s?e.resolve(s):rd({url:n,attributes:i},e).then(function(){var o=Oi(a);if(o)return o;throw new Error("The window.".concat(a," global variable is not available."))})}function rd(r,e){e===void 0&&(e=Promise),Ni(r,e);var t=r.url,n=r.attributes;if(typeof t!="string"||t.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 e(function(i,a){if(typeof document=="undefined")return i();Qc({url:t,attributes:n,onSuccess:function(){return i()},onError:function(){var s=new Error('The script "'.concat(t,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return a(s)}})})}function Oi(r){return window[r]}function Ni(r,e){if(typeof r!="object"||r===null)throw new Error("Expected an options object.");var t=r.environment;if(t&&t!=="production"&&t!=="sandbox")throw new Error('The `environment` option must be either "production" or "sandbox".');if(typeof e!="undefined"&&typeof e!="function")throw new Error("Expected PromisePonyfill to be a function.")}const nd={layout:"vertical",tagline:!1,height:40,borderRadius:12};class id{constructor(){b(this,"paypal",null)}init(e){return z(this,null,function*(){try{this.paypal=yield td(e)}catch(t){console.error("failed to load the PayPal JS SDK script",t)}})}render(e,t){return z(this,null,function*(){var n,i;this.paypal&&(yield(i=(n=this.paypal).Buttons)==null?void 0:i.call(n,Q({fundingSource:"paypal",style:nd},t)).render(e))})}}function Ne(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 xr={exports:{}},Li;function ad(){return Li||(Li=1,function(r,e){(function(t){r.exports=t()})(function(){return function(){function t(n,i,a){function s(l,d){if(!i[l]){if(!n[l]){var u=typeof Ne=="function"&&Ne;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=i[l]={exports:{}};n[l][0].call(p.exports,function(m){var f=n[l][1][m];return s(f||m)},p,p.exports,t,n,i,a)}return i[l].exports}for(var o=typeof Ne=="function"&&Ne,c=0;c<a.length;c++)s(a[c]);return s}return t}()({1:[function(t,n,i){var a={};function s(o){var c,l=JSON.stringify(o);if(!o.forceScriptReload&&(c=a[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,m){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){m(new Error("".concat(o.src," failed to load.")))}),d.addEventListener("abort",function(){m(new Error("".concat(o.src," has aborted.")))}),h.appendChild(d)}),a[l]=c,c}s.clearCache=function(){a={}},n.exports=s},{}],2:[function(t,n,i){n.exports=t("./dist/load-script")},{"./dist/load-script":1}],3:[function(t,n,i){function a(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var o=Math.random()*16|0,c=s==="x"?o:o&3|8;return c.toString(16)})}n.exports=a},{}],4:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(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)}}i.deferred=a},{}],5:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(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))}}i.once=a},{}],6:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(s,o){if(!o)return s;s.then(function(c){return o(null,c)}).catch(function(c){return o(c)})}i.promiseOrCallback=a},{}],7:[function(t,n,i){var a=t("./lib/deferred"),s=t("./lib/once"),o=t("./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(a.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(m){var f,v=m!=="constructor"&&typeof l.prototype[m]=="function",y=u.indexOf(m)===-1;return h?f=!0:f=m.charAt(0)!=="_",v&&f&&y});return p.forEach(function(m){var f=l.prototype[m];l.prototype[m]=c(f)}),l},n.exports=c},{"./lib/deferred":4,"./lib/once":5,"./lib/promise-or-callback":6}],8:[function(t,n,i){(function(a,s){typeof i=="object"&&typeof n!="undefined"?s(i):(a=typeof globalThis!="undefined"?globalThis:a||self,s(a.loadAxo={}))})(this,function(a){/*! *****************************************************************************
|
|
346
346
|
Copyright (c) Microsoft Corporation.
|
|
347
347
|
|
|
348
348
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
356
356
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
357
357
|
PERFORMANCE OF THIS SOFTWARE.
|
|
358
|
-
***************************************************************************** */function s(E,x,C,P){function V(O){return O instanceof C?O:new C(function(H){H(O)})}return new(C||(C=Promise))(function(O,H){function X(te){try{D(P.next(te))}catch(ye){H(ye)}}function le(te){try{D(P.throw(te))}catch(ye){H(ye)}}function D(te){te.done?O(te.value):V(te.value).then(X,le)}D((P=P.apply(E,[])).next())})}function o(E,x){var C={label:0,sent:function(){if(O[0]&1)throw O[1];return O[1]},trys:[],ops:[]},P,V,O,H;return H={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function X(D){return function(te){return le([D,te])}}function le(D){if(P)throw new TypeError("Generator is already executing.");for(;C;)try{if(P=1,V&&(O=D[0]&2?V.return:D[0]?V.throw||((O=V.return)&&O.call(V),0):V.next)&&!(O=O.call(V,D[1])).done)return O;switch(V=0,O&&(D=[D[0]&2,O.value]),D[0]){case 0:case 1:O=D;break;case 4:return C.label++,{value:D[1],done:!1};case 5:C.label++,V=D[1],D=[0];continue;case 7:D=C.ops.pop(),C.trys.pop();continue;default:if(O=C.trys,!(O=O.length>0&&O[O.length-1])&&(D[0]===6||D[0]===2)){C=0;continue}if(D[0]===3&&(!O||D[1]>O[0]&&D[1]<O[3])){C.label=D[1];break}if(D[0]===6&&C.label<O[1]){C.label=O[1],O=D;break}if(O&&C.label<O[2]){C.label=O[2],C.ops.push(D);break}O[2]&&C.ops.pop(),C.trys.pop();continue}D=x.call(E,C)}catch(te){D=[6,te],V=0}finally{P=O=0}if(D[0]&5)throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}}var l={},c={};function d(E){var x,C=JSON.stringify(E);if(!E.forceScriptReload&&(x=c[C],x))return x;var P=document.createElement("script"),V=E.dataAttributes||{},O=E.container||document.head;return P.src=E.src,P.id=E.id||"",P.async=!0,E.type&&P.setAttribute("type","".concat(E.type)),E.crossorigin&&P.setAttribute("crossorigin","".concat(E.crossorigin)),Object.keys(V).forEach(function(H){P.setAttribute("data-".concat(H),"".concat(V[H]))}),x=new Promise(function(H,X){P.addEventListener("load",function(){H(P)}),P.addEventListener("error",function(){X(new Error("".concat(E.src," failed to load.")))}),P.addEventListener("abort",function(){X(new Error("".concat(E.src," has aborted.")))}),O.appendChild(P)}),c[C]=x,x}d.clearCache=function(){c={}};var u=d,h=function(x){var C=document.querySelector('link[href="'.concat(x.href,'"]'));if(C)return Promise.resolve(C);C=document.createElement("link");var P=x.container||document.head;return C.setAttribute("rel","stylesheet"),C.setAttribute("type","text/css"),C.setAttribute("href",x.href),C.setAttribute("id",x.id),P.firstChild?P.insertBefore(C,P.firstChild):P.appendChild(C),Promise.resolve(C)};Object.defineProperty(l,"__esModule",{value:!0}),l.loadStylesheet=m=l.loadScript=void 0;var p=u,m=l.loadScript=p,f=h;l.loadStylesheet=f;var v="https://www.paypalobjects.com",y={minified:"axo.min",unminified:"axo"},T="fastlane",A="connect-boba",N="".concat(A,"/locales/"),w={AXO_ASSET_NAME:y,AXO_ASSET_PATH:A,LOCALE_PATH:N,CDNX_PROD:v},I={BT:"BT",PPCP:"PPCP"};function L(){return typeof window.define=="function"&&!!window.define.amd}function S(){return L()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function B(E,x,C){var P,V;return C===void 0&&(C=!0),s(this,void 0,void 0,function(){var O,H;return o(this,function(X){if(O=q(),O&&O[E.module]){if(x&&((P=O[E.module])===null||P===void 0?void 0:P.VERSION)!==x)throw H=(V=O[E.module])===null||V===void 0?void 0:V.VERSION,new Error("".concat(E.module," already loaded with version ").concat(H," cannot load version ").concat(x));return[2,!0]}if(!x)throw new Error("Attempted to load ".concat(E.module," without specifying version"));return[2,G(E,x,C)]})})}function G(E,x,C){if(C===void 0&&(C=!0),L()){var P=C?E.amdModule.minified:E.amdModule.unminified;return new Promise(function(O,H){window.require([P],O,H)})}var V=C?E.script.minified:E.script.unminified;return m({id:"".concat(E.id,"-").concat(x),src:"https://js.braintreegateway.com/web/".concat(x,"/js/").concat(V)})}function q(){return window==null?void 0:window.braintree}var M,F,K={Client:"client",HostedCardFields:"hostedFields"},J="braintree",R=(M={},M[K.Client]="client",M[K.HostedCardFields]="hosted-fields",M),W=(F={},F[K.Client]={id:"client",module:K.Client,amdModule:{unminified:"".concat(J,"/").concat(R[K.Client]),minified:"".concat(J,"/").concat(R[K.Client],".min")},script:{unminified:"".concat(R[K.Client],".js"),minified:"".concat(R[K.Client],".min.js")}},F[K.HostedCardFields]={id:"hcf",module:K.HostedCardFields,amdModule:{unminified:"".concat(J,"/").concat(R[K.HostedCardFields]),minified:"".concat(J,"/").concat(R[K.HostedCardFields],".min")},script:{unminified:"".concat(R[K.HostedCardFields],".js"),minified:"".concat(R[K.HostedCardFields],".min.js")}},F);function j(E){return s(this,void 0,void 0,function(){var x,C,P,V;return o(this,function(O){switch(O.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),x=E.btSdkVersion,C=E.minified,P=k(E),V=U(E),E.platform!==I.BT?[3,2]:[4,Promise.all([B(W.hostedFields,x,C),g(P,C)])];case 1:return O.sent(),[3,5];case 2:return E.platform!==I.PPCP?[3,4]:[4,Promise.all([B(W.client,x,C),B(W.hostedFields,x,C),g(P,C)])];case 3:return O.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:V}}]}})})}function g(E,x){var C;if(x===void 0&&(x=!0),L()){S()&&requirejs.config({paths:(C={},C[T]=E,C)});var P="".concat(T,"/").concat(x?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified);return new Promise(function(V,O){window.require([P],V,O)})}return m({id:"axo-id",src:E,forceScriptReload:!0})}function _(E){var x=E.assetUrl,C=E.bundleId;return C?"https://cdn-".concat(C,".static.engineering.dev.paypalinc.com/").concat(x):"".concat(w.CDNX_PROD,"/").concat(x)}function k(E){var x,C=(E==null?void 0:E.minified)!==!1?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified,P=L()?w.AXO_ASSET_PATH:"".concat(w.AXO_ASSET_PATH,"/").concat(C,".js");return _({assetUrl:P,bundleId:(x=E==null?void 0:E.metadata)===null||x===void 0?void 0:x.bundleIdOverride})}function U(E){var x;return _({assetUrl:w.LOCALE_PATH,bundleId:(x=E==null?void 0:E.metadata)===null||x===void 0?void 0:x.bundleIdOverride})}a.constants=w,a.loadAxo=j})},{}],9:[function(t,n,i){var a=t("./constants").BRAINTREE_VERSION,s=t("./request/graphql"),o=t("./request"),l=t("../lib/is-verified-domain"),c=t("../lib/braintree-error"),d=t("../lib/convert-to-braintree-error"),u=t("./get-configuration").getConfiguration,h=t("../lib/create-authorization-data"),p=t("../lib/add-metadata"),m=t("@braintree/wrap-promise"),f=t("../lib/once"),v=t("../lib/deferred"),y=t("../lib/assign").assign,T=t("../lib/analytics"),A=t("./errors"),N=t("../lib/constants").VERSION,w=t("../lib/constants").GRAPHQL_URLS,I=t("../lib/methods"),L=t("../lib/convert-methods-to-error"),S=t("../lib/assets"),B=t("../lib/constants").FRAUDNET_FNCLS,G=t("../lib/constants").FRAUDNET_SOURCE,q=t("../lib/constants").FRAUDNET_URL,M={};function F(R){var W,j;if(R=R||{},W=JSON.stringify(R),j=R.gatewayConfiguration,!j)throw new c(A.CLIENT_MISSING_GATEWAY_CONFIGURATION);if(["assetsUrl","clientApiUrl","configUrl"].forEach(function(g){if(g in j&&!l(j[g]))throw new c({type:A.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:A.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:g+" property is on an invalid domain."})}),this.getConfiguration=function(){return JSON.parse(W)},this._request=o,this._configuration=this.getConfiguration(),this._clientApiBaseUrl=j.clientApiUrl+"/v1/",j.graphQL){if(!l(j.graphQL.url))throw new c({type:A.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:A.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:"graphQL.url property is on an invalid domain."});this._graphQL=new s({graphQL:j.graphQL})}}F.initialize=function(R){var W,j,g=M[R.authorization];if(g)return T.sendEvent(g,"custom.client.load.cached"),g;try{j=h(R.authorization)}catch(_){return Promise.reject(new c(A.CLIENT_INVALID_AUTHORIZATION))}return g=u(j,R.sessionId).then(function(_){return R.debug&&(_.isDebug=!0),_.authorization=R.authorization,W=new F(_),W}),M[R.authorization]=g,T.sendEvent(g,"custom.client.load.initialized"),g.then(function(_){return T.sendEvent(W,"custom.client.load.succeeded"),_}).catch(function(_){return delete M[R.authorization],Promise.reject(_)})},F.clearCache=function(){M={}},F.prototype._findOrCreateFraudnetJSON=function(R){var W=document.querySelector('script[fncls="'+B+'"]'),j,g,_,k;W||(W=document.body.appendChild(document.createElement("script")),W.type="application/json",W.setAttribute("fncls",B)),j=this.getConfiguration(),g={rda_tenant:"bt_card",mid:j.gatewayConfiguration.merchantId},_=j.authorizationFingerprint,_&&_.split("&").forEach(function(U){var E=U.split("=");E[0]==="customer_id"&&E.length>1&&(g.cid=E[1])}),k={f:R.substr(0,32),fp:g,bu:!1,s:G},W.text=JSON.stringify(k)},F.prototype.request=function(R,W){var j=this,g=new Promise(function(_,k){var U,E,x,C,P=!!(R.endpoint==="payment_methods/credit_cards"&&j.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);if(R.api!=="graphQLApi"&&(R.method?R.endpoint||(U="options.endpoint"):U="options.method"),U)throw new c({type:A.CLIENT_OPTION_REQUIRED.type,code:A.CLIENT_OPTION_REQUIRED.code,message:U+" is required when making a request."});if("api"in R?E=R.api:E="clientApi",C={method:R.method,graphQL:j._graphQL,timeout:R.timeout,metadata:j._configuration.analyticsMetadata},E==="clientApi")x=j._clientApiBaseUrl,C.data=p.addMetadata(j._configuration,R.data);else if(E==="graphQLApi")x=w[j._configuration.gatewayConfiguration.environment],R.endpoint="",C.method="post",C.data=y({clientSdkMetadata:{platform:j._configuration.analyticsMetadata.platform,source:j._configuration.analyticsMetadata.source,integration:j._configuration.analyticsMetadata.integration,sessionId:j._configuration.analyticsMetadata.sessionId,version:N}},R.data),C.headers=J(j._configuration);else throw new c({type:A.CLIENT_OPTION_INVALID.type,code:A.CLIENT_OPTION_INVALID.code,message:"options.api is invalid."});C.url=x+R.endpoint,C.sendAnalyticsEvent=function(V){T.sendEvent(j,V)},j._request(C,function(V,O,H){var X,le;if(le=K(H,V),le){k(le);return}if(E==="graphQLApi"&&O.errors){k(d(O.errors,{type:A.CLIENT_GRAPHQL_REQUEST_ERROR.type,code:A.CLIENT_GRAPHQL_REQUEST_ERROR.code,message:A.CLIENT_GRAPHQL_REQUEST_ERROR.message}));return}X=y({_httpStatus:H},O),P&&X.creditCards&&X.creditCards.length>0&&(j._findOrCreateFraudnetJSON(X.creditCards[0].nonce),S.loadScript({src:q,forceScriptReload:!0})),_(X)})});if(typeof W=="function"){W=f(v(W)),g.then(function(_){W(null,_,_._httpStatus)}).catch(function(_){var k=_&&_.details&&_.details.httpStatus;W(_,null,k)});return}return g};function K(R,W){var j;if(R===-1?j=new c(A.CLIENT_REQUEST_TIMEOUT):R===401?j=new c(A.CLIENT_AUTHORIZATION_INVALID):R===403?j=new c(A.CLIENT_AUTHORIZATION_INSUFFICIENT):R===429?j=new c(A.CLIENT_RATE_LIMITED):R>=500?j=new c(A.CLIENT_GATEWAY_NETWORK):(R<200||R>=400)&&(j=d(W,{type:A.CLIENT_REQUEST_ERROR.type,code:A.CLIENT_REQUEST_ERROR.code,message:A.CLIENT_REQUEST_ERROR.message})),j)return j.details=j.details||{},j.details.httpStatus=R,j}F.prototype.toJSON=function(){return this.getConfiguration()},F.prototype.getVersion=function(){return N},F.prototype.teardown=m(function(){var R=this;return delete M[R.getConfiguration().authorization],L(R,I(F.prototype)),Promise.resolve()});function J(R){var W=R.authorizationFingerprint||R.authorization;return{Authorization:"Bearer "+W,"Braintree-Version":a}}n.exports=F},{"../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(t,n,i){n.exports={BRAINTREE_VERSION:"2018-05-10"}},{}],11:[function(t,n,i){var a=t("../lib/braintree-error");n.exports={CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN:{type:a.types.MERCHANT,code:"CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN"},CLIENT_OPTION_REQUIRED:{type:a.types.MERCHANT,code:"CLIENT_OPTION_REQUIRED"},CLIENT_OPTION_INVALID:{type:a.types.MERCHANT,code:"CLIENT_OPTION_INVALID"},CLIENT_MISSING_GATEWAY_CONFIGURATION:{type:a.types.INTERNAL,code:"CLIENT_MISSING_GATEWAY_CONFIGURATION",message:"Missing gatewayConfiguration."},CLIENT_INVALID_AUTHORIZATION:{type:a.types.MERCHANT,code:"CLIENT_INVALID_AUTHORIZATION",message:"Authorization is invalid. Make sure your client token or tokenization key is valid."},CLIENT_GATEWAY_NETWORK:{type:a.types.NETWORK,code:"CLIENT_GATEWAY_NETWORK",message:"Cannot contact the gateway at this time."},CLIENT_REQUEST_TIMEOUT:{type:a.types.NETWORK,code:"CLIENT_REQUEST_TIMEOUT",message:"Request timed out waiting for a reply."},CLIENT_REQUEST_ERROR:{type:a.types.NETWORK,code:"CLIENT_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_GRAPHQL_REQUEST_ERROR:{type:a.types.NETWORK,code:"CLIENT_GRAPHQL_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_RATE_LIMITED:{type:a.types.MERCHANT,code:"CLIENT_RATE_LIMITED",message:"You are being rate-limited; please try again in a few minutes."},CLIENT_AUTHORIZATION_INSUFFICIENT:{type:a.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INSUFFICIENT",message:"The authorization used has insufficient privileges."},CLIENT_AUTHORIZATION_INVALID:{type:a.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(t,n,i){var a=t("../lib/braintree-error"),s=t("@braintree/wrap-promise"),o=t("./request"),l=t("@braintree/uuid"),c=t("../lib/constants"),d=t("./errors"),u=t("./request/graphql"),h=t("../lib/constants").GRAPHQL_URLS,p=t("../lib/is-date-string-before-or-on"),m=t("./constants").BRAINTREE_VERSION;function f(v,y){return new Promise(function(T,A){var N,w,I,L,S=y||l(),B={merchantAppId:window.location.host,platform:c.PLATFORM,sdkVersion:c.VERSION,source:c.SOURCE,integration:c.INTEGRATION,integrationType:c.INTEGRATION,sessionId:S};w=v.attrs,I=v.configUrl,w._meta=B,w.braintreeLibraryVersion=c.BRAINTREE_LIBRARY_VERSION,w.configVersion="3",L={url:I,method:"GET",data:w},w.authorizationFingerprint&&v.graphQL?(p(v.graphQL.date,m)&&(L.graphQL=new u({graphQL:{url:v.graphQL.url,features:["configuration"]}})),L.metadata=B):w.tokenizationKey&&(L.graphQL=new u({graphQL:{url:h[v.environment],features:["configuration"]}}),L.metadata=B),o(L,function(G,q,M){var F;if(G){M===403?F=d.CLIENT_AUTHORIZATION_INSUFFICIENT:M===401?F=d.CLIENT_AUTHORIZATION_INVALID:F=d.CLIENT_GATEWAY_NETWORK,A(new a({type:F.type,code:F.code,message:F.message,details:{originalError:G}}));return}N={authorizationType:w.tokenizationKey?"TOKENIZATION_KEY":"CLIENT_TOKEN",authorizationFingerprint:w.authorizationFingerprint,analyticsMetadata:B,gatewayConfiguration:q},T(N)})})}n.exports={getConfiguration:s(f)}},{"../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(t,n,i){var a=t("../lib/braintree-error"),s=t("./client"),o="3.126.0",l=t("@braintree/wrap-promise"),c=t("../lib/errors");function d(u){return u.authorization?s.initialize(u):Promise.reject(new a({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:o}},{"../lib/braintree-error":33,"../lib/errors":40,"./client":9,"@braintree/wrap-promise":7}],14:[function(t,n,i){var a=t("../../lib/querystring"),s=t("../../lib/assign").assign,o=t("./prep-body"),l=t("./parse-body"),c=t("./xhr"),d=c.isAvailable,u=t("./graphql/request"),h=t("./default-request"),p=1,m=408;function f(A){return!A||A===m}function v(A){var N=!A.data&&A.errors&&A.errors[0]&&A.errors[0].extensions&&A.errors[0].extensions.errorClass;return N==="UNKNOWN"||N==="INTERNAL"}function y(A,N,w){var I,L,S,B,G,q,M,F=A.url,K=A.graphQL,J=A.timeout,R=c.getRequestObject(),W=w,j=!!(K&&K.isGraphQLRequest(F,A.data));A.headers=s({"Content-Type":"application/json"},A.headers),j?S=new u(A):S=new h(A),F=S.getUrl(),B=S.getBody(),G=S.getMethod(),q=S.getHeaders(),G==="GET"&&(F=a.queryify(F,B),B=null),d?R.onreadystatechange=function(){if(R.readyState===4){if(R.status===0&&j){delete A.graphQL,y(A,N,w);return}if(M=l(R.responseText),L=S.adaptResponseBody(M),I=S.determineStatus(R.status,M),I>=400||I<200){if(j&&v(M)){delete A.graphQL,y(A,N,w);return}if(N<p&&f(I)){N++,y(A,N,w);return}W(L||"error",null,I||500)}else W(null,L,I)}}:(A.headers&&(F=a.queryify(F,q)),R.onload=function(){W(null,l(R.responseText),R.status)},R.onerror=function(){W("error",null,500)},R.onprogress=function(){},R.ontimeout=function(){W("timeout",null,-1)});try{R.open(G,F,!0)}catch(g){if(!j)throw g;delete A.graphQL,y(A,N,w);return}R.timeout=J,d&&Object.keys(q).forEach(function(g){R.setRequestHeader(g,q[g])});try{R.send(o(G,B))}catch(g){}}function T(A,N){y(A,0,N)}n.exports={request:T}},{"../../lib/assign":32,"../../lib/querystring":47,"./default-request":15,"./graphql/request":24,"./parse-body":26,"./prep-body":27,"./xhr":28}],15:[function(t,n,i){function a(s){this._url=s.url,this._data=s.data,this._method=s.method,this._headers=s.headers}a.prototype.getUrl=function(){return this._url},a.prototype.getBody=function(){return this._data},a.prototype.getMethod=function(){return this._method},a.prototype.getHeaders=function(){return this._headers},a.prototype.adaptResponseBody=function(s){return s},a.prototype.determineStatus=function(s){return s},n.exports=a},{}],16:[function(t,n,i){var a=t("./error"),s=t("../../../../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 l(u,h){var p;return u.data&&!u.errors?p=c(u,h):p=a(u),p}function c(u,h){var p=u.data.clientConfiguration,m;return m={environment:p.environment.toLowerCase(),clientApiUrl:p.clientApiUrl,assetsUrl:p.assetsUrl,analytics:{url:p.analyticsUrl},merchantId:p.merchantId,venmo:"off"},p.supportedFeatures&&(m.graphQL={url:h._graphQL._config.url,features:p.supportedFeatures.map(function(f){return f.toLowerCase()})}),p.braintreeApi&&(m.braintreeApi=p.braintreeApi),p.applePayWeb&&(m.applePayWeb=p.applePayWeb,m.applePayWeb.supportedNetworks=d(p.applePayWeb.supportedCardBrands,o.applePayWeb),delete m.applePayWeb.supportedCardBrands),p.fastlane&&(m.fastlane=p.fastlane),p.ideal&&(m.ideal=p.ideal),p.creditCard?(m.challenges=p.creditCard.challenges.map(function(f){return f.toLowerCase()}),m.creditCards={supportedCardTypes:d(p.creditCard.supportedCardBrands,o.creditCard)},m.threeDSecureEnabled=p.creditCard.threeDSecureEnabled,m.threeDSecure=p.creditCard.threeDSecure):(m.challenges=[],m.creditCards={supportedCardTypes:[]},m.threeDSecureEnabled=!1),p.googlePay&&(m.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&&(m.payWithVenmo={merchantId:p.venmo.merchantId,accessToken:p.venmo.accessToken,environment:p.venmo.environment.toLowerCase(),enrichedCustomerDataEnabled:p.venmo.enrichedCustomerDataEnabled}),p.paypal?(m.paypalEnabled=!0,m.paypal=s({},p.paypal),m.paypal.currencyIsoCode=m.paypal.currencyCode,m.paypal.environment=m.paypal.environment.toLowerCase(),delete m.paypal.currencyCode):m.paypalEnabled=!1,p.unionPay&&(m.unionPay={enabled:!0,merchantAccountId:p.unionPay.merchantAccountId}),p.visaCheckout&&(m.visaCheckout={apikey:p.visaCheckout.apiKey,encryptionKey:p.visaCheckout.encryptionKey,externalClientId:p.visaCheckout.externalClientId,supportedCardTypes:d(p.visaCheckout.supportedCardBrands,o.visaCheckout)}),p.masterpass&&(m.masterpass={merchantCheckoutId:p.masterpass.merchantCheckoutId,supportedNetworks:d(p.masterpass.supportedCardBrands,o.masterpass)}),p.usBankAccount&&(m.usBankAccount={routeId:p.usBankAccount.routeId,plaid:{publicKey:p.usBankAccount.plaidPublicKey}}),m}function d(u,h){return u.reduce(function(p,m){return h.hasOwnProperty(m)?p.concat(h[m]):p},[])}n.exports=l},{"../../../../lib/assign":32,"./error":19}],17:[function(t,n,i){var a=t("./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"},l={PSDTWO:"psd2"};function c(u){var h;return u.data&&!u.errors?h=d(u):h=a(u),h}function d(u){var h=u.data.tokenizeCreditCardForPayPalConnect,p=h.paymentMethod.details,m=p.last4?p.last4.substr(2,4):"",f=p.binData,v,y;return f&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(T){f[T]?f[T]=o[f[T]]:f[T]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(T){f[T]||(f[T]="Unknown")})),v={creditCards:[{binData:f,consumed:!1,description:m?"ending in "+m:"",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:m},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(t,n,i){var a=t("./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"},l={PSDTWO:"psd2"};function c(u){var h;return u.data&&!u.errors?h=d(u):h=a(u),h}function d(u){var h=u.data.tokenizeCreditCard,p=h.creditCard,m=p.last4?p.last4.substr(2,4):"",f=p.binData,v,y;return f&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(T){f[T]?f[T]=o[f[T]]:f[T]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(T){f[T]||(f[T]="Unknown")})),v={creditCards:[{binData:f,consumed:!1,description:m?"ending in "+m:"",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:m},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(t,n,i){function a(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=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 m,f=h.extensions.legacyCode,v=u[0];if(u.length===1){p.push({code:f,field:v,message:h.message});return}p.forEach(function(y){y.field===v&&(m=y)}),m||(m={field:v,fieldErrors:[]},p.push(m)),c(u.slice(1),h,m.fieldErrors)}function d(u){var h={creditCard:"Credit card is invalid"},p=u[0].field;return h[p]}n.exports=a},{}],20:[function(t,n,i){var a="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:a,operationName:"ClientConfiguration"}}n.exports=s},{}],21:[function(t,n,i){var a=t("../../../../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,m=p.fastlane||{},f="fastlane"in p&&"termsAndConditionsVersion"in p.fastlane&&p.fastlane.termsAndConditionsVersion,v="fastlane"in p&&"termsAndConditionsCountry"in p.fastlane&&p.fastlane.termsAndConditionsCountry,y=p.email,T="hasBuyerConsent"in m&&m.hasBuyerConsent,A=p.shippingAddress,N=l(u,h),w=a({},N.input,{email:y,optIn:T,phone:p.phone});return f&&(w.termsAndConditionsVersion=f),v&&(w.termsAndConditionsCountry=v),"authAssertion"in m&&(w.authAssertion=m.authAssertion),A&&(w.shippingAddress=A),{input:w}}function l(u,h){var p=u.creditCard,m=p&&p.billingAddress,f=p&&p.expirationDate,v=p&&(p.expirationMonth||f&&f.split("/")[0].trim()),y=p&&(p.expirationYear||f&&f.split("/")[1].trim()),T={input:{creditCard:{number:p&&p.number,expirationMonth:v,expirationYear:y,cvv:p&&p.cvv,cardholderName:p&&p.cardholderName},options:{}}};return h.hasAuthenticationInsight&&(T.authenticationInsightInput={merchantAccountId:u.merchantAccountId}),m&&(T.input.creditCard.billingAddress=m),T.input=c(u,T.input),T}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=a({validate:p},h.options)),h}function d(u){var h={hasAuthenticationInsight:!!(u.authenticationInsight&&u.merchantAccountId)};return{query:s(h),variables:o(u,h),operationName:"TokenizeCreditCardForPayPalConnect"}}n.exports=d},{"../../../../lib/assign":32}],22:[function(t,n,i){var a=t("../../../../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,m=h&&h.expirationDate,f=h&&(h.expirationMonth||m&&m.split("/")[0].trim()),v=h&&(h.expirationYear||m&&m.split("/")[1].trim()),y={input:{creditCard:{number:h&&h.number,expirationMonth:f,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=a({validate:h},u.options)),u}function c(d){var u={hasAuthenticationInsight:!!(d.authenticationInsight&&d.merchantAccountId)};return{query:s(u),variables:o(d,u),operationName:"TokenizeCreditCard"}}n.exports=c},{"../../../../lib/assign":32}],23:[function(t,n,i){var a={tokenize_credit_cards:"payment_methods/credit_cards",configuration:"configuration"},s=["creditCard.options.unionPayEnrollment"];function o(c){this._config=c.graphQL}o.prototype.getGraphQLEndpoint=function(){return this._config.url},o.prototype.isGraphQLRequest=function(c,d){var u,h=this.getClientApiPath(c);return!this._isGraphQLEnabled()||!h||(u=this._config.features.some(function(p){return a[p]===h}),l(d))?!1:u},o.prototype.getClientApiPath=function(c){var d,u="/client_api/v1/",h=c.split(u);return h.length>1&&(d=h[1].split("?")[0]),d},o.prototype._isGraphQLEnabled=function(){return!!this._config};function l(c){return s.some(function(d){var u=d.split(".").reduce(function(h,p){return h&&h[p]},c);return u!==void 0})}n.exports=o},{}],24:[function(t,n,i){var a=t("../../constants").BRAINTREE_VERSION,s=t("../../../lib/assign").assign,o=t("../../../lib/snake-case-to-camel-case"),l=t("../../../lib/is-fastlane-checkout"),c=t("./generators/credit-card-tokenization"),d=t("./adapters/credit-card-tokenization"),u=t("./adapters/credit-card-tokenization-fastlane"),h=t("./generators/credit-card-for-fastlane-tokenization"),p=t("./generators/configuration"),m=t("./adapters/configuration"),f={"payment_methods/credit_cards":function(N,w){return w?h(N):c(N)},configuration:p},v={"payment_methods/credit_cards":function(N,w,I){return I?u(N,w):d(N,w)},configuration:m};function y(N){var w=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=f[w],this._adapter=v[w],this._sendAnalyticsEvent("graphql.init")}y.prototype.getUrl=function(){return this._graphQL.getGraphQLEndpoint()},y.prototype.getBody=function(){var N=A(this._data),w=this._generator(N,l(this._data.creditCard)),I=s({clientSdkMetadata:this._clientSdkMetadata},w);return JSON.stringify(I)},y.prototype.getMethod=function(){return"POST"},y.prototype.getHeaders=function(){var N,w;return this._data.authorizationFingerprint?(this._sendAnalyticsEvent("graphql.authorization-fingerprint"),N=this._data.authorizationFingerprint):(this._sendAnalyticsEvent("graphql.tokenization-key"),N=this._data.tokenizationKey),w={Authorization:"Bearer "+N,"Braintree-Version":a},s({},this._headers,w)},y.prototype.adaptResponseBody=function(N){return this._adapter(N,this,"creditCard"in this._data&&l(this._data.creditCard))},y.prototype.determineStatus=function(N,w){var I,L;return N===200?(L=w.errors&&w.errors[0]&&w.errors[0].extensions&&w.errors[0].extensions.errorClass,w.data&&!w.errors?I=200:L==="VALIDATION"?I=422:L==="AUTHORIZATION"?I=403:L==="AUTHENTICATION"?I=401:T(L,w)?I=403:I=500):N?I=N:I=500,this._sendAnalyticsEvent("graphql.status."+N),this._sendAnalyticsEvent("graphql.determinedStatus."+I),I};function T(N,w){return!N&&w.errors[0].message}function A(N){var w={};return Object.keys(N).forEach(function(I){var L=o(I);typeof N[I]=="object"?w[L]=A(N[I]):typeof N[I]=="number"?w[L]=String(N[I]):w[L]=N[I]}),w}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(t,n,i){var a=t("../../lib/once"),s=t("./ajax-driver");n.exports=function(o,l){l=a(l||Function.prototype),o.method=(o.method||"GET").toUpperCase(),o.timeout=o.timeout==null?6e4:o.timeout,o.data=o.data||{},s.request(o,l)}},{"../../lib/once":46,"./ajax-driver":14}],26:[function(t,n,i){n.exports=function(a){try{a=JSON.parse(a)}catch(s){}return a}},{}],27:[function(t,n,i){n.exports=function(a,s){if(typeof a!="string")throw new Error("Method must be a string");return a.toLowerCase()!=="get"&&s!=null&&(s=typeof s=="string"?s:JSON.stringify(s)),s}},{}],28:[function(t,n,i){var a=typeof window!="undefined"&&window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest;function s(){return a?new window.XMLHttpRequest:new window.XDomainRequest}n.exports={isAvailable:a,getRequestObject:s}},{}],29:[function(t,n,i){var a=t("./create-authorization-data"),s=t("./json-clone"),o=t("./constants");function l(d,u){var h,p=u?s(u):{},m=a(d.authorization).attrs,f=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(f[h]=p._meta[h]);return p._meta=f,m.tokenizationKey?p.tokenizationKey=m.tokenizationKey:p.authorizationFingerprint=m.authorizationFingerprint,p}function c(d){var u=d.getConfiguration(),h=a(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",m={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?m.tokenization_key=h.tokenizationKey:m.auth_fingerprint=h.authorizationFingerprint,m}n.exports={addMetadata:l,addEventMetadata:c}},{"./constants":34,"./create-authorization-data":37,"./json-clone":44}],30:[function(t,n,i){var a=t("./constants"),s=t("./add-metadata"),o=t("./assign").assign;function l(u,h,p){return c(u,h,{},p)}function c(u,h,p,m){var f=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,T=a.ANALYTICS_URL,A=a.ANALYTICS_PREFIX+h,N=v.getConfiguration(),w=N.gatewayConfiguration.environment==="production",I={events:[],tracking:[]},L=s.addEventMetadata(v,I);return L.event_name=A,L.t=f,I.events=[{level:"info",event:A,payload:o({env:w?"production":"sandbox",timestamp:f},p)}],I.tracking=[L],p&&typeof p=="object"&&(I.tracking=[d(L,p)]),y({url:T,method:"post",data:I,timeout:a.ANALYTICS_REQUEST_TIMEOUT_MS},m)}).catch(function(v){m&&m(v)})}function d(u,h){var p={},m=o({},h);return Object.keys(m).forEach(function(f){a.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(f)===-1&&delete m[f]}),p=o(u,m),p}n.exports={sendEvent:l,sendEventPlus:c}},{"./add-metadata":29,"./assign":32,"./constants":34}],31:[function(t,n,i){var a=t("@braintree/asset-loader/load-script"),s=t("@paypal/accelerated-checkout-loader");n.exports={loadScript:a,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":8}],32:[function(t,n,i){var a=typeof Object.assign=="function"?Object.assign:s;function s(o){var l,c,d;for(l=1;l<arguments.length;l++){c=arguments[l];for(d in c)c.hasOwnProperty(d)&&(o[d]=c[d])}return o}n.exports={assign:a,_assign:s}},{}],33:[function(t,n,i){var a=t("./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=a(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":39}],34:[function(t,n,i){var a="3.126.0",s="web",o={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:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:l,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:c,INTEGRATION_TIMEOUT_MS:6e4,VERSION:a,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+a,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],35:[function(t,n,i){var a=t("./braintree-error"),s=t("./errors");n.exports=function(o,l){l.forEach(function(c){o[c]=function(){throw new a({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:c+" cannot be called after teardown."})}})}},{"./braintree-error":33,"./errors":40}],36:[function(t,n,i){var a=t("./braintree-error");function s(o,l){return o instanceof a?o:new a({type:l.type,code:l.code,message:l.message,details:{originalError:o}})}n.exports=s},{"./braintree-error":33}],37:[function(t,n,i){var a=t("../lib/vendor/polyfill").atob,s=t("../lib/constants").CLIENT_API_URLS;function o(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 o(d)?(h=l(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=s[h.environment]+"/merchants/"+h.merchantId+"/client_api/v1/configuration"):(u=JSON.parse(a(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(t,n,i){n.exports=function(a){return function(){var s=arguments;setTimeout(function(){a.apply(null,s)},1)}}},{}],39:[function(t,n,i){function a(s,o){return o=o==null?"":o,s.reduce(function(l,c){return l[c]=o+c,l},{})}n.exports=a},{}],40:[function(t,n,i){var a=t("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:a.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:a.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:a.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:a.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:a.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":33}],41:[function(t,n,i){function a(o){var l=o.split("-");return new Date(l[0],l[1],l[2])}function s(o,l){return a(o)<=a(l)}n.exports=s},{}],42:[function(t,n,i){n.exports=function(a){return a&&a.hasOwnProperty("fastlane")&&a.fastlane}},{}],43:[function(t,n,i){var a,s={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function o(c){return c.split(".").slice(-2).join(".")}function l(c){var d;return c=c.toLowerCase(),/^https:/.test(c)?(a=a||document.createElement("a"),a.href=c,d=o(a.hostname),s.hasOwnProperty(d)):!1}n.exports=l},{}],44:[function(t,n,i){n.exports=function(a){return JSON.parse(JSON.stringify(a))}},{}],45:[function(t,n,i){n.exports=function(a){return Object.keys(a).filter(function(s){return typeof a[s]=="function"})}},{}],46:[function(t,n,i){function a(s){var o=!1;return function(){o||(o=!0,s.apply(null,arguments))}}n.exports=a},{}],47:[function(t,n,i){function a(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 l(u){var h,p;return u=u||window.location.href,o(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(m,f){var v=f.split("="),y=decodeURIComponent(v[0]),T=decodeURIComponent(v[1]);return m[y]=T,m},{}),p):{}}function c(u,h){var p,m,f,v=[];for(f in u)u.hasOwnProperty(f)&&(m=u[f],h?s(u)?p=h+"[]":p=h+"["+f+"]":p=f,typeof m=="object"?v.push(c(m,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(m)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&a(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=c(h)),u}n.exports={parse:l,stringify:c,queryify:d,hasQueryParams:o}},{}],48:[function(t,n,i){n.exports=function(a){return a.indexOf("_")===-1?a:a.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],49:[function(t,n,i){var a=typeof atob=="function"?atob:s;function s(o){var l,c,d,u,h,p,m,f,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+/=",T="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");f=0;do u=y.indexOf(o.charAt(f++)),h=y.indexOf(o.charAt(f++)),p=y.indexOf(o.charAt(f++)),m=y.indexOf(o.charAt(f++)),l=(u&63)<<2|h>>4&3,c=(h&15)<<4|p>>2&15,d=(p&3)<<6|m&63,T+=String.fromCharCode(l)+(c?String.fromCharCode(c):"")+(d?String.fromCharCode(d):"");while(f<o.length);return T}n.exports={atob:function(o){return a.call(window,o)},_atob:s}},{}]},{},[13])(13)})}(xr)),xr.exports}var ad=id();const sd=di(ad);var Or={exports:{}},Pi;function od(){return Pi||(Pi=1,function(r,e){(function(t){r.exports=t()})(function(){return function(){function t(n,i,a){function s(c,d){if(!i[c]){if(!n[c]){var u=typeof Ne=="function"&&Ne;if(!d&&u)return u(c,!0);if(o)return o(c,!0);var h=new Error("Cannot find module '"+c+"'");throw h.code="MODULE_NOT_FOUND",h}var p=i[c]={exports:{}};n[c][0].call(p.exports,function(m){var f=n[c][1][m];return s(f||m)},p,p.exports,t,n,i,a)}return i[c].exports}for(var o=typeof Ne=="function"&&Ne,l=0;l<a.length;l++)s(a[l]);return s}return t}()({1:[function(t,n,i){var a={};function s(o){var l,c=JSON.stringify(o);if(!o.forceScriptReload&&(l=a[c],l))return l;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]))}),l=new Promise(function(p,m){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){m(new Error("".concat(o.src," failed to load.")))}),d.addEventListener("abort",function(){m(new Error("".concat(o.src," has aborted.")))}),h.appendChild(d)}),a[c]=l,l}s.clearCache=function(){a={}},n.exports=s},{}],2:[function(t,n,i){n.exports=t("./dist/load-script")},{"./dist/load-script":1}],3:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,/Android/i.test(s)}},{}],4:[function(t,n,i){var a=t("./is-edge"),s=t("./is-samsung"),o=t("./is-duckduckgo"),l=t("./is-opera"),c=t("./is-silk");n.exports=function(u){return u=u||window.navigator.userAgent,(u.indexOf("Chrome")!==-1||u.indexOf("CriOS")!==-1)&&!a(u)&&!s(u)&&!o(u)&&!l(u)&&!c(u)}},{"./is-duckduckgo":5,"./is-edge":6,"./is-opera":14,"./is-samsung":15,"./is-silk":16}],5:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("DuckDuckGo/")!==-1}},{}],6:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Edge/")!==-1||s.indexOf("Edg/")!==-1}},{}],7:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,/FxiOS/i.test(s)}},{}],8:[function(t,n,i){var a=t("./is-ios");function s(o){return/\bGSA\b/.test(o)}n.exports=function(l){return l=l||window.navigator.userAgent,a(l)&&s(l)}},{"./is-ios":12}],9:[function(t,n,i){var a=t("./is-ios"),s=t("./is-ios-firefox"),o=/webkit/i;function l(u){return o.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,a(h)&&l(h)&&!c(h)&&!s(h)&&!d(h)}},{"./is-ios":12,"./is-ios-firefox":7}],10:[function(t,n,i){var a=t("./is-ios"),s=t("./is-ios-google-search-app");n.exports=function(l){return l=l||window.navigator.userAgent,a(l)?s(l)?!0:/.+AppleWebKit(?!.*Safari)/i.test(l):!1}},{"./is-ios":12,"./is-ios-google-search-app":8}],11:[function(t,n,i){var a=t("./is-ios-webview");n.exports=function(o,l){return l=typeof l!="undefined"?l:window.statusbar.visible,a(o)&&l}},{"./is-ios-webview":10}],12:[function(t,n,i){var a=t("./is-ipados");n.exports=function(o,l,c){l===void 0&&(l=!0),o=o||window.navigator.userAgent;var d=/iPhone|iPod|iPad/i.test(o);return l?d||a(o,c):d}},{"./is-ipados":13}],13:[function(t,n,i){n.exports=function(s,o){return s=s||window.navigator.userAgent,o=o||window.document,/Mac|iPad/i.test(s)&&"ontouchend"in o}},{}],14:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("OPR/")!==-1||s.indexOf("Opera/")!==-1||s.indexOf("OPT/")!==-1}},{}],15:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,/SamsungBrowser/i.test(s)}},{}],16:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Silk/")!==-1}},{}],17:[function(t,n,i){var a=48,s=t("./is-android"),o=t("./is-ios-firefox"),l=t("./is-ios-webview"),c=t("./is-chrome"),d=t("./is-samsung"),u=t("./is-duckduckgo");function h(v){v=v||window.navigator.userAgent;var y=v.match(/CriOS\/(\d+)\./);if(!y)return!1;var T=parseInt(y[1],10);return T<a}function p(v){return v=v||window.navigator.userAgent,v.indexOf("Opera Mini")>-1}function m(v){var y=/Version\/[\d.]+/i;return v=v||window.navigator.userAgent,s(v)?y.test(v)&&!p(v)&&!u(v):!1}function f(v){return!c(v)&&!d(v)&&/samsung/i.test(v)}n.exports=function(y){return y=y||window.navigator.userAgent,!(l(y)||o(y)||m(y)||p(y)||h(y)||f(y))}},{"./is-android":3,"./is-chrome":4,"./is-duckduckgo":5,"./is-ios-firefox":7,"./is-ios-webview":10,"./is-samsung":15}],18:[function(t,n,i){n.exports=t("./dist/is-android")},{"./dist/is-android":3}],19:[function(t,n,i){n.exports=t("./dist/is-chrome")},{"./dist/is-chrome":4}],20:[function(t,n,i){n.exports=t("./dist/is-ios-safari")},{"./dist/is-ios-safari":9}],21:[function(t,n,i){n.exports=t("./dist/is-ios-webview")},{"./dist/is-ios-webview":10}],22:[function(t,n,i){n.exports=t("./dist/is-ios-wkwebview")},{"./dist/is-ios-wkwebview":11}],23:[function(t,n,i){n.exports=t("./dist/is-ios")},{"./dist/is-ios":12}],24:[function(t,n,i){n.exports=t("./dist/is-samsung")},{"./dist/is-samsung":15}],25:[function(t,n,i){n.exports=t("./dist/supports-popups")},{"./dist/supports-popups":17}],26:[function(t,n,i){var a=typeof Promise!="undefined"?Promise:null,s=function(){function o(l){var c=this;if(typeof l=="function"){this._promise=new o.Promise(l);return}this._promise=new o.Promise(function(d,u){c._resolveFunction=d,c._rejectFunction=u}),l=l||{},this._onResolve=l.onResolve||o.defaultOnResolve,this._onReject=l.onReject||o.defaultOnReject,o.shouldCatchExceptions(l)&&this._promise.catch(function(){}),this._resetState()}return o.defaultOnResolve=function(l){return o.Promise.resolve(l)},o.defaultOnReject=function(l){return o.Promise.reject(l)},o.setPromise=function(l){o.Promise=l},o.shouldCatchExceptions=function(l){return l.hasOwnProperty("suppressUnhandledPromiseMessage")?!!l.suppressUnhandledPromiseMessage:!!o.suppressUnhandledPromiseMessage},o.all=function(l){return o.Promise.all(l)},o.allSettled=function(l){return o.Promise.allSettled(l)},o.race=function(l){return o.Promise.race(l)},o.reject=function(l){return o.Promise.reject(l)},o.resolve=function(l){return o.Promise.resolve(l)},o.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)},o.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)},o.prototype.resolve=function(l){var c=this;return this.isFulfilled?this:(this._setResolved(),o.Promise.resolve().then(function(){return c._onResolve(l)}).then(function(d){c._resolveFunction(d)}).catch(function(d){c._resetState(),c.reject(d)}),this)},o.prototype.reject=function(l){var c=this;return this.isFulfilled?this:(this._setRejected(),o.Promise.resolve().then(function(){return c._onReject(l)}).then(function(d){c._setResolved(),c._resolveFunction(d)}).catch(function(d){return c._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=a,o}();n.exports=s},{}],27:[function(t,n,i){var a=t("./lib/set-attributes"),s=t("./lib/default-attributes"),o=t("./lib/assign");n.exports=function(c){c===void 0&&(c={});var d=document.createElement("iframe"),u=(0,o.assign)({},s.defaultAttributes,c);return u.style&&typeof u.style!="string"&&((0,o.assign)(d.style,u.style),delete u.style),(0,a.setAttributes)(d,u),d.getAttribute("id")||(d.id=d.name),d}},{"./lib/assign":28,"./lib/default-attributes":29,"./lib/set-attributes":30}],28:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.assign=void 0;function a(s){for(var o=[],l=1;l<arguments.length;l++)o[l-1]=arguments[l];return o.forEach(function(c){typeof c=="object"&&Object.keys(c).forEach(function(d){s[d]=c[d]})}),s}i.assign=a},{}],29:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.defaultAttributes=void 0,i.defaultAttributes={src:"about:blank",frameBorder:0,allowtransparency:!0,scrolling:"no"}},{}],30:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.setAttributes=void 0;function a(s,o){for(var l in o)if(o.hasOwnProperty(l)){var c=o[l];c==null?s.removeAttribute(l):s.setAttribute(l,c)}}i.setAttributes=a},{}],31:[function(t,n,i){function a(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var o=Math.random()*16|0,l=s==="x"?o:o&3|8;return l.toString(16)})}n.exports=a},{}],32:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(s){return function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];setTimeout(function(){try{s.apply(void 0,o)}catch(c){console.log("Error in callback function"),console.log(c)}},1)}}i.deferred=a},{}],33:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(s){var o=!1;return function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];o||(o=!0,s.apply(void 0,l))}}i.once=a},{}],34:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(s,o){if(!o)return s;s.then(function(l){return o(null,l)}).catch(function(l){return o(l)})}i.promiseOrCallback=a},{}],35:[function(t,n,i){var a=t("./lib/deferred"),s=t("./lib/once"),o=t("./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=s.once(a.deferred(h))),o.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(m){var f,v=m!=="constructor"&&typeof c.prototype[m]=="function",y=u.indexOf(m)===-1;return h?f=!0:f=m.charAt(0)!=="_",v&&f&&y});return p.forEach(function(m){var f=c.prototype[m];c.prototype[m]=l(f)}),c},n.exports=l},{"./lib/deferred":32,"./lib/once":33,"./lib/promise-or-callback":34}],36:[function(t,n,i){(function(a,s){typeof i=="object"&&typeof n!="undefined"?s(i):(a=typeof globalThis!="undefined"?globalThis:a||self,s(a.loadAxo={}))})(this,function(a){/*! *****************************************************************************
|
|
358
|
+
***************************************************************************** */function s(E,x,C,P){function V(O){return O instanceof C?O:new C(function(H){H(O)})}return new(C||(C=Promise))(function(O,H){function X(te){try{D(P.next(te))}catch(ye){H(ye)}}function le(te){try{D(P.throw(te))}catch(ye){H(ye)}}function D(te){te.done?O(te.value):V(te.value).then(X,le)}D((P=P.apply(E,[])).next())})}function o(E,x){var C={label:0,sent:function(){if(O[0]&1)throw O[1];return O[1]},trys:[],ops:[]},P,V,O,H;return H={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function X(D){return function(te){return le([D,te])}}function le(D){if(P)throw new TypeError("Generator is already executing.");for(;C;)try{if(P=1,V&&(O=D[0]&2?V.return:D[0]?V.throw||((O=V.return)&&O.call(V),0):V.next)&&!(O=O.call(V,D[1])).done)return O;switch(V=0,O&&(D=[D[0]&2,O.value]),D[0]){case 0:case 1:O=D;break;case 4:return C.label++,{value:D[1],done:!1};case 5:C.label++,V=D[1],D=[0];continue;case 7:D=C.ops.pop(),C.trys.pop();continue;default:if(O=C.trys,!(O=O.length>0&&O[O.length-1])&&(D[0]===6||D[0]===2)){C=0;continue}if(D[0]===3&&(!O||D[1]>O[0]&&D[1]<O[3])){C.label=D[1];break}if(D[0]===6&&C.label<O[1]){C.label=O[1],O=D;break}if(O&&C.label<O[2]){C.label=O[2],C.ops.push(D);break}O[2]&&C.ops.pop(),C.trys.pop();continue}D=x.call(E,C)}catch(te){D=[6,te],V=0}finally{P=O=0}if(D[0]&5)throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}}var c={},l={};function d(E){var x,C=JSON.stringify(E);if(!E.forceScriptReload&&(x=l[C],x))return x;var P=document.createElement("script"),V=E.dataAttributes||{},O=E.container||document.head;return P.src=E.src,P.id=E.id||"",P.async=!0,E.type&&P.setAttribute("type","".concat(E.type)),E.crossorigin&&P.setAttribute("crossorigin","".concat(E.crossorigin)),Object.keys(V).forEach(function(H){P.setAttribute("data-".concat(H),"".concat(V[H]))}),x=new Promise(function(H,X){P.addEventListener("load",function(){H(P)}),P.addEventListener("error",function(){X(new Error("".concat(E.src," failed to load.")))}),P.addEventListener("abort",function(){X(new Error("".concat(E.src," has aborted.")))}),O.appendChild(P)}),l[C]=x,x}d.clearCache=function(){l={}};var u=d,h=function(x){var C=document.querySelector('link[href="'.concat(x.href,'"]'));if(C)return Promise.resolve(C);C=document.createElement("link");var P=x.container||document.head;return C.setAttribute("rel","stylesheet"),C.setAttribute("type","text/css"),C.setAttribute("href",x.href),C.setAttribute("id",x.id),P.firstChild?P.insertBefore(C,P.firstChild):P.appendChild(C),Promise.resolve(C)};Object.defineProperty(c,"__esModule",{value:!0}),c.loadStylesheet=m=c.loadScript=void 0;var p=u,m=c.loadScript=p,f=h;c.loadStylesheet=f;var v="https://www.paypalobjects.com",y={minified:"axo.min",unminified:"axo"},A="fastlane",T="connect-boba",N="".concat(T,"/locales/"),w={AXO_ASSET_NAME:y,AXO_ASSET_PATH:T,LOCALE_PATH:N,CDNX_PROD:v},I={BT:"BT",PPCP:"PPCP"};function L(){return typeof window.define=="function"&&!!window.define.amd}function S(){return L()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function B(E,x,C){var P,V;return C===void 0&&(C=!0),s(this,void 0,void 0,function(){var O,H;return o(this,function(X){if(O=q(),O&&O[E.module]){if(x&&((P=O[E.module])===null||P===void 0?void 0:P.VERSION)!==x)throw H=(V=O[E.module])===null||V===void 0?void 0:V.VERSION,new Error("".concat(E.module," already loaded with version ").concat(H," cannot load version ").concat(x));return[2,!0]}if(!x)throw new Error("Attempted to load ".concat(E.module," without specifying version"));return[2,G(E,x,C)]})})}function G(E,x,C){if(C===void 0&&(C=!0),L()){var P=C?E.amdModule.minified:E.amdModule.unminified;return new Promise(function(O,H){window.require([P],O,H)})}var V=C?E.script.minified:E.script.unminified;return m({id:"".concat(E.id,"-").concat(x),src:"https://js.braintreegateway.com/web/".concat(x,"/js/").concat(V)})}function q(){return window==null?void 0:window.braintree}var M,F,K={Client:"client",HostedCardFields:"hostedFields"},J="braintree",R=(M={},M[K.Client]="client",M[K.HostedCardFields]="hosted-fields",M),W=(F={},F[K.Client]={id:"client",module:K.Client,amdModule:{unminified:"".concat(J,"/").concat(R[K.Client]),minified:"".concat(J,"/").concat(R[K.Client],".min")},script:{unminified:"".concat(R[K.Client],".js"),minified:"".concat(R[K.Client],".min.js")}},F[K.HostedCardFields]={id:"hcf",module:K.HostedCardFields,amdModule:{unminified:"".concat(J,"/").concat(R[K.HostedCardFields]),minified:"".concat(J,"/").concat(R[K.HostedCardFields],".min")},script:{unminified:"".concat(R[K.HostedCardFields],".js"),minified:"".concat(R[K.HostedCardFields],".min.js")}},F);function j(E){return s(this,void 0,void 0,function(){var x,C,P,V;return o(this,function(O){switch(O.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),x=E.btSdkVersion,C=E.minified,P=k(E),V=U(E),E.platform!==I.BT?[3,2]:[4,Promise.all([B(W.hostedFields,x,C),g(P,C)])];case 1:return O.sent(),[3,5];case 2:return E.platform!==I.PPCP?[3,4]:[4,Promise.all([B(W.client,x,C),B(W.hostedFields,x,C),g(P,C)])];case 3:return O.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:V}}]}})})}function g(E,x){var C;if(x===void 0&&(x=!0),L()){S()&&requirejs.config({paths:(C={},C[A]=E,C)});var P="".concat(A,"/").concat(x?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified);return new Promise(function(V,O){window.require([P],V,O)})}return m({id:"axo-id",src:E,forceScriptReload:!0})}function _(E){var x=E.assetUrl,C=E.bundleId;return C?"https://cdn-".concat(C,".static.engineering.dev.paypalinc.com/").concat(x):"".concat(w.CDNX_PROD,"/").concat(x)}function k(E){var x,C=(E==null?void 0:E.minified)!==!1?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified,P=L()?w.AXO_ASSET_PATH:"".concat(w.AXO_ASSET_PATH,"/").concat(C,".js");return _({assetUrl:P,bundleId:(x=E==null?void 0:E.metadata)===null||x===void 0?void 0:x.bundleIdOverride})}function U(E){var x;return _({assetUrl:w.LOCALE_PATH,bundleId:(x=E==null?void 0:E.metadata)===null||x===void 0?void 0:x.bundleIdOverride})}a.constants=w,a.loadAxo=j})},{}],9:[function(t,n,i){var a=t("./constants").BRAINTREE_VERSION,s=t("./request/graphql"),o=t("./request"),c=t("../lib/is-verified-domain"),l=t("../lib/braintree-error"),d=t("../lib/convert-to-braintree-error"),u=t("./get-configuration").getConfiguration,h=t("../lib/create-authorization-data"),p=t("../lib/add-metadata"),m=t("@braintree/wrap-promise"),f=t("../lib/once"),v=t("../lib/deferred"),y=t("../lib/assign").assign,A=t("../lib/analytics"),T=t("./errors"),N=t("../lib/constants").VERSION,w=t("../lib/constants").GRAPHQL_URLS,I=t("../lib/methods"),L=t("../lib/convert-methods-to-error"),S=t("../lib/assets"),B=t("../lib/constants").FRAUDNET_FNCLS,G=t("../lib/constants").FRAUDNET_SOURCE,q=t("../lib/constants").FRAUDNET_URL,M={};function F(R){var W,j;if(R=R||{},W=JSON.stringify(R),j=R.gatewayConfiguration,!j)throw new l(T.CLIENT_MISSING_GATEWAY_CONFIGURATION);if(["assetsUrl","clientApiUrl","configUrl"].forEach(function(g){if(g in j&&!c(j[g]))throw new l({type:T.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:T.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:g+" property is on an invalid domain."})}),this.getConfiguration=function(){return JSON.parse(W)},this._request=o,this._configuration=this.getConfiguration(),this._clientApiBaseUrl=j.clientApiUrl+"/v1/",j.graphQL){if(!c(j.graphQL.url))throw new l({type:T.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.type,code:T.CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN.code,message:"graphQL.url property is on an invalid domain."});this._graphQL=new s({graphQL:j.graphQL})}}F.initialize=function(R){var W,j,g=M[R.authorization];if(g)return A.sendEvent(g,"custom.client.load.cached"),g;try{j=h(R.authorization)}catch(_){return Promise.reject(new l(T.CLIENT_INVALID_AUTHORIZATION))}return g=u(j,R.sessionId).then(function(_){return R.debug&&(_.isDebug=!0),_.authorization=R.authorization,W=new F(_),W}),M[R.authorization]=g,A.sendEvent(g,"custom.client.load.initialized"),g.then(function(_){return A.sendEvent(W,"custom.client.load.succeeded"),_}).catch(function(_){return delete M[R.authorization],Promise.reject(_)})},F.clearCache=function(){M={}},F.prototype._findOrCreateFraudnetJSON=function(R){var W=document.querySelector('script[fncls="'+B+'"]'),j,g,_,k;W||(W=document.body.appendChild(document.createElement("script")),W.type="application/json",W.setAttribute("fncls",B)),j=this.getConfiguration(),g={rda_tenant:"bt_card",mid:j.gatewayConfiguration.merchantId},_=j.authorizationFingerprint,_&&_.split("&").forEach(function(U){var E=U.split("=");E[0]==="customer_id"&&E.length>1&&(g.cid=E[1])}),k={f:R.substr(0,32),fp:g,bu:!1,s:G},W.text=JSON.stringify(k)},F.prototype.request=function(R,W){var j=this,g=new Promise(function(_,k){var U,E,x,C,P=!!(R.endpoint==="payment_methods/credit_cards"&&j.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);if(R.api!=="graphQLApi"&&(R.method?R.endpoint||(U="options.endpoint"):U="options.method"),U)throw new l({type:T.CLIENT_OPTION_REQUIRED.type,code:T.CLIENT_OPTION_REQUIRED.code,message:U+" is required when making a request."});if("api"in R?E=R.api:E="clientApi",C={method:R.method,graphQL:j._graphQL,timeout:R.timeout,metadata:j._configuration.analyticsMetadata},E==="clientApi")x=j._clientApiBaseUrl,C.data=p.addMetadata(j._configuration,R.data);else if(E==="graphQLApi")x=w[j._configuration.gatewayConfiguration.environment],R.endpoint="",C.method="post",C.data=y({clientSdkMetadata:{platform:j._configuration.analyticsMetadata.platform,source:j._configuration.analyticsMetadata.source,integration:j._configuration.analyticsMetadata.integration,sessionId:j._configuration.analyticsMetadata.sessionId,version:N}},R.data),C.headers=J(j._configuration);else throw new l({type:T.CLIENT_OPTION_INVALID.type,code:T.CLIENT_OPTION_INVALID.code,message:"options.api is invalid."});C.url=x+R.endpoint,C.sendAnalyticsEvent=function(V){A.sendEvent(j,V)},j._request(C,function(V,O,H){var X,le;if(le=K(H,V),le){k(le);return}if(E==="graphQLApi"&&O.errors){k(d(O.errors,{type:T.CLIENT_GRAPHQL_REQUEST_ERROR.type,code:T.CLIENT_GRAPHQL_REQUEST_ERROR.code,message:T.CLIENT_GRAPHQL_REQUEST_ERROR.message}));return}X=y({_httpStatus:H},O),P&&X.creditCards&&X.creditCards.length>0&&(j._findOrCreateFraudnetJSON(X.creditCards[0].nonce),S.loadScript({src:q,forceScriptReload:!0})),_(X)})});if(typeof W=="function"){W=f(v(W)),g.then(function(_){W(null,_,_._httpStatus)}).catch(function(_){var k=_&&_.details&&_.details.httpStatus;W(_,null,k)});return}return g};function K(R,W){var j;if(R===-1?j=new l(T.CLIENT_REQUEST_TIMEOUT):R===401?j=new l(T.CLIENT_AUTHORIZATION_INVALID):R===403?j=new l(T.CLIENT_AUTHORIZATION_INSUFFICIENT):R===429?j=new l(T.CLIENT_RATE_LIMITED):R>=500?j=new l(T.CLIENT_GATEWAY_NETWORK):(R<200||R>=400)&&(j=d(W,{type:T.CLIENT_REQUEST_ERROR.type,code:T.CLIENT_REQUEST_ERROR.code,message:T.CLIENT_REQUEST_ERROR.message})),j)return j.details=j.details||{},j.details.httpStatus=R,j}F.prototype.toJSON=function(){return this.getConfiguration()},F.prototype.getVersion=function(){return N},F.prototype.teardown=m(function(){var R=this;return delete M[R.getConfiguration().authorization],L(R,I(F.prototype)),Promise.resolve()});function J(R){var W=R.authorizationFingerprint||R.authorization;return{Authorization:"Bearer "+W,"Braintree-Version":a}}n.exports=F},{"../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(t,n,i){n.exports={BRAINTREE_VERSION:"2018-05-10"}},{}],11:[function(t,n,i){var a=t("../lib/braintree-error");n.exports={CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN:{type:a.types.MERCHANT,code:"CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN"},CLIENT_OPTION_REQUIRED:{type:a.types.MERCHANT,code:"CLIENT_OPTION_REQUIRED"},CLIENT_OPTION_INVALID:{type:a.types.MERCHANT,code:"CLIENT_OPTION_INVALID"},CLIENT_MISSING_GATEWAY_CONFIGURATION:{type:a.types.INTERNAL,code:"CLIENT_MISSING_GATEWAY_CONFIGURATION",message:"Missing gatewayConfiguration."},CLIENT_INVALID_AUTHORIZATION:{type:a.types.MERCHANT,code:"CLIENT_INVALID_AUTHORIZATION",message:"Authorization is invalid. Make sure your client token or tokenization key is valid."},CLIENT_GATEWAY_NETWORK:{type:a.types.NETWORK,code:"CLIENT_GATEWAY_NETWORK",message:"Cannot contact the gateway at this time."},CLIENT_REQUEST_TIMEOUT:{type:a.types.NETWORK,code:"CLIENT_REQUEST_TIMEOUT",message:"Request timed out waiting for a reply."},CLIENT_REQUEST_ERROR:{type:a.types.NETWORK,code:"CLIENT_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_GRAPHQL_REQUEST_ERROR:{type:a.types.NETWORK,code:"CLIENT_GRAPHQL_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_RATE_LIMITED:{type:a.types.MERCHANT,code:"CLIENT_RATE_LIMITED",message:"You are being rate-limited; please try again in a few minutes."},CLIENT_AUTHORIZATION_INSUFFICIENT:{type:a.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INSUFFICIENT",message:"The authorization used has insufficient privileges."},CLIENT_AUTHORIZATION_INVALID:{type:a.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(t,n,i){var a=t("../lib/braintree-error"),s=t("@braintree/wrap-promise"),o=t("./request"),c=t("@braintree/uuid"),l=t("../lib/constants"),d=t("./errors"),u=t("./request/graphql"),h=t("../lib/constants").GRAPHQL_URLS,p=t("../lib/is-date-string-before-or-on"),m=t("./constants").BRAINTREE_VERSION;function f(v,y){return new Promise(function(A,T){var N,w,I,L,S=y||c(),B={merchantAppId:window.location.host,platform:l.PLATFORM,sdkVersion:l.VERSION,source:l.SOURCE,integration:l.INTEGRATION,integrationType:l.INTEGRATION,sessionId:S};w=v.attrs,I=v.configUrl,w._meta=B,w.braintreeLibraryVersion=l.BRAINTREE_LIBRARY_VERSION,w.configVersion="3",L={url:I,method:"GET",data:w},w.authorizationFingerprint&&v.graphQL?(p(v.graphQL.date,m)&&(L.graphQL=new u({graphQL:{url:v.graphQL.url,features:["configuration"]}})),L.metadata=B):w.tokenizationKey&&(L.graphQL=new u({graphQL:{url:h[v.environment],features:["configuration"]}}),L.metadata=B),o(L,function(G,q,M){var F;if(G){M===403?F=d.CLIENT_AUTHORIZATION_INSUFFICIENT:M===401?F=d.CLIENT_AUTHORIZATION_INVALID:F=d.CLIENT_GATEWAY_NETWORK,T(new a({type:F.type,code:F.code,message:F.message,details:{originalError:G}}));return}N={authorizationType:w.tokenizationKey?"TOKENIZATION_KEY":"CLIENT_TOKEN",authorizationFingerprint:w.authorizationFingerprint,analyticsMetadata:B,gatewayConfiguration:q},A(N)})})}n.exports={getConfiguration:s(f)}},{"../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(t,n,i){var a=t("../lib/braintree-error"),s=t("./client"),o="3.126.0",c=t("@braintree/wrap-promise"),l=t("../lib/errors");function d(u){return u.authorization?s.initialize(u):Promise.reject(new a({type:l.INSTANTIATION_OPTION_REQUIRED.type,code:l.INSTANTIATION_OPTION_REQUIRED.code,message:"options.authorization is required when instantiating a client."}))}n.exports={create:c(d),VERSION:o}},{"../lib/braintree-error":33,"../lib/errors":40,"./client":9,"@braintree/wrap-promise":7}],14:[function(t,n,i){var a=t("../../lib/querystring"),s=t("../../lib/assign").assign,o=t("./prep-body"),c=t("./parse-body"),l=t("./xhr"),d=l.isAvailable,u=t("./graphql/request"),h=t("./default-request"),p=1,m=408;function f(T){return!T||T===m}function v(T){var N=!T.data&&T.errors&&T.errors[0]&&T.errors[0].extensions&&T.errors[0].extensions.errorClass;return N==="UNKNOWN"||N==="INTERNAL"}function y(T,N,w){var I,L,S,B,G,q,M,F=T.url,K=T.graphQL,J=T.timeout,R=l.getRequestObject(),W=w,j=!!(K&&K.isGraphQLRequest(F,T.data));T.headers=s({"Content-Type":"application/json"},T.headers),j?S=new u(T):S=new h(T),F=S.getUrl(),B=S.getBody(),G=S.getMethod(),q=S.getHeaders(),G==="GET"&&(F=a.queryify(F,B),B=null),d?R.onreadystatechange=function(){if(R.readyState===4){if(R.status===0&&j){delete T.graphQL,y(T,N,w);return}if(M=c(R.responseText),L=S.adaptResponseBody(M),I=S.determineStatus(R.status,M),I>=400||I<200){if(j&&v(M)){delete T.graphQL,y(T,N,w);return}if(N<p&&f(I)){N++,y(T,N,w);return}W(L||"error",null,I||500)}else W(null,L,I)}}:(T.headers&&(F=a.queryify(F,q)),R.onload=function(){W(null,c(R.responseText),R.status)},R.onerror=function(){W("error",null,500)},R.onprogress=function(){},R.ontimeout=function(){W("timeout",null,-1)});try{R.open(G,F,!0)}catch(g){if(!j)throw g;delete T.graphQL,y(T,N,w);return}R.timeout=J,d&&Object.keys(q).forEach(function(g){R.setRequestHeader(g,q[g])});try{R.send(o(G,B))}catch(g){}}function A(T,N){y(T,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(t,n,i){function a(s){this._url=s.url,this._data=s.data,this._method=s.method,this._headers=s.headers}a.prototype.getUrl=function(){return this._url},a.prototype.getBody=function(){return this._data},a.prototype.getMethod=function(){return this._method},a.prototype.getHeaders=function(){return this._headers},a.prototype.adaptResponseBody=function(s){return s},a.prototype.determineStatus=function(s){return s},n.exports=a},{}],16:[function(t,n,i){var a=t("./error"),s=t("../../../../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=a(u),p}function l(u,h){var p=u.data.clientConfiguration,m;return m={environment:p.environment.toLowerCase(),clientApiUrl:p.clientApiUrl,assetsUrl:p.assetsUrl,analytics:{url:p.analyticsUrl},merchantId:p.merchantId,venmo:"off"},p.supportedFeatures&&(m.graphQL={url:h._graphQL._config.url,features:p.supportedFeatures.map(function(f){return f.toLowerCase()})}),p.braintreeApi&&(m.braintreeApi=p.braintreeApi),p.applePayWeb&&(m.applePayWeb=p.applePayWeb,m.applePayWeb.supportedNetworks=d(p.applePayWeb.supportedCardBrands,o.applePayWeb),delete m.applePayWeb.supportedCardBrands),p.fastlane&&(m.fastlane=p.fastlane),p.ideal&&(m.ideal=p.ideal),p.creditCard?(m.challenges=p.creditCard.challenges.map(function(f){return f.toLowerCase()}),m.creditCards={supportedCardTypes:d(p.creditCard.supportedCardBrands,o.creditCard)},m.threeDSecureEnabled=p.creditCard.threeDSecureEnabled,m.threeDSecure=p.creditCard.threeDSecure):(m.challenges=[],m.creditCards={supportedCardTypes:[]},m.threeDSecureEnabled=!1),p.googlePay&&(m.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&&(m.payWithVenmo={merchantId:p.venmo.merchantId,accessToken:p.venmo.accessToken,environment:p.venmo.environment.toLowerCase(),enrichedCustomerDataEnabled:p.venmo.enrichedCustomerDataEnabled}),p.paypal?(m.paypalEnabled=!0,m.paypal=s({},p.paypal),m.paypal.currencyIsoCode=m.paypal.currencyCode,m.paypal.environment=m.paypal.environment.toLowerCase(),delete m.paypal.currencyCode):m.paypalEnabled=!1,p.unionPay&&(m.unionPay={enabled:!0,merchantAccountId:p.unionPay.merchantAccountId}),p.visaCheckout&&(m.visaCheckout={apikey:p.visaCheckout.apiKey,encryptionKey:p.visaCheckout.encryptionKey,externalClientId:p.visaCheckout.externalClientId,supportedCardTypes:d(p.visaCheckout.supportedCardBrands,o.visaCheckout)}),p.masterpass&&(m.masterpass={merchantCheckoutId:p.masterpass.merchantCheckoutId,supportedNetworks:d(p.masterpass.supportedCardBrands,o.masterpass)}),p.usBankAccount&&(m.usBankAccount={routeId:p.usBankAccount.routeId,plaid:{publicKey:p.usBankAccount.plaidPublicKey}}),m}function d(u,h){return u.reduce(function(p,m){return h.hasOwnProperty(m)?p.concat(h[m]):p},[])}n.exports=c},{"../../../../lib/assign":32,"./error":19}],17:[function(t,n,i){var a=t("./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=a(u),h}function d(u){var h=u.data.tokenizeCreditCardForPayPalConnect,p=h.paymentMethod.details,m=p.last4?p.last4.substr(2,4):"",f=p.binData,v,y;return f&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(A){f[A]?f[A]=o[f[A]]:f[A]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(A){f[A]||(f[A]="Unknown")})),v={creditCards:[{binData:f,consumed:!1,description:m?"ending in "+m:"",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:m},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(y=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:c[y]||y.toLowerCase()}),v}n.exports=l},{"./error":19}],18:[function(t,n,i){var a=t("./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=a(u),h}function d(u){var h=u.data.tokenizeCreditCard,p=h.creditCard,m=p.last4?p.last4.substr(2,4):"",f=p.binData,v,y;return f&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach(function(A){f[A]?f[A]=o[f[A]]:f[A]="Unknown"}),["issuingBank","countryOfIssuance","productId","business","consumer","purchase","corporate"].forEach(function(A){f[A]||(f[A]="Unknown")})),v={creditCards:[{binData:f,consumed:!1,description:m?"ending in "+m:"",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:m},type:"CreditCard",threeDSecureInfo:null}]},h.authenticationInsight&&(y=h.authenticationInsight.customerAuthenticationRegulationEnvironment,v.creditCards[0].authenticationInsight={regulationEnvironment:c[y]||y.toLowerCase()}),v}n.exports=l},{"./error":19}],19:[function(t,n,i){function a(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 m,f=h.extensions.legacyCode,v=u[0];if(u.length===1){p.push({code:f,field:v,message:h.message});return}p.forEach(function(y){y.field===v&&(m=y)}),m||(m={field:v,fieldErrors:[]},p.push(m)),l(u.slice(1),h,m.fieldErrors)}function d(u){var h={creditCard:"Credit card is invalid"},p=u[0].field;return h[p]}n.exports=a},{}],20:[function(t,n,i){var a="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:a,operationName:"ClientConfiguration"}}n.exports=s},{}],21:[function(t,n,i){var a=t("../../../../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,m=p.fastlane||{},f="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 m&&m.hasBuyerConsent,T=p.shippingAddress,N=c(u,h),w=a({},N.input,{email:y,optIn:A,phone:p.phone});return f&&(w.termsAndConditionsVersion=f),v&&(w.termsAndConditionsCountry=v),"authAssertion"in m&&(w.authAssertion=m.authAssertion),T&&(w.shippingAddress=T),{input:w}}function c(u,h){var p=u.creditCard,m=p&&p.billingAddress,f=p&&p.expirationDate,v=p&&(p.expirationMonth||f&&f.split("/")[0].trim()),y=p&&(p.expirationYear||f&&f.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}),m&&(A.input.creditCard.billingAddress=m),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=a({validate:p},h.options)),h}function d(u){var h={hasAuthenticationInsight:!!(u.authenticationInsight&&u.merchantAccountId)};return{query:s(h),variables:o(u,h),operationName:"TokenizeCreditCardForPayPalConnect"}}n.exports=d},{"../../../../lib/assign":32}],22:[function(t,n,i){var a=t("../../../../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,m=h&&h.expirationDate,f=h&&(h.expirationMonth||m&&m.split("/")[0].trim()),v=h&&(h.expirationYear||m&&m.split("/")[1].trim()),y={input:{creditCard:{number:h&&h.number,expirationMonth:f,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=a({validate:h},u.options)),u}function l(d){var u={hasAuthenticationInsight:!!(d.authenticationInsight&&d.merchantAccountId)};return{query:s(u),variables:o(d,u),operationName:"TokenizeCreditCard"}}n.exports=l},{"../../../../lib/assign":32}],23:[function(t,n,i){var a={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 a[p]===h}),c(d))?!1:u},o.prototype.getClientApiPath=function(l){var d,u="/client_api/v1/",h=l.split(u);return h.length>1&&(d=h[1].split("?")[0]),d},o.prototype._isGraphQLEnabled=function(){return!!this._config};function c(l){return s.some(function(d){var u=d.split(".").reduce(function(h,p){return h&&h[p]},l);return u!==void 0})}n.exports=o},{}],24:[function(t,n,i){var a=t("../../constants").BRAINTREE_VERSION,s=t("../../../lib/assign").assign,o=t("../../../lib/snake-case-to-camel-case"),c=t("../../../lib/is-fastlane-checkout"),l=t("./generators/credit-card-tokenization"),d=t("./adapters/credit-card-tokenization"),u=t("./adapters/credit-card-tokenization-fastlane"),h=t("./generators/credit-card-for-fastlane-tokenization"),p=t("./generators/configuration"),m=t("./adapters/configuration"),f={"payment_methods/credit_cards":function(N,w){return w?h(N):l(N)},configuration:p},v={"payment_methods/credit_cards":function(N,w,I){return I?u(N,w):d(N,w)},configuration:m};function y(N){var w=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=f[w],this._adapter=v[w],this._sendAnalyticsEvent("graphql.init")}y.prototype.getUrl=function(){return this._graphQL.getGraphQLEndpoint()},y.prototype.getBody=function(){var N=T(this._data),w=this._generator(N,c(this._data.creditCard)),I=s({clientSdkMetadata:this._clientSdkMetadata},w);return JSON.stringify(I)},y.prototype.getMethod=function(){return"POST"},y.prototype.getHeaders=function(){var N,w;return this._data.authorizationFingerprint?(this._sendAnalyticsEvent("graphql.authorization-fingerprint"),N=this._data.authorizationFingerprint):(this._sendAnalyticsEvent("graphql.tokenization-key"),N=this._data.tokenizationKey),w={Authorization:"Bearer "+N,"Braintree-Version":a},s({},this._headers,w)},y.prototype.adaptResponseBody=function(N){return this._adapter(N,this,"creditCard"in this._data&&c(this._data.creditCard))},y.prototype.determineStatus=function(N,w){var I,L;return N===200?(L=w.errors&&w.errors[0]&&w.errors[0].extensions&&w.errors[0].extensions.errorClass,w.data&&!w.errors?I=200:L==="VALIDATION"?I=422:L==="AUTHORIZATION"?I=403:L==="AUTHENTICATION"?I=401:A(L,w)?I=403:I=500):N?I=N:I=500,this._sendAnalyticsEvent("graphql.status."+N),this._sendAnalyticsEvent("graphql.determinedStatus."+I),I};function A(N,w){return!N&&w.errors[0].message}function T(N){var w={};return Object.keys(N).forEach(function(I){var L=o(I);typeof N[I]=="object"?w[L]=T(N[I]):typeof N[I]=="number"?w[L]=String(N[I]):w[L]=N[I]}),w}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(t,n,i){var a=t("../../lib/once"),s=t("./ajax-driver");n.exports=function(o,c){c=a(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(t,n,i){n.exports=function(a){try{a=JSON.parse(a)}catch(s){}return a}},{}],27:[function(t,n,i){n.exports=function(a,s){if(typeof a!="string")throw new Error("Method must be a string");return a.toLowerCase()!=="get"&&s!=null&&(s=typeof s=="string"?s:JSON.stringify(s)),s}},{}],28:[function(t,n,i){var a=typeof window!="undefined"&&window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest;function s(){return a?new window.XMLHttpRequest:new window.XDomainRequest}n.exports={isAvailable:a,getRequestObject:s}},{}],29:[function(t,n,i){var a=t("./create-authorization-data"),s=t("./json-clone"),o=t("./constants");function c(d,u){var h,p=u?s(u):{},m=a(d.authorization).attrs,f=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(f[h]=p._meta[h]);return p._meta=f,m.tokenizationKey?p.tokenizationKey=m.tokenizationKey:p.authorizationFingerprint=m.authorizationFingerprint,p}function l(d){var u=d.getConfiguration(),h=a(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",m={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?m.tokenization_key=h.tokenizationKey:m.auth_fingerprint=h.authorizationFingerprint,m}n.exports={addMetadata:c,addEventMetadata:l}},{"./constants":34,"./create-authorization-data":37,"./json-clone":44}],30:[function(t,n,i){var a=t("./constants"),s=t("./add-metadata"),o=t("./assign").assign;function c(u,h,p){return l(u,h,{},p)}function l(u,h,p,m){var f=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=a.ANALYTICS_URL,T=a.ANALYTICS_PREFIX+h,N=v.getConfiguration(),w=N.gatewayConfiguration.environment==="production",I={events:[],tracking:[]},L=s.addEventMetadata(v,I);return L.event_name=T,L.t=f,I.events=[{level:"info",event:T,payload:o({env:w?"production":"sandbox",timestamp:f},p)}],I.tracking=[L],p&&typeof p=="object"&&(I.tracking=[d(L,p)]),y({url:A,method:"post",data:I,timeout:a.ANALYTICS_REQUEST_TIMEOUT_MS},m)}).catch(function(v){m&&m(v)})}function d(u,h){var p={},m=o({},h);return Object.keys(m).forEach(function(f){a.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(f)===-1&&delete m[f]}),p=o(u,m),p}n.exports={sendEvent:c,sendEventPlus:l}},{"./add-metadata":29,"./assign":32,"./constants":34}],31:[function(t,n,i){var a=t("@braintree/asset-loader/load-script"),s=t("@paypal/accelerated-checkout-loader");n.exports={loadScript:a,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":8}],32:[function(t,n,i){var a=typeof Object.assign=="function"?Object.assign:s;function s(o){var c,l,d;for(c=1;c<arguments.length;c++){l=arguments[c];for(d in l)l.hasOwnProperty(d)&&(o[d]=l[d])}return o}n.exports={assign:a,_assign:s}},{}],33:[function(t,n,i){var a=t("./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=a(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":39}],34:[function(t,n,i){var a="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},c={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},l={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:c,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:l,INTEGRATION_TIMEOUT_MS:6e4,VERSION:a,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+a,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],35:[function(t,n,i){var a=t("./braintree-error"),s=t("./errors");n.exports=function(o,c){c.forEach(function(l){o[l]=function(){throw new a({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(t,n,i){var a=t("./braintree-error");function s(o,c){return o instanceof a?o:new a({type:c.type,code:c.code,message:c.message,details:{originalError:o}})}n.exports=s},{"./braintree-error":33}],37:[function(t,n,i){var a=t("../lib/vendor/polyfill").atob,s=t("../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(a(d)),p.environment=u.environment,p.attrs.authorizationFingerprint=u.authorizationFingerprint,p.configUrl=u.configUrl,p.graphQL=u.graphQL),p}n.exports=l},{"../lib/constants":34,"../lib/vendor/polyfill":49}],38:[function(t,n,i){n.exports=function(a){return function(){var s=arguments;setTimeout(function(){a.apply(null,s)},1)}}},{}],39:[function(t,n,i){function a(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}n.exports=a},{}],40:[function(t,n,i){var a=t("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:a.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:a.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:a.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:a.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:a.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":33}],41:[function(t,n,i){function a(o){var c=o.split("-");return new Date(c[0],c[1],c[2])}function s(o,c){return a(o)<=a(c)}n.exports=s},{}],42:[function(t,n,i){n.exports=function(a){return a&&a.hasOwnProperty("fastlane")&&a.fastlane}},{}],43:[function(t,n,i){var a,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)?(a=a||document.createElement("a"),a.href=l,d=o(a.hostname),s.hasOwnProperty(d)):!1}n.exports=c},{}],44:[function(t,n,i){n.exports=function(a){return JSON.parse(JSON.stringify(a))}},{}],45:[function(t,n,i){n.exports=function(a){return Object.keys(a).filter(function(s){return typeof a[s]=="function"})}},{}],46:[function(t,n,i){function a(s){var o=!1;return function(){o||(o=!0,s.apply(null,arguments))}}n.exports=a},{}],47:[function(t,n,i){function a(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(m,f){var v=f.split("="),y=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return m[y]=A,m},{}),p):{}}function l(u,h){var p,m,f,v=[];for(f in u)u.hasOwnProperty(f)&&(m=u[f],h?s(u)?p=h+"[]":p=h+"["+f+"]":p=f,typeof m=="object"?v.push(l(m,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(m)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&a(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=l(h)),u}n.exports={parse:c,stringify:l,queryify:d,hasQueryParams:o}},{}],48:[function(t,n,i){n.exports=function(a){return a.indexOf("_")===-1?a:a.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],49:[function(t,n,i){var a=typeof atob=="function"?atob:s;function s(o){var c,l,d,u,h,p,m,f,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");f=0;do u=y.indexOf(o.charAt(f++)),h=y.indexOf(o.charAt(f++)),p=y.indexOf(o.charAt(f++)),m=y.indexOf(o.charAt(f++)),c=(u&63)<<2|h>>4&3,l=(h&15)<<4|p>>2&15,d=(p&3)<<6|m&63,A+=String.fromCharCode(c)+(l?String.fromCharCode(l):"")+(d?String.fromCharCode(d):"");while(f<o.length);return A}n.exports={atob:function(o){return a.call(window,o)},_atob:s}},{}]},{},[13])(13)})}(xr)),xr.exports}var sd=ad();const od=di(sd);var Or={exports:{}},Pi;function ld(){return Pi||(Pi=1,function(r,e){(function(t){r.exports=t()})(function(){return function(){function t(n,i,a){function s(l,d){if(!i[l]){if(!n[l]){var u=typeof Ne=="function"&&Ne;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=i[l]={exports:{}};n[l][0].call(p.exports,function(m){var f=n[l][1][m];return s(f||m)},p,p.exports,t,n,i,a)}return i[l].exports}for(var o=typeof Ne=="function"&&Ne,c=0;c<a.length;c++)s(a[c]);return s}return t}()({1:[function(t,n,i){var a={};function s(o){var c,l=JSON.stringify(o);if(!o.forceScriptReload&&(c=a[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,m){d.addEventListener("load",function(){p(d)}),d.addEventListener("error",function(){m(new Error("".concat(o.src," failed to load.")))}),d.addEventListener("abort",function(){m(new Error("".concat(o.src," has aborted.")))}),h.appendChild(d)}),a[l]=c,c}s.clearCache=function(){a={}},n.exports=s},{}],2:[function(t,n,i){n.exports=t("./dist/load-script")},{"./dist/load-script":1}],3:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,/Android/i.test(s)}},{}],4:[function(t,n,i){var a=t("./is-edge"),s=t("./is-samsung"),o=t("./is-duckduckgo"),c=t("./is-opera"),l=t("./is-silk");n.exports=function(u){return u=u||window.navigator.userAgent,(u.indexOf("Chrome")!==-1||u.indexOf("CriOS")!==-1)&&!a(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(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("DuckDuckGo/")!==-1}},{}],6:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Edge/")!==-1||s.indexOf("Edg/")!==-1}},{}],7:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,/FxiOS/i.test(s)}},{}],8:[function(t,n,i){var a=t("./is-ios");function s(o){return/\bGSA\b/.test(o)}n.exports=function(c){return c=c||window.navigator.userAgent,a(c)&&s(c)}},{"./is-ios":12}],9:[function(t,n,i){var a=t("./is-ios"),s=t("./is-ios-firefox"),o=/webkit/i;function c(u){return o.test(u)}function l(u){return u.indexOf("CriOS")>-1}function d(u){return u.indexOf("FBAN")>-1}n.exports=function(h){return h=h||window.navigator.userAgent,a(h)&&c(h)&&!l(h)&&!s(h)&&!d(h)}},{"./is-ios":12,"./is-ios-firefox":7}],10:[function(t,n,i){var a=t("./is-ios"),s=t("./is-ios-google-search-app");n.exports=function(c){return c=c||window.navigator.userAgent,a(c)?s(c)?!0:/.+AppleWebKit(?!.*Safari)/i.test(c):!1}},{"./is-ios":12,"./is-ios-google-search-app":8}],11:[function(t,n,i){var a=t("./is-ios-webview");n.exports=function(o,c){return c=typeof c!="undefined"?c:window.statusbar.visible,a(o)&&c}},{"./is-ios-webview":10}],12:[function(t,n,i){var a=t("./is-ipados");n.exports=function(o,c,l){c===void 0&&(c=!0),o=o||window.navigator.userAgent;var d=/iPhone|iPod|iPad/i.test(o);return c?d||a(o,l):d}},{"./is-ipados":13}],13:[function(t,n,i){n.exports=function(s,o){return s=s||window.navigator.userAgent,o=o||window.document,/Mac|iPad/i.test(s)&&"ontouchend"in o}},{}],14:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("OPR/")!==-1||s.indexOf("Opera/")!==-1||s.indexOf("OPT/")!==-1}},{}],15:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,/SamsungBrowser/i.test(s)}},{}],16:[function(t,n,i){n.exports=function(s){return s=s||window.navigator.userAgent,s.indexOf("Silk/")!==-1}},{}],17:[function(t,n,i){var a=48,s=t("./is-android"),o=t("./is-ios-firefox"),c=t("./is-ios-webview"),l=t("./is-chrome"),d=t("./is-samsung"),u=t("./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<a}function p(v){return v=v||window.navigator.userAgent,v.indexOf("Opera Mini")>-1}function m(v){var y=/Version\/[\d.]+/i;return v=v||window.navigator.userAgent,s(v)?y.test(v)&&!p(v)&&!u(v):!1}function f(v){return!l(v)&&!d(v)&&/samsung/i.test(v)}n.exports=function(y){return y=y||window.navigator.userAgent,!(c(y)||o(y)||m(y)||p(y)||h(y)||f(y))}},{"./is-android":3,"./is-chrome":4,"./is-duckduckgo":5,"./is-ios-firefox":7,"./is-ios-webview":10,"./is-samsung":15}],18:[function(t,n,i){n.exports=t("./dist/is-android")},{"./dist/is-android":3}],19:[function(t,n,i){n.exports=t("./dist/is-chrome")},{"./dist/is-chrome":4}],20:[function(t,n,i){n.exports=t("./dist/is-ios-safari")},{"./dist/is-ios-safari":9}],21:[function(t,n,i){n.exports=t("./dist/is-ios-webview")},{"./dist/is-ios-webview":10}],22:[function(t,n,i){n.exports=t("./dist/is-ios-wkwebview")},{"./dist/is-ios-wkwebview":11}],23:[function(t,n,i){n.exports=t("./dist/is-ios")},{"./dist/is-ios":12}],24:[function(t,n,i){n.exports=t("./dist/is-samsung")},{"./dist/is-samsung":15}],25:[function(t,n,i){n.exports=t("./dist/supports-popups")},{"./dist/supports-popups":17}],26:[function(t,n,i){var a=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=a,o}();n.exports=s},{}],27:[function(t,n,i){var a=t("./lib/set-attributes"),s=t("./lib/default-attributes"),o=t("./lib/assign");n.exports=function(l){l===void 0&&(l={});var d=document.createElement("iframe"),u=(0,o.assign)({},s.defaultAttributes,l);return u.style&&typeof u.style!="string"&&((0,o.assign)(d.style,u.style),delete u.style),(0,a.setAttributes)(d,u),d.getAttribute("id")||(d.id=d.name),d}},{"./lib/assign":28,"./lib/default-attributes":29,"./lib/set-attributes":30}],28:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.assign=void 0;function a(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}i.assign=a},{}],29:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.defaultAttributes=void 0,i.defaultAttributes={src:"about:blank",frameBorder:0,allowtransparency:!0,scrolling:"no"}},{}],30:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.setAttributes=void 0;function a(s,o){for(var c in o)if(o.hasOwnProperty(c)){var l=o[c];l==null?s.removeAttribute(c):s.setAttribute(c,l)}}i.setAttributes=a},{}],31:[function(t,n,i){function a(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){var o=Math.random()*16|0,c=s==="x"?o:o&3|8;return c.toString(16)})}n.exports=a},{}],32:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(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)}}i.deferred=a},{}],33:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(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))}}i.once=a},{}],34:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0});function a(s,o){if(!o)return s;s.then(function(c){return o(null,c)}).catch(function(c){return o(c)})}i.promiseOrCallback=a},{}],35:[function(t,n,i){var a=t("./lib/deferred"),s=t("./lib/once"),o=t("./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(a.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(m){var f,v=m!=="constructor"&&typeof l.prototype[m]=="function",y=u.indexOf(m)===-1;return h?f=!0:f=m.charAt(0)!=="_",v&&f&&y});return p.forEach(function(m){var f=l.prototype[m];l.prototype[m]=c(f)}),l},n.exports=c},{"./lib/deferred":32,"./lib/once":33,"./lib/promise-or-callback":34}],36:[function(t,n,i){(function(a,s){typeof i=="object"&&typeof n!="undefined"?s(i):(a=typeof globalThis!="undefined"?globalThis:a||self,s(a.loadAxo={}))})(this,function(a){/*! *****************************************************************************
|
|
359
359
|
Copyright (c) Microsoft Corporation.
|
|
360
360
|
|
|
361
361
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
369
369
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
370
370
|
PERFORMANCE OF THIS SOFTWARE.
|
|
371
|
-
***************************************************************************** */function s(E,x,C,P){function V(O){return O instanceof C?O:new C(function(H){H(O)})}return new(C||(C=Promise))(function(O,H){function X(te){try{D(P.next(te))}catch(ye){H(ye)}}function le(te){try{D(P.throw(te))}catch(ye){H(ye)}}function D(te){te.done?O(te.value):V(te.value).then(X,le)}D((P=P.apply(E,[])).next())})}function o(E,x){var C={label:0,sent:function(){if(O[0]&1)throw O[1];return O[1]},trys:[],ops:[]},P,V,O,H;return H={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function X(D){return function(te){return le([D,te])}}function le(D){if(P)throw new TypeError("Generator is already executing.");for(;C;)try{if(P=1,V&&(O=D[0]&2?V.return:D[0]?V.throw||((O=V.return)&&O.call(V),0):V.next)&&!(O=O.call(V,D[1])).done)return O;switch(V=0,O&&(D=[D[0]&2,O.value]),D[0]){case 0:case 1:O=D;break;case 4:return C.label++,{value:D[1],done:!1};case 5:C.label++,V=D[1],D=[0];continue;case 7:D=C.ops.pop(),C.trys.pop();continue;default:if(O=C.trys,!(O=O.length>0&&O[O.length-1])&&(D[0]===6||D[0]===2)){C=0;continue}if(D[0]===3&&(!O||D[1]>O[0]&&D[1]<O[3])){C.label=D[1];break}if(D[0]===6&&C.label<O[1]){C.label=O[1],O=D;break}if(O&&C.label<O[2]){C.label=O[2],C.ops.push(D);break}O[2]&&C.ops.pop(),C.trys.pop();continue}D=x.call(E,C)}catch(te){D=[6,te],V=0}finally{P=O=0}if(D[0]&5)throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}}var l={},c={};function d(E){var x,C=JSON.stringify(E);if(!E.forceScriptReload&&(x=c[C],x))return x;var P=document.createElement("script"),V=E.dataAttributes||{},O=E.container||document.head;return P.src=E.src,P.id=E.id||"",P.async=!0,E.type&&P.setAttribute("type","".concat(E.type)),E.crossorigin&&P.setAttribute("crossorigin","".concat(E.crossorigin)),Object.keys(V).forEach(function(H){P.setAttribute("data-".concat(H),"".concat(V[H]))}),x=new Promise(function(H,X){P.addEventListener("load",function(){H(P)}),P.addEventListener("error",function(){X(new Error("".concat(E.src," failed to load.")))}),P.addEventListener("abort",function(){X(new Error("".concat(E.src," has aborted.")))}),O.appendChild(P)}),c[C]=x,x}d.clearCache=function(){c={}};var u=d,h=function(x){var C=document.querySelector('link[href="'.concat(x.href,'"]'));if(C)return Promise.resolve(C);C=document.createElement("link");var P=x.container||document.head;return C.setAttribute("rel","stylesheet"),C.setAttribute("type","text/css"),C.setAttribute("href",x.href),C.setAttribute("id",x.id),P.firstChild?P.insertBefore(C,P.firstChild):P.appendChild(C),Promise.resolve(C)};Object.defineProperty(l,"__esModule",{value:!0}),l.loadStylesheet=m=l.loadScript=void 0;var p=u,m=l.loadScript=p,f=h;l.loadStylesheet=f;var v="https://www.paypalobjects.com",y={minified:"axo.min",unminified:"axo"},T="fastlane",A="connect-boba",N="".concat(A,"/locales/"),w={AXO_ASSET_NAME:y,AXO_ASSET_PATH:A,LOCALE_PATH:N,CDNX_PROD:v},I={BT:"BT",PPCP:"PPCP"};function L(){return typeof window.define=="function"&&!!window.define.amd}function S(){return L()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function B(E,x,C){var P,V;return C===void 0&&(C=!0),s(this,void 0,void 0,function(){var O,H;return o(this,function(X){if(O=q(),O&&O[E.module]){if(x&&((P=O[E.module])===null||P===void 0?void 0:P.VERSION)!==x)throw H=(V=O[E.module])===null||V===void 0?void 0:V.VERSION,new Error("".concat(E.module," already loaded with version ").concat(H," cannot load version ").concat(x));return[2,!0]}if(!x)throw new Error("Attempted to load ".concat(E.module," without specifying version"));return[2,G(E,x,C)]})})}function G(E,x,C){if(C===void 0&&(C=!0),L()){var P=C?E.amdModule.minified:E.amdModule.unminified;return new Promise(function(O,H){window.require([P],O,H)})}var V=C?E.script.minified:E.script.unminified;return m({id:"".concat(E.id,"-").concat(x),src:"https://js.braintreegateway.com/web/".concat(x,"/js/").concat(V)})}function q(){return window==null?void 0:window.braintree}var M,F,K={Client:"client",HostedCardFields:"hostedFields"},J="braintree",R=(M={},M[K.Client]="client",M[K.HostedCardFields]="hosted-fields",M),W=(F={},F[K.Client]={id:"client",module:K.Client,amdModule:{unminified:"".concat(J,"/").concat(R[K.Client]),minified:"".concat(J,"/").concat(R[K.Client],".min")},script:{unminified:"".concat(R[K.Client],".js"),minified:"".concat(R[K.Client],".min.js")}},F[K.HostedCardFields]={id:"hcf",module:K.HostedCardFields,amdModule:{unminified:"".concat(J,"/").concat(R[K.HostedCardFields]),minified:"".concat(J,"/").concat(R[K.HostedCardFields],".min")},script:{unminified:"".concat(R[K.HostedCardFields],".js"),minified:"".concat(R[K.HostedCardFields],".min.js")}},F);function j(E){return s(this,void 0,void 0,function(){var x,C,P,V;return o(this,function(O){switch(O.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),x=E.btSdkVersion,C=E.minified,P=k(E),V=U(E),E.platform!==I.BT?[3,2]:[4,Promise.all([B(W.hostedFields,x,C),g(P,C)])];case 1:return O.sent(),[3,5];case 2:return E.platform!==I.PPCP?[3,4]:[4,Promise.all([B(W.client,x,C),B(W.hostedFields,x,C),g(P,C)])];case 3:return O.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:V}}]}})})}function g(E,x){var C;if(x===void 0&&(x=!0),L()){S()&&requirejs.config({paths:(C={},C[T]=E,C)});var P="".concat(T,"/").concat(x?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified);return new Promise(function(V,O){window.require([P],V,O)})}return m({id:"axo-id",src:E,forceScriptReload:!0})}function _(E){var x=E.assetUrl,C=E.bundleId;return C?"https://cdn-".concat(C,".static.engineering.dev.paypalinc.com/").concat(x):"".concat(w.CDNX_PROD,"/").concat(x)}function k(E){var x,C=(E==null?void 0:E.minified)!==!1?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified,P=L()?w.AXO_ASSET_PATH:"".concat(w.AXO_ASSET_PATH,"/").concat(C,".js");return _({assetUrl:P,bundleId:(x=E==null?void 0:E.metadata)===null||x===void 0?void 0:x.bundleIdOverride})}function U(E){var x;return _({assetUrl:w.LOCALE_PATH,bundleId:(x=E==null?void 0:E.metadata)===null||x===void 0?void 0:x.bundleIdOverride})}a.constants=w,a.loadAxo=j})},{}],37:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Framebus=void 0;var a=t("./lib"),s=typeof window!="undefined"&&window.Promise,o=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:(a.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,a.isntString)(c)||(0,a.isntString)(h))return!1;typeof d=="function"&&(u=d,d=void 0);var p=(0,a.packagePayload)(c,h,d,u);return p?(this.limitBroadcastToFramesArray?this.targetFramesAsWindows().forEach(function(m){(0,a.sendMessage)(m,p,h)}):(0,a.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 m=u.emit(c,d,function(f){h(f)});m||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,a.subscriptionArgsInvalid)(c,p,h)?!1:(this.hasAdditionalChecksForOnListeners&&(p=function(){for(var m=[],f=0;f<arguments.length;f++)m[f]=arguments[f];u.passesVerifyDomainCheck(this&&this.origin)&&u.hasMatchingTargetFrame(this&&this.source)&&d.apply(void 0,m)}),this.listeners.push({eventName:c,handler:p,originalHandler:d}),a.subscribers[h]=a.subscribers[h]||{},a.subscribers[h][c]=a.subscribers[h][c]||[],a.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 m=this.origin;if((0,a.subscriptionArgsInvalid)(c,u,m))return!1;var f=a.subscribers[m]&&a.subscribers[m][c];if(!f)return!1;for(var h=0;h<f.length;h++)if(f[h]===u)return f.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=s,l}();i.Framebus=o},{"./lib":45}],38:[function(t,n,i){var a=t("./lib"),s=t("./framebus");(0,a.attach)(),n.exports=s.Framebus},{"./framebus":37,"./lib":45}],39:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.detach=i.attach=void 0;var a=t("./"),s=!1;function o(){s||typeof window=="undefined"||(s=!0,window.addEventListener("message",a.onMessage,!1))}i.attach=o;function l(){s=!1,window.removeEventListener("message",a.onMessage,!1)}i.detach=l},{"./":45}],40:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.broadcastToChildWindows=void 0;var a=t("./");function s(o,l,c){for(var d=a.childWindows.length-1;d>=0;d--){var u=a.childWindows[d];u.closed?a.childWindows.splice(d,1):c!==u&&(0,a.broadcast)(o,{origin:l,frame:u.top})}}i.broadcastToChildWindows=s},{"./":45}],41:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.broadcast=void 0;var a=t("./");function s(o,l){var c=0,d,u=l.origin,h=l.frame;try{for(h.postMessage(o,u),(0,a.hasOpener)(h)&&h.opener.top!==window.top&&s(o,{origin:u,frame:h.opener.top});d=h.frames[c];)s(o,{origin:u,frame:d}),c++}catch(p){}}i.broadcast=s},{"./":45}],42:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.subscribers=i.childWindows=i.prefix=void 0,i.prefix="/*framebus*/",i.childWindows=[],i.subscribers={}},{}],43:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.dispatch=void 0;var a=t("./");function s(o,l,c,d,u){if(a.subscribers[o]&&a.subscribers[o][l]){var h=[];c&&h.push(c),d&&h.push(d);for(var p=0;p<a.subscribers[o][l].length;p++)a.subscribers[o][l][p].apply(u,h)}}i.dispatch=s},{"./":45}],44:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.hasOpener=void 0;function a(s){return!(s.top!==s||s.opener==null||s.opener===s||s.opener.closed===!0)}i.hasOpener=a},{}],45:[function(t,n,i){var a=this&&this.__createBinding||(Object.create?function(o,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(o,d,u)}:function(o,l,c,d){d===void 0&&(d=c),o[d]=l[c]}),s=this&&this.__exportStar||function(o,l){for(var c in o)c!=="default"&&!Object.prototype.hasOwnProperty.call(l,c)&&a(l,o,c)};Object.defineProperty(i,"__esModule",{value:!0}),s(t("./attach"),i),s(t("./broadcast-to-child-windows"),i),s(t("./broadcast"),i),s(t("./constants"),i),s(t("./dispatch"),i),s(t("./has-opener"),i),s(t("./is-not-string"),i),s(t("./message"),i),s(t("./package-payload"),i),s(t("./send-message"),i),s(t("./subscribe-replier"),i),s(t("./subscription-args-invalid"),i),s(t("./types"),i),s(t("./unpack-payload"),i)},{"./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(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.isntString=void 0;function a(s){return typeof s!="string"}i.isntString=a},{}],47:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.onMessage=void 0;var a=t("./");function s(o){if(!(0,a.isntString)(o.data)){var l=(0,a.unpackPayload)(o);if(l){var c=l.eventData,d=l.reply;(0,a.dispatch)("*",l.event,c,d,o),(0,a.dispatch)(o.origin,l.event,c,d,o),(0,a.broadcastToChildWindows)(o.data,l.origin,o.source)}}}i.onMessage=s},{"./":45}],48:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.packagePayload=void 0;var a=t("./");function s(o,l,c,d){var u,h={event:o,origin:l};typeof d=="function"&&(h.reply=(0,a.subscribeReplier)(d,l)),h.eventData=c;try{u=a.prefix+JSON.stringify(h)}catch(p){throw new Error("Could not stringify event: ".concat(p.message))}return u}i.packagePayload=s},{"./":45}],49:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.sendMessage=void 0;function a(s,o,l){try{s.postMessage(o,l)}catch(c){}}i.sendMessage=a},{}],50:[function(t,n,i){var a=this&&this.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(i,"__esModule",{value:!0}),i.subscribeReplier=void 0;var s=t("../framebus"),o=a(t("@braintree/uuid"));function l(c,d){var u=(0,o.default)();function h(p,m){c(p,m),s.Framebus.target({origin:d}).off(u,h)}return s.Framebus.target({origin:d}).on(u,h),u}i.subscribeReplier=l},{"../framebus":37,"@braintree/uuid":31}],51:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.subscriptionArgsInvalid=void 0;var a=t("./");function s(o,l,c){return(0,a.isntString)(o)||typeof l!="function"?!0:(0,a.isntString)(c)}i.subscriptionArgsInvalid=s},{"./":45}],52:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0})},{}],53:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.unpackPayload=void 0;var a=t("./");function s(o){var l;if(o.data.slice(0,a.prefix.length)!==a.prefix)return!1;try{l=JSON.parse(o.data.slice(a.prefix.length))}catch(h){return!1}if(l.reply){var c=o.origin,d=o.source,u=l.reply;l.reply=function(p){if(d){var m=(0,a.packagePayload)(u,c,p);m&&d.postMessage(m,c)}}}return l}i.unpackPayload=s},{"./":45}],54:[function(t,n,i){var a=t("./create-authorization-data"),s=t("./json-clone"),o=t("./constants");function l(d,u){var h,p=u?s(u):{},m=a(d.authorization).attrs,f=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(f[h]=p._meta[h]);return p._meta=f,m.tokenizationKey?p.tokenizationKey=m.tokenizationKey:p.authorizationFingerprint=m.authorizationFingerprint,p}function c(d){var u=d.getConfiguration(),h=a(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",m={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?m.tokenization_key=h.tokenizationKey:m.auth_fingerprint=h.authorizationFingerprint,m}n.exports={addMetadata:l,addEventMetadata:c}},{"./constants":60,"./create-authorization-data":63,"./json-clone":80}],55:[function(t,n,i){var a=t("./constants"),s=t("./add-metadata"),o=t("./assign").assign;function l(u,h,p){return c(u,h,{},p)}function c(u,h,p,m){var f=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,T=a.ANALYTICS_URL,A=a.ANALYTICS_PREFIX+h,N=v.getConfiguration(),w=N.gatewayConfiguration.environment==="production",I={events:[],tracking:[]},L=s.addEventMetadata(v,I);return L.event_name=A,L.t=f,I.events=[{level:"info",event:A,payload:o({env:w?"production":"sandbox",timestamp:f},p)}],I.tracking=[L],p&&typeof p=="object"&&(I.tracking=[d(L,p)]),y({url:T,method:"post",data:I,timeout:a.ANALYTICS_REQUEST_TIMEOUT_MS},m)}).catch(function(v){m&&m(v)})}function d(u,h){var p={},m=o({},h);return Object.keys(m).forEach(function(f){a.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(f)===-1&&delete m[f]}),p=o(u,m),p}n.exports={sendEvent:l,sendEventPlus:c}},{"./add-metadata":54,"./assign":57,"./constants":60}],56:[function(t,n,i){var a=t("@braintree/asset-loader/load-script"),s=t("@paypal/accelerated-checkout-loader");n.exports={loadScript:a,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":36}],57:[function(t,n,i){var a=typeof Object.assign=="function"?Object.assign:s;function s(o){var l,c,d;for(l=1;l<arguments.length;l++){c=arguments[l];for(d in c)c.hasOwnProperty(d)&&(o[d]=c[d])}return o}n.exports={assign:a,_assign:s}},{}],58:[function(t,n,i){var a=t("./braintree-error"),s=t("./errors"),o="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 a({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 a({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 a({type:s.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:s.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:"Options must be passed to basicComponentVerification function."}))}n.exports={verify:l}},{"./braintree-error":59,"./errors":66}],59:[function(t,n,i){var a=t("./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=a(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":65}],60:[function(t,n,i){var a="3.126.0",s="web",o={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:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:l,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:c,INTEGRATION_TIMEOUT_MS:6e4,VERSION:a,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+a,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],61:[function(t,n,i){var a=t("./braintree-error"),s=t("./errors");n.exports=function(o,l){l.forEach(function(c){o[c]=function(){throw new a({type:s.METHOD_CALLED_AFTER_TEARDOWN.type,code:s.METHOD_CALLED_AFTER_TEARDOWN.code,message:c+" cannot be called after teardown."})}})}},{"./braintree-error":59,"./errors":66}],62:[function(t,n,i){var a=t("./constants").ASSETS_URLS;function s(o){return a.production}n.exports={create:s}},{"./constants":60}],63:[function(t,n,i){var a=t("../lib/vendor/polyfill").atob,s=t("../lib/constants").CLIENT_API_URLS;function o(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 o(d)?(h=l(d),p.environment=h.environment,p.attrs.tokenizationKey=d,p.configUrl=s[h.environment]+"/merchants/"+h.merchantId+"/client_api/v1/configuration"):(u=JSON.parse(a(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(t,n,i){var a=t("./braintree-error"),s=t("./assets"),o=t("./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=s.loadScript({src:d.assetsUrl+"/web/"+l+"/js/client.min.js"}).catch(function(h){return Promise.reject(new a({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!==l?Promise.reject(new a({type:o.INCOMPATIBLE_VERSIONS.type,code:o.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(t,n,i){function a(s,o){return o=o==null?"":o,s.reduce(function(l,c){return l[c]=o+c,l},{})}n.exports=a},{}],66:[function(t,n,i){var a=t("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:a.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:a.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:a.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:a.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:a.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":59}],67:[function(t,n,i){var a=t("./strategies/popup"),s=t("./strategies/popup-bridge"),o=t("./strategies/modal"),l=t("framebus"),c=t("../shared/events"),d=t("../shared/errors"),u=t("../shared/constants"),h=t("@braintree/uuid"),p=t("@braintree/iframer"),m=t("../../braintree-error"),f=t("../shared/browser-detection"),v=t("./../../assign").assign,y=t("../../constants").BUS_CONFIGURATION_REQUEST_EVENT,T=["name","dispatchFrameUrl","openFrameUrl"];function A(){}function N(I){if(!I)throw new Error("Valid configuration is required");if(T.forEach(function(L){if(!I.hasOwnProperty(L))throw new Error("A valid frame "+L+" must be provided")}),!/^[\w_]+$/.test(I.name))throw new Error("A valid frame name must be provided")}function w(I){N(I),this._serviceId=h().replace(/-/g,""),this._options={name:I.name+"_"+this._serviceId,dispatchFrameUrl:I.dispatchFrameUrl,openFrameUrl:I.openFrameUrl,height:I.height,width:I.width,top:I.top,left:I.left},this.state=I.state||{},this._bus=new l({channel:this._serviceId}),this._setBusEvents()}w.prototype.initialize=function(I){var L=function(){I(),this._bus.off(c.DISPATCH_FRAME_READY,L)}.bind(this);this._bus.on(c.DISPATCH_FRAME_READY,L),this._writeDispatchFrame()},w.prototype._writeDispatchFrame=function(){var I=u.DISPATCH_FRAME_NAME+"_"+this._serviceId,L=this._options.dispatchFrameUrl;this._dispatchFrame=p({"aria-hidden":!0,name:I,title:I,src:L,class:u.DISPATCH_FRAME_CLASS,height:0,width:0,style:{position:"absolute",left:"-9999px"}}),document.body.appendChild(this._dispatchFrame)},w.prototype._setBusEvents=function(){this._bus.on(c.DISPATCH_FRAME_REPORT,function(I,L){this._onCompleteCallback&&this._onCompleteCallback.call(null,I.err,I.payload),this._frame.close(),this._onCompleteCallback=null,L&&L()}.bind(this)),this._bus.on(y,function(I){I(this.state)}.bind(this))},w.prototype.open=function(I,L){if(I=I||{},this._frame=this._getFrameForEnvironment(I),this._frame.initialize(L),!(this._frame instanceof s)){if(v(this.state,I.state),this._onCompleteCallback=L,this._frame.open(),this.isFrameClosed()){this._cleanupFrame(),L&&L(new m(d.FRAME_SERVICE_FRAME_OPEN_FAILED));return}this._pollForPopupClose()}},w.prototype.redirect=function(I){this._frame&&!this.isFrameClosed()&&this._frame.redirect(I)},w.prototype.close=function(){this.isFrameClosed()||this._frame.close()},w.prototype.focus=function(){this.isFrameClosed()||this._frame.focus()},w.prototype.createHandler=function(I){return I=I||{},{close:function(){I.beforeClose&&I.beforeClose(),this.close()}.bind(this),focus:function(){I.beforeFocus&&I.beforeFocus(),this.focus()}.bind(this)}},w.prototype.createNoopHandler=function(){return{close:A,focus:A}},w.prototype.teardown=function(){this.close(),this._dispatchFrame.parentNode.removeChild(this._dispatchFrame),this._dispatchFrame=null,this._cleanupFrame()},w.prototype.isFrameClosed=function(){return this._frame==null||this._frame.isClosed()},w.prototype._cleanupFrame=function(){this._frame=null,clearInterval(this._popupInterval),this._popupInterval=null},w.prototype._pollForPopupClose=function(){return this._popupInterval=setInterval(function(){this.isFrameClosed()&&(this._cleanupFrame(),this._onCompleteCallback&&this._onCompleteCallback(new m(d.FRAME_SERVICE_FRAME_CLOSED)))}.bind(this),u.POPUP_POLL_INTERVAL),this._popupInterval},w.prototype._getFrameForEnvironment=function(I){var L=f.supportsPopups(),S=!!window.popupBridge,B=v({},this._options,I);return S?new s(B):L?new a(B):new o(B)},n.exports=w},{"../../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(t,n,i){var a=t("./frame-service");n.exports={create:function(o,l){var c=new a(o);c.initialize(function(){l(c)})}}},{"./frame-service":67}],69:[function(t,n,i){var a=t("@braintree/iframer"),s=t("../../../assign").assign,o=t("../../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:s({},l),title:"Lightbox Frame"};o.isIos()?(o.isIosWKWebview()&&(this._lockScrolling(),u.style={}),this._el=document.createElement("div"),s(this._el.style,l,{height:"100%",width:"100%",overflow:"auto","-webkit-overflow-scrolling":"touch"}),this._frame=a(u),this._el.appendChild(this._frame)):this._el=this._frame=a(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,o.isIosWKWebview()&&this._unlockScrolling()},d.prototype.isClosed=function(){return!!this._closed},d.prototype.redirect=function(u){this._frame.src=u},d.prototype._unlockScrolling=function(){document.body.style.overflow=this._savedBodyProperties.overflowStyle,document.body.style.position=this._savedBodyProperties.positionStyle,window.scrollTo(this._savedBodyProperties.left,this._savedBodyProperties.top),delete this._savedBodyProperties},d.prototype._lockScrolling=function(){var u=document.documentElement;this._savedBodyProperties={left:(window.pageXOffset||u.scrollLeft)-(u.clientLeft||0),top:(window.pageYOffset||u.scrollTop)-(u.clientTop||0),overflowStyle:document.body.style.overflow,positionStyle:document.body.style.position},document.body.style.overflow="hidden",document.body.style.position="fixed",window.scrollTo(0,0)},n.exports=d},{"../../../assign":57,"../../shared/browser-detection":74,"@braintree/iframer":27}],70:[function(t,n,i){var a=t("../../../braintree-error"),s=t("../../shared/errors");function o(){}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 a(s.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=o,l.prototype.close=o,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(t,n,i){var a=t("../../../shared/constants"),s=t("./position");function o(l,c,d){return typeof c!="undefined"?c:s[l](d)}n.exports=function(c){var d=c.height||a.DEFAULT_POPUP_HEIGHT,u=c.width||a.DEFAULT_POPUP_WIDTH,h=o("top",c.top,d),p=o("left",c.left,u);return[a.POPUP_BASE_OPTIONS,"height="+d,"width="+u,"top="+h,"left="+p].join(",")}},{"../../../shared/constants":75,"./position":73}],72:[function(t,n,i){var a=t("./compose-options");function s(){}function o(l){this._frame=null,this._options=l||{}}o.prototype.initialize=s,o.prototype.open=function(){this._frame=window.open(this._options.openFrameUrl,this._options.name,a(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(l){this._frame.location.href=l},n.exports=o},{"./compose-options":71}],73:[function(t,n,i){function a(l){var c=window.outerHeight||document.documentElement.clientHeight,d=window.screenY==null?window.screenTop:window.screenY;return o(c,l,d)}function s(l){var c=window.outerWidth||document.documentElement.clientWidth,d=window.screenX==null?window.screenLeft:window.screenX;return o(c,l,d)}function o(l,c,d){return(l-c)/2+d}n.exports={top:a,left:s,center:o}},{}],74:[function(t,n,i){n.exports={isIos:t("@braintree/browser-detection/is-ios"),isIosWKWebview:t("@braintree/browser-detection/is-ios-wkwebview"),supportsPopups:t("@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(t,n,i){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(t,n,i){var a=t("../../braintree-error");n.exports={FRAME_SERVICE_FRAME_CLOSED:{type:a.types.INTERNAL,code:"FRAME_SERVICE_FRAME_CLOSED",message:"Frame closed before tokenization could occur."},FRAME_SERVICE_FRAME_OPEN_FAILED:{type:a.types.INTERNAL,code:"FRAME_SERVICE_FRAME_OPEN_FAILED",message:"Frame failed to open."}}},{"../../braintree-error":59}],77:[function(t,n,i){var a=t("../../enumerate");n.exports=a(["DISPATCH_FRAME_READY","DISPATCH_FRAME_REPORT"],"frameService:")},{"../../enumerate":65}],78:[function(t,n,i){n.exports=function(s){s=s||window;try{return s.self!==s.top}catch(o){return!0}}},{}],79:[function(t,n,i){var a,s={"paypal.com":1,"braintreepayments.com":1,"braintreegateway.com":1,"braintree-api.com":1};function o(c){return c.split(".").slice(-2).join(".")}function l(c){var d;return c=c.toLowerCase(),/^https:/.test(c)?(a=a||document.createElement("a"),a.href=c,d=o(a.hostname),s.hasOwnProperty(d)):!1}n.exports=l},{}],80:[function(t,n,i){n.exports=function(a){return JSON.parse(JSON.stringify(a))}},{}],81:[function(t,n,i){n.exports=function(a){return Object.keys(a).filter(function(s){return typeof a[s]=="function"})}},{}],82:[function(t,n,i){function a(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 l(u){var h,p;return u=u||window.location.href,o(u)?(h=u.split("?")[1]||"",h=h.replace(/#.*$/,"").split("&"),p=h.reduce(function(m,f){var v=f.split("="),y=decodeURIComponent(v[0]),T=decodeURIComponent(v[1]);return m[y]=T,m},{}),p):{}}function c(u,h){var p,m,f,v=[];for(f in u)u.hasOwnProperty(f)&&(m=u[f],h?s(u)?p=h+"[]":p=h+"["+f+"]":p=f,typeof m=="object"?v.push(c(m,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(m)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&a(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=c(h)),u}n.exports={parse:l,stringify:c,queryify:d,hasQueryParams:o}},{}],83:[function(t,n,i){n.exports=function(a){return a.indexOf("_")===-1?a:a.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],84:[function(t,n,i){var a=t("./querystring");function s(){return a.parse(window.location.href)}n.exports={getUrlParams:s}},{"./querystring":82}],85:[function(t,n,i){function a(s){return s?"":".min"}n.exports=a},{}],86:[function(t,n,i){var a=typeof atob=="function"?atob:s;function s(o){var l,c,d,u,h,p,m,f,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+/=",T="";if(!v.test(o))throw new Error("Non base64 encoded input passed to window.atob polyfill");f=0;do u=y.indexOf(o.charAt(f++)),h=y.indexOf(o.charAt(f++)),p=y.indexOf(o.charAt(f++)),m=y.indexOf(o.charAt(f++)),l=(u&63)<<2|h>>4&3,c=(h&15)<<4|p>>2&15,d=(p&3)<<6|m&63,T+=String.fromCharCode(l)+(c?String.fromCharCode(c):"")+(d?String.fromCharCode(d):"");while(f<o.length);return T}n.exports={atob:function(o){return a.call(window,o)},_atob:s}},{}],87:[function(t,n,i){var a=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},s=a(t("./venmo-desktop"));n.exports=function(l){var c=new s.default(l);return c.initialize()}},{"./venmo-desktop":89}],88:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.VENMO_PAYMENT_CONTEXT_STATUS_QUERY=i.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY=i.UPDATE_PAYMENT_CONTEXT_QUERY=i.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY=i.CREATE_PAYMENT_CONTEXT_QUERY=i.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=void 0,i.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=`mutation CreateVenmoQRCodePaymentContext($input: CreateVenmoQRCodePaymentContextInput!) {
|
|
371
|
+
***************************************************************************** */function s(E,x,C,P){function V(O){return O instanceof C?O:new C(function(H){H(O)})}return new(C||(C=Promise))(function(O,H){function X(te){try{D(P.next(te))}catch(ye){H(ye)}}function le(te){try{D(P.throw(te))}catch(ye){H(ye)}}function D(te){te.done?O(te.value):V(te.value).then(X,le)}D((P=P.apply(E,[])).next())})}function o(E,x){var C={label:0,sent:function(){if(O[0]&1)throw O[1];return O[1]},trys:[],ops:[]},P,V,O,H;return H={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function X(D){return function(te){return le([D,te])}}function le(D){if(P)throw new TypeError("Generator is already executing.");for(;C;)try{if(P=1,V&&(O=D[0]&2?V.return:D[0]?V.throw||((O=V.return)&&O.call(V),0):V.next)&&!(O=O.call(V,D[1])).done)return O;switch(V=0,O&&(D=[D[0]&2,O.value]),D[0]){case 0:case 1:O=D;break;case 4:return C.label++,{value:D[1],done:!1};case 5:C.label++,V=D[1],D=[0];continue;case 7:D=C.ops.pop(),C.trys.pop();continue;default:if(O=C.trys,!(O=O.length>0&&O[O.length-1])&&(D[0]===6||D[0]===2)){C=0;continue}if(D[0]===3&&(!O||D[1]>O[0]&&D[1]<O[3])){C.label=D[1];break}if(D[0]===6&&C.label<O[1]){C.label=O[1],O=D;break}if(O&&C.label<O[2]){C.label=O[2],C.ops.push(D);break}O[2]&&C.ops.pop(),C.trys.pop();continue}D=x.call(E,C)}catch(te){D=[6,te],V=0}finally{P=O=0}if(D[0]&5)throw D[1];return{value:D[0]?D[1]:void 0,done:!0}}}var c={},l={};function d(E){var x,C=JSON.stringify(E);if(!E.forceScriptReload&&(x=l[C],x))return x;var P=document.createElement("script"),V=E.dataAttributes||{},O=E.container||document.head;return P.src=E.src,P.id=E.id||"",P.async=!0,E.type&&P.setAttribute("type","".concat(E.type)),E.crossorigin&&P.setAttribute("crossorigin","".concat(E.crossorigin)),Object.keys(V).forEach(function(H){P.setAttribute("data-".concat(H),"".concat(V[H]))}),x=new Promise(function(H,X){P.addEventListener("load",function(){H(P)}),P.addEventListener("error",function(){X(new Error("".concat(E.src," failed to load.")))}),P.addEventListener("abort",function(){X(new Error("".concat(E.src," has aborted.")))}),O.appendChild(P)}),l[C]=x,x}d.clearCache=function(){l={}};var u=d,h=function(x){var C=document.querySelector('link[href="'.concat(x.href,'"]'));if(C)return Promise.resolve(C);C=document.createElement("link");var P=x.container||document.head;return C.setAttribute("rel","stylesheet"),C.setAttribute("type","text/css"),C.setAttribute("href",x.href),C.setAttribute("id",x.id),P.firstChild?P.insertBefore(C,P.firstChild):P.appendChild(C),Promise.resolve(C)};Object.defineProperty(c,"__esModule",{value:!0}),c.loadStylesheet=m=c.loadScript=void 0;var p=u,m=c.loadScript=p,f=h;c.loadStylesheet=f;var v="https://www.paypalobjects.com",y={minified:"axo.min",unminified:"axo"},A="fastlane",T="connect-boba",N="".concat(T,"/locales/"),w={AXO_ASSET_NAME:y,AXO_ASSET_PATH:T,LOCALE_PATH:N,CDNX_PROD:v},I={BT:"BT",PPCP:"PPCP"};function L(){return typeof window.define=="function"&&!!window.define.amd}function S(){return L()&&typeof window.requirejs=="function"&&typeof window.requirejs.config=="function"}function B(E,x,C){var P,V;return C===void 0&&(C=!0),s(this,void 0,void 0,function(){var O,H;return o(this,function(X){if(O=q(),O&&O[E.module]){if(x&&((P=O[E.module])===null||P===void 0?void 0:P.VERSION)!==x)throw H=(V=O[E.module])===null||V===void 0?void 0:V.VERSION,new Error("".concat(E.module," already loaded with version ").concat(H," cannot load version ").concat(x));return[2,!0]}if(!x)throw new Error("Attempted to load ".concat(E.module," without specifying version"));return[2,G(E,x,C)]})})}function G(E,x,C){if(C===void 0&&(C=!0),L()){var P=C?E.amdModule.minified:E.amdModule.unminified;return new Promise(function(O,H){window.require([P],O,H)})}var V=C?E.script.minified:E.script.unminified;return m({id:"".concat(E.id,"-").concat(x),src:"https://js.braintreegateway.com/web/".concat(x,"/js/").concat(V)})}function q(){return window==null?void 0:window.braintree}var M,F,K={Client:"client",HostedCardFields:"hostedFields"},J="braintree",R=(M={},M[K.Client]="client",M[K.HostedCardFields]="hosted-fields",M),W=(F={},F[K.Client]={id:"client",module:K.Client,amdModule:{unminified:"".concat(J,"/").concat(R[K.Client]),minified:"".concat(J,"/").concat(R[K.Client],".min")},script:{unminified:"".concat(R[K.Client],".js"),minified:"".concat(R[K.Client],".min.js")}},F[K.HostedCardFields]={id:"hcf",module:K.HostedCardFields,amdModule:{unminified:"".concat(J,"/").concat(R[K.HostedCardFields]),minified:"".concat(J,"/").concat(R[K.HostedCardFields],".min")},script:{unminified:"".concat(R[K.HostedCardFields],".js"),minified:"".concat(R[K.HostedCardFields],".min.js")}},F);function j(E){return s(this,void 0,void 0,function(){var x,C,P,V;return o(this,function(O){switch(O.label){case 0:return performance.mark("pp_axo_sdk_init_invoked"),x=E.btSdkVersion,C=E.minified,P=k(E),V=U(E),E.platform!==I.BT?[3,2]:[4,Promise.all([B(W.hostedFields,x,C),g(P,C)])];case 1:return O.sent(),[3,5];case 2:return E.platform!==I.PPCP?[3,4]:[4,Promise.all([B(W.client,x,C),B(W.hostedFields,x,C),g(P,C)])];case 3:return O.sent(),[3,5];case 4:throw new Error("unsupported axo platform");case 5:return[2,{metadata:{localeUrl:V}}]}})})}function g(E,x){var C;if(x===void 0&&(x=!0),L()){S()&&requirejs.config({paths:(C={},C[A]=E,C)});var P="".concat(A,"/").concat(x?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified);return new Promise(function(V,O){window.require([P],V,O)})}return m({id:"axo-id",src:E,forceScriptReload:!0})}function _(E){var x=E.assetUrl,C=E.bundleId;return C?"https://cdn-".concat(C,".static.engineering.dev.paypalinc.com/").concat(x):"".concat(w.CDNX_PROD,"/").concat(x)}function k(E){var x,C=(E==null?void 0:E.minified)!==!1?w.AXO_ASSET_NAME.minified:w.AXO_ASSET_NAME.unminified,P=L()?w.AXO_ASSET_PATH:"".concat(w.AXO_ASSET_PATH,"/").concat(C,".js");return _({assetUrl:P,bundleId:(x=E==null?void 0:E.metadata)===null||x===void 0?void 0:x.bundleIdOverride})}function U(E){var x;return _({assetUrl:w.LOCALE_PATH,bundleId:(x=E==null?void 0:E.metadata)===null||x===void 0?void 0:x.bundleIdOverride})}a.constants=w,a.loadAxo=j})},{}],37:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Framebus=void 0;var a=t("./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:(a.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,a.isntString)(l)||(0,a.isntString)(h))return!1;typeof d=="function"&&(u=d,d=void 0);var p=(0,a.packagePayload)(l,h,d,u);return p?(this.limitBroadcastToFramesArray?this.targetFramesAsWindows().forEach(function(m){(0,a.sendMessage)(m,p,h)}):(0,a.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 m=u.emit(l,d,function(f){h(f)});m||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,a.subscriptionArgsInvalid)(l,p,h)?!1:(this.hasAdditionalChecksForOnListeners&&(p=function(){for(var m=[],f=0;f<arguments.length;f++)m[f]=arguments[f];u.passesVerifyDomainCheck(this&&this.origin)&&u.hasMatchingTargetFrame(this&&this.source)&&d.apply(void 0,m)}),this.listeners.push({eventName:l,handler:p,originalHandler:d}),a.subscribers[h]=a.subscribers[h]||{},a.subscribers[h][l]=a.subscribers[h][l]||[],a.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 m=this.origin;if((0,a.subscriptionArgsInvalid)(l,u,m))return!1;var f=a.subscribers[m]&&a.subscribers[m][l];if(!f)return!1;for(var h=0;h<f.length;h++)if(f[h]===u)return f.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}();i.Framebus=o},{"./lib":45}],38:[function(t,n,i){var a=t("./lib"),s=t("./framebus");(0,a.attach)(),n.exports=s.Framebus},{"./framebus":37,"./lib":45}],39:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.detach=i.attach=void 0;var a=t("./"),s=!1;function o(){s||typeof window=="undefined"||(s=!0,window.addEventListener("message",a.onMessage,!1))}i.attach=o;function c(){s=!1,window.removeEventListener("message",a.onMessage,!1)}i.detach=c},{"./":45}],40:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.broadcastToChildWindows=void 0;var a=t("./");function s(o,c,l){for(var d=a.childWindows.length-1;d>=0;d--){var u=a.childWindows[d];u.closed?a.childWindows.splice(d,1):l!==u&&(0,a.broadcast)(o,{origin:c,frame:u.top})}}i.broadcastToChildWindows=s},{"./":45}],41:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.broadcast=void 0;var a=t("./");function s(o,c){var l=0,d,u=c.origin,h=c.frame;try{for(h.postMessage(o,u),(0,a.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){}}i.broadcast=s},{"./":45}],42:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.subscribers=i.childWindows=i.prefix=void 0,i.prefix="/*framebus*/",i.childWindows=[],i.subscribers={}},{}],43:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.dispatch=void 0;var a=t("./");function s(o,c,l,d,u){if(a.subscribers[o]&&a.subscribers[o][c]){var h=[];l&&h.push(l),d&&h.push(d);for(var p=0;p<a.subscribers[o][c].length;p++)a.subscribers[o][c][p].apply(u,h)}}i.dispatch=s},{"./":45}],44:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.hasOpener=void 0;function a(s){return!(s.top!==s||s.opener==null||s.opener===s||s.opener.closed===!0)}i.hasOpener=a},{}],45:[function(t,n,i){var a=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)&&a(c,o,l)};Object.defineProperty(i,"__esModule",{value:!0}),s(t("./attach"),i),s(t("./broadcast-to-child-windows"),i),s(t("./broadcast"),i),s(t("./constants"),i),s(t("./dispatch"),i),s(t("./has-opener"),i),s(t("./is-not-string"),i),s(t("./message"),i),s(t("./package-payload"),i),s(t("./send-message"),i),s(t("./subscribe-replier"),i),s(t("./subscription-args-invalid"),i),s(t("./types"),i),s(t("./unpack-payload"),i)},{"./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(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.isntString=void 0;function a(s){return typeof s!="string"}i.isntString=a},{}],47:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.onMessage=void 0;var a=t("./");function s(o){if(!(0,a.isntString)(o.data)){var c=(0,a.unpackPayload)(o);if(c){var l=c.eventData,d=c.reply;(0,a.dispatch)("*",c.event,l,d,o),(0,a.dispatch)(o.origin,c.event,l,d,o),(0,a.broadcastToChildWindows)(o.data,c.origin,o.source)}}}i.onMessage=s},{"./":45}],48:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.packagePayload=void 0;var a=t("./");function s(o,c,l,d){var u,h={event:o,origin:c};typeof d=="function"&&(h.reply=(0,a.subscribeReplier)(d,c)),h.eventData=l;try{u=a.prefix+JSON.stringify(h)}catch(p){throw new Error("Could not stringify event: ".concat(p.message))}return u}i.packagePayload=s},{"./":45}],49:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.sendMessage=void 0;function a(s,o,c){try{s.postMessage(o,c)}catch(l){}}i.sendMessage=a},{}],50:[function(t,n,i){var a=this&&this.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(i,"__esModule",{value:!0}),i.subscribeReplier=void 0;var s=t("../framebus"),o=a(t("@braintree/uuid"));function c(l,d){var u=(0,o.default)();function h(p,m){l(p,m),s.Framebus.target({origin:d}).off(u,h)}return s.Framebus.target({origin:d}).on(u,h),u}i.subscribeReplier=c},{"../framebus":37,"@braintree/uuid":31}],51:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.subscriptionArgsInvalid=void 0;var a=t("./");function s(o,c,l){return(0,a.isntString)(o)||typeof c!="function"?!0:(0,a.isntString)(l)}i.subscriptionArgsInvalid=s},{"./":45}],52:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0})},{}],53:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.unpackPayload=void 0;var a=t("./");function s(o){var c;if(o.data.slice(0,a.prefix.length)!==a.prefix)return!1;try{c=JSON.parse(o.data.slice(a.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 m=(0,a.packagePayload)(u,l,p);m&&d.postMessage(m,l)}}}return c}i.unpackPayload=s},{"./":45}],54:[function(t,n,i){var a=t("./create-authorization-data"),s=t("./json-clone"),o=t("./constants");function c(d,u){var h,p=u?s(u):{},m=a(d.authorization).attrs,f=s(d.analyticsMetadata);p.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION;for(h in p._meta)p._meta.hasOwnProperty(h)&&(f[h]=p._meta[h]);return p._meta=f,m.tokenizationKey?p.tokenizationKey=m.tokenizationKey:p.authorizationFingerprint=m.authorizationFingerprint,p}function l(d){var u=d.getConfiguration(),h=a(u.authorization).attrs,p=u.gatewayConfiguration.environment==="production",m={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?m.tokenization_key=h.tokenizationKey:m.auth_fingerprint=h.authorizationFingerprint,m}n.exports={addMetadata:c,addEventMetadata:l}},{"./constants":60,"./create-authorization-data":63,"./json-clone":80}],55:[function(t,n,i){var a=t("./constants"),s=t("./add-metadata"),o=t("./assign").assign;function c(u,h,p){return l(u,h,{},p)}function l(u,h,p,m){var f=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=a.ANALYTICS_URL,T=a.ANALYTICS_PREFIX+h,N=v.getConfiguration(),w=N.gatewayConfiguration.environment==="production",I={events:[],tracking:[]},L=s.addEventMetadata(v,I);return L.event_name=T,L.t=f,I.events=[{level:"info",event:T,payload:o({env:w?"production":"sandbox",timestamp:f},p)}],I.tracking=[L],p&&typeof p=="object"&&(I.tracking=[d(L,p)]),y({url:A,method:"post",data:I,timeout:a.ANALYTICS_REQUEST_TIMEOUT_MS},m)}).catch(function(v){m&&m(v)})}function d(u,h){var p={},m=o({},h);return Object.keys(m).forEach(function(f){a.ALLOWED_EXTRA_EVENT_FIELDS.indexOf(f)===-1&&delete m[f]}),p=o(u,m),p}n.exports={sendEvent:c,sendEventPlus:l}},{"./add-metadata":54,"./assign":57,"./constants":60}],56:[function(t,n,i){var a=t("@braintree/asset-loader/load-script"),s=t("@paypal/accelerated-checkout-loader");n.exports={loadScript:a,loadFastlane:s.loadAxo}},{"@braintree/asset-loader/load-script":2,"@paypal/accelerated-checkout-loader":36}],57:[function(t,n,i){var a=typeof Object.assign=="function"?Object.assign:s;function s(o){var c,l,d;for(c=1;c<arguments.length;c++){l=arguments[c];for(d in l)l.hasOwnProperty(d)&&(o[d]=l[d])}return o}n.exports={assign:a,_assign:s}},{}],58:[function(t,n,i){var a=t("./braintree-error"),s=t("./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 a({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 a({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 a({type:s.INVALID_USE_OF_INTERNAL_FUNCTION.type,code:s.INVALID_USE_OF_INTERNAL_FUNCTION.code,message:"Options must be passed to basicComponentVerification function."}))}n.exports={verify:c}},{"./braintree-error":59,"./errors":66}],59:[function(t,n,i){var a=t("./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=a(["CUSTOMER","MERCHANT","NETWORK","INTERNAL","UNKNOWN"]),s.findRootError=function(o){return o instanceof s&&o.details&&o.details.originalError?s.findRootError(o.details.originalError):o},n.exports=s},{"./enumerate":65}],60:[function(t,n,i){var a="3.126.0",s="web",o={production:"https://api.braintreegateway.com:443",sandbox:"https://api.sandbox.braintreegateway.com:443"},c={production:"https://assets.braintreegateway.com",sandbox:"https://assets.braintreegateway.com"},l={production:"https://payments.braintree-api.com/graphql",sandbox:"https://payments.sandbox.braintree-api.com/graphql"};n.exports={ANALYTICS_PREFIX:s+".",ANALYTICS_REQUEST_TIMEOUT_MS:2e3,ANALYTICS_URL:"https://www.paypal.com/xoplatform/logger/api/logger",ASSETS_URLS:c,CLIENT_API_URLS:o,FRAUDNET_SOURCE:"BRAINTREE_SIGNIN",FRAUDNET_FNCLS:"fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",FRAUDNET_URL:"https://c.paypal.com/da/r/fb.js",BUS_CONFIGURATION_REQUEST_EVENT:"BUS_CONFIGURATION_REQUEST",GRAPHQL_URLS:l,INTEGRATION_TIMEOUT_MS:6e4,VERSION:a,INTEGRATION:"custom",SOURCE:"client",PLATFORM:s,BRAINTREE_LIBRARY_VERSION:"braintree/"+s+"/"+a,ALLOWED_EXTRA_EVENT_FIELDS:["context_id","context_type"]}},{}],61:[function(t,n,i){var a=t("./braintree-error"),s=t("./errors");n.exports=function(o,c){c.forEach(function(l){o[l]=function(){throw new a({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(t,n,i){var a=t("./constants").ASSETS_URLS;function s(o){return a.production}n.exports={create:s}},{"./constants":60}],63:[function(t,n,i){var a=t("../lib/vendor/polyfill").atob,s=t("../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(a(d)),p.environment=u.environment,p.attrs.authorizationFingerprint=u.authorizationFingerprint,p.configUrl=u.configUrl,p.graphQL=u.graphQL),p}n.exports=l},{"../lib/constants":60,"../lib/vendor/polyfill":86}],64:[function(t,n,i){var a=t("./braintree-error"),s=t("./assets"),o=t("./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 a({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 a({type:o.INCOMPATIBLE_VERSIONS.type,code:o.INCOMPATIBLE_VERSIONS.code,message:"Client (version "+window.braintree.client.VERSION+") and "+d.name+" (version "+c+") components must be from the same SDK version."})):window.braintree.client.create({authorization:d.authorization,debug:d.debug})}))}n.exports={create:l}},{"./assets":56,"./braintree-error":59,"./errors":66}],65:[function(t,n,i){function a(s,o){return o=o==null?"":o,s.reduce(function(c,l){return c[l]=o+l,c},{})}n.exports=a},{}],66:[function(t,n,i){var a=t("./braintree-error");n.exports={INVALID_USE_OF_INTERNAL_FUNCTION:{type:a.types.INTERNAL,code:"INVALID_USE_OF_INTERNAL_FUNCTION"},INSTANTIATION_OPTION_REQUIRED:{type:a.types.MERCHANT,code:"INSTANTIATION_OPTION_REQUIRED"},INCOMPATIBLE_VERSIONS:{type:a.types.MERCHANT,code:"INCOMPATIBLE_VERSIONS"},CLIENT_SCRIPT_FAILED_TO_LOAD:{type:a.types.NETWORK,code:"CLIENT_SCRIPT_FAILED_TO_LOAD",message:"Braintree client script could not be loaded."},METHOD_CALLED_AFTER_TEARDOWN:{type:a.types.MERCHANT,code:"METHOD_CALLED_AFTER_TEARDOWN"}}},{"./braintree-error":59}],67:[function(t,n,i){var a=t("./strategies/popup"),s=t("./strategies/popup-bridge"),o=t("./strategies/modal"),c=t("framebus"),l=t("../shared/events"),d=t("../shared/errors"),u=t("../shared/constants"),h=t("@braintree/uuid"),p=t("@braintree/iframer"),m=t("../../braintree-error"),f=t("../shared/browser-detection"),v=t("./../../assign").assign,y=t("../../constants").BUS_CONFIGURATION_REQUEST_EVENT,A=["name","dispatchFrameUrl","openFrameUrl"];function T(){}function N(I){if(!I)throw new Error("Valid configuration is required");if(A.forEach(function(L){if(!I.hasOwnProperty(L))throw new Error("A valid frame "+L+" must be provided")}),!/^[\w_]+$/.test(I.name))throw new Error("A valid frame name must be provided")}function w(I){N(I),this._serviceId=h().replace(/-/g,""),this._options={name:I.name+"_"+this._serviceId,dispatchFrameUrl:I.dispatchFrameUrl,openFrameUrl:I.openFrameUrl,height:I.height,width:I.width,top:I.top,left:I.left},this.state=I.state||{},this._bus=new c({channel:this._serviceId}),this._setBusEvents()}w.prototype.initialize=function(I){var L=function(){I(),this._bus.off(l.DISPATCH_FRAME_READY,L)}.bind(this);this._bus.on(l.DISPATCH_FRAME_READY,L),this._writeDispatchFrame()},w.prototype._writeDispatchFrame=function(){var I=u.DISPATCH_FRAME_NAME+"_"+this._serviceId,L=this._options.dispatchFrameUrl;this._dispatchFrame=p({"aria-hidden":!0,name:I,title:I,src:L,class:u.DISPATCH_FRAME_CLASS,height:0,width:0,style:{position:"absolute",left:"-9999px"}}),document.body.appendChild(this._dispatchFrame)},w.prototype._setBusEvents=function(){this._bus.on(l.DISPATCH_FRAME_REPORT,function(I,L){this._onCompleteCallback&&this._onCompleteCallback.call(null,I.err,I.payload),this._frame.close(),this._onCompleteCallback=null,L&&L()}.bind(this)),this._bus.on(y,function(I){I(this.state)}.bind(this))},w.prototype.open=function(I,L){if(I=I||{},this._frame=this._getFrameForEnvironment(I),this._frame.initialize(L),!(this._frame instanceof s)){if(v(this.state,I.state),this._onCompleteCallback=L,this._frame.open(),this.isFrameClosed()){this._cleanupFrame(),L&&L(new m(d.FRAME_SERVICE_FRAME_OPEN_FAILED));return}this._pollForPopupClose()}},w.prototype.redirect=function(I){this._frame&&!this.isFrameClosed()&&this._frame.redirect(I)},w.prototype.close=function(){this.isFrameClosed()||this._frame.close()},w.prototype.focus=function(){this.isFrameClosed()||this._frame.focus()},w.prototype.createHandler=function(I){return I=I||{},{close:function(){I.beforeClose&&I.beforeClose(),this.close()}.bind(this),focus:function(){I.beforeFocus&&I.beforeFocus(),this.focus()}.bind(this)}},w.prototype.createNoopHandler=function(){return{close:T,focus:T}},w.prototype.teardown=function(){this.close(),this._dispatchFrame.parentNode.removeChild(this._dispatchFrame),this._dispatchFrame=null,this._cleanupFrame()},w.prototype.isFrameClosed=function(){return this._frame==null||this._frame.isClosed()},w.prototype._cleanupFrame=function(){this._frame=null,clearInterval(this._popupInterval),this._popupInterval=null},w.prototype._pollForPopupClose=function(){return this._popupInterval=setInterval(function(){this.isFrameClosed()&&(this._cleanupFrame(),this._onCompleteCallback&&this._onCompleteCallback(new m(d.FRAME_SERVICE_FRAME_CLOSED)))}.bind(this),u.POPUP_POLL_INTERVAL),this._popupInterval},w.prototype._getFrameForEnvironment=function(I){var L=f.supportsPopups(),S=!!window.popupBridge,B=v({},this._options,I);return S?new s(B):L?new a(B):new o(B)},n.exports=w},{"../../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(t,n,i){var a=t("./frame-service");n.exports={create:function(o,c){var l=new a(o);l.initialize(function(){c(l)})}}},{"./frame-service":67}],69:[function(t,n,i){var a=t("@braintree/iframer"),s=t("../../../assign").assign,o=t("../../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=a(u),this._el.appendChild(this._frame)):this._el=this._frame=a(u),this._closed=!1,this._container.appendChild(this._el)},d.prototype.focus=l,d.prototype.close=function(){this._container.removeChild(this._el),this._frame=null,this._closed=!0,o.isIosWKWebview()&&this._unlockScrolling()},d.prototype.isClosed=function(){return!!this._closed},d.prototype.redirect=function(u){this._frame.src=u},d.prototype._unlockScrolling=function(){document.body.style.overflow=this._savedBodyProperties.overflowStyle,document.body.style.position=this._savedBodyProperties.positionStyle,window.scrollTo(this._savedBodyProperties.left,this._savedBodyProperties.top),delete this._savedBodyProperties},d.prototype._lockScrolling=function(){var u=document.documentElement;this._savedBodyProperties={left:(window.pageXOffset||u.scrollLeft)-(u.clientLeft||0),top:(window.pageYOffset||u.scrollTop)-(u.clientTop||0),overflowStyle:document.body.style.overflow,positionStyle:document.body.style.position},document.body.style.overflow="hidden",document.body.style.position="fixed",window.scrollTo(0,0)},n.exports=d},{"../../../assign":57,"../../shared/browser-detection":74,"@braintree/iframer":27}],70:[function(t,n,i){var a=t("../../../braintree-error"),s=t("../../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 a(s.FRAME_SERVICE_FRAME_CLOSED));return}l(null,h)}},c.prototype.open=function(l){var d;l=l||{},d=l.openFrameUrl||this._options.openFrameUrl,this._closed=!1,window.popupBridge.open(d)},c.prototype.focus=o,c.prototype.close=o,c.prototype.isClosed=function(){return!!this._closed},c.prototype.redirect=function(l){this.open({openFrameUrl:l})},n.exports=c},{"../../../braintree-error":59,"../../shared/errors":76}],71:[function(t,n,i){var a=t("../../../shared/constants"),s=t("./position");function o(c,l,d){return typeof l!="undefined"?l:s[c](d)}n.exports=function(l){var d=l.height||a.DEFAULT_POPUP_HEIGHT,u=l.width||a.DEFAULT_POPUP_WIDTH,h=o("top",l.top,d),p=o("left",l.left,u);return[a.POPUP_BASE_OPTIONS,"height="+d,"width="+u,"top="+h,"left="+p].join(",")}},{"../../../shared/constants":75,"./position":73}],72:[function(t,n,i){var a=t("./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,a(this._options))},o.prototype.focus=function(){this._frame.focus()},o.prototype.close=function(){this._frame.closed||this._frame.close()},o.prototype.isClosed=function(){return!this._frame||!!this._frame.closed},o.prototype.redirect=function(c){this._frame.location.href=c},n.exports=o},{"./compose-options":71}],73:[function(t,n,i){function a(c){var l=window.outerHeight||document.documentElement.clientHeight,d=window.screenY==null?window.screenTop:window.screenY;return o(l,c,d)}function s(c){var l=window.outerWidth||document.documentElement.clientWidth,d=window.screenX==null?window.screenLeft:window.screenX;return o(l,c,d)}function o(c,l,d){return(c-l)/2+d}n.exports={top:a,left:s,center:o}},{}],74:[function(t,n,i){n.exports={isIos:t("@braintree/browser-detection/is-ios"),isIosWKWebview:t("@braintree/browser-detection/is-ios-wkwebview"),supportsPopups:t("@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(t,n,i){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(t,n,i){var a=t("../../braintree-error");n.exports={FRAME_SERVICE_FRAME_CLOSED:{type:a.types.INTERNAL,code:"FRAME_SERVICE_FRAME_CLOSED",message:"Frame closed before tokenization could occur."},FRAME_SERVICE_FRAME_OPEN_FAILED:{type:a.types.INTERNAL,code:"FRAME_SERVICE_FRAME_OPEN_FAILED",message:"Frame failed to open."}}},{"../../braintree-error":59}],77:[function(t,n,i){var a=t("../../enumerate");n.exports=a(["DISPATCH_FRAME_READY","DISPATCH_FRAME_REPORT"],"frameService:")},{"../../enumerate":65}],78:[function(t,n,i){n.exports=function(s){s=s||window;try{return s.self!==s.top}catch(o){return!0}}},{}],79:[function(t,n,i){var a,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)?(a=a||document.createElement("a"),a.href=l,d=o(a.hostname),s.hasOwnProperty(d)):!1}n.exports=c},{}],80:[function(t,n,i){n.exports=function(a){return JSON.parse(JSON.stringify(a))}},{}],81:[function(t,n,i){n.exports=function(a){return Object.keys(a).filter(function(s){return typeof a[s]=="function"})}},{}],82:[function(t,n,i){function a(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(m,f){var v=f.split("="),y=decodeURIComponent(v[0]),A=decodeURIComponent(v[1]);return m[y]=A,m},{}),p):{}}function l(u,h){var p,m,f,v=[];for(f in u)u.hasOwnProperty(f)&&(m=u[f],h?s(u)?p=h+"[]":p=h+"["+f+"]":p=f,typeof m=="object"?v.push(l(m,p)):v.push(encodeURIComponent(p)+"="+encodeURIComponent(m)));return v.join("&")}function d(u,h){return u=u||"",h!=null&&typeof h=="object"&&a(h)&&(u+=u.indexOf("?")===-1?"?":"",u+=u.indexOf("=")!==-1?"&":"",u+=l(h)),u}n.exports={parse:c,stringify:l,queryify:d,hasQueryParams:o}},{}],83:[function(t,n,i){n.exports=function(a){return a.indexOf("_")===-1?a:a.toLowerCase().replace(/(\_\w)/g,function(s){return s[1].toUpperCase()})}},{}],84:[function(t,n,i){var a=t("./querystring");function s(){return a.parse(window.location.href)}n.exports={getUrlParams:s}},{"./querystring":82}],85:[function(t,n,i){function a(s){return s?"":".min"}n.exports=a},{}],86:[function(t,n,i){var a=typeof atob=="function"?atob:s;function s(o){var c,l,d,u,h,p,m,f,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");f=0;do u=y.indexOf(o.charAt(f++)),h=y.indexOf(o.charAt(f++)),p=y.indexOf(o.charAt(f++)),m=y.indexOf(o.charAt(f++)),c=(u&63)<<2|h>>4&3,l=(h&15)<<4|p>>2&15,d=(p&3)<<6|m&63,A+=String.fromCharCode(c)+(l?String.fromCharCode(l):"")+(d?String.fromCharCode(d):"");while(f<o.length);return A}n.exports={atob:function(o){return a.call(window,o)},_atob:s}},{}],87:[function(t,n,i){var a=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},s=a(t("./venmo-desktop"));n.exports=function(c){var l=new s.default(c);return l.initialize()}},{"./venmo-desktop":89}],88:[function(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.VENMO_PAYMENT_CONTEXT_STATUS_QUERY=i.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY=i.UPDATE_PAYMENT_CONTEXT_QUERY=i.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY=i.CREATE_PAYMENT_CONTEXT_QUERY=i.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=void 0,i.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY=`mutation CreateVenmoQRCodePaymentContext($input: CreateVenmoQRCodePaymentContextInput!) {
|
|
372
372
|
createVenmoQRCodePaymentContext(input: $input) {
|
|
373
373
|
clientMutationId
|
|
374
374
|
venmoQRCodePaymentContext {
|
|
@@ -438,12 +438,12 @@
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
}`},{}],89:[function(t,n,i){var a=this&&this.__assign||function(){return a=Object.assign||function(f){for(var v,y=1,T=arguments.length;y<T;y++){v=arguments[y];for(var A in v)Object.prototype.hasOwnProperty.call(v,A)&&(f[A]=v[A])}return f},a.apply(this,arguments)},s=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(i,"__esModule",{value:!0});var o=s(t("framebus")),l=s(t("@braintree/iframer")),c=s(t("@braintree/uuid")),d=t("../shared/events"),u=t("./queries"),h=1e3,p=2e3,m=function(){function f(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 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=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 f.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)})},f.prototype.launchDesktopFlow=function(){var v=this;this.isHidden=!1;var y=new this.Promise(function(T,A){v.launchDesktopPromiseRejectFunction=A;var N=function(){v.bus.off(d.VENMO_DESKTOP_CUSTOMER_CANCELED,I),v.bus.off(d.VENMO_DESKTOP_UNKNOWN_ERROR,w)},w=function(L){N(),v.sendEvent("venmo.tokenize.desktop.unknown-error"),A({allowUIToHandleError:!1,reason:"UNKNOWN_ERROR",err:L})},I=function(){N(),v.updateVenmoDesktopPaymentContext("CANCELED"),v.sendEvent("venmo.tokenize.desktop.status-change.canceled-from-modal"),A({allowUIToHandleError:!1,reason:"CUSTOMER_CANCELED"})};v.completedHandler=function(L){N(),T(L)},v.bus.on(d.VENMO_DESKTOP_CUSTOMER_CANCELED,I),v.bus.on(d.VENMO_DESKTOP_UNKNOWN_ERROR,w)});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(T){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,T}).catch(function(T){return delete v.venmoContextId,delete v.launchDesktopPromiseRejectFunction,v.Promise.reject(T)})},f.prototype.triggerCompleted=function(v){var y=this;this.isHidden||setTimeout(function(){y.completedHandler&&y.completedHandler(v),delete y.completedHandler},p)},f.prototype.triggerRejected=function(v){this.launchDesktopPromiseRejectFunction&&this.launchDesktopPromiseRejectFunction(v)},f.prototype.hideDesktopFlow=function(){this.setAlert(""),this.iframe.style.display="none",this.bus.emit(d.VENMO_DESKTOP_CLOSED_FROM_PARENT),this.isHidden=!0},f.prototype.displayError=function(v){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_ERROR,{message:v}),this.setAlert(v))},f.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"))},f.prototype.authorize=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZE),this.setAlert("Venmo account authorized"))},f.prototype.authorizing=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZING),this.setAlert("Authorize on your Venmo app"))},f.prototype.startPolling=function(){var v=this;return this.createVenmoDesktopPaymentContext().then(function(y){var T=new Date(y.expiresAt).getTime()-new Date(y.createdAt).getTime(),A=Date.now()+T;return v.displayQRCode(y.id,y.merchantId),v.pollForStatusChange(y.status,A)}).then(function(y){if(y){var T=y.userName||"";T="@"+T.replace("@",""),v.triggerCompleted({paymentMethodNonce:y.paymentMethodId,username:T,payerInfo:y.payerInfo,id:v.venmoContextId||""})}}).catch(function(y){y.allowUIToHandleError||(v.sendEvent("venmo.tokenize.desktop.unhandled-error"),v.triggerRejected(y))})},f.prototype.pollForStatusChange=function(v,y){var T=this;return this.venmoContextId?Date.now()>y?this.updateVenmoDesktopPaymentContext("EXPIRED").then(function(){return T.displayError("Something went wrong"),T.sendEvent("venmo.tokenize.desktop.status-change.sdk-timeout"),T.Promise.reject({allowUIToHandleError:!0,reason:"TIMEOUT"})}):this.lookupVenmoDesktopPaymentContext().then(function(A){if(!T.venmoContextId||!A)return T.Promise.resolve();var N=A.status;if(N!==v)switch(v=N,T.sendEvent("venmo.tokenize.desktop.status-change."+v.toLowerCase()),v){case"CREATED":break;case"EXPIRED":case"FAILED":case"CANCELED":var w=v==="CANCELED"?"The authorization was canceled":"Something went wrong";return T.displayError(w),T.Promise.reject({allowUIToHandleError:!0,reason:v});case"SCANNED":T.authorizing();break;case"APPROVED":return T.authorize(),T.Promise.resolve(A)}return new T.Promise(function(I,L){setTimeout(function(){T.pollForStatusChange(v,y).then(I).catch(L)},h)})}):this.Promise.resolve()},f.prototype.teardown=function(){this.bus.teardown(),this.iframe.parentNode&&this.iframe.parentNode.removeChild(this.iframe),this.alertBox.parentNode&&this.alertBox.parentNode.removeChild(this.alertBox)},f.prototype.setAlert=function(v){this.alertBox.style.display=v?"block":"none",this.alertBox.textContent=v},f.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})},f.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(T){return T.createVenmoPaymentContext.venmoPaymentContext})},f.prototype.createVenmoDesktopPaymentContext=function(){var v=this,y=this.shouldUseLegacyQRCodeMutation?this.createPaymentContextFromGraphqlLegacyQRCodeMutation("PAY_FROM_APP"):this.createPaymentContextFromGraphQL("PAY_FROM_APP");return y.then(function(T){v.venmoContextId=T.id;var A=v.profileId||T.merchantId;return{id:T.id,status:T.status,merchantId:A,createdAt:T.createdAt,expiresAt:T.expiresAt}})},f.prototype.updateVenmoDesktopPaymentContext=function(v,y){if(y===void 0&&(y={}),!this.venmoContextId)return this.Promise.resolve();var T={input:a({id:this.venmoContextId,status:v},y)},A=this.shouldUseLegacyQRCodeMutation?u.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:u.UPDATE_PAYMENT_CONTEXT_QUERY;return this.apiRequest(A,T).then(function(){})},f.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})},f}();i.default=m},{"../shared/events":94,"./queries":88,"@braintree/iframer":27,"@braintree/uuid":31,framebus:38}],90:[function(t,n,i){var a=t("../lib/analytics"),s=t("../lib/basic-component-verification"),o=t("../lib/create-deferred-client"),l=t("../lib/create-assets-url"),c=t("./shared/errors"),d=t("@braintree/wrap-promise"),u=t("../lib/braintree-error"),h=t("./venmo"),p=t("./shared/supports-venmo"),m="3.126.0";function f(y){var T="Venmo";return s.verify({name:T,client:y.client,authorization:y.authorization}).then(function(){var A,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)):(A=o.create({authorization:y.authorization,client:y.client,debug:y.debug,assetsUrl:l.create(y.authorization),name:T}).then(function(w){var I=w.getConfiguration();return y.client=w,I.gatewayConfiguration.payWithVenmo?w:Promise.reject(new u(c.VENMO_NOT_ENABLED))}),y.createPromise=A,N=new h(y),a.sendEvent(A,"venmo.initialized"),A.then(function(){return N}))})}function v(y){return p.isBrowserSupported(y)}n.exports={create:d(f),isBrowserSupported:v,VERSION:m}},{"../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(t,n,i){var a=t("@braintree/browser-detection/is-android"),s=t("@braintree/browser-detection/is-chrome"),o=t("@braintree/browser-detection/is-ios"),l=t("@braintree/browser-detection/is-ios-safari"),c=t("@braintree/browser-detection/is-ios-webview"),d=t("@braintree/browser-detection/is-samsung");function u(){return a()&&window.navigator.userAgent.toLowerCase().indexOf("wv")>-1}function h(){return o()?c()||!l():!1}function p(){var f=window.navigator.userAgent.toLowerCase();return f.indexOf("huawei")>-1&&f.indexOf("fban")>-1?!0:a()?f.indexOf("fb_iab")>-1||f.indexOf("instagram")>-1:!1}function m(){return o()&&s()}n.exports={isAndroid:a,isAndroidWebview:u,isChrome:s,isIos:o,isIosChrome:m,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(t,n,i){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(t,n,i){var a=t("../../lib/braintree-error");n.exports={VENMO_NOT_ENABLED:{type:a.types.MERCHANT,code:"VENMO_NOT_ENABLED",message:"Venmo is not enabled for this merchant."},VENMO_TOKENIZATION_REQUEST_ACTIVE:{type:a.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_ACTIVE",message:"Another tokenization request is active."},VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE:{type:a.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE",message:"No tokenization in progress."},VENMO_APP_FAILED:{type:a.types.UNKNOWN,code:"VENMO_APP_FAILED",message:"Venmo app encountered a problem."},VENMO_APP_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_APP_CANCELED",message:"Venmo app authorization was canceled."},VENMO_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_CANCELED",message:"User canceled Venmo authorization, or Venmo app is not available."},VENMO_CUSTOMER_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_CUSTOMER_CANCELED",message:"User canceled Venmo authorization."},VENMO_NETWORK_ERROR:{type:a.types.NETWORK,code:"VENMO_NETWORK_ERROR",message:"Something went wrong making the request"},VENMO_DESKTOP_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_DESKTOP_CANCELED",message:"User canceled Venmo authorization by closing the Venmo Desktop modal."},VENMO_TOKENIZATION_CANCELED_BY_MERCHANT:{type:a.types.MERCHANT,code:"VENMO_TOKENIZATION_CANCELED_BY_MERCHANT",message:"The Venmo tokenization was canceled by the merchant."},VENMO_DESKTOP_UNKNOWN_ERROR:{type:a.types.UNKNOWN,code:"VENMO_DESKTOP_UNKNOWN_ERROR",message:"Something went wrong with the Venmo Desktop flow."},VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED:{type:a.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:a.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR",message:"Something went wrong during mobile polling."},VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED:{type:a.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED",message:"The Venmo authorization request is expired."},VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED",message:"The Venmo authorization was canceled"},VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT:{type:a.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:a.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID",message:"No Venmo payment context ID available."},VENMO_MOBILE_POLLING_TOKENIZATION_FAILED:{type:a.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_FAILED",message:"The Venmo authorization failed."},VENMO_INVALID_PROFILE_ID:{type:a.types.MERCHANT,code:"VENMO_INVALID_PROFILE_ID",message:"Venmo profile ID is invalid."},VENMO_INVALID_DEEP_LINK_RETURN_URL:{type:a.types.MERCHANT,code:"VENMO_INVALID_DEEP_LINK_RETURN_URL",message:"Venmo deep link return URL is invalid."},VENMO_TOKENIZATION_FAILED:{type:a.types.UNKNOWN,code:"VENMO_TOKENIZATION_FAILED",message:"Venmo encountered a problem"},VENMO_ECD_DISABLED:{type:a.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(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.VENMO_DESKTOP_UNKNOWN_ERROR=i.VENMO_DESKTOP_REQUEST_NEW_QR_CODE=i.VENMO_DESKTOP_CLOSED_FROM_PARENT=i.VENMO_DESKTOP_IFRAME_READY=i.VENMO_DESKTOP_DISPLAY_QR_CODE=i.VENMO_DESKTOP_DISPLAY_ERROR=i.VENMO_DESKTOP_CUSTOMER_CANCELED=i.VENMO_DESKTOP_AUTHORIZING=i.VENMO_DESKTOP_AUTHORIZE=i.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT=void 0,i.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT="VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT",i.VENMO_DESKTOP_AUTHORIZE="VENMO_DESKTOP_AUTHORIZE",i.VENMO_DESKTOP_AUTHORIZING="VENMO_DESKTOP_AUTHORIZING",i.VENMO_DESKTOP_CUSTOMER_CANCELED="VENMO_DESKTOP_CUSTOMER_CANCELED",i.VENMO_DESKTOP_DISPLAY_ERROR="VENMO_DESKTOP_DISPLAY_ERROR",i.VENMO_DESKTOP_DISPLAY_QR_CODE="VENMO_DESKTOP_DISPLAY_QR_CODE",i.VENMO_DESKTOP_IFRAME_READY="VENMO_DESKTOP_IFRAME_READY",i.VENMO_DESKTOP_CLOSED_FROM_PARENT="VENMO_DESKTOP_CLOSED_FROM_PARENT",i.VENMO_DESKTOP_REQUEST_NEW_QR_CODE="VENMO_DESKTOP_REQUEST_NEW_QR_CODE",i.VENMO_DESKTOP_UNKNOWN_ERROR="VENMO_DESKTOP_UNKNOWN_ERROR"},{}],95:[function(t,n,i){var a=t("./constants");function s(o){return o.useAllowDesktopWebLogin?a.VENMO_WEB_LOGIN_URL:o.mobileWebFallBack?a.VENMO_APP_OR_MOBILE_AUTH_URL:a.VENMO_MOBILE_APP_AUTH_ONLY_URL}n.exports=s},{"./constants":92}],96:[function(t,n,i){var a=t("./browser-detection"),s=t("../../lib/in-iframe");function o(l){var c,d,u,h,p,m=a.isAndroid(),f=m||a.isIos(),v=m&&a.isChrome(),y=a.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&&!s(),c=!u&&a.isIosChrome()||a.isFacebookOwnedBrowserOnAndroid()||a.isSamsung(),c||!p&&(a.isAndroidWebview()||a.isIosWebview())?!1:f?h?f:y:d}n.exports={isBrowserSupported:o}},{"../../lib/in-iframe":78,"./browser-detection":91}],97:[function(t,n,i){var a=t("../../lib/frame-service/external"),s=t("../../lib/use-min"),o=t("@braintree/extended-promise"),l=t("../shared/errors"),c=t("../../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">
|
|
441
|
+
}`},{}],89:[function(t,n,i){var a=this&&this.__assign||function(){return a=Object.assign||function(f){for(var v,y=1,A=arguments.length;y<A;y++){v=arguments[y];for(var T in v)Object.prototype.hasOwnProperty.call(v,T)&&(f[T]=v[T])}return f},a.apply(this,arguments)},s=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(i,"__esModule",{value:!0});var o=s(t("framebus")),c=s(t("@braintree/iframer")),l=s(t("@braintree/uuid")),d=t("../shared/events"),u=t("./queries"),h=1e3,p=2e3,m=function(){function f(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 f.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)})},f.prototype.launchDesktopFlow=function(){var v=this;this.isHidden=!1;var y=new this.Promise(function(A,T){v.launchDesktopPromiseRejectFunction=T;var N=function(){v.bus.off(d.VENMO_DESKTOP_CUSTOMER_CANCELED,I),v.bus.off(d.VENMO_DESKTOP_UNKNOWN_ERROR,w)},w=function(L){N(),v.sendEvent("venmo.tokenize.desktop.unknown-error"),T({allowUIToHandleError:!1,reason:"UNKNOWN_ERROR",err:L})},I=function(){N(),v.updateVenmoDesktopPaymentContext("CANCELED"),v.sendEvent("venmo.tokenize.desktop.status-change.canceled-from-modal"),T({allowUIToHandleError:!1,reason:"CUSTOMER_CANCELED"})};v.completedHandler=function(L){N(),A(L)},v.bus.on(d.VENMO_DESKTOP_CUSTOMER_CANCELED,I),v.bus.on(d.VENMO_DESKTOP_UNKNOWN_ERROR,w)});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)})},f.prototype.triggerCompleted=function(v){var y=this;this.isHidden||setTimeout(function(){y.completedHandler&&y.completedHandler(v),delete y.completedHandler},p)},f.prototype.triggerRejected=function(v){this.launchDesktopPromiseRejectFunction&&this.launchDesktopPromiseRejectFunction(v)},f.prototype.hideDesktopFlow=function(){this.setAlert(""),this.iframe.style.display="none",this.bus.emit(d.VENMO_DESKTOP_CLOSED_FROM_PARENT),this.isHidden=!0},f.prototype.displayError=function(v){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_DISPLAY_ERROR,{message:v}),this.setAlert(v))},f.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"))},f.prototype.authorize=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZE),this.setAlert("Venmo account authorized"))},f.prototype.authorizing=function(){this.isHidden||(this.bus.emit(d.VENMO_DESKTOP_AUTHORIZING),this.setAlert("Authorize on your Venmo app"))},f.prototype.startPolling=function(){var v=this;return this.createVenmoDesktopPaymentContext().then(function(y){var A=new Date(y.expiresAt).getTime()-new Date(y.createdAt).getTime(),T=Date.now()+A;return v.displayQRCode(y.id,y.merchantId),v.pollForStatusChange(y.status,T)}).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))})},f.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(T){if(!A.venmoContextId||!T)return A.Promise.resolve();var N=T.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 w=v==="CANCELED"?"The authorization was canceled":"Something went wrong";return A.displayError(w),A.Promise.reject({allowUIToHandleError:!0,reason:v});case"SCANNED":A.authorizing();break;case"APPROVED":return A.authorize(),A.Promise.resolve(T)}return new A.Promise(function(I,L){setTimeout(function(){A.pollForStatusChange(v,y).then(I).catch(L)},h)})}):this.Promise.resolve()},f.prototype.teardown=function(){this.bus.teardown(),this.iframe.parentNode&&this.iframe.parentNode.removeChild(this.iframe),this.alertBox.parentNode&&this.alertBox.parentNode.removeChild(this.alertBox)},f.prototype.setAlert=function(v){this.alertBox.style.display=v?"block":"none",this.alertBox.textContent=v},f.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})},f.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})},f.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 T=v.profileId||A.merchantId;return{id:A.id,status:A.status,merchantId:T,createdAt:A.createdAt,expiresAt:A.expiresAt}})},f.prototype.updateVenmoDesktopPaymentContext=function(v,y){if(y===void 0&&(y={}),!this.venmoContextId)return this.Promise.resolve();var A={input:a({id:this.venmoContextId,status:v},y)},T=this.shouldUseLegacyQRCodeMutation?u.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:u.UPDATE_PAYMENT_CONTEXT_QUERY;return this.apiRequest(T,A).then(function(){})},f.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})},f}();i.default=m},{"../shared/events":94,"./queries":88,"@braintree/iframer":27,"@braintree/uuid":31,framebus:38}],90:[function(t,n,i){var a=t("../lib/analytics"),s=t("../lib/basic-component-verification"),o=t("../lib/create-deferred-client"),c=t("../lib/create-assets-url"),l=t("./shared/errors"),d=t("@braintree/wrap-promise"),u=t("../lib/braintree-error"),h=t("./venmo"),p=t("./shared/supports-venmo"),m="3.126.0";function f(y){var A="Venmo";return s.verify({name:A,client:y.client,authorization:y.authorization}).then(function(){var T,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)):(T=o.create({authorization:y.authorization,client:y.client,debug:y.debug,assetsUrl:c.create(y.authorization),name:A}).then(function(w){var I=w.getConfiguration();return y.client=w,I.gatewayConfiguration.payWithVenmo?w:Promise.reject(new u(l.VENMO_NOT_ENABLED))}),y.createPromise=T,N=new h(y),a.sendEvent(T,"venmo.initialized"),T.then(function(){return N}))})}function v(y){return p.isBrowserSupported(y)}n.exports={create:d(f),isBrowserSupported:v,VERSION:m}},{"../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(t,n,i){var a=t("@braintree/browser-detection/is-android"),s=t("@braintree/browser-detection/is-chrome"),o=t("@braintree/browser-detection/is-ios"),c=t("@braintree/browser-detection/is-ios-safari"),l=t("@braintree/browser-detection/is-ios-webview"),d=t("@braintree/browser-detection/is-samsung");function u(){return a()&&window.navigator.userAgent.toLowerCase().indexOf("wv")>-1}function h(){return o()?l()||!c():!1}function p(){var f=window.navigator.userAgent.toLowerCase();return f.indexOf("huawei")>-1&&f.indexOf("fban")>-1?!0:a()?f.indexOf("fb_iab")>-1||f.indexOf("instagram")>-1:!1}function m(){return o()&&s()}n.exports={isAndroid:a,isAndroidWebview:u,isChrome:s,isIos:o,isIosChrome:m,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(t,n,i){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(t,n,i){var a=t("../../lib/braintree-error");n.exports={VENMO_NOT_ENABLED:{type:a.types.MERCHANT,code:"VENMO_NOT_ENABLED",message:"Venmo is not enabled for this merchant."},VENMO_TOKENIZATION_REQUEST_ACTIVE:{type:a.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_ACTIVE",message:"Another tokenization request is active."},VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE:{type:a.types.MERCHANT,code:"VENMO_TOKENIZATION_REQUEST_NOT_ACTIVE",message:"No tokenization in progress."},VENMO_APP_FAILED:{type:a.types.UNKNOWN,code:"VENMO_APP_FAILED",message:"Venmo app encountered a problem."},VENMO_APP_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_APP_CANCELED",message:"Venmo app authorization was canceled."},VENMO_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_CANCELED",message:"User canceled Venmo authorization, or Venmo app is not available."},VENMO_CUSTOMER_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_CUSTOMER_CANCELED",message:"User canceled Venmo authorization."},VENMO_NETWORK_ERROR:{type:a.types.NETWORK,code:"VENMO_NETWORK_ERROR",message:"Something went wrong making the request"},VENMO_DESKTOP_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_DESKTOP_CANCELED",message:"User canceled Venmo authorization by closing the Venmo Desktop modal."},VENMO_TOKENIZATION_CANCELED_BY_MERCHANT:{type:a.types.MERCHANT,code:"VENMO_TOKENIZATION_CANCELED_BY_MERCHANT",message:"The Venmo tokenization was canceled by the merchant."},VENMO_DESKTOP_UNKNOWN_ERROR:{type:a.types.UNKNOWN,code:"VENMO_DESKTOP_UNKNOWN_ERROR",message:"Something went wrong with the Venmo Desktop flow."},VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED:{type:a.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:a.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NETWORK_ERROR",message:"Something went wrong during mobile polling."},VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED:{type:a.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_EXPIRED",message:"The Venmo authorization request is expired."},VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED:{type:a.types.CUSTOMER,code:"VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED",message:"The Venmo authorization was canceled"},VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT:{type:a.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:a.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID",message:"No Venmo payment context ID available."},VENMO_MOBILE_POLLING_TOKENIZATION_FAILED:{type:a.types.UNKNOWN,code:"VENMO_MOBILE_POLLING_TOKENIZATION_FAILED",message:"The Venmo authorization failed."},VENMO_INVALID_PROFILE_ID:{type:a.types.MERCHANT,code:"VENMO_INVALID_PROFILE_ID",message:"Venmo profile ID is invalid."},VENMO_INVALID_DEEP_LINK_RETURN_URL:{type:a.types.MERCHANT,code:"VENMO_INVALID_DEEP_LINK_RETURN_URL",message:"Venmo deep link return URL is invalid."},VENMO_TOKENIZATION_FAILED:{type:a.types.UNKNOWN,code:"VENMO_TOKENIZATION_FAILED",message:"Venmo encountered a problem"},VENMO_ECD_DISABLED:{type:a.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(t,n,i){Object.defineProperty(i,"__esModule",{value:!0}),i.VENMO_DESKTOP_UNKNOWN_ERROR=i.VENMO_DESKTOP_REQUEST_NEW_QR_CODE=i.VENMO_DESKTOP_CLOSED_FROM_PARENT=i.VENMO_DESKTOP_IFRAME_READY=i.VENMO_DESKTOP_DISPLAY_QR_CODE=i.VENMO_DESKTOP_DISPLAY_ERROR=i.VENMO_DESKTOP_CUSTOMER_CANCELED=i.VENMO_DESKTOP_AUTHORIZING=i.VENMO_DESKTOP_AUTHORIZE=i.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT=void 0,i.VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT="VENMO_DESKTOP_AUTHORIZATION_TIMED_OUT",i.VENMO_DESKTOP_AUTHORIZE="VENMO_DESKTOP_AUTHORIZE",i.VENMO_DESKTOP_AUTHORIZING="VENMO_DESKTOP_AUTHORIZING",i.VENMO_DESKTOP_CUSTOMER_CANCELED="VENMO_DESKTOP_CUSTOMER_CANCELED",i.VENMO_DESKTOP_DISPLAY_ERROR="VENMO_DESKTOP_DISPLAY_ERROR",i.VENMO_DESKTOP_DISPLAY_QR_CODE="VENMO_DESKTOP_DISPLAY_QR_CODE",i.VENMO_DESKTOP_IFRAME_READY="VENMO_DESKTOP_IFRAME_READY",i.VENMO_DESKTOP_CLOSED_FROM_PARENT="VENMO_DESKTOP_CLOSED_FROM_PARENT",i.VENMO_DESKTOP_REQUEST_NEW_QR_CODE="VENMO_DESKTOP_REQUEST_NEW_QR_CODE",i.VENMO_DESKTOP_UNKNOWN_ERROR="VENMO_DESKTOP_UNKNOWN_ERROR"},{}],95:[function(t,n,i){var a=t("./constants");function s(o){return o.useAllowDesktopWebLogin?a.VENMO_WEB_LOGIN_URL:o.mobileWebFallBack?a.VENMO_APP_OR_MOBILE_AUTH_URL:a.VENMO_MOBILE_APP_AUTH_ONLY_URL}n.exports=s},{"./constants":92}],96:[function(t,n,i){var a=t("./browser-detection"),s=t("../../lib/in-iframe");function o(c){var l,d,u,h,p,m=a.isAndroid(),f=m||a.isIos(),v=m&&a.isChrome(),y=a.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&&a.isIosChrome()||a.isFacebookOwnedBrowserOnAndroid()||a.isSamsung(),l||!p&&(a.isAndroidWebview()||a.isIosWebview())?!1:f?h?f:y:d}n.exports={isBrowserSupported:o}},{"../../lib/in-iframe":78,"./browser-detection":91}],97:[function(t,n,i){var a=t("../../lib/frame-service/external"),s=t("../../lib/use-min"),o=t("@braintree/extended-promise"),c=t("../shared/errors"),l=t("../../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">
|
|
442
442
|
<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"/>
|
|
443
443
|
<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"/>
|
|
444
444
|
<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"/>
|
|
445
445
|
<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"/>
|
|
446
446
|
<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"/>
|
|
447
|
-
</svg>`,h="Tap cancel payment to cancel and return to the business. Continue payment will relaunch the payment window.",p=400,m=570,f={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(L){var S=L.frameServiceInstance,B=L.venmoUrl,G=L.checkForStatusChange,q=L.cancelTokenization,M=L.checkPaymentContextStatus,F=new o;return document.getElementById(f.continueButton).addEventListener("click",function(){S.focus()}),document.getElementById(f.cancelButton).addEventListener("click",function(){S.close(),q(),
|
|
448
|
-
`)}function N(L){var S=document.getElementById(f.backdrop),B,G,q,M,F,K,J,R;if(S){S.classList.remove("hidden");return}B=document.createElement("style"),G=document.createElement("div"),q=document.createElement("div"),M=document.createElement("div"),F=document.createElement("div"),K=document.createElement("div"),J=document.createElement("button"),R=document.createElement("button"),L&&(B.nonce=L),B.id="venmo-desktop-web__injected-styles",B.innerHTML=A(),G.id=f.backdrop,q.id=f.backdropContainer,M.id=f.venmoLogo,M.innerHTML=u,F.id=f.message,F.innerText="What would you like to do?",K.id=f.instructions,K.innerText=h,J.id=f.continueButton,J.innerText="Continue payment",R.id=f.cancelButton,R.innerText="Cancel payment",document.head.appendChild(B),q.appendChild(M),q.appendChild(F),q.appendChild(K),q.appendChild(J),q.appendChild(R),G.appendChild(q),document.body.appendChild(G),G.addEventListener("click",function(W){W.stopPropagation()})}function w(L){return N(L.styleCspNonce),v(L)}function I(L){var S=new o,B="venmoDesktopWebLogin",G=L.assetsUrl,q=L.debug||!1,M=y(),F=G+"/web/"+d+"/html";return a.create({name:B,dispatchFrameUrl:F+"/dispatch-frame"+s(q)+".html",openFrameUrl:F+"/venmo-landing-frame"+s(q)+".html",top:M.top,left:M.left,height:m,width:p},function(K){S.resolve(K)}),S}n.exports={runWebLogin:w,openPopup:v,setupDesktopWebLogin:I,POPUP_WIDTH:p,POPUP_HEIGHT:m}},{"../../lib/braintree-error":59,"../../lib/frame-service/external":68,"../../lib/use-min":85,"../shared/errors":93,"@braintree/extended-promise":26}],98:[function(t,n,i){var a=t("../lib/analytics"),s=t("../lib/assign").assign,o=t("./shared/supports-venmo"),l=t("./shared/browser-detection"),c=t("./shared/constants"),d=t("./shared/errors"),u=t("../lib/querystring"),h=t("../lib/is-verified-domain"),p=t("../lib/methods"),m=t("../lib/convert-methods-to-error"),f=t("@braintree/wrap-promise"),v=t("../lib/braintree-error"),y=t("../lib/in-iframe"),T=t("@braintree/extended-promise"),A=t("./shared/get-venmo-url"),N=t("./shared/web-login-backdrop"),w=t("../lib/snake-case-to-camel-case"),I=t("../lib/url-params"),L=t("./external/"),S=t("./external/queries"),B="3.126.0",G=250,q=3e5;T.suppressUnhandledPromiseMessage=!0;function M(g){var _=this;this._allowDesktopWebLogin=g.allowDesktopWebLogin||!1,this._mobileWebFallBack=g.mobileWebFallBack||!1,this._createPromise=g.createPromise,this._allowNewBrowserTab=g.allowNewBrowserTab!==!1,this._allowWebviews=g.allowWebviews!==!1,this._allowDesktop=g.allowDesktop===!0,this._useRedirectForIOS=g.useRedirectForIOS===!0,this._profileId=g.profileId,this._displayName=g.displayName,this._deepLinkReturnUrl=g.deepLinkReturnUrl,this._ignoreHistoryChanges=g.ignoreHistoryChanges,this._paymentMethodUsage=(g.paymentMethodUsage||"").toUpperCase(),this._shouldUseLegacyFlow=!this._paymentMethodUsage,this._requireManualReturn=g.requireManualReturn===!0,this._useDesktopQRFlow=this._allowDesktop&&this._isDesktop()&&!this._allowDesktopWebLogin,this._useAllowDesktopWebLogin=this._allowDesktopWebLogin&&this._isDesktop(),this._cannotHaveReturnUrls=y()||this._requireManualReturn,this._allowAndroidRecreation=g.allowAndroidRecreation!==!1,this._maxRetryCount=3,this._collectCustomerBillingAddress=g.collectCustomerBillingAddress||!1,this._collectCustomerShippingAddress=g.collectCustomerShippingAddress||!1,this._isFinalAmount=g.isFinalAmount||!1,this._lineItems=g.lineItems,this._subTotalAmount=g.subTotalAmount,this._discountAmount=g.discountAmount,this._taxAmount=g.taxAmount,this._shippingAmount=g.shippingAmount,this._totalAmount=g.totalAmount,this._cspNonce=(this._mobileWebFallBack||this._allowDesktopWebLogin)&&(g.styleCspNonce||!1),this._shouldCreateVenmoPaymentContext=this._cannotHaveReturnUrls||!this._shouldUseLegacyFlow,a.sendEvent(this._createPromise,"venmo.desktop-flow.configured."+String(!!this._allowDesktop)),this.hasTokenizationResult()?a.sendEvent(this._createPromise,"venmo.appswitch.return-in-new-tab"):this._useDesktopQRFlow?this._createPromise=this._createPromise.then(function(k){var U=k.getConfiguration().gatewayConfiguration;return L({url:U.assetsUrl+"/web/"+B+"/html/venmo-desktop-frame.html",environment:U.environment==="production"?"PRODUCTION":"SANDBOX",profileId:_._profileId||U.payWithVenmo.merchantId,paymentMethodUsage:_._paymentMethodUsage,displayName:_._displayName,Promise,apiRequest:function(E,x){return k.request({api:"graphQLApi",data:{query:E,variables:x}}).then(function(C){return C.data})},sendEvent:function(E){a.sendEvent(_._createPromise,E)},verifyDomain:h}).then(function(E){return _._venmoDesktopInstance=E,a.sendEvent(_._createPromise,"venmo.desktop-flow.presented"),k}).catch(function(){return a.sendEvent(_._createPromise,"venmo.desktop-flow.setup-failed"),_._useDesktopQRFlow=!1,k})}):this._shouldCreateVenmoPaymentContext&&(this._mobilePollingInterval=G,this._mobilePollingExpiresThreshold=q,this._createPromise=this._createPromise.then(function(k){var U,E,x=_._cannotHaveReturnUrls?"manual-return":"mobile-payment-context",C=k.getConfiguration();return E=N.setupDesktopWebLogin({assetsUrl:C.gatewayConfiguration.assetsUrl,debug:C.isDebug}).then(function(P){_._frameServiceInstance=P}).catch(function(P){return P}),_._mobilePollingContextEnvironment=C.gatewayConfiguration.environment.toUpperCase(),U=_._createVenmoPaymentContext(k).then(function(){return a.sendEvent(_._createPromise,"venmo."+x+".presented"),k}).catch(function(P){return a.sendEvent(_._createPromise,"venmo."+x+".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:F(P)?P.details.originalError[0].message:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.message,details:{originalError:P}}))}),T.all([E,U]).then(function(P){var V=P[1];return Promise.resolve(V)}).catch(function(P){return Promise.reject(P)})}))}function F(g){return g.details&&g.details.originalError&&g.details.originalError[0]&&g.details.originalError[0].extensions&&g.details.originalError[0].extensions.errorClass==="VALIDATION"&&g.details.originalError[0].extensions.errorType==="user_error"}M.prototype._createVenmoPaymentContext=function(g,_){var k=this,U,E,x=g.getConfiguration(),C=x.gatewayConfiguration.payWithVenmo,P=!1,V=k._useAllowDesktopWebLogin?"NATIVE_WEB":"MOBILE_WEB";if(!this._shouldCreateVenmoPaymentContext)return Promise.resolve();if(this._shouldUseLegacyFlow)U=g.request({api:"graphQLApi",data:{query:S.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{environment:this._mobilePollingContextEnvironment,intent:"PAY_FROM_APP"}}}}).then(function(O){return O.data.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext});else{if((this._collectCustomerBillingAddress||this._collectCustomerShippingAddress)&&!C.enrichedCustomerDataEnabled)return Promise.reject(new v(d.VENMO_ECD_DISABLED));this._lineItems&&this._lineItems.forEach(function(O){O.unitTaxAmount=O.unitTaxAmount||"0"}),E={subTotalAmount:this._subTotalAmount,discountAmount:this._discountAmount,taxAmount:this._taxAmount,shippingAmount:this._shippingAmount,totalAmount:this._totalAmount,lineItems:this._lineItems},P=Object.keys(E).some(function(O){return E[O]!==void 0}),U=g.request({api:"graphQLApi",data:{query:S.CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{paymentMethodUsage:this._paymentMethodUsage,intent:"CONTINUE",customerClient:V,isFinalAmount:this._isFinalAmount,displayName:this._displayName,paysheetDetails:{collectCustomerBillingAddress:this._collectCustomerBillingAddress,collectCustomerShippingAddress:this._collectCustomerShippingAddress,transactionDetails:P?E:void 0}}}}}).then(function(O){return O.data.createVenmoPaymentContext.venmoPaymentContext})}return U.then(function(O){var H=new Date(O.expiresAt)-new Date(O.createdAt),X=H*.6666;clearTimeout(k._refreshPaymentContextTimeout),k._refreshPaymentContextTimeout=setTimeout(function(){k._tokenizationInProgress||k._createVenmoPaymentContext(g,!0)},X),!(_&&k._tokenizationInProgress)&&(k._venmoPaymentContextStatus=O.status,k._venmoPaymentContextId=O.id)})},M.prototype._popupBridgeIsInstalled=function(){return window.popupBridge&&typeof window.popupBridge.open=="function"},M.prototype._venmoNativeAppIsInstalled=function(){return!!(window.popupBridge&&(window.parent&&window.parent.popupBridge.isVenmoInstalled||window.popupBridge.isVenmoInstalled))},M.prototype._handleDeepLinkAppSwitch=function(g){j()?this._handleIosWebviewDeepLink(g):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):(a.sendEvent(this._createPromise,"venmo.appswitch.start.webview"),this._venmoWindow=window.open(g))},M.prototype._handleIosWebviewDeepLink=function(g){a.sendEvent(this._createPromise,"venmo.appswitch.start.ios-webview"),y()?this._handleIosWebviewInIframe(g):!this._venmoNativeAppIsInstalled()&&this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):window.location.href=g},M.prototype._handleIosWebviewInIframe=function(g){this._venmoNativeAppIsInstalled()?this._handleIFrameBreakout(g):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):this._handleIFrameBreakout(g)},M.prototype._handlePopupBridgeAppSwitch=function(g){a.sendEvent(this._createPromise,"venmo.appswitch.start.popup-bridge"),window.popupBridge.open(g)},M.prototype._handleBrowserAppSwitch=function(g){a.sendEvent(this._createPromise,"venmo.appswitch.start.browser"),l.doesNotSupportWindowOpenInIos()||this._shouldUseRedirectStrategy()||this._mobileWebFallBack&&l.isAndroid()&&l.isChrome()?window.location.href=g:this._venmoWindow=window.open(g)},M.prototype._handleIFrameBreakout=function(g){window.top.location.href=g},M.prototype.appSwitch=function(g){this._deepLinkReturnUrl?this._handleDeepLinkAppSwitch(g):this._handleBrowserAppSwitch(g)},M.prototype.getUrl=function(){return this._createPromise.then(function(g){var _=g.getConfiguration(),k={},U=this._deepLinkReturnUrl||window.location.href.replace(window.location.hash,""),E=_.gatewayConfiguration.payWithVenmo,x=_.analyticsMetadata,C=E.accessToken,P={_meta:{version:x.sdkVersion,integration:x.integration,platform:x.platform,sessionId:x.sessionId}};return this._isDebug=_.isDebug,this._assetsUrl=_.gatewayConfiguration.assetsUrl,U=U.replace(/#*$/,""),this._venmoPaymentContextId&&(this._shouldUseLegacyFlow?C+="|pcid:"+this._venmoPaymentContextId:k.resource_id=this._venmoPaymentContextId),this._shouldIncludeReturnUrls()||this._useAllowDesktopWebLogin?(this._useAllowDesktopWebLogin&&(U=this._assetsUrl+"/web/"+B+"/html/redirect-frame.html"),k["x-success"]=U+"#venmoSuccess=1",k["x-cancel"]=U+"#venmoCancel=1",k["x-error"]=U+"#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||E.merchantId,k.braintree_access_token=C,k.braintree_environment=E.environment,k.braintree_sdk_data=btoa(JSON.stringify(P)),A({useAllowDesktopWebLogin:this._useAllowDesktopWebLogin,mobileWebFallBack:this._mobileWebFallBack})+"?"+u.stringify(k)}.bind(this))},M.prototype.isBrowserSupported=function(){return o.isBrowserSupported({allowNewBrowserTab:this._allowNewBrowserTab,allowWebviews:this._allowWebviews,allowDesktop:this._allowDesktop,allowDesktopWebLogin:this._allowDesktopWebLogin})},M.prototype.hasTokenizationResult=function(){return this._hasTokenizationResult()},M.prototype._hasTokenizationResult=function(g){var _=K(g),k=I.getUrlParams();return k.resource_id?this._venmoPaymentContextId=k.resource_id:_.id&&(this._venmoPaymentContextId=_.id),typeof(_.venmoSuccess||_.venmoError||_.venmoCancel)!="undefined"},M.prototype._shouldIncludeReturnUrls=function(){return this._deepLinkReturnUrl?!0:!this._cannotHaveReturnUrls},M.prototype._isDesktop=function(){return!(l.isIos()||l.isAndroid())},M.prototype.tokenize=function(g){var _=this,k;return g=g||{},this._tokenizationInProgress===!0?Promise.reject(new v(d.VENMO_TOKENIZATION_REQUEST_ACTIVE)):(this._tokenizationInProgress=!0,this._useDesktopQRFlow?k=this._tokenizeForDesktopQRFlow(g):this._useAllowDesktopWebLogin?k=this._tokenizeWebLoginWithRedirect(g):this._cannotHaveReturnUrls?k=this._tokenizeForMobileWithManualReturn():k=this._tokenizeForMobileWithHashChangeListeners(g),k.then(function(U){return _._createPromise.then(function(E){return _._createVenmoPaymentContext(E)}).then(function(){return _._tokenizationInProgress=!1,_._venmoWindow=null,R(U)})}).catch(function(U){return _._createPromise.then(function(E){return _._createVenmoPaymentContext(E)}).then(function(){return _._tokenizationInProgress=!1,_._venmoWindow=null,Promise.reject(U)})}))},M.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))},M.prototype._tokenizeWebLoginWithRedirect=function(){var g=this,_;return a.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.start",{context_id:g._venmoPaymentContextId}),this._tokenizePromise=new T,this.getUrl().then(function(k){return _={checkForStatusChange:g._checkPaymentContextStatusAndProcessResult.bind(g),cancelTokenization:g.cancelTokenization.bind(g),frameServiceInstance:g._frameServiceInstance,venmoUrl:k,debug:g._isDebug,checkPaymentContextStatus:g._checkPaymentContextStatus.bind(g)},g._cspNonce&&(_=s({},_,{styleCspNonce:g._cspNonce})),N.runWebLogin(_).then(function(U){a.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.success",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.resolve({paymentMethodNonce:U.paymentMethodId,username:U.userName,payerInfo:U.payerInfo,id:g._venmoPaymentContextId})}).catch(function(U){a.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.failure",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.reject(U)}),g._tokenizePromise})},M.prototype._queryPaymentContextStatus=function(g){var _=this;return this._createPromise.then(function(k){var U=_._shouldUseLegacyFlow?S.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:S.VENMO_PAYMENT_CONTEXT_STATUS_QUERY;return k.request({api:"graphQLApi",data:{query:U,variables:{id:g}}})}).then(function(k){return k.data.node})},M.prototype._checkPaymentContextStatusAndProcessResult=function(g){var _=this;return _._checkPaymentContextStatus().then(function(k){var U=k.status;if(U!==_._venmoPaymentContextStatus)switch(_._venmoPaymentContextStatus=U,a.sendEventPlus(_._createPromise,"venmo.tokenize.web-login.status-change",{context_id:_._venmoPaymentContextId}),U){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(E,x){g<_._maxRetryCount?(g++,_._checkPaymentContextStatusAndProcessResult(g).then(E).catch(x)):x(new v(d.VENMO_TOKENIZATION_FAILED))})})},M.prototype._checkPaymentContextStatus=function(){var g=this;return g._queryPaymentContextStatus(g._venmoPaymentContextId).catch(function(_){return Promise.reject(new v({type:d.VENMO_NETWORK_ERROR.type,code:d.VENMO_NETWORK_ERROR.code,message:d.VENMO_NETWORK_ERROR.message,details:_}))}).then(function(_){return Promise.resolve(_)})},M.prototype._pollForStatusChange=function(){var g=this;return g._venmoPaymentContextId?Date.now()>g._mobilePollingContextExpiresIn?Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT)):g._venmoWindow&&g._venmoWindow.closed&&g._venmoPaymentContextStatus==="CREATED"?(a.sendEvent(g._createPromise,"venmo.appswitch.browser-window.closed"),g._cancelMobilePaymentContext().then(function(){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.canceled",{context_id:g._venmoPaymentContextId})}).catch(function(_){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.canceled.error",{context_id:g._venmoPaymentContextId})}),Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED))):this._queryPaymentContextStatus(this._venmoPaymentContextId).catch(function(_){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:_}}))}).then(function(_){var k=_.status;if(k!==g._venmoPaymentContextStatus)switch(g._venmoPaymentContextStatus=k,a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.status-change."+k.toLowerCase(),{context_id:g._venmoPaymentContextId}),k){case"EXPIRED":case"FAILED":case"CANCELED":return Promise.reject(new v(d["VENMO_MOBILE_POLLING_TOKENIZATION_"+k]));case"APPROVED":return Promise.resolve(_)}return new Promise(function(U,E){setTimeout(function(){g._pollForStatusChange().then(U).catch(E)},g._mobilePollingInterval)})}):Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID))},M.prototype._tokenizeForMobileWithManualReturn=function(){var g=this;return a.sendEventPlus(this._createPromise,"venmo.tokenize.manual-return.start",{context_id:g._venmoPaymentContextId}),this._mobilePollingContextExpiresIn=Date.now()+this._mobilePollingExpiresThreshold,this._tokenizePromise=new T,this._pollForStatusChange().then(function(_){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.success",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.resolve({paymentMethodNonce:_.paymentMethodId,username:_.userName,payerInfo:_.payerInfo,id:g._venmoPaymentContextId})}).catch(function(_){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.failure",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.reject(_)}),this.getUrl().then(function(_){return g.appSwitch(_),g._tokenizePromise})},M.prototype._shouldUseRedirectStrategy=function(){return l.isIos()?this._mobileWebFallBack===!0?!0:this._useRedirectForIOS:!1},M.prototype._tokenizeForMobileWithHashChangeListeners=function(g){var _=this,k,U;if(this.hasTokenizationResult())return this.processHashChangeFlowResults();a.sendEvent(this._createPromise,"venmo.tokenize.mobile.start"),this._tokenizePromise=new T,this._previousHash=window.location.hash;function E(x){var C;_.processHashChangeFlowResults(x).catch(function(P){C=P}).then(function(P){!_._ignoreHistoryChanges&&window.location.hash!==_._previousHash&&(window.location.hash=_._previousHash),_._removeVisibilityEventListener(),C?_._tokenizePromise.reject(C):_._tokenizePromise.resolve(P),delete _._tokenizePromise})}return this._onHashChangeListener=function(x){var C=x.newURL.split("#")[1];_._hasTokenizationResult(C)&&(k=!0,clearTimeout(U),E(C))},window.addEventListener("hashchange",this._onHashChangeListener,!1),this._visibilityChangeListener=function(){var x=g.processResultsDelay||c.DEFAULT_PROCESS_RESULTS_DELAY;window.document.hidden||(_._venmoWindow&&!_._venmoWindow.closed&&_._venmoWindow.close(),k||(U=setTimeout(E,x)))},this.getUrl().then(function(x){return _.appSwitch(x),setTimeout(function(){window.document.addEventListener(W(),_._visibilityChangeListener)},c.DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY),_._tokenizePromise})},M.prototype._tokenizeForDesktopQRFlow=function(){var g=this;return a.sendEvent(this._createPromise,"venmo.tokenize.desktop.start"),this._tokenizePromise=new T,this._createPromise.then(function(){return g._venmoDesktopInstance.launchDesktopFlow()}).then(function(_){g._venmoDesktopInstance.hideDesktopFlow(),a.sendEvent(g._createPromise,"venmo.tokenize.desktop.success"),g._tokenizePromise.resolve(_)}).catch(function(_){if(a.sendEvent(g._createPromise,"venmo.tokenize.desktop.failure"),g._venmoDesktopInstance&&g._venmoDesktopInstance.hideDesktopFlow(),_&&_.reason==="CUSTOMER_CANCELED"){g._tokenizePromise.reject(new v(d.VENMO_DESKTOP_CANCELED));return}g._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:_}}))}),this._tokenizePromise},M.prototype._cancelMobilePaymentContext=function(){var g=this;return this._createPromise.then(function(_){var k;return g._venmoPaymentContextId?(k=g._shouldUseLegacyFlow?S.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:S.UPDATE_PAYMENT_CONTEXT_QUERY,_.request({api:"graphQLApi",data:{query:k,variables:{input:{id:g._venmoPaymentContextId,status:"CANCELED"}}}})):Promise.resolve()})},M.prototype._cancelVenmoDesktopContext=function(){var g=this;return this._createPromise.then(function(){return g._venmoDesktopInstance&&g._venmoDesktopInstance.updateVenmoDesktopPaymentContext("CANCELED"),Promise.resolve()})},M.prototype.teardown=function(){var g=this;return this._removeVisibilityEventListener(),this._createPromise.then(function(){g._venmoDesktopInstance&&g._venmoDesktopInstance.teardown(),clearTimeout(g._refreshPaymentContextTimeout),g._cancelMobilePaymentContext(),m(this,p(M.prototype))}.bind(this))},M.prototype._removeVisibilityEventListener=function(){window.removeEventListener("hashchange",this._onHashChangeListener),window.document.removeEventListener(W(),this._visibilityChangeListener),delete this._visibilityChangeListener,delete this._onHashChangeListener},M.prototype.processHashChangeFlowResults=function(g){var _=this,k=K(g);return new Promise(function(U,E){_._shouldUseLegacyFlow?k.venmoSuccess?(a.sendEvent(_._createPromise,"venmo.appswitch.handle.success"),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:succeeded"),U(k)):k.venmoError?(a.sendEvent(_._createPromise,"venmo.appswitch.handle.error"),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:failed"),E(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?(a.sendEvent(_._createPromise,"venmo.appswitch.handle.cancel"),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:canceled"),E(new v(d.VENMO_APP_CANCELED))):(a.sendEvent(_._createPromise,"venmo.appswitch.cancel-or-unavailable"),E(new v(d.VENMO_CANCELED))):_._pollForStatusChange().then(function(x){return a.sendEventPlus(_._createPromise,"venmo.appswitch.handle.payment-context-status-query.success",{context_id:_._venmoPaymentContextId}),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:succeeded"),U({paymentMethodNonce:x.paymentMethodId,username:x.userName,payerInfo:x.payerInfo,id:_._venmoPaymentContextId})}).catch(function(x){x.code===d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED.code?(window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:canceled"),E(x)):window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:failed"),a.sendEventPlus(_._createPromise,"venmo.process-results.payment-context-status-query-failed",{context_id:_._venmoPaymentContextId}),U(k)}),_._clearFragmentParameters()})},M.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 K(g){var _=(g||window.location.hash.substring(1)).split("&"),k=_.reduce(function(U,E){var x=E.split("="),C=decodeURIComponent(x[0]).replace(/\W/g,""),P=w(C),V=decodeURIComponent(x[1]);return U[P]=V,U},{});return k.resourceId&&(k.id=k.resourceId),k}function J(g){return g=g||"","@"+g.replace("@","")}function R(g){var _={nonce:g.paymentMethodNonce,type:"VenmoAccount",details:{username:J(g.username),paymentContextId:g.id}};return g.payerInfo&&(_.details.payerInfo=g.payerInfo,_.details.payerInfo.userName=J(g.payerInfo.userName)),_}function W(){var g;return typeof window.document.hidden!="undefined"?g="visibilitychange":typeof window.document.msHidden!="undefined"?g="msvisibilitychange":typeof window.document.webkitHidden!="undefined"&&(g="webkitvisibilitychange"),g}function j(){return window.navigator.platform&&/iPhone|iPad|iPod/.test(window.navigator.platform)}n.exports=f.wrapPrototype(M)},{"../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)})}(Or)),Or.exports}var ld=od();const cd=di(ld);class dd{constructor(){b(this,"client",null);b(this,"venmoInstance",null)}init(e){return z(this,null,function*(){try{this.client=yield sd.create({authorization:e.authorization})}catch(t){throw console.error("Failed to initialize Braintree client:",t),t}})}createVenmo(e){return z(this,null,function*(){if(!this.client)throw new Error("Braintree client must be initialized before creating Venmo instance");try{return this.venmoInstance=yield cd.create(Q({client:this.client,allowDesktop:!0,mobileWebFallBack:!0,allowDesktopWebLogin:!0,paymentMethodUsage:"multi_use"},e)),this.venmoInstance}catch(t){throw console.error("Failed to create Venmo instance:",t),t}})}isBrowserSupported(){var e,t;return(t=(e=this.venmoInstance)==null?void 0:e.isBrowserSupported())!=null?t:!1}hasTokenizationResult(){var e,t;return(t=(e=this.venmoInstance)==null?void 0:e.hasTokenizationResult())!=null?t:!1}tokenize(){return z(this,null,function*(){if(!this.venmoInstance)throw new Error("Venmo instance not initialized");return new Promise((e,t)=>{this.venmoInstance.tokenize(void 0,(n,i)=>{n?t(n):e(i)})})})}}class ki{constructor(){b(this,"ev",new Ua);b(this,"paypal",new nd);b(this,"braintree",new dd);b(this,"state",{translate:new Wc,checkout:new zc,transaction:new Hc,styles:new qc});b(this,"checkout",new Bc({state:this.state,service:{ev:this.ev,paypal:this.paypal,braintree:this.braintree}}))}clearState(){Object.values(this.state).forEach(e=>e.clearState())}}class ud{constructor(e){b(this,"parent");b(this,"core",new ki);this.parent=e}mount(e){return z(this,null,function*(){const t=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(t),this.core.state.checkout.setState(e)})}unmount(){return z(this,null,function*(){this.parent.innerHTML="",this.core.clearState()})}}ee.Core=ki,ee.PayNextCheckout=ud,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
|
|
447
|
+
</svg>`,h="Tap cancel payment to cancel and return to the business. Continue payment will relaunch the payment window.",p=400,m=570,f={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(L){var S=L.frameServiceInstance,B=L.venmoUrl,G=L.checkForStatusChange,q=L.cancelTokenization,M=L.checkPaymentContextStatus,F=new o;return document.getElementById(f.continueButton).addEventListener("click",function(){S.focus()}),document.getElementById(f.cancelButton).addEventListener("click",function(){S.close(),q(),A()}),S.open({},function(K){var J=1;K?F.reject(K):G(J).then(function(R){F.resolve(R)}).catch(function(R){M().then(function(W){W.status==="CREATED"?F.reject(new l(c.VENMO_CUSTOMER_CANCELED)):F.reject(R)})}),S.close(),A()}),S.redirect(B),F}function y(){var L=Math.round((window.outerHeight-m)/2)+window.screenTop,S=Math.round((window.outerWidth-p)/2)+window.screenLeft;return{top:L,left:S}}function A(){document.getElementById("venmo-desktop-web-backdrop").classList.add("hidden")}function T(){var L=["#"+f.backdropHidden+" {","display: none;","}","#"+f.backdrop+" {","z-index: 3141592632;","cursor: pointer;","position: fixed;","top: 0;","left: 0;","bottom: 0;","width: 100%;","background: rgba(0, 0, 0, 0.8);","}"],S=["#"+f.backdropContainer+" {","display: flex;","align-content: center;","justify-content: center;","align-items: center;","width: 100%;","height: 100%;","flex-direction: column;","}"],B=["#"+f.cancelButton+" {","height: 24px;","width: 380px;","font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;","font-style: normal;","font-weight: 700;","font-size: 18px;","line-height: 24px;","text-align: center;","background-color: transparent;","border: none;","color: #FFFFFF;","margin-top: 28px;","}"],G=["#"+f.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;","}"],q=["#"+f.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;","}"],M=["#"+f.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;","}"],F=L.concat(S,B,G,q,M);return F.join(`
|
|
448
|
+
`)}function N(L){var S=document.getElementById(f.backdrop),B,G,q,M,F,K,J,R;if(S){S.classList.remove("hidden");return}B=document.createElement("style"),G=document.createElement("div"),q=document.createElement("div"),M=document.createElement("div"),F=document.createElement("div"),K=document.createElement("div"),J=document.createElement("button"),R=document.createElement("button"),L&&(B.nonce=L),B.id="venmo-desktop-web__injected-styles",B.innerHTML=T(),G.id=f.backdrop,q.id=f.backdropContainer,M.id=f.venmoLogo,M.innerHTML=u,F.id=f.message,F.innerText="What would you like to do?",K.id=f.instructions,K.innerText=h,J.id=f.continueButton,J.innerText="Continue payment",R.id=f.cancelButton,R.innerText="Cancel payment",document.head.appendChild(B),q.appendChild(M),q.appendChild(F),q.appendChild(K),q.appendChild(J),q.appendChild(R),G.appendChild(q),document.body.appendChild(G),G.addEventListener("click",function(W){W.stopPropagation()})}function w(L){return N(L.styleCspNonce),v(L)}function I(L){var S=new o,B="venmoDesktopWebLogin",G=L.assetsUrl,q=L.debug||!1,M=y(),F=G+"/web/"+d+"/html";return a.create({name:B,dispatchFrameUrl:F+"/dispatch-frame"+s(q)+".html",openFrameUrl:F+"/venmo-landing-frame"+s(q)+".html",top:M.top,left:M.left,height:m,width:p},function(K){S.resolve(K)}),S}n.exports={runWebLogin:w,openPopup:v,setupDesktopWebLogin:I,POPUP_WIDTH:p,POPUP_HEIGHT:m}},{"../../lib/braintree-error":59,"../../lib/frame-service/external":68,"../../lib/use-min":85,"../shared/errors":93,"@braintree/extended-promise":26}],98:[function(t,n,i){var a=t("../lib/analytics"),s=t("../lib/assign").assign,o=t("./shared/supports-venmo"),c=t("./shared/browser-detection"),l=t("./shared/constants"),d=t("./shared/errors"),u=t("../lib/querystring"),h=t("../lib/is-verified-domain"),p=t("../lib/methods"),m=t("../lib/convert-methods-to-error"),f=t("@braintree/wrap-promise"),v=t("../lib/braintree-error"),y=t("../lib/in-iframe"),A=t("@braintree/extended-promise"),T=t("./shared/get-venmo-url"),N=t("./shared/web-login-backdrop"),w=t("../lib/snake-case-to-camel-case"),I=t("../lib/url-params"),L=t("./external/"),S=t("./external/queries"),B="3.126.0",G=250,q=3e5;A.suppressUnhandledPromiseMessage=!0;function M(g){var _=this;this._allowDesktopWebLogin=g.allowDesktopWebLogin||!1,this._mobileWebFallBack=g.mobileWebFallBack||!1,this._createPromise=g.createPromise,this._allowNewBrowserTab=g.allowNewBrowserTab!==!1,this._allowWebviews=g.allowWebviews!==!1,this._allowDesktop=g.allowDesktop===!0,this._useRedirectForIOS=g.useRedirectForIOS===!0,this._profileId=g.profileId,this._displayName=g.displayName,this._deepLinkReturnUrl=g.deepLinkReturnUrl,this._ignoreHistoryChanges=g.ignoreHistoryChanges,this._paymentMethodUsage=(g.paymentMethodUsage||"").toUpperCase(),this._shouldUseLegacyFlow=!this._paymentMethodUsage,this._requireManualReturn=g.requireManualReturn===!0,this._useDesktopQRFlow=this._allowDesktop&&this._isDesktop()&&!this._allowDesktopWebLogin,this._useAllowDesktopWebLogin=this._allowDesktopWebLogin&&this._isDesktop(),this._cannotHaveReturnUrls=y()||this._requireManualReturn,this._allowAndroidRecreation=g.allowAndroidRecreation!==!1,this._maxRetryCount=3,this._collectCustomerBillingAddress=g.collectCustomerBillingAddress||!1,this._collectCustomerShippingAddress=g.collectCustomerShippingAddress||!1,this._isFinalAmount=g.isFinalAmount||!1,this._lineItems=g.lineItems,this._subTotalAmount=g.subTotalAmount,this._discountAmount=g.discountAmount,this._taxAmount=g.taxAmount,this._shippingAmount=g.shippingAmount,this._totalAmount=g.totalAmount,this._cspNonce=(this._mobileWebFallBack||this._allowDesktopWebLogin)&&(g.styleCspNonce||!1),this._shouldCreateVenmoPaymentContext=this._cannotHaveReturnUrls||!this._shouldUseLegacyFlow,a.sendEvent(this._createPromise,"venmo.desktop-flow.configured."+String(!!this._allowDesktop)),this.hasTokenizationResult()?a.sendEvent(this._createPromise,"venmo.appswitch.return-in-new-tab"):this._useDesktopQRFlow?this._createPromise=this._createPromise.then(function(k){var U=k.getConfiguration().gatewayConfiguration;return L({url:U.assetsUrl+"/web/"+B+"/html/venmo-desktop-frame.html",environment:U.environment==="production"?"PRODUCTION":"SANDBOX",profileId:_._profileId||U.payWithVenmo.merchantId,paymentMethodUsage:_._paymentMethodUsage,displayName:_._displayName,Promise,apiRequest:function(E,x){return k.request({api:"graphQLApi",data:{query:E,variables:x}}).then(function(C){return C.data})},sendEvent:function(E){a.sendEvent(_._createPromise,E)},verifyDomain:h}).then(function(E){return _._venmoDesktopInstance=E,a.sendEvent(_._createPromise,"venmo.desktop-flow.presented"),k}).catch(function(){return a.sendEvent(_._createPromise,"venmo.desktop-flow.setup-failed"),_._useDesktopQRFlow=!1,k})}):this._shouldCreateVenmoPaymentContext&&(this._mobilePollingInterval=G,this._mobilePollingExpiresThreshold=q,this._createPromise=this._createPromise.then(function(k){var U,E,x=_._cannotHaveReturnUrls?"manual-return":"mobile-payment-context",C=k.getConfiguration();return E=N.setupDesktopWebLogin({assetsUrl:C.gatewayConfiguration.assetsUrl,debug:C.isDebug}).then(function(P){_._frameServiceInstance=P}).catch(function(P){return P}),_._mobilePollingContextEnvironment=C.gatewayConfiguration.environment.toUpperCase(),U=_._createVenmoPaymentContext(k).then(function(){return a.sendEvent(_._createPromise,"venmo."+x+".presented"),k}).catch(function(P){return a.sendEvent(_._createPromise,"venmo."+x+".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:F(P)?P.details.originalError[0].message:d.VENMO_MOBILE_PAYMENT_CONTEXT_SETUP_FAILED.message,details:{originalError:P}}))}),A.all([E,U]).then(function(P){var V=P[1];return Promise.resolve(V)}).catch(function(P){return Promise.reject(P)})}))}function F(g){return g.details&&g.details.originalError&&g.details.originalError[0]&&g.details.originalError[0].extensions&&g.details.originalError[0].extensions.errorClass==="VALIDATION"&&g.details.originalError[0].extensions.errorType==="user_error"}M.prototype._createVenmoPaymentContext=function(g,_){var k=this,U,E,x=g.getConfiguration(),C=x.gatewayConfiguration.payWithVenmo,P=!1,V=k._useAllowDesktopWebLogin?"NATIVE_WEB":"MOBILE_WEB";if(!this._shouldCreateVenmoPaymentContext)return Promise.resolve();if(this._shouldUseLegacyFlow)U=g.request({api:"graphQLApi",data:{query:S.LEGACY_CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{environment:this._mobilePollingContextEnvironment,intent:"PAY_FROM_APP"}}}}).then(function(O){return O.data.createVenmoQRCodePaymentContext.venmoQRCodePaymentContext});else{if((this._collectCustomerBillingAddress||this._collectCustomerShippingAddress)&&!C.enrichedCustomerDataEnabled)return Promise.reject(new v(d.VENMO_ECD_DISABLED));this._lineItems&&this._lineItems.forEach(function(O){O.unitTaxAmount=O.unitTaxAmount||"0"}),E={subTotalAmount:this._subTotalAmount,discountAmount:this._discountAmount,taxAmount:this._taxAmount,shippingAmount:this._shippingAmount,totalAmount:this._totalAmount,lineItems:this._lineItems},P=Object.keys(E).some(function(O){return E[O]!==void 0}),U=g.request({api:"graphQLApi",data:{query:S.CREATE_PAYMENT_CONTEXT_QUERY,variables:{input:{paymentMethodUsage:this._paymentMethodUsage,intent:"CONTINUE",customerClient:V,isFinalAmount:this._isFinalAmount,displayName:this._displayName,paysheetDetails:{collectCustomerBillingAddress:this._collectCustomerBillingAddress,collectCustomerShippingAddress:this._collectCustomerShippingAddress,transactionDetails:P?E:void 0}}}}}).then(function(O){return O.data.createVenmoPaymentContext.venmoPaymentContext})}return U.then(function(O){var H=new Date(O.expiresAt)-new Date(O.createdAt),X=H*.6666;clearTimeout(k._refreshPaymentContextTimeout),k._refreshPaymentContextTimeout=setTimeout(function(){k._tokenizationInProgress||k._createVenmoPaymentContext(g,!0)},X),!(_&&k._tokenizationInProgress)&&(k._venmoPaymentContextStatus=O.status,k._venmoPaymentContextId=O.id)})},M.prototype._popupBridgeIsInstalled=function(){return window.popupBridge&&typeof window.popupBridge.open=="function"},M.prototype._venmoNativeAppIsInstalled=function(){return!!(window.popupBridge&&(window.parent&&window.parent.popupBridge.isVenmoInstalled||window.popupBridge.isVenmoInstalled))},M.prototype._handleDeepLinkAppSwitch=function(g){j()?this._handleIosWebviewDeepLink(g):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):(a.sendEvent(this._createPromise,"venmo.appswitch.start.webview"),this._venmoWindow=window.open(g))},M.prototype._handleIosWebviewDeepLink=function(g){a.sendEvent(this._createPromise,"venmo.appswitch.start.ios-webview"),y()?this._handleIosWebviewInIframe(g):!this._venmoNativeAppIsInstalled()&&this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):window.location.href=g},M.prototype._handleIosWebviewInIframe=function(g){this._venmoNativeAppIsInstalled()?this._handleIFrameBreakout(g):this._popupBridgeIsInstalled()?this._handlePopupBridgeAppSwitch(g):this._handleIFrameBreakout(g)},M.prototype._handlePopupBridgeAppSwitch=function(g){a.sendEvent(this._createPromise,"venmo.appswitch.start.popup-bridge"),window.popupBridge.open(g)},M.prototype._handleBrowserAppSwitch=function(g){a.sendEvent(this._createPromise,"venmo.appswitch.start.browser"),c.doesNotSupportWindowOpenInIos()||this._shouldUseRedirectStrategy()||this._mobileWebFallBack&&c.isAndroid()&&c.isChrome()?window.location.href=g:this._venmoWindow=window.open(g)},M.prototype._handleIFrameBreakout=function(g){window.top.location.href=g},M.prototype.appSwitch=function(g){this._deepLinkReturnUrl?this._handleDeepLinkAppSwitch(g):this._handleBrowserAppSwitch(g)},M.prototype.getUrl=function(){return this._createPromise.then(function(g){var _=g.getConfiguration(),k={},U=this._deepLinkReturnUrl||window.location.href.replace(window.location.hash,""),E=_.gatewayConfiguration.payWithVenmo,x=_.analyticsMetadata,C=E.accessToken,P={_meta:{version:x.sdkVersion,integration:x.integration,platform:x.platform,sessionId:x.sessionId}};return this._isDebug=_.isDebug,this._assetsUrl=_.gatewayConfiguration.assetsUrl,U=U.replace(/#*$/,""),this._venmoPaymentContextId&&(this._shouldUseLegacyFlow?C+="|pcid:"+this._venmoPaymentContextId:k.resource_id=this._venmoPaymentContextId),this._shouldIncludeReturnUrls()||this._useAllowDesktopWebLogin?(this._useAllowDesktopWebLogin&&(U=this._assetsUrl+"/web/"+B+"/html/redirect-frame.html"),k["x-success"]=U+"#venmoSuccess=1",k["x-cancel"]=U+"#venmoCancel=1",k["x-error"]=U+"#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||E.merchantId,k.braintree_access_token=C,k.braintree_environment=E.environment,k.braintree_sdk_data=btoa(JSON.stringify(P)),T({useAllowDesktopWebLogin:this._useAllowDesktopWebLogin,mobileWebFallBack:this._mobileWebFallBack})+"?"+u.stringify(k)}.bind(this))},M.prototype.isBrowserSupported=function(){return o.isBrowserSupported({allowNewBrowserTab:this._allowNewBrowserTab,allowWebviews:this._allowWebviews,allowDesktop:this._allowDesktop,allowDesktopWebLogin:this._allowDesktopWebLogin})},M.prototype.hasTokenizationResult=function(){return this._hasTokenizationResult()},M.prototype._hasTokenizationResult=function(g){var _=K(g),k=I.getUrlParams();return k.resource_id?this._venmoPaymentContextId=k.resource_id:_.id&&(this._venmoPaymentContextId=_.id),typeof(_.venmoSuccess||_.venmoError||_.venmoCancel)!="undefined"},M.prototype._shouldIncludeReturnUrls=function(){return this._deepLinkReturnUrl?!0:!this._cannotHaveReturnUrls},M.prototype._isDesktop=function(){return!(c.isIos()||c.isAndroid())},M.prototype.tokenize=function(g){var _=this,k;return g=g||{},this._tokenizationInProgress===!0?Promise.reject(new v(d.VENMO_TOKENIZATION_REQUEST_ACTIVE)):(this._tokenizationInProgress=!0,this._useDesktopQRFlow?k=this._tokenizeForDesktopQRFlow(g):this._useAllowDesktopWebLogin?k=this._tokenizeWebLoginWithRedirect(g):this._cannotHaveReturnUrls?k=this._tokenizeForMobileWithManualReturn():k=this._tokenizeForMobileWithHashChangeListeners(g),k.then(function(U){return _._createPromise.then(function(E){return _._createVenmoPaymentContext(E)}).then(function(){return _._tokenizationInProgress=!1,_._venmoWindow=null,R(U)})}).catch(function(U){return _._createPromise.then(function(E){return _._createVenmoPaymentContext(E)}).then(function(){return _._tokenizationInProgress=!1,_._venmoWindow=null,Promise.reject(U)})}))},M.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))},M.prototype._tokenizeWebLoginWithRedirect=function(){var g=this,_;return a.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.start",{context_id:g._venmoPaymentContextId}),this._tokenizePromise=new A,this.getUrl().then(function(k){return _={checkForStatusChange:g._checkPaymentContextStatusAndProcessResult.bind(g),cancelTokenization:g.cancelTokenization.bind(g),frameServiceInstance:g._frameServiceInstance,venmoUrl:k,debug:g._isDebug,checkPaymentContextStatus:g._checkPaymentContextStatus.bind(g)},g._cspNonce&&(_=s({},_,{styleCspNonce:g._cspNonce})),N.runWebLogin(_).then(function(U){a.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.success",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.resolve({paymentMethodNonce:U.paymentMethodId,username:U.userName,payerInfo:U.payerInfo,id:g._venmoPaymentContextId})}).catch(function(U){a.sendEventPlus(g._createPromise,"venmo.tokenize.web-login.failure",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.reject(U)}),g._tokenizePromise})},M.prototype._queryPaymentContextStatus=function(g){var _=this;return this._createPromise.then(function(k){var U=_._shouldUseLegacyFlow?S.LEGACY_VENMO_PAYMENT_CONTEXT_STATUS_QUERY:S.VENMO_PAYMENT_CONTEXT_STATUS_QUERY;return k.request({api:"graphQLApi",data:{query:U,variables:{id:g}}})}).then(function(k){return k.data.node})},M.prototype._checkPaymentContextStatusAndProcessResult=function(g){var _=this;return _._checkPaymentContextStatus().then(function(k){var U=k.status;if(U!==_._venmoPaymentContextStatus)switch(_._venmoPaymentContextStatus=U,a.sendEventPlus(_._createPromise,"venmo.tokenize.web-login.status-change",{context_id:_._venmoPaymentContextId}),U){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(E,x){g<_._maxRetryCount?(g++,_._checkPaymentContextStatusAndProcessResult(g).then(E).catch(x)):x(new v(d.VENMO_TOKENIZATION_FAILED))})})},M.prototype._checkPaymentContextStatus=function(){var g=this;return g._queryPaymentContextStatus(g._venmoPaymentContextId).catch(function(_){return Promise.reject(new v({type:d.VENMO_NETWORK_ERROR.type,code:d.VENMO_NETWORK_ERROR.code,message:d.VENMO_NETWORK_ERROR.message,details:_}))}).then(function(_){return Promise.resolve(_)})},M.prototype._pollForStatusChange=function(){var g=this;return g._venmoPaymentContextId?Date.now()>g._mobilePollingContextExpiresIn?Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_TIMEOUT)):g._venmoWindow&&g._venmoWindow.closed&&g._venmoPaymentContextStatus==="CREATED"?(a.sendEvent(g._createPromise,"venmo.appswitch.browser-window.closed"),g._cancelMobilePaymentContext().then(function(){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.canceled",{context_id:g._venmoPaymentContextId})}).catch(function(_){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.canceled.error",{context_id:g._venmoPaymentContextId})}),Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED))):this._queryPaymentContextStatus(this._venmoPaymentContextId).catch(function(_){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:_}}))}).then(function(_){var k=_.status;if(k!==g._venmoPaymentContextStatus)switch(g._venmoPaymentContextStatus=k,a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.status-change."+k.toLowerCase(),{context_id:g._venmoPaymentContextId}),k){case"EXPIRED":case"FAILED":case"CANCELED":return Promise.reject(new v(d["VENMO_MOBILE_POLLING_TOKENIZATION_"+k]));case"APPROVED":return Promise.resolve(_)}return new Promise(function(U,E){setTimeout(function(){g._pollForStatusChange().then(U).catch(E)},g._mobilePollingInterval)})}):Promise.reject(new v(d.VENMO_MOBILE_POLLING_TOKENIZATION_NO_CONTEXT_ID))},M.prototype._tokenizeForMobileWithManualReturn=function(){var g=this;return a.sendEventPlus(this._createPromise,"venmo.tokenize.manual-return.start",{context_id:g._venmoPaymentContextId}),this._mobilePollingContextExpiresIn=Date.now()+this._mobilePollingExpiresThreshold,this._tokenizePromise=new A,this._pollForStatusChange().then(function(_){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.success",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.resolve({paymentMethodNonce:_.paymentMethodId,username:_.userName,payerInfo:_.payerInfo,id:g._venmoPaymentContextId})}).catch(function(_){a.sendEventPlus(g._createPromise,"venmo.tokenize.manual-return.failure",{context_id:g._venmoPaymentContextId}),g._tokenizePromise.reject(_)}),this.getUrl().then(function(_){return g.appSwitch(_),g._tokenizePromise})},M.prototype._shouldUseRedirectStrategy=function(){return c.isIos()?this._mobileWebFallBack===!0?!0:this._useRedirectForIOS:!1},M.prototype._tokenizeForMobileWithHashChangeListeners=function(g){var _=this,k,U;if(this.hasTokenizationResult())return this.processHashChangeFlowResults();a.sendEvent(this._createPromise,"venmo.tokenize.mobile.start"),this._tokenizePromise=new A,this._previousHash=window.location.hash;function E(x){var C;_.processHashChangeFlowResults(x).catch(function(P){C=P}).then(function(P){!_._ignoreHistoryChanges&&window.location.hash!==_._previousHash&&(window.location.hash=_._previousHash),_._removeVisibilityEventListener(),C?_._tokenizePromise.reject(C):_._tokenizePromise.resolve(P),delete _._tokenizePromise})}return this._onHashChangeListener=function(x){var C=x.newURL.split("#")[1];_._hasTokenizationResult(C)&&(k=!0,clearTimeout(U),E(C))},window.addEventListener("hashchange",this._onHashChangeListener,!1),this._visibilityChangeListener=function(){var x=g.processResultsDelay||l.DEFAULT_PROCESS_RESULTS_DELAY;window.document.hidden||(_._venmoWindow&&!_._venmoWindow.closed&&_._venmoWindow.close(),k||(U=setTimeout(E,x)))},this.getUrl().then(function(x){return _.appSwitch(x),setTimeout(function(){window.document.addEventListener(W(),_._visibilityChangeListener)},l.DOCUMENT_VISIBILITY_CHANGE_EVENT_DELAY),_._tokenizePromise})},M.prototype._tokenizeForDesktopQRFlow=function(){var g=this;return a.sendEvent(this._createPromise,"venmo.tokenize.desktop.start"),this._tokenizePromise=new A,this._createPromise.then(function(){return g._venmoDesktopInstance.launchDesktopFlow()}).then(function(_){g._venmoDesktopInstance.hideDesktopFlow(),a.sendEvent(g._createPromise,"venmo.tokenize.desktop.success"),g._tokenizePromise.resolve(_)}).catch(function(_){if(a.sendEvent(g._createPromise,"venmo.tokenize.desktop.failure"),g._venmoDesktopInstance&&g._venmoDesktopInstance.hideDesktopFlow(),_&&_.reason==="CUSTOMER_CANCELED"){g._tokenizePromise.reject(new v(d.VENMO_DESKTOP_CANCELED));return}g._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:_}}))}),this._tokenizePromise},M.prototype._cancelMobilePaymentContext=function(){var g=this;return this._createPromise.then(function(_){var k;return g._venmoPaymentContextId?(k=g._shouldUseLegacyFlow?S.LEGACY_UPDATE_PAYMENT_CONTEXT_QUERY:S.UPDATE_PAYMENT_CONTEXT_QUERY,_.request({api:"graphQLApi",data:{query:k,variables:{input:{id:g._venmoPaymentContextId,status:"CANCELED"}}}})):Promise.resolve()})},M.prototype._cancelVenmoDesktopContext=function(){var g=this;return this._createPromise.then(function(){return g._venmoDesktopInstance&&g._venmoDesktopInstance.updateVenmoDesktopPaymentContext("CANCELED"),Promise.resolve()})},M.prototype.teardown=function(){var g=this;return this._removeVisibilityEventListener(),this._createPromise.then(function(){g._venmoDesktopInstance&&g._venmoDesktopInstance.teardown(),clearTimeout(g._refreshPaymentContextTimeout),g._cancelMobilePaymentContext(),m(this,p(M.prototype))}.bind(this))},M.prototype._removeVisibilityEventListener=function(){window.removeEventListener("hashchange",this._onHashChangeListener),window.document.removeEventListener(W(),this._visibilityChangeListener),delete this._visibilityChangeListener,delete this._onHashChangeListener},M.prototype.processHashChangeFlowResults=function(g){var _=this,k=K(g);return new Promise(function(U,E){_._shouldUseLegacyFlow?k.venmoSuccess?(a.sendEvent(_._createPromise,"venmo.appswitch.handle.success"),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:succeeded"),U(k)):k.venmoError?(a.sendEvent(_._createPromise,"venmo.appswitch.handle.error"),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:failed"),E(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?(a.sendEvent(_._createPromise,"venmo.appswitch.handle.cancel"),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:canceled"),E(new v(d.VENMO_APP_CANCELED))):(a.sendEvent(_._createPromise,"venmo.appswitch.cancel-or-unavailable"),E(new v(d.VENMO_CANCELED))):_._pollForStatusChange().then(function(x){return a.sendEventPlus(_._createPromise,"venmo.appswitch.handle.payment-context-status-query.success",{context_id:_._venmoPaymentContextId}),window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:succeeded"),U({paymentMethodNonce:x.paymentMethodId,username:x.userName,payerInfo:x.payerInfo,id:_._venmoPaymentContextId})}).catch(function(x){x.code===d.VENMO_MOBILE_POLLING_TOKENIZATION_CANCELED.code?(window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:canceled"),E(x)):window.popupBridge&&a.sendEvent(_._createPromise,"popup-bridge:venmo:failed"),a.sendEventPlus(_._createPromise,"venmo.process-results.payment-context-status-query-failed",{context_id:_._venmoPaymentContextId}),U(k)}),_._clearFragmentParameters()})},M.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 K(g){var _=(g||window.location.hash.substring(1)).split("&"),k=_.reduce(function(U,E){var x=E.split("="),C=decodeURIComponent(x[0]).replace(/\W/g,""),P=w(C),V=decodeURIComponent(x[1]);return U[P]=V,U},{});return k.resourceId&&(k.id=k.resourceId),k}function J(g){return g=g||"","@"+g.replace("@","")}function R(g){var _={nonce:g.paymentMethodNonce,type:"VenmoAccount",details:{username:J(g.username),paymentContextId:g.id}};return g.payerInfo&&(_.details.payerInfo=g.payerInfo,_.details.payerInfo.userName=J(g.payerInfo.userName)),_}function W(){var g;return typeof window.document.hidden!="undefined"?g="visibilitychange":typeof window.document.msHidden!="undefined"?g="msvisibilitychange":typeof window.document.webkitHidden!="undefined"&&(g="webkitvisibilitychange"),g}function j(){return window.navigator.platform&&/iPhone|iPad|iPod/.test(window.navigator.platform)}n.exports=f.wrapPrototype(M)},{"../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)})}(Or)),Or.exports}var cd=ld();const dd=di(cd);class ud{constructor(){b(this,"client",null);b(this,"venmoInstance",null)}init(e){return z(this,null,function*(){try{this.client=yield od.create({authorization:e.authorization})}catch(t){throw console.error("Failed to initialize Braintree client:",t),t}})}createVenmo(e){return z(this,null,function*(){if(!this.client)throw new Error("Braintree client must be initialized before creating Venmo instance");try{return this.venmoInstance=yield dd.create(Q({client:this.client,allowDesktop:!0,mobileWebFallBack:!0,allowDesktopWebLogin:!0,paymentMethodUsage:"multi_use"},e)),this.venmoInstance}catch(t){throw console.error("Failed to create Venmo instance:",t),t}})}isBrowserSupported(){var e,t;return(t=(e=this.venmoInstance)==null?void 0:e.isBrowserSupported())!=null?t:!1}hasTokenizationResult(){var e,t;return(t=(e=this.venmoInstance)==null?void 0:e.hasTokenizationResult())!=null?t:!1}tokenize(){return z(this,null,function*(){if(!this.venmoInstance)throw new Error("Venmo instance not initialized");return new Promise((e,t)=>{this.venmoInstance.tokenize(void 0,(n,i)=>{n?t(n):e(i)})})})}}class ki{constructor(){b(this,"ev",new Ba);b(this,"paypal",new id);b(this,"braintree",new ud);b(this,"state",{translate:new Gc,checkout:new Kc,transaction:new Wc,styles:new Hc});b(this,"checkout",new jc({state:this.state,service:{ev:this.ev,paypal:this.paypal,braintree:this.braintree}}))}clearState(){Object.values(this.state).forEach(e=>e.clearState())}}class pd{constructor(e){b(this,"parent");b(this,"core",new ki);this.parent=e}mount(e){return z(this,null,function*(){const t=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(t),this.core.state.checkout.setState(e)})}unmount(){return z(this,null,function*(){this.parent.innerHTML="",this.core.clearState()})}}ee.Core=ki,ee.PayNextCheckout=pd,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
|
|
449
449
|
//# sourceMappingURL=index.umd.js.map
|