@paynext/sdk 0.0.91 → 0.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index.css +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(ne,ie){typeof exports=="object"&&typeof module!="undefined"?ie(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],ie):(ne=typeof globalThis!="undefined"?globalThis:ne||self,ie(ne["PayNext SDK"]={},ne.React))})(this,function(ne,ie){"use strict";var zl=Object.defineProperty,jl=Object.defineProperties;var Hl=Object.getOwnPropertyDescriptors;var Pt=Object.getOwnPropertySymbols;var Bi=Object.prototype.hasOwnProperty,zi=Object.prototype.propertyIsEnumerable;var Pr=(ne,ie,ae)=>ie in ne?zl(ne,ie,{enumerable:!0,configurable:!0,writable:!0,value:ae}):ne[ie]=ae,H=(ne,ie)=>{for(var ae in ie||(ie={}))Bi.call(ie,ae)&&Pr(ne,ae,ie[ae]);if(Pt)for(var ae of Pt(ie))zi.call(ie,ae)&&Pr(ne,ae,ie[ae]);return ne},J=(ne,ie)=>jl(ne,Hl(ie));var Ae=(ne,ie)=>{var ae={};for(var ye in ne)Bi.call(ne,ye)&&ie.indexOf(ye)<0&&(ae[ye]=ne[ye]);if(ne!=null&&Pt)for(var ye of Pt(ne))ie.indexOf(ye)<0&&zi.call(ne,ye)&&(ae[ye]=ne[ye]);return ae};var C=(ne,ie,ae)=>Pr(ne,typeof ie!="symbol"?ie+"":ie,ae);var Y=(ne,ie,ae)=>new Promise((ye,Le)=>{var Lt=K=>{try{qe(ae.next(K))}catch(Re){Le(Re)}},vt=K=>{try{qe(ae.throw(K))}catch(Re){Le(Re)}},qe=K=>K.done?ye(K.value):Promise.resolve(K.value).then(Lt,vt);qe((ae=ae.apply(ne,ie)).next())});var ae=document.createElement("style");ae.textContent=`._spinner_4n5ur_1{height:100%;width:100%}@keyframes _spin_4n5ur_1{to{transform:rotate(360deg)}}._spinner_4n5ur_1{animation:_spin_4n5ur_1 1s linear infinite;fill:#9ca3af;--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}._spinner_4n5ur_1:is(._dark_4n5ur_1 *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}._spinnerContainer_4n5ur_5{height:40px;width:40px}._success_4n5ur_9{position:absolute;top:50%;left:50%;height:3.5rem;width:3.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));fill:#0d776e;z-index:3}._successContainer_4n5ur_14{position:relative;display:grid;height:5rem;width:5rem;flex:none;place-items:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(232 250 240 / var(--tw-bg-opacity, 1))}._successContainer_4n5ur_14:is(._dark_4n5ur_1 *){--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._successContainer_4n5ur_14{z-index:0;animation:_containerPulse_4n5ur_1 3s ease-in-out infinite}._successContainer_4n5ur_14:before,._successContainer_4n5ur_14:after{content:"";position:absolute;inset:0;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._successContainer_4n5ur_14:is(._dark_4n5ur_1 *):before,._successContainer_4n5ur_14:is(._dark_4n5ur_1 *):after{--tw-bg-opacity: 1;background-color:rgb(167 233 193 / var(--tw-bg-opacity, 1))}._successContainer_4n5ur_14:before,._successContainer_4n5ur_14:after{animation:_ripplePulse_4n5ur_1 3s cubic-bezier(.4,0,.6,1) infinite;opacity:0;z-index:1}._successContainer_4n5ur_14:after{animation-delay:.5s}@keyframes _containerPulse_4n5ur_1{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}@keyframes _ripplePulse_4n5ur_1{0%{transform:scale(1);opacity:0}10%{transform:scale(1);opacity:.7}to{transform:scale(1.3);opacity:0}}._container_4n5ur_57{width:30px;height:20px;display:flex;margin:0 1px;align-items:center;justify-content:center}._card_4n5ur_66{width:28px;height:19px;display:flex;margin:0 1px;align-items:center;justify-content:center}._warning_4n5ur_75{width:16px;height:16px;display:flex;align-items:center;justify-content:center}._svg_4n5ur_83{width:100%;height:100%}._srOnly_4n5ur_88{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}._backButton_4n5ur_92{width:30px;height:30px;display:flex;margin:0 1px;align-items:center;justify-content:center;background-color:#f4f4f5;border-radius:8px}._loader_nwq3e_1{position:absolute;height:100%;top:0;left:0;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);z-index:1000;display:flex;width:100%;align-items:center;justify-content:center;border-radius:10px}._checkout_lsspc_1{padding:0 2px;overflow:hidden;z-index:0;position:relative;height:auto;min-height:60px;width:100%;max-width:640px}._hidden_lsspc_8{display:none!important}._formInitial_lsspc_12{opacity:0;transform:translateY(100px)}._btnsInitial_lsspc_17{opacity:0;transform:translateY(-100px)}._buttons_1i8cu_1{display:grid;gap:.5rem}._hidden_1i8cu_5{display:none!important}._applePay_f1ztr_1{display:flex;flex-direction:column;gap:8px}@media (hover: hover){._applePay_f1ztr_1:hover{filter:contrast(.575) brightness(1.2)}}._hidden_f1ztr_28{display:none!important}._googlePay_gmreq_1{display:flex;flex-direction:column;gap:8px}._hidden_gmreq_20{display:none!important}._paypal_1p7d0_1{display:flex;flex-direction:column;gap:8px;height:40px;border-radius:12px;background-color:#ffc439}._hidden_1p7d0_10{display:none}._button_1bl11_1{transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(13 118 110 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:1.5rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_1bl11_1{transition-property:none}}._button_1bl11_1 span{margin-left:.25rem}@media (hover: hover){._button_1bl11_1:hover{opacity:.7}}._button_1bl11_1:active{transform:scale(.95)}._container_10ziz_2{display:flex;flex-direction:column;gap:.5rem}._venmo_10ziz_8{display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:12px;height:40px;background-color:#0088f7;width:100%;color:#fff;font-size:16px;text-align:center;cursor:pointer;transition:background-color .3s ease;svg{height:40%}@media (hover: hover){&:hover{background-color:#5683c1}}}._hidden_10ziz_35{display:none}._button_125my_1{cursor:pointer}._button_1lwej_1{margin-top:8px;transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(13 118 110 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_1lwej_1{transition-property:none}}._button_1lwej_1 span{margin-left:.25rem}._disabled_1lwej_18{opacity:.7}@media (hover: hover){._button_1lwej_1:hover{opacity:.7}}._press_1lwej_28:active{transform:scale(.95)}._hidden_1lwej_32{display:none!important}._spinner_1lwej_36{width:24px;height:24px}._cardForm_ydw03_1{position:relative;display:grid;min-height:250px;gap:.75rem;padding-top:0}._hidden_ydw03_5{display:none!important}._topOffset_ydw03_9{margin-top:.5rem}._wrapper_1gvzd_1{position:relative}._inputContainer_1gvzd_5{background-color:transparent;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;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;padding-left:.75rem;padding-right:.75rem}._inputContainer_1gvzd_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1gvzd_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1gvzd_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_1gvzd_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_1gvzd_13{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}@media (hover: hover){._inputContainer_1gvzd_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}}._inputContainer_1gvzd_5:focus-within:not(._errorInput_1gvzd_23):not(._disabled_1gvzd_23){box-shadow:0 0 0 2px color-mix(in srgb,var(--input-focus-shadow-color, #5A67D8) 30%,transparent)}._input_1gvzd_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_1gvzd_32{display:flex}._errorInput_1gvzd_23{--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_1gvzd_23: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_1gvzd_23: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_1gvzd_40{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_1gvzd_44{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_1gvzd_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_1gvzd_52{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_1gvzd_59{display:none!important}._wrapper_1dxfo_1{position:relative}._inputContainer_1dxfo_5{background-color:transparent;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;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;padding-left:.75rem;padding-right:.75rem}._inputContainer_1dxfo_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1dxfo_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1dxfo_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_1dxfo_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_1dxfo_13{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}@media (hover: hover){._inputContainer_1dxfo_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}}._inputContainer_1dxfo_5:focus-within:not(._errorInput_1dxfo_23):not(._disabled_1dxfo_23){box-shadow:0 0 0 2px color-mix(in srgb,var(--input-focus-shadow-color, #5A67D8) 30%,transparent)}._input_1dxfo_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_1dxfo_32{display:flex}._errorInput_1dxfo_23{--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_1dxfo_23: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_1dxfo_23: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_1dxfo_23{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_1dxfo_44{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_1dxfo_48{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_1dxfo_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_1dxfo_56{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_1dxfo_63{display:none!important}._wrapper_27yo3_1{position:relative}._inputContainer_27yo3_5{background-color:transparent;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;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;padding-left:.75rem;padding-right:.75rem}._inputContainer_27yo3_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_27yo3_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_27yo3_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_27yo3_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_27yo3_13{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}@media (hover: hover){._inputContainer_27yo3_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}}._inputContainer_27yo3_5:focus-within:not(._errorInput_27yo3_23):not(._disabled_27yo3_23){box-shadow:0 0 0 2px color-mix(in srgb,var(--input-focus-shadow-color, #5A67D8) 30%,transparent)}._input_27yo3_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_27yo3_32{display:flex;align-items:center;justify-content:center}._errorInput_27yo3_23{--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_27yo3_23: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_27yo3_23: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_27yo3_23{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_27yo3_44{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_27yo3_48{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_27yo3_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_27yo3_56{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_27yo3_63{display:none!important}._securityContent_27yo3_67{display:grid;grid-column-gap:5px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,auto))}._container_79xkl_1{display:flex;min-height:292px;width:100%;flex-direction:column;align-items:center;justify-content:center}._title_79xkl_5{margin-top:.5rem;font-weight:300}._container_1e7lb_1{border-radius:12px;margin-top:.5rem;display:flex;width:100%;flex-grow:1;flex-direction:row;align-items:center;justify-content:flex-start;-moz-column-gap:.25rem;column-gap:.25rem;--tw-bg-opacity: 1;background-color:rgb(254 231 239 / var(--tw-bg-opacity, 1));padding:.75rem 1rem}._container_1e7lb_1:is(._dark_1e7lb_1 *){background-color:#fee7ef80;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}._container_1e7lb_1 svg{width:16px;height:16px}._title_1e7lb_11{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_1e7lb_11:is(._dark_1e7lb_1 *){--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(ae);class ye{constructor(t){C(this,"parent");C(this,"core");typeof window!="undefined"&&(this.parent=t)}mount(t){return Y(this,null,function*(){if(!this.parent)return;if(!this.core){const a=(yield Promise.resolve().then(()=>Bl)).Core;this.core=new a}t.styles&&this.core.state.styles.setState(t.styles);const e=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(e),this.core.state.checkout.setState(t)})}unmount(){return Y(this,null,function*(){!this.parent||!this.core||(this.parent.innerHTML="",this.core.clearState())})}}let Le=null;function Lt(){return Y(this,null,function*(){return Le||(Le=new Promise((r,t)=>{const e=document.createElement("script");if(e.src="https://js.evervault.com/v2",e.onload=()=>r(),e.onerror=()=>{Le=null,t()},!document.head)throw new Error("Expected document.head not to be null. Evervault.js requires a <head> element.");document.head.appendChild(e)}),Le)})}function vt(){return Y(this,null,function*(){if(window.Evervault)return window.Evervault;try{return yield Lt(),window.Evervault}catch(r){throw new Error("Failed to load Evervault.js")}})}function qe(r,t,e){return Y(this,null,function*(){const n=yield vt();return new n(r,t,e)})}Promise.resolve().then(()=>{vt()});var K=(r=>(r.PAYPAL="PAYPAL",r.APPLE_PAY="APPLEPAY",r.GOOGLE_PAY="GPAY",r.CARD="CARD",r.VENMO="VENMO",r))(K||{}),Re=(r=>(r.PENDING="PENDING",r.FAILED="FAILED",r.AUTHORIZED="AUTHORIZED",r.SETTLING="SETTLING",r.SETTLED="SETTLED",r.DECLINED="DECLINED",r.CANCELLED="CANCELLED",r))(Re||{}),Rt=(r=>(r.INSUFFICIENT_FUNDS="insufficient_funds",r.AUTHENTICATION_REQUIRED="authentication_required",r.CARD_ISSUER_DECLINE="card_issuer_decline",r.GENERIC_DECLINE="generic_decline",r.WITHDRAWAL_LIMIT_EXCEEDED="withdrawal_limit_exceeded",r.DO_NOT_HONOR="do_not_honor",r.EXPIRED_CARD="expired_card",r.SUSPECTED_FRAUD="suspected_fraud",r.INCORRECT_CVC="incorrect_cvc",r.INVALID_CARD_NUMBER="invalid_card_number",r.ISSUER_UNAVAILABLE="issuer_unavailable",r.CARD_LOST_OR_STOLEN="card_lost_or_stolen",r.CARD_DECLINED="card_declined",r))(Rt||{});const kt=(r="sandbox")=>({develop:"https://dev-api.paynext.com",staging:"https://staging-api.paynext.com",sandbox:"https://sandbox-api.paynext.com",production:"https://api.paynext.com"})[r],ji=[{type:K.PAYPAL,order:1,is_active:!0},{type:K.APPLE_PAY,order:2,is_active:!0},{type:K.GOOGLE_PAY,order:3,is_active:!0},{type:K.CARD,order:4,is_active:!0}],Hi=r=>r.googlePay?K.GOOGLE_PAY:r.applePay?K.APPLE_PAY:r.paypal?K.PAYPAL:r.braintree?K.VENMO:K.CARD,Ki=r=>{const t=r.card;if(t)return{bin:t.firstSixDigits,bin_data:{brand:t.cardBrand,country:t.country,currency_code:t.currency,funding:t.funding,issuer:t.issuer,type:t.type},cvc:t.cvc,exp_month:Number(t.expMonth),exp_year:Number(t.expYear),last4:t.lastFourDigits,number:t.number}},Wi=r=>{var e;const t=r.paypal;if((e=t==null?void 0:t.billing_agreement_token)!=null&&e.paypalId)return{billing_agreement_token:t.billing_agreement_token.paypalId}},Yi=r=>{var e,n;const t=r.googlePay;if(t!=null&&t.token)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(e=t.card)!=null&&e.expiry.month||t.token.expiry.month?Number(t.card.expiry.month||t.token.expiry.month):void 0,exp_year:(n=t.card)!=null&&n.expiry.year||t.token.expiry.year?Number(t.card.expiry.year||t.token.expiry.year):void 0,token:t.token.number,token_service_provider:t.token.tokenServiceProvider}},$i=r=>{var e,n,a,i,s,o;const t=r.applePay;if(t)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(n=(e=t.networkToken)==null?void 0:e.expiry)!=null&&n.month?Number(t.networkToken.expiry.month):void 0,exp_year:(i=(a=t.networkToken)==null?void 0:a.expiry)!=null&&i.year?Number(t.networkToken.expiry.year):void 0,token:(s=t.networkToken)==null?void 0:s.number,token_service_provider:(o=t.networkToken)==null?void 0:o.tokenServiceProvider}},Gi=r=>{const t=r.braintree;if(t)return{payment_method_nonce:t.nonce}},Lr=r=>{var n,a,i,s,o,c,l,d,u,h,p,f,m,v;const{applePay:t,googlePay:e}=r;if(!(!t&&!e))return{city:((n=t==null?void 0:t.billingContact)==null?void 0:n.locality)||((a=e==null?void 0:e.billingAddress)==null?void 0:a.locality)||void 0,country:((i=t==null?void 0:t.billingContact)==null?void 0:i.countryCode)||((s=e==null?void 0:e.billingAddress)==null?void 0:s.countryCode)||void 0,line1:((c=(o=t==null?void 0:t.billingContact)==null?void 0:o.addressLines)==null?void 0:c.at(0))||((l=e==null?void 0:e.billingAddress)==null?void 0:l.address1)||void 0,line2:((u=(d=t==null?void 0:t.billingContact)==null?void 0:d.addressLines)==null?void 0:u.at(1))||((h=e==null?void 0:e.billingAddress)==null?void 0:h.address2)||void 0,postal_code:((p=t==null?void 0:t.billingContact)==null?void 0:p.postalCode)||((f=e==null?void 0:e.billingAddress)==null?void 0:f.postalCode)||void 0,state:((m=t==null?void 0:t.billingContact)==null?void 0:m.administrativeArea)||((v=e==null?void 0:e.billingAddress)==null?void 0:v.administrativeArea)||void 0}},Rr=r=>{var a,i,s,o,c,l,d,u,h,p,f,m,v,y,A,x,N,I,L;const{card:t,googlePay:e,applePay:n}=r;if(!(!t&&!(e!=null&&e.card)&&!(n!=null&&n.card)))return{bin:t==null?void 0:t.firstSixDigits,bin_data:{brand:(t==null?void 0:t.cardBrand)||((a=e==null?void 0:e.card)==null?void 0:a.brand)||((i=n==null?void 0:n.card)==null?void 0:i.brand),country:(t==null?void 0:t.country)||((s=e==null?void 0:e.card)==null?void 0:s.country)||((o=n==null?void 0:n.card)==null?void 0:o.country),currency_code:(t==null?void 0:t.currency)||((c=e==null?void 0:e.card)==null?void 0:c.currency)||((l=n==null?void 0:n.card)==null?void 0:l.currency),funding:(t==null?void 0:t.funding)||((d=e==null?void 0:e.card)==null?void 0:d.funding)||((u=n==null?void 0:n.card)==null?void 0:u.funding),issuer:(t==null?void 0:t.issuer)||((h=e==null?void 0:e.card)==null?void 0:h.issuer)||((p=n==null?void 0:n.card)==null?void 0:p.issuer),type:(t==null?void 0:t.type)||((f=e==null?void 0:e.card)==null?void 0:f.segment)||((m=n==null?void 0:n.card)==null?void 0:m.segment)},cvc:t==null?void 0:t.cvc,exp_month:t!=null&&t.expMonth||(v=e==null?void 0:e.card)!=null&&v.expiry.month?Number((t==null?void 0:t.expMonth)||((y=e==null?void 0:e.card)==null?void 0:y.expiry.month)):void 0,exp_year:t!=null&&t.expYear||(A=e==null?void 0:e.card)!=null&&A.expiry.year?Number((t==null?void 0:t.expYear)||((x=e==null?void 0:e.card)==null?void 0:x.expiry.year)):void 0,last4:(t==null?void 0:t.lastFourDigits)||((N=e==null?void 0:e.card)==null?void 0:N.lastFour)||((I=n==null?void 0:n.card)==null?void 0:I.lastFour),number:(t==null?void 0:t.number)||((L=e==null?void 0:e.card)==null?void 0:L.number)}},kr=r=>{var n,a;const{applePay:t,card:e}=r;return(n=t==null?void 0:t.billingContact)!=null&&n.givenName?`${t.billingContact.givenName} ${t.billingContact.familyName||""}`.trim():(a=e==null?void 0:e.metadata)==null?void 0:a.name},qi=r=>{var n,a;const t=Hi(r),e={client_session:r.clientSession,three_ds_session_id:r.threeDsSessionId,type:t};switch(t){case K.CARD:return J(H({},e),{name:kr(r),card:Ki(r)});case K.PAYPAL:return J(H({},e),{paypal:Wi(r)});case K.GOOGLE_PAY:return J(H({},e),{card:Rr(r),google_pay:Yi(r),billing_address:Lr(r)});case K.APPLE_PAY:return J(H({},e),{name:kr(r),card:Rr(r),apple_pay:$i(r),phone:(a=(n=r.applePay)==null?void 0:n.shippingContact)==null?void 0:a.phoneNumber,billing_address:Lr(r)});case K.VENMO:return J(H({},e),{venmo:Gi(r)});default:throw new Error(`Unsupported payment method: ${t}`)}},Qi=(r,t,e)=>Y(this,null,function*(){const n=`${kt(t)}/payments/create`,a=new Headers;a.append("Content-Type","application/json"),a.append("X-API-Version",e);const i=qi(r);return yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify(i)})).json()}),Xi=(r,t,e)=>Y(this,null,function*(){const n=`${kt(t)}/payments/create/billing/agreement`,a=new Headers;return a.append("Content-Type","application/json"),a.append("X-API-Version",e),(yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify({client_session:r})})).json()).paypal_agreement_token_response.token_id||""}),Zi=(r,t,e)=>Y(this,null,function*(){const n=`${kt(t)}/payments/config?client_session_id=${r}`,a=new Headers;a.append("X-API-Version",e);const s=yield(yield fetch(n,{headers:a})).json();return s.checkout_config||(s.checkout_config=ji),s});let Ji=class{constructor(t){C(this,"apple",null);C(this,"isAvailable",!1);C(this,"onReady");this.ev=t}init(d,u){return Y(this,arguments,function*({transaction:t,locale:e,supportedCardTypes:n,onReady:a,onError:i,onSuccess:s,onCancel:o,onPaymentAttempt:c},l){const h=this.ev.transactions.create(t);this.apple=this.ev.ui.applePay(h,J(H({locale:e,borderRadius:12,size:{width:"100%",height:"40px"}},l==null?void 0:l.styles),{allowedCardNetworks:n,requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(v,y)=>Y(this,[v,y],function*(f,{fail:m}){c==null||c({paymentMethod:K.GOOGLE_PAY});try{s==null||s(f)}catch(A){console.error(A),m({message:"Cannot pay with payment credentials"})}})}));const p=yield this.apple.availability();this.isAvailable=p==="available",console.log("Apple Pay availability",p),this.isAvailable||i==null||i(new Error(`Apple Pay is not supported on this device: ${p}`)),i&&this.apple.on("error",i),o&&this.apple.on("cancel",o),this.onReady=a})}render(t){return Y(this,null,function*(){var e;!this.apple||!this.isAvailable||(t.innerHTML="",yield this.apple.mount(t),(e=this.onReady)==null||e.call(this))})}},ea=class{constructor(t){C(this,"google",null);this.ev=t}init(l,d){return Y(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:s,onPaymentAttempt:o},c){const u=this.ev.transactions.create(t);this.google=this.ev.ui.googlePay(u,J(H({locale:e,size:{width:"100%",height:"42px"},borderRadius:12,billingAddress:{phoneNumber:!0}},c==null?void 0:c.styles),{process:(f,m)=>Y(this,[f,m],function*(h,{fail:p}){o==null||o({paymentMethod:K.GOOGLE_PAY});try{i==null||i(h)}catch(v){console.error(v),p({message:"Cannot pay with payment credentials"})}})})),s&&this.google.on("cancel",s),n&&this.google.on("ready",n),a&&this.google.on("error",a)})}render(t){return Y(this,null,function*(){this.google&&(t.innerHTML="",this.google.mount(t))})}};class de{constructor(){C(this,"listeners",[])}removeListener(t){this.listeners=this.listeners.filter(e=>e!==t)}addListener(t){return this.listeners.push(t),()=>this.removeListener(t)}emit(t){for(const e of this.listeners)e(t)}clear(){this.listeners=[]}}class ta{constructor(t){C(this,"threeDs",null);this.ev=t}init(i){return Y(this,arguments,function*({threeDsId:t,onReady:e,onSuccess:n,onError:a}){this.threeDs=this.ev.ui.threeDSecure(t),this.threeDs.on("ready",()=>e==null?void 0:e()),this.threeDs.on("success",()=>n==null?void 0:n()),this.threeDs.on("failure",()=>a==null?void 0:a()),this.threeDs.on("error",()=>a==null?void 0:a())})}render(t){return Y(this,null,function*(){this.threeDs&&this.threeDs.mount(t)})}}class ra{constructor(){C(this,"isReady",!1);C(this,"ev",null);C(this,"apple",null);C(this,"google",null);C(this,"threeDs",null);C(this,"events",{ready:new de})}isShouldLoad({teamId:t,appId:e}){var n,a;return((n=this.ev)==null?void 0:n.config.appId)!==e||((a=this.ev)==null?void 0:a.config.teamId)!==t}initEv(t){return Y(this,null,function*(){this.isShouldLoad(t)&&(this.isReady=!1,this.ev=yield qe(t.teamId,t.appId),this.apple=new Ji(this.ev),this.google=new ea(this.ev),this.events.ready.emit(),this.isReady=!0)})}initThreeDs(t){return Y(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new ta(this.ev),yield this.threeDs.init(t),yield this.threeDs.render()})}initApple(t,e){return Y(this,null,function*(){if(!this.apple)throw new Error("Evervault should be init before using Apple Pay");yield this.apple.init(t,e)})}initGoogle(t,e){return Y(this,null,function*(){if(!this.google)throw new Error("Evervault should be init before using Google Pay");yield this.google.init(t,e)})}isAppleAvailable(){var t;return!!((t=this.apple)!=null&&t.isAvailable)}addEventListener(t,e){return this.events[t].addListener(e)}renderApple(t){return Y(this,null,function*(){var e;return(e=this.apple)==null?void 0:e.render(t)})}renderGoogle(t){return Y(this,null,function*(){var e;return(e=this.google)==null?void 0:e.render(t)})}getEv(){if(!this.ev)throw new Error("Evervault should be init before getting instance");return this.ev}}function St(r){return typeof r=="object"&&!Array.isArray(r)}function na(r,t,e){var n;if(r instanceof EventTarget)return[r];if(typeof r=="string"){let a=document;const i=(n=e==null?void 0:e[r])!=null?n:a.querySelectorAll(r);return i?Array.from(i):[]}return Array.from(r)}function Sr(r,t,e,n){return typeof r=="string"&&St(t)?na(r,e,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function ia(r,t,e){return r*(t+1)}function Mr(r,t,e,n){var a;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,r+parseFloat(t)):t==="<"?e:(a=n.get(t))!=null?a:r}const Qe=(r,t,e)=>r+(t-r)*e,aa=(r,t,e)=>{const n=t-r;return((e-r)%n+n)%n+r},Dr=r=>Array.isArray(r)&&typeof r[0]!="number";function Vr(r,t){return Dr(r)?r[aa(0,r.length,t)]:r}function sa(r,t){r.indexOf(t)===-1&&r.push(t)}function Fr(r,t){const e=r.indexOf(t);e>-1&&r.splice(e,1)}function oa(r,t,e){for(let n=0;n<r.length;n++){const a=r[n];a.at>t&&a.at<e&&(Fr(r,a),n--)}}function ca(r,t,e,n,a,i){oa(r,a,i);for(let s=0;s<t.length;s++)r.push({value:t[s],at:Qe(a,i,n[s]),easing:Vr(e,s)})}function la(r,t){for(let e=0;e<r.length;e++)r[e]=r[e]/(t+1)}function da(r,t){return r.at===t.at?r.value===null?1:t.value===null?-1:0:r.at-t.at}const ve=r=>!!(r&&r.getVelocity),Mt=(r,t,e)=>{const n=t-r;return n===0?1:(e-r)/n};function Ur(r,t){const e=r[r.length-1];for(let n=1;n<=t;n++){const a=Mt(0,t,n);r.push(Qe(e,1,a))}}function Br(r){const t=[0];return Ur(t,r.length-1),t}function Dt(r){return typeof r=="function"&&"applyToOptions"in r}const gt=2e4;function Vt(r){let t=0;const e=50;let n=r.next(t);for(;!n.done&&t<gt;)t+=e,n=r.next(t);return t>=gt?1/0:t}const Ce=r=>r*1e3,Te=r=>r/1e3;function zr(r,t=100,e){const n=e(J(H({},r),{keyframes:[0,t]})),a=Math.min(Vt(n),gt);return{type:"keyframes",ease:i=>n.next(a*i).value/t,duration:Te(a)}}let Xe=()=>{},Ie=()=>{};process.env.NODE_ENV!=="production"&&(Xe=(r,t)=>{!r&&typeof console!="undefined"&&console.warn(t)},Ie=(r,t)=>{if(!r)throw new Error(t)});const ua="easeInOut",pa=20;function ha(r,i={},n,a){var s=i,{defaultTransition:t={}}=s,e=Ae(s,["defaultTransition"]);const o=t.duration||.3,c=new Map,l=new Map,d={},u=new Map;let h=0,p=0,f=0;for(let m=0;m<r.length;m++){const v=r[m];if(typeof v=="string"){u.set(v,p);continue}else if(!Array.isArray(v)){u.set(v.name,Mr(p,v.at,h,u));continue}let[y,A,x={}]=v;x.at!==void 0&&(p=Mr(p,x.at,h,u));let N=0;const I=(L,O,S,U=0,$=0)=>{const G=fa(L),D=O,{delay:F=0,times:z=Br(G),type:j="keyframes",repeat:ee,repeatType:M,repeatDelay:q=0}=D,W=Ae(D,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:E=t.ease||"easeOut",duration:g}=O;const R=typeof F=="function"?F(U,$):F,V=G.length,b=Dt(j)?j:a==null?void 0:a[j];if(V<=2&&b){let w=100;if(V===2&&ga(G)){const ce=G[1]-G[0];w=Math.abs(ce)}const B=H({},W);g!==void 0&&(B.duration=Ce(g));const Z=zr(B,w,b);E=Z.ease,g=Z.duration}g!=null||(g=o);const T=p+R;z.length===1&&z[0]===0&&(z[1]=1);const _=z.length-G.length;if(_>0&&Ur(z,_),G.length===1&&G.unshift(null),ee){Ie(ee<pa,"Repeat count too high, must be less than 20"),g=ia(g,ee);const w=[...G],B=[...z];E=Array.isArray(E)?[...E]:[E];const Z=[...E];for(let ce=0;ce<ee;ce++){G.push(...w);for(let k=0;k<w.length;k++)z.push(B[k]+(ce+1)),E.push(k===0?"linear":Vr(Z,k-1))}la(z,ee)}const P=T+g;ca(S,G,E,z,T,P),N=Math.max(R+g,N),f=Math.max(P,f)};if(ve(y)){const L=jr(y,l);I(A,x,Hr("default",L))}else{const L=Sr(y,A,n,d),O=L.length;for(let S=0;S<O;S++){A=A,x=x;const U=L[S],$=jr(U,l);for(const G in A)I(A[G],ma(x,G),Hr(G,$),S,O)}}h=p,p+=N}return l.forEach((m,v)=>{for(const y in m){const A=m[y];A.sort(da);const x=[],N=[],I=[];for(let O=0;O<A.length;O++){const{at:S,value:U,easing:$}=A[O];x.push(U),N.push(Mt(0,f,S)),I.push($||"easeOut")}N[0]!==0&&(N.unshift(0),x.unshift(x[0]),I.unshift(ua)),N[N.length-1]!==1&&(N.push(1),x.push(null)),c.has(v)||c.set(v,{keyframes:{},transition:{}});const L=c.get(v);L.keyframes[y]=x,L.transition[y]=H(J(H({},t),{duration:f,ease:I,times:N}),e)}}),c}function jr(r,t){return!t.has(r)&&t.set(r,{}),t.get(r)}function Hr(r,t){return t[r]||(t[r]=[]),t[r]}function fa(r){return Array.isArray(r)?r:[r]}function ma(r,t){return r&&r[t]?H(H({},r),r[t]):H({},r)}const va=r=>typeof r=="number",ga=r=>r.every(va),Ze=new WeakMap,ya=r=>Array.isArray(r);function Kr(r){const t=[{},{}];return r==null||r.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Wr(r,t,e,n){if(typeof t=="function"){const[a,i]=Kr(n);t=t(e!==void 0?e:r.custom,a,i)}if(typeof t=="string"&&(t=r.variants&&r.variants[t]),typeof t=="function"){const[a,i]=Kr(n);t=t(e!==void 0?e:r.custom,a,i)}return t}function ba(r,t,e){const n=r.getProps();return Wr(n,t,n.custom,r)}const yt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function _a(r,t){let e=new Set,n=new Set,a=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(d){s.has(d)&&(l.schedule(d),r()),d(o)}const l={schedule:(d,u=!1,h=!1)=>{const f=h&&a?e:n;return u&&s.add(d),f.has(d)||f.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(o=d,a){i=!0;return}a=!0,[e,n]=[n,e],e.forEach(c),e.clear(),a=!1,i&&(i=!1,l.process(d))}};return l}const xe={},Ea=40;function Ca(r,t){let e=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>e=!0,s=yt.reduce((x,N)=>(x[N]=_a(i),x),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:d,update:u,preRender:h,render:p,postRender:f}=s,m=()=>{const x=xe.useManualTiming?a.timestamp:performance.now();e=!1,xe.useManualTiming||(a.delta=n?1e3/60:Math.max(Math.min(x-a.timestamp,Ea),1)),a.timestamp=x,a.isProcessing=!0,o.process(a),c.process(a),l.process(a),d.process(a),u.process(a),h.process(a),p.process(a),f.process(a),a.isProcessing=!1,e&&t&&(n=!1,r(m))},v=()=>{e=!0,n=!0,a.isProcessing||r(m)};return{schedule:yt.reduce((x,N)=>{const I=s[N];return x[N]=(L,O=!1,S=!1)=>(e||v(),I.schedule(L,O,S)),x},{}),cancel:x=>{for(let N=0;N<yt.length;N++)s[yt[N]].cancel(x)},state:a,steps:s}}const Ue=r=>r,{schedule:Oe,cancel:Ft,state:bt}=Ca(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:Ue,!0);let _t;function wa(){_t=void 0}const be={now:()=>(_t===void 0&&be.set(bt.isProcessing||xe.useManualTiming?bt.timestamp:performance.now()),_t),set:r=>{_t=r,queueMicrotask(wa)}},Yr=new Set;function $r(r,t,e){r||Yr.has(t)||(console.warn(t),Yr.add(t))}class Gr{constructor(){this.subscriptions=[]}add(t){return sa(this.subscriptions,t),()=>Fr(this.subscriptions,t)}notify(t,e,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,e,n);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function qr(r,t){return t?r*(1e3/t):0}const Qr=30,Aa=r=>!isNaN(parseFloat(r));class Ta{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,a=!0)=>{var s,o;const i=be.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();a&&((o=this.events.renderRequest)==null||o.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=be.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Aa(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&$r(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Gr);const n=this.events[t].add(e);return t==="change"?()=>{n(),Oe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){!e||!this.passiveEffect?this.updateAndNotify(t,e):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Qr)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Qr);return qr(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,e;(t=this.dependents)==null||t.clear(),(e=this.events.destroy)==null||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Je(r,t){return new Ta(r,t)}function Ia(r,t,e){r.hasValue(t)?r.getValue(t).set(e):r.addValue(t,Je(e))}function xa(r){return ya(r)?r[r.length-1]||0:r}function Oa(r,t){let s=ba(r,t)||{},{transitionEnd:n={},transition:a={}}=s,i=Ae(s,["transitionEnd","transition"]);i=H(H({},i),n);for(const o in i){const c=xa(i[o]);Ia(r,o,c)}}function Na(r){return!!(ve(r)&&r.add)}function Pa(r,t){const e=r.getValue("willChange");if(Na(e))return e.add(t);if(!e&&xe.WillChange){const n=new xe.WillChange("auto");r.addValue("willChange",n),n.add(t)}}const Ut=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),La="data-"+Ut("framerAppearId");function Ra(r){return r.props[La]}const ka=r=>r!==null;function Sa(r,{repeat:t,repeatType:e="loop"},n){const a=r.filter(ka),i=t&&e!=="loop"&&t%2===1?0:a.length-1;return a[i]}const Be=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ze=new Set(Be),Ma={type:"spring",stiffness:500,damping:25,restSpeed:10},Da=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),Va={type:"keyframes",duration:.8},Fa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ua=(r,{keyframes:t})=>t.length>2?Va:ze.has(r)?r.startsWith("scale")?Da(t[1]):Ma:Fa;function Ba(u){var h=u,{when:r,delay:t,delayChildren:e,staggerChildren:n,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:c,elapsed:l}=h,d=Ae(h,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}function Xr(r,t){var e,n;return(n=(e=r==null?void 0:r[t])!=null?e:r==null?void 0:r.default)!=null?n:r}const Zr=r=>t=>typeof t=="string"&&t.startsWith(r),Jr=Zr("--"),za=Zr("var(--"),Bt=r=>za(r)?ja.test(r.split("/*")[0].trim()):!1,ja=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ke=(r,t,e)=>e>t?t:e<r?r:e,je={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},et=J(H({},je),{transform:r=>ke(0,1,r)}),Et=J(H({},je),{default:1}),tt=r=>Math.round(r*1e5)/1e5,zt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ha(r){return r==null}const Ka=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jt=(r,t)=>e=>!!(typeof e=="string"&&Ka.test(e)&&e.startsWith(r)||t&&!Ha(e)&&Object.prototype.hasOwnProperty.call(e,t)),en=(r,t,e)=>n=>{if(typeof n!="string")return n;const[a,i,s,o]=n.match(zt);return{[r]:parseFloat(a),[t]:parseFloat(i),[e]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},Wa=r=>ke(0,255,r),Ht=J(H({},je),{transform:r=>Math.round(Wa(r))}),Se={test:jt("rgb","red"),parse:en("red","green","blue"),transform:({red:r,green:t,blue:e,alpha:n=1})=>"rgba("+Ht.transform(r)+", "+Ht.transform(t)+", "+Ht.transform(e)+", "+tt(et.transform(n))+")"};function Ya(r){let t="",e="",n="",a="";return r.length>5?(t=r.substring(1,3),e=r.substring(3,5),n=r.substring(5,7),a=r.substring(7,9)):(t=r.substring(1,2),e=r.substring(2,3),n=r.substring(3,4),a=r.substring(4,5),t+=t,e+=e,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const Kt={test:jt("#"),parse:Ya,transform:Se.transform},rt=r=>({test:t=>typeof t=="string"&&t.endsWith(r)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${r}`}),Ne=rt("deg"),He=rt("%"),X=rt("px"),$a=rt("vh"),Ga=rt("vw"),tn=J(H({},He),{parse:r=>He.parse(r)/100,transform:r=>He.transform(r*100)}),Ke={test:jt("hsl","hue"),parse:en("hue","saturation","lightness"),transform:({hue:r,saturation:t,lightness:e,alpha:n=1})=>"hsla("+Math.round(r)+", "+He.transform(tt(t))+", "+He.transform(tt(e))+", "+tt(et.transform(n))+")"},fe={test:r=>Se.test(r)||Kt.test(r)||Ke.test(r),parse:r=>Se.test(r)?Se.parse(r):Ke.test(r)?Ke.parse(r):Kt.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Se.transform(r):Ke.transform(r)},qa=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Qa(r){var t,e;return isNaN(r)&&typeof r=="string"&&(((t=r.match(zt))==null?void 0:t.length)||0)+(((e=r.match(qa))==null?void 0:e.length)||0)>0}const rn="number",nn="color",Xa="var",Za="var(",an="${}",Ja=/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 nt(r){const t=r.toString(),e=[],n={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(Ja,c=>(fe.test(c)?(n.color.push(i),a.push(nn),e.push(fe.parse(c))):c.startsWith(Za)?(n.var.push(i),a.push(Xa),e.push(c)):(n.number.push(i),a.push(rn),e.push(parseFloat(c))),++i,an)).split(an);return{values:e,split:o,indexes:n,types:a}}function sn(r){return nt(r).values}function on(r){const{split:t,types:e}=nt(r),n=t.length;return a=>{let i="";for(let s=0;s<n;s++)if(i+=t[s],a[s]!==void 0){const o=e[s];o===rn?i+=tt(a[s]):o===nn?i+=fe.transform(a[s]):i+=a[s]}return i}}const es=r=>typeof r=="number"?0:r;function ts(r){const t=sn(r);return on(r)(t.map(es))}const We={test:Qa,parse:sn,createTransformer:on,getAnimatableNone:ts};function Wt(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*(2/3-e)*6:r}function rs({hue:r,saturation:t,lightness:e,alpha:n}){r/=360,t/=100,e/=100;let a=0,i=0,s=0;if(!t)a=i=s=e;else{const o=e<.5?e*(1+t):e+t-e*t,c=2*e-o;a=Wt(c,o,r+1/3),i=Wt(c,o,r),s=Wt(c,o,r-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:n}}function Ct(r,t){return e=>e>0?t:r}const Yt=(r,t,e)=>{const n=r*r,a=e*(t*t-n)+n;return a<0?0:Math.sqrt(a)},ns=[Kt,Se,Ke],is=r=>ns.find(t=>t.test(r));function cn(r){const t=is(r);if(Xe(!!t,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let e=t.parse(r);return t===Ke&&(e=rs(e)),e}const ln=(r,t)=>{const e=cn(r),n=cn(t);if(!e||!n)return Ct(r,t);const a=H({},e);return i=>(a.red=Yt(e.red,n.red,i),a.green=Yt(e.green,n.green,i),a.blue=Yt(e.blue,n.blue,i),a.alpha=Qe(e.alpha,n.alpha,i),Se.transform(a))},$t=new Set(["none","hidden"]);function as(r,t){return $t.has(r)?e=>e<=0?r:t:e=>e>=1?t:r}const ss=(r,t)=>e=>t(r(e)),Gt=(...r)=>r.reduce(ss);function os(r,t){return e=>Qe(r,t,e)}function qt(r){return typeof r=="number"?os:typeof r=="string"?Bt(r)?Ct:fe.test(r)?ln:ds:Array.isArray(r)?dn:typeof r=="object"?fe.test(r)?ln:cs:Ct}function dn(r,t){const e=[...r],n=e.length,a=r.map((i,s)=>qt(i)(i,t[s]));return i=>{for(let s=0;s<n;s++)e[s]=a[s](i);return e}}function cs(r,t){const e=H(H({},r),t),n={};for(const a in e)r[a]!==void 0&&t[a]!==void 0&&(n[a]=qt(r[a])(r[a],t[a]));return a=>{for(const i in n)e[i]=n[i](a);return e}}function ls(r,t){var a;const e=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=r.indexes[s][n[s]],c=(a=r.values[o])!=null?a:0;e[i]=c,n[s]++}return e}const ds=(r,t)=>{const e=We.createTransformer(t),n=nt(r),a=nt(t);return n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length?$t.has(r)&&!a.values.length||$t.has(t)&&!n.values.length?as(r,t):Gt(dn(ls(n,a),a.values),e):(Xe(!0,`Complex values '${r}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ct(r,t))};function un(r,t,e){return typeof r=="number"&&typeof t=="number"&&typeof e=="number"?Qe(r,t,e):qt(r)(r,t)}const us=r=>{const t=({timestamp:e})=>r(e);return{start:(e=!0)=>Oe.update(t,e),stop:()=>Ft(t),now:()=>bt.isProcessing?bt.timestamp:be.now()}},pn=(r,t,e=10)=>{let n="";const a=Math.max(Math.round(t/e),2);for(let i=0;i<a;i++)n+=r(i/(a-1))+", ";return`linear(${n.substring(0,n.length-2)})`},ps=5;function hn(r,t,e){const n=Math.max(t-ps,0);return qr(e-r(n),t-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},Qt=.001;function hs({duration:r=oe.duration,bounce:t=oe.bounce,velocity:e=oe.velocity,mass:n=oe.mass}){let a,i;Xe(r<=Ce(oe.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=ke(oe.minDamping,oe.maxDamping,s),r=ke(oe.minDuration,oe.maxDuration,Te(r)),s<1?(a=l=>{const d=l*s,u=d*r,h=d-e,p=Xt(l,s),f=Math.exp(-u);return Qt-h/p*f},i=l=>{const u=l*s*r,h=u*e+e,p=Math.pow(s,2)*Math.pow(l,2)*r,f=Math.exp(-u),m=Xt(Math.pow(l,2),s);return(-a(l)+Qt>0?-1:1)*((h-p)*f)/m}):(a=l=>{const d=Math.exp(-l*r),u=(l-e)*r+1;return-Qt+d*u},i=l=>{const d=Math.exp(-l*r),u=(e-l)*(r*r);return d*u});const o=5/r,c=ms(a,i,o);if(r=Ce(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 fs=12;function ms(r,t,e){let n=e;for(let a=1;a<fs;a++)n=n-r(n)/t(n);return n}function Xt(r,t){return r*Math.sqrt(1-t*t)}const vs=["duration","bounce"],gs=["stiffness","damping","mass"];function fn(r,t){return t.some(e=>r[e]!==void 0)}function ys(r){let t=H({velocity:oe.velocity,stiffness:oe.stiffness,damping:oe.damping,mass:oe.mass,isResolvedFromDuration:!1},r);if(!fn(r,gs)&&fn(r,vs))if(r.visualDuration){const e=r.visualDuration,n=2*Math.PI/(e*1.2),a=n*n,i=2*ke(.05,1,1-(r.bounce||0))*Math.sqrt(a);t=J(H({},t),{mass:oe.mass,stiffness:a,damping:i})}else{const e=hs(r);t=J(H(H({},t),e),{mass:oe.mass}),t.isResolvedFromDuration=!0}return t}function it(r=oe.visualDuration,t=oe.bounce){const e=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:t}:r;let{restSpeed:n,restDelta:a}=e;const i=e.keyframes[0],s=e.keyframes[e.keyframes.length-1],o={done:!1,value:i},{stiffness:c,damping:l,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=ys(J(H({},e),{velocity:-Te(e.velocity||0)})),f=h||0,m=l/(2*Math.sqrt(c*d)),v=s-i,y=Te(Math.sqrt(c/d)),A=Math.abs(v)<5;n||(n=A?oe.restSpeed.granular:oe.restSpeed.default),a||(a=A?oe.restDelta.granular:oe.restDelta.default);let x;if(m<1){const I=Xt(y,m);x=L=>{const O=Math.exp(-m*y*L);return s-O*((f+m*y*v)/I*Math.sin(I*L)+v*Math.cos(I*L))}}else if(m===1)x=I=>s-Math.exp(-y*I)*(v+(f+y*v)*I);else{const I=y*Math.sqrt(m*m-1);x=L=>{const O=Math.exp(-m*y*L),S=Math.min(I*L,300);return s-O*((f+m*y*v)*Math.sinh(S)+I*v*Math.cosh(S))/I}}const N={calculatedDuration:p&&u||null,next:I=>{const L=x(I);if(p)o.done=I>=u;else{let O=I===0?f:0;m<1&&(O=I===0?Ce(f):hn(x,I,L));const S=Math.abs(O)<=n,U=Math.abs(s-L)<=a;o.done=S&&U}return o.value=o.done?s:L,o},toString:()=>{const I=Math.min(Vt(N),gt),L=pn(O=>N.next(I*O).value,I,30);return I+"ms "+L},toTransition:()=>{}};return N}it.applyToOptions=r=>{const t=zr(r,100,it);return r.ease=t.ease,r.duration=Ce(t.duration),r.type="keyframes",r};function Zt({keyframes:r,velocity:t=0,power:e=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:c,restDelta:l=.5,restSpeed:d}){const u=r[0],h={done:!1,value:u},p=S=>o!==void 0&&S<o||c!==void 0&&S>c,f=S=>o===void 0?c:c===void 0||Math.abs(o-S)<Math.abs(c-S)?o:c;let m=e*t;const v=u+m,y=s===void 0?v:s(v);y!==v&&(m=y-u);const A=S=>-m*Math.exp(-S/n),x=S=>y+A(S),N=S=>{const U=A(S),$=x(S);h.done=Math.abs(U)<=l,h.value=h.done?y:$};let I,L;const O=S=>{p(h.value)&&(I=S,L=it({keyframes:[h.value,f(h.value)],velocity:hn(x,S,h.value),damping:a,stiffness:i,restDelta:l,restSpeed:d}))};return O(0),{calculatedDuration:null,next:S=>{let U=!1;return!L&&I===void 0&&(U=!0,N(S),O(S)),I!==void 0&&S>=I?L.next(S-I):(!U&&N(S),h)}}}function bs(r,t,e){const n=[],a=e||xe.mix||un,i=r.length-1;for(let s=0;s<i;s++){let o=a(r[s],r[s+1]);if(t){const c=Array.isArray(t)?t[s]||Ue:t;o=Gt(c,o)}n.push(o)}return n}function _s(r,t,{clamp:e=!0,ease:n,mixer:a}={}){const i=r.length;if(Ie(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=r[0]===r[1];r[0]>r[i-1]&&(r=[...r].reverse(),t=[...t].reverse());const o=bs(t,n,a),c=o.length,l=d=>{if(s&&d<r[0])return t[0];let u=0;if(c>1)for(;u<r.length-2&&!(d<r[u+1]);u++);const h=Mt(r[u],r[u+1],d);return o[u](h)};return e?d=>l(ke(r[0],r[i-1],d)):l}function Es(r,t){return r.map(e=>e*t)}const mn=(r,t,e)=>(((1-3*e+3*t)*r+(3*e-6*t))*r+3*t)*r,Cs=1e-7,ws=12;function As(r,t,e,n,a){let i,s,o=0;do s=t+(e-t)/2,i=mn(s,n,a)-r,i>0?e=s:t=s;while(Math.abs(i)>Cs&&++o<ws);return s}function at(r,t,e,n){if(r===t&&e===n)return Ue;const a=i=>As(i,0,1,r,e);return i=>i===0||i===1?i:mn(a(i),t,n)}const Ts=at(.42,0,1,1),Is=at(0,0,.58,1),vn=at(.42,0,.58,1),gn=r=>t=>t<=.5?r(2*t)/2:(2-r(2*(1-t)))/2,yn=r=>t=>1-r(1-t),bn=at(.33,1.53,.69,.99),Jt=yn(bn),_n=gn(Jt),En=r=>(r*=2)<1?.5*Jt(r):.5*(2-Math.pow(2,-10*(r-1))),er=r=>1-Math.sin(Math.acos(r)),xs=yn(er),Cn=gn(er),wn=r=>Array.isArray(r)&&typeof r[0]=="number",An={linear:Ue,easeIn:Ts,easeInOut:vn,easeOut:Is,circIn:er,circInOut:Cn,circOut:xs,backIn:Jt,backInOut:_n,backOut:bn,anticipate:En},Os=r=>typeof r=="string",Tn=r=>{if(wn(r)){Ie(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,e,n,a]=r;return at(t,e,n,a)}else if(Os(r))return Ie(An[r]!==void 0,`Invalid easing type '${r}'`),An[r];return r};function Ns(r,t){return r.map(()=>t||vn).splice(0,r.length-1)}function Ye({duration:r=300,keyframes:t,times:e,ease:n="easeInOut"}){const a=Dr(n)?n.map(Tn):Tn(n),i={done:!1,value:t[0]},s=Es(e&&e.length===t.length?e:Br(t),r),o=_s(s,t,{ease:Array.isArray(a)?a:Ns(t,a)});return{calculatedDuration:r,next:c=>(i.value=o(c),i.done=c>=r,i)}}const Ps=r=>r!==null;function tr(r,{repeat:t,repeatType:e="loop"},n,a=1){const i=r.filter(Ps),o=a<0||t&&e!=="loop"&&t%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const Ls={decay:Zt,inertia:Zt,tween:Ye,keyframes:Ye,spring:it};function In(r){typeof r.type=="string"&&(r.type=Ls[r.type])}class rr{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Rs=r=>r/100;class nr extends rr{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,a;const{motionValue:e}=this.options;e&&e.updatedAt!==be.now()&&this.tick(be.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(n=this.options).onStop)==null||a.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;In(t);const{type:e=Ye,repeat:n=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=t;let{keyframes:o}=t;const c=e||Ye;process.env.NODE_ENV!=="production"&&c!==Ye&&Ie(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),c!==Ye&&typeof o[0]!="number"&&(this.mixKeyframes=Gt(Rs,un(o[0],o[1])),o=[0,100]);const l=c(J(H({},t),{keyframes:o}));i==="mirror"&&(this.mirroredGenerator=c(J(H({},t),{keyframes:[...o].reverse(),velocity:-s}))),l.calculatedDuration===null&&(l.calculatedDuration=Vt(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(n+1)-a,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:a,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?y<0:y>a;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let x=this.currentTime,N=n;if(u){const S=Math.min(this.currentTime,a)/o;let U=Math.floor(S),$=S%1;!$&&S>=1&&($=1),$===1&&U--,U=Math.min(U,u+1),!!(U%2)&&(h==="reverse"?($=1-$,p&&($-=p/o)):h==="mirror"&&(N=s)),x=ke(0,1,$)*o}const I=A?{done:!1,value:d[0]}:N.next(x);i&&(I.value=i(I.value));let{done:L}=I;!A&&c!==null&&(L=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return O&&f!==Zt&&(I.value=tr(d,this.options,v,this.speed)),m&&m(I.value),O&&this.finish(),I}then(t,e){return this.finished.then(t,e)}get duration(){return Te(this.calculatedDuration)}get time(){return Te(this.currentTime)}set time(t){var e;t=Ce(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(e=this.driver)==null||e.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(be.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Te(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=us,startTime:e}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(i=(a=this.options).onPlay)==null||i.call(a);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e!=null?e:n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(be.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,e;this.notifyFinished(),this.teardown(),this.state="finished",(e=(t=this.options).onComplete)==null||e.call(t)}cancel(){var t,e;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(e=(t=this.options).onCancel)==null||e.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var e;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(e=this.driver)==null||e.stop(),t.observe(this)}}function ks(r){var t;for(let e=1;e<r.length;e++)(t=r[e])!=null||(r[e]=r[e-1])}const Me=r=>r*180/Math.PI,ir=r=>{const t=Me(Math.atan2(r[1],r[0]));return ar(t)},Ss={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:ir,rotateZ:ir,skewX:r=>Me(Math.atan(r[1])),skewY:r=>Me(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},ar=r=>(r=r%360,r<0&&(r+=360),r),xn=ir,On=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),Nn=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),Ms={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:On,scaleY:Nn,scale:r=>(On(r)+Nn(r))/2,rotateX:r=>ar(Me(Math.atan2(r[6],r[5]))),rotateY:r=>ar(Me(Math.atan2(-r[2],r[0]))),rotateZ:xn,rotate:xn,skewX:r=>Me(Math.atan(r[4])),skewY:r=>Me(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function sr(r){return r.includes("scale")?1:0}function or(r,t){if(!r||r==="none")return sr(t);const e=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,a;if(e)n=Ms,a=e;else{const o=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Ss,a=o}if(!a)return sr(t);const i=n[t],s=a[1].split(",").map(Vs);return typeof i=="function"?i(s):s[i]}const Ds=(r,t)=>{const{transform:e="none"}=getComputedStyle(r);return or(e,t)};function Vs(r){return parseFloat(r.trim())}const Pn=r=>r===je||r===X,Fs=new Set(["x","y","z"]),Us=Be.filter(r=>!Fs.has(r));function Bs(r){const t=[];return Us.forEach(e=>{const n=r.getValue(e);n!==void 0&&(t.push([e,n.get()]),n.set(e.startsWith("scale")?1:0))}),t}const De={width:({x:r},{paddingLeft:t="0",paddingRight:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),height:({y:r},{paddingTop:t="0",paddingBottom:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),top:(r,{top:t})=>parseFloat(t),left:(r,{left:t})=>parseFloat(t),bottom:({y:r},{top:t})=>parseFloat(t)+(r.max-r.min),right:({x:r},{left:t})=>parseFloat(t)+(r.max-r.min),x:(r,{transform:t})=>or(t,"x"),y:(r,{transform:t})=>or(t,"y")};De.translateX=De.x,De.translateY=De.y;const Ve=new Set;let cr=!1,lr=!1,dr=!1;function Ln(){if(lr){const r=Array.from(Ve).filter(n=>n.needsMeasurement),t=new Set(r.map(n=>n.element)),e=new Map;t.forEach(n=>{const a=Bs(n);a.length&&(e.set(n,a),n.render())}),r.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const a=e.get(n);a&&a.forEach(([i,s])=>{var o;(o=n.getValue(i))==null||o.set(s)})}),r.forEach(n=>n.measureEndState()),r.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}lr=!1,cr=!1,Ve.forEach(r=>r.complete(dr)),Ve.clear()}function Rn(){Ve.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(lr=!0)})}function zs(){dr=!0,Rn(),Ln(),dr=!1}class ur{constructor(t,e,n,a,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Ve.add(this),cr||(cr=!0,Oe.read(Rn),Oe.resolveKeyframes(Ln))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:a}=this;if(t[0]===null){const i=a==null?void 0:a.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&e){const o=n.readValue(e,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),a&&i===void 0&&a.set(t[0])}ks(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ve.delete(this)}cancel(){this.state==="scheduled"&&(Ve.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const js=r=>r.startsWith("--");function Hs(r,t,e){js(t)?r.style.setProperty(t,e):r.style[t]=e}function pr(r){let t;return()=>(t===void 0&&(t=r()),t)}const Ks=pr(()=>window.ScrollTimeline!==void 0),Ws={};function Ys(r,t){const e=pr(r);return()=>{var n;return(n=Ws[t])!=null?n:e()}}const kn=Ys(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),st=([r,t,e,n])=>`cubic-bezier(${r}, ${t}, ${e}, ${n})`,Sn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:st([0,.65,.55,1]),circOut:st([.55,0,1,.45]),backIn:st([.31,.01,.66,-.59]),backOut:st([.33,1.53,.69,.99])};function Mn(r,t){if(r)return typeof r=="function"?kn()?pn(r,t):"ease-out":wn(r)?st(r):Array.isArray(r)?r.map(e=>Mn(e,t)||Sn.easeOut):Sn[r]}function $s(r,t,e,{delay:n=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeOut",times:c}={},l=void 0){const d={[t]:e};c&&(d.offset=c);const u=Mn(o,a);Array.isArray(u)&&(d.easing=u);const h={delay:n,duration:a,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),r.animate(d,h)}function Gs(e){var n=e,{type:r}=n,t=Ae(n,["type"]);var a,i;return Dt(r)&&kn()?r.applyToOptions(t):((a=t.duration)!=null||(t.duration=300),(i=t.ease)!=null||(t.ease="easeOut"),t)}class qs extends rr{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:a,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:o,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,Ie(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const l=Gs(t);this.animation=$s(e,n,a,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=tr(a,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):Hs(e,n,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,e;(e=(t=this.animation).finish)==null||e.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,e;this.isPseudoElement||(e=(t=this.animation).commitStyles)==null||e.call(t)}get duration(){var e,n;const t=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return Te(Number(t))}get time(){return Te(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ks()?(this.animation.timeline=t,Ue):e(this)}}const Dn={anticipate:En,backInOut:_n,circInOut:Cn};function Qs(r){return r in Dn}function Xs(r){typeof r.ease=="string"&&Qs(r.ease)&&(r.ease=Dn[r.ease])}const Vn=10;class Zs extends qs{constructor(t){Xs(t),In(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){var d;const l=this.options,{motionValue:e,onUpdate:n,onComplete:a,element:i}=l,s=Ae(l,["motionValue","onUpdate","onComplete","element"]);if(!e)return;if(t!==void 0){e.set(t);return}const o=new nr(J(H({},s),{autoplay:!1})),c=Ce((d=this.finishedTime)!=null?d:this.time);e.setWithVelocity(o.sample(c-Vn).value,o.sample(c).value,Vn),o.stop()}}const Fn=(r,t)=>t==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&(We.test(r)||r==="0")&&!r.startsWith("url("));function Js(r){const t=r[0];if(r.length===1)return!0;for(let e=0;e<r.length;e++)if(r[e]!==t)return!0}function eo(r,t,e,n){const a=r[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=r[r.length-1],s=Fn(a,t),o=Fn(i,t);return Xe(s===o,`You are trying to animate ${t} from "${a}" to "${i}". ${a} is not an animatable value - to enable this animation set ${a} to a value animatable to ${i} via the \`style\` property.`),!s||!o?!1:Js(r)||(e==="spring"||Dt(e))&&n}function Un(r){return typeof r=="object"&&r!==null}function to(r){return Un(r)&&"offsetHeight"in r}const ro=new Set(["opacity","clipPath","filter","transform"]),no=pr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function io(r){var l;const{motionValue:t,name:e,repeatDelay:n,repeatType:a,damping:i,type:s}=r;if(!to((l=t==null?void 0:t.owner)==null?void 0:l.current))return!1;const{onUpdate:o,transformTemplate:c}=t.owner.getProps();return no()&&e&&ro.has(e)&&(e!=="transform"||!c)&&!o&&!n&&a!=="mirror"&&i!==0&&s!=="inertia"}const ao=40;class so extends rr{constructor(h){var p=h,{autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",keyframes:o,name:c,motionValue:l,element:d}=p,u=Ae(p,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var 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 f=H({autoplay:t,delay:e,type:n,repeat:a,repeatDelay:i,repeatType:s,name:c,motionValue:l,element:d},u),m=(d==null?void 0:d.KeyframeResolver)||ur;this.keyframeResolver=new m(o,(y,A,x)=>this.onKeyframesResolved(y,A,f,!x),c,l,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,e,n,a){this.keyframeResolver=void 0;const{name:i,type:s,velocity:o,delay:c,isHandoff:l,onUpdate:d}=n;this.resolvedAt=be.now(),eo(t,i,s,o)||((xe.instantAnimations||!c)&&(d==null||d(tr(t,n,e))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u=a?this.resolvedAt?this.resolvedAt-this.createdAt>ao?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=J(H({startTime:u,finalKeyframe:e},n),{keyframes:t}),p=!l&&io(h)?new Zs(J(H({},h),{element:h.motionValue.owner.current})):new nr(h);p.finished.then(()=>this.notifyFinished()).catch(Ue),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),zs()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Bn=(r,t,e,n={},a,i)=>s=>{const o=Xr(n,r)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Ce(c);const d=J(H({keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity()},o),{delay:-l,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:r,motionValue:t,element:i?void 0:a});Ba(o)||Object.assign(d,Ua(r,d)),d.duration&&(d.duration=Ce(d.duration)),d.repeatDelay&&(d.repeatDelay=Ce(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),(xe.instantAnimations||xe.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!i&&t.get()!==void 0){const h=Sa(d.keyframes,o);if(h!==void 0){Oe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new nr(d):new so(d)},zn=new Set(["width","height","top","left","right","bottom",...Be]);function oo({protectedKeys:r,needsAnimating:t},e){const n=r.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,n}function co(r,t,{delay:e=0,transitionOverride:n,type:a}={}){var u;let d=t,{transition:i=r.getDefaultTransition(),transitionEnd:s}=d,o=Ae(d,["transition","transitionEnd"]);n&&(i=n);const c=[],l=a&&r.animationState&&r.animationState.getState()[a];for(const h in o){const p=r.getValue(h,(u=r.latestValues[h])!=null?u:null),f=o[h];if(f===void 0||l&&oo(l,h))continue;const m=H({delay:e},Xr(i||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(f)&&f===v&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const x=Ra(r);if(x){const N=window.MotionHandoffAnimation(x,h,Oe);N!==null&&(m.startTime=N,y=!0)}}Pa(r,h),p.start(Bn(h,p,f,r.shouldReduceMotion&&zn.has(h)?{type:!1}:m,r,y));const A=p.animation;A&&c.push(A)}return s&&Promise.all(c).then(()=>{Oe.update(()=>{s&&Oa(r,s)})}),c}function lo({top:r,left:t,right:e,bottom:n}){return{x:{min:t,max:e},y:{min:r,max:n}}}function uo(r,t){if(!t)return r;const e=t({x:r.left,y:r.top}),n=t({x:r.right,y:r.bottom});return{top:e.y,left:e.x,bottom:n.y,right:n.x}}function po(r,t){return lo(uo(r.getBoundingClientRect(),t))}const jn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},hr={};for(const r in jn)hr[r]={isEnabled:t=>jn[r].some(e=>!!t[e])};const Hn=()=>({min:0,max:0}),fr=()=>({x:Hn(),y:Hn()}),ho=typeof window!="undefined",mr={current:null},Kn={current:!1};function fo(){if(Kn.current=!0,!!ho)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),t=()=>mr.current=r.matches;r.addListener(t),t()}else mr.current=!1}function mo(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function vo(r){return typeof r=="string"||Array.isArray(r)}const go=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Wn(r){return mo(r.animate)||go.some(t=>vo(r[t]))}function yo(r){return!!(Wn(r)||r.variants)}function bo(r,t,e){for(const n in t){const a=t[n],i=e[n];if(ve(a))r.addValue(n,a);else if(ve(i))r.addValue(n,Je(a,{owner:r}));else if(i!==a)if(r.hasValue(n)){const s=r.getValue(n);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=r.getStaticValue(n);r.addValue(n,Je(s!==void 0?s:a,{owner:r}))}}for(const n in e)t[n]===void 0&&r.removeValue(n);return t}const Yn=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),$n=r=>/^0[^.\s]+$/u.test(r),_o={test:r=>r==="auto",parse:r=>r},Gn=r=>t=>t.test(r),qn=[je,X,He,Ne,Ga,$a,_o],Qn=r=>qn.find(Gn(r)),Eo=[...qn,fe,We],Co=r=>Eo.find(Gn(r)),wo=new Set(["brightness","contrast","saturate","opacity"]);function Ao(r){const[t,e]=r.slice(0,-1).split("(");if(t==="drop-shadow")return r;const[n]=e.match(zt)||[];if(!n)return r;const a=e.replace(n,"");let i=wo.has(t)?1:0;return n!==e&&(i*=100),t+"("+i+a+")"}const To=/\b([a-z-]*)\(.*?\)/gu,vr=J(H({},We),{getAnimatableNone:r=>{const t=r.match(To);return t?t.map(Ao).join(" "):r}}),Xn=J(H({},je),{transform:Math.round}),gr=J(H({borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,radius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,backgroundPositionX:X,backgroundPositionY:X},{rotate:Ne,rotateX:Ne,rotateY:Ne,rotateZ:Ne,scale:Et,scaleX:Et,scaleY:Et,scaleZ:Et,skew:Ne,skewX:Ne,skewY:Ne,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:et,originX:tn,originY:tn,originZ:X}),{zIndex:Xn,fillOpacity:et,strokeOpacity:et,numOctaves:Xn}),Io=J(H({},gr),{color:fe,backgroundColor:fe,outlineColor:fe,fill:fe,stroke:fe,borderColor:fe,borderTopColor:fe,borderRightColor:fe,borderBottomColor:fe,borderLeftColor:fe,filter:vr,WebkitFilter:vr}),Zn=r=>Io[r];function Jn(r,t){let e=Zn(r);return e!==vr&&(e=We),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const ei=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ti{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ur,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=be.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Oe.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=s;this.latestValues=c,this.baseTarget=H({},c),this.initialValues=e.initial?H({},c):{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Wn(e),this.isVariantNode=yo(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const h=this.scrapeMotionValuesFromProps(e,{},this),{willChange:d}=h,u=Ae(h,["willChange"]);for(const p in u){const f=u[p];c[p]!==void 0&&ve(f)&&f.set(c[p],!1)}}mount(t){this.current=t,Ze.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,n)=>this.bindToMotionValue(n,e)),Kn.current||fo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:mr.current,process.env.NODE_ENV!=="production"&&$r(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ft(this.notifyUpdate),Ft(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=ze.has(t);n&&this.onBindTransform&&this.onBindTransform();const a=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Oe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in hr){const e=hr[t];if(!e)continue;const{isEnabled:n,Feature:a}=e;if(!this.features[t]&&a&&n(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):fr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<ei.length;n++){const a=ei[n];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,s=t[i];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=bo(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&e!==void 0&&(n=Je(e===null?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var a;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(a=this.getBaseTargetFromProps(this.props,t))!=null?a:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Yn(n)||$n(n))?n=parseFloat(n):!Co(n)&&We.test(e)&&(n=Jn(t,e)),this.setBaseTarget(t,ve(n)?n.get():n)),ve(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var i;const{initial:e}=this.props;let n;if(typeof e=="string"||typeof e=="object"){const s=Wr(this.props,e,(i=this.presenceContext)==null?void 0:i.custom);s&&(n=s[t])}if(e&&n!==void 0)return n;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ve(a)?a:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new Gr),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const xo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Oo(r){const t=xo.exec(r);if(!t)return[,];const[,e,n,a]=t;return[`--${e!=null?e:n}`,a]}const No=4;function ri(r,t,e=1){Ie(e<=No,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,a]=Oo(r);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const s=i.trim();return Yn(s)?parseFloat(s):s}return Bt(a)?ri(a,t,e+1):a}function Po(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||$n(r):!0}const Lo=new Set(["auto","none","0"]);function Ro(r,t,e){let n=0,a;for(;n<r.length&&!a;){const i=r[n];typeof i=="string"&&!Lo.has(i)&&nt(i).values.length&&(a=r[n]),n++}if(a&&e)for(const i of t)r[i]=Jn(e,a)}class ko extends ur{constructor(t,e,n,a,i){super(t,e,n,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),Bt(l))){const d=ri(l,e.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!zn.has(n)||t.length!==2)return;const[a,i]=t,s=Qn(a),o=Qn(i);if(s!==o)if(Pn(s)&&Pn(o))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else De[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let a=0;a<t.length;a++)(t[a]===null||Po(t[a]))&&n.push(a);n.length&&Ro(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=De[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const a=e[e.length-1];a!==void 0&&t.getValue(n,a).jump(a,!1)}measureEndState(){var o;const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const a=t.getValue(e);a&&a.jump(this.measuredOrigin,!1);const i=n.length-1,s=n[i];n[i]=De[e](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([c,l])=>{t.getValue(c).set(l)}),this.resolveNoneKeyframes()}}class ni extends ti{constructor(){super(...arguments),this.KeyframeResolver=ko}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ve(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const ii=(r,t)=>t&&typeof r=="number"?t.transform(r):r,So={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Mo=Be.length;function Do(r,t,e){let n="",a=!0;for(let i=0;i<Mo;i++){const s=Be[i],o=r[s];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(s.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||e){const l=ii(o,gr[s]);if(!c){a=!1;const d=So[s]||s;n+=`${d}(${l}) `}e&&(t[s]=l)}}return n=n.trim(),e?n=e(t,a?"":n):a&&(n="none"),n}function ai(r,t,e){const{style:n,vars:a,transformOrigin:i}=r;let s=!1,o=!1;for(const c in t){const l=t[c];if(ze.has(c)){s=!0;continue}else if(Jr(c)){a[c]=l;continue}else{const d=ii(l,gr[c]);c.startsWith("origin")?(o=!0,i[c]=d):n[c]=d}}if(t.transform||(s||e?n.transform=Do(t,r.transform,e):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:d=0}=i;n.transformOrigin=`${c} ${l} ${d}`}}function si(r,{style:t,vars:e},n,a){Object.assign(r.style,t,a&&a.getProjectionStyles(n));for(const i in e)r.style.setProperty(i,e[i])}const Vo={};function Fo(r,{layout:t,layoutId:e}){return ze.has(r)||r.startsWith("origin")||(t||e!==void 0)&&(!!Vo[r]||r==="opacity")}function oi(r,t,e){var i;const{style:n}=r,a={};for(const s in n)(ve(n[s])||t.style&&ve(t.style[s])||Fo(s,r)||((i=e==null?void 0:e.getValue(s))==null?void 0:i.liveStyle)!==void 0)&&(a[s]=n[s]);return a}function Uo(r){return window.getComputedStyle(r)}class Bo extends ni{constructor(){super(...arguments),this.type="html",this.renderInstance=si}readValueFromInstance(t,e){var n;if(ze.has(e))return(n=this.projection)!=null&&n.isProjecting?sr(e):Ds(t,e);{const a=Uo(t),i=(Jr(e)?a.getPropertyValue(e):a[e])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return po(t,e)}build(t,e,n){ai(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return oi(t,e,n)}}function zo(r,t){return r in t}class jo extends ti{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(zo(e,t)){const n=t[e];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return fr()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Ho={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ko={offset:"strokeDashoffset",array:"strokeDasharray"};function Wo(r,t,e=1,n=0,a=!0){r.pathLength=1;const i=a?Ho:Ko;r[i.offset]=X.transform(-n);const s=X.transform(t),o=X.transform(e);r[i.array]=`${s} ${o}`}function Yo(r,u,c,l,d){var h=u,{attrX:t,attrY:e,attrScale:n,pathLength:a,pathSpacing:i=1,pathOffset:s=0}=h,o=Ae(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var m,v;if(ai(r,o,l),c){r.style.viewBox&&(r.attrs.viewBox=r.style.viewBox);return}r.attrs=r.style,r.style={};const{attrs:p,style:f}=r;p.transform&&(f.transform=p.transform,delete p.transform),(f.transform||p.transformOrigin)&&(f.transformOrigin=(m=p.transformOrigin)!=null?m:"50% 50%",delete p.transformOrigin),f.transform&&(f.transformBox=(v=d==null?void 0:d.transformBox)!=null?v:"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),e!==void 0&&(p.y=e),n!==void 0&&(p.scale=n),a!==void 0&&Wo(p,a,i,s,!1)}const ci=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"]),$o=r=>typeof r=="string"&&r.toLowerCase()==="svg";function Go(r,t,e,n){si(r,t,void 0,n);for(const a in t.attrs)r.setAttribute(ci.has(a)?a:Ut(a),t.attrs[a])}function qo(r,t,e){const n=oi(r,t,e);for(const a in r)if(ve(r[a])||ve(t[a])){const i=Be.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;n[i]=r[a]}return n}class Qo extends ni{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=fr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(ze.has(e)){const n=Zn(e);return n&&n.default||0}return e=ci.has(e)?e:Ut(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return qo(t,e,n)}build(t,e,n){Yo(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,a){Go(t,e,n,a)}mount(t){this.isSVGTag=$o(t.tagName),super.mount(t)}}function li(r){return Un(r)&&"ownerSVGElement"in r}function Xo(r){return li(r)&&r.tagName==="svg"}function Zo(r){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=li(r)&&!Xo(r)?new Qo(t):new Bo(t);e.mount(r),Ze.set(r,e)}function Jo(r){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new jo(t);e.mount(r),Ze.set(r,e)}function ec(r,t,e){const n=ve(r)?r:Je(r);return n.start(Bn("",n,t,e)),n.animation}function tc(r,t){return ve(r)||typeof r=="number"||typeof r=="string"&&!St(t)}function di(r,t,e,n){const a=[];if(tc(r,t))a.push(ec(r,St(t)&&t.default||t,e&&(e.default||e)));else{const i=Sr(r,t,n),s=i.length;Ie(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const c=i[o],l=c instanceof Element?Zo:Jo;Ze.has(c)||l(c);const d=Ze.get(c),u=H({},e);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),a.push(...co(d,J(H({},t),{transition:u}),{}))}}return a}function rc(r,t,e){const n=[];return ha(r,t,e,{spring:it}).forEach(({keyframes:i,transition:s},o)=>{n.push(...di(o,i,s))}),n}class nc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(n=>n.attachTimeline(t));return()=>{e.forEach((n,a)=>{n&&n(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ic extends nc{then(t,e){return this.finished.finally(t).then(()=>{})}}function ac(r){return Array.isArray(r)&&r.some(Array.isArray)}function sc(r){function t(e,n,a){let i=[];return ac(e)?i=rc(e,n,r):i=di(e,n,a,r),new ic(i)}return t}const ue=sc(),te={spinner:"_spinner_4n5ur_1",spinnerContainer:"_spinnerContainer_4n5ur_5",success:"_success_4n5ur_9",successContainer:"_successContainer_4n5ur_14",container:"_container_4n5ur_57",card:"_card_4n5ur_66",warning:"_warning_4n5ur_75",svg:"_svg_4n5ur_83",srOnly:"_srOnly_4n5ur_88",backButton:"_backButton_4n5ur_92"};class ui{constructor(){C(this,"template",`
|
|
1
|
+
(function(ne,ie){typeof exports=="object"&&typeof module!="undefined"?ie(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],ie):(ne=typeof globalThis!="undefined"?globalThis:ne||self,ie(ne["PayNext SDK"]={},ne.React))})(this,function(ne,ie){"use strict";var zl=Object.defineProperty,jl=Object.defineProperties;var Hl=Object.getOwnPropertyDescriptors;var Pt=Object.getOwnPropertySymbols;var Bi=Object.prototype.hasOwnProperty,zi=Object.prototype.propertyIsEnumerable;var Pr=(ne,ie,ae)=>ie in ne?zl(ne,ie,{enumerable:!0,configurable:!0,writable:!0,value:ae}):ne[ie]=ae,H=(ne,ie)=>{for(var ae in ie||(ie={}))Bi.call(ie,ae)&&Pr(ne,ae,ie[ae]);if(Pt)for(var ae of Pt(ie))zi.call(ie,ae)&&Pr(ne,ae,ie[ae]);return ne},J=(ne,ie)=>jl(ne,Hl(ie));var Ae=(ne,ie)=>{var ae={};for(var ye in ne)Bi.call(ne,ye)&&ie.indexOf(ye)<0&&(ae[ye]=ne[ye]);if(ne!=null&&Pt)for(var ye of Pt(ne))ie.indexOf(ye)<0&&zi.call(ne,ye)&&(ae[ye]=ne[ye]);return ae};var C=(ne,ie,ae)=>Pr(ne,typeof ie!="symbol"?ie+"":ie,ae);var Y=(ne,ie,ae)=>new Promise((ye,Le)=>{var Lt=K=>{try{qe(ae.next(K))}catch(Re){Le(Re)}},vt=K=>{try{qe(ae.throw(K))}catch(Re){Le(Re)}},qe=K=>K.done?ye(K.value):Promise.resolve(K.value).then(Lt,vt);qe((ae=ae.apply(ne,ie)).next())});var ae=document.createElement("style");ae.textContent=`._spinner_4n5ur_1{height:100%;width:100%}@keyframes _spin_4n5ur_1{to{transform:rotate(360deg)}}._spinner_4n5ur_1{animation:_spin_4n5ur_1 1s linear infinite;fill:#9ca3af;--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}._spinner_4n5ur_1:is(._dark_4n5ur_1 *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}._spinnerContainer_4n5ur_5{height:40px;width:40px}._success_4n5ur_9{position:absolute;top:50%;left:50%;height:3.5rem;width:3.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));fill:#0d776e;z-index:3}._successContainer_4n5ur_14{position:relative;display:grid;height:5rem;width:5rem;flex:none;place-items:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(232 250 240 / var(--tw-bg-opacity, 1))}._successContainer_4n5ur_14:is(._dark_4n5ur_1 *){--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._successContainer_4n5ur_14{z-index:0;animation:_containerPulse_4n5ur_1 3s ease-in-out infinite}._successContainer_4n5ur_14:before,._successContainer_4n5ur_14:after{content:"";position:absolute;inset:0;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._successContainer_4n5ur_14:is(._dark_4n5ur_1 *):before,._successContainer_4n5ur_14:is(._dark_4n5ur_1 *):after{--tw-bg-opacity: 1;background-color:rgb(167 233 193 / var(--tw-bg-opacity, 1))}._successContainer_4n5ur_14:before,._successContainer_4n5ur_14:after{animation:_ripplePulse_4n5ur_1 3s cubic-bezier(.4,0,.6,1) infinite;opacity:0;z-index:1}._successContainer_4n5ur_14:after{animation-delay:.5s}@keyframes _containerPulse_4n5ur_1{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}@keyframes _ripplePulse_4n5ur_1{0%{transform:scale(1);opacity:0}10%{transform:scale(1);opacity:.7}to{transform:scale(1.3);opacity:0}}._container_4n5ur_57{width:30px;height:20px;display:flex;margin:0 1px;align-items:center;justify-content:center}._card_4n5ur_66{width:28px;height:19px;display:flex;margin:0 1px;align-items:center;justify-content:center}._warning_4n5ur_75{width:16px;height:16px;display:flex;align-items:center;justify-content:center}._svg_4n5ur_83{width:100%;height:100%}._srOnly_4n5ur_88{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}._backButton_4n5ur_92{width:30px;height:30px;display:flex;margin:0 1px;align-items:center;justify-content:center;background-color:#f4f4f5;border-radius:8px}._loader_nwq3e_1{position:absolute;height:100%;top:0;left:0;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);z-index:1000;display:flex;width:100%;align-items:center;justify-content:center;border-radius:10px}._checkout_lsspc_1{padding:0 2px;overflow:hidden;z-index:0;position:relative;height:auto;min-height:60px;width:100%;max-width:640px}._hidden_lsspc_8{display:none!important}._formInitial_lsspc_12{opacity:0;transform:translateY(100px)}._btnsInitial_lsspc_17{opacity:0;transform:translateY(-100px)}._buttons_1i8cu_1{display:grid;gap:.5rem}._hidden_1i8cu_5{display:none!important}._applePay_f1ztr_1{display:flex;flex-direction:column;gap:8px}@media (hover: hover){._applePay_f1ztr_1:hover{filter:contrast(.575) brightness(1.2)}}._hidden_f1ztr_28{display:none!important}._googlePay_1gtmg_1{display:flex;flex-direction:column;gap:8px;border-radius:12px;height:40px;overflow:hidden;background-color:#000}._hidden_1gtmg_11{display:none!important}._paypal_1p7d0_1{display:flex;flex-direction:column;gap:8px;height:40px;border-radius:12px;background-color:#ffc439}._hidden_1p7d0_10{display:none}._button_1bl11_1{transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(13 118 110 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:1.5rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_1bl11_1{transition-property:none}}._button_1bl11_1 span{margin-left:.25rem}@media (hover: hover){._button_1bl11_1:hover{opacity:.7}}._button_1bl11_1:active{transform:scale(.95)}._container_10ziz_2{display:flex;flex-direction:column;gap:.5rem}._venmo_10ziz_8{display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:12px;height:40px;background-color:#0088f7;width:100%;color:#fff;font-size:16px;text-align:center;cursor:pointer;transition:background-color .3s ease;svg{height:40%}@media (hover: hover){&:hover{background-color:#5683c1}}}._hidden_10ziz_35{display:none}._button_125my_1{cursor:pointer}._button_1lwej_1{margin-top:8px;transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(13 118 110 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_1lwej_1{transition-property:none}}._button_1lwej_1 span{margin-left:.25rem}._disabled_1lwej_18{opacity:.7}@media (hover: hover){._button_1lwej_1:hover{opacity:.7}}._press_1lwej_28:active{transform:scale(.95)}._hidden_1lwej_32{display:none!important}._spinner_1lwej_36{width:24px;height:24px}._cardForm_ydw03_1{position:relative;display:grid;min-height:250px;gap:.75rem;padding-top:0}._hidden_ydw03_5{display:none!important}._topOffset_ydw03_9{margin-top:.5rem}._wrapper_1gvzd_1{position:relative}._inputContainer_1gvzd_5{background-color:transparent;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;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;padding-left:.75rem;padding-right:.75rem}._inputContainer_1gvzd_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1gvzd_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1gvzd_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_1gvzd_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_1gvzd_13{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}@media (hover: hover){._inputContainer_1gvzd_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}}._inputContainer_1gvzd_5:focus-within:not(._errorInput_1gvzd_23):not(._disabled_1gvzd_23){box-shadow:0 0 0 2px color-mix(in srgb,var(--input-focus-shadow-color, #5A67D8) 30%,transparent)}._input_1gvzd_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_1gvzd_32{display:flex}._errorInput_1gvzd_23{--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_1gvzd_23: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_1gvzd_23: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_1gvzd_40{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_1gvzd_44{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_1gvzd_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_1gvzd_52{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_1gvzd_59{display:none!important}._wrapper_1dxfo_1{position:relative}._inputContainer_1dxfo_5{background-color:transparent;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;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;padding-left:.75rem;padding-right:.75rem}._inputContainer_1dxfo_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1dxfo_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1dxfo_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_1dxfo_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_1dxfo_13{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}@media (hover: hover){._inputContainer_1dxfo_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}}._inputContainer_1dxfo_5:focus-within:not(._errorInput_1dxfo_23):not(._disabled_1dxfo_23){box-shadow:0 0 0 2px color-mix(in srgb,var(--input-focus-shadow-color, #5A67D8) 30%,transparent)}._input_1dxfo_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_1dxfo_32{display:flex}._errorInput_1dxfo_23{--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_1dxfo_23: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_1dxfo_23: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_1dxfo_23{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_1dxfo_44{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_1dxfo_48{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_1dxfo_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_1dxfo_56{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_1dxfo_63{display:none!important}._wrapper_27yo3_1{position:relative}._inputContainer_27yo3_5{background-color:transparent;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;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;padding-left:.75rem;padding-right:.75rem}._inputContainer_27yo3_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_27yo3_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_27yo3_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_27yo3_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_27yo3_13{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}@media (hover: hover){._inputContainer_27yo3_5:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}}._inputContainer_27yo3_5:focus-within:not(._errorInput_27yo3_23):not(._disabled_27yo3_23){box-shadow:0 0 0 2px color-mix(in srgb,var(--input-focus-shadow-color, #5A67D8) 30%,transparent)}._input_27yo3_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_27yo3_32{display:flex;align-items:center;justify-content:center}._errorInput_27yo3_23{--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_27yo3_23: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_27yo3_23: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_27yo3_23{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_27yo3_44{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_27yo3_48{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_27yo3_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_27yo3_56{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_27yo3_63{display:none!important}._securityContent_27yo3_67{display:grid;grid-column-gap:5px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,auto))}._container_79xkl_1{display:flex;min-height:292px;width:100%;flex-direction:column;align-items:center;justify-content:center}._title_79xkl_5{margin-top:.5rem;font-weight:300}._container_1e7lb_1{border-radius:12px;margin-top:.5rem;display:flex;width:100%;flex-grow:1;flex-direction:row;align-items:center;justify-content:flex-start;-moz-column-gap:.25rem;column-gap:.25rem;--tw-bg-opacity: 1;background-color:rgb(254 231 239 / var(--tw-bg-opacity, 1));padding:.75rem 1rem}._container_1e7lb_1:is(._dark_1e7lb_1 *){background-color:#fee7ef80;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}._container_1e7lb_1 svg{width:16px;height:16px}._title_1e7lb_11{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_1e7lb_11:is(._dark_1e7lb_1 *){--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(ae);class ye{constructor(t){C(this,"parent");C(this,"core");typeof window!="undefined"&&(this.parent=t)}mount(t){return Y(this,null,function*(){if(!this.parent)return;if(!this.core){const a=(yield Promise.resolve().then(()=>Bl)).Core;this.core=new a}t.styles&&this.core.state.styles.setState(t.styles);const e=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(e),this.core.state.checkout.setState(t)})}unmount(){return Y(this,null,function*(){!this.parent||!this.core||(this.parent.innerHTML="",this.core.clearState())})}}let Le=null;function Lt(){return Y(this,null,function*(){return Le||(Le=new Promise((r,t)=>{const e=document.createElement("script");if(e.src="https://js.evervault.com/v2",e.onload=()=>r(),e.onerror=()=>{Le=null,t()},!document.head)throw new Error("Expected document.head not to be null. Evervault.js requires a <head> element.");document.head.appendChild(e)}),Le)})}function vt(){return Y(this,null,function*(){if(window.Evervault)return window.Evervault;try{return yield Lt(),window.Evervault}catch(r){throw new Error("Failed to load Evervault.js")}})}function qe(r,t,e){return Y(this,null,function*(){const n=yield vt();return new n(r,t,e)})}Promise.resolve().then(()=>{vt()});var K=(r=>(r.PAYPAL="PAYPAL",r.APPLE_PAY="APPLEPAY",r.GOOGLE_PAY="GPAY",r.CARD="CARD",r.VENMO="VENMO",r))(K||{}),Re=(r=>(r.PENDING="PENDING",r.FAILED="FAILED",r.AUTHORIZED="AUTHORIZED",r.SETTLING="SETTLING",r.SETTLED="SETTLED",r.DECLINED="DECLINED",r.CANCELLED="CANCELLED",r))(Re||{}),Rt=(r=>(r.INSUFFICIENT_FUNDS="insufficient_funds",r.AUTHENTICATION_REQUIRED="authentication_required",r.CARD_ISSUER_DECLINE="card_issuer_decline",r.GENERIC_DECLINE="generic_decline",r.WITHDRAWAL_LIMIT_EXCEEDED="withdrawal_limit_exceeded",r.DO_NOT_HONOR="do_not_honor",r.EXPIRED_CARD="expired_card",r.SUSPECTED_FRAUD="suspected_fraud",r.INCORRECT_CVC="incorrect_cvc",r.INVALID_CARD_NUMBER="invalid_card_number",r.ISSUER_UNAVAILABLE="issuer_unavailable",r.CARD_LOST_OR_STOLEN="card_lost_or_stolen",r.CARD_DECLINED="card_declined",r))(Rt||{});const kt=(r="sandbox")=>({develop:"https://dev-api.paynext.com",staging:"https://staging-api.paynext.com",sandbox:"https://sandbox-api.paynext.com",production:"https://api.paynext.com"})[r],ji=[{type:K.PAYPAL,order:1,is_active:!0},{type:K.APPLE_PAY,order:2,is_active:!0},{type:K.GOOGLE_PAY,order:3,is_active:!0},{type:K.CARD,order:4,is_active:!0}],Hi=r=>r.googlePay?K.GOOGLE_PAY:r.applePay?K.APPLE_PAY:r.paypal?K.PAYPAL:r.braintree?K.VENMO:K.CARD,Ki=r=>{const t=r.card;if(t)return{bin:t.firstSixDigits,bin_data:{brand:t.cardBrand,country:t.country,currency_code:t.currency,funding:t.funding,issuer:t.issuer,type:t.type},cvc:t.cvc,exp_month:Number(t.expMonth),exp_year:Number(t.expYear),last4:t.lastFourDigits,number:t.number}},Wi=r=>{var e;const t=r.paypal;if((e=t==null?void 0:t.billing_agreement_token)!=null&&e.paypalId)return{billing_agreement_token:t.billing_agreement_token.paypalId}},Yi=r=>{var e,n;const t=r.googlePay;if(t!=null&&t.token)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(e=t.card)!=null&&e.expiry.month||t.token.expiry.month?Number(t.card.expiry.month||t.token.expiry.month):void 0,exp_year:(n=t.card)!=null&&n.expiry.year||t.token.expiry.year?Number(t.card.expiry.year||t.token.expiry.year):void 0,token:t.token.number,token_service_provider:t.token.tokenServiceProvider}},$i=r=>{var e,n,a,i,s,o;const t=r.applePay;if(t)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(n=(e=t.networkToken)==null?void 0:e.expiry)!=null&&n.month?Number(t.networkToken.expiry.month):void 0,exp_year:(i=(a=t.networkToken)==null?void 0:a.expiry)!=null&&i.year?Number(t.networkToken.expiry.year):void 0,token:(s=t.networkToken)==null?void 0:s.number,token_service_provider:(o=t.networkToken)==null?void 0:o.tokenServiceProvider}},Gi=r=>{const t=r.braintree;if(t)return{payment_method_nonce:t.nonce}},Lr=r=>{var n,a,i,s,o,c,l,d,u,h,p,f,m,v;const{applePay:t,googlePay:e}=r;if(!(!t&&!e))return{city:((n=t==null?void 0:t.billingContact)==null?void 0:n.locality)||((a=e==null?void 0:e.billingAddress)==null?void 0:a.locality)||void 0,country:((i=t==null?void 0:t.billingContact)==null?void 0:i.countryCode)||((s=e==null?void 0:e.billingAddress)==null?void 0:s.countryCode)||void 0,line1:((c=(o=t==null?void 0:t.billingContact)==null?void 0:o.addressLines)==null?void 0:c.at(0))||((l=e==null?void 0:e.billingAddress)==null?void 0:l.address1)||void 0,line2:((u=(d=t==null?void 0:t.billingContact)==null?void 0:d.addressLines)==null?void 0:u.at(1))||((h=e==null?void 0:e.billingAddress)==null?void 0:h.address2)||void 0,postal_code:((p=t==null?void 0:t.billingContact)==null?void 0:p.postalCode)||((f=e==null?void 0:e.billingAddress)==null?void 0:f.postalCode)||void 0,state:((m=t==null?void 0:t.billingContact)==null?void 0:m.administrativeArea)||((v=e==null?void 0:e.billingAddress)==null?void 0:v.administrativeArea)||void 0}},Rr=r=>{var a,i,s,o,c,l,d,u,h,p,f,m,v,y,A,x,N,I,L;const{card:t,googlePay:e,applePay:n}=r;if(!(!t&&!(e!=null&&e.card)&&!(n!=null&&n.card)))return{bin:t==null?void 0:t.firstSixDigits,bin_data:{brand:(t==null?void 0:t.cardBrand)||((a=e==null?void 0:e.card)==null?void 0:a.brand)||((i=n==null?void 0:n.card)==null?void 0:i.brand),country:(t==null?void 0:t.country)||((s=e==null?void 0:e.card)==null?void 0:s.country)||((o=n==null?void 0:n.card)==null?void 0:o.country),currency_code:(t==null?void 0:t.currency)||((c=e==null?void 0:e.card)==null?void 0:c.currency)||((l=n==null?void 0:n.card)==null?void 0:l.currency),funding:(t==null?void 0:t.funding)||((d=e==null?void 0:e.card)==null?void 0:d.funding)||((u=n==null?void 0:n.card)==null?void 0:u.funding),issuer:(t==null?void 0:t.issuer)||((h=e==null?void 0:e.card)==null?void 0:h.issuer)||((p=n==null?void 0:n.card)==null?void 0:p.issuer),type:(t==null?void 0:t.type)||((f=e==null?void 0:e.card)==null?void 0:f.segment)||((m=n==null?void 0:n.card)==null?void 0:m.segment)},cvc:t==null?void 0:t.cvc,exp_month:t!=null&&t.expMonth||(v=e==null?void 0:e.card)!=null&&v.expiry.month?Number((t==null?void 0:t.expMonth)||((y=e==null?void 0:e.card)==null?void 0:y.expiry.month)):void 0,exp_year:t!=null&&t.expYear||(A=e==null?void 0:e.card)!=null&&A.expiry.year?Number((t==null?void 0:t.expYear)||((x=e==null?void 0:e.card)==null?void 0:x.expiry.year)):void 0,last4:(t==null?void 0:t.lastFourDigits)||((N=e==null?void 0:e.card)==null?void 0:N.lastFour)||((I=n==null?void 0:n.card)==null?void 0:I.lastFour),number:(t==null?void 0:t.number)||((L=e==null?void 0:e.card)==null?void 0:L.number)}},kr=r=>{var n,a;const{applePay:t,card:e}=r;return(n=t==null?void 0:t.billingContact)!=null&&n.givenName?`${t.billingContact.givenName} ${t.billingContact.familyName||""}`.trim():(a=e==null?void 0:e.metadata)==null?void 0:a.name},qi=r=>{var n,a;const t=Hi(r),e={client_session:r.clientSession,three_ds_session_id:r.threeDsSessionId,type:t};switch(t){case K.CARD:return J(H({},e),{name:kr(r),card:Ki(r)});case K.PAYPAL:return J(H({},e),{paypal:Wi(r)});case K.GOOGLE_PAY:return J(H({},e),{card:Rr(r),google_pay:Yi(r),billing_address:Lr(r)});case K.APPLE_PAY:return J(H({},e),{name:kr(r),card:Rr(r),apple_pay:$i(r),phone:(a=(n=r.applePay)==null?void 0:n.shippingContact)==null?void 0:a.phoneNumber,billing_address:Lr(r)});case K.VENMO:return J(H({},e),{venmo:Gi(r)});default:throw new Error(`Unsupported payment method: ${t}`)}},Qi=(r,t,e)=>Y(this,null,function*(){const n=`${kt(t)}/payments/create`,a=new Headers;a.append("Content-Type","application/json"),a.append("X-API-Version",e);const i=qi(r);return yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify(i)})).json()}),Xi=(r,t,e)=>Y(this,null,function*(){const n=`${kt(t)}/payments/create/billing/agreement`,a=new Headers;return a.append("Content-Type","application/json"),a.append("X-API-Version",e),(yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify({client_session:r})})).json()).paypal_agreement_token_response.token_id||""}),Zi=(r,t,e)=>Y(this,null,function*(){const n=`${kt(t)}/payments/config?client_session_id=${r}`,a=new Headers;a.append("X-API-Version",e);const s=yield(yield fetch(n,{headers:a})).json();return s.checkout_config||(s.checkout_config=ji),s});let Ji=class{constructor(t){C(this,"apple",null);C(this,"isAvailable",!1);C(this,"onReady");this.ev=t}init(d,u){return Y(this,arguments,function*({transaction:t,locale:e,supportedCardTypes:n,onReady:a,onError:i,onSuccess:s,onCancel:o,onPaymentAttempt:c},l){const h=this.ev.transactions.create(t);this.apple=this.ev.ui.applePay(h,J(H({locale:e,borderRadius:12,size:{width:"100%",height:"40px"}},l==null?void 0:l.styles),{allowedCardNetworks:n,requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(v,y)=>Y(this,[v,y],function*(f,{fail:m}){c==null||c({paymentMethod:K.GOOGLE_PAY});try{s==null||s(f)}catch(A){console.error(A),m({message:"Cannot pay with payment credentials"})}})}));const p=yield this.apple.availability();this.isAvailable=p==="available",console.log("Apple Pay availability",p),this.isAvailable||i==null||i("Apple Pay is not supported on this device"),i&&this.apple.on("error",i),o&&this.apple.on("cancel",o),this.onReady=a})}render(t){return Y(this,null,function*(){var e;!this.apple||!this.isAvailable||(t.innerHTML="",yield this.apple.mount(t),(e=this.onReady)==null||e.call(this))})}},ea=class{constructor(t){C(this,"google",null);this.ev=t}init(l,d){return Y(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:s,onPaymentAttempt:o},c){const u=this.ev.transactions.create(t);this.google=this.ev.ui.googlePay(u,J(H({locale:e,size:{width:"100%",height:"42px"},borderRadius:12,billingAddress:{phoneNumber:!0}},c==null?void 0:c.styles),{process:(f,m)=>Y(this,[f,m],function*(h,{fail:p}){o==null||o({paymentMethod:K.GOOGLE_PAY});try{i==null||i(h)}catch(v){console.error(v),p({message:"Cannot pay with payment credentials"})}})})),s&&this.google.on("cancel",s),n&&this.google.on("ready",n),a&&this.google.on("error",a)})}render(t){return Y(this,null,function*(){this.google&&(t.innerHTML="",this.google.mount(t))})}};class de{constructor(){C(this,"listeners",[])}removeListener(t){this.listeners=this.listeners.filter(e=>e!==t)}addListener(t){return this.listeners.push(t),()=>this.removeListener(t)}emit(t){for(const e of this.listeners)e(t)}clear(){this.listeners=[]}}class ta{constructor(t){C(this,"threeDs",null);this.ev=t}init(i){return Y(this,arguments,function*({threeDsId:t,onReady:e,onSuccess:n,onError:a}){this.threeDs=this.ev.ui.threeDSecure(t),this.threeDs.on("ready",()=>e==null?void 0:e()),this.threeDs.on("success",()=>n==null?void 0:n()),this.threeDs.on("failure",()=>a==null?void 0:a()),this.threeDs.on("error",()=>a==null?void 0:a())})}render(t){return Y(this,null,function*(){this.threeDs&&this.threeDs.mount(t)})}}class ra{constructor(){C(this,"isReady",!1);C(this,"ev",null);C(this,"apple",null);C(this,"google",null);C(this,"threeDs",null);C(this,"events",{ready:new de})}isShouldLoad({teamId:t,appId:e}){var n,a;return((n=this.ev)==null?void 0:n.config.appId)!==e||((a=this.ev)==null?void 0:a.config.teamId)!==t}initEv(t){return Y(this,null,function*(){this.isShouldLoad(t)&&(this.isReady=!1,this.ev=yield qe(t.teamId,t.appId),this.apple=new Ji(this.ev),this.google=new ea(this.ev),this.events.ready.emit(),this.isReady=!0)})}initThreeDs(t){return Y(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new ta(this.ev),yield this.threeDs.init(t),yield this.threeDs.render()})}initApple(t,e){return Y(this,null,function*(){if(!this.apple)throw new Error("Evervault should be init before using Apple Pay");yield this.apple.init(t,e)})}initGoogle(t,e){return Y(this,null,function*(){if(!this.google)throw new Error("Evervault should be init before using Google Pay");yield this.google.init(t,e)})}isAppleAvailable(){var t;return!!((t=this.apple)!=null&&t.isAvailable)}addEventListener(t,e){return this.events[t].addListener(e)}renderApple(t){return Y(this,null,function*(){var e;return(e=this.apple)==null?void 0:e.render(t)})}renderGoogle(t){return Y(this,null,function*(){var e;return(e=this.google)==null?void 0:e.render(t)})}getEv(){if(!this.ev)throw new Error("Evervault should be init before getting instance");return this.ev}}function St(r){return typeof r=="object"&&!Array.isArray(r)}function na(r,t,e){var n;if(r instanceof EventTarget)return[r];if(typeof r=="string"){let a=document;const i=(n=e==null?void 0:e[r])!=null?n:a.querySelectorAll(r);return i?Array.from(i):[]}return Array.from(r)}function Sr(r,t,e,n){return typeof r=="string"&&St(t)?na(r,e,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function ia(r,t,e){return r*(t+1)}function Mr(r,t,e,n){var a;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,r+parseFloat(t)):t==="<"?e:(a=n.get(t))!=null?a:r}const Qe=(r,t,e)=>r+(t-r)*e,aa=(r,t,e)=>{const n=t-r;return((e-r)%n+n)%n+r},Dr=r=>Array.isArray(r)&&typeof r[0]!="number";function Vr(r,t){return Dr(r)?r[aa(0,r.length,t)]:r}function sa(r,t){r.indexOf(t)===-1&&r.push(t)}function Fr(r,t){const e=r.indexOf(t);e>-1&&r.splice(e,1)}function oa(r,t,e){for(let n=0;n<r.length;n++){const a=r[n];a.at>t&&a.at<e&&(Fr(r,a),n--)}}function ca(r,t,e,n,a,i){oa(r,a,i);for(let s=0;s<t.length;s++)r.push({value:t[s],at:Qe(a,i,n[s]),easing:Vr(e,s)})}function la(r,t){for(let e=0;e<r.length;e++)r[e]=r[e]/(t+1)}function da(r,t){return r.at===t.at?r.value===null?1:t.value===null?-1:0:r.at-t.at}const ve=r=>!!(r&&r.getVelocity),Mt=(r,t,e)=>{const n=t-r;return n===0?1:(e-r)/n};function Ur(r,t){const e=r[r.length-1];for(let n=1;n<=t;n++){const a=Mt(0,t,n);r.push(Qe(e,1,a))}}function Br(r){const t=[0];return Ur(t,r.length-1),t}function Dt(r){return typeof r=="function"&&"applyToOptions"in r}const gt=2e4;function Vt(r){let t=0;const e=50;let n=r.next(t);for(;!n.done&&t<gt;)t+=e,n=r.next(t);return t>=gt?1/0:t}const Ce=r=>r*1e3,Te=r=>r/1e3;function zr(r,t=100,e){const n=e(J(H({},r),{keyframes:[0,t]})),a=Math.min(Vt(n),gt);return{type:"keyframes",ease:i=>n.next(a*i).value/t,duration:Te(a)}}let Xe=()=>{},Ie=()=>{};process.env.NODE_ENV!=="production"&&(Xe=(r,t)=>{!r&&typeof console!="undefined"&&console.warn(t)},Ie=(r,t)=>{if(!r)throw new Error(t)});const ua="easeInOut",pa=20;function ha(r,i={},n,a){var s=i,{defaultTransition:t={}}=s,e=Ae(s,["defaultTransition"]);const o=t.duration||.3,c=new Map,l=new Map,d={},u=new Map;let h=0,p=0,f=0;for(let m=0;m<r.length;m++){const v=r[m];if(typeof v=="string"){u.set(v,p);continue}else if(!Array.isArray(v)){u.set(v.name,Mr(p,v.at,h,u));continue}let[y,A,x={}]=v;x.at!==void 0&&(p=Mr(p,x.at,h,u));let N=0;const I=(L,O,S,U=0,$=0)=>{const G=fa(L),D=O,{delay:F=0,times:z=Br(G),type:j="keyframes",repeat:ee,repeatType:M,repeatDelay:q=0}=D,W=Ae(D,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:E=t.ease||"easeOut",duration:g}=O;const R=typeof F=="function"?F(U,$):F,V=G.length,b=Dt(j)?j:a==null?void 0:a[j];if(V<=2&&b){let w=100;if(V===2&&ga(G)){const ce=G[1]-G[0];w=Math.abs(ce)}const B=H({},W);g!==void 0&&(B.duration=Ce(g));const Z=zr(B,w,b);E=Z.ease,g=Z.duration}g!=null||(g=o);const T=p+R;z.length===1&&z[0]===0&&(z[1]=1);const _=z.length-G.length;if(_>0&&Ur(z,_),G.length===1&&G.unshift(null),ee){Ie(ee<pa,"Repeat count too high, must be less than 20"),g=ia(g,ee);const w=[...G],B=[...z];E=Array.isArray(E)?[...E]:[E];const Z=[...E];for(let ce=0;ce<ee;ce++){G.push(...w);for(let k=0;k<w.length;k++)z.push(B[k]+(ce+1)),E.push(k===0?"linear":Vr(Z,k-1))}la(z,ee)}const P=T+g;ca(S,G,E,z,T,P),N=Math.max(R+g,N),f=Math.max(P,f)};if(ve(y)){const L=jr(y,l);I(A,x,Hr("default",L))}else{const L=Sr(y,A,n,d),O=L.length;for(let S=0;S<O;S++){A=A,x=x;const U=L[S],$=jr(U,l);for(const G in A)I(A[G],ma(x,G),Hr(G,$),S,O)}}h=p,p+=N}return l.forEach((m,v)=>{for(const y in m){const A=m[y];A.sort(da);const x=[],N=[],I=[];for(let O=0;O<A.length;O++){const{at:S,value:U,easing:$}=A[O];x.push(U),N.push(Mt(0,f,S)),I.push($||"easeOut")}N[0]!==0&&(N.unshift(0),x.unshift(x[0]),I.unshift(ua)),N[N.length-1]!==1&&(N.push(1),x.push(null)),c.has(v)||c.set(v,{keyframes:{},transition:{}});const L=c.get(v);L.keyframes[y]=x,L.transition[y]=H(J(H({},t),{duration:f,ease:I,times:N}),e)}}),c}function jr(r,t){return!t.has(r)&&t.set(r,{}),t.get(r)}function Hr(r,t){return t[r]||(t[r]=[]),t[r]}function fa(r){return Array.isArray(r)?r:[r]}function ma(r,t){return r&&r[t]?H(H({},r),r[t]):H({},r)}const va=r=>typeof r=="number",ga=r=>r.every(va),Ze=new WeakMap,ya=r=>Array.isArray(r);function Kr(r){const t=[{},{}];return r==null||r.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Wr(r,t,e,n){if(typeof t=="function"){const[a,i]=Kr(n);t=t(e!==void 0?e:r.custom,a,i)}if(typeof t=="string"&&(t=r.variants&&r.variants[t]),typeof t=="function"){const[a,i]=Kr(n);t=t(e!==void 0?e:r.custom,a,i)}return t}function ba(r,t,e){const n=r.getProps();return Wr(n,t,n.custom,r)}const yt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function _a(r,t){let e=new Set,n=new Set,a=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(d){s.has(d)&&(l.schedule(d),r()),d(o)}const l={schedule:(d,u=!1,h=!1)=>{const f=h&&a?e:n;return u&&s.add(d),f.has(d)||f.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(o=d,a){i=!0;return}a=!0,[e,n]=[n,e],e.forEach(c),e.clear(),a=!1,i&&(i=!1,l.process(d))}};return l}const xe={},Ea=40;function Ca(r,t){let e=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>e=!0,s=yt.reduce((x,N)=>(x[N]=_a(i),x),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:d,update:u,preRender:h,render:p,postRender:f}=s,m=()=>{const x=xe.useManualTiming?a.timestamp:performance.now();e=!1,xe.useManualTiming||(a.delta=n?1e3/60:Math.max(Math.min(x-a.timestamp,Ea),1)),a.timestamp=x,a.isProcessing=!0,o.process(a),c.process(a),l.process(a),d.process(a),u.process(a),h.process(a),p.process(a),f.process(a),a.isProcessing=!1,e&&t&&(n=!1,r(m))},v=()=>{e=!0,n=!0,a.isProcessing||r(m)};return{schedule:yt.reduce((x,N)=>{const I=s[N];return x[N]=(L,O=!1,S=!1)=>(e||v(),I.schedule(L,O,S)),x},{}),cancel:x=>{for(let N=0;N<yt.length;N++)s[yt[N]].cancel(x)},state:a,steps:s}}const Ue=r=>r,{schedule:Oe,cancel:Ft,state:bt}=Ca(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:Ue,!0);let _t;function wa(){_t=void 0}const be={now:()=>(_t===void 0&&be.set(bt.isProcessing||xe.useManualTiming?bt.timestamp:performance.now()),_t),set:r=>{_t=r,queueMicrotask(wa)}},Yr=new Set;function $r(r,t,e){r||Yr.has(t)||(console.warn(t),Yr.add(t))}class Gr{constructor(){this.subscriptions=[]}add(t){return sa(this.subscriptions,t),()=>Fr(this.subscriptions,t)}notify(t,e,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,e,n);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function qr(r,t){return t?r*(1e3/t):0}const Qr=30,Aa=r=>!isNaN(parseFloat(r));class Ta{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,a=!0)=>{var s,o;const i=be.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();a&&((o=this.events.renderRequest)==null||o.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=be.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Aa(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&$r(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Gr);const n=this.events[t].add(e);return t==="change"?()=>{n(),Oe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){!e||!this.passiveEffect?this.updateAndNotify(t,e):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Qr)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Qr);return qr(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,e;(t=this.dependents)==null||t.clear(),(e=this.events.destroy)==null||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Je(r,t){return new Ta(r,t)}function Ia(r,t,e){r.hasValue(t)?r.getValue(t).set(e):r.addValue(t,Je(e))}function xa(r){return ya(r)?r[r.length-1]||0:r}function Oa(r,t){let s=ba(r,t)||{},{transitionEnd:n={},transition:a={}}=s,i=Ae(s,["transitionEnd","transition"]);i=H(H({},i),n);for(const o in i){const c=xa(i[o]);Ia(r,o,c)}}function Na(r){return!!(ve(r)&&r.add)}function Pa(r,t){const e=r.getValue("willChange");if(Na(e))return e.add(t);if(!e&&xe.WillChange){const n=new xe.WillChange("auto");r.addValue("willChange",n),n.add(t)}}const Ut=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),La="data-"+Ut("framerAppearId");function Ra(r){return r.props[La]}const ka=r=>r!==null;function Sa(r,{repeat:t,repeatType:e="loop"},n){const a=r.filter(ka),i=t&&e!=="loop"&&t%2===1?0:a.length-1;return a[i]}const Be=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ze=new Set(Be),Ma={type:"spring",stiffness:500,damping:25,restSpeed:10},Da=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),Va={type:"keyframes",duration:.8},Fa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ua=(r,{keyframes:t})=>t.length>2?Va:ze.has(r)?r.startsWith("scale")?Da(t[1]):Ma:Fa;function Ba(u){var h=u,{when:r,delay:t,delayChildren:e,staggerChildren:n,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:c,elapsed:l}=h,d=Ae(h,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}function Xr(r,t){var e,n;return(n=(e=r==null?void 0:r[t])!=null?e:r==null?void 0:r.default)!=null?n:r}const Zr=r=>t=>typeof t=="string"&&t.startsWith(r),Jr=Zr("--"),za=Zr("var(--"),Bt=r=>za(r)?ja.test(r.split("/*")[0].trim()):!1,ja=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ke=(r,t,e)=>e>t?t:e<r?r:e,je={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},et=J(H({},je),{transform:r=>ke(0,1,r)}),Et=J(H({},je),{default:1}),tt=r=>Math.round(r*1e5)/1e5,zt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ha(r){return r==null}const Ka=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jt=(r,t)=>e=>!!(typeof e=="string"&&Ka.test(e)&&e.startsWith(r)||t&&!Ha(e)&&Object.prototype.hasOwnProperty.call(e,t)),en=(r,t,e)=>n=>{if(typeof n!="string")return n;const[a,i,s,o]=n.match(zt);return{[r]:parseFloat(a),[t]:parseFloat(i),[e]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},Wa=r=>ke(0,255,r),Ht=J(H({},je),{transform:r=>Math.round(Wa(r))}),Se={test:jt("rgb","red"),parse:en("red","green","blue"),transform:({red:r,green:t,blue:e,alpha:n=1})=>"rgba("+Ht.transform(r)+", "+Ht.transform(t)+", "+Ht.transform(e)+", "+tt(et.transform(n))+")"};function Ya(r){let t="",e="",n="",a="";return r.length>5?(t=r.substring(1,3),e=r.substring(3,5),n=r.substring(5,7),a=r.substring(7,9)):(t=r.substring(1,2),e=r.substring(2,3),n=r.substring(3,4),a=r.substring(4,5),t+=t,e+=e,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const Kt={test:jt("#"),parse:Ya,transform:Se.transform},rt=r=>({test:t=>typeof t=="string"&&t.endsWith(r)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${r}`}),Ne=rt("deg"),He=rt("%"),X=rt("px"),$a=rt("vh"),Ga=rt("vw"),tn=J(H({},He),{parse:r=>He.parse(r)/100,transform:r=>He.transform(r*100)}),Ke={test:jt("hsl","hue"),parse:en("hue","saturation","lightness"),transform:({hue:r,saturation:t,lightness:e,alpha:n=1})=>"hsla("+Math.round(r)+", "+He.transform(tt(t))+", "+He.transform(tt(e))+", "+tt(et.transform(n))+")"},fe={test:r=>Se.test(r)||Kt.test(r)||Ke.test(r),parse:r=>Se.test(r)?Se.parse(r):Ke.test(r)?Ke.parse(r):Kt.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Se.transform(r):Ke.transform(r)},qa=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Qa(r){var t,e;return isNaN(r)&&typeof r=="string"&&(((t=r.match(zt))==null?void 0:t.length)||0)+(((e=r.match(qa))==null?void 0:e.length)||0)>0}const rn="number",nn="color",Xa="var",Za="var(",an="${}",Ja=/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 nt(r){const t=r.toString(),e=[],n={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(Ja,c=>(fe.test(c)?(n.color.push(i),a.push(nn),e.push(fe.parse(c))):c.startsWith(Za)?(n.var.push(i),a.push(Xa),e.push(c)):(n.number.push(i),a.push(rn),e.push(parseFloat(c))),++i,an)).split(an);return{values:e,split:o,indexes:n,types:a}}function sn(r){return nt(r).values}function on(r){const{split:t,types:e}=nt(r),n=t.length;return a=>{let i="";for(let s=0;s<n;s++)if(i+=t[s],a[s]!==void 0){const o=e[s];o===rn?i+=tt(a[s]):o===nn?i+=fe.transform(a[s]):i+=a[s]}return i}}const es=r=>typeof r=="number"?0:r;function ts(r){const t=sn(r);return on(r)(t.map(es))}const We={test:Qa,parse:sn,createTransformer:on,getAnimatableNone:ts};function Wt(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*(2/3-e)*6:r}function rs({hue:r,saturation:t,lightness:e,alpha:n}){r/=360,t/=100,e/=100;let a=0,i=0,s=0;if(!t)a=i=s=e;else{const o=e<.5?e*(1+t):e+t-e*t,c=2*e-o;a=Wt(c,o,r+1/3),i=Wt(c,o,r),s=Wt(c,o,r-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:n}}function Ct(r,t){return e=>e>0?t:r}const Yt=(r,t,e)=>{const n=r*r,a=e*(t*t-n)+n;return a<0?0:Math.sqrt(a)},ns=[Kt,Se,Ke],is=r=>ns.find(t=>t.test(r));function cn(r){const t=is(r);if(Xe(!!t,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let e=t.parse(r);return t===Ke&&(e=rs(e)),e}const ln=(r,t)=>{const e=cn(r),n=cn(t);if(!e||!n)return Ct(r,t);const a=H({},e);return i=>(a.red=Yt(e.red,n.red,i),a.green=Yt(e.green,n.green,i),a.blue=Yt(e.blue,n.blue,i),a.alpha=Qe(e.alpha,n.alpha,i),Se.transform(a))},$t=new Set(["none","hidden"]);function as(r,t){return $t.has(r)?e=>e<=0?r:t:e=>e>=1?t:r}const ss=(r,t)=>e=>t(r(e)),Gt=(...r)=>r.reduce(ss);function os(r,t){return e=>Qe(r,t,e)}function qt(r){return typeof r=="number"?os:typeof r=="string"?Bt(r)?Ct:fe.test(r)?ln:ds:Array.isArray(r)?dn:typeof r=="object"?fe.test(r)?ln:cs:Ct}function dn(r,t){const e=[...r],n=e.length,a=r.map((i,s)=>qt(i)(i,t[s]));return i=>{for(let s=0;s<n;s++)e[s]=a[s](i);return e}}function cs(r,t){const e=H(H({},r),t),n={};for(const a in e)r[a]!==void 0&&t[a]!==void 0&&(n[a]=qt(r[a])(r[a],t[a]));return a=>{for(const i in n)e[i]=n[i](a);return e}}function ls(r,t){var a;const e=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=r.indexes[s][n[s]],c=(a=r.values[o])!=null?a:0;e[i]=c,n[s]++}return e}const ds=(r,t)=>{const e=We.createTransformer(t),n=nt(r),a=nt(t);return n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length?$t.has(r)&&!a.values.length||$t.has(t)&&!n.values.length?as(r,t):Gt(dn(ls(n,a),a.values),e):(Xe(!0,`Complex values '${r}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ct(r,t))};function un(r,t,e){return typeof r=="number"&&typeof t=="number"&&typeof e=="number"?Qe(r,t,e):qt(r)(r,t)}const us=r=>{const t=({timestamp:e})=>r(e);return{start:(e=!0)=>Oe.update(t,e),stop:()=>Ft(t),now:()=>bt.isProcessing?bt.timestamp:be.now()}},pn=(r,t,e=10)=>{let n="";const a=Math.max(Math.round(t/e),2);for(let i=0;i<a;i++)n+=r(i/(a-1))+", ";return`linear(${n.substring(0,n.length-2)})`},ps=5;function hn(r,t,e){const n=Math.max(t-ps,0);return qr(e-r(n),t-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},Qt=.001;function hs({duration:r=oe.duration,bounce:t=oe.bounce,velocity:e=oe.velocity,mass:n=oe.mass}){let a,i;Xe(r<=Ce(oe.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=ke(oe.minDamping,oe.maxDamping,s),r=ke(oe.minDuration,oe.maxDuration,Te(r)),s<1?(a=l=>{const d=l*s,u=d*r,h=d-e,p=Xt(l,s),f=Math.exp(-u);return Qt-h/p*f},i=l=>{const u=l*s*r,h=u*e+e,p=Math.pow(s,2)*Math.pow(l,2)*r,f=Math.exp(-u),m=Xt(Math.pow(l,2),s);return(-a(l)+Qt>0?-1:1)*((h-p)*f)/m}):(a=l=>{const d=Math.exp(-l*r),u=(l-e)*r+1;return-Qt+d*u},i=l=>{const d=Math.exp(-l*r),u=(e-l)*(r*r);return d*u});const o=5/r,c=ms(a,i,o);if(r=Ce(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 fs=12;function ms(r,t,e){let n=e;for(let a=1;a<fs;a++)n=n-r(n)/t(n);return n}function Xt(r,t){return r*Math.sqrt(1-t*t)}const vs=["duration","bounce"],gs=["stiffness","damping","mass"];function fn(r,t){return t.some(e=>r[e]!==void 0)}function ys(r){let t=H({velocity:oe.velocity,stiffness:oe.stiffness,damping:oe.damping,mass:oe.mass,isResolvedFromDuration:!1},r);if(!fn(r,gs)&&fn(r,vs))if(r.visualDuration){const e=r.visualDuration,n=2*Math.PI/(e*1.2),a=n*n,i=2*ke(.05,1,1-(r.bounce||0))*Math.sqrt(a);t=J(H({},t),{mass:oe.mass,stiffness:a,damping:i})}else{const e=hs(r);t=J(H(H({},t),e),{mass:oe.mass}),t.isResolvedFromDuration=!0}return t}function it(r=oe.visualDuration,t=oe.bounce){const e=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:t}:r;let{restSpeed:n,restDelta:a}=e;const i=e.keyframes[0],s=e.keyframes[e.keyframes.length-1],o={done:!1,value:i},{stiffness:c,damping:l,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=ys(J(H({},e),{velocity:-Te(e.velocity||0)})),f=h||0,m=l/(2*Math.sqrt(c*d)),v=s-i,y=Te(Math.sqrt(c/d)),A=Math.abs(v)<5;n||(n=A?oe.restSpeed.granular:oe.restSpeed.default),a||(a=A?oe.restDelta.granular:oe.restDelta.default);let x;if(m<1){const I=Xt(y,m);x=L=>{const O=Math.exp(-m*y*L);return s-O*((f+m*y*v)/I*Math.sin(I*L)+v*Math.cos(I*L))}}else if(m===1)x=I=>s-Math.exp(-y*I)*(v+(f+y*v)*I);else{const I=y*Math.sqrt(m*m-1);x=L=>{const O=Math.exp(-m*y*L),S=Math.min(I*L,300);return s-O*((f+m*y*v)*Math.sinh(S)+I*v*Math.cosh(S))/I}}const N={calculatedDuration:p&&u||null,next:I=>{const L=x(I);if(p)o.done=I>=u;else{let O=I===0?f:0;m<1&&(O=I===0?Ce(f):hn(x,I,L));const S=Math.abs(O)<=n,U=Math.abs(s-L)<=a;o.done=S&&U}return o.value=o.done?s:L,o},toString:()=>{const I=Math.min(Vt(N),gt),L=pn(O=>N.next(I*O).value,I,30);return I+"ms "+L},toTransition:()=>{}};return N}it.applyToOptions=r=>{const t=zr(r,100,it);return r.ease=t.ease,r.duration=Ce(t.duration),r.type="keyframes",r};function Zt({keyframes:r,velocity:t=0,power:e=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:c,restDelta:l=.5,restSpeed:d}){const u=r[0],h={done:!1,value:u},p=S=>o!==void 0&&S<o||c!==void 0&&S>c,f=S=>o===void 0?c:c===void 0||Math.abs(o-S)<Math.abs(c-S)?o:c;let m=e*t;const v=u+m,y=s===void 0?v:s(v);y!==v&&(m=y-u);const A=S=>-m*Math.exp(-S/n),x=S=>y+A(S),N=S=>{const U=A(S),$=x(S);h.done=Math.abs(U)<=l,h.value=h.done?y:$};let I,L;const O=S=>{p(h.value)&&(I=S,L=it({keyframes:[h.value,f(h.value)],velocity:hn(x,S,h.value),damping:a,stiffness:i,restDelta:l,restSpeed:d}))};return O(0),{calculatedDuration:null,next:S=>{let U=!1;return!L&&I===void 0&&(U=!0,N(S),O(S)),I!==void 0&&S>=I?L.next(S-I):(!U&&N(S),h)}}}function bs(r,t,e){const n=[],a=e||xe.mix||un,i=r.length-1;for(let s=0;s<i;s++){let o=a(r[s],r[s+1]);if(t){const c=Array.isArray(t)?t[s]||Ue:t;o=Gt(c,o)}n.push(o)}return n}function _s(r,t,{clamp:e=!0,ease:n,mixer:a}={}){const i=r.length;if(Ie(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=r[0]===r[1];r[0]>r[i-1]&&(r=[...r].reverse(),t=[...t].reverse());const o=bs(t,n,a),c=o.length,l=d=>{if(s&&d<r[0])return t[0];let u=0;if(c>1)for(;u<r.length-2&&!(d<r[u+1]);u++);const h=Mt(r[u],r[u+1],d);return o[u](h)};return e?d=>l(ke(r[0],r[i-1],d)):l}function Es(r,t){return r.map(e=>e*t)}const mn=(r,t,e)=>(((1-3*e+3*t)*r+(3*e-6*t))*r+3*t)*r,Cs=1e-7,ws=12;function As(r,t,e,n,a){let i,s,o=0;do s=t+(e-t)/2,i=mn(s,n,a)-r,i>0?e=s:t=s;while(Math.abs(i)>Cs&&++o<ws);return s}function at(r,t,e,n){if(r===t&&e===n)return Ue;const a=i=>As(i,0,1,r,e);return i=>i===0||i===1?i:mn(a(i),t,n)}const Ts=at(.42,0,1,1),Is=at(0,0,.58,1),vn=at(.42,0,.58,1),gn=r=>t=>t<=.5?r(2*t)/2:(2-r(2*(1-t)))/2,yn=r=>t=>1-r(1-t),bn=at(.33,1.53,.69,.99),Jt=yn(bn),_n=gn(Jt),En=r=>(r*=2)<1?.5*Jt(r):.5*(2-Math.pow(2,-10*(r-1))),er=r=>1-Math.sin(Math.acos(r)),xs=yn(er),Cn=gn(er),wn=r=>Array.isArray(r)&&typeof r[0]=="number",An={linear:Ue,easeIn:Ts,easeInOut:vn,easeOut:Is,circIn:er,circInOut:Cn,circOut:xs,backIn:Jt,backInOut:_n,backOut:bn,anticipate:En},Os=r=>typeof r=="string",Tn=r=>{if(wn(r)){Ie(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,e,n,a]=r;return at(t,e,n,a)}else if(Os(r))return Ie(An[r]!==void 0,`Invalid easing type '${r}'`),An[r];return r};function Ns(r,t){return r.map(()=>t||vn).splice(0,r.length-1)}function Ye({duration:r=300,keyframes:t,times:e,ease:n="easeInOut"}){const a=Dr(n)?n.map(Tn):Tn(n),i={done:!1,value:t[0]},s=Es(e&&e.length===t.length?e:Br(t),r),o=_s(s,t,{ease:Array.isArray(a)?a:Ns(t,a)});return{calculatedDuration:r,next:c=>(i.value=o(c),i.done=c>=r,i)}}const Ps=r=>r!==null;function tr(r,{repeat:t,repeatType:e="loop"},n,a=1){const i=r.filter(Ps),o=a<0||t&&e!=="loop"&&t%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const Ls={decay:Zt,inertia:Zt,tween:Ye,keyframes:Ye,spring:it};function In(r){typeof r.type=="string"&&(r.type=Ls[r.type])}class rr{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Rs=r=>r/100;class nr extends rr{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,a;const{motionValue:e}=this.options;e&&e.updatedAt!==be.now()&&this.tick(be.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(n=this.options).onStop)==null||a.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;In(t);const{type:e=Ye,repeat:n=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=t;let{keyframes:o}=t;const c=e||Ye;process.env.NODE_ENV!=="production"&&c!==Ye&&Ie(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),c!==Ye&&typeof o[0]!="number"&&(this.mixKeyframes=Gt(Rs,un(o[0],o[1])),o=[0,100]);const l=c(J(H({},t),{keyframes:o}));i==="mirror"&&(this.mirroredGenerator=c(J(H({},t),{keyframes:[...o].reverse(),velocity:-s}))),l.calculatedDuration===null&&(l.calculatedDuration=Vt(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(n+1)-a,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:a,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?y<0:y>a;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let x=this.currentTime,N=n;if(u){const S=Math.min(this.currentTime,a)/o;let U=Math.floor(S),$=S%1;!$&&S>=1&&($=1),$===1&&U--,U=Math.min(U,u+1),!!(U%2)&&(h==="reverse"?($=1-$,p&&($-=p/o)):h==="mirror"&&(N=s)),x=ke(0,1,$)*o}const I=A?{done:!1,value:d[0]}:N.next(x);i&&(I.value=i(I.value));let{done:L}=I;!A&&c!==null&&(L=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return O&&f!==Zt&&(I.value=tr(d,this.options,v,this.speed)),m&&m(I.value),O&&this.finish(),I}then(t,e){return this.finished.then(t,e)}get duration(){return Te(this.calculatedDuration)}get time(){return Te(this.currentTime)}set time(t){var e;t=Ce(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(e=this.driver)==null||e.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(be.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Te(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=us,startTime:e}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(i=(a=this.options).onPlay)==null||i.call(a);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e!=null?e:n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(be.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,e;this.notifyFinished(),this.teardown(),this.state="finished",(e=(t=this.options).onComplete)==null||e.call(t)}cancel(){var t,e;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(e=(t=this.options).onCancel)==null||e.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var e;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(e=this.driver)==null||e.stop(),t.observe(this)}}function ks(r){var t;for(let e=1;e<r.length;e++)(t=r[e])!=null||(r[e]=r[e-1])}const Me=r=>r*180/Math.PI,ir=r=>{const t=Me(Math.atan2(r[1],r[0]));return ar(t)},Ss={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:ir,rotateZ:ir,skewX:r=>Me(Math.atan(r[1])),skewY:r=>Me(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},ar=r=>(r=r%360,r<0&&(r+=360),r),xn=ir,On=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),Nn=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),Ms={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:On,scaleY:Nn,scale:r=>(On(r)+Nn(r))/2,rotateX:r=>ar(Me(Math.atan2(r[6],r[5]))),rotateY:r=>ar(Me(Math.atan2(-r[2],r[0]))),rotateZ:xn,rotate:xn,skewX:r=>Me(Math.atan(r[4])),skewY:r=>Me(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function sr(r){return r.includes("scale")?1:0}function or(r,t){if(!r||r==="none")return sr(t);const e=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,a;if(e)n=Ms,a=e;else{const o=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Ss,a=o}if(!a)return sr(t);const i=n[t],s=a[1].split(",").map(Vs);return typeof i=="function"?i(s):s[i]}const Ds=(r,t)=>{const{transform:e="none"}=getComputedStyle(r);return or(e,t)};function Vs(r){return parseFloat(r.trim())}const Pn=r=>r===je||r===X,Fs=new Set(["x","y","z"]),Us=Be.filter(r=>!Fs.has(r));function Bs(r){const t=[];return Us.forEach(e=>{const n=r.getValue(e);n!==void 0&&(t.push([e,n.get()]),n.set(e.startsWith("scale")?1:0))}),t}const De={width:({x:r},{paddingLeft:t="0",paddingRight:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),height:({y:r},{paddingTop:t="0",paddingBottom:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),top:(r,{top:t})=>parseFloat(t),left:(r,{left:t})=>parseFloat(t),bottom:({y:r},{top:t})=>parseFloat(t)+(r.max-r.min),right:({x:r},{left:t})=>parseFloat(t)+(r.max-r.min),x:(r,{transform:t})=>or(t,"x"),y:(r,{transform:t})=>or(t,"y")};De.translateX=De.x,De.translateY=De.y;const Ve=new Set;let cr=!1,lr=!1,dr=!1;function Ln(){if(lr){const r=Array.from(Ve).filter(n=>n.needsMeasurement),t=new Set(r.map(n=>n.element)),e=new Map;t.forEach(n=>{const a=Bs(n);a.length&&(e.set(n,a),n.render())}),r.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const a=e.get(n);a&&a.forEach(([i,s])=>{var o;(o=n.getValue(i))==null||o.set(s)})}),r.forEach(n=>n.measureEndState()),r.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}lr=!1,cr=!1,Ve.forEach(r=>r.complete(dr)),Ve.clear()}function Rn(){Ve.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(lr=!0)})}function zs(){dr=!0,Rn(),Ln(),dr=!1}class ur{constructor(t,e,n,a,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Ve.add(this),cr||(cr=!0,Oe.read(Rn),Oe.resolveKeyframes(Ln))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:a}=this;if(t[0]===null){const i=a==null?void 0:a.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&e){const o=n.readValue(e,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),a&&i===void 0&&a.set(t[0])}ks(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ve.delete(this)}cancel(){this.state==="scheduled"&&(Ve.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const js=r=>r.startsWith("--");function Hs(r,t,e){js(t)?r.style.setProperty(t,e):r.style[t]=e}function pr(r){let t;return()=>(t===void 0&&(t=r()),t)}const Ks=pr(()=>window.ScrollTimeline!==void 0),Ws={};function Ys(r,t){const e=pr(r);return()=>{var n;return(n=Ws[t])!=null?n:e()}}const kn=Ys(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),st=([r,t,e,n])=>`cubic-bezier(${r}, ${t}, ${e}, ${n})`,Sn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:st([0,.65,.55,1]),circOut:st([.55,0,1,.45]),backIn:st([.31,.01,.66,-.59]),backOut:st([.33,1.53,.69,.99])};function Mn(r,t){if(r)return typeof r=="function"?kn()?pn(r,t):"ease-out":wn(r)?st(r):Array.isArray(r)?r.map(e=>Mn(e,t)||Sn.easeOut):Sn[r]}function $s(r,t,e,{delay:n=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeOut",times:c}={},l=void 0){const d={[t]:e};c&&(d.offset=c);const u=Mn(o,a);Array.isArray(u)&&(d.easing=u);const h={delay:n,duration:a,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),r.animate(d,h)}function Gs(e){var n=e,{type:r}=n,t=Ae(n,["type"]);var a,i;return Dt(r)&&kn()?r.applyToOptions(t):((a=t.duration)!=null||(t.duration=300),(i=t.ease)!=null||(t.ease="easeOut"),t)}class qs extends rr{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:a,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:o,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,Ie(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const l=Gs(t);this.animation=$s(e,n,a,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=tr(a,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):Hs(e,n,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,e;(e=(t=this.animation).finish)==null||e.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,e;this.isPseudoElement||(e=(t=this.animation).commitStyles)==null||e.call(t)}get duration(){var e,n;const t=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return Te(Number(t))}get time(){return Te(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ks()?(this.animation.timeline=t,Ue):e(this)}}const Dn={anticipate:En,backInOut:_n,circInOut:Cn};function Qs(r){return r in Dn}function Xs(r){typeof r.ease=="string"&&Qs(r.ease)&&(r.ease=Dn[r.ease])}const Vn=10;class Zs extends qs{constructor(t){Xs(t),In(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){var d;const l=this.options,{motionValue:e,onUpdate:n,onComplete:a,element:i}=l,s=Ae(l,["motionValue","onUpdate","onComplete","element"]);if(!e)return;if(t!==void 0){e.set(t);return}const o=new nr(J(H({},s),{autoplay:!1})),c=Ce((d=this.finishedTime)!=null?d:this.time);e.setWithVelocity(o.sample(c-Vn).value,o.sample(c).value,Vn),o.stop()}}const Fn=(r,t)=>t==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&(We.test(r)||r==="0")&&!r.startsWith("url("));function Js(r){const t=r[0];if(r.length===1)return!0;for(let e=0;e<r.length;e++)if(r[e]!==t)return!0}function eo(r,t,e,n){const a=r[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=r[r.length-1],s=Fn(a,t),o=Fn(i,t);return Xe(s===o,`You are trying to animate ${t} from "${a}" to "${i}". ${a} is not an animatable value - to enable this animation set ${a} to a value animatable to ${i} via the \`style\` property.`),!s||!o?!1:Js(r)||(e==="spring"||Dt(e))&&n}function Un(r){return typeof r=="object"&&r!==null}function to(r){return Un(r)&&"offsetHeight"in r}const ro=new Set(["opacity","clipPath","filter","transform"]),no=pr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function io(r){var l;const{motionValue:t,name:e,repeatDelay:n,repeatType:a,damping:i,type:s}=r;if(!to((l=t==null?void 0:t.owner)==null?void 0:l.current))return!1;const{onUpdate:o,transformTemplate:c}=t.owner.getProps();return no()&&e&&ro.has(e)&&(e!=="transform"||!c)&&!o&&!n&&a!=="mirror"&&i!==0&&s!=="inertia"}const ao=40;class so extends rr{constructor(h){var p=h,{autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",keyframes:o,name:c,motionValue:l,element:d}=p,u=Ae(p,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var 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 f=H({autoplay:t,delay:e,type:n,repeat:a,repeatDelay:i,repeatType:s,name:c,motionValue:l,element:d},u),m=(d==null?void 0:d.KeyframeResolver)||ur;this.keyframeResolver=new m(o,(y,A,x)=>this.onKeyframesResolved(y,A,f,!x),c,l,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,e,n,a){this.keyframeResolver=void 0;const{name:i,type:s,velocity:o,delay:c,isHandoff:l,onUpdate:d}=n;this.resolvedAt=be.now(),eo(t,i,s,o)||((xe.instantAnimations||!c)&&(d==null||d(tr(t,n,e))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u=a?this.resolvedAt?this.resolvedAt-this.createdAt>ao?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=J(H({startTime:u,finalKeyframe:e},n),{keyframes:t}),p=!l&&io(h)?new Zs(J(H({},h),{element:h.motionValue.owner.current})):new nr(h);p.finished.then(()=>this.notifyFinished()).catch(Ue),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),zs()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Bn=(r,t,e,n={},a,i)=>s=>{const o=Xr(n,r)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Ce(c);const d=J(H({keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity()},o),{delay:-l,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:r,motionValue:t,element:i?void 0:a});Ba(o)||Object.assign(d,Ua(r,d)),d.duration&&(d.duration=Ce(d.duration)),d.repeatDelay&&(d.repeatDelay=Ce(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),(xe.instantAnimations||xe.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!i&&t.get()!==void 0){const h=Sa(d.keyframes,o);if(h!==void 0){Oe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new nr(d):new so(d)},zn=new Set(["width","height","top","left","right","bottom",...Be]);function oo({protectedKeys:r,needsAnimating:t},e){const n=r.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,n}function co(r,t,{delay:e=0,transitionOverride:n,type:a}={}){var u;let d=t,{transition:i=r.getDefaultTransition(),transitionEnd:s}=d,o=Ae(d,["transition","transitionEnd"]);n&&(i=n);const c=[],l=a&&r.animationState&&r.animationState.getState()[a];for(const h in o){const p=r.getValue(h,(u=r.latestValues[h])!=null?u:null),f=o[h];if(f===void 0||l&&oo(l,h))continue;const m=H({delay:e},Xr(i||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(f)&&f===v&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const x=Ra(r);if(x){const N=window.MotionHandoffAnimation(x,h,Oe);N!==null&&(m.startTime=N,y=!0)}}Pa(r,h),p.start(Bn(h,p,f,r.shouldReduceMotion&&zn.has(h)?{type:!1}:m,r,y));const A=p.animation;A&&c.push(A)}return s&&Promise.all(c).then(()=>{Oe.update(()=>{s&&Oa(r,s)})}),c}function lo({top:r,left:t,right:e,bottom:n}){return{x:{min:t,max:e},y:{min:r,max:n}}}function uo(r,t){if(!t)return r;const e=t({x:r.left,y:r.top}),n=t({x:r.right,y:r.bottom});return{top:e.y,left:e.x,bottom:n.y,right:n.x}}function po(r,t){return lo(uo(r.getBoundingClientRect(),t))}const jn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},hr={};for(const r in jn)hr[r]={isEnabled:t=>jn[r].some(e=>!!t[e])};const Hn=()=>({min:0,max:0}),fr=()=>({x:Hn(),y:Hn()}),ho=typeof window!="undefined",mr={current:null},Kn={current:!1};function fo(){if(Kn.current=!0,!!ho)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),t=()=>mr.current=r.matches;r.addListener(t),t()}else mr.current=!1}function mo(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function vo(r){return typeof r=="string"||Array.isArray(r)}const go=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Wn(r){return mo(r.animate)||go.some(t=>vo(r[t]))}function yo(r){return!!(Wn(r)||r.variants)}function bo(r,t,e){for(const n in t){const a=t[n],i=e[n];if(ve(a))r.addValue(n,a);else if(ve(i))r.addValue(n,Je(a,{owner:r}));else if(i!==a)if(r.hasValue(n)){const s=r.getValue(n);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=r.getStaticValue(n);r.addValue(n,Je(s!==void 0?s:a,{owner:r}))}}for(const n in e)t[n]===void 0&&r.removeValue(n);return t}const Yn=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),$n=r=>/^0[^.\s]+$/u.test(r),_o={test:r=>r==="auto",parse:r=>r},Gn=r=>t=>t.test(r),qn=[je,X,He,Ne,Ga,$a,_o],Qn=r=>qn.find(Gn(r)),Eo=[...qn,fe,We],Co=r=>Eo.find(Gn(r)),wo=new Set(["brightness","contrast","saturate","opacity"]);function Ao(r){const[t,e]=r.slice(0,-1).split("(");if(t==="drop-shadow")return r;const[n]=e.match(zt)||[];if(!n)return r;const a=e.replace(n,"");let i=wo.has(t)?1:0;return n!==e&&(i*=100),t+"("+i+a+")"}const To=/\b([a-z-]*)\(.*?\)/gu,vr=J(H({},We),{getAnimatableNone:r=>{const t=r.match(To);return t?t.map(Ao).join(" "):r}}),Xn=J(H({},je),{transform:Math.round}),gr=J(H({borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,radius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,backgroundPositionX:X,backgroundPositionY:X},{rotate:Ne,rotateX:Ne,rotateY:Ne,rotateZ:Ne,scale:Et,scaleX:Et,scaleY:Et,scaleZ:Et,skew:Ne,skewX:Ne,skewY:Ne,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:et,originX:tn,originY:tn,originZ:X}),{zIndex:Xn,fillOpacity:et,strokeOpacity:et,numOctaves:Xn}),Io=J(H({},gr),{color:fe,backgroundColor:fe,outlineColor:fe,fill:fe,stroke:fe,borderColor:fe,borderTopColor:fe,borderRightColor:fe,borderBottomColor:fe,borderLeftColor:fe,filter:vr,WebkitFilter:vr}),Zn=r=>Io[r];function Jn(r,t){let e=Zn(r);return e!==vr&&(e=We),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const ei=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ti{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ur,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=be.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Oe.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=s;this.latestValues=c,this.baseTarget=H({},c),this.initialValues=e.initial?H({},c):{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Wn(e),this.isVariantNode=yo(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const h=this.scrapeMotionValuesFromProps(e,{},this),{willChange:d}=h,u=Ae(h,["willChange"]);for(const p in u){const f=u[p];c[p]!==void 0&&ve(f)&&f.set(c[p],!1)}}mount(t){this.current=t,Ze.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,n)=>this.bindToMotionValue(n,e)),Kn.current||fo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:mr.current,process.env.NODE_ENV!=="production"&&$r(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ft(this.notifyUpdate),Ft(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=ze.has(t);n&&this.onBindTransform&&this.onBindTransform();const a=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Oe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in hr){const e=hr[t];if(!e)continue;const{isEnabled:n,Feature:a}=e;if(!this.features[t]&&a&&n(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):fr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<ei.length;n++){const a=ei[n];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,s=t[i];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=bo(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&e!==void 0&&(n=Je(e===null?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var a;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(a=this.getBaseTargetFromProps(this.props,t))!=null?a:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Yn(n)||$n(n))?n=parseFloat(n):!Co(n)&&We.test(e)&&(n=Jn(t,e)),this.setBaseTarget(t,ve(n)?n.get():n)),ve(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var i;const{initial:e}=this.props;let n;if(typeof e=="string"||typeof e=="object"){const s=Wr(this.props,e,(i=this.presenceContext)==null?void 0:i.custom);s&&(n=s[t])}if(e&&n!==void 0)return n;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ve(a)?a:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new Gr),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const xo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Oo(r){const t=xo.exec(r);if(!t)return[,];const[,e,n,a]=t;return[`--${e!=null?e:n}`,a]}const No=4;function ri(r,t,e=1){Ie(e<=No,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,a]=Oo(r);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const s=i.trim();return Yn(s)?parseFloat(s):s}return Bt(a)?ri(a,t,e+1):a}function Po(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||$n(r):!0}const Lo=new Set(["auto","none","0"]);function Ro(r,t,e){let n=0,a;for(;n<r.length&&!a;){const i=r[n];typeof i=="string"&&!Lo.has(i)&&nt(i).values.length&&(a=r[n]),n++}if(a&&e)for(const i of t)r[i]=Jn(e,a)}class ko extends ur{constructor(t,e,n,a,i){super(t,e,n,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),Bt(l))){const d=ri(l,e.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!zn.has(n)||t.length!==2)return;const[a,i]=t,s=Qn(a),o=Qn(i);if(s!==o)if(Pn(s)&&Pn(o))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else De[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let a=0;a<t.length;a++)(t[a]===null||Po(t[a]))&&n.push(a);n.length&&Ro(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=De[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const a=e[e.length-1];a!==void 0&&t.getValue(n,a).jump(a,!1)}measureEndState(){var o;const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const a=t.getValue(e);a&&a.jump(this.measuredOrigin,!1);const i=n.length-1,s=n[i];n[i]=De[e](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([c,l])=>{t.getValue(c).set(l)}),this.resolveNoneKeyframes()}}class ni extends ti{constructor(){super(...arguments),this.KeyframeResolver=ko}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ve(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const ii=(r,t)=>t&&typeof r=="number"?t.transform(r):r,So={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Mo=Be.length;function Do(r,t,e){let n="",a=!0;for(let i=0;i<Mo;i++){const s=Be[i],o=r[s];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(s.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||e){const l=ii(o,gr[s]);if(!c){a=!1;const d=So[s]||s;n+=`${d}(${l}) `}e&&(t[s]=l)}}return n=n.trim(),e?n=e(t,a?"":n):a&&(n="none"),n}function ai(r,t,e){const{style:n,vars:a,transformOrigin:i}=r;let s=!1,o=!1;for(const c in t){const l=t[c];if(ze.has(c)){s=!0;continue}else if(Jr(c)){a[c]=l;continue}else{const d=ii(l,gr[c]);c.startsWith("origin")?(o=!0,i[c]=d):n[c]=d}}if(t.transform||(s||e?n.transform=Do(t,r.transform,e):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:d=0}=i;n.transformOrigin=`${c} ${l} ${d}`}}function si(r,{style:t,vars:e},n,a){Object.assign(r.style,t,a&&a.getProjectionStyles(n));for(const i in e)r.style.setProperty(i,e[i])}const Vo={};function Fo(r,{layout:t,layoutId:e}){return ze.has(r)||r.startsWith("origin")||(t||e!==void 0)&&(!!Vo[r]||r==="opacity")}function oi(r,t,e){var i;const{style:n}=r,a={};for(const s in n)(ve(n[s])||t.style&&ve(t.style[s])||Fo(s,r)||((i=e==null?void 0:e.getValue(s))==null?void 0:i.liveStyle)!==void 0)&&(a[s]=n[s]);return a}function Uo(r){return window.getComputedStyle(r)}class Bo extends ni{constructor(){super(...arguments),this.type="html",this.renderInstance=si}readValueFromInstance(t,e){var n;if(ze.has(e))return(n=this.projection)!=null&&n.isProjecting?sr(e):Ds(t,e);{const a=Uo(t),i=(Jr(e)?a.getPropertyValue(e):a[e])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return po(t,e)}build(t,e,n){ai(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return oi(t,e,n)}}function zo(r,t){return r in t}class jo extends ti{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(zo(e,t)){const n=t[e];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return fr()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Ho={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ko={offset:"strokeDashoffset",array:"strokeDasharray"};function Wo(r,t,e=1,n=0,a=!0){r.pathLength=1;const i=a?Ho:Ko;r[i.offset]=X.transform(-n);const s=X.transform(t),o=X.transform(e);r[i.array]=`${s} ${o}`}function Yo(r,u,c,l,d){var h=u,{attrX:t,attrY:e,attrScale:n,pathLength:a,pathSpacing:i=1,pathOffset:s=0}=h,o=Ae(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var m,v;if(ai(r,o,l),c){r.style.viewBox&&(r.attrs.viewBox=r.style.viewBox);return}r.attrs=r.style,r.style={};const{attrs:p,style:f}=r;p.transform&&(f.transform=p.transform,delete p.transform),(f.transform||p.transformOrigin)&&(f.transformOrigin=(m=p.transformOrigin)!=null?m:"50% 50%",delete p.transformOrigin),f.transform&&(f.transformBox=(v=d==null?void 0:d.transformBox)!=null?v:"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),e!==void 0&&(p.y=e),n!==void 0&&(p.scale=n),a!==void 0&&Wo(p,a,i,s,!1)}const ci=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"]),$o=r=>typeof r=="string"&&r.toLowerCase()==="svg";function Go(r,t,e,n){si(r,t,void 0,n);for(const a in t.attrs)r.setAttribute(ci.has(a)?a:Ut(a),t.attrs[a])}function qo(r,t,e){const n=oi(r,t,e);for(const a in r)if(ve(r[a])||ve(t[a])){const i=Be.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;n[i]=r[a]}return n}class Qo extends ni{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=fr}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(ze.has(e)){const n=Zn(e);return n&&n.default||0}return e=ci.has(e)?e:Ut(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return qo(t,e,n)}build(t,e,n){Yo(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,a){Go(t,e,n,a)}mount(t){this.isSVGTag=$o(t.tagName),super.mount(t)}}function li(r){return Un(r)&&"ownerSVGElement"in r}function Xo(r){return li(r)&&r.tagName==="svg"}function Zo(r){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=li(r)&&!Xo(r)?new Qo(t):new Bo(t);e.mount(r),Ze.set(r,e)}function Jo(r){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new jo(t);e.mount(r),Ze.set(r,e)}function ec(r,t,e){const n=ve(r)?r:Je(r);return n.start(Bn("",n,t,e)),n.animation}function tc(r,t){return ve(r)||typeof r=="number"||typeof r=="string"&&!St(t)}function di(r,t,e,n){const a=[];if(tc(r,t))a.push(ec(r,St(t)&&t.default||t,e&&(e.default||e)));else{const i=Sr(r,t,n),s=i.length;Ie(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const c=i[o],l=c instanceof Element?Zo:Jo;Ze.has(c)||l(c);const d=Ze.get(c),u=H({},e);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),a.push(...co(d,J(H({},t),{transition:u}),{}))}}return a}function rc(r,t,e){const n=[];return ha(r,t,e,{spring:it}).forEach(({keyframes:i,transition:s},o)=>{n.push(...di(o,i,s))}),n}class nc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(n=>n.attachTimeline(t));return()=>{e.forEach((n,a)=>{n&&n(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ic extends nc{then(t,e){return this.finished.finally(t).then(()=>{})}}function ac(r){return Array.isArray(r)&&r.some(Array.isArray)}function sc(r){function t(e,n,a){let i=[];return ac(e)?i=rc(e,n,r):i=di(e,n,a,r),new ic(i)}return t}const ue=sc(),te={spinner:"_spinner_4n5ur_1",spinnerContainer:"_spinnerContainer_4n5ur_5",success:"_success_4n5ur_9",successContainer:"_successContainer_4n5ur_14",container:"_container_4n5ur_57",card:"_card_4n5ur_66",warning:"_warning_4n5ur_75",svg:"_svg_4n5ur_83",srOnly:"_srOnly_4n5ur_88",backButton:"_backButton_4n5ur_92"};class ui{constructor(){C(this,"template",`
|
|
3
3
|
<svg aria-hidden="true" class="${te.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"/>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<%s {...props} />
|
|
27
27
|
React keys must be passed directly to JSX without using spread:
|
|
28
28
|
let props = %s;
|
|
29
|
-
<%s key={someKey} {...props} />`,b,w,B,w),E[w+b]=!0)}if(w=null,V!==void 0&&(e(V),w=""+V),s(R)&&(e(R.key),w=""+R.key),"key"in R){V={};for(var Z in R)Z!=="key"&&(V[Z]=R[Z])}else V=R;return w&&o(V,typeof g=="function"?g.displayName||g.name||"Unknown":g),l(g,w,_,T,a(),V,P,D)}function u(g){typeof g=="object"&&g!==null&&g.$$typeof===p&&g._store&&(g._store.validated=1)}var h=ie,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),x=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),G=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,z=Array.isArray,j=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(g){return g()}};var ee,M={},q=h.react_stack_bottom_frame.bind(h,i)(),W=j(n(i)),E={};ft.Fragment=m,ft.jsx=function(g,R,V,b,T){var _=1e4>G.recentlyCreatedOwnerStacks++;return d(g,R,V,!1,b,T,_?Error("react-stack-top-frame"):q,_?j(n(g)):W)},ft.jsxs=function(g,R,V,b,T){var _=1e4>G.recentlyCreatedOwnerStacks++;return d(g,R,V,!0,b,T,_?Error("react-stack-top-frame"):q,_?j(n(g)):W)}}()),ft}var xi;function Oc(){return xi||(xi=1,process.env.NODE_ENV==="production"?At.exports=Ic():At.exports=xc()),At.exports}Oc();const Nc=[he.DinersClub,he.DinersClub,he.JCB,he.Mastercard,he.Visa,he.UnionPay,he.Maestro],Pc=r=>({}),Tt=(r,t)=>{var i,s;const e=Pc(),n=((s=(i=t==null?void 0:t.card)==null?void 0:i.status)==null?void 0:s.error)||t.status.error,a=o=>o&&e[o]?e[o]:n;if(r&&typeof r=="object"){const o=r,c=o&&typeof o.status_reason=="object"&&o.status_reason?o.status_reason:o,l=c&&typeof c.decline_code=="string"?c.decline_code:void 0,d=c&&typeof c.message=="string"?c.message:void 0,u=typeof o.message=="string"?o.message:void 0;return l?a(l):d&&e[d]?e[d]:u&&e[u]?e[u]:n}return r instanceof Error?a(r.message):typeof r=="string"?a(r):n};class Lc{constructor(t){C(this,"element");C(this,"events",{ready:new de});C(this,"ev");C(this,"customButtonStyles");C(this,"isInitialized",!1);C(this,"onPaymentAttempt");this.config=t;const e=this.config.state.styles.getState().ApplePayButton;this.onPaymentAttempt=this.config.state.checkout.getState().onCheckoutAttempt,this.ev=this.config.service.ev,this.customButtonStyles=e,this.element=document.createElement("div"),this.element.classList.add(br.applePay,br.hidden)}init(t){return Y(this,null,function*(){if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.translate.locale(),a=Ec(e);if(!a)return!1;const i=t?J(H({},t),{onError:s=>{var c;if(!this.isInitialized){console.error("Apple Pay error:",s);return}const o=this.config.state.translate.messages();Tt(s,o),(c=t.onError)==null||c.call(t,s)},onSuccess:s=>{var o;(o=t.onSuccess)==null||o.call(t,s)}}):void 0;return yield this.ev.initApple(J(H({},i),{transaction:a,supportedCardTypes:Cc(Nc),locale:wc(n||"en"),onPaymentAttempt:this.onPaymentAttempt}),this.customButtonStyles),this.ev.isAppleAvailable()?(yield this.ev.renderApple(this.element),this.isInitialized=!0,this.element.classList.remove(br.hidden),this.events.ready.emit(),!0):!1})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}const Rc=[{type:K.PAYPAL,is_active:!0,order:1},{type:K.APPLE_PAY,is_active:!0,order:2},{type:K.GOOGLE_PAY,is_active:!0,order:3},{type:K.VENMO,is_active:!0,order:4},{type:K.CARD,is_active:!0,order:5}],Ge={open:{y:0,opacity:1},close:{y:100,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},It={open:{y:0,opacity:1},close:{y:-100,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},me={open:{y:0,opacity:1},close:{y:15,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},_e={open:{y:0,opacity:1,height:"auto"},close:{y:-15,opacity:0,height:0},transition:{duration:.25,type:"spring",bounce:0}},Cr={googlePay:"
|
|
29
|
+
<%s key={someKey} {...props} />`,b,w,B,w),E[w+b]=!0)}if(w=null,V!==void 0&&(e(V),w=""+V),s(R)&&(e(R.key),w=""+R.key),"key"in R){V={};for(var Z in R)Z!=="key"&&(V[Z]=R[Z])}else V=R;return w&&o(V,typeof g=="function"?g.displayName||g.name||"Unknown":g),l(g,w,_,T,a(),V,P,D)}function u(g){typeof g=="object"&&g!==null&&g.$$typeof===p&&g._store&&(g._store.validated=1)}var h=ie,p=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),x=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),$=Symbol.for("react.client.reference"),G=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,z=Array.isArray,j=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(g){return g()}};var ee,M={},q=h.react_stack_bottom_frame.bind(h,i)(),W=j(n(i)),E={};ft.Fragment=m,ft.jsx=function(g,R,V,b,T){var _=1e4>G.recentlyCreatedOwnerStacks++;return d(g,R,V,!1,b,T,_?Error("react-stack-top-frame"):q,_?j(n(g)):W)},ft.jsxs=function(g,R,V,b,T){var _=1e4>G.recentlyCreatedOwnerStacks++;return d(g,R,V,!0,b,T,_?Error("react-stack-top-frame"):q,_?j(n(g)):W)}}()),ft}var xi;function Oc(){return xi||(xi=1,process.env.NODE_ENV==="production"?At.exports=Ic():At.exports=xc()),At.exports}Oc();const Nc=[he.DinersClub,he.DinersClub,he.JCB,he.Mastercard,he.Visa,he.UnionPay,he.Maestro],Pc=r=>({}),Tt=(r,t)=>{var i,s;const e=Pc(),n=((s=(i=t==null?void 0:t.card)==null?void 0:i.status)==null?void 0:s.error)||t.status.error,a=o=>o&&e[o]?e[o]:n;if(r&&typeof r=="object"){const o=r,c=o&&typeof o.status_reason=="object"&&o.status_reason?o.status_reason:o,l=c&&typeof c.decline_code=="string"?c.decline_code:void 0,d=c&&typeof c.message=="string"?c.message:void 0,u=typeof o.message=="string"?o.message:void 0;return l?a(l):d&&e[d]?e[d]:u&&e[u]?e[u]:n}return r instanceof Error?a(r.message):typeof r=="string"?a(r):n};class Lc{constructor(t){C(this,"element");C(this,"events",{ready:new de});C(this,"ev");C(this,"customButtonStyles");C(this,"isInitialized",!1);C(this,"onPaymentAttempt");this.config=t;const e=this.config.state.styles.getState().ApplePayButton;this.onPaymentAttempt=this.config.state.checkout.getState().onCheckoutAttempt,this.ev=this.config.service.ev,this.customButtonStyles=e,this.element=document.createElement("div"),this.element.classList.add(br.applePay,br.hidden)}init(t){return Y(this,null,function*(){if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.translate.locale(),a=Ec(e);if(!a)return!1;const i=t?J(H({},t),{onError:s=>{var c;if(!this.isInitialized){console.error("Apple Pay error:",s);return}const o=this.config.state.translate.messages();Tt(s,o),(c=t.onError)==null||c.call(t,s)},onSuccess:s=>{var o;(o=t.onSuccess)==null||o.call(t,s)}}):void 0;return yield this.ev.initApple(J(H({},i),{transaction:a,supportedCardTypes:Cc(Nc),locale:wc(n||"en"),onPaymentAttempt:this.onPaymentAttempt}),this.customButtonStyles),this.ev.isAppleAvailable()?(yield this.ev.renderApple(this.element),this.isInitialized=!0,this.element.classList.remove(br.hidden),this.events.ready.emit(),!0):!1})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}const Rc=[{type:K.PAYPAL,is_active:!0,order:1},{type:K.APPLE_PAY,is_active:!0,order:2},{type:K.GOOGLE_PAY,is_active:!0,order:3},{type:K.VENMO,is_active:!0,order:4},{type:K.CARD,is_active:!0,order:5}],Ge={open:{y:0,opacity:1},close:{y:100,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},It={open:{y:0,opacity:1},close:{y:-100,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},me={open:{y:0,opacity:1},close:{y:15,opacity:0},transition:{duration:.25,type:"spring",bounce:0}},_e={open:{y:0,opacity:1,height:"auto"},close:{y:-15,opacity:0,height:0},transition:{duration:.25,type:"spring",bounce:0}},Cr={googlePay:"_googlePay_1gtmg_1",hidden:"_hidden_1gtmg_11"};class kc{constructor(t){C(this,"element");C(this,"events",{ready:new de});C(this,"ev");C(this,"customButtonStyles");C(this,"isInitialized",!1);C(this,"onPaymentAttempt");this.config=t,this.ev=this.config.service.ev,this.customButtonStyles=this.config.state.styles.getState().GooglePayButton,this.onPaymentAttempt=this.config.state.checkout.getState().onCheckoutAttempt,this.element=document.createElement("div"),this.element.classList.add(Cr.googlePay,Cr.hidden)}init(t){return Y(this,null,function*(){if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.translate.locale(),a=_c(e);if(!a)return!1;const i=t?J(H({},t),{onError:s=>{var o;if(!this.isInitialized){console.error("Google Pay error:",s);return}Tt(s,this.config.state.translate.messages()),(o=t.onError)==null||o.call(t,s)},onSuccess:s=>{var o;(o=t.onSuccess)==null||o.call(t,s)}}):void 0;return yield this.ev.initGoogle(J(H({},i),{transaction:a,locale:Ac(n||"en"),onPaymentAttempt:this.onPaymentAttempt}),this.customButtonStyles),yield this.ev.renderGoogle(this.element),this.element.classList.remove(Cr.hidden),this.isInitialized=!0,this.events.ready.emit(),!0})}addEventListener(t,e){return this.events[t].addListener(e)}render(){return this.element}}const wr={paypal:"_paypal_1p7d0_1",hidden:"_hidden_1p7d0_10"};class Sc{constructor(t){C(this,"element");C(this,"events",{ready:new de,onPaymentAttempt:new de});C(this,"paypal");C(this,"customButtonStyles");C(this,"isInitialized",!1);C(this,"attemptEmitted",!1);C(this,"interceptOverlay");this.config=t,this.paypal=this.config.service.paypal,this.customButtonStyles=this.config.state.styles.getState().PayPalButton,this.element=document.createElement("div"),this.element.classList.add(wr.paypal,wr.hidden)}init(t){return Y(this,null,function*(){var s,o;if(!this.config)return!1;const e=this.config.state.transaction.getState(),n=this.config.state.checkout.getState(),a=()=>Y(this,null,function*(){try{return yield Xi(n.clientToken,n.environment,n.apiVersion)}catch(c){throw c}});if(!e||Object.keys(e).length===0)return console.error("PayPal transaction data is empty or invalid"),!1;if(!((s=e==null?void 0:e.paypal_info)!=null&&s.client_id))return!1;try{if(yield this.paypal.init({clientId:e.paypal_info.client_id,environment:e.paypal_info.environment||"sandbox",vault:!0,locale:Tc(this.config.state.translate.locale()),intent:"tokenize"}),!this.paypal.isLoaded())return!1}catch(c){return!1}const i=t?J(H({},t),{onError:c=>{var l;if(this.emitAttemptOnce(),!this.isInitialized){console.error("PayPal error:",c);return}(l=t.onError)==null||l.call(t,c),this.attemptEmitted=!1},onCancel:()=>{var c;this.emitAttemptOnce(),(c=t.onCancel)==null||c.call(t),this.attemptEmitted=!1},onSuccess:c=>{var l;(l=t.onSuccess)==null||l.call(t,c),this.attemptEmitted=!1}}):void 0;try{yield this.paypal.render(this.element,J(H({},i),{createBillingAgreement:a,onClick:()=>{this.emitAttemptOnce()},onApprove:l=>Y(this,[l],function*({billingToken:c}){var d;(d=i==null?void 0:i.onSuccess)==null||d.call(i,c||"")}),style:(o=this.customButtonStyles)==null?void 0:o.styles,onCancel:()=>{var c;(c=i==null?void 0:i.onCancel)==null||c.call(i)},onError:c=>{var l;(l=i==null?void 0:i.onError)==null||l.call(i,c)}}))}catch(c){return!1}return this.setupInterceptOverlay(),this.element.classList.remove(wr.hidden),this.isInitialized=!0,this.events.ready.emit(),!0})}addEventListener(t,e){return this.events[t].addListener(e)}emitAttemptOnce(){this.attemptEmitted||(this.attemptEmitted=!0,this.events.onPaymentAttempt.emit(K.PAYPAL))}setupInterceptOverlay(){if(this.interceptOverlay)return;this.element.style.position=this.element.style.position||"relative";const t=document.createElement("div");t.style.position="absolute",t.style.inset="0",t.style.background="transparent",t.style.zIndex="2",t.style.pointerEvents="auto";const e=()=>{this.emitAttemptOnce(),t.style.pointerEvents="none",setTimeout(()=>{t.style.pointerEvents="auto"},250)};t.addEventListener("pointerdown",e,{capture:!0}),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&e()},{capture:!0}),this.element.appendChild(t),this.interceptOverlay=t}render(){return this.element}}class Mc{constructor(){C(this,"template",`
|
|
30
30
|
<svg
|
|
31
31
|
xmlns='http://www.w3.org/2000/svg'
|
|
32
32
|
fill='none'
|