@paynext/sdk 0.0.125 → 0.0.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +8 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(ne,re){typeof exports=="object"&&typeof module!="undefined"?re(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],re):(ne=typeof globalThis!="undefined"?globalThis:ne||self,re(ne["PayNext SDK"]={},ne.React))})(this,function(ne,re){"use strict";var Ul=Object.defineProperty,Bl=Object.defineProperties;var zl=Object.getOwnPropertyDescriptors;var Mt=Object.getOwnPropertySymbols;var Ki=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable;var Rn=(ne,re,se)=>re in ne?Ul(ne,re,{enumerable:!0,configurable:!0,writable:!0,value:se}):ne[re]=se,U=(ne,re)=>{for(var se in re||(re={}))Ki.call(re,se)&&Rn(ne,se,re[se]);if(Mt)for(var se of Mt(re))Yi.call(re,se)&&Rn(ne,se,re[se]);return ne},J=(ne,re)=>Bl(ne,zl(re));var Ae=(ne,re)=>{var se={};for(var ve in ne)Ki.call(ne,ve)&&re.indexOf(ve)<0&&(se[ve]=ne[ve]);if(ne!=null&&Mt)for(var ve of Mt(ne))re.indexOf(ve)<0&&Yi.call(ne,ve)&&(se[ve]=ne[ve]);return se};var A=(ne,re,se)=>Rn(ne,typeof re!="symbol"?re+"":re,se);var K=(ne,re,se)=>new Promise((ve,_t)=>{var W=Te=>{try{Re(se.next(Te))}catch(ke){_t(ke)}},Je=Te=>{try{Re(se.throw(Te))}catch(ke){_t(ke)}},Re=Te=>Te.done?ve(Te.value):Promise.resolve(Te.value).then(W,Je);Re((se=se.apply(ne,re)).next())});var se=document.createElement("style");se.textContent=`._spinner_1lif3_1{height:100%;width:100%}@keyframes _spin_1lif3_1{to{transform:rotate(360deg)}}._spinner_1lif3_1{animation:_spin_1lif3_1 1s linear infinite;fill:#9ca3af;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}._spinner_1lif3_1:is(._dark_1lif3_1 *){fill:#d1d5db;--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}._spinnerContainer_1lif3_5{height:40px;width:40px}._success_1lif3_9{position:absolute;top:50%;left:50%;height:3.5rem;width:3.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));fill:#0d776e;z-index:3}._successContainer_1lif3_14{position:relative;display:grid;height:5rem;width:5rem;flex:none;place-items:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(232 250 240 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14:is(._dark_1lif3_1 *){--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14{z-index:0;animation:_containerPulse_1lif3_1 3s ease-in-out infinite}._successContainer_1lif3_14:before,._successContainer_1lif3_14:after{content:"";position:absolute;inset:0;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(209 244 224 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14:is(._dark_1lif3_1 *):before,._successContainer_1lif3_14:is(._dark_1lif3_1 *):after{--tw-bg-opacity: 1;background-color:rgb(167 233 193 / var(--tw-bg-opacity, 1))}._successContainer_1lif3_14:before,._successContainer_1lif3_14:after{animation:_ripplePulse_1lif3_1 3s cubic-bezier(.4,0,.6,1) infinite;opacity:0;z-index:1}._successContainer_1lif3_14:after{animation-delay:.5s}@keyframes _containerPulse_1lif3_1{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}@keyframes _ripplePulse_1lif3_1{0%{transform:scale(1);opacity:0}10%{transform:scale(1);opacity:.7}to{transform:scale(1.3);opacity:0}}._container_1lif3_57{width:30px;height:20px;display:flex;margin:0 1px;align-items:center;justify-content:center}._card_1lif3_66{width:28px;height:19px;display:flex;margin:0 1px;align-items:center;justify-content:center}._warning_1lif3_75{width:16px;height:16px;display:flex;align-items:center;justify-content:center}._svg_1lif3_83{width:100%;height:100%}._srOnly_1lif3_88{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}._backButton_1lif3_92{width:30px;height:30px;display:flex;margin:0 1px;align-items:center;justify-content:center;background-color:#f4f4f5;border-radius:8px}._loader_nwq3e_1{position:absolute;height:100%;top:0;left:0;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);z-index:1000;display:flex;width:100%;align-items:center;justify-content:center;border-radius:10px}._checkout_15zm1_1{padding:0 4px;overflow:hidden;z-index:0;position:relative;height:auto;min-height:60px;width:100%;max-width:640px}._hidden_15zm1_8{display:none!important}._formInitial_15zm1_12{opacity:0;transform:translateY(100px)}._cardForm_15zm1_17{opacity:1}._btnsInitial_15zm1_21{opacity:0;transform:translateY(-100px)}._buttons_qc8am_1{display:flex;flex-direction:column;gap:8px;opacity:1}._hidden_qc8am_8{display:none!important}._skeleton_qc8am_12{overflow:hidden;width:100%;height:40px;border-radius:12px;background:linear-gradient(90deg,#f0f0f0,#e0e0e0 20%,#f0f0f0 40% 100%);background-size:200% 100%;animation:_shimmer_qc8am_1 2s infinite}@keyframes _shimmer_qc8am_1{0%{background-position:-200% 0}to{background-position:200% 0}}._applePay_1wlwu_1{display:flex;flex-direction:column;gap:8px}@media (hover: hover){._applePay_1wlwu_1:hover{filter:contrast(.575) brightness(1.2)}}._hidden_1wlwu_13{display:none!important}._googlePay_17y0j_1{position:relative;display:flex;overflow:hidden;height:40px;border-radius:12px}._googlePay_17y0j_1 iframe{position:absolute;top:-1px;left:-1px;width:calc(100% + 2px)!important;height:calc(100% + 2px)!important;border:none;display:block}._hidden_17y0j_19{display:none!important}._paypal_iyh6g_1{display:flex;flex-direction:column;gap:8px}._hidden_iyh6g_7{display:none}._button_1trim_1{transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(13 118 110 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:1.5rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_1trim_1{transition-property:none}}._button_1trim_1 span{margin-left:.25rem}@media (hover: hover){._button_1trim_1:hover{opacity:.7}}._container_10ziz_2{display:flex;flex-direction:column;gap:.5rem}._venmo_10ziz_8{display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:12px;height:40px;background-color:#0088f7;width:100%;color:#fff;font-size:16px;text-align:center;cursor:pointer;transition:background-color .3s ease;svg{height:40%}@media (hover: hover){&:hover{background-color:#5683c1}}}._hidden_10ziz_35{display:none}._button_125my_1{cursor:pointer}._button_1d7ly_1{margin-top:8px;transition-property:transform,color,background,background-color,border-color,text-decoration-color,fill,stroke,opacity;transition-timing-function:ease;transition-duration:.25s;position:relative;z-index:0;box-sizing:border-box;display:inline-flex;height:2.5rem;width:100%;min-width:5rem;transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;overflow:hidden;white-space:nowrap;border-radius:.75rem;border-style:none;--tw-bg-opacity: 1;background-color:rgb(13 118 110 / var(--tw-bg-opacity, 1));padding-left:1rem;padding-right:1rem;font-size:.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto;outline:2px solid transparent;outline-offset:2px}@media (prefers-reduced-motion: reduce){._button_1d7ly_1{transition-property:none}}._button_1d7ly_1 span{margin-left:.25rem}._disabled_1d7ly_18{opacity:.7}@media (hover: hover){._button_1d7ly_1:hover{opacity:.7}}._hidden_1d7ly_28{display:none!important}._spinner_1d7ly_32{width:24px;height:24px}._cardForm_1uc4x_1{position:relative;display:grid;min-height:250px;gap:.75rem;padding-top:0;opacity:1}._hidden_1uc4x_6{display:none!important}._topOffset_1uc4x_10{margin-top:.5rem}._wrapper_1xw0g_1{position:relative}._inputContainer_1xw0g_5{background-color:transparent;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;padding-left:.75rem;padding-right:.75rem}._inputContainer_1xw0g_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xw0g_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_1xw0g_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_1xw0g_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_1xw0g_12{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._inputContainer_1xw0g_5:focus-within:not(._disabled_1xw0g_23){box-shadow:0 0 0 1px #0d766eb3,0 1px 1px #00000012,0 0 0 4px #0d766e4d}._input_1xw0g_5{display:block;width:100%;height:100%;border:none;font-size:1rem;font-weight:400;outline:none;background-color:transparent;color:#1a1a1ae6}._endContent_1xw0g_39{display:flex}._errorInput_1xw0g_18{box-shadow:0 0 0 1px #dc2727,0 2px 4px #00000012,0 1px 1.5px #0000000d}._error_1xw0g_18{margin-top:4px;margin-bottom:0;padding-left:4px;font-size:12px;font-weight:400;color:#ef4444}._label_1xw0g_56{margin-bottom:3px;display:flex;justify-content:space-between;padding-left:1px;padding-right:2px;font-size:12px;font-weight:500;color:#1a1a1ab2}._labelError_1xw0g_67{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_1xw0g_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_1xw0g_75{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_1xw0g_82{display:none!important}._wrapper_41zd2_1{position:relative}._inputContainer_41zd2_5{background-color:transparent;box-shadow:0 0 0 1px #e0e0e0,0 2px 4px #00000012,0 1px 1.5px #0000000d;transition:box-shadow .2s ease-in-out;display:flex;height:40px;width:100%;cursor:text;align-items:center;justify-content:space-between;border-radius:.75rem;padding-left:.75rem;padding-right:.75rem}._inputContainer_41zd2_5::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_41zd2_5:-ms-input-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}._inputContainer_41zd2_5::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}@media (min-width: 640px){._inputContainer_41zd2_5{font-size:.875rem;line-height:1.25rem}}._inputFocus_41zd2_12{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}._inputContainer_41zd2_5:focus-within:not(._disabled_41zd2_23){box-shadow:0 0 0 1px #0d766eb3,0 1px 1px #00000012,0 0 0 4px #0d766e4d}._input_41zd2_5{display:block;width:100%;height:100%;border:none;font-size:1rem;font-weight:400;outline:none;background-color:transparent;color:#1a1a1ae6}._endContent_41zd2_39{display:flex}._errorInput_41zd2_18{box-shadow:0 0 0 1px #dc2727,0 2px 4px #00000012,0 1px 1.5px #0000000d}._error_41zd2_18{margin-top:4px;margin-bottom:0;padding-left:4px;font-size:12px;font-weight:400;color:#ef4444}._label_41zd2_56{margin-bottom:3px;display:flex;justify-content:space-between;padding-left:1px;padding-right:2px;font-size:12px;font-weight:500;color:#1a1a1ab2}._labelError_41zd2_67{font-size:.6875rem;--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}._disabled_41zd2_23{border-style:none;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}._disabledInput_41zd2_75{opacity:1;-webkit-appearance:none!important;-webkit-text-fill-color:#9ca3af!important;--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}._hidden_41zd2_82{display:none!important}._securityContent_41zd2_86{display:grid;grid-column-gap:6px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,auto))}._container_79xkl_1{display:flex;min-height:292px;width:100%;flex-direction:column;align-items:center;justify-content:center}._title_79xkl_5{margin-top:.5rem;font-weight:300}._container_g3abj_1{border-radius:12px;margin-top:.5rem;display:flex;width:100%;flex-grow:1;flex-direction:row;align-items:flex-start;justify-content:flex-start;-moz-column-gap:.25rem;column-gap:.25rem;--tw-bg-opacity: 1;background-color:rgb(254 231 239 / var(--tw-bg-opacity, 1));padding:.75rem 1rem}._container_g3abj_1:is(._dark_g3abj_1 *){background-color:#fee7ef80;--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}._container_g3abj_1 svg{margin-top:2px;width:16px;height:16px}._title_g3abj_12{padding:0;padding-left:.25rem;font-size:.875rem;line-height:1.25rem;font-weight:300;--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}._title_g3abj_12:is(._dark_g3abj_1 *){--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(se);function ve(r,t){for(var e=0;e<t.length;e++){const n=t[e];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in r)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(r,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}class _t{constructor(t){A(this,"parent");A(this,"core");typeof window!="undefined"&&(this.parent=t)}mount(t){return K(this,null,function*(){if(!this.parent)return;if(!this.core){const a=(yield Promise.resolve().then(()=>_l)).Core;this.core=new a}t.styles&&this.core.state.styles.setState(t.styles),this.core.state.checkout.setState({clientToken:t.clientToken,environment:t.environment,apiVersion:t.apiVersion,errorMessageText:t.errorMessageText});const e=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(e),this.core.state.checkout.setState(t)})}unmount(){return K(this,null,function*(){!this.parent||!this.core||(this.parent.innerHTML="",this.core.clearState())})}}var W=(r=>(r.PAYPAL="PAYPAL",r.APPLE_PAY="APPLEPAY",r.GOOGLE_PAY="GPAY",r.CARD="CARD",r.VENMO="VENMO",r))(W||{}),Je=(r=>(r.PENDING="PENDING",r.FAILED="FAILED",r.AUTHORIZED="AUTHORIZED",r.SETTLING="SETTLING",r.SETTLED="SETTLED",r.DECLINED="DECLINED",r.CANCELLED="CANCELLED",r))(Je||{}),Re=(r=>(r.INSUFFICIENT_FUNDS="insufficient_funds",r.AUTHENTICATION_REQUIRED="authentication_required",r.CARD_ISSUER_DECLINE="card_issuer_decline",r.GENERIC_DECLINE="generic_decline",r.WITHDRAWAL_LIMIT_EXCEEDED="withdrawal_limit_exceeded",r.DO_NOT_HONOR="do_not_honor",r.EXPIRED_CARD="expired_card",r.SUSPECTED_FRAUD="suspected_fraud",r.INCORRECT_CVC="incorrect_cvc",r.INVALID_CARD_NUMBER="invalid_card_number",r.ISSUER_UNAVAILABLE="issuer_unavailable",r.CARD_LOST_OR_STOLEN="card_lost_or_stolen",r.CARD_DECLINED="card_declined",r))(Re||{});const Te={appIds:{develop:"app_00b96c0c3011",staging:"app_00396c84ac2b",sandbox:"app_03b1ea2b6dfa",production:"app_409cf462b6cc"},teamId:"team_f20c9e679d47"},ke=(r="sandbox")=>({develop:"https://dev-api.paynext.com",staging:"https://staging-api.paynext.com",sandbox:"https://sandbox-api.paynext.com",production:"https://api.paynext.com"})[r],Wi=[{type:W.PAYPAL,order:1,is_active:!0},{type:W.APPLE_PAY,order:2,is_active:!0},{type:W.GOOGLE_PAY,order:3,is_active:!0},{type:W.CARD,order:4,is_active:!0}],Gi=r=>r.googlePay?W.GOOGLE_PAY:r.applePay?W.APPLE_PAY:r.paypal?W.PAYPAL:r.braintree?W.VENMO:W.CARD,$i=r=>{const t=r.card;if(t)return{bin:t.firstSixDigits,bin_data:{brand:t.cardBrand,country:t.country,currency_code:t.currency,funding:t.funding,issuer:t.issuer,type:t.type},cvc:t.cvc,exp_month:Number(t.expMonth),exp_year:Number(t.expYear),last4:t.lastFourDigits,number:t.number}},qi=r=>{var e;const t=r.paypal;if((e=t==null?void 0:t.billing_agreement_token)!=null&&e.paypalId)return{billing_agreement_token:t.billing_agreement_token.paypalId}},Qi=r=>{var e,n;const t=r.googlePay;if(t!=null&&t.token)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(e=t.card)!=null&&e.expiry.month||t.token.expiry.month?Number(t.card.expiry.month||t.token.expiry.month):void 0,exp_year:(n=t.card)!=null&&n.expiry.year||t.token.expiry.year?Number(t.card.expiry.year||t.token.expiry.year):void 0,token:t.token.number,token_service_provider:t.token.tokenServiceProvider}},Xi=r=>{var e,n,a,i,s,o;const t=r.applePay;if(t)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(n=(e=t.networkToken)==null?void 0:e.expiry)!=null&&n.month?Number(t.networkToken.expiry.month):void 0,exp_year:(i=(a=t.networkToken)==null?void 0:a.expiry)!=null&&i.year?Number(t.networkToken.expiry.year):void 0,token:(s=t.networkToken)==null?void 0:s.number,token_service_provider:(o=t.networkToken)==null?void 0:o.tokenServiceProvider}},Zi=r=>{const t=r.braintree;if(t)return{payment_method_nonce:t.nonce}},kn=r=>{var n,a,i,s,o,c,l,d,u,h,p,f,m,v;const{applePay:t,googlePay:e}=r;if(!(!t&&!e))return{city:((n=t==null?void 0:t.billingContact)==null?void 0:n.locality)||((a=e==null?void 0:e.billingAddress)==null?void 0:a.locality)||void 0,country:((i=t==null?void 0:t.billingContact)==null?void 0:i.countryCode)||((s=e==null?void 0:e.billingAddress)==null?void 0:s.countryCode)||void 0,line1:((c=(o=t==null?void 0:t.billingContact)==null?void 0:o.addressLines)==null?void 0:c.at(0))||((l=e==null?void 0:e.billingAddress)==null?void 0:l.address1)||void 0,line2:((u=(d=t==null?void 0:t.billingContact)==null?void 0:d.addressLines)==null?void 0:u.at(1))||((h=e==null?void 0:e.billingAddress)==null?void 0:h.address2)||void 0,postal_code:((p=t==null?void 0:t.billingContact)==null?void 0:p.postalCode)||((f=e==null?void 0:e.billingAddress)==null?void 0:f.postalCode)||void 0,state:((m=t==null?void 0:t.billingContact)==null?void 0:m.administrativeArea)||((v=e==null?void 0:e.billingAddress)==null?void 0:v.administrativeArea)||void 0}},Sn=r=>{var a,i,s,o,c,l,d,u,h,p,f,m,v,b,w,x,O,I,L;const{card:t,googlePay:e,applePay:n}=r;if(!(!t&&!(e!=null&&e.card)&&!(n!=null&&n.card)))return{bin:t==null?void 0:t.firstSixDigits,bin_data:{brand:(t==null?void 0:t.cardBrand)||((a=e==null?void 0:e.card)==null?void 0:a.brand)||((i=n==null?void 0:n.card)==null?void 0:i.brand),country:(t==null?void 0:t.country)||((s=e==null?void 0:e.card)==null?void 0:s.country)||((o=n==null?void 0:n.card)==null?void 0:o.country),currency_code:(t==null?void 0:t.currency)||((c=e==null?void 0:e.card)==null?void 0:c.currency)||((l=n==null?void 0:n.card)==null?void 0:l.currency),funding:(t==null?void 0:t.funding)||((d=e==null?void 0:e.card)==null?void 0:d.funding)||((u=n==null?void 0:n.card)==null?void 0:u.funding),issuer:(t==null?void 0:t.issuer)||((h=e==null?void 0:e.card)==null?void 0:h.issuer)||((p=n==null?void 0:n.card)==null?void 0:p.issuer),type:(t==null?void 0:t.type)||((f=e==null?void 0:e.card)==null?void 0:f.segment)||((m=n==null?void 0:n.card)==null?void 0:m.segment)},cvc:t==null?void 0:t.cvc,exp_month:t!=null&&t.expMonth||(v=e==null?void 0:e.card)!=null&&v.expiry.month?Number((t==null?void 0:t.expMonth)||((b=e==null?void 0:e.card)==null?void 0:b.expiry.month)):void 0,exp_year:t!=null&&t.expYear||(w=e==null?void 0:e.card)!=null&&w.expiry.year?Number((t==null?void 0:t.expYear)||((x=e==null?void 0:e.card)==null?void 0:x.expiry.year)):void 0,last4:(t==null?void 0:t.lastFourDigits)||((O=e==null?void 0:e.card)==null?void 0:O.lastFour)||((I=n==null?void 0:n.card)==null?void 0:I.lastFour),number:(t==null?void 0:t.number)||((L=e==null?void 0:e.card)==null?void 0:L.number)}},Mn=r=>{var n,a;const{applePay:t,card:e}=r;return(n=t==null?void 0:t.billingContact)!=null&&n.givenName?`${t.billingContact.givenName} ${t.billingContact.familyName||""}`.trim():(a=e==null?void 0:e.metadata)==null?void 0:a.name},Ji=r=>{var n,a,i,s,o,c,l,d;const t=Gi(r),e={client_session:r.clientSession,three_ds_session_id:r.threeDsSessionId,type:t};switch(t){case W.CARD:return J(U({},e),{name:Mn(r),card:$i(r)});case W.PAYPAL:return J(U({},e),{paypal:qi(r)});case W.GOOGLE_PAY:return J(U({},e),{name:(a=(n=r.googlePay)==null?void 0:n.billingAddress)==null?void 0:a.name,phone:(c=(o=(s=(i=r.googlePay)==null?void 0:i.billingAddress)==null?void 0:s.phoneNumber)==null?void 0:o.replace(/ /g,""))==null?void 0:c.replace(/-/g,""),card:Sn(r),google_pay:Qi(r),billing_address:kn(r)});case W.APPLE_PAY:return J(U({},e),{name:Mn(r),card:Sn(r),apple_pay:Xi(r),phone:(d=(l=r.applePay)==null?void 0:l.shippingContact)==null?void 0:d.phoneNumber,billing_address:kn(r)});case W.VENMO:return J(U({},e),{venmo:Zi(r)});default:throw new Error(`Unsupported payment method: ${t}`)}},ea=(r,t,e)=>K(this,null,function*(){const n=`${ke(t)}/payments/create`,a=new Headers;a.append("Content-Type","application/json"),a.append("X-API-Version",e);const i=Ji(r);return yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify(i)})).json()}),ta=(r,t,e)=>K(this,null,function*(){const n=`${ke(t)}/payments/create/billing/agreement`,a=new Headers;return a.append("Content-Type","application/json"),a.append("X-API-Version",e),(yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify({client_session:r})})).json()).paypal_agreement_token_response.token_id||""}),na=(r,t,e)=>K(this,null,function*(){const n=new Headers;n.append("X-API-Version",e);const a=`${ke(t)}/payments/config?client_session_id=${r}`,s=yield(yield fetch(a,{headers:n})).json();return s.checkout_config||(s.checkout_config=Wi),s});let ra=class{constructor(t){A(this,"apple",null);A(this,"isAvailable",!1);A(this,"onReady");this.ev=t}init(l,d){return K(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:s,onPaymentAttempt:o},c){const u=this.ev.transactions.create(t);this.apple=this.ev.ui.applePay(u,J(U({locale:e,borderRadius:12,size:{width:"100%",height:"40px"}},c==null?void 0:c.styles),{allowedCardNetworks:["visa","masterCard"],requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(m,v)=>K(this,[m,v],function*(p,{fail:f}){o==null||o({paymentMethod:W.GOOGLE_PAY});try{i==null||i(p)}catch(b){console.error(b),f({message:"Cannot pay with payment credentials"})}})}));const h="available";this.isAvailable=h==="available",this.isAvailable||a==null||a("Apple Pay is not supported on this device"),a&&this.apple.on("error",a),s&&this.apple.on("cancel",s),this.onReady=n})}render(t){return K(this,null,function*(){var e;!this.apple||!this.isAvailable||(t.innerHTML="",yield this.apple.mount(t),(e=this.onReady)==null||e.call(this))})}},ia=class{constructor(t){A(this,"google",null);this.ev=t}init(l,d){return K(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:s,onPaymentAttempt:o},c){const u=this.ev.transactions.create(t);this.google=this.ev.ui.googlePay(u,J(U({locale:e,size:{width:"100%",height:40},borderRadius:12,billingAddress:{phoneNumber:!0}},c==null?void 0:c.styles),{allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["VISA","MASTERCARD"],process:(f,m)=>K(this,[f,m],function*(h,{fail:p}){o==null||o({paymentMethod:W.GOOGLE_PAY});try{i==null||i(h)}catch(v){console.error(v),p({message:"Cannot pay with payment credentials"})}})})),s&&this.google.on("cancel",s),n&&this.google.on("ready",n),a&&this.google.on("error",a)})}render(t){return K(this,null,function*(){this.google&&(t.innerHTML="",this.google.mount(t))})}};class de{constructor(){A(this,"listeners",[])}removeListener(t){this.listeners=this.listeners.filter(e=>e!==t)}addListener(t){return this.listeners.push(t),()=>this.removeListener(t)}emit(t){for(const e of this.listeners)e(t)}clear(){this.listeners=[]}}class aa{constructor(t){A(this,"threeDs",null);this.ev=t}init(i){return K(this,arguments,function*({threeDsId:t,onReady:e,onSuccess:n,onError:a}){this.threeDs=this.ev.ui.threeDSecure(t),this.threeDs.on("ready",()=>e==null?void 0:e()),this.threeDs.on("success",()=>n==null?void 0:n()),this.threeDs.on("failure",()=>a==null?void 0:a()),this.threeDs.on("error",()=>a==null?void 0:a())})}render(t){return K(this,null,function*(){this.threeDs&&this.threeDs.mount(t)})}}class sa{constructor(){A(this,"isReady",!1);A(this,"ev",null);A(this,"apple",null);A(this,"google",null);A(this,"threeDs",null);A(this,"events",{ready:new de})}isShouldLoad({teamId:t,appId:e}){var n,a;return((n=this.ev)==null?void 0:n.config.appId)!==e||((a=this.ev)==null?void 0:a.config.teamId)!==t}preloadEvervault(t){return K(this,null,function*(){if(!this.isShouldLoad(t))return;if(typeof window=="undefined")throw new Error("Evervault can only be initialized in browser environment");this.isReady=!1;const{loadEvervault:e}=yield Promise.resolve().then(()=>wl);this.ev=yield e(t.teamId,t.appId)})}initEv(t){return K(this,null,function*(){this.ev||(yield this.preloadEvervault(t)),this.apple=new ra(this.ev),this.google=new ia(this.ev),this.events.ready.emit(),this.isReady=!0})}initThreeDs(t){return K(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new aa(this.ev),yield this.threeDs.init(t),yield this.threeDs.render()})}initApple(t,e){return K(this,null,function*(){if(!this.apple)throw new Error("Evervault should be init before using Apple Pay");yield this.apple.init(t,e)})}initGoogle(t,e){return K(this,null,function*(){if(!this.google)throw new Error("Evervault should be init before using Google Pay");yield this.google.init(t,e)})}isAppleAvailable(){var t;return!!((t=this.apple)!=null&&t.isAvailable)}addEventListener(t,e){return this.events[t].addListener(e)}renderApple(t){return K(this,null,function*(){var e;return(e=this.apple)==null?void 0:e.render(t)})}renderGoogle(t){return K(this,null,function*(){var e;return(e=this.google)==null?void 0:e.render(t)})}getEv(){if(!this.ev)throw new Error("Evervault should be init before getting instance");return this.ev}}function Dt(r){return typeof r=="object"&&!Array.isArray(r)}function oa(r,t,e){var n;if(r instanceof EventTarget)return[r];if(typeof r=="string"){let a=document;const i=(n=e==null?void 0:e[r])!=null?n:a.querySelectorAll(r);return i?Array.from(i):[]}return Array.from(r)}function Dn(r,t,e,n){return typeof r=="string"&&Dt(t)?oa(r,e,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function ca(r,t,e){return r*(t+1)}function Vn(r,t,e,n){var a;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,r+parseFloat(t)):t==="<"?e:(a=n.get(t))!=null?a:r}const et=(r,t,e)=>r+(t-r)*e,la=(r,t,e)=>{const n=t-r;return((e-r)%n+n)%n+r},Fn=r=>Array.isArray(r)&&typeof r[0]!="number";function Un(r,t){return Fn(r)?r[la(0,r.length,t)]:r}function da(r,t){r.indexOf(t)===-1&&r.push(t)}function Bn(r,t){const e=r.indexOf(t);e>-1&&r.splice(e,1)}function ua(r,t,e){for(let n=0;n<r.length;n++){const a=r[n];a.at>t&&a.at<e&&(Bn(r,a),n--)}}function pa(r,t,e,n,a,i){ua(r,a,i);for(let s=0;s<t.length;s++)r.push({value:t[s],at:et(a,i,n[s]),easing:Un(e,s)})}function ha(r,t){for(let e=0;e<r.length;e++)r[e]=r[e]/(t+1)}function fa(r,t){return r.at===t.at?r.value===null?1:t.value===null?-1:0:r.at-t.at}const ge=r=>!!(r&&r.getVelocity),Vt=(r,t,e)=>{const n=t-r;return n===0?1:(e-r)/n};function zn(r,t){const e=r[r.length-1];for(let n=1;n<=t;n++){const a=Vt(0,t,n);r.push(et(e,1,a))}}function jn(r){const t=[0];return zn(t,r.length-1),t}function Ft(r){return typeof r=="function"&&"applyToOptions"in r}const Et=2e4;function Ut(r){let t=0;const e=50;let n=r.next(t);for(;!n.done&&t<Et;)t+=e,n=r.next(t);return t>=Et?1/0:t}const Ce=r=>r*1e3,xe=r=>r/1e3;function Hn(r,t=100,e){const n=e(J(U({},r),{keyframes:[0,t]})),a=Math.min(Ut(n),Et);return{type:"keyframes",ease:i=>n.next(a*i).value/t,duration:xe(a)}}let tt=()=>{},Oe=()=>{};process.env.NODE_ENV!=="production"&&(tt=(r,t)=>{!r&&typeof console!="undefined"&&console.warn(t)},Oe=(r,t)=>{if(!r)throw new Error(t)});const ma="easeInOut",va=20;function ga(r,i={},n,a){var s=i,{defaultTransition:t={}}=s,e=Ae(s,["defaultTransition"]);const o=t.duration||.3,c=new Map,l=new Map,d={},u=new Map;let h=0,p=0,f=0;for(let m=0;m<r.length;m++){const v=r[m];if(typeof v=="string"){u.set(v,p);continue}else if(!Array.isArray(v)){u.set(v.name,Vn(p,v.at,h,u));continue}let[b,w,x={}]=v;x.at!==void 0&&(p=Vn(p,x.at,h,u));let O=0;const I=(L,N,S,B=0,G=0)=>{const $=ba(L),D=N,{delay:F=0,times:j=jn($),type:H="keyframes",repeat:ee,repeatType:M,repeatDelay:q=0}=D,Y=Ae(D,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:E=t.ease||"easeOut",duration:g}=N;const R=typeof F=="function"?F(B,G):F,V=$.length,y=Ft(H)?H:a==null?void 0:a[H];if(V<=2&&y){let C=100;if(V===2&&Ea($)){const le=$[1]-$[0];C=Math.abs(le)}const z=U({},Y);g!==void 0&&(z.duration=Ce(g));const Z=Hn(z,C,y);E=Z.ease,g=Z.duration}g!=null||(g=o);const T=p+R;j.length===1&&j[0]===0&&(j[1]=1);const _=j.length-$.length;if(_>0&&zn(j,_),$.length===1&&$.unshift(null),ee){Oe(ee<va,"Repeat count too high, must be less than 20"),g=ca(g,ee);const C=[...$],z=[...j];E=Array.isArray(E)?[...E]:[E];const Z=[...E];for(let le=0;le<ee;le++){$.push(...C);for(let k=0;k<C.length;k++)j.push(z[k]+(le+1)),E.push(k===0?"linear":Un(Z,k-1))}ha(j,ee)}const P=T+g;pa(S,$,E,j,T,P),O=Math.max(R+g,O),f=Math.max(P,f)};if(ge(b)){const L=Kn(b,l);I(w,x,Yn("default",L))}else{const L=Dn(b,w,n,d),N=L.length;for(let S=0;S<N;S++){w=w,x=x;const B=L[S],G=Kn(B,l);for(const $ in w)I(w[$],ya(x,$),Yn($,G),S,N)}}h=p,p+=O}return l.forEach((m,v)=>{for(const b in m){const w=m[b];w.sort(fa);const x=[],O=[],I=[];for(let N=0;N<w.length;N++){const{at:S,value:B,easing:G}=w[N];x.push(B),O.push(Vt(0,f,S)),I.push(G||"easeOut")}O[0]!==0&&(O.unshift(0),x.unshift(x[0]),I.unshift(ma)),O[O.length-1]!==1&&(O.push(1),x.push(null)),c.has(v)||c.set(v,{keyframes:{},transition:{}});const L=c.get(v);L.keyframes[b]=x,L.transition[b]=U(J(U({},t),{duration:f,ease:I,times:O}),e)}}),c}function Kn(r,t){return!t.has(r)&&t.set(r,{}),t.get(r)}function Yn(r,t){return t[r]||(t[r]=[]),t[r]}function ba(r){return Array.isArray(r)?r:[r]}function ya(r,t){return r&&r[t]?U(U({},r),r[t]):U({},r)}const _a=r=>typeof r=="number",Ea=r=>r.every(_a),nt=new WeakMap,Ca=r=>Array.isArray(r);function Wn(r){const t=[{},{}];return r==null||r.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Gn(r,t,e,n){if(typeof t=="function"){const[a,i]=Wn(n);t=t(e!==void 0?e:r.custom,a,i)}if(typeof t=="string"&&(t=r.variants&&r.variants[t]),typeof t=="function"){const[a,i]=Wn(n);t=t(e!==void 0?e:r.custom,a,i)}return t}function wa(r,t,e){const n=r.getProps();return Gn(n,t,n.custom,r)}const Ct=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Aa(r,t){let e=new Set,n=new Set,a=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(d){s.has(d)&&(l.schedule(d),r()),d(o)}const l={schedule:(d,u=!1,h=!1)=>{const f=h&&a?e:n;return u&&s.add(d),f.has(d)||f.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(o=d,a){i=!0;return}a=!0,[e,n]=[n,e],e.forEach(c),e.clear(),a=!1,i&&(i=!1,l.process(d))}};return l}const Ne={},Ta=40;function Ia(r,t){let e=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>e=!0,s=Ct.reduce((x,O)=>(x[O]=Aa(i),x),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:d,update:u,preRender:h,render:p,postRender:f}=s,m=()=>{const x=Ne.useManualTiming?a.timestamp:performance.now();e=!1,Ne.useManualTiming||(a.delta=n?1e3/60:Math.max(Math.min(x-a.timestamp,Ta),1)),a.timestamp=x,a.isProcessing=!0,o.process(a),c.process(a),l.process(a),d.process(a),u.process(a),h.process(a),p.process(a),f.process(a),a.isProcessing=!1,e&&t&&(n=!1,r(m))},v=()=>{e=!0,n=!0,a.isProcessing||r(m)};return{schedule:Ct.reduce((x,O)=>{const I=s[O];return x[O]=(L,N=!1,S=!1)=>(e||v(),I.schedule(L,N,S)),x},{}),cancel:x=>{for(let O=0;O<Ct.length;O++)s[Ct[O]].cancel(x)},state:a,steps:s}}const je=r=>r,{schedule:Pe,cancel:Bt,state:wt}=Ia(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:je,!0);let At;function xa(){At=void 0}const ye={now:()=>(At===void 0&&ye.set(wt.isProcessing||Ne.useManualTiming?wt.timestamp:performance.now()),At),set:r=>{At=r,queueMicrotask(xa)}},$n=new Set;function qn(r,t,e){r||$n.has(t)||(console.warn(t),$n.add(t))}class Qn{constructor(){this.subscriptions=[]}add(t){return da(this.subscriptions,t),()=>Bn(this.subscriptions,t)}notify(t,e,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,e,n);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Xn(r,t){return t?r*(1e3/t):0}const Zn=30,Oa=r=>!isNaN(parseFloat(r));class Na{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,a=!0)=>{var s,o;const i=ye.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();a&&((o=this.events.renderRequest)==null||o.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Oa(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&qn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Qn);const n=this.events[t].add(e);return t==="change"?()=>{n(),Pe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){!e||!this.passiveEffect?this.updateAndNotify(t,e):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Zn)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Zn);return Xn(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,e;(t=this.dependents)==null||t.clear(),(e=this.events.destroy)==null||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rt(r,t){return new Na(r,t)}function Pa(r,t,e){r.hasValue(t)?r.getValue(t).set(e):r.addValue(t,rt(e))}function La(r){return Ca(r)?r[r.length-1]||0:r}function Ra(r,t){let s=wa(r,t)||{},{transitionEnd:n={},transition:a={}}=s,i=Ae(s,["transitionEnd","transition"]);i=U(U({},i),n);for(const o in i){const c=La(i[o]);Pa(r,o,c)}}function ka(r){return!!(ge(r)&&r.add)}function Sa(r,t){const e=r.getValue("willChange");if(ka(e))return e.add(t);if(!e&&Ne.WillChange){const n=new Ne.WillChange("auto");r.addValue("willChange",n),n.add(t)}}const zt=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ma="data-"+zt("framerAppearId");function Da(r){return r.props[Ma]}const Va=r=>r!==null;function Fa(r,{repeat:t,repeatType:e="loop"},n){const a=r.filter(Va),i=t&&e!=="loop"&&t%2===1?0:a.length-1;return a[i]}const He=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ke=new Set(He),Ua={type:"spring",stiffness:500,damping:25,restSpeed:10},Ba=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),za={type:"keyframes",duration:.8},ja={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ha=(r,{keyframes:t})=>t.length>2?za:Ke.has(r)?r.startsWith("scale")?Ba(t[1]):Ua:ja;function Ka(u){var h=u,{when:r,delay:t,delayChildren:e,staggerChildren:n,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:c,elapsed:l}=h,d=Ae(h,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}function Jn(r,t){var e,n;return(n=(e=r==null?void 0:r[t])!=null?e:r==null?void 0:r.default)!=null?n:r}const er=r=>t=>typeof t=="string"&&t.startsWith(r),tr=er("--"),Ya=er("var(--"),jt=r=>Ya(r)?Wa.test(r.split("/*")[0].trim()):!1,Wa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Se=(r,t,e)=>e>t?t:e<r?r:e,Ye={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},it=J(U({},Ye),{transform:r=>Se(0,1,r)}),Tt=J(U({},Ye),{default:1}),at=r=>Math.round(r*1e5)/1e5,Ht=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ga(r){return r==null}const $a=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kt=(r,t)=>e=>!!(typeof e=="string"&&$a.test(e)&&e.startsWith(r)||t&&!Ga(e)&&Object.prototype.hasOwnProperty.call(e,t)),nr=(r,t,e)=>n=>{if(typeof n!="string")return n;const[a,i,s,o]=n.match(Ht);return{[r]:parseFloat(a),[t]:parseFloat(i),[e]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},qa=r=>Se(0,255,r),Yt=J(U({},Ye),{transform:r=>Math.round(qa(r))}),Me={test:Kt("rgb","red"),parse:nr("red","green","blue"),transform:({red:r,green:t,blue:e,alpha:n=1})=>"rgba("+Yt.transform(r)+", "+Yt.transform(t)+", "+Yt.transform(e)+", "+at(it.transform(n))+")"};function Qa(r){let t="",e="",n="",a="";return r.length>5?(t=r.substring(1,3),e=r.substring(3,5),n=r.substring(5,7),a=r.substring(7,9)):(t=r.substring(1,2),e=r.substring(2,3),n=r.substring(3,4),a=r.substring(4,5),t+=t,e+=e,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const Wt={test:Kt("#"),parse:Qa,transform:Me.transform},st=r=>({test:t=>typeof t=="string"&&t.endsWith(r)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${r}`}),Le=st("deg"),We=st("%"),X=st("px"),Xa=st("vh"),Za=st("vw"),rr=J(U({},We),{parse:r=>We.parse(r)/100,transform:r=>We.transform(r*100)}),Ge={test:Kt("hsl","hue"),parse:nr("hue","saturation","lightness"),transform:({hue:r,saturation:t,lightness:e,alpha:n=1})=>"hsla("+Math.round(r)+", "+We.transform(at(t))+", "+We.transform(at(e))+", "+at(it.transform(n))+")"},fe={test:r=>Me.test(r)||Wt.test(r)||Ge.test(r),parse:r=>Me.test(r)?Me.parse(r):Ge.test(r)?Ge.parse(r):Wt.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Me.transform(r):Ge.transform(r)},Ja=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function es(r){var t,e;return isNaN(r)&&typeof r=="string"&&(((t=r.match(Ht))==null?void 0:t.length)||0)+(((e=r.match(Ja))==null?void 0:e.length)||0)>0}const ir="number",ar="color",ts="var",ns="var(",sr="${}",rs=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ot(r){const t=r.toString(),e=[],n={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(rs,c=>(fe.test(c)?(n.color.push(i),a.push(ar),e.push(fe.parse(c))):c.startsWith(ns)?(n.var.push(i),a.push(ts),e.push(c)):(n.number.push(i),a.push(ir),e.push(parseFloat(c))),++i,sr)).split(sr);return{values:e,split:o,indexes:n,types:a}}function or(r){return ot(r).values}function cr(r){const{split:t,types:e}=ot(r),n=t.length;return a=>{let i="";for(let s=0;s<n;s++)if(i+=t[s],a[s]!==void 0){const o=e[s];o===ir?i+=at(a[s]):o===ar?i+=fe.transform(a[s]):i+=a[s]}return i}}const is=r=>typeof r=="number"?0:r;function as(r){const t=or(r);return cr(r)(t.map(is))}const $e={test:es,parse:or,createTransformer:cr,getAnimatableNone:as};function Gt(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*(2/3-e)*6:r}function ss({hue:r,saturation:t,lightness:e,alpha:n}){r/=360,t/=100,e/=100;let a=0,i=0,s=0;if(!t)a=i=s=e;else{const o=e<.5?e*(1+t):e+t-e*t,c=2*e-o;a=Gt(c,o,r+1/3),i=Gt(c,o,r),s=Gt(c,o,r-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:n}}function It(r,t){return e=>e>0?t:r}const $t=(r,t,e)=>{const n=r*r,a=e*(t*t-n)+n;return a<0?0:Math.sqrt(a)},os=[Wt,Me,Ge],cs=r=>os.find(t=>t.test(r));function lr(r){const t=cs(r);if(tt(!!t,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let e=t.parse(r);return t===Ge&&(e=ss(e)),e}const dr=(r,t)=>{const e=lr(r),n=lr(t);if(!e||!n)return It(r,t);const a=U({},e);return i=>(a.red=$t(e.red,n.red,i),a.green=$t(e.green,n.green,i),a.blue=$t(e.blue,n.blue,i),a.alpha=et(e.alpha,n.alpha,i),Me.transform(a))},qt=new Set(["none","hidden"]);function ls(r,t){return qt.has(r)?e=>e<=0?r:t:e=>e>=1?t:r}const ds=(r,t)=>e=>t(r(e)),Qt=(...r)=>r.reduce(ds);function us(r,t){return e=>et(r,t,e)}function Xt(r){return typeof r=="number"?us:typeof r=="string"?jt(r)?It:fe.test(r)?dr:fs:Array.isArray(r)?ur:typeof r=="object"?fe.test(r)?dr:ps:It}function ur(r,t){const e=[...r],n=e.length,a=r.map((i,s)=>Xt(i)(i,t[s]));return i=>{for(let s=0;s<n;s++)e[s]=a[s](i);return e}}function ps(r,t){const e=U(U({},r),t),n={};for(const a in e)r[a]!==void 0&&t[a]!==void 0&&(n[a]=Xt(r[a])(r[a],t[a]));return a=>{for(const i in n)e[i]=n[i](a);return e}}function hs(r,t){var a;const e=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=r.indexes[s][n[s]],c=(a=r.values[o])!=null?a:0;e[i]=c,n[s]++}return e}const fs=(r,t)=>{const e=$e.createTransformer(t),n=ot(r),a=ot(t);return n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length?qt.has(r)&&!a.values.length||qt.has(t)&&!n.values.length?ls(r,t):Qt(ur(hs(n,a),a.values),e):(tt(!0,`Complex values '${r}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),It(r,t))};function pr(r,t,e){return typeof r=="number"&&typeof t=="number"&&typeof e=="number"?et(r,t,e):Xt(r)(r,t)}const ms=r=>{const t=({timestamp:e})=>r(e);return{start:(e=!0)=>Pe.update(t,e),stop:()=>Bt(t),now:()=>wt.isProcessing?wt.timestamp:ye.now()}},hr=(r,t,e=10)=>{let n="";const a=Math.max(Math.round(t/e),2);for(let i=0;i<a;i++)n+=r(i/(a-1))+", ";return`linear(${n.substring(0,n.length-2)})`},vs=5;function fr(r,t,e){const n=Math.max(t-vs,0);return Xn(e-r(n),t-n)}const ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Zt=.001;function gs({duration:r=ce.duration,bounce:t=ce.bounce,velocity:e=ce.velocity,mass:n=ce.mass}){let a,i;tt(r<=Ce(ce.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=Se(ce.minDamping,ce.maxDamping,s),r=Se(ce.minDuration,ce.maxDuration,xe(r)),s<1?(a=l=>{const d=l*s,u=d*r,h=d-e,p=Jt(l,s),f=Math.exp(-u);return Zt-h/p*f},i=l=>{const u=l*s*r,h=u*e+e,p=Math.pow(s,2)*Math.pow(l,2)*r,f=Math.exp(-u),m=Jt(Math.pow(l,2),s);return(-a(l)+Zt>0?-1:1)*((h-p)*f)/m}):(a=l=>{const d=Math.exp(-l*r),u=(l-e)*r+1;return-Zt+d*u},i=l=>{const d=Math.exp(-l*r),u=(e-l)*(r*r);return d*u});const o=5/r,c=ys(a,i,o);if(r=Ce(r),isNaN(c))return{stiffness:ce.stiffness,damping:ce.damping,duration:r};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:s*2*Math.sqrt(n*l),duration:r}}}const bs=12;function ys(r,t,e){let n=e;for(let a=1;a<bs;a++)n=n-r(n)/t(n);return n}function Jt(r,t){return r*Math.sqrt(1-t*t)}const _s=["duration","bounce"],Es=["stiffness","damping","mass"];function mr(r,t){return t.some(e=>r[e]!==void 0)}function Cs(r){let t=U({velocity:ce.velocity,stiffness:ce.stiffness,damping:ce.damping,mass:ce.mass,isResolvedFromDuration:!1},r);if(!mr(r,Es)&&mr(r,_s))if(r.visualDuration){const e=r.visualDuration,n=2*Math.PI/(e*1.2),a=n*n,i=2*Se(.05,1,1-(r.bounce||0))*Math.sqrt(a);t=J(U({},t),{mass:ce.mass,stiffness:a,damping:i})}else{const e=gs(r);t=J(U(U({},t),e),{mass:ce.mass}),t.isResolvedFromDuration=!0}return t}function ct(r=ce.visualDuration,t=ce.bounce){const e=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:t}:r;let{restSpeed:n,restDelta:a}=e;const i=e.keyframes[0],s=e.keyframes[e.keyframes.length-1],o={done:!1,value:i},{stiffness:c,damping:l,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=Cs(J(U({},e),{velocity:-xe(e.velocity||0)})),f=h||0,m=l/(2*Math.sqrt(c*d)),v=s-i,b=xe(Math.sqrt(c/d)),w=Math.abs(v)<5;n||(n=w?ce.restSpeed.granular:ce.restSpeed.default),a||(a=w?ce.restDelta.granular:ce.restDelta.default);let x;if(m<1){const I=Jt(b,m);x=L=>{const N=Math.exp(-m*b*L);return s-N*((f+m*b*v)/I*Math.sin(I*L)+v*Math.cos(I*L))}}else if(m===1)x=I=>s-Math.exp(-b*I)*(v+(f+b*v)*I);else{const I=b*Math.sqrt(m*m-1);x=L=>{const N=Math.exp(-m*b*L),S=Math.min(I*L,300);return s-N*((f+m*b*v)*Math.sinh(S)+I*v*Math.cosh(S))/I}}const O={calculatedDuration:p&&u||null,next:I=>{const L=x(I);if(p)o.done=I>=u;else{let N=I===0?f:0;m<1&&(N=I===0?Ce(f):fr(x,I,L));const S=Math.abs(N)<=n,B=Math.abs(s-L)<=a;o.done=S&&B}return o.value=o.done?s:L,o},toString:()=>{const I=Math.min(Ut(O),Et),L=hr(N=>O.next(I*N).value,I,30);return I+"ms "+L},toTransition:()=>{}};return O}ct.applyToOptions=r=>{const t=Hn(r,100,ct);return r.ease=t.ease,r.duration=Ce(t.duration),r.type="keyframes",r};function en({keyframes:r,velocity:t=0,power:e=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:c,restDelta:l=.5,restSpeed:d}){const u=r[0],h={done:!1,value:u},p=S=>o!==void 0&&S<o||c!==void 0&&S>c,f=S=>o===void 0?c:c===void 0||Math.abs(o-S)<Math.abs(c-S)?o:c;let m=e*t;const v=u+m,b=s===void 0?v:s(v);b!==v&&(m=b-u);const w=S=>-m*Math.exp(-S/n),x=S=>b+w(S),O=S=>{const B=w(S),G=x(S);h.done=Math.abs(B)<=l,h.value=h.done?b:G};let I,L;const N=S=>{p(h.value)&&(I=S,L=ct({keyframes:[h.value,f(h.value)],velocity:fr(x,S,h.value),damping:a,stiffness:i,restDelta:l,restSpeed:d}))};return N(0),{calculatedDuration:null,next:S=>{let B=!1;return!L&&I===void 0&&(B=!0,O(S),N(S)),I!==void 0&&S>=I?L.next(S-I):(!B&&O(S),h)}}}function ws(r,t,e){const n=[],a=e||Ne.mix||pr,i=r.length-1;for(let s=0;s<i;s++){let o=a(r[s],r[s+1]);if(t){const c=Array.isArray(t)?t[s]||je:t;o=Qt(c,o)}n.push(o)}return n}function As(r,t,{clamp:e=!0,ease:n,mixer:a}={}){const i=r.length;if(Oe(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=r[0]===r[1];r[0]>r[i-1]&&(r=[...r].reverse(),t=[...t].reverse());const o=ws(t,n,a),c=o.length,l=d=>{if(s&&d<r[0])return t[0];let u=0;if(c>1)for(;u<r.length-2&&!(d<r[u+1]);u++);const h=Vt(r[u],r[u+1],d);return o[u](h)};return e?d=>l(Se(r[0],r[i-1],d)):l}function Ts(r,t){return r.map(e=>e*t)}const vr=(r,t,e)=>(((1-3*e+3*t)*r+(3*e-6*t))*r+3*t)*r,Is=1e-7,xs=12;function Os(r,t,e,n,a){let i,s,o=0;do s=t+(e-t)/2,i=vr(s,n,a)-r,i>0?e=s:t=s;while(Math.abs(i)>Is&&++o<xs);return s}function lt(r,t,e,n){if(r===t&&e===n)return je;const a=i=>Os(i,0,1,r,e);return i=>i===0||i===1?i:vr(a(i),t,n)}const Ns=lt(.42,0,1,1),Ps=lt(0,0,.58,1),gr=lt(.42,0,.58,1),br=r=>t=>t<=.5?r(2*t)/2:(2-r(2*(1-t)))/2,yr=r=>t=>1-r(1-t),_r=lt(.33,1.53,.69,.99),tn=yr(_r),Er=br(tn),Cr=r=>(r*=2)<1?.5*tn(r):.5*(2-Math.pow(2,-10*(r-1))),nn=r=>1-Math.sin(Math.acos(r)),Ls=yr(nn),wr=br(nn),Ar=r=>Array.isArray(r)&&typeof r[0]=="number",Tr={linear:je,easeIn:Ns,easeInOut:gr,easeOut:Ps,circIn:nn,circInOut:wr,circOut:Ls,backIn:tn,backInOut:Er,backOut:_r,anticipate:Cr},Rs=r=>typeof r=="string",Ir=r=>{if(Ar(r)){Oe(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,e,n,a]=r;return lt(t,e,n,a)}else if(Rs(r))return Oe(Tr[r]!==void 0,`Invalid easing type '${r}'`),Tr[r];return r};function ks(r,t){return r.map(()=>t||gr).splice(0,r.length-1)}function qe({duration:r=300,keyframes:t,times:e,ease:n="easeInOut"}){const a=Fn(n)?n.map(Ir):Ir(n),i={done:!1,value:t[0]},s=Ts(e&&e.length===t.length?e:jn(t),r),o=As(s,t,{ease:Array.isArray(a)?a:ks(t,a)});return{calculatedDuration:r,next:c=>(i.value=o(c),i.done=c>=r,i)}}const Ss=r=>r!==null;function rn(r,{repeat:t,repeatType:e="loop"},n,a=1){const i=r.filter(Ss),o=a<0||t&&e!=="loop"&&t%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const Ms={decay:en,inertia:en,tween:qe,keyframes:qe,spring:ct};function xr(r){typeof r.type=="string"&&(r.type=Ms[r.type])}class an{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ds=r=>r/100;class sn extends an{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,a;const{motionValue:e}=this.options;e&&e.updatedAt!==ye.now()&&this.tick(ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(n=this.options).onStop)==null||a.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;xr(t);const{type:e=qe,repeat:n=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=t;let{keyframes:o}=t;const c=e||qe;process.env.NODE_ENV!=="production"&&c!==qe&&Oe(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),c!==qe&&typeof o[0]!="number"&&(this.mixKeyframes=Qt(Ds,pr(o[0],o[1])),o=[0,100]);const l=c(J(U({},t),{keyframes:o}));i==="mirror"&&(this.mirroredGenerator=c(J(U({},t),{keyframes:[...o].reverse(),velocity:-s}))),l.calculatedDuration===null&&(l.calculatedDuration=Ut(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(n+1)-a,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:a,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const b=this.currentTime-l*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?b<0:b>a;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let x=this.currentTime,O=n;if(u){const S=Math.min(this.currentTime,a)/o;let B=Math.floor(S),G=S%1;!G&&S>=1&&(G=1),G===1&&B--,B=Math.min(B,u+1),!!(B%2)&&(h==="reverse"?(G=1-G,p&&(G-=p/o)):h==="mirror"&&(O=s)),x=Se(0,1,G)*o}const I=w?{done:!1,value:d[0]}:O.next(x);i&&(I.value=i(I.value));let{done:L}=I;!w&&c!==null&&(L=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return N&&f!==en&&(I.value=rn(d,this.options,v,this.speed)),m&&m(I.value),N&&this.finish(),I}then(t,e){return this.finished.then(t,e)}get duration(){return xe(this.calculatedDuration)}get time(){return xe(this.currentTime)}set time(t){var e;t=Ce(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(e=this.driver)==null||e.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ye.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=xe(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=ms,startTime:e}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(i=(a=this.options).onPlay)==null||i.call(a);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e!=null?e:n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,e;this.notifyFinished(),this.teardown(),this.state="finished",(e=(t=this.options).onComplete)==null||e.call(t)}cancel(){var t,e;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(e=(t=this.options).onCancel)==null||e.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var e;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(e=this.driver)==null||e.stop(),t.observe(this)}}function Vs(r){var t;for(let e=1;e<r.length;e++)(t=r[e])!=null||(r[e]=r[e-1])}const De=r=>r*180/Math.PI,on=r=>{const t=De(Math.atan2(r[1],r[0]));return cn(t)},Fs={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:on,rotateZ:on,skewX:r=>De(Math.atan(r[1])),skewY:r=>De(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},cn=r=>(r=r%360,r<0&&(r+=360),r),Or=on,Nr=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),Pr=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),Us={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Nr,scaleY:Pr,scale:r=>(Nr(r)+Pr(r))/2,rotateX:r=>cn(De(Math.atan2(r[6],r[5]))),rotateY:r=>cn(De(Math.atan2(-r[2],r[0]))),rotateZ:Or,rotate:Or,skewX:r=>De(Math.atan(r[4])),skewY:r=>De(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function ln(r){return r.includes("scale")?1:0}function dn(r,t){if(!r||r==="none")return ln(t);const e=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,a;if(e)n=Us,a=e;else{const o=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Fs,a=o}if(!a)return ln(t);const i=n[t],s=a[1].split(",").map(zs);return typeof i=="function"?i(s):s[i]}const Bs=(r,t)=>{const{transform:e="none"}=getComputedStyle(r);return dn(e,t)};function zs(r){return parseFloat(r.trim())}const Lr=r=>r===Ye||r===X,js=new Set(["x","y","z"]),Hs=He.filter(r=>!js.has(r));function Ks(r){const t=[];return Hs.forEach(e=>{const n=r.getValue(e);n!==void 0&&(t.push([e,n.get()]),n.set(e.startsWith("scale")?1:0))}),t}const Ve={width:({x:r},{paddingLeft:t="0",paddingRight:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),height:({y:r},{paddingTop:t="0",paddingBottom:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),top:(r,{top:t})=>parseFloat(t),left:(r,{left:t})=>parseFloat(t),bottom:({y:r},{top:t})=>parseFloat(t)+(r.max-r.min),right:({x:r},{left:t})=>parseFloat(t)+(r.max-r.min),x:(r,{transform:t})=>dn(t,"x"),y:(r,{transform:t})=>dn(t,"y")};Ve.translateX=Ve.x,Ve.translateY=Ve.y;const Fe=new Set;let un=!1,pn=!1,hn=!1;function Rr(){if(pn){const r=Array.from(Fe).filter(n=>n.needsMeasurement),t=new Set(r.map(n=>n.element)),e=new Map;t.forEach(n=>{const a=Ks(n);a.length&&(e.set(n,a),n.render())}),r.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const a=e.get(n);a&&a.forEach(([i,s])=>{var o;(o=n.getValue(i))==null||o.set(s)})}),r.forEach(n=>n.measureEndState()),r.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}pn=!1,un=!1,Fe.forEach(r=>r.complete(hn)),Fe.clear()}function kr(){Fe.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(pn=!0)})}function Ys(){hn=!0,kr(),Rr(),hn=!1}class fn{constructor(t,e,n,a,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Fe.add(this),un||(un=!0,Pe.read(kr),Pe.resolveKeyframes(Rr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:a}=this;if(t[0]===null){const i=a==null?void 0:a.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&e){const o=n.readValue(e,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),a&&i===void 0&&a.set(t[0])}Vs(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Fe.delete(this)}cancel(){this.state==="scheduled"&&(Fe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ws=r=>r.startsWith("--");function Gs(r,t,e){Ws(t)?r.style.setProperty(t,e):r.style[t]=e}function mn(r){let t;return()=>(t===void 0&&(t=r()),t)}const $s=mn(()=>window.ScrollTimeline!==void 0),qs={};function Qs(r,t){const e=mn(r);return()=>{var n;return(n=qs[t])!=null?n:e()}}const Sr=Qs(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),dt=([r,t,e,n])=>`cubic-bezier(${r}, ${t}, ${e}, ${n})`,Mr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dt([0,.65,.55,1]),circOut:dt([.55,0,1,.45]),backIn:dt([.31,.01,.66,-.59]),backOut:dt([.33,1.53,.69,.99])};function Dr(r,t){if(r)return typeof r=="function"?Sr()?hr(r,t):"ease-out":Ar(r)?dt(r):Array.isArray(r)?r.map(e=>Dr(e,t)||Mr.easeOut):Mr[r]}function Xs(r,t,e,{delay:n=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeOut",times:c}={},l=void 0){const d={[t]:e};c&&(d.offset=c);const u=Dr(o,a);Array.isArray(u)&&(d.easing=u);const h={delay:n,duration:a,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),r.animate(d,h)}function Zs(e){var n=e,{type:r}=n,t=Ae(n,["type"]);var a,i;return Ft(r)&&Sr()?r.applyToOptions(t):((a=t.duration)!=null||(t.duration=300),(i=t.ease)!=null||(t.ease="easeOut"),t)}class Js extends an{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:a,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:o,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,Oe(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const l=Zs(t);this.animation=Xs(e,n,a,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=rn(a,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):Gs(e,n,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,e;(e=(t=this.animation).finish)==null||e.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,e;this.isPseudoElement||(e=(t=this.animation).commitStyles)==null||e.call(t)}get duration(){var e,n;const t=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return xe(Number(t))}get time(){return xe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&$s()?(this.animation.timeline=t,je):e(this)}}const Vr={anticipate:Cr,backInOut:Er,circInOut:wr};function eo(r){return r in Vr}function to(r){typeof r.ease=="string"&&eo(r.ease)&&(r.ease=Vr[r.ease])}const Fr=10;class no extends Js{constructor(t){to(t),xr(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){var d;const l=this.options,{motionValue:e,onUpdate:n,onComplete:a,element:i}=l,s=Ae(l,["motionValue","onUpdate","onComplete","element"]);if(!e)return;if(t!==void 0){e.set(t);return}const o=new sn(J(U({},s),{autoplay:!1})),c=Ce((d=this.finishedTime)!=null?d:this.time);e.setWithVelocity(o.sample(c-Fr).value,o.sample(c).value,Fr),o.stop()}}const Ur=(r,t)=>t==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&($e.test(r)||r==="0")&&!r.startsWith("url("));function ro(r){const t=r[0];if(r.length===1)return!0;for(let e=0;e<r.length;e++)if(r[e]!==t)return!0}function io(r,t,e,n){const a=r[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=r[r.length-1],s=Ur(a,t),o=Ur(i,t);return tt(s===o,`You are trying to animate ${t} from "${a}" to "${i}". ${a} is not an animatable value - to enable this animation set ${a} to a value animatable to ${i} via the \`style\` property.`),!s||!o?!1:ro(r)||(e==="spring"||Ft(e))&&n}function Br(r){return typeof r=="object"&&r!==null}function ao(r){return Br(r)&&"offsetHeight"in r}const so=new Set(["opacity","clipPath","filter","transform"]),oo=mn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function co(r){var l;const{motionValue:t,name:e,repeatDelay:n,repeatType:a,damping:i,type:s}=r;if(!ao((l=t==null?void 0:t.owner)==null?void 0:l.current))return!1;const{onUpdate:o,transformTemplate:c}=t.owner.getProps();return oo()&&e&&so.has(e)&&(e!=="transform"||!c)&&!o&&!n&&a!=="mirror"&&i!==0&&s!=="inertia"}const lo=40;class uo extends an{constructor(h){var p=h,{autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",keyframes:o,name:c,motionValue:l,element:d}=p,u=Ae(p,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var b,w;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=ye.now();const f=U({autoplay:t,delay:e,type:n,repeat:a,repeatDelay:i,repeatType:s,name:c,motionValue:l,element:d},u),m=(d==null?void 0:d.KeyframeResolver)||fn;this.keyframeResolver=new m(o,(b,w,x)=>this.onKeyframesResolved(b,w,f,!x),c,l,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,e,n,a){this.keyframeResolver=void 0;const{name:i,type:s,velocity:o,delay:c,isHandoff:l,onUpdate:d}=n;this.resolvedAt=ye.now(),io(t,i,s,o)||((Ne.instantAnimations||!c)&&(d==null||d(rn(t,n,e))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u=a?this.resolvedAt?this.resolvedAt-this.createdAt>lo?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=J(U({startTime:u,finalKeyframe:e},n),{keyframes:t}),p=!l&&co(h)?new no(J(U({},h),{element:h.motionValue.owner.current})):new sn(h);p.finished.then(()=>this.notifyFinished()).catch(je),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ys()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const zr=(r,t,e,n={},a,i)=>s=>{const o=Jn(n,r)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Ce(c);const d=J(U({keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity()},o),{delay:-l,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:r,motionValue:t,element:i?void 0:a});Ka(o)||Object.assign(d,Ha(r,d)),d.duration&&(d.duration=Ce(d.duration)),d.repeatDelay&&(d.repeatDelay=Ce(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),(Ne.instantAnimations||Ne.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!i&&t.get()!==void 0){const h=Fa(d.keyframes,o);if(h!==void 0){Pe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new sn(d):new uo(d)},jr=new Set(["width","height","top","left","right","bottom",...He]);function po({protectedKeys:r,needsAnimating:t},e){const n=r.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,n}function ho(r,t,{delay:e=0,transitionOverride:n,type:a}={}){var u;let d=t,{transition:i=r.getDefaultTransition(),transitionEnd:s}=d,o=Ae(d,["transition","transitionEnd"]);n&&(i=n);const c=[],l=a&&r.animationState&&r.animationState.getState()[a];for(const h in o){const p=r.getValue(h,(u=r.latestValues[h])!=null?u:null),f=o[h];if(f===void 0||l&&po(l,h))continue;const m=U({delay:e},Jn(i||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(f)&&f===v&&!m.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const x=Da(r);if(x){const O=window.MotionHandoffAnimation(x,h,Pe);O!==null&&(m.startTime=O,b=!0)}}Sa(r,h),p.start(zr(h,p,f,r.shouldReduceMotion&&jr.has(h)?{type:!1}:m,r,b));const w=p.animation;w&&c.push(w)}return s&&Promise.all(c).then(()=>{Pe.update(()=>{s&&Ra(r,s)})}),c}function fo({top:r,left:t,right:e,bottom:n}){return{x:{min:t,max:e},y:{min:r,max:n}}}function mo(r,t){if(!t)return r;const e=t({x:r.left,y:r.top}),n=t({x:r.right,y:r.bottom});return{top:e.y,left:e.x,bottom:n.y,right:n.x}}function vo(r,t){return fo(mo(r.getBoundingClientRect(),t))}const Hr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},vn={};for(const r in Hr)vn[r]={isEnabled:t=>Hr[r].some(e=>!!t[e])};const Kr=()=>({min:0,max:0}),gn=()=>({x:Kr(),y:Kr()}),go=typeof window!="undefined",bn={current:null},Yr={current:!1};function bo(){if(Yr.current=!0,!!go)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),t=()=>bn.current=r.matches;r.addListener(t),t()}else bn.current=!1}function yo(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function _o(r){return typeof r=="string"||Array.isArray(r)}const Eo=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Wr(r){return yo(r.animate)||Eo.some(t=>_o(r[t]))}function Co(r){return!!(Wr(r)||r.variants)}function wo(r,t,e){for(const n in t){const a=t[n],i=e[n];if(ge(a))r.addValue(n,a);else if(ge(i))r.addValue(n,rt(a,{owner:r}));else if(i!==a)if(r.hasValue(n)){const s=r.getValue(n);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=r.getStaticValue(n);r.addValue(n,rt(s!==void 0?s:a,{owner:r}))}}for(const n in e)t[n]===void 0&&r.removeValue(n);return t}const Gr=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),$r=r=>/^0[^.\s]+$/u.test(r),Ao={test:r=>r==="auto",parse:r=>r},qr=r=>t=>t.test(r),Qr=[Ye,X,We,Le,Za,Xa,Ao],Xr=r=>Qr.find(qr(r)),To=[...Qr,fe,$e],Io=r=>To.find(qr(r)),xo=new Set(["brightness","contrast","saturate","opacity"]);function Oo(r){const[t,e]=r.slice(0,-1).split("(");if(t==="drop-shadow")return r;const[n]=e.match(Ht)||[];if(!n)return r;const a=e.replace(n,"");let i=xo.has(t)?1:0;return n!==e&&(i*=100),t+"("+i+a+")"}const No=/\b([a-z-]*)\(.*?\)/gu,yn=J(U({},$e),{getAnimatableNone:r=>{const t=r.match(No);return t?t.map(Oo).join(" "):r}}),Zr=J(U({},Ye),{transform:Math.round}),_n=J(U({borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,radius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,backgroundPositionX:X,backgroundPositionY:X},{rotate:Le,rotateX:Le,rotateY:Le,rotateZ:Le,scale:Tt,scaleX:Tt,scaleY:Tt,scaleZ:Tt,skew:Le,skewX:Le,skewY:Le,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:it,originX:rr,originY:rr,originZ:X}),{zIndex:Zr,fillOpacity:it,strokeOpacity:it,numOctaves:Zr}),Po=J(U({},_n),{color:fe,backgroundColor:fe,outlineColor:fe,fill:fe,stroke:fe,borderColor:fe,borderTopColor:fe,borderRightColor:fe,borderBottomColor:fe,borderLeftColor:fe,filter:yn,WebkitFilter:yn}),Jr=r=>Po[r];function ei(r,t){let e=Jr(r);return e!==yn&&(e=$e),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const ti=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ni{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ye.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Pe.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=s;this.latestValues=c,this.baseTarget=U({},c),this.initialValues=e.initial?U({},c):{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Wr(e),this.isVariantNode=Co(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const h=this.scrapeMotionValuesFromProps(e,{},this),{willChange:d}=h,u=Ae(h,["willChange"]);for(const p in u){const f=u[p];c[p]!==void 0&&ge(f)&&f.set(c[p],!1)}}mount(t){this.current=t,nt.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,n)=>this.bindToMotionValue(n,e)),Yr.current||bo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:bn.current,process.env.NODE_ENV!=="production"&&qn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Bt(this.notifyUpdate),Bt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ke.has(t);n&&this.onBindTransform&&this.onBindTransform();const a=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Pe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in vn){const e=vn[t];if(!e)continue;const{isEnabled:n,Feature:a}=e;if(!this.features[t]&&a&&n(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<ti.length;n++){const a=ti[n];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,s=t[i];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=wo(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&e!==void 0&&(n=rt(e===null?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var a;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(a=this.getBaseTargetFromProps(this.props,t))!=null?a:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Gr(n)||$r(n))?n=parseFloat(n):!Io(n)&&$e.test(e)&&(n=ei(t,e)),this.setBaseTarget(t,ge(n)?n.get():n)),ge(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var i;const{initial:e}=this.props;let n;if(typeof e=="string"||typeof e=="object"){const s=Gn(this.props,e,(i=this.presenceContext)==null?void 0:i.custom);s&&(n=s[t])}if(e&&n!==void 0)return n;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ge(a)?a:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new Qn),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const Lo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ro(r){const t=Lo.exec(r);if(!t)return[,];const[,e,n,a]=t;return[`--${e!=null?e:n}`,a]}const ko=4;function ri(r,t,e=1){Oe(e<=ko,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,a]=Ro(r);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const s=i.trim();return Gr(s)?parseFloat(s):s}return jt(a)?ri(a,t,e+1):a}function So(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||$r(r):!0}const Mo=new Set(["auto","none","0"]);function Do(r,t,e){let n=0,a;for(;n<r.length&&!a;){const i=r[n];typeof i=="string"&&!Mo.has(i)&&ot(i).values.length&&(a=r[n]),n++}if(a&&e)for(const i of t)r[i]=ei(e,a)}class Vo extends fn{constructor(t,e,n,a,i){super(t,e,n,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),jt(l))){const d=ri(l,e.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!jr.has(n)||t.length!==2)return;const[a,i]=t,s=Xr(a),o=Xr(i);if(s!==o)if(Lr(s)&&Lr(o))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else Ve[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let a=0;a<t.length;a++)(t[a]===null||So(t[a]))&&n.push(a);n.length&&Do(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ve[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const a=e[e.length-1];a!==void 0&&t.getValue(n,a).jump(a,!1)}measureEndState(){var o;const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const a=t.getValue(e);a&&a.jump(this.measuredOrigin,!1);const i=n.length-1,s=n[i];n[i]=Ve[e](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([c,l])=>{t.getValue(c).set(l)}),this.resolveNoneKeyframes()}}class ii extends ni{constructor(){super(...arguments),this.KeyframeResolver=Vo}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const ai=(r,t)=>t&&typeof r=="number"?t.transform(r):r,Fo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Uo=He.length;function Bo(r,t,e){let n="",a=!0;for(let i=0;i<Uo;i++){const s=He[i],o=r[s];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(s.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||e){const l=ai(o,_n[s]);if(!c){a=!1;const d=Fo[s]||s;n+=`${d}(${l}) `}e&&(t[s]=l)}}return n=n.trim(),e?n=e(t,a?"":n):a&&(n="none"),n}function si(r,t,e){const{style:n,vars:a,transformOrigin:i}=r;let s=!1,o=!1;for(const c in t){const l=t[c];if(Ke.has(c)){s=!0;continue}else if(tr(c)){a[c]=l;continue}else{const d=ai(l,_n[c]);c.startsWith("origin")?(o=!0,i[c]=d):n[c]=d}}if(t.transform||(s||e?n.transform=Bo(t,r.transform,e):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:d=0}=i;n.transformOrigin=`${c} ${l} ${d}`}}function oi(r,{style:t,vars:e},n,a){Object.assign(r.style,t,a&&a.getProjectionStyles(n));for(const i in e)r.style.setProperty(i,e[i])}const zo={};function jo(r,{layout:t,layoutId:e}){return Ke.has(r)||r.startsWith("origin")||(t||e!==void 0)&&(!!zo[r]||r==="opacity")}function ci(r,t,e){var i;const{style:n}=r,a={};for(const s in n)(ge(n[s])||t.style&&ge(t.style[s])||jo(s,r)||((i=e==null?void 0:e.getValue(s))==null?void 0:i.liveStyle)!==void 0)&&(a[s]=n[s]);return a}function Ho(r){return window.getComputedStyle(r)}class Ko extends ii{constructor(){super(...arguments),this.type="html",this.renderInstance=oi}readValueFromInstance(t,e){var n;if(Ke.has(e))return(n=this.projection)!=null&&n.isProjecting?ln(e):Bs(t,e);{const a=Ho(t),i=(tr(e)?a.getPropertyValue(e):a[e])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return vo(t,e)}build(t,e,n){si(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ci(t,e,n)}}function Yo(r,t){return r in t}class Wo extends ni{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(Yo(e,t)){const n=t[e];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return gn()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Go={offset:"stroke-dashoffset",array:"stroke-dasharray"},$o={offset:"strokeDashoffset",array:"strokeDasharray"};function qo(r,t,e=1,n=0,a=!0){r.pathLength=1;const i=a?Go:$o;r[i.offset]=X.transform(-n);const s=X.transform(t),o=X.transform(e);r[i.array]=`${s} ${o}`}function Qo(r,u,c,l,d){var h=u,{attrX:t,attrY:e,attrScale:n,pathLength:a,pathSpacing:i=1,pathOffset:s=0}=h,o=Ae(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var m,v;if(si(r,o,l),c){r.style.viewBox&&(r.attrs.viewBox=r.style.viewBox);return}r.attrs=r.style,r.style={};const{attrs:p,style:f}=r;p.transform&&(f.transform=p.transform,delete p.transform),(f.transform||p.transformOrigin)&&(f.transformOrigin=(m=p.transformOrigin)!=null?m:"50% 50%",delete p.transformOrigin),f.transform&&(f.transformBox=(v=d==null?void 0:d.transformBox)!=null?v:"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),e!==void 0&&(p.y=e),n!==void 0&&(p.scale=n),a!==void 0&&qo(p,a,i,s,!1)}const li=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Xo=r=>typeof r=="string"&&r.toLowerCase()==="svg";function Zo(r,t,e,n){oi(r,t,void 0,n);for(const a in t.attrs)r.setAttribute(li.has(a)?a:zt(a),t.attrs[a])}function Jo(r,t,e){const n=ci(r,t,e);for(const a in r)if(ge(r[a])||ge(t[a])){const i=He.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;n[i]=r[a]}return n}class ec extends ii{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ke.has(e)){const n=Jr(e);return n&&n.default||0}return e=li.has(e)?e:zt(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Jo(t,e,n)}build(t,e,n){Qo(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,a){Zo(t,e,n,a)}mount(t){this.isSVGTag=Xo(t.tagName),super.mount(t)}}function di(r){return Br(r)&&"ownerSVGElement"in r}function tc(r){return di(r)&&r.tagName==="svg"}function nc(r){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=di(r)&&!tc(r)?new ec(t):new Ko(t);e.mount(r),nt.set(r,e)}function rc(r){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new Wo(t);e.mount(r),nt.set(r,e)}function ic(r,t,e){const n=ge(r)?r:rt(r);return n.start(zr("",n,t,e)),n.animation}function ac(r,t){return ge(r)||typeof r=="number"||typeof r=="string"&&!Dt(t)}function ui(r,t,e,n){const a=[];if(ac(r,t))a.push(ic(r,Dt(t)&&t.default||t,e&&(e.default||e)));else{const i=Dn(r,t,n),s=i.length;Oe(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const c=i[o],l=c instanceof Element?nc:rc;nt.has(c)||l(c);const d=nt.get(c),u=U({},e);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),a.push(...ho(d,J(U({},t),{transition:u}),{}))}}return a}function sc(r,t,e){const n=[];return ga(r,t,e,{spring:ct}).forEach(({keyframes:i,transition:s},o)=>{n.push(...ui(o,i,s))}),n}class oc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(n=>n.attachTimeline(t));return()=>{e.forEach((n,a)=>{n&&n(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class cc extends oc{then(t,e){return this.finished.finally(t).then(()=>{})}}function lc(r){return Array.isArray(r)&&r.some(Array.isArray)}function dc(r){function t(e,n,a){let i=[];return lc(e)?i=sc(e,n,r):i=ui(e,n,a,r),new cc(i)}return t}const pe=dc(),ie={spinner:"_spinner_1lif3_1",spinnerContainer:"_spinnerContainer_1lif3_5",success:"_success_1lif3_9",successContainer:"_successContainer_1lif3_14",container:"_container_1lif3_57",card:"_card_1lif3_66",warning:"_warning_1lif3_75",svg:"_svg_1lif3_83",srOnly:"_srOnly_1lif3_88",backButton:"_backButton_1lif3_92"};function ae(r,t){if(!t)return;const e=t.trim().split(/\s+/).filter(n=>n.length>0);r.classList.add(...e)}class pi{constructor(){A(this,"template",`
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(se);function ve(r,t){for(var e=0;e<t.length;e++){const n=t[e];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in r)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(r,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}class _t{constructor(t){A(this,"parent");A(this,"core");typeof window!="undefined"&&(this.parent=t)}mount(t){return K(this,null,function*(){if(!this.parent)return;if(!this.core){const a=(yield Promise.resolve().then(()=>_l)).Core;this.core=new a}t.styles&&this.core.state.styles.setState(t.styles),this.core.state.checkout.setState({clientToken:t.clientToken,environment:t.environment,apiVersion:t.apiVersion,errorMessageText:t.errorMessageText});const e=yield this.core.checkout.mount();this.parent.innerHTML="",this.parent.appendChild(e),this.core.state.checkout.setState(t)})}unmount(){return K(this,null,function*(){!this.parent||!this.core||(this.parent.innerHTML="",this.core.clearState())})}}var W=(r=>(r.PAYPAL="PAYPAL",r.APPLE_PAY="APPLEPAY",r.GOOGLE_PAY="GPAY",r.CARD="CARD",r.VENMO="VENMO",r))(W||{}),Je=(r=>(r.PENDING="PENDING",r.FAILED="FAILED",r.AUTHORIZED="AUTHORIZED",r.SETTLING="SETTLING",r.SETTLED="SETTLED",r.DECLINED="DECLINED",r.CANCELLED="CANCELLED",r))(Je||{}),Re=(r=>(r.INSUFFICIENT_FUNDS="insufficient_funds",r.AUTHENTICATION_REQUIRED="authentication_required",r.CARD_ISSUER_DECLINE="card_issuer_decline",r.GENERIC_DECLINE="generic_decline",r.WITHDRAWAL_LIMIT_EXCEEDED="withdrawal_limit_exceeded",r.DO_NOT_HONOR="do_not_honor",r.EXPIRED_CARD="expired_card",r.SUSPECTED_FRAUD="suspected_fraud",r.INCORRECT_CVC="incorrect_cvc",r.INVALID_CARD_NUMBER="invalid_card_number",r.ISSUER_UNAVAILABLE="issuer_unavailable",r.CARD_LOST_OR_STOLEN="card_lost_or_stolen",r.CARD_DECLINED="card_declined",r))(Re||{});const Te={appIds:{develop:"app_00b96c0c3011",staging:"app_00396c84ac2b",sandbox:"app_03b1ea2b6dfa",production:"app_409cf462b6cc"},teamId:"team_f20c9e679d47"},ke=(r="sandbox")=>({develop:"https://dev-api.paynext.com",staging:"https://staging-api.paynext.com",sandbox:"https://sandbox-api.paynext.com",production:"https://api.paynext.com"})[r],Wi=[{type:W.PAYPAL,order:1,is_active:!0},{type:W.APPLE_PAY,order:2,is_active:!0},{type:W.GOOGLE_PAY,order:3,is_active:!0},{type:W.CARD,order:4,is_active:!0}],Gi=r=>r.googlePay?W.GOOGLE_PAY:r.applePay?W.APPLE_PAY:r.paypal?W.PAYPAL:r.braintree?W.VENMO:W.CARD,$i=r=>{const t=r.card;if(t)return{bin:t.firstSixDigits,bin_data:{brand:t.cardBrand,country:t.country,currency_code:t.currency,funding:t.funding,issuer:t.issuer,type:t.type},cvc:t.cvc,exp_month:Number(t.expMonth),exp_year:Number(t.expYear),last4:t.lastFourDigits,number:t.number}},qi=r=>{var e;const t=r.paypal;if((e=t==null?void 0:t.billing_agreement_token)!=null&&e.paypalId)return{billing_agreement_token:t.billing_agreement_token.paypalId}},Qi=r=>{var e,n;const t=r.googlePay;if(t!=null&&t.token)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(e=t.card)!=null&&e.expiry.month||t.token.expiry.month?Number(t.card.expiry.month||t.token.expiry.month):void 0,exp_year:(n=t.card)!=null&&n.expiry.year||t.token.expiry.year?Number(t.card.expiry.year||t.token.expiry.year):void 0,token:t.token.number,token_service_provider:t.token.tokenServiceProvider}},Xi=r=>{var e,n,a,i,s,o;const t=r.applePay;if(t)return{cryptogram:t.cryptogram,eci:t.eci,exp_month:(n=(e=t.networkToken)==null?void 0:e.expiry)!=null&&n.month?Number(t.networkToken.expiry.month):void 0,exp_year:(i=(a=t.networkToken)==null?void 0:a.expiry)!=null&&i.year?Number(t.networkToken.expiry.year):void 0,token:(s=t.networkToken)==null?void 0:s.number,token_service_provider:(o=t.networkToken)==null?void 0:o.tokenServiceProvider}},Zi=r=>{const t=r.braintree;if(t)return{payment_method_nonce:t.nonce}},kn=r=>{var n,a,i,s,o,c,l,d,u,h,p,f,m,v;const{applePay:t,googlePay:e}=r;if(!(!t&&!e))return{city:((n=t==null?void 0:t.billingContact)==null?void 0:n.locality)||((a=e==null?void 0:e.billingAddress)==null?void 0:a.locality)||void 0,country:((i=t==null?void 0:t.billingContact)==null?void 0:i.countryCode)||((s=e==null?void 0:e.billingAddress)==null?void 0:s.countryCode)||void 0,line1:((c=(o=t==null?void 0:t.billingContact)==null?void 0:o.addressLines)==null?void 0:c.at(0))||((l=e==null?void 0:e.billingAddress)==null?void 0:l.address1)||void 0,line2:((u=(d=t==null?void 0:t.billingContact)==null?void 0:d.addressLines)==null?void 0:u.at(1))||((h=e==null?void 0:e.billingAddress)==null?void 0:h.address2)||void 0,postal_code:((p=t==null?void 0:t.billingContact)==null?void 0:p.postalCode)||((f=e==null?void 0:e.billingAddress)==null?void 0:f.postalCode)||void 0,state:((m=t==null?void 0:t.billingContact)==null?void 0:m.administrativeArea)||((v=e==null?void 0:e.billingAddress)==null?void 0:v.administrativeArea)||void 0}},Sn=r=>{var a,i,s,o,c,l,d,u,h,p,f,m,v,b,w,x,O,I,L;const{card:t,googlePay:e,applePay:n}=r;if(!(!t&&!(e!=null&&e.card)&&!(n!=null&&n.card)))return{bin:t==null?void 0:t.firstSixDigits,bin_data:{brand:(t==null?void 0:t.cardBrand)||((a=e==null?void 0:e.card)==null?void 0:a.brand)||((i=n==null?void 0:n.card)==null?void 0:i.brand),country:(t==null?void 0:t.country)||((s=e==null?void 0:e.card)==null?void 0:s.country)||((o=n==null?void 0:n.card)==null?void 0:o.country),currency_code:(t==null?void 0:t.currency)||((c=e==null?void 0:e.card)==null?void 0:c.currency)||((l=n==null?void 0:n.card)==null?void 0:l.currency),funding:(t==null?void 0:t.funding)||((d=e==null?void 0:e.card)==null?void 0:d.funding)||((u=n==null?void 0:n.card)==null?void 0:u.funding),issuer:(t==null?void 0:t.issuer)||((h=e==null?void 0:e.card)==null?void 0:h.issuer)||((p=n==null?void 0:n.card)==null?void 0:p.issuer),type:(t==null?void 0:t.type)||((f=e==null?void 0:e.card)==null?void 0:f.segment)||((m=n==null?void 0:n.card)==null?void 0:m.segment)},cvc:t==null?void 0:t.cvc,exp_month:t!=null&&t.expMonth||(v=e==null?void 0:e.card)!=null&&v.expiry.month?Number((t==null?void 0:t.expMonth)||((b=e==null?void 0:e.card)==null?void 0:b.expiry.month)):void 0,exp_year:t!=null&&t.expYear||(w=e==null?void 0:e.card)!=null&&w.expiry.year?Number((t==null?void 0:t.expYear)||((x=e==null?void 0:e.card)==null?void 0:x.expiry.year)):void 0,last4:(t==null?void 0:t.lastFourDigits)||((O=e==null?void 0:e.card)==null?void 0:O.lastFour)||((I=n==null?void 0:n.card)==null?void 0:I.lastFour),number:(t==null?void 0:t.number)||((L=e==null?void 0:e.card)==null?void 0:L.number)}},Mn=r=>{var n,a;const{applePay:t,card:e}=r;return(n=t==null?void 0:t.billingContact)!=null&&n.givenName?`${t.billingContact.givenName} ${t.billingContact.familyName||""}`.trim():(a=e==null?void 0:e.metadata)==null?void 0:a.name},Ji=r=>{var n,a,i,s,o,c,l,d;const t=Gi(r),e={client_session:r.clientSession,three_ds_session_id:r.threeDsSessionId,type:t};switch(t){case W.CARD:return J(U({},e),{name:Mn(r),card:$i(r)});case W.PAYPAL:return J(U({},e),{paypal:qi(r)});case W.GOOGLE_PAY:return J(U({},e),{name:(a=(n=r.googlePay)==null?void 0:n.billingAddress)==null?void 0:a.name,phone:(c=(o=(s=(i=r.googlePay)==null?void 0:i.billingAddress)==null?void 0:s.phoneNumber)==null?void 0:o.replace(/ /g,""))==null?void 0:c.replace(/-/g,""),card:Sn(r),google_pay:Qi(r),billing_address:kn(r)});case W.APPLE_PAY:return J(U({},e),{name:Mn(r),card:Sn(r),apple_pay:Xi(r),phone:(d=(l=r.applePay)==null?void 0:l.shippingContact)==null?void 0:d.phoneNumber,billing_address:kn(r)});case W.VENMO:return J(U({},e),{venmo:Zi(r)});default:throw new Error(`Unsupported payment method: ${t}`)}},ea=(r,t,e)=>K(this,null,function*(){const n=`${ke(t)}/payments/create`,a=new Headers;a.append("Content-Type","application/json"),a.append("X-API-Version",e);const i=Ji(r);return yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify(i)})).json()}),ta=(r,t,e)=>K(this,null,function*(){const n=`${ke(t)}/payments/create/billing/agreement`,a=new Headers;return a.append("Content-Type","application/json"),a.append("X-API-Version",e),(yield(yield fetch(n,{method:"POST",headers:a,body:JSON.stringify({client_session:r})})).json()).paypal_agreement_token_response.token_id||""}),na=(r,t,e)=>K(this,null,function*(){const n=new Headers;n.append("X-API-Version",e);const a=`${ke(t)}/payments/config?client_session_id=${r}`,s=yield(yield fetch(a,{headers:n})).json();return s.checkout_config||(s.checkout_config=Wi),s});let ra=class{constructor(t){A(this,"apple",null);A(this,"isAvailable",!1);A(this,"onReady");this.ev=t}init(l,d){return K(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:s,onPaymentAttempt:o},c){const u=this.ev.transactions.create(t);this.apple=this.ev.ui.applePay(u,J(U({locale:e,borderRadius:12,size:{width:"100%",height:"40px"}},c==null?void 0:c.styles),{allowedCardNetworks:["visa","masterCard"],requestBillingAddress:!0,requestPayerDetails:["name","email","phone"],process:(m,v)=>K(this,[m,v],function*(p,{fail:f}){o==null||o({paymentMethod:W.GOOGLE_PAY});try{i==null||i(p)}catch(b){console.error(b),f({message:"Cannot pay with payment credentials"})}})}));const h="available";this.isAvailable=h==="available",this.isAvailable||a==null||a("Apple Pay is not supported on this device"),a&&this.apple.on("error",a),s&&this.apple.on("cancel",s),this.onReady=n})}render(t){return K(this,null,function*(){var e;if(!(!this.apple||!this.isAvailable)){t.innerHTML="";try{yield this.apple.mount(t),(e=this.onReady)==null||e.call(this)}catch(n){throw console.error(n),new Error(n instanceof Error?n.message:"Failed to render Apple Pay button")}}})}},ia=class{constructor(t){A(this,"google",null);this.ev=t}init(l,d){return K(this,arguments,function*({transaction:t,locale:e,onReady:n,onError:a,onSuccess:i,onCancel:s,onPaymentAttempt:o},c){const u=this.ev.transactions.create(t);this.google=this.ev.ui.googlePay(u,J(U({locale:e,size:{width:"100%",height:40},borderRadius:12,billingAddress:{phoneNumber:!0}},c==null?void 0:c.styles),{allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["VISA","MASTERCARD"],process:(f,m)=>K(this,[f,m],function*(h,{fail:p}){o==null||o({paymentMethod:W.GOOGLE_PAY});try{i==null||i(h)}catch(v){console.error(v),p({message:"Cannot pay with payment credentials"})}})})),s&&this.google.on("cancel",s),n&&this.google.on("ready",n),a&&this.google.on("error",a)})}render(t){return K(this,null,function*(){this.google&&(t.innerHTML="",this.google.mount(t))})}};class de{constructor(){A(this,"listeners",[])}removeListener(t){this.listeners=this.listeners.filter(e=>e!==t)}addListener(t){return this.listeners.push(t),()=>this.removeListener(t)}emit(t){for(const e of this.listeners)e(t)}clear(){this.listeners=[]}}class aa{constructor(t){A(this,"threeDs",null);this.ev=t}init(i){return K(this,arguments,function*({threeDsId:t,onReady:e,onSuccess:n,onError:a}){this.threeDs=this.ev.ui.threeDSecure(t),this.threeDs.on("ready",()=>e==null?void 0:e()),this.threeDs.on("success",()=>n==null?void 0:n()),this.threeDs.on("failure",()=>a==null?void 0:a()),this.threeDs.on("error",()=>a==null?void 0:a())})}render(t){return K(this,null,function*(){this.threeDs&&this.threeDs.mount(t)})}}class sa{constructor(){A(this,"isReady",!1);A(this,"ev",null);A(this,"apple",null);A(this,"google",null);A(this,"threeDs",null);A(this,"events",{ready:new de})}isShouldLoad({teamId:t,appId:e}){var n,a;return((n=this.ev)==null?void 0:n.config.appId)!==e||((a=this.ev)==null?void 0:a.config.teamId)!==t}preloadEvervault(t){return K(this,null,function*(){if(!this.isShouldLoad(t))return;if(typeof window=="undefined")throw new Error("Evervault can only be initialized in browser environment");this.isReady=!1;const{loadEvervault:e}=yield Promise.resolve().then(()=>wl);this.ev=yield e(t.teamId,t.appId)})}initEv(t){return K(this,null,function*(){this.ev||(yield this.preloadEvervault(t)),this.apple=new ra(this.ev),this.google=new ia(this.ev),this.events.ready.emit(),this.isReady=!0})}initThreeDs(t){return K(this,null,function*(){if(!this.ev)throw new Error("Evervault should be init before using Three DS Secure");this.threeDs=new aa(this.ev),yield this.threeDs.init(t),yield this.threeDs.render()})}initApple(t,e){return K(this,null,function*(){if(!this.apple)throw new Error("Evervault should be init before using Apple Pay");yield this.apple.init(t,e)})}initGoogle(t,e){return K(this,null,function*(){if(!this.google)throw new Error("Evervault should be init before using Google Pay");yield this.google.init(t,e)})}isAppleAvailable(){var t;return!!((t=this.apple)!=null&&t.isAvailable)}addEventListener(t,e){return this.events[t].addListener(e)}renderApple(t){return K(this,null,function*(){var e;return(e=this.apple)==null?void 0:e.render(t)})}renderGoogle(t){return K(this,null,function*(){var e;return(e=this.google)==null?void 0:e.render(t)})}getEv(){if(!this.ev)throw new Error("Evervault should be init before getting instance");return this.ev}}function Dt(r){return typeof r=="object"&&!Array.isArray(r)}function oa(r,t,e){var n;if(r instanceof EventTarget)return[r];if(typeof r=="string"){let a=document;const i=(n=e==null?void 0:e[r])!=null?n:a.querySelectorAll(r);return i?Array.from(i):[]}return Array.from(r)}function Dn(r,t,e,n){return typeof r=="string"&&Dt(t)?oa(r,e,n):r instanceof NodeList?Array.from(r):Array.isArray(r)?r:[r]}function ca(r,t,e){return r*(t+1)}function Vn(r,t,e,n){var a;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,r+parseFloat(t)):t==="<"?e:(a=n.get(t))!=null?a:r}const et=(r,t,e)=>r+(t-r)*e,la=(r,t,e)=>{const n=t-r;return((e-r)%n+n)%n+r},Fn=r=>Array.isArray(r)&&typeof r[0]!="number";function Un(r,t){return Fn(r)?r[la(0,r.length,t)]:r}function da(r,t){r.indexOf(t)===-1&&r.push(t)}function Bn(r,t){const e=r.indexOf(t);e>-1&&r.splice(e,1)}function ua(r,t,e){for(let n=0;n<r.length;n++){const a=r[n];a.at>t&&a.at<e&&(Bn(r,a),n--)}}function pa(r,t,e,n,a,i){ua(r,a,i);for(let s=0;s<t.length;s++)r.push({value:t[s],at:et(a,i,n[s]),easing:Un(e,s)})}function ha(r,t){for(let e=0;e<r.length;e++)r[e]=r[e]/(t+1)}function fa(r,t){return r.at===t.at?r.value===null?1:t.value===null?-1:0:r.at-t.at}const ge=r=>!!(r&&r.getVelocity),Vt=(r,t,e)=>{const n=t-r;return n===0?1:(e-r)/n};function zn(r,t){const e=r[r.length-1];for(let n=1;n<=t;n++){const a=Vt(0,t,n);r.push(et(e,1,a))}}function jn(r){const t=[0];return zn(t,r.length-1),t}function Ft(r){return typeof r=="function"&&"applyToOptions"in r}const Et=2e4;function Ut(r){let t=0;const e=50;let n=r.next(t);for(;!n.done&&t<Et;)t+=e,n=r.next(t);return t>=Et?1/0:t}const Ce=r=>r*1e3,xe=r=>r/1e3;function Hn(r,t=100,e){const n=e(J(U({},r),{keyframes:[0,t]})),a=Math.min(Ut(n),Et);return{type:"keyframes",ease:i=>n.next(a*i).value/t,duration:xe(a)}}let tt=()=>{},Oe=()=>{};process.env.NODE_ENV!=="production"&&(tt=(r,t)=>{!r&&typeof console!="undefined"&&console.warn(t)},Oe=(r,t)=>{if(!r)throw new Error(t)});const ma="easeInOut",va=20;function ga(r,i={},n,a){var s=i,{defaultTransition:t={}}=s,e=Ae(s,["defaultTransition"]);const o=t.duration||.3,c=new Map,l=new Map,d={},u=new Map;let h=0,p=0,f=0;for(let m=0;m<r.length;m++){const v=r[m];if(typeof v=="string"){u.set(v,p);continue}else if(!Array.isArray(v)){u.set(v.name,Vn(p,v.at,h,u));continue}let[b,w,x={}]=v;x.at!==void 0&&(p=Vn(p,x.at,h,u));let O=0;const I=(L,N,S,B=0,G=0)=>{const $=ba(L),D=N,{delay:F=0,times:j=jn($),type:H="keyframes",repeat:ee,repeatType:M,repeatDelay:q=0}=D,Y=Ae(D,["delay","times","type","repeat","repeatType","repeatDelay"]);let{ease:E=t.ease||"easeOut",duration:g}=N;const R=typeof F=="function"?F(B,G):F,V=$.length,y=Ft(H)?H:a==null?void 0:a[H];if(V<=2&&y){let C=100;if(V===2&&Ea($)){const le=$[1]-$[0];C=Math.abs(le)}const z=U({},Y);g!==void 0&&(z.duration=Ce(g));const Z=Hn(z,C,y);E=Z.ease,g=Z.duration}g!=null||(g=o);const T=p+R;j.length===1&&j[0]===0&&(j[1]=1);const _=j.length-$.length;if(_>0&&zn(j,_),$.length===1&&$.unshift(null),ee){Oe(ee<va,"Repeat count too high, must be less than 20"),g=ca(g,ee);const C=[...$],z=[...j];E=Array.isArray(E)?[...E]:[E];const Z=[...E];for(let le=0;le<ee;le++){$.push(...C);for(let k=0;k<C.length;k++)j.push(z[k]+(le+1)),E.push(k===0?"linear":Un(Z,k-1))}ha(j,ee)}const P=T+g;pa(S,$,E,j,T,P),O=Math.max(R+g,O),f=Math.max(P,f)};if(ge(b)){const L=Kn(b,l);I(w,x,Yn("default",L))}else{const L=Dn(b,w,n,d),N=L.length;for(let S=0;S<N;S++){w=w,x=x;const B=L[S],G=Kn(B,l);for(const $ in w)I(w[$],ya(x,$),Yn($,G),S,N)}}h=p,p+=O}return l.forEach((m,v)=>{for(const b in m){const w=m[b];w.sort(fa);const x=[],O=[],I=[];for(let N=0;N<w.length;N++){const{at:S,value:B,easing:G}=w[N];x.push(B),O.push(Vt(0,f,S)),I.push(G||"easeOut")}O[0]!==0&&(O.unshift(0),x.unshift(x[0]),I.unshift(ma)),O[O.length-1]!==1&&(O.push(1),x.push(null)),c.has(v)||c.set(v,{keyframes:{},transition:{}});const L=c.get(v);L.keyframes[b]=x,L.transition[b]=U(J(U({},t),{duration:f,ease:I,times:O}),e)}}),c}function Kn(r,t){return!t.has(r)&&t.set(r,{}),t.get(r)}function Yn(r,t){return t[r]||(t[r]=[]),t[r]}function ba(r){return Array.isArray(r)?r:[r]}function ya(r,t){return r&&r[t]?U(U({},r),r[t]):U({},r)}const _a=r=>typeof r=="number",Ea=r=>r.every(_a),nt=new WeakMap,Ca=r=>Array.isArray(r);function Wn(r){const t=[{},{}];return r==null||r.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Gn(r,t,e,n){if(typeof t=="function"){const[a,i]=Wn(n);t=t(e!==void 0?e:r.custom,a,i)}if(typeof t=="string"&&(t=r.variants&&r.variants[t]),typeof t=="function"){const[a,i]=Wn(n);t=t(e!==void 0?e:r.custom,a,i)}return t}function wa(r,t,e){const n=r.getProps();return Gn(n,t,n.custom,r)}const Ct=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Aa(r,t){let e=new Set,n=new Set,a=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function c(d){s.has(d)&&(l.schedule(d),r()),d(o)}const l={schedule:(d,u=!1,h=!1)=>{const f=h&&a?e:n;return u&&s.add(d),f.has(d)||f.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(o=d,a){i=!0;return}a=!0,[e,n]=[n,e],e.forEach(c),e.clear(),a=!1,i&&(i=!1,l.process(d))}};return l}const Ne={},Ta=40;function Ia(r,t){let e=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>e=!0,s=Ct.reduce((x,O)=>(x[O]=Aa(i),x),{}),{setup:o,read:c,resolveKeyframes:l,preUpdate:d,update:u,preRender:h,render:p,postRender:f}=s,m=()=>{const x=Ne.useManualTiming?a.timestamp:performance.now();e=!1,Ne.useManualTiming||(a.delta=n?1e3/60:Math.max(Math.min(x-a.timestamp,Ta),1)),a.timestamp=x,a.isProcessing=!0,o.process(a),c.process(a),l.process(a),d.process(a),u.process(a),h.process(a),p.process(a),f.process(a),a.isProcessing=!1,e&&t&&(n=!1,r(m))},v=()=>{e=!0,n=!0,a.isProcessing||r(m)};return{schedule:Ct.reduce((x,O)=>{const I=s[O];return x[O]=(L,N=!1,S=!1)=>(e||v(),I.schedule(L,N,S)),x},{}),cancel:x=>{for(let O=0;O<Ct.length;O++)s[Ct[O]].cancel(x)},state:a,steps:s}}const je=r=>r,{schedule:Pe,cancel:Bt,state:wt}=Ia(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:je,!0);let At;function xa(){At=void 0}const ye={now:()=>(At===void 0&&ye.set(wt.isProcessing||Ne.useManualTiming?wt.timestamp:performance.now()),At),set:r=>{At=r,queueMicrotask(xa)}},$n=new Set;function qn(r,t,e){r||$n.has(t)||(console.warn(t),$n.add(t))}class Qn{constructor(){this.subscriptions=[]}add(t){return da(this.subscriptions,t),()=>Bn(this.subscriptions,t)}notify(t,e,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,e,n);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Xn(r,t){return t?r*(1e3/t):0}const Zn=30,Oa=r=>!isNaN(parseFloat(r));class Na{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,a=!0)=>{var s,o;const i=ye.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const c of this.dependents)c.dirty();a&&((o=this.events.renderRequest)==null||o.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Oa(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&qn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Qn);const n=this.events[t].add(e);return t==="change"?()=>{n(),Pe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){!e||!this.passiveEffect?this.updateAndNotify(t,e):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Zn)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,Zn);return Xn(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,e;(t=this.dependents)==null||t.clear(),(e=this.events.destroy)==null||e.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rt(r,t){return new Na(r,t)}function Pa(r,t,e){r.hasValue(t)?r.getValue(t).set(e):r.addValue(t,rt(e))}function La(r){return Ca(r)?r[r.length-1]||0:r}function Ra(r,t){let s=wa(r,t)||{},{transitionEnd:n={},transition:a={}}=s,i=Ae(s,["transitionEnd","transition"]);i=U(U({},i),n);for(const o in i){const c=La(i[o]);Pa(r,o,c)}}function ka(r){return!!(ge(r)&&r.add)}function Sa(r,t){const e=r.getValue("willChange");if(ka(e))return e.add(t);if(!e&&Ne.WillChange){const n=new Ne.WillChange("auto");r.addValue("willChange",n),n.add(t)}}const zt=r=>r.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ma="data-"+zt("framerAppearId");function Da(r){return r.props[Ma]}const Va=r=>r!==null;function Fa(r,{repeat:t,repeatType:e="loop"},n){const a=r.filter(Va),i=t&&e!=="loop"&&t%2===1?0:a.length-1;return a[i]}const He=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ke=new Set(He),Ua={type:"spring",stiffness:500,damping:25,restSpeed:10},Ba=r=>({type:"spring",stiffness:550,damping:r===0?2*Math.sqrt(550):30,restSpeed:10}),za={type:"keyframes",duration:.8},ja={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ha=(r,{keyframes:t})=>t.length>2?za:Ke.has(r)?r.startsWith("scale")?Ba(t[1]):Ua:ja;function Ka(u){var h=u,{when:r,delay:t,delayChildren:e,staggerChildren:n,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:c,elapsed:l}=h,d=Ae(h,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(d).length}function Jn(r,t){var e,n;return(n=(e=r==null?void 0:r[t])!=null?e:r==null?void 0:r.default)!=null?n:r}const er=r=>t=>typeof t=="string"&&t.startsWith(r),tr=er("--"),Ya=er("var(--"),jt=r=>Ya(r)?Wa.test(r.split("/*")[0].trim()):!1,Wa=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Se=(r,t,e)=>e>t?t:e<r?r:e,Ye={test:r=>typeof r=="number",parse:parseFloat,transform:r=>r},it=J(U({},Ye),{transform:r=>Se(0,1,r)}),Tt=J(U({},Ye),{default:1}),at=r=>Math.round(r*1e5)/1e5,Ht=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ga(r){return r==null}const $a=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kt=(r,t)=>e=>!!(typeof e=="string"&&$a.test(e)&&e.startsWith(r)||t&&!Ga(e)&&Object.prototype.hasOwnProperty.call(e,t)),nr=(r,t,e)=>n=>{if(typeof n!="string")return n;const[a,i,s,o]=n.match(Ht);return{[r]:parseFloat(a),[t]:parseFloat(i),[e]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},qa=r=>Se(0,255,r),Yt=J(U({},Ye),{transform:r=>Math.round(qa(r))}),Me={test:Kt("rgb","red"),parse:nr("red","green","blue"),transform:({red:r,green:t,blue:e,alpha:n=1})=>"rgba("+Yt.transform(r)+", "+Yt.transform(t)+", "+Yt.transform(e)+", "+at(it.transform(n))+")"};function Qa(r){let t="",e="",n="",a="";return r.length>5?(t=r.substring(1,3),e=r.substring(3,5),n=r.substring(5,7),a=r.substring(7,9)):(t=r.substring(1,2),e=r.substring(2,3),n=r.substring(3,4),a=r.substring(4,5),t+=t,e+=e,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const Wt={test:Kt("#"),parse:Qa,transform:Me.transform},st=r=>({test:t=>typeof t=="string"&&t.endsWith(r)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${r}`}),Le=st("deg"),We=st("%"),X=st("px"),Xa=st("vh"),Za=st("vw"),rr=J(U({},We),{parse:r=>We.parse(r)/100,transform:r=>We.transform(r*100)}),Ge={test:Kt("hsl","hue"),parse:nr("hue","saturation","lightness"),transform:({hue:r,saturation:t,lightness:e,alpha:n=1})=>"hsla("+Math.round(r)+", "+We.transform(at(t))+", "+We.transform(at(e))+", "+at(it.transform(n))+")"},fe={test:r=>Me.test(r)||Wt.test(r)||Ge.test(r),parse:r=>Me.test(r)?Me.parse(r):Ge.test(r)?Ge.parse(r):Wt.parse(r),transform:r=>typeof r=="string"?r:r.hasOwnProperty("red")?Me.transform(r):Ge.transform(r)},Ja=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function es(r){var t,e;return isNaN(r)&&typeof r=="string"&&(((t=r.match(Ht))==null?void 0:t.length)||0)+(((e=r.match(Ja))==null?void 0:e.length)||0)>0}const ir="number",ar="color",ts="var",ns="var(",sr="${}",rs=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ot(r){const t=r.toString(),e=[],n={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(rs,c=>(fe.test(c)?(n.color.push(i),a.push(ar),e.push(fe.parse(c))):c.startsWith(ns)?(n.var.push(i),a.push(ts),e.push(c)):(n.number.push(i),a.push(ir),e.push(parseFloat(c))),++i,sr)).split(sr);return{values:e,split:o,indexes:n,types:a}}function or(r){return ot(r).values}function cr(r){const{split:t,types:e}=ot(r),n=t.length;return a=>{let i="";for(let s=0;s<n;s++)if(i+=t[s],a[s]!==void 0){const o=e[s];o===ir?i+=at(a[s]):o===ar?i+=fe.transform(a[s]):i+=a[s]}return i}}const is=r=>typeof r=="number"?0:r;function as(r){const t=or(r);return cr(r)(t.map(is))}const $e={test:es,parse:or,createTransformer:cr,getAnimatableNone:as};function Gt(r,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?r+(t-r)*6*e:e<1/2?t:e<2/3?r+(t-r)*(2/3-e)*6:r}function ss({hue:r,saturation:t,lightness:e,alpha:n}){r/=360,t/=100,e/=100;let a=0,i=0,s=0;if(!t)a=i=s=e;else{const o=e<.5?e*(1+t):e+t-e*t,c=2*e-o;a=Gt(c,o,r+1/3),i=Gt(c,o,r),s=Gt(c,o,r-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:n}}function It(r,t){return e=>e>0?t:r}const $t=(r,t,e)=>{const n=r*r,a=e*(t*t-n)+n;return a<0?0:Math.sqrt(a)},os=[Wt,Me,Ge],cs=r=>os.find(t=>t.test(r));function lr(r){const t=cs(r);if(tt(!!t,`'${r}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let e=t.parse(r);return t===Ge&&(e=ss(e)),e}const dr=(r,t)=>{const e=lr(r),n=lr(t);if(!e||!n)return It(r,t);const a=U({},e);return i=>(a.red=$t(e.red,n.red,i),a.green=$t(e.green,n.green,i),a.blue=$t(e.blue,n.blue,i),a.alpha=et(e.alpha,n.alpha,i),Me.transform(a))},qt=new Set(["none","hidden"]);function ls(r,t){return qt.has(r)?e=>e<=0?r:t:e=>e>=1?t:r}const ds=(r,t)=>e=>t(r(e)),Qt=(...r)=>r.reduce(ds);function us(r,t){return e=>et(r,t,e)}function Xt(r){return typeof r=="number"?us:typeof r=="string"?jt(r)?It:fe.test(r)?dr:fs:Array.isArray(r)?ur:typeof r=="object"?fe.test(r)?dr:ps:It}function ur(r,t){const e=[...r],n=e.length,a=r.map((i,s)=>Xt(i)(i,t[s]));return i=>{for(let s=0;s<n;s++)e[s]=a[s](i);return e}}function ps(r,t){const e=U(U({},r),t),n={};for(const a in e)r[a]!==void 0&&t[a]!==void 0&&(n[a]=Xt(r[a])(r[a],t[a]));return a=>{for(const i in n)e[i]=n[i](a);return e}}function hs(r,t){var a;const e=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=r.indexes[s][n[s]],c=(a=r.values[o])!=null?a:0;e[i]=c,n[s]++}return e}const fs=(r,t)=>{const e=$e.createTransformer(t),n=ot(r),a=ot(t);return n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length?qt.has(r)&&!a.values.length||qt.has(t)&&!n.values.length?ls(r,t):Qt(ur(hs(n,a),a.values),e):(tt(!0,`Complex values '${r}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),It(r,t))};function pr(r,t,e){return typeof r=="number"&&typeof t=="number"&&typeof e=="number"?et(r,t,e):Xt(r)(r,t)}const ms=r=>{const t=({timestamp:e})=>r(e);return{start:(e=!0)=>Pe.update(t,e),stop:()=>Bt(t),now:()=>wt.isProcessing?wt.timestamp:ye.now()}},hr=(r,t,e=10)=>{let n="";const a=Math.max(Math.round(t/e),2);for(let i=0;i<a;i++)n+=r(i/(a-1))+", ";return`linear(${n.substring(0,n.length-2)})`},vs=5;function fr(r,t,e){const n=Math.max(t-vs,0);return Xn(e-r(n),t-n)}const ce={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Zt=.001;function gs({duration:r=ce.duration,bounce:t=ce.bounce,velocity:e=ce.velocity,mass:n=ce.mass}){let a,i;tt(r<=Ce(ce.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=Se(ce.minDamping,ce.maxDamping,s),r=Se(ce.minDuration,ce.maxDuration,xe(r)),s<1?(a=l=>{const d=l*s,u=d*r,h=d-e,p=Jt(l,s),f=Math.exp(-u);return Zt-h/p*f},i=l=>{const u=l*s*r,h=u*e+e,p=Math.pow(s,2)*Math.pow(l,2)*r,f=Math.exp(-u),m=Jt(Math.pow(l,2),s);return(-a(l)+Zt>0?-1:1)*((h-p)*f)/m}):(a=l=>{const d=Math.exp(-l*r),u=(l-e)*r+1;return-Zt+d*u},i=l=>{const d=Math.exp(-l*r),u=(e-l)*(r*r);return d*u});const o=5/r,c=ys(a,i,o);if(r=Ce(r),isNaN(c))return{stiffness:ce.stiffness,damping:ce.damping,duration:r};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:s*2*Math.sqrt(n*l),duration:r}}}const bs=12;function ys(r,t,e){let n=e;for(let a=1;a<bs;a++)n=n-r(n)/t(n);return n}function Jt(r,t){return r*Math.sqrt(1-t*t)}const _s=["duration","bounce"],Es=["stiffness","damping","mass"];function mr(r,t){return t.some(e=>r[e]!==void 0)}function Cs(r){let t=U({velocity:ce.velocity,stiffness:ce.stiffness,damping:ce.damping,mass:ce.mass,isResolvedFromDuration:!1},r);if(!mr(r,Es)&&mr(r,_s))if(r.visualDuration){const e=r.visualDuration,n=2*Math.PI/(e*1.2),a=n*n,i=2*Se(.05,1,1-(r.bounce||0))*Math.sqrt(a);t=J(U({},t),{mass:ce.mass,stiffness:a,damping:i})}else{const e=gs(r);t=J(U(U({},t),e),{mass:ce.mass}),t.isResolvedFromDuration=!0}return t}function ct(r=ce.visualDuration,t=ce.bounce){const e=typeof r!="object"?{visualDuration:r,keyframes:[0,1],bounce:t}:r;let{restSpeed:n,restDelta:a}=e;const i=e.keyframes[0],s=e.keyframes[e.keyframes.length-1],o={done:!1,value:i},{stiffness:c,damping:l,mass:d,duration:u,velocity:h,isResolvedFromDuration:p}=Cs(J(U({},e),{velocity:-xe(e.velocity||0)})),f=h||0,m=l/(2*Math.sqrt(c*d)),v=s-i,b=xe(Math.sqrt(c/d)),w=Math.abs(v)<5;n||(n=w?ce.restSpeed.granular:ce.restSpeed.default),a||(a=w?ce.restDelta.granular:ce.restDelta.default);let x;if(m<1){const I=Jt(b,m);x=L=>{const N=Math.exp(-m*b*L);return s-N*((f+m*b*v)/I*Math.sin(I*L)+v*Math.cos(I*L))}}else if(m===1)x=I=>s-Math.exp(-b*I)*(v+(f+b*v)*I);else{const I=b*Math.sqrt(m*m-1);x=L=>{const N=Math.exp(-m*b*L),S=Math.min(I*L,300);return s-N*((f+m*b*v)*Math.sinh(S)+I*v*Math.cosh(S))/I}}const O={calculatedDuration:p&&u||null,next:I=>{const L=x(I);if(p)o.done=I>=u;else{let N=I===0?f:0;m<1&&(N=I===0?Ce(f):fr(x,I,L));const S=Math.abs(N)<=n,B=Math.abs(s-L)<=a;o.done=S&&B}return o.value=o.done?s:L,o},toString:()=>{const I=Math.min(Ut(O),Et),L=hr(N=>O.next(I*N).value,I,30);return I+"ms "+L},toTransition:()=>{}};return O}ct.applyToOptions=r=>{const t=Hn(r,100,ct);return r.ease=t.ease,r.duration=Ce(t.duration),r.type="keyframes",r};function en({keyframes:r,velocity:t=0,power:e=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:c,restDelta:l=.5,restSpeed:d}){const u=r[0],h={done:!1,value:u},p=S=>o!==void 0&&S<o||c!==void 0&&S>c,f=S=>o===void 0?c:c===void 0||Math.abs(o-S)<Math.abs(c-S)?o:c;let m=e*t;const v=u+m,b=s===void 0?v:s(v);b!==v&&(m=b-u);const w=S=>-m*Math.exp(-S/n),x=S=>b+w(S),O=S=>{const B=w(S),G=x(S);h.done=Math.abs(B)<=l,h.value=h.done?b:G};let I,L;const N=S=>{p(h.value)&&(I=S,L=ct({keyframes:[h.value,f(h.value)],velocity:fr(x,S,h.value),damping:a,stiffness:i,restDelta:l,restSpeed:d}))};return N(0),{calculatedDuration:null,next:S=>{let B=!1;return!L&&I===void 0&&(B=!0,O(S),N(S)),I!==void 0&&S>=I?L.next(S-I):(!B&&O(S),h)}}}function ws(r,t,e){const n=[],a=e||Ne.mix||pr,i=r.length-1;for(let s=0;s<i;s++){let o=a(r[s],r[s+1]);if(t){const c=Array.isArray(t)?t[s]||je:t;o=Qt(c,o)}n.push(o)}return n}function As(r,t,{clamp:e=!0,ease:n,mixer:a}={}){const i=r.length;if(Oe(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=r[0]===r[1];r[0]>r[i-1]&&(r=[...r].reverse(),t=[...t].reverse());const o=ws(t,n,a),c=o.length,l=d=>{if(s&&d<r[0])return t[0];let u=0;if(c>1)for(;u<r.length-2&&!(d<r[u+1]);u++);const h=Vt(r[u],r[u+1],d);return o[u](h)};return e?d=>l(Se(r[0],r[i-1],d)):l}function Ts(r,t){return r.map(e=>e*t)}const vr=(r,t,e)=>(((1-3*e+3*t)*r+(3*e-6*t))*r+3*t)*r,Is=1e-7,xs=12;function Os(r,t,e,n,a){let i,s,o=0;do s=t+(e-t)/2,i=vr(s,n,a)-r,i>0?e=s:t=s;while(Math.abs(i)>Is&&++o<xs);return s}function lt(r,t,e,n){if(r===t&&e===n)return je;const a=i=>Os(i,0,1,r,e);return i=>i===0||i===1?i:vr(a(i),t,n)}const Ns=lt(.42,0,1,1),Ps=lt(0,0,.58,1),gr=lt(.42,0,.58,1),br=r=>t=>t<=.5?r(2*t)/2:(2-r(2*(1-t)))/2,yr=r=>t=>1-r(1-t),_r=lt(.33,1.53,.69,.99),tn=yr(_r),Er=br(tn),Cr=r=>(r*=2)<1?.5*tn(r):.5*(2-Math.pow(2,-10*(r-1))),nn=r=>1-Math.sin(Math.acos(r)),Ls=yr(nn),wr=br(nn),Ar=r=>Array.isArray(r)&&typeof r[0]=="number",Tr={linear:je,easeIn:Ns,easeInOut:gr,easeOut:Ps,circIn:nn,circInOut:wr,circOut:Ls,backIn:tn,backInOut:Er,backOut:_r,anticipate:Cr},Rs=r=>typeof r=="string",Ir=r=>{if(Ar(r)){Oe(r.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,e,n,a]=r;return lt(t,e,n,a)}else if(Rs(r))return Oe(Tr[r]!==void 0,`Invalid easing type '${r}'`),Tr[r];return r};function ks(r,t){return r.map(()=>t||gr).splice(0,r.length-1)}function qe({duration:r=300,keyframes:t,times:e,ease:n="easeInOut"}){const a=Fn(n)?n.map(Ir):Ir(n),i={done:!1,value:t[0]},s=Ts(e&&e.length===t.length?e:jn(t),r),o=As(s,t,{ease:Array.isArray(a)?a:ks(t,a)});return{calculatedDuration:r,next:c=>(i.value=o(c),i.done=c>=r,i)}}const Ss=r=>r!==null;function rn(r,{repeat:t,repeatType:e="loop"},n,a=1){const i=r.filter(Ss),o=a<0||t&&e!=="loop"&&t%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const Ms={decay:en,inertia:en,tween:qe,keyframes:qe,spring:ct};function xr(r){typeof r.type=="string"&&(r.type=Ms[r.type])}class an{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ds=r=>r/100;class sn extends an{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,a;const{motionValue:e}=this.options;e&&e.updatedAt!==ye.now()&&this.tick(ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(n=this.options).onStop)==null||a.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;xr(t);const{type:e=qe,repeat:n=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=t;let{keyframes:o}=t;const c=e||qe;process.env.NODE_ENV!=="production"&&c!==qe&&Oe(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`),c!==qe&&typeof o[0]!="number"&&(this.mixKeyframes=Qt(Ds,pr(o[0],o[1])),o=[0,100]);const l=c(J(U({},t),{keyframes:o}));i==="mirror"&&(this.mirroredGenerator=c(J(U({},t),{keyframes:[...o].reverse(),velocity:-s}))),l.calculatedDuration===null&&(l.calculatedDuration=Ut(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(n+1)-a,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:n,totalDuration:a,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return n.next(0);const{delay:l=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:p,type:f,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const b=this.currentTime-l*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?b<0:b>a;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let x=this.currentTime,O=n;if(u){const S=Math.min(this.currentTime,a)/o;let B=Math.floor(S),G=S%1;!G&&S>=1&&(G=1),G===1&&B--,B=Math.min(B,u+1),!!(B%2)&&(h==="reverse"?(G=1-G,p&&(G-=p/o)):h==="mirror"&&(O=s)),x=Se(0,1,G)*o}const I=w?{done:!1,value:d[0]}:O.next(x);i&&(I.value=i(I.value));let{done:L}=I;!w&&c!==null&&(L=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return N&&f!==en&&(I.value=rn(d,this.options,v,this.speed)),m&&m(I.value),N&&this.finish(),I}then(t,e){return this.finished.then(t,e)}get duration(){return xe(this.calculatedDuration)}get time(){return xe(this.currentTime)}set time(t){var e;t=Ce(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(e=this.driver)==null||e.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ye.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=xe(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=ms,startTime:e}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(i=(a=this.options).onPlay)==null||i.call(a);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e!=null?e:n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,e;this.notifyFinished(),this.teardown(),this.state="finished",(e=(t=this.options).onComplete)==null||e.call(t)}cancel(){var t,e;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(e=(t=this.options).onCancel)==null||e.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var e;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(e=this.driver)==null||e.stop(),t.observe(this)}}function Vs(r){var t;for(let e=1;e<r.length;e++)(t=r[e])!=null||(r[e]=r[e-1])}const De=r=>r*180/Math.PI,on=r=>{const t=De(Math.atan2(r[1],r[0]));return cn(t)},Fs={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r=>(Math.abs(r[0])+Math.abs(r[3]))/2,rotate:on,rotateZ:on,skewX:r=>De(Math.atan(r[1])),skewY:r=>De(Math.atan(r[2])),skew:r=>(Math.abs(r[1])+Math.abs(r[2]))/2},cn=r=>(r=r%360,r<0&&(r+=360),r),Or=on,Nr=r=>Math.sqrt(r[0]*r[0]+r[1]*r[1]),Pr=r=>Math.sqrt(r[4]*r[4]+r[5]*r[5]),Us={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Nr,scaleY:Pr,scale:r=>(Nr(r)+Pr(r))/2,rotateX:r=>cn(De(Math.atan2(r[6],r[5]))),rotateY:r=>cn(De(Math.atan2(-r[2],r[0]))),rotateZ:Or,rotate:Or,skewX:r=>De(Math.atan(r[4])),skewY:r=>De(Math.atan(r[1])),skew:r=>(Math.abs(r[1])+Math.abs(r[4]))/2};function ln(r){return r.includes("scale")?1:0}function dn(r,t){if(!r||r==="none")return ln(t);const e=r.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,a;if(e)n=Us,a=e;else{const o=r.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Fs,a=o}if(!a)return ln(t);const i=n[t],s=a[1].split(",").map(zs);return typeof i=="function"?i(s):s[i]}const Bs=(r,t)=>{const{transform:e="none"}=getComputedStyle(r);return dn(e,t)};function zs(r){return parseFloat(r.trim())}const Lr=r=>r===Ye||r===X,js=new Set(["x","y","z"]),Hs=He.filter(r=>!js.has(r));function Ks(r){const t=[];return Hs.forEach(e=>{const n=r.getValue(e);n!==void 0&&(t.push([e,n.get()]),n.set(e.startsWith("scale")?1:0))}),t}const Ve={width:({x:r},{paddingLeft:t="0",paddingRight:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),height:({y:r},{paddingTop:t="0",paddingBottom:e="0"})=>r.max-r.min-parseFloat(t)-parseFloat(e),top:(r,{top:t})=>parseFloat(t),left:(r,{left:t})=>parseFloat(t),bottom:({y:r},{top:t})=>parseFloat(t)+(r.max-r.min),right:({x:r},{left:t})=>parseFloat(t)+(r.max-r.min),x:(r,{transform:t})=>dn(t,"x"),y:(r,{transform:t})=>dn(t,"y")};Ve.translateX=Ve.x,Ve.translateY=Ve.y;const Fe=new Set;let un=!1,pn=!1,hn=!1;function Rr(){if(pn){const r=Array.from(Fe).filter(n=>n.needsMeasurement),t=new Set(r.map(n=>n.element)),e=new Map;t.forEach(n=>{const a=Ks(n);a.length&&(e.set(n,a),n.render())}),r.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const a=e.get(n);a&&a.forEach(([i,s])=>{var o;(o=n.getValue(i))==null||o.set(s)})}),r.forEach(n=>n.measureEndState()),r.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}pn=!1,un=!1,Fe.forEach(r=>r.complete(hn)),Fe.clear()}function kr(){Fe.forEach(r=>{r.readKeyframes(),r.needsMeasurement&&(pn=!0)})}function Ys(){hn=!0,kr(),Rr(),hn=!1}class fn{constructor(t,e,n,a,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Fe.add(this),un||(un=!0,Pe.read(kr),Pe.resolveKeyframes(Rr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:a}=this;if(t[0]===null){const i=a==null?void 0:a.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&e){const o=n.readValue(e,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),a&&i===void 0&&a.set(t[0])}Vs(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Fe.delete(this)}cancel(){this.state==="scheduled"&&(Fe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ws=r=>r.startsWith("--");function Gs(r,t,e){Ws(t)?r.style.setProperty(t,e):r.style[t]=e}function mn(r){let t;return()=>(t===void 0&&(t=r()),t)}const $s=mn(()=>window.ScrollTimeline!==void 0),qs={};function Qs(r,t){const e=mn(r);return()=>{var n;return(n=qs[t])!=null?n:e()}}const Sr=Qs(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(r){return!1}return!0},"linearEasing"),dt=([r,t,e,n])=>`cubic-bezier(${r}, ${t}, ${e}, ${n})`,Mr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:dt([0,.65,.55,1]),circOut:dt([.55,0,1,.45]),backIn:dt([.31,.01,.66,-.59]),backOut:dt([.33,1.53,.69,.99])};function Dr(r,t){if(r)return typeof r=="function"?Sr()?hr(r,t):"ease-out":Ar(r)?dt(r):Array.isArray(r)?r.map(e=>Dr(e,t)||Mr.easeOut):Mr[r]}function Xs(r,t,e,{delay:n=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeOut",times:c}={},l=void 0){const d={[t]:e};c&&(d.offset=c);const u=Dr(o,a);Array.isArray(u)&&(d.easing=u);const h={delay:n,duration:a,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),r.animate(d,h)}function Zs(e){var n=e,{type:r}=n,t=Ae(n,["type"]);var a,i;return Ft(r)&&Sr()?r.applyToOptions(t):((a=t.duration)!=null||(t.duration=300),(i=t.ease)!=null||(t.ease="easeOut"),t)}class Js extends an{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:n,keyframes:a,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:o,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,Oe(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const l=Zs(t);this.animation=Xs(e,n,a,l,i),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=rn(a,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):Gs(e,n,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,e;(e=(t=this.animation).finish)==null||e.call(t)}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,e;this.isPseudoElement||(e=(t=this.animation).commitStyles)==null||e.call(t)}get duration(){var e,n;const t=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return xe(Number(t))}get time(){return xe(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&$s()?(this.animation.timeline=t,je):e(this)}}const Vr={anticipate:Cr,backInOut:Er,circInOut:wr};function eo(r){return r in Vr}function to(r){typeof r.ease=="string"&&eo(r.ease)&&(r.ease=Vr[r.ease])}const Fr=10;class no extends Js{constructor(t){to(t),xr(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){var d;const l=this.options,{motionValue:e,onUpdate:n,onComplete:a,element:i}=l,s=Ae(l,["motionValue","onUpdate","onComplete","element"]);if(!e)return;if(t!==void 0){e.set(t);return}const o=new sn(J(U({},s),{autoplay:!1})),c=Ce((d=this.finishedTime)!=null?d:this.time);e.setWithVelocity(o.sample(c-Fr).value,o.sample(c).value,Fr),o.stop()}}const Ur=(r,t)=>t==="zIndex"?!1:!!(typeof r=="number"||Array.isArray(r)||typeof r=="string"&&($e.test(r)||r==="0")&&!r.startsWith("url("));function ro(r){const t=r[0];if(r.length===1)return!0;for(let e=0;e<r.length;e++)if(r[e]!==t)return!0}function io(r,t,e,n){const a=r[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=r[r.length-1],s=Ur(a,t),o=Ur(i,t);return tt(s===o,`You are trying to animate ${t} from "${a}" to "${i}". ${a} is not an animatable value - to enable this animation set ${a} to a value animatable to ${i} via the \`style\` property.`),!s||!o?!1:ro(r)||(e==="spring"||Ft(e))&&n}function Br(r){return typeof r=="object"&&r!==null}function ao(r){return Br(r)&&"offsetHeight"in r}const so=new Set(["opacity","clipPath","filter","transform"]),oo=mn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function co(r){var l;const{motionValue:t,name:e,repeatDelay:n,repeatType:a,damping:i,type:s}=r;if(!ao((l=t==null?void 0:t.owner)==null?void 0:l.current))return!1;const{onUpdate:o,transformTemplate:c}=t.owner.getProps();return oo()&&e&&so.has(e)&&(e!=="transform"||!c)&&!o&&!n&&a!=="mirror"&&i!==0&&s!=="inertia"}const lo=40;class uo extends an{constructor(h){var p=h,{autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",keyframes:o,name:c,motionValue:l,element:d}=p,u=Ae(p,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);var v;super(),this.stop=()=>{var b,w;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(w=this.keyframeResolver)==null||w.cancel()},this.createdAt=ye.now();const f=U({autoplay:t,delay:e,type:n,repeat:a,repeatDelay:i,repeatType:s,name:c,motionValue:l,element:d},u),m=(d==null?void 0:d.KeyframeResolver)||fn;this.keyframeResolver=new m(o,(b,w,x)=>this.onKeyframesResolved(b,w,f,!x),c,l,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,e,n,a){this.keyframeResolver=void 0;const{name:i,type:s,velocity:o,delay:c,isHandoff:l,onUpdate:d}=n;this.resolvedAt=ye.now(),io(t,i,s,o)||((Ne.instantAnimations||!c)&&(d==null||d(rn(t,n,e))),t[0]=t[t.length-1],n.duration=0,n.repeat=0);const u=a?this.resolvedAt?this.resolvedAt-this.createdAt>lo?this.resolvedAt:this.createdAt:this.createdAt:void 0,h=J(U({startTime:u,finalKeyframe:e},n),{keyframes:t}),p=!l&&co(h)?new no(J(U({},h),{element:h.motionValue.owner.current})):new sn(h);p.finished.then(()=>this.notifyFinished()).catch(je),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Ys()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const zr=(r,t,e,n={},a,i)=>s=>{const o=Jn(n,r)||{},c=o.delay||n.delay||0;let{elapsed:l=0}=n;l=l-Ce(c);const d=J(U({keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity()},o),{delay:-l,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:r,motionValue:t,element:i?void 0:a});Ka(o)||Object.assign(d,Ha(r,d)),d.duration&&(d.duration=Ce(d.duration)),d.repeatDelay&&(d.repeatDelay=Ce(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(u=!0)),(Ne.instantAnimations||Ne.skipAnimations)&&(u=!0,d.duration=0,d.delay=0),d.allowFlatten=!o.type&&!o.ease,u&&!i&&t.get()!==void 0){const h=Fa(d.keyframes,o);if(h!==void 0){Pe.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new sn(d):new uo(d)},jr=new Set(["width","height","top","left","right","bottom",...He]);function po({protectedKeys:r,needsAnimating:t},e){const n=r.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,n}function ho(r,t,{delay:e=0,transitionOverride:n,type:a}={}){var u;let d=t,{transition:i=r.getDefaultTransition(),transitionEnd:s}=d,o=Ae(d,["transition","transitionEnd"]);n&&(i=n);const c=[],l=a&&r.animationState&&r.animationState.getState()[a];for(const h in o){const p=r.getValue(h,(u=r.latestValues[h])!=null?u:null),f=o[h];if(f===void 0||l&&po(l,h))continue;const m=U({delay:e},Jn(i||{},h)),v=p.get();if(v!==void 0&&!p.isAnimating&&!Array.isArray(f)&&f===v&&!m.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const x=Da(r);if(x){const O=window.MotionHandoffAnimation(x,h,Pe);O!==null&&(m.startTime=O,b=!0)}}Sa(r,h),p.start(zr(h,p,f,r.shouldReduceMotion&&jr.has(h)?{type:!1}:m,r,b));const w=p.animation;w&&c.push(w)}return s&&Promise.all(c).then(()=>{Pe.update(()=>{s&&Ra(r,s)})}),c}function fo({top:r,left:t,right:e,bottom:n}){return{x:{min:t,max:e},y:{min:r,max:n}}}function mo(r,t){if(!t)return r;const e=t({x:r.left,y:r.top}),n=t({x:r.right,y:r.bottom});return{top:e.y,left:e.x,bottom:n.y,right:n.x}}function vo(r,t){return fo(mo(r.getBoundingClientRect(),t))}const Hr={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},vn={};for(const r in Hr)vn[r]={isEnabled:t=>Hr[r].some(e=>!!t[e])};const Kr=()=>({min:0,max:0}),gn=()=>({x:Kr(),y:Kr()}),go=typeof window!="undefined",bn={current:null},Yr={current:!1};function bo(){if(Yr.current=!0,!!go)if(window.matchMedia){const r=window.matchMedia("(prefers-reduced-motion)"),t=()=>bn.current=r.matches;r.addListener(t),t()}else bn.current=!1}function yo(r){return r!==null&&typeof r=="object"&&typeof r.start=="function"}function _o(r){return typeof r=="string"||Array.isArray(r)}const Eo=["initial",...["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"]];function Wr(r){return yo(r.animate)||Eo.some(t=>_o(r[t]))}function Co(r){return!!(Wr(r)||r.variants)}function wo(r,t,e){for(const n in t){const a=t[n],i=e[n];if(ge(a))r.addValue(n,a);else if(ge(i))r.addValue(n,rt(a,{owner:r}));else if(i!==a)if(r.hasValue(n)){const s=r.getValue(n);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=r.getStaticValue(n);r.addValue(n,rt(s!==void 0?s:a,{owner:r}))}}for(const n in e)t[n]===void 0&&r.removeValue(n);return t}const Gr=r=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r),$r=r=>/^0[^.\s]+$/u.test(r),Ao={test:r=>r==="auto",parse:r=>r},qr=r=>t=>t.test(r),Qr=[Ye,X,We,Le,Za,Xa,Ao],Xr=r=>Qr.find(qr(r)),To=[...Qr,fe,$e],Io=r=>To.find(qr(r)),xo=new Set(["brightness","contrast","saturate","opacity"]);function Oo(r){const[t,e]=r.slice(0,-1).split("(");if(t==="drop-shadow")return r;const[n]=e.match(Ht)||[];if(!n)return r;const a=e.replace(n,"");let i=xo.has(t)?1:0;return n!==e&&(i*=100),t+"("+i+a+")"}const No=/\b([a-z-]*)\(.*?\)/gu,yn=J(U({},$e),{getAnimatableNone:r=>{const t=r.match(No);return t?t.map(Oo).join(" "):r}}),Zr=J(U({},Ye),{transform:Math.round}),_n=J(U({borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,radius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,backgroundPositionX:X,backgroundPositionY:X},{rotate:Le,rotateX:Le,rotateY:Le,rotateZ:Le,scale:Tt,scaleX:Tt,scaleY:Tt,scaleZ:Tt,skew:Le,skewX:Le,skewY:Le,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:it,originX:rr,originY:rr,originZ:X}),{zIndex:Zr,fillOpacity:it,strokeOpacity:it,numOctaves:Zr}),Po=J(U({},_n),{color:fe,backgroundColor:fe,outlineColor:fe,fill:fe,stroke:fe,borderColor:fe,borderTopColor:fe,borderRightColor:fe,borderBottomColor:fe,borderLeftColor:fe,filter:yn,WebkitFilter:yn}),Jr=r=>Po[r];function ei(r,t){let e=Jr(r);return e!==yn&&(e=$e),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const ti=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ni{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ye.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Pe.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=s;this.latestValues=c,this.baseTarget=U({},c),this.initialValues=e.initial?U({},c):{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Wr(e),this.isVariantNode=Co(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const h=this.scrapeMotionValuesFromProps(e,{},this),{willChange:d}=h,u=Ae(h,["willChange"]);for(const p in u){const f=u[p];c[p]!==void 0&&ge(f)&&f.set(c[p],!1)}}mount(t){this.current=t,nt.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,n)=>this.bindToMotionValue(n,e)),Yr.current||bo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:bn.current,process.env.NODE_ENV!=="production"&&qn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Bt(this.notifyUpdate),Bt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Ke.has(t);n&&this.onBindTransform&&this.onBindTransform();const a=e.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Pe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=e.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{a(),i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in vn){const e=vn[t];if(!e)continue;const{isEnabled:n,Feature:a}=e;if(!this.features[t]&&a&&n(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<ti.length;n++){const a=ti[n];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,s=t[i];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=wo(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&e!==void 0&&(n=rt(e===null?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var a;let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(a=this.getBaseTargetFromProps(this.props,t))!=null?a:this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(Gr(n)||$r(n))?n=parseFloat(n):!Io(n)&&$e.test(e)&&(n=ei(t,e)),this.setBaseTarget(t,ge(n)?n.get():n)),ge(n)?n.get():n}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var i;const{initial:e}=this.props;let n;if(typeof e=="string"||typeof e=="object"){const s=Gn(this.props,e,(i=this.presenceContext)==null?void 0:i.custom);s&&(n=s[t])}if(e&&n!==void 0)return n;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ge(a)?a:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new Qn),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}const Lo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ro(r){const t=Lo.exec(r);if(!t)return[,];const[,e,n,a]=t;return[`--${e!=null?e:n}`,a]}const ko=4;function ri(r,t,e=1){Oe(e<=ko,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`);const[n,a]=Ro(r);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const s=i.trim();return Gr(s)?parseFloat(s):s}return jt(a)?ri(a,t,e+1):a}function So(r){return typeof r=="number"?r===0:r!==null?r==="none"||r==="0"||$r(r):!0}const Mo=new Set(["auto","none","0"]);function Do(r,t,e){let n=0,a;for(;n<r.length&&!a;){const i=r[n];typeof i=="string"&&!Mo.has(i)&&ot(i).values.length&&(a=r[n]),n++}if(a&&e)for(const i of t)r[i]=ei(e,a)}class Vo extends fn{constructor(t,e,n,a,i){super(t,e,n,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),jt(l))){const d=ri(l,e.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!jr.has(n)||t.length!==2)return;const[a,i]=t,s=Xr(a),o=Xr(i);if(s!==o)if(Lr(s)&&Lr(o))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else Ve[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let a=0;a<t.length;a++)(t[a]===null||So(t[a]))&&n.push(a);n.length&&Do(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ve[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const a=e[e.length-1];a!==void 0&&t.getValue(n,a).jump(a,!1)}measureEndState(){var o;const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const a=t.getValue(e);a&&a.jump(this.measuredOrigin,!1);const i=n.length-1,s=n[i];n[i]=Ve[e](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([c,l])=>{t.getValue(c).set(l)}),this.resolveNoneKeyframes()}}class ii extends ni{constructor(){super(...arguments),this.KeyframeResolver=Vo}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const ai=(r,t)=>t&&typeof r=="number"?t.transform(r):r,Fo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Uo=He.length;function Bo(r,t,e){let n="",a=!0;for(let i=0;i<Uo;i++){const s=He[i],o=r[s];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(s.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||e){const l=ai(o,_n[s]);if(!c){a=!1;const d=Fo[s]||s;n+=`${d}(${l}) `}e&&(t[s]=l)}}return n=n.trim(),e?n=e(t,a?"":n):a&&(n="none"),n}function si(r,t,e){const{style:n,vars:a,transformOrigin:i}=r;let s=!1,o=!1;for(const c in t){const l=t[c];if(Ke.has(c)){s=!0;continue}else if(tr(c)){a[c]=l;continue}else{const d=ai(l,_n[c]);c.startsWith("origin")?(o=!0,i[c]=d):n[c]=d}}if(t.transform||(s||e?n.transform=Bo(t,r.transform,e):n.transform&&(n.transform="none")),o){const{originX:c="50%",originY:l="50%",originZ:d=0}=i;n.transformOrigin=`${c} ${l} ${d}`}}function oi(r,{style:t,vars:e},n,a){Object.assign(r.style,t,a&&a.getProjectionStyles(n));for(const i in e)r.style.setProperty(i,e[i])}const zo={};function jo(r,{layout:t,layoutId:e}){return Ke.has(r)||r.startsWith("origin")||(t||e!==void 0)&&(!!zo[r]||r==="opacity")}function ci(r,t,e){var i;const{style:n}=r,a={};for(const s in n)(ge(n[s])||t.style&&ge(t.style[s])||jo(s,r)||((i=e==null?void 0:e.getValue(s))==null?void 0:i.liveStyle)!==void 0)&&(a[s]=n[s]);return a}function Ho(r){return window.getComputedStyle(r)}class Ko extends ii{constructor(){super(...arguments),this.type="html",this.renderInstance=oi}readValueFromInstance(t,e){var n;if(Ke.has(e))return(n=this.projection)!=null&&n.isProjecting?ln(e):Bs(t,e);{const a=Ho(t),i=(tr(e)?a.getPropertyValue(e):a[e])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return vo(t,e)}build(t,e,n){si(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return ci(t,e,n)}}function Yo(r,t){return r in t}class Wo extends ni{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(Yo(e,t)){const n=t[e];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return gn()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}const Go={offset:"stroke-dashoffset",array:"stroke-dasharray"},$o={offset:"strokeDashoffset",array:"strokeDasharray"};function qo(r,t,e=1,n=0,a=!0){r.pathLength=1;const i=a?Go:$o;r[i.offset]=X.transform(-n);const s=X.transform(t),o=X.transform(e);r[i.array]=`${s} ${o}`}function Qo(r,u,c,l,d){var h=u,{attrX:t,attrY:e,attrScale:n,pathLength:a,pathSpacing:i=1,pathOffset:s=0}=h,o=Ae(h,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]);var m,v;if(si(r,o,l),c){r.style.viewBox&&(r.attrs.viewBox=r.style.viewBox);return}r.attrs=r.style,r.style={};const{attrs:p,style:f}=r;p.transform&&(f.transform=p.transform,delete p.transform),(f.transform||p.transformOrigin)&&(f.transformOrigin=(m=p.transformOrigin)!=null?m:"50% 50%",delete p.transformOrigin),f.transform&&(f.transformBox=(v=d==null?void 0:d.transformBox)!=null?v:"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),e!==void 0&&(p.y=e),n!==void 0&&(p.scale=n),a!==void 0&&qo(p,a,i,s,!1)}const li=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Xo=r=>typeof r=="string"&&r.toLowerCase()==="svg";function Zo(r,t,e,n){oi(r,t,void 0,n);for(const a in t.attrs)r.setAttribute(li.has(a)?a:zt(a),t.attrs[a])}function Jo(r,t,e){const n=ci(r,t,e);for(const a in r)if(ge(r[a])||ge(t[a])){const i=He.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;n[i]=r[a]}return n}class ec extends ii{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Ke.has(e)){const n=Jr(e);return n&&n.default||0}return e=li.has(e)?e:zt(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Jo(t,e,n)}build(t,e,n){Qo(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,a){Zo(t,e,n,a)}mount(t){this.isSVGTag=Xo(t.tagName),super.mount(t)}}function di(r){return Br(r)&&"ownerSVGElement"in r}function tc(r){return di(r)&&r.tagName==="svg"}function nc(r){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=di(r)&&!tc(r)?new ec(t):new Ko(t);e.mount(r),nt.set(r,e)}function rc(r){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new Wo(t);e.mount(r),nt.set(r,e)}function ic(r,t,e){const n=ge(r)?r:rt(r);return n.start(zr("",n,t,e)),n.animation}function ac(r,t){return ge(r)||typeof r=="number"||typeof r=="string"&&!Dt(t)}function ui(r,t,e,n){const a=[];if(ac(r,t))a.push(ic(r,Dt(t)&&t.default||t,e&&(e.default||e)));else{const i=Dn(r,t,n),s=i.length;Oe(!!s,"No valid elements provided.");for(let o=0;o<s;o++){const c=i[o],l=c instanceof Element?nc:rc;nt.has(c)||l(c);const d=nt.get(c),u=U({},e);"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(o,s)),a.push(...ho(d,J(U({},t),{transition:u}),{}))}}return a}function sc(r,t,e){const n=[];return ga(r,t,e,{spring:ct}).forEach(({keyframes:i,transition:s},o)=>{n.push(...ui(o,i,s))}),n}class oc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(n=>n.attachTimeline(t));return()=>{e.forEach((n,a)=>{n&&n(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class cc extends oc{then(t,e){return this.finished.finally(t).then(()=>{})}}function lc(r){return Array.isArray(r)&&r.some(Array.isArray)}function dc(r){function t(e,n,a){let i=[];return lc(e)?i=sc(e,n,r):i=ui(e,n,a,r),new cc(i)}return t}const pe=dc(),ie={spinner:"_spinner_1lif3_1",spinnerContainer:"_spinnerContainer_1lif3_5",success:"_success_1lif3_9",successContainer:"_successContainer_1lif3_14",container:"_container_1lif3_57",card:"_card_1lif3_66",warning:"_warning_1lif3_75",svg:"_svg_1lif3_83",srOnly:"_srOnly_1lif3_88",backButton:"_backButton_1lif3_92"};function ae(r,t){if(!t)return;const e=t.trim().split(/\s+/).filter(n=>n.length>0);r.classList.add(...e)}class pi{constructor(){A(this,"template",`
|
|
3
3
|
<svg class="${ie.spinner}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 215 215" fill="none">
|
|
4
4
|
<path d="M214.476 107.728C214.476 132.466 205.898 156.439 190.204 175.562C174.51 194.686 152.671 207.775 128.408 212.602C104.144 217.428 78.9585 213.692 57.141 202.03C35.3236 190.369 18.2247 171.503 8.75763 148.647C-0.709393 125.792 -1.95874 100.361 5.22248 76.6878C12.4037 53.0145 27.5711 32.5636 48.1405 18.8196C68.7098 5.07558 93.4083 -1.11108 118.028 1.31372C142.647 3.73851 165.664 14.6247 183.157 32.1175L168.035 47.2395C154.041 33.2453 135.627 24.5363 115.932 22.5965C96.236 20.6566 76.4772 25.606 60.0217 36.6012C43.5663 47.5964 31.4323 63.9571 25.6874 82.8957C19.9424 101.834 20.9419 122.179 28.5155 140.463C36.0891 158.748 49.7683 173.84 67.2222 183.17C84.6761 192.499 104.825 195.488 124.235 191.627C143.646 187.766 161.117 177.294 173.672 161.995C186.228 146.697 193.09 127.518 193.09 107.728L214.476 107.728Z" fill="currentColor"/>
|
|
5
5
|
</svg>
|